summaryrefslogtreecommitdiff
path: root/sfx2/source/appl/shutdowniconunx.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2010-10-11 16:48:57 +0100
committerMichael Meeks <michael.meeks@novell.com>2010-10-11 16:56:07 +0100
commit45beae272a78970d5911292d8794b60f00beaafb (patch)
tree58748d5801096790dddd864f69f544537b0e71a0 /sfx2/source/appl/shutdowniconunx.cxx
parent3ae112b753a71d32de70ee96afbe942b9aa7731c (diff)
more quickstarter fixes i#108846
Diffstat (limited to 'sfx2/source/appl/shutdowniconunx.cxx')
-rw-r--r--sfx2/source/appl/shutdowniconunx.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/sfx2/source/appl/shutdowniconunx.cxx b/sfx2/source/appl/shutdowniconunx.cxx
index de231b10f6..25660d0dcd 100644
--- a/sfx2/source/appl/shutdowniconunx.cxx
+++ b/sfx2/source/appl/shutdowniconunx.cxx
@@ -37,6 +37,7 @@ static ResMgr *pVCLResMgr;
static EggTrayIcon *pTrayIcon;
static GtkWidget *pExitMenuItem = NULL;
static GtkWidget *pOpenMenuItem = NULL;
+static GtkWidget *pDisableMenuItem = NULL;
static void open_url_cb( GtkWidget *, gpointer data )
{
@@ -65,8 +66,10 @@ static void systray_disable_cb()
static void exit_quickstarter_cb( GtkWidget * )
{
egg_tray_icon_cancel_message (pTrayIcon, 1 );
- ShutdownIcon::getInstance()->terminateDesktop();
plugin_shutdown_sys_tray();
+ //terminate may cause this .so to be unloaded. So we must be hands off
+ //all calls into this .so after this call
+ ShutdownIcon::terminateDesktop();
}
static void menu_deactivate_cb( GtkWidget *pMenu )
@@ -263,7 +266,7 @@ static void populate_menu( GtkWidget *pMenu )
pMenuItem = gtk_separator_menu_item_new();
gtk_menu_shell_append( pMenuShell, pMenuItem );
- (void) add_image_menu_item
+ pDisableMenuItem = add_image_menu_item
( pMenuShell, GTK_STOCK_CLOSE,
pShutdownIcon->GetResString( STR_QUICKSTART_PRELAUNCH_UNX ),
G_CALLBACK( systray_disable_cb ) );
@@ -287,6 +290,7 @@ static void refresh_menu( GtkWidget *pMenu )
bool bModal = ShutdownIcon::bModalMode;
gtk_widget_set_sensitive( pExitMenuItem, !bModal);
gtk_widget_set_sensitive( pOpenMenuItem, !bModal);
+ gtk_widget_set_sensitive( pDisableMenuItem, !bModal);
}
extern "C" {
@@ -402,6 +406,7 @@ void SAL_DLLPUBLIC_EXPORT plugin_shutdown_sys_tray()
pTrayIcon = NULL;
pExitMenuItem = NULL;
pOpenMenuItem = NULL;
+ pDisableMenuItem = NULL;
}
#endif // ENABLE_QUICKSTART_APPLET