[Kst] kdeextragear-2/kst/kst

Andrew Walker arwalker at sumusltd.com
Tue Jul 13 18:51:18 CEST 2004


CVS commit by arwalker: 

Use the readable plugin name in the plugin manager.


  M +11 -0     pluginmanager.ui   1.10
  M +83 -81    pluginmanager.ui.h   1.16


--- kdeextragear-2/kst/kst/pluginmanager.ui  #1.9:1.10
@@ -76,4 +76,15 @@
                 </property>
             </column>
+            <column>
+                <property name="text">
+                    <string>Function</string>
+                </property>
+                <property name="clickable">
+                    <bool>true</bool>
+                </property>
+                <property name="resizable">
+                    <bool>true</bool>
+                </property>
+            </column>
             <property name="name">
                 <cstring>_pluginList</cstring>

--- kdeextragear-2/kst/kst/pluginmanager.ui.h  #1.15:1.16
@@ -8,4 +8,7 @@
 *****************************************************************************/
 
+#define COLUMN_READABLE_NAME  0
+#define COLUMN_LOADED         1
+#define COLUMN_NAME           5
 
 void PluginManager::init()
@@ -81,5 +84,5 @@ void PluginManager::remove()
     }
     
-    int rc = KMessageBox::questionYesNo(this, i18n("Are you sure you wish to remove the plugin \"%1\" from the system?").arg(item->text(0)), i18n("KST Plugin Loader"));
+  int rc = KMessageBox::questionYesNo(this, i18n("Are you sure you wish to remove the plugin \"%1\" from the system?").arg(item->text(COLUMN_READABLE_NAME)), i18n("KST Plugin Loader"));
     
     if (rc != KMessageBox::Yes) {
@@ -87,10 +90,10 @@ void PluginManager::remove()
     }
     
-    if (PluginCollection::self()->isLoaded(item->text(0))) {
-        PluginCollection::self()->unloadPlugin(item->text(0));
-        item->setPixmap(0, locate("data", "kst/pics/no.png"));
+  if (PluginCollection::self()->isLoaded(item->text(COLUMN_NAME))) {
+    PluginCollection::self()->unloadPlugin(item->text(COLUMN_NAME));
+    item->setPixmap(COLUMN_LOADED, locate("data", "kst/pics/no.png"));
     }
     
-    PluginCollection::self()->deletePlugin(PluginCollection::self()->pluginNameList()[item->text(0)]);
+  PluginCollection::self()->deletePlugin(PluginCollection::self()->pluginNameList()[item->text(COLUMN_NAME)]);
     
     delete item;
@@ -116,13 +119,12 @@ void PluginManager::reloadList()
     for (it = pluginList.begin(); it != pluginList.end(); ++it) {
         QListViewItem *i = new QListViewItem(_pluginList,
-                                             it.data()._name,
+                                         it.data()._readableName,
                                              QString::null,
                                              it.data()._description,
                                              it.data()._version,
-                                             it.data()._author);
+                                         it.data()._author,
+                                         it.data()._name);
         if (loadedPluginList.contains(it.data()._name)) {
-            i->setPixmap(1, locate("data", "kst/pics/yes.png"));
-        /*} else {   // Don't do this.  It looks better without it.
-            i->setPixmap(1, locate("data", "kst/pics/no.png"));*/
+      i->setPixmap(COLUMN_LOADED, locate("data", "kst/pics/yes.png"));
         }
     }





More information about the Kst mailing list