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



commit 0b95cb0b0f4a570eba547eb31e7b241731104bc9
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 c9ebe5a..a510d2b 100644
--- a/applet/main.c
+++ b/applet/main.c
@@ -77,6 +77,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)
 {
@@ -370,6 +371,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;
 	}
 
@@ -404,6 +406,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]