[gnome-bluetooth] properties: Use new toolbar
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth] properties: Use new toolbar
- Date: Sat, 19 Feb 2011 22:59:40 +0000 (UTC)
commit 604cfc70d75712d0b34c6ae765dc370142a6b823
Author: Bastien Nocera <hadess hadess net>
Date: Sun Feb 6 23:32:48 2011 +0000
properties: Use new toolbar
New style toolbar
https://bugzilla.gnome.org/show_bug.cgi?id=640862
properties/adapter.c | 16 +++++++
properties/properties-adapter.ui | 90 ++++++++++++++++---------------------
2 files changed, 55 insertions(+), 51 deletions(-)
---
diff --git a/properties/adapter.c b/properties/adapter.c
index d26b8c0..3dd4969 100644
--- a/properties/adapter.c
+++ b/properties/adapter.c
@@ -232,6 +232,10 @@ static void create_adapter(adapter_data *adapter)
GtkWidget *table;
GtkWidget *button;
GtkWidget *entry;
+ GtkWidget *widget;
+ GtkTreeViewColumn *column;
+ GtkWidget *treeview;
+ GtkStyleContext *context;
int page_num;
dbus_g_proxy_call(adapter->proxy, "GetProperties", NULL, G_TYPE_INVALID,
@@ -335,6 +339,18 @@ static void create_adapter(adapter_data *adapter)
"show-connected", TRUE,
"device-category-filter", BLUETOOTH_CATEGORY_PAIRED_OR_TRUSTED,
NULL);
+ column = bluetooth_chooser_get_type_column (BLUETOOTH_CHOOSER (adapter->chooser));
+ gtk_tree_view_column_set_visible (column, FALSE);
+ treeview = bluetooth_chooser_get_treeview (BLUETOOTH_CHOOSER (adapter->chooser));
+ g_object_set (G_OBJECT (treeview), "headers-visible", FALSE, NULL);
+
+ /* Join treeview and buttons */
+ widget = bluetooth_chooser_get_scrolled_window (BLUETOOTH_CHOOSER (adapter->chooser));;
+ context = gtk_widget_get_style_context (widget);
+ gtk_style_context_set_junction_sides (context, GTK_JUNCTION_BOTTOM);
+ widget = WID ("toolbar1");
+ context = gtk_widget_get_style_context (widget);
+ gtk_style_context_set_junction_sides (context, GTK_JUNCTION_TOP);
g_signal_connect (adapter->chooser, "notify::device-selected",
G_CALLBACK(device_selected_cb), adapter);
diff --git a/properties/properties-adapter.ui b/properties/properties-adapter.ui
index 7d35d6d..de7b8a7 100644
--- a/properties/properties-adapter.ui
+++ b/properties/properties-adapter.ui
@@ -108,93 +108,81 @@
<object class="GtkTable" id="devices_table">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="n_rows">2</property>
+ <property name="n_rows">3</property>
<property name="n_columns">2</property>
<child>
- <object class="GtkVButtonBox" id="widget12">
+ <object class="GtkLabel" id="widget29">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="label" translatable="yes">Devices</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="right_attach">2</property>
+ <property name="y_options">GTK_SHRINK</property>
+ <property name="y_padding">6</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolbar" id="toolbar1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">6</property>
- <property name="layout_style">start</property>
+ <property name="icon_size">1</property>
<child>
- <object class="GtkButton" id="button_setup">
- <property name="label" translatable="yes">Set up _new device...</property>
+ <object class="GtkToolButton" id="button_setup">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="can_focus">False</property>
<property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
+ <property name="icon_name">list-add-symbolic</property>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
+ <property name="homogeneous">True</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="button_disconnect">
- <property name="label" translatable="yes">_Disconnect</property>
+ <object class="GtkToolButton" id="button_disconnect">
<property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="can_focus">False</property>
<property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
+ <property name="icon_name">bluetooth-disabled-symbolic</property>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">end</property>
- <property name="position">1</property>
- <property name="secondary">True</property>
+ <property name="homogeneous">True</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="button_delete">
- <property name="label" translatable="yes">_Remove</property>
+ <object class="GtkToolButton" id="button_delete">
<property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="can_focus">False</property>
<property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
+ <property name="icon_name">list-remove-symbolic</property>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">end</property>
- <property name="position">2</property>
- <property name="secondary">True</property>
+ <property name="homogeneous">True</property>
</packing>
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_SHRINK | GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- <property name="x_padding">6</property>
- <property name="y_padding">6</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="y_options">GTK_SHRINK | GTK_FILL</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="widget29">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="label" translatable="yes">Devices</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- <packing>
- <property name="right_attach">2</property>
- <property name="y_options">GTK_SHRINK</property>
- <property name="y_padding">6</property>
- </packing>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
</child>
<child>
<placeholder/>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]