[Kst] kdeextragear-2/kst
George Staikos
staikos at kde.org
Tue May 13 06:19:32 CEST 2003
CVS commit by staikos:
demo plugin, and some fixes to the plugin manager and loader
A plugins/demo/README 1.1
A plugins/demo/sindemo.c 1.1
A plugins/demo/sindemo.kstxml 1.1
M +7 -1 kst/pluginloader.cpp 1.4
M +2 -2 kst/pluginmanager.ui 1.3
M +5 -2 kst/pluginmanager.ui.h 1.3
--- kdeextragear-2/kst/kst/pluginloader.cpp #1.3:1.4
@@ -22,5 +22,8 @@
#include <klibloader.h>
#include <kstaticdeleter.h>
+#include <kdebug.h>
#include <qfile.h>
+#include <qregexp.h>
+
PluginLoader *PluginLoader::_self = 0L;
@@ -72,8 +75,11 @@ return plug;
int PluginLoader::deletePlugin(const QString& xmlfile, const QString& object) const {
+ kdDebug() << "Remove: " << xmlfile << endl;
QFile::remove(xmlfile);
if (object.isEmpty()) {
QString f = xmlfile;
- QFile::remove(f.replace(".kstxml$", ".so"));
+ f.replace(QRegExp(".kstxml$"), ".so");
+ kdDebug() << "Remove: " << f << endl;
+ QFile::remove(f);
} else {
QFile::remove(object);
--- kdeextragear-2/kst/kst/pluginmanager.ui #1.2:1.3
@@ -23,5 +23,5 @@
<column>
<property name="text">
- <string></string>
+ <string>Loaded</string>
</property>
<property name="clickable">
@@ -29,5 +29,5 @@
</property>
<property name="resizable">
- <bool>true</bool>
+ <bool>false</bool>
</property>
</column>
--- kdeextragear-2/kst/kst/pluginmanager.ui.h #1.2:1.3
@@ -78,4 +78,5 @@ void PluginManager::load()
if (0 == pc->loadPlugin(_pluginMap[item->text(1)])) {
item->setPixmap(0, locate("data", "kst/pics/yes.png"));
+ selectionChanged(item);
} else {
KMessageBox::sorry(this, i18n("The plugin could not be loaded. Please check the installation."), i18n("KST Plugin Loader"));
@@ -93,4 +94,5 @@ void PluginManager::unload()
PluginCollection::self()->unloadPlugin(item->text(1));
item->setPixmap(0, locate("data", "kst/pics/no.png"));
+ selectionChanged(item);
}
@@ -98,5 +100,5 @@ void PluginManager::unload()
void PluginManager::install()
{
-
+ KMessageBox::sorry(this, "Unimplemented", i18n("KST Plugin Loader"));
}
@@ -109,5 +111,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(1)), 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(1)), i18n("KST Plugin Loader"));
if (rc != KMessageBox::Yes) {
@@ -122,3 +124,4 @@ void PluginManager::remove()
delete item;
+ selectionChanged(_pluginList->selectedItem());
}
More information about the Kst
mailing list