Skip to content
Permalink
Browse files
Fix launcher plugin load/unload
git-svn-id: http://svn.osgeo.org/qgis/branches/Release-0_8_0@6805 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
gsherman committed Mar 16, 2007
1 parent c4e9933 commit 127dfab28ee3a9a578e61a6704a468926ca37aa9
Showing with 7 additions and 4 deletions.
  1. +4 −3 src/plugins/launcher/qgslauncherplugin.cpp
  2. +2 −0 src/plugins/launcher/qgslauncherplugin.h
  3. +1 −1 src/plugins/launcher/qgslauncherpluginguibase.ui
@@ -82,7 +82,7 @@ void QgsLauncherPlugin::initGui()
//menuId = pluginMenu->insertItem(QIconSet(icon),"&Run...", this, SLOT(run()));

// Create the action for tool
QAction *myQActionPointer = new QAction(QIcon(icon), tr("Run..."), this);
myQActionPointer = new QAction(QIcon(icon), tr("Run..."), this);
// Connect the action to the run
connect(myQActionPointer, SIGNAL(activated()), this, SLOT(run()));
// Add the toolbar
@@ -123,8 +123,9 @@ void QgsLauncherPlugin::drawVectorLayer(QString thePathNameQString, QString theB
void QgsLauncherPlugin::unload()
{
// remove the GUI
qGisInterface->removePluginMenuItem("&Launcher", menuId);
delete toolBarPointer;
qGisInterface->removePluginMenu(tr("&Launcher"),myQActionPointer);
qGisInterface->removeToolBarIcon(myQActionPointer);
delete myQActionPointer;
}
/**
* Required extern functions needed for every plugin
@@ -65,6 +65,8 @@ class QgsLauncherPlugin:public QObject, public QgisPlugin
QgisApp *qgisMainWindowPointer;
//! Pointer to the QGIS interface object
QgisIface *qGisInterface;
//! Pointer to the action
QAction *myQActionPointer;
};

#endif
@@ -205,7 +205,7 @@ p, li { white-space: pre-wrap; }
<string>Run the selected program/command and display the output</string>
</property>
<property name="text" >
<string/>
<string>Run</string>
</property>
<property name="icon" >
<iconset>icon.xpm</iconset>

0 comments on commit 127dfab

Please sign in to comment.