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

List:       kde-commits
Subject:    kdeextragear-2/kimdaba
From:       Jesper Pedersen <blackie () blackie ! dk>
Date:       2004-05-31 20:43:59
Message-ID: 20040531204359.9476C126E9 () office ! kde ! org
[Download RAW message or body]

CVS commit by blackie: 

its now possible to configure shortcuts of plugins


  M +13 -5     mainview.cpp   1.126
  M +6 -0      mainview.h   1.61


--- kdeextragear-2/kimdaba/mainview.cpp  #1.125:1.126
@@ -1018,6 +1017,13 @@ void MainView::slotConfigureKeyBindings(
     dialog->insert( actionCollection(), i18n( "General" ) );
     dialog->insert( viewer->actions(), i18n("Viewer") );
+
+    KIPI::PluginLoader::List list = _pluginLoader->pluginList();
+    for( QPtrListIterator<KIPI::Plugin> it( list ); *it; ++it ) {
+        KIPI::Plugin* plugin = *it;
+        dialog->insert( plugin->actionCollection(), QString::fromLatin1(plugin->name()) );
+    }
+
     dialog->configure();
-    dialog->commitChanges();
+
     delete dialog;
     delete viewer;
@@ -1168,6 +1174,6 @@ void MainView::loadPlugins()
             << QString::fromLatin1( "SlideShow" );
 
-    KIPI::PluginLoader* loader = new KIPI::PluginLoader( ignores, interface );
-    loader->loadPlugins();
+    _pluginLoader = new KIPI::PluginLoader( ignores, interface );
+    _pluginLoader->loadPlugins();
 
     QPtrList<KAction> fileActions;
@@ -1175,7 +1181,8 @@ void MainView::loadPlugins()
     QPtrList<KAction> toolsActions;
 
-    KIPI::PluginLoader::List list = loader->pluginList();
+    KIPI::PluginLoader::List list = _pluginLoader->pluginList();
     for( QPtrListIterator<KIPI::Plugin> it( list ); *it; ++it ) {
         KIPI::Plugin* plugin = *it;
+        plugin->setup( this );
         QPtrList<KAction>* popup = 0;
         if ( plugin->category() == KIPI::IMAGESPLUGIN )
@@ -1198,4 +1205,5 @@ void MainView::loadPlugins()
             qDebug("No menu found for a plugin" ); // , plugin->id().latin1());
         }
+        plugin->actionCollection()->readShortcutSettings();
     }
 

--- kdeextragear-2/kimdaba/mainview.h  #1.60:1.61
@@ -31,4 +31,9 @@ class HTMLExportDialog;
 class KActionMenu;
 class KRadioAction;
+namespace KIPI
+{
+    class PluginLoader;
+}
+
 #include "imageinfo.h"
 #include <qdict.h>
@@ -153,4 +158,5 @@ private:
     KAction* _runSlideShow;
     KAction* _runRandomSlideShow;
+    KIPI::PluginLoader* _pluginLoader;
 };
 


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

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