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



commit 234cad9fabd0d6f4955daf653d06fedda9c5d610
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 c8b66a4..e28dbf0 100644
--- a/applet/main.c
+++ b/applet/main.c
@@ -75,6 +75,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)
 {
@@ -348,6 +349,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;
 	}
 
@@ -382,6 +384,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]