diff options
author | Will Thompson <will.thompson@collabora.co.uk> | 2011-06-24 22:02:58 +0800 |
---|---|---|
committer | Will Thompson <will.thompson@collabora.co.uk> | 2011-06-24 22:11:43 +0800 |
commit | 9f79b7c5d74f1a82387881121403e755757f8cb3 (patch) | |
tree | 57f02acba1592bcc0639e7db255872c8bf7b9dd9 /src | |
parent | 3e22c794dd4568a69c08ce80cc12e03eb27f836c (diff) | |
download | gsoc2013-empathy-9f79b7c5d74f1a82387881121403e755757f8cb3.tar gsoc2013-empathy-9f79b7c5d74f1a82387881121403e755757f8cb3.tar.gz gsoc2013-empathy-9f79b7c5d74f1a82387881121403e755757f8cb3.tar.bz2 gsoc2013-empathy-9f79b7c5d74f1a82387881121403e755757f8cb3.tar.lz gsoc2013-empathy-9f79b7c5d74f1a82387881121403e755757f8cb3.tar.xz gsoc2013-empathy-9f79b7c5d74f1a82387881121403e755757f8cb3.tar.zst gsoc2013-empathy-9f79b7c5d74f1a82387881121403e755757f8cb3.zip |
ChatroomsWindow: GNOME 3-ify the Remove button
Diffstat (limited to 'src')
-rw-r--r-- | src/empathy-chatrooms-window.c | 10 | ||||
-rw-r--r-- | src/empathy-chatrooms-window.ui | 70 |
2 files changed, 54 insertions, 26 deletions
diff --git a/src/empathy-chatrooms-window.c b/src/empathy-chatrooms-window.c index 1b00548f5..1ebe80bd2 100644 --- a/src/empathy-chatrooms-window.c +++ b/src/empathy-chatrooms-window.c @@ -97,6 +97,8 @@ empathy_chatrooms_window_show (GtkWindow *parent) static EmpathyChatroomsWindow *window = NULL; GtkBuilder *gui; gchar *filename; + GtkWidget *sw, *toolbar; + GtkStyleContext *context; if (window) { gtk_window_present (GTK_WINDOW (window->window)); @@ -110,12 +112,20 @@ empathy_chatrooms_window_show (GtkWindow *parent) "chatrooms_window", &window->window, "hbox_account", &window->hbox_account, "label_account", &window->label_account, + "sw_room_list", &sw, "treeview", &window->treeview, + "toolbar_remove", &toolbar, "button_remove", &window->button_remove, "button_close", &window->button_close, NULL); g_free (filename); + /* join the remove toolbar to the treeview */ + context = gtk_widget_get_style_context (sw); + gtk_style_context_set_junction_sides (context, GTK_JUNCTION_BOTTOM); + context = gtk_widget_get_style_context (toolbar); + gtk_style_context_set_junction_sides (context, GTK_JUNCTION_TOP); + empathy_builder_connect (gui, window, "chatrooms_window", "destroy", chatrooms_window_destroy_cb, "button_remove", "clicked", chatrooms_window_button_remove_clicked_cb, diff --git a/src/empathy-chatrooms-window.ui b/src/empathy-chatrooms-window.ui index 83f3fd064..973f66e86 100644 --- a/src/empathy-chatrooms-window.ui +++ b/src/empathy-chatrooms-window.ui @@ -37,24 +37,57 @@ </packing> </child> <child> - <object class="GtkScrolledWindow" id="scrolledwindow1"> - <property name="height_request">150</property> + <object class="GtkVBox" id="box_room_list"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="hscrollbar_policy">GTK_POLICY_NEVER</property> - <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> - <property name="shadow_type">GTK_SHADOW_IN</property> <child> - <object class="GtkTreeView" id="treeview"> + <object class="GtkScrolledWindow" id="sw_room_list"> + <property name="height_request">150</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="has_focus">True</property> + <property name="hscrollbar_policy">GTK_POLICY_NEVER</property> + <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> + <property name="shadow_type">GTK_SHADOW_IN</property> + <child> + <object class="GtkTreeView" id="treeview"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="has_focus">True</property> + </object> + </child> + </object> + <packing> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkToolbar" id="toolbar_remove"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="icon_size">1</property> + <style> + <class name="inline-toolbar"/> + </style> + <child> + <object class="GtkToolButton" id="button_remove"> + <property name="tooltip-text" translatable="yes">Remove</property> + <property name="visible">True</property> + <property name="use_action_appearance">False</property> + <property name="use_underline">True</property> + <property name="stock_id">gtk-remove</property> + </object> + <packing> + <property name="expand">False</property> + <property name="homogeneous">True</property> + </packing> + </child> </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> </child> </object> - <packing> - <property name="position">1</property> - </packing> </child> </object> </child> @@ -64,21 +97,6 @@ <property name="spacing">6</property> <property name="layout_style">end</property> <child> - <object class="GtkButton" id="button_remove"> - <property name="label">gtk-remove</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="can_default">True</property> - <property name="receives_default">False</property> - <property name="use_stock">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> - </child> - <child> <object class="GtkButton" id="button_close"> <property name="label">gtk-close</property> <property name="visible">True</property> |