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

List:       kde-commits
Subject:    kdepim/kontact/src
From:       Tobias Koenig <tokoe () kde ! org>
Date:       2005-03-23 15:01:20
Message-ID: 20050323150120.21BC53CD () office ! kde ! org
[Download RAW message or body]

CVS commit by tokoe: 

Do not show settings of components running standalone

BUGS:93242


  M +16 -1     mainwindow.cpp   1.170


--- kdepim/kontact/src/mainwindow.cpp  #1.169:1.170
@@ -665,5 +665,20 @@ void MainWindow::slotPreferences()
   if ( !dlg ) {
     dlg = new KSettings::Dialog( KSettings::Dialog::Configurable, this );
-    dlg->addPluginInfos( mPluginInfos );
+
+    // do not show settings of components running standalone
+    QValueList<KPluginInfo*> filteredPlugins = mPluginInfos;
+    PluginList::ConstIterator it;
+    for ( it = mPlugins.begin(); it != mPlugins.end(); ++it )
+      if ( (*it)->isRunningStandalone() ) {
+        QValueList<KPluginInfo*>::ConstIterator infoIt;
+        for ( infoIt = filteredPlugins.begin(); infoIt != filteredPlugins.end(); ++infoIt ) {
+          if ( (*infoIt)->pluginName() == (*it)->identifier() ) {
+            filteredPlugins.remove( *infoIt );
+            break;
+          }
+        }
+      }
+
+    dlg->addPluginInfos( filteredPlugins );
     connect( dlg, SIGNAL( pluginSelectionChanged() ),
              SLOT( pluginsChanged() ) );


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

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