[Libreoffice-commits] .: Branch 'libreoffice-3-3' - sfx2/source

David Tardon dtardon at kemper.freedesktop.org
Thu Feb 3 08:37:35 PST 2011


 sfx2/source/appl/shutdowniconunx.cxx |   18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

New commits:
commit 76681cbb779c60cdfc2a4df3a6dd0ff2f874f6cb
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jan 27 12:14:17 2011 +0000

    Related: rhbz#610103 more woes on rpm upgrade vs rpm erase
    
    Signed-off-by: David Tardon <dtardon at redhat.com>

diff --git a/sfx2/source/appl/shutdowniconunx.cxx b/sfx2/source/appl/shutdowniconunx.cxx
index 7791ad7..cfa1711 100644
--- a/sfx2/source/appl/shutdowniconunx.cxx
+++ b/sfx2/source/appl/shutdowniconunx.cxx
@@ -370,13 +370,25 @@ extern "C" {
  * 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(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
 


More information about the Libreoffice-commits mailing list