diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-01-27 12:14:17 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-01-27 12:14:17 +0000 |
commit | ff567f11c20533961fbf53aad6dbcc25a10addb3 (patch) | |
tree | 2fcd54fbbabc29349f87ff5866946b96dbbc5c0f /sfx2/source/appl/shutdowniconunx.cxx | |
parent | cde0d74192fdc6563786f4fa35dccd27d1d85271 (diff) |
Related: rhbz#610103 more woes on rpm upgrade vs rpm erase
Diffstat (limited to 'sfx2/source/appl/shutdowniconunx.cxx')
-rw-r--r-- | 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 5618e734deee..cfbf9746cc0b 100644 --- a/sfx2/source/appl/shutdowniconunx.cxx +++ b/sfx2/source/appl/shutdowniconunx.cxx @@ -333,13 +333,25 @@ static gboolean display_menu_cb( GtkWidget *, * upgraded, then the old quickstarter is still running, but is now unreliable * as the old install has been deleted. A fairly intractable problem but we * can avoid much of the pain if we turn off the quickstarter if we detect - * that it has been physically deleted. + * that it has been physically deleted or overwritten */ 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(NULL); + //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 |