[Goodies-commits] r6984 - in xfce4-power-manager/trunk: . panel-plugins/inhibit

Ali Abdallah aliov at xfce.org
Mon Mar 23 20:55:12 CET 2009


Author: aliov
Date: 2009-03-23 19:55:12 +0000 (Mon, 23 Mar 2009)
New Revision: 6984

Modified:
   xfce4-power-manager/trunk/ChangeLog
   xfce4-power-manager/trunk/panel-plugins/inhibit/inhibit-plugin.c
Log:
Fix a crash in the inhibit plugin when the running power manager disappears from the session bus

Modified: xfce4-power-manager/trunk/ChangeLog
===================================================================
--- xfce4-power-manager/trunk/ChangeLog	2009-03-23 19:09:13 UTC (rev 6983)
+++ xfce4-power-manager/trunk/ChangeLog	2009-03-23 19:55:12 UTC (rev 6984)
@@ -1,4 +1,7 @@
 
+2009-03-23 20:55 Ali aliov at xfce.org 
+	 * : Fix a crash in the inhibit plugin when the running power manager disappears from the session bus
+
 2009-03-23 20:09 Ali aliov at xfce.org 
 	 * : Moved notification to the common code+added notification to the inhibit plugin
 

Modified: xfce4-power-manager/trunk/panel-plugins/inhibit/inhibit-plugin.c
===================================================================
--- xfce4-power-manager/trunk/panel-plugins/inhibit/inhibit-plugin.c	2009-03-23 19:09:13 UTC (rev 6983)
+++ xfce4-power-manager/trunk/panel-plugins/inhibit/inhibit-plugin.c	2009-03-23 19:55:12 UTC (rev 6984)
@@ -199,7 +199,6 @@
 inhibit_plugin_set_tooltip (inhibit_t *inhibit)
 {
     gboolean inhibited;
-    TRACE ("inhibititon =%s", xfpm_bool_to_string (inhibit->plugin_inhibited));
     
     if ( !inhibit->connected )
 	gtk_widget_set_tooltip_text (inhibit->button, _("No power manager instance running") );
@@ -461,6 +460,10 @@
     if ( ev->button != 1 )
 	return FALSE;
     
+    
+    if ( !inhibit->connected )
+	return TRUE;
+	
     /*User ask us to inhibit ?*/
     //FIXME: Check if we manage to inhibit
     if ( !inhibit->plugin_inhibited )
@@ -473,7 +476,6 @@
 	inhibit_plugin_unset_inhibit (inhibit);
 	inhibit->plugin_inhibited = FALSE;
     }
-    TRACE("button press event %s", xfpm_bool_to_string (inhibit->plugin_inhibited));
     inhibit_plugin_refresh_info (inhibit);
     return TRUE;
 }




More information about the Goodies-commits mailing list