From f167cafd5edfcac674a556fa2f813ce0dec34303 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Thu, 27 Jan 2011 12:14:17 +0000 Subject: [PATCH] Related: rhbz#610103 more woes on rpm upgrade vs rpm erase --- sfx2/source/appl/shutdowniconunx.cxx | 18 +++++++++++++++--- 1 files changed, 15 insertions(+), 3 deletions(-) diff --git a/sfx2/source/appl/shutdowniconunx.cxx b/sfx2/source/appl/shutdowniconunx.cxx index 5618e73..cfbf974 100644 --- a/sfx2/source/appl/shutdowniconunx.cxx +++ b/sfx2/source/appl/shutdowniconunx.cxx @@ -375,8 +375,20 @@ static void notify_file_changed(GFileMonitor * /*gfilemonitor*/, GFile * /*arg1*/, GFile * /*arg2*/, GFileMonitorEvent event_type, gpointer /*user_data*/) { - if (event_type == G_FILE_MONITOR_EVENT_DELETED) - exit_quickstarter_cb(GTK_WIDGET(pTrayIcon)); + //Shutdown the quick starter if anything has happened to make it unsafe + //to remain running, e.g. rpm --erased and all libs deleted, or + //rpm --upgrade and libs being overwritten + switch (event_type) + { + case G_FILE_MONITOR_EVENT_DELETED: + case G_FILE_MONITOR_EVENT_CREATED: + case G_FILE_MONITOR_EVENT_PRE_UNMOUNT: + case G_FILE_MONITOR_EVENT_UNMOUNTED: + exit_quickstarter_cb(GTK_WIDGET(pTrayIcon)); + break; + default: + break; + } } #endif