diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-08-27 21:48:53 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-08-30 19:37:45 +0800 |
commit | 73a8a1b248293643aaca7afe40480d2cf6de64e9 (patch) | |
tree | 5f98c11a54576fa6e0235e3a59362ed893384423 /libempathy-gtk | |
parent | 6fab1a3f3a374bbb914898ce7ddb7b5d80b09cf8 (diff) | |
download | gsoc2013-empathy-73a8a1b248293643aaca7afe40480d2cf6de64e9.tar gsoc2013-empathy-73a8a1b248293643aaca7afe40480d2cf6de64e9.tar.gz gsoc2013-empathy-73a8a1b248293643aaca7afe40480d2cf6de64e9.tar.bz2 gsoc2013-empathy-73a8a1b248293643aaca7afe40480d2cf6de64e9.tar.lz gsoc2013-empathy-73a8a1b248293643aaca7afe40480d2cf6de64e9.tar.xz gsoc2013-empathy-73a8a1b248293643aaca7afe40480d2cf6de64e9.tar.zst gsoc2013-empathy-73a8a1b248293643aaca7afe40480d2cf6de64e9.zip |
factor out set_apply_button()
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-account-widget.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c index 1fec201a0..3f49cbc18 100644 --- a/libempathy-gtk/empathy-account-widget.c +++ b/libempathy-gtk/empathy-account-widget.c @@ -1463,6 +1463,16 @@ do_get_property (GObject *object, } static void +set_apply_button (EmpathyAccountWidget *self) +{ + EmpathyAccountWidgetPriv *priv = GET_PRIV (self); + + gtk_button_set_image (GTK_BUTTON (priv->apply_button), NULL); + gtk_button_set_use_stock (GTK_BUTTON (priv->apply_button), TRUE); + gtk_button_set_label (GTK_BUTTON (priv->apply_button), GTK_STOCK_APPLY); +} + +static void presence_changed_cb (TpAccountManager *manager, TpConnectionPresenceType state, const gchar *status, @@ -1495,9 +1505,7 @@ presence_changed_cb (TpAccountManager *manager, { /* We are offline or modifying an existing account, display * a Save button */ - gtk_button_set_image (GTK_BUTTON (priv->apply_button), NULL); - gtk_button_set_use_stock (GTK_BUTTON (priv->apply_button), TRUE); - gtk_button_set_label (GTK_BUTTON (priv->apply_button), GTK_STOCK_APPLY); + set_apply_button (self); } } @@ -1723,7 +1731,8 @@ do_constructed (GObject *obj) priv->cancel_button = gtk_button_new_from_stock (GTK_STOCK_CANCEL); - priv->apply_button = gtk_button_new_from_stock (GTK_STOCK_APPLY); + priv->apply_button = gtk_button_new (); + set_apply_button (self); /* We'll change this button to a "Log in" one if we are creating a new * account and are connected. */ |