From 75e1fbc9e330e16c48a835e4f73d468b00c7b5b5 Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Mon, 8 Aug 2011 18:04:47 +0200 Subject: Blocking dialog: Gnome 3-ify Remove button --- libempathy-gtk/empathy-contact-blocking-dialog.c | 12 +++++++++++- libempathy-gtk/empathy-contact-blocking-dialog.ui | 21 +++++++++++---------- 2 files changed, 22 insertions(+), 11 deletions(-) (limited to 'libempathy-gtk') diff --git a/libempathy-gtk/empathy-contact-blocking-dialog.c b/libempathy-gtk/empathy-contact-blocking-dialog.c index 1cb2b279c..404dab172 100644 --- a/libempathy-gtk/empathy-contact-blocking-dialog.c +++ b/libempathy-gtk/empathy-contact-blocking-dialog.c @@ -758,9 +758,11 @@ empathy_contact_blocking_dialog_init (EmpathyContactBlockingDialog *self) GtkBuilder *gui; char *filename; GtkWidget *contents; - GtkWidget *account_hbox, *blocked_contacts_view; + GtkWidget *account_hbox, *blocked_contacts_view, *blocked_contacts_sw, + *remove_toolbar; GtkEntryCompletion *completion; TpAccountManager *am; + GtkStyleContext *context; self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, EMPATHY_TYPE_CONTACT_BLOCKING_DIALOG, @@ -782,8 +784,10 @@ empathy_contact_blocking_dialog_init (EmpathyContactBlockingDialog *self) "add-button", &self->priv->add_button, "add-contact-entry", &self->priv->add_contact_entry, "blocked-contacts", &self->priv->blocked_contacts, + "blocked-contacts-sw", &blocked_contacts_sw, "blocked-contacts-view", &blocked_contacts_view, "remove-button", &self->priv->remove_button, + "remove-toolbar", &remove_toolbar, NULL); empathy_builder_connect (gui, self, @@ -792,6 +796,12 @@ empathy_contact_blocking_dialog_init (EmpathyContactBlockingDialog *self) "remove-button", "clicked", contact_blocking_dialog_remove_contacts, NULL); + /* join the remove toolbar to the treeview */ + context = gtk_widget_get_style_context (blocked_contacts_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); + /* add the contents to the dialog */ gtk_container_add ( GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (self))), diff --git a/libempathy-gtk/empathy-contact-blocking-dialog.ui b/libempathy-gtk/empathy-contact-blocking-dialog.ui index 2e943105e..766d27b23 100644 --- a/libempathy-gtk/empathy-contact-blocking-dialog.ui +++ b/libempathy-gtk/empathy-contact-blocking-dialog.ui @@ -39,11 +39,10 @@ - + True - 6 - + True True never @@ -77,22 +76,24 @@ - + True - start + 1 + - - gtk-remove + + gtk-remove True False True True - True + Remove False - False - 0 + True -- cgit v1.2.3 From 5bc1c756d01ac49513534b302238da7558f0d607 Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Mon, 8 Aug 2011 18:06:19 +0200 Subject: Blocking dialog: use a sensible default size This is the same area as is used for the custom status dialog's scrolled window. The content area turns out very slightly smaller, because the area includes the tree view's header. --- libempathy-gtk/empathy-contact-blocking-dialog.ui | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libempathy-gtk') diff --git a/libempathy-gtk/empathy-contact-blocking-dialog.ui b/libempathy-gtk/empathy-contact-blocking-dialog.ui index 766d27b23..78dd1cd2d 100644 --- a/libempathy-gtk/empathy-contact-blocking-dialog.ui +++ b/libempathy-gtk/empathy-contact-blocking-dialog.ui @@ -48,6 +48,8 @@ never automatic etched-in + 408 + 252 True -- cgit v1.2.3