[gnome-bluetooth/gnome-2-32] Make sure the icon is shown/hidden when killswitch changes



commit 5531cebcdd7b799376171bcada8b28fd4a614da1
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Aug 10 15:05:26 2010 +0100

    Make sure the icon is shown/hidden when killswitch changes
    
    When the killswitch status changes, we need to make sure
    that the status icon's visibility is updated according
    to whether killswitches are available.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=609291

 applet/main.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/applet/main.c b/applet/main.c
index b772338..52616e6 100644
--- a/applet/main.c
+++ b/applet/main.c
@@ -78,6 +78,7 @@ void wizard_callback(GObject *widget, gpointer user_data);
 void sendto_callback(GObject *widget, gpointer user_data);
 
 static void action_set_bold (GtkUIManager *manager, GtkAction *action, const char *path);
+static void update_icon_visibility (void);
 
 void quit_callback(GObject *widget, gpointer user_data)
 {
@@ -371,6 +372,7 @@ killswitch_state_changed (BluetoothKillswitch *killswitch, KillswitchState state
 	if (state == KILLSWITCH_STATE_NO_ADAPTER) {
 		object = gtk_builder_get_object (xml, "bluetooth-applet-popup");
 		gtk_menu_popdown (GTK_MENU (object));
+		update_icon_visibility ();
 		return;
 	}
 
@@ -405,6 +407,8 @@ killswitch_state_changed (BluetoothKillswitch *killswitch, KillswitchState state
 
 	object = gtk_builder_get_object (xml, "bluetooth-applet-ui-manager");
 	gtk_ui_manager_ensure_update (GTK_UI_MANAGER (object));
+
+	update_icon_visibility ();
 }
 
 static GtkWidget *create_popupmenu(void)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]