Skip to content

Commit

Permalink
Fix launcher plugin load/unload
Browse files Browse the repository at this point in the history
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 127dfab
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/plugins/launcher/qgslauncherplugin.cpp
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/plugins/launcher/qgslauncherplugin.h
Expand Up @@ -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
2 changes: 1 addition & 1 deletion src/plugins/launcher/qgslauncherpluginguibase.ui
Expand Up @@ -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>
Expand Down

0 comments on commit 127dfab

Please sign in to comment.