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

List:       kde-commits
Subject:    KDE/kdepim/akregator/src
From:       Teemu Rytilahti <tpr () d5k ! net>
Date:       2008-08-19 17:35:58
Message-ID: 1219167358.011163.17991.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 849501 by rytilahti:

use KStandardActions to create the settings menu. follow also the same order for menu \
entries than other KDE applications.

it currently duplicates menu entries when running inside kontact (for settings menu), \
need to take a look at that later. just wanted to commit if someone has an idea how \
this could be fixed.

CCBUGS:164649


 M  +11 -4     actionmanagerimpl.cpp  
 M  +12 -7     akregator_part.rc  
 M  +11 -12    akregator_shell.rc  
 M  +3 -6      mainwindow.cpp  


--- trunk/KDE/kdepim/akregator/src/actionmanagerimpl.cpp #849500:849501
@@ -161,8 +161,8 @@
 
     if (actionCollection()->action("feed_fetch_all"))
         traypop->addAction(actionCollection()->action("feed_fetch_all"));
-    if (actionCollection()->action("akregator_configure_akregator"))
-        traypop->addAction(actionCollection()->action("akregator_configure_akregator"));
 +    if (actionCollection()->action("options_configure"))
+        traypop->addAction(actionCollection()->action("options_configure"));
 }
 
 void ActionManagerImpl::initPart()
@@ -177,10 +177,17 @@
     connect(action, SIGNAL(triggered(bool)), d->part, SLOT(fileExport()));
 
     KStandardAction::configureNotifications(d->part, SLOT(showKNotifyOptions()), \
                d->actionCollection); // options_configure_notifications
-    action = d->actionCollection->addAction("akregator_configure_akregator");
+
+    KStandardAction::keyBindings(d->part->parent(), SLOT(optionsConfigureKeys()), \
d->actionCollection); // options_configure_keybinding +
+    KStandardAction::configureToolbars(d->part->parent(), \
SLOT(optionsConfigureToolbars()), d->actionCollection); // options_configure_toolbars \
+ +    KStandardAction::preferences(d->part, SLOT(showOptions()), \
d->actionCollection); // options_configure +
+    /*action = d->actionCollection->addAction("akregator_configure_akregator");
     action->setIcon(KIcon("configure"));
     action->setText(i18n("Configure &Akregator..."));
-    connect(action, SIGNAL(triggered(bool)), d->part, SLOT(showOptions()));
+    connect(action, SIGNAL(triggered(bool)), d->part, SLOT(showOptions()));*/
 }
 
 void ActionManagerImpl::initMainWidget(MainWidget* mainWidget)
--- trunk/KDE/kdepim/akregator/src/akregator_part.rc #849500:849501
@@ -1,5 +1,5 @@
 <!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
-<kpartgui name="akregator_part" version="411">
+<kpartgui name="akregator_part" version="412">
 <MenuBar>
   <Menu name="file">
     <Action name="file_import"/>
@@ -68,13 +68,18 @@
   <Action name="file_sendfile"/>
 
   </Menu>
-  
-  <Menu name="settings">
-    <Action name="show_quick_filter"/>
-    <Separator/>
-    <Action name="options_configure_notifications" group="settings_configure"/>
-    <Action name="akregator_configure_akregator" group="settings_configure"/>
+
+  <Menu noMerge="1" name="settings" >
+   <text>&amp;Settings</text>
+   <Merge name="StandardToolBarMenuHandler" />
+   <Action name="show_quick_filter" />
+   <Separator/>
+   <Action group="settings_configure" name="options_configure_keybinding" />
+   <Action group="settings_configure" name="options_configure_notifications" />
+   <Action group="settings_configure" name="options_configure_toolbars" />
+   <Action group="settings_configure" name="options_configure" />
   </Menu>
+
   <Menu name="help">
   </Menu>
 </MenuBar>
--- trunk/KDE/kdepim/akregator/src/akregator_shell.rc #849500:849501
@@ -1,5 +1,5 @@
 <!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
-<kpartgui name="akregator_shell" version="390">
+<kpartgui name="akregator_shell" version="391">
 <MenuBar>
   <Menu noMerge="1" name="file"><text>&amp;File</text>
     <Merge/>
@@ -32,19 +32,18 @@
     <Merge/>
   </Menu>
   
-  <Menu noMerge="1" name="settings"><text>&amp;Settings</text>
-    <Merge name="StandardToolBarMenuHandler" />
-    <Action name="options_show_statusbar"/>
-    <Merge name="show_merge"/>
-    <Separator/>
-    <Action name="fetch_on_startup"/>
-    <Separator/>
-    <Merge/>
-    <Action name="options_configure_keybinding"/>
-    <Action name="options_configure_toolbars"/>
-    <Merge name="configure_merge"/>
+  <Menu noMerge="1" name="settings" >
+   <text>&amp;Settings</text>
+   <Merge name="StandardToolBarMenuHandler" />
+   <Action name="show_quick_filter" />
+   <Separator/>
+   <Action group="settings_configure" name="options_configure_keybinding" />
+   <Action group="settings_configure" name="options_configure_notifications" />
+   <Action group="settings_configure" name="options_configure_toolbars" />
+   <Action group="settings_configure" name="options_configure" />
   </Menu>
 </MenuBar>
+
 <ToolBar noMerge="1" name="mainToolBar"><text>Main Toolbar</text>
   <Merge/>
   <Action name="stop"/>
--- trunk/KDE/kdepim/akregator/src/mainwindow.cpp #849500:849501
@@ -158,9 +158,6 @@
 
     setStandardToolBarMenuEnabled(true);
     createStandardStatusBarAction();
-
-    KStandardAction::keyBindings(this, SLOT(optionsConfigureKeys()), \
                actionCollection());
-    KStandardAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), \
actionCollection());  }
 
 void MainWindow::saveProperties(KConfigGroup &config)
@@ -186,6 +183,7 @@
         show();
 }
 
+// TODO: move to part?
 void MainWindow::optionsConfigureKeys()
 {
     KShortcutsDialog dlg( KShortcutsEditor::AllActions,
@@ -198,6 +196,7 @@
     dlg.configure();
 }
 
+// TODO: move to part?
 void MainWindow::optionsConfigureToolbars()
 {
     saveMainWindowSettings(KGlobal::config().data()->group( autoSaveGroup()) );
@@ -209,14 +208,12 @@
     dlg.exec();
 }
 
-
-
+// TODO: move to part?
 void MainWindow::applyNewToolbarConfig()
 {
     applyMainWindowSettings(KGlobal::config()->group( autoSaveGroup()) );
 }
 
-
 KParts::BrowserExtension *MainWindow::browserExtension(KParts::ReadOnlyPart *p)
 {
     return KParts::BrowserExtension::childObject( p );


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

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