diff options
author | Will Thompson <will.thompson@collabora.co.uk> | 2011-06-24 18:09:28 +0800 |
---|---|---|
committer | Will Thompson <will.thompson@collabora.co.uk> | 2011-06-24 18:50:17 +0800 |
commit | fb207a362a266da923f6f87c91c0dd649cfa9183 (patch) | |
tree | ce6cdca3c0af0f49f2cc6a4747d1aa3ce4ae36c2 /libempathy-gtk | |
parent | 05fb4bd53ec98426d0880b0557031b2579ec96de (diff) | |
download | gsoc2013-empathy-fb207a362a266da923f6f87c91c0dd649cfa9183.tar gsoc2013-empathy-fb207a362a266da923f6f87c91c0dd649cfa9183.tar.gz gsoc2013-empathy-fb207a362a266da923f6f87c91c0dd649cfa9183.tar.bz2 gsoc2013-empathy-fb207a362a266da923f6f87c91c0dd649cfa9183.tar.lz gsoc2013-empathy-fb207a362a266da923f6f87c91c0dd649cfa9183.tar.xz gsoc2013-empathy-fb207a362a266da923f6f87c91c0dd649cfa9183.tar.zst gsoc2013-empathy-fb207a362a266da923f6f87c91c0dd649cfa9183.zip |
PresetDialog: GNOME 3-ify the remove button
Yum yum joined-toolbar!
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-status-preset-dialog.c | 12 | ||||
-rw-r--r-- | libempathy-gtk/empathy-status-preset-dialog.ui | 70 |
2 files changed, 54 insertions, 28 deletions
diff --git a/libempathy-gtk/empathy-status-preset-dialog.c b/libempathy-gtk/empathy-status-preset-dialog.c index 12305558a..30c5c6b9d 100644 --- a/libempathy-gtk/empathy-status-preset-dialog.c +++ b/libempathy-gtk/empathy-status-preset-dialog.c @@ -524,9 +524,11 @@ empathy_status_preset_dialog_init (EmpathyStatusPresetDialog *self) EMPATHY_TYPE_STATUS_PRESET_DIALOG, EmpathyStatusPresetDialogPriv); GtkBuilder *gui; - GtkWidget *toplevel_vbox, *remove_button, *entry; + GtkWidget *toplevel_vbox, *presets_sw, *remove_toolbar, *remove_button, + *entry; GtkTreeSelection *selection; char *filename; + GtkStyleContext *context; gtk_window_set_title (GTK_WINDOW (self), _("Edit Custom Messages")); @@ -538,13 +540,21 @@ empathy_status_preset_dialog_init (EmpathyStatusPresetDialog *self) "libempathy-gtk"); gui = empathy_builder_get_file (filename, "toplevel-vbox", &toplevel_vbox, + "presets-sw", &presets_sw, "presets-treeview", &priv->presets_treeview, + "remove-toolbar", &remove_toolbar, "remove-button", &remove_button, "add-combobox", &priv->add_combobox, "add-button", &priv->add_button, NULL); g_free (filename); + /* join the remove toolbar to the treeview */ + context = gtk_widget_get_style_context (presets_sw); + gtk_style_context_set_junction_sides (context, GTK_JUNCTION_BOTTOM); + context = gtk_widget_get_style_context (remove_toolbar); + gtk_style_context_set_junction_sides (context, GTK_JUNCTION_TOP); + selection = gtk_tree_view_get_selection ( GTK_TREE_VIEW (priv->presets_treeview)); g_signal_connect (selection, diff --git a/libempathy-gtk/empathy-status-preset-dialog.ui b/libempathy-gtk/empathy-status-preset-dialog.ui index c287f8e2e..b39e9a77b 100644 --- a/libempathy-gtk/empathy-status-preset-dialog.ui +++ b/libempathy-gtk/empathy-status-preset-dialog.ui @@ -23,48 +23,64 @@ </packing> </child> <child> - <object class="GtkScrolledWindow" id="scrolledwindow1"> - <property name="width_request">408</property> - <property name="height_request">252</property> + <object class="GtkVBox" id="vbox1"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="hscrollbar_policy">never</property> - <property name="shadow_type">etched-in</property> + <property name="can_focus">False</property> <child> - <object class="GtkTreeView" id="presets-treeview"> + <object class="GtkScrolledWindow" id="presets-sw"> + <property name="width_request">408</property> + <property name="height_request">252</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="headers_visible">False</property> + <property name="hscrollbar_policy">never</property> + <property name="shadow_type">etched-in</property> + <child> + <object class="GtkTreeView" id="presets-treeview"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="headers_visible">False</property> + </object> + </child> </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> </child> - </object> - <packing> - <property name="position">1</property> - </packing> - </child> - <child> - <object class="GtkHButtonBox" id="hbuttonbox1"> - <property name="visible">True</property> - <property name="layout_style">end</property> <child> - <object class="GtkButton" id="remove-button"> - <property name="label">gtk-remove</property> + <object class="GtkToolbar" id="remove-toolbar"> <property name="visible">True</property> - <property name="sensitive">False</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="use_stock">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="remove-button"> + <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">False</property> - <property name="position">0</property> + <property name="fill">True</property> + <property name="position">1</property> </packing> </child> </object> <packing> - <property name="expand">False</property> - <property name="position">2</property> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> </packing> </child> <child> |