[gnome-bluetooth] properties: Fix state of delete button



commit 887f3bed50807661885c3847bdb539ea187fd3f6
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Feb 21 22:53:15 2011 +0000

    properties: Fix state of delete button

 properties/bluetooth.ui         |    1 +
 properties/cc-bluetooth-panel.c |    3 +++
 2 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/properties/bluetooth.ui b/properties/bluetooth.ui
index 83ad099..2eaf9b9 100644
--- a/properties/bluetooth.ui
+++ b/properties/bluetooth.ui
@@ -414,6 +414,7 @@
                 <child>
                   <object class="GtkToolButton" id="button_delete">
                     <property name="visible">True</property>
+                    <property name="sensitive">False</property>
                     <property name="can_focus">False</property>
                     <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
diff --git a/properties/cc-bluetooth-panel.c b/properties/cc-bluetooth-panel.c
index c656f7a..291b8d1 100644
--- a/properties/cc-bluetooth-panel.c
+++ b/properties/cc-bluetooth-panel.c
@@ -107,6 +107,7 @@ cc_bluetooth_panel_update_properties (CcBluetoothPanel *self)
 		gtk_label_set_text (GTK_LABEL (WID ("paired_label")), "");
 		gtk_label_set_text (GTK_LABEL (WID ("type_label")), "");
 		gtk_label_set_text (GTK_LABEL (WID ("address_label")), "");
+		gtk_widget_set_sensitive (WID ("button_delete"), FALSE);
 	} else {
 		BluetoothType type;
 		gboolean connected;
@@ -143,6 +144,8 @@ cc_bluetooth_panel_update_properties (CcBluetoothPanel *self)
 
 		gtk_label_set_text (GTK_LABEL (WID ("address_label")), bdaddr);
 		g_free (bdaddr);
+
+		gtk_widget_set_sensitive (WID ("button_delete"), TRUE);
 	}
 }
 



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