[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdepim/kontact/src
From: Rafael Fernández López <ereslibre () kde ! org>
Date: 2008-09-02 19:28:42
Message-ID: 1220383722.550966.2703.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 856395 by ereslibre:
I changed the lessThan method for the navigator toolbar that is on the inverse layout \
direction than the rest of the system for the actions being on the same order, but \
hey... I was giving the shortcuts on order too. Invert them, since I am inverting the \
order they are added.
M +4 -4 mainwindow.cpp
--- trunk/KDE/kdepim/kontact/src/mainwindow.cpp #856394:856395
@@ -558,10 +558,10 @@
{
ActionPluginList::ConstIterator end = mActionPlugins.end();
ActionPluginList::ConstIterator it;
- int i = 1;
+ int i = 0;
for ( it = mActionPlugins.begin(); it != end; ++it ) {
KAction *action = static_cast<KAction*>( *it );
- QString shortcut = QString( "Ctrl+%1" ).arg( i );
+ QString shortcut = QString( "Ctrl+%1" ).arg( mActionPlugins.count() - i );
action->setShortcut( KShortcut( shortcut ) );
i++;
}
@@ -648,10 +648,10 @@
// we need to take in count their weights for setting shortcuts again
qSort( mActionPlugins.begin(), mActionPlugins.end(), pluginActionWeightLessThan );
qSort( mPlugins.begin(), mPlugins.end(), pluginWeightLessThan );
- int i = 1;
+ int i = 0;
foreach ( QAction *qaction, mActionPlugins ) {
KAction *action = static_cast<KAction*>( qaction );
- QString shortcut = QString( "Ctrl+%1" ).arg( i );
+ QString shortcut = QString( "Ctrl+%1" ).arg( mActionPlugins.count() - i );
action->setShortcut( KShortcut( shortcut ) );
i++;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic