[gyrus] Use stock items properly in the connect/disconnect button
- From: Claudio Saavedra <csaavedra src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gyrus] Use stock items properly in the connect/disconnect button
- Date: Wed, 29 Dec 2010 00:34:07 +0000 (UTC)
commit 54cd6edd1283d0917c08fe8747dde24f5f52bf36
Author: Claudio Saavedra <csaavedra igalia com>
Date: Wed Dec 29 02:31:43 2010 +0200
Use stock items properly in the connect/disconnect button
Fixes ugliness in the button after connected and removes a few
strings from the translation catalog. Also, with this the settings
for button icons will be respected.
src/gyrus-admin.c | 15 ++-------------
src/ui/page.xml | 39 +++------------------------------------
2 files changed, 5 insertions(+), 49 deletions(-)
---
diff --git a/src/gyrus-admin.c b/src/gyrus-admin.c
index b5cfc58..eb371a9 100644
--- a/src/gyrus-admin.c
+++ b/src/gyrus-admin.c
@@ -846,14 +846,8 @@ gyrus_admin_clean_mailbox_treeview (GtkTreeView *treeview, const gchar *title)
void
gyrus_admin_logged_out (GyrusAdmin *admin)
{
- GtkWidget *btn_image;
-
gtk_button_set_label (GTK_BUTTON (admin->priv->button_connect),
- _("_Connect"));
-
- btn_image = gtk_image_new_from_stock (GTK_STOCK_CONNECT, GTK_ICON_SIZE_BUTTON);
- gtk_button_set_image (GTK_BUTTON (admin->priv->button_connect),
- btn_image);
+ GTK_STOCK_CONNECT);
gyrus_admin_clean_mailbox_treeview (GTK_TREE_VIEW (admin->priv->treeview_users),
_("Users"));
@@ -1017,13 +1011,8 @@ gyrus_admin_pre_login (GyrusAdmin *admin)
/* do something useful here */
}
else {
- GtkWidget *btn_image;
gtk_button_set_label (GTK_BUTTON (admin->priv->button_connect),
- _("_Disconnect"));
- btn_image = gtk_image_new_from_stock (GTK_STOCK_DISCONNECT,
- GTK_ICON_SIZE_BUTTON);
- gtk_button_set_image (GTK_BUTTON (admin->priv->button_connect),
- btn_image);
+ GTK_STOCK_DISCONNECT);
gyrus_admin_post_login (admin);
/* correctly logged in */
keep_asking = FALSE;
diff --git a/src/ui/page.xml b/src/ui/page.xml
index 4609e08..fd12600 100644
--- a/src/ui/page.xml
+++ b/src/ui/page.xml
@@ -425,42 +425,9 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <child>
- <object class="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <child>
- <object class="GtkHBox" id="hbox7">
- <property name="visible">True</property>
- <property name="spacing">2</property>
- <child>
- <object class="GtkImage" id="image2">
- <property name="visible">True</property>
- <property name="stock">gtk-connect</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label63">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Connect</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
+ <property name="use_stock">True</property>
+ <property name="use_underline">True</property>
+ <property name="label">gtk-connect</property>
</object>
<packing>
<property name="expand">False</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]