[gnome-bluetooth] properties: Use links to link to other panels
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth] properties: Use links to link to other panels
- Date: Fri, 16 Sep 2011 15:24:56 +0000 (UTC)
commit 4d317020114e2c60e573874d3bc4cd976ba12f25
Author: Bastien Nocera <hadess hadess net>
Date: Fri Sep 16 16:23:08 2011 +0100
properties: Use links to link to other panels
properties/bluetooth.ui | 39 ++++++++++++++++++++++++---------------
properties/cc-bluetooth-panel.c | 15 +++++++++------
2 files changed, 33 insertions(+), 21 deletions(-)
---
diff --git a/properties/bluetooth.ui b/properties/bluetooth.ui
index a2603ad..b2a65ac 100644
--- a/properties/bluetooth.ui
+++ b/properties/bluetooth.ui
@@ -383,11 +383,14 @@
<placeholder/>
</child>
<child>
- <object class="GtkButton" id="mouse_button">
- <property name="label" translatable="yes">Mouse and Touchpad Settings</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
+ <object class="GtkLinkButton" id="mouse_link">
+ <property name="label" translatable="yes">Mouse and Touchpad Settings</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="relief">none</property>
</object>
<packing>
<property name="expand">False</property>
@@ -411,11 +414,14 @@
<placeholder/>
</child>
<child>
- <object class="GtkButton" id="sound_button">
- <property name="label" translatable="yes">Sound Settings</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
+ <object class="GtkLinkButton" id="sound_link">
+ <property name="label" translatable="yes">Sound Settings</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="relief">none</property>
</object>
<packing>
<property name="expand">False</property>
@@ -439,11 +445,14 @@
<placeholder/>
</child>
<child>
- <object class="GtkButton" id="keyboard_button">
- <property name="label" translatable="yes">Keyboard Settings</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
+ <object class="GtkLinkButton" id="keyboard_link">
+ <property name="label" translatable="yes">Keyboard Settings</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="relief">none</property>
</object>
<packing>
<property name="expand">False</property>
diff --git a/properties/cc-bluetooth-panel.c b/properties/cc-bluetooth-panel.c
index 6b5b968..0e9f4b1 100644
--- a/properties/cc-bluetooth-panel.c
+++ b/properties/cc-bluetooth-panel.c
@@ -445,25 +445,28 @@ switch_panel (CcBluetoothPanel *self,
}
}
-static void
+static gboolean
keyboard_callback (GtkButton *button,
CcBluetoothPanel *self)
{
switch_panel (self, KEYBOARD_PREFS);
+ return TRUE;
}
-static void
+static gboolean
mouse_callback (GtkButton *button,
CcBluetoothPanel *self)
{
switch_panel (self, MOUSE_PREFS);
+ return TRUE;
}
-static void
+static gboolean
sound_callback (GtkButton *button,
CcBluetoothPanel *self)
{
switch_panel (self, SOUND_PREFS);
+ return TRUE;
}
static void
@@ -708,11 +711,11 @@ cc_bluetooth_panel_init (CcBluetoothPanel *self)
/* Set the initial state of the properties */
cc_bluetooth_panel_update_properties (self);
- g_signal_connect (G_OBJECT (WID ("mouse_button")), "clicked",
+ g_signal_connect (G_OBJECT (WID ("mouse_link")), "activate-link",
G_CALLBACK (mouse_callback), self);
- g_signal_connect (G_OBJECT (WID ("keyboard_button")), "clicked",
+ g_signal_connect (G_OBJECT (WID ("keyboard_link")), "activate-link",
G_CALLBACK (keyboard_callback), self);
- g_signal_connect (G_OBJECT (WID ("sound_button")), "clicked",
+ g_signal_connect (G_OBJECT (WID ("sound_link")), "activate-link",
G_CALLBACK (sound_callback), self);
g_signal_connect (G_OBJECT (WID ("browse_button")), "clicked",
G_CALLBACK (browse_callback), self);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]