[empathy: 1/5] Blocking dialog: Gnome 3-ify Remove button
- From: Will Thompson <wjt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy: 1/5] Blocking dialog: Gnome 3-ify Remove button
- Date: Tue, 16 Aug 2011 11:22:48 +0000 (UTC)
commit 75e1fbc9e330e16c48a835e4f73d468b00c7b5b5
Author: Will Thompson <will thompson collabora co uk>
Date: Mon Aug 8 18:04:47 2011 +0200
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(-)
---
diff --git a/libempathy-gtk/empathy-contact-blocking-dialog.c b/libempathy-gtk/empathy-contact-blocking-dialog.c
index 1cb2b27..404dab1 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 2e94310..766d27b 100644
--- a/libempathy-gtk/empathy-contact-blocking-dialog.ui
+++ b/libempathy-gtk/empathy-contact-blocking-dialog.ui
@@ -39,11 +39,10 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox1">
+ <object class="GtkVBox" id="blocked-contacts-vbox">
<property name="visible">True</property>
- <property name="spacing">6</property>
<child>
- <object class="GtkScrolledWindow" id="scrolledwindow1">
+ <object class="GtkScrolledWindow" id="blocked-contacts-sw">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">never</property>
@@ -77,22 +76,24 @@
</packing>
</child>
<child>
- <object class="GtkVButtonBox" id="vbuttonbox1">
+ <object class="GtkToolbar" id="remove-toolbar">
<property name="visible">True</property>
- <property name="layout_style">start</property>
+ <property name="icon_size">1</property>
+ <style>
+ <class name="inline-toolbar"/>
+ </style>
<child>
- <object class="GtkButton" id="remove-button">
- <property name="label">gtk-remove</property>
+ <object class="GtkToolButton" id="remove-button">
+ <property name="stock_id">gtk-remove</property>
<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="tooltip-text" translatable="yes">Remove</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>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]