From: Will Thompson Date: Fri, 24 Jun 2011 10:09:28 +0000 (+0100) Subject: PresetDialog: GNOME 3-ify the remove button X-Git-Url: https://git.0d.be/?p=empathy.git;a=commitdiff_plain;h=fb207a362a266da923f6f87c91c0dd649cfa9183 PresetDialog: GNOME 3-ify the remove button Yum yum joined-toolbar! --- diff --git a/libempathy-gtk/empathy-status-preset-dialog.c b/libempathy-gtk/empathy-status-preset-dialog.c index 12305558..30c5c6b9 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 c287f8e2..b39e9a77 100644 --- a/libempathy-gtk/empathy-status-preset-dialog.ui +++ b/libempathy-gtk/empathy-status-preset-dialog.ui @@ -23,48 +23,64 @@ - - 408 - 252 + True - True - never - etched-in + False - + + 408 + 252 True True - False + never + etched-in + + + True + True + False + + + + True + True + 0 + - - - 1 - - - - - True - end - - gtk-remove + True - False - True - True - True + False + 1 + + + + Remove + True + False + True + gtk-remove + + + False + True + + False - False - 0 + True + 1 - False - 2 + True + True + 1