[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdelibs/kdeui
From:       Olivier Goffart <ogoffart () tiscalinet ! be>
Date:       2004-02-05 17:45:47
Message-ID: 20040205174547.9F12D991D () office ! kde ! org
[Download RAW message or body]

CVS commit by ogoffart: 

Add actions icons in the configure shortcut dialog to make it more usable.

I get no answer of the patch i posted on kde-usability, so i guess it's ok.


  M +2 -0      kactioncollection.cpp   1.313
  M +2 -0      kactionshortcutlist.h   1.5
  M +7 -2      kkeydialog.cpp   1.155


--- kdelibs/kdeui/kactioncollection.cpp  #1.312:1.313
@@ -681,4 +681,6 @@ QVariant KActionShortcutList::getOther( 
 bool KActionShortcutList::setOther( Other, uint, QVariant )
         { return false; }
+const KAction *KActionShortcutList::action( uint i) const
+        { return m_actions.action(i); }
 
 bool KActionShortcutList::save() const

--- kdelibs/kdeui/kactionshortcutlist.h  #1.4:1.5
@@ -32,4 +32,6 @@ class KActionShortcutList : public KShor
         virtual bool save() const;
 
+        const KAction *action( uint ) const;
+
  protected:
         KActionCollection& m_actions;

--- kdelibs/kdeui/kkeydialog.cpp  #1.154:1.155
@@ -414,4 +414,5 @@ void KKeyChooser::buildListView( uint iL
 {
         KShortcutList* pList = d->rgpLists[iList];
+        KActionShortcutList *pAList = dynamic_cast<KActionShortcutList*>(pList);
 
         if( m_type == Global || m_type == ApplicationGlobal )
@@ -444,6 +445,9 @@ void KKeyChooser::buildListView( uint iL
                                 delete pGroupItem;
                         pGroupItem = pParentItem = pItem;
-                } else if( !sName.isEmpty() && pList->isConfigurable(iAction) )
+                } else if( !sName.isEmpty() && pList->isConfigurable(iAction) ) {
                         pItem = new KKeyChooserItem( pParentItem, pItem, pList, iAction );
+                        if(pAList)
+                                \
pItem->setPixmap(0,pAList->action(iAction)->iconSet().pixmap(QIconSet::Small,QIconSet::Normal)); +        \
}  }
         if( !pProgramItem->firstChild() )


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic