diff options
author | David Tardon <dtardon@redhat.com> | 2010-11-22 09:28:34 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2010-11-22 13:47:27 +0100 |
commit | a695cce9540178845ac294083a7f0c94c3f73542 (patch) | |
tree | 229e7ad4c7dd8266ae4e8befa04dad159764ab29 /sfx2 | |
parent | f7df6cf55618d2dcb6778666990e38816b6c5c22 (diff) |
rhbz#650170# shutdown quickstarter at end of desktop session
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/shutdowniconunx.cxx | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/sfx2/source/appl/shutdowniconunx.cxx b/sfx2/source/appl/shutdowniconunx.cxx index 510c6ca967..3bb5b7729c 100644 --- a/sfx2/source/appl/shutdowniconunx.cxx +++ b/sfx2/source/appl/shutdowniconunx.cxx @@ -66,11 +66,14 @@ static void systray_disable_cb() static void exit_quickstarter_cb( GtkWidget * ) { - egg_tray_icon_cancel_message (pTrayIcon, 1 ); - 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(); + if (pTrayIcon) + { + egg_tray_icon_cancel_message (pTrayIcon, 1 ); + 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 ) @@ -396,6 +399,9 @@ void SAL_DLLPUBLIC_EXPORT plugin_init_sys_tray() // disable shutdown pShutdownIcon->SetVeto( true ); pShutdownIcon->addTerminateListener(); + + g_signal_connect(GTK_WIDGET(pTrayIcon), "destroy", + G_CALLBACK(exit_quickstarter_cb), NULL); } void SAL_DLLPUBLIC_EXPORT plugin_shutdown_sys_tray() |