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

List:       kde-commits
Subject:    kdemultimedia/noatun/library
From:       Stefan Gehn <mETz81 () web ! de>
Date:       2004-10-20 18:51:38
Message-ID: 20041020185138.B4CC916BFE () office ! kde ! org
[Download RAW message or body]

CVS commit by metz: 

Make sure we only have one PluginActionMenu around because we actually just \
add/remove items from the global one in Noatunapp.


  M +3 -11     app.cpp   1.34
  M +3 -2      noatunstdaction.cpp   1.22
  M +1 -1      noatun/stdaction.h   1.4


--- kdemultimedia/noatun/library/noatun/stdaction.h  #1.3:1.4
@@ -161,5 +161,5 @@ KAction *pause(QObject *parent = 0, cons
 
 /**
- * @return pointer to a PluginActionMenu object
+ * @return pointer to the global PluginActionMenu object (there is only one \
                instance)
  */
 PluginActionMenu *actions(QObject *parent = 0, const char *name = 0);

--- kdemultimedia/noatun/library/noatunstdaction.cpp  #1.21:1.22
@@ -149,5 +149,5 @@ void VisActionMenu::toggleVisPlugin(int 
         {
                 napp->libraryLoader()->remove(specfile);
-                popupMenu()->setItemChecked(id, false); // TODO: maybe unneded
+                popupMenu()->setItemChecked(id, false);
         }
         else
@@ -304,5 +304,6 @@ LoopActionMenu *loop(QObject *parent, co
 PluginActionMenu *actions(QObject *parent, const char *name)
 {
-        return new PluginActionMenu(parent, name);
+        // NoatunApp makes sure that we only have one ActionMenu around
+        return napp->pluginActionMenu();
 }
 

--- kdemultimedia/noatun/library/app.cpp  #1.33:1.34
@@ -351,5 +351,4 @@ void NoatunApp::hideInterfaces()
 int NoatunApp::pluginMenuAdd(const QString &text, const QObject *receiver, const \
char *member)  {
-//      kdDebug(66666) << k_funcinfo << "called" << endl;
         return pluginActionMenu()->menuAdd(text, receiver, member);
 }
@@ -357,5 +356,4 @@ int NoatunApp::pluginMenuAdd(const QStri
 void NoatunApp::pluginMenuRemove(int id)
 {
-//      kdDebug(66666) << k_funcinfo << "called" << endl;
         pluginActionMenu()->menuRemove(id);
 }
@@ -363,9 +361,6 @@ void NoatunApp::pluginMenuRemove(int id)
 NoatunStdAction::PluginActionMenu *NoatunApp::pluginActionMenu()
 {
-//      kdDebug(66666) << k_funcinfo << "called" << endl;
         if (!mPluginActionMenu)
-        {
-                mPluginActionMenu = NoatunStdAction::actions(this);
-        }
+                mPluginActionMenu = new NoatunStdAction::PluginActionMenu(this, \
"menu_actions");  return mPluginActionMenu;
 }
@@ -373,9 +368,6 @@ NoatunStdAction::PluginActionMenu *Noatu
 KPopupMenu *NoatunApp::pluginMenu()
 {
-//      kdDebug(66666) << k_funcinfo << "called" << endl;
         if(!mPluginMenu)
-        {
                 mPluginMenu = pluginActionMenu()->popupMenu();
-        }
         return mPluginMenu;
 }
@@ -472,5 +464,5 @@ QString NoatunApp::mimeTypes()
 void NoatunApp::loadPlugins()
 {
-        kdDebug(66666) << k_funcinfo << "Called." << endl;
+        //kdDebug(66666) << k_funcinfo << "Called." << endl;
 
         mLibraryLoader->loadAll();


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

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