aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-account-widget.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-02-11 20:35:53 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-02-12 00:01:37 +0800
commitaba09644412809a256dc1b8b570022c772e3009d (patch)
treed8508eb778c7511861ea771bae4fee7622c4f130 /libempathy-gtk/empathy-account-widget.c
parentd5c50301939772d752c7f8789a9b5ae81334fab3 (diff)
downloadgsoc2013-empathy-aba09644412809a256dc1b8b570022c772e3009d.tar
gsoc2013-empathy-aba09644412809a256dc1b8b570022c772e3009d.tar.gz
gsoc2013-empathy-aba09644412809a256dc1b8b570022c772e3009d.tar.bz2
gsoc2013-empathy-aba09644412809a256dc1b8b570022c772e3009d.tar.lz
gsoc2013-empathy-aba09644412809a256dc1b8b570022c772e3009d.tar.xz
gsoc2013-empathy-aba09644412809a256dc1b8b570022c772e3009d.tar.zst
gsoc2013-empathy-aba09644412809a256dc1b8b570022c772e3009d.zip
account-widget: display facebook example label
Diffstat (limited to 'libempathy-gtk/empathy-account-widget.c')
-rw-r--r--libempathy-gtk/empathy-account-widget.c25
1 files changed, 21 insertions, 4 deletions
diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c
index 25f8e0f70..1681d4539 100644
--- a/libempathy-gtk/empathy-account-widget.c
+++ b/libempathy-gtk/empathy-account-widget.c
@@ -940,6 +940,15 @@ account_widget_is_gtalk (EmpathyAccountWidget *self)
"im-google-talk");
}
+static gboolean
+account_widget_is_facebook (EmpathyAccountWidget *self)
+{
+ EmpathyAccountWidgetPriv *priv = GET_PRIV (self);
+
+ return !tp_strdiff (empathy_account_settings_get_icon_name (priv->settings),
+ "im-facebook");
+}
+
static void
account_widget_build_jabber (EmpathyAccountWidget *self,
const char *filename)
@@ -949,12 +958,13 @@ account_widget_build_jabber (EmpathyAccountWidget *self,
GtkWidget *checkbutton_ssl;
GtkWidget *label_id, *label_password;
GtkWidget *label_id_create, *label_password_create;
- GtkWidget *label_example_gtalk, *label_example_jabber;
- gboolean is_gtalk;
+ GtkWidget *label_example_gtalk, *label_example_jabber, *label_example_fb;
+ gboolean is_gtalk, is_facebook;
is_gtalk = account_widget_is_gtalk (self);
+ is_facebook = account_widget_is_facebook (self);
- if (priv->simple && !is_gtalk)
+ if (priv->simple && !is_gtalk && !is_facebook)
{
/* Simple widget for XMPP */
self->ui_details->gui = empathy_builder_get_file (filename,
@@ -994,9 +1004,10 @@ account_widget_build_jabber (EmpathyAccountWidget *self,
self->ui_details->default_focus = g_strdup ("entry_id_g_simple");
}
+ /* TODO: Simple widget for Facebook */
else
{
- /* Full widget for XMPP and Google Talk */
+ /* Full widget for XMPP, Google Talk and Facebook*/
self->ui_details->gui = empathy_builder_get_file (filename,
"table_common_settings", &priv->table_common_settings,
"vbox_jabber_settings", &self->ui_details->widget,
@@ -1004,6 +1015,7 @@ account_widget_build_jabber (EmpathyAccountWidget *self,
"checkbutton_ssl", &checkbutton_ssl,
"label_username_example", &label_example_jabber,
"label_username_g_example", &label_example_gtalk,
+ "label_username_f_example", &label_example_fb,
NULL);
empathy_account_widget_handle_params (self,
@@ -1031,6 +1043,11 @@ account_widget_build_jabber (EmpathyAccountWidget *self,
gtk_widget_hide (label_example_jabber);
gtk_widget_show (label_example_gtalk);
}
+ else if (is_facebook)
+ {
+ gtk_widget_hide (label_example_jabber);
+ gtk_widget_show (label_example_fb);
+ }
}
}