diff options
author | Caolán McNamara <caolanm@redhat.com> | 2010-10-11 16:48:57 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@novell.com> | 2010-10-11 16:56:07 +0100 |
commit | c91f21eb8e269dd1544ac5e314cd07269743c9b7 (patch) | |
tree | 158b84121e917f6efcffc2e681c8f6eac598dc40 | |
parent | 3d9dfef2f50db83c8f7bcc2c042f84ccde5b9e03 (diff) |
more quickstarter fixes i#108846
-rw-r--r-- | sfx2/source/appl/shutdownicon.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/appl/shutdowniconunx.cxx | 9 |
2 files changed, 8 insertions, 3 deletions
diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx index 141d3372873e..35c39ca038ed 100644 --- a/sfx2/source/appl/shutdownicon.cxx +++ b/sfx2/source/appl/shutdownicon.cxx @@ -568,8 +568,8 @@ void ShutdownIcon::terminateDesktop() return; // always remove ourselves as listener - xDesktop->removeTerminateListener( pInst ); pInst->m_bListenForTermination = true; + xDesktop->removeTerminateListener( pInst ); // terminate desktop only if no tasks exist Reference< XFramesSupplier > xSupplier( xDesktop, UNO_QUERY ); diff --git a/sfx2/source/appl/shutdowniconunx.cxx b/sfx2/source/appl/shutdowniconunx.cxx index de231b10f66b..25660d0dcd9a 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 |