[gnome-bluetooth] properties: Show buttons for mouse and sound devices
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth] properties: Show buttons for mouse and sound devices
- Date: Mon, 21 Feb 2011 22:53:34 +0000 (UTC)
commit dd703d60e29195eecdb46310a2c4331c97665d33
Author: Bastien Nocera <hadess hadess net>
Date: Mon Feb 21 22:52:02 2011 +0000
properties: Show buttons for mouse and sound devices
properties/bluetooth.ui | 107 ++++++++++++++++++++++++++++----------
properties/cc-bluetooth-panel.c | 13 ++++-
2 files changed, 90 insertions(+), 30 deletions(-)
---
diff --git a/properties/bluetooth.ui b/properties/bluetooth.ui
index 9241ec6..83ad099 100644
--- a/properties/bluetooth.ui
+++ b/properties/bluetooth.ui
@@ -109,7 +109,6 @@
<property name="n_columns">4</property>
<property name="column_spacing">6</property>
<property name="row_spacing">6</property>
- <property name="homogeneous">True</property>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
@@ -210,30 +209,6 @@
</packing>
</child>
<child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -264,6 +239,30 @@
<property name="y_options">GTK_FILL</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
<property name="expand">False</property>
@@ -289,10 +288,62 @@
<property name="margin_right">6</property>
<property name="margin_bottom">6</property>
<child>
- <placeholder/>
+ <object class="GtkHBox" id="hbox5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <object class="GtkButton" id="mouse_button">
+ <property name="label" translatable="yes">Mouse and Touchpad</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="no_show_all">True</property>
+ <property name="use_action_appearance">False</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
</child>
<child>
- <placeholder/>
+ <object class="GtkHBox" id="hbox3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <object class="GtkButton" id="sound_button">
+ <property name="label" translatable="yes">Sound</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="no_show_all">True</property>
+ <property name="use_action_appearance">False</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
</child>
<child>
<object class="GtkHBox" id="hbox4">
@@ -303,7 +354,7 @@
</child>
<child>
<object class="GtkButton" id="keyboard_button">
- <property name="label" translatable="yes">Keyboard Settings</property>
+ <property name="label" translatable="yes">Keyboard</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="no_show_all">True</property>
diff --git a/properties/cc-bluetooth-panel.c b/properties/cc-bluetooth-panel.c
index 6a79102..c656f7a 100644
--- a/properties/cc-bluetooth-panel.c
+++ b/properties/cc-bluetooth-panel.c
@@ -99,8 +99,9 @@ cc_bluetooth_panel_update_properties (CcBluetoothPanel *self)
bdaddr = bluetooth_chooser_get_selected_device (BLUETOOTH_CHOOSER (self->priv->chooser));
if (bdaddr == NULL) {
- //FIXME for loop with other buttons
gtk_widget_hide (WID ("keyboard_button"));
+ gtk_widget_hide (WID ("sound_button"));
+ gtk_widget_hide (WID ("mouse_button"));
gtk_widget_set_sensitive (WID ("properties_vbox"), FALSE);
gtk_switch_set_active (GTK_SWITCH (WID ("switch_connection")), FALSE);
gtk_label_set_text (GTK_LABEL (WID ("paired_label")), "");
@@ -127,8 +128,16 @@ cc_bluetooth_panel_update_properties (CcBluetoothPanel *self)
case BLUETOOTH_TYPE_KEYBOARD:
gtk_widget_show (WID ("keyboard_button"));
break;
+ case BLUETOOTH_TYPE_MOUSE:
+ /* FIXME what about touchpads */
+ gtk_widget_show (WID ("mouse_button"));
+ break;
+ case BLUETOOTH_TYPE_HEADSET:
+ case BLUETOOTH_TYPE_HEADPHONES:
+ case BLUETOOTH_TYPE_OTHER_AUDIO:
+ gtk_widget_show (WID ("sound_button"));
default:
- /* FIXME add others */
+ /* FIXME others? */
;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]