aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2009-08-28 20:39:42 +0800
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-08-31 23:34:42 +0800
commit61398dbbf1b7dc364c54e999fa983ce6fb078e3b (patch)
treeb3f6b5af4bef7f163361b4686339e242727cffe9
parent032af43881ddaac3de000207ee73eec0d0448dd8 (diff)
downloadgsoc2013-empathy-61398dbbf1b7dc364c54e999fa983ce6fb078e3b.tar
gsoc2013-empathy-61398dbbf1b7dc364c54e999fa983ce6fb078e3b.tar.gz
gsoc2013-empathy-61398dbbf1b7dc364c54e999fa983ce6fb078e3b.tar.bz2
gsoc2013-empathy-61398dbbf1b7dc364c54e999fa983ce6fb078e3b.tar.lz
gsoc2013-empathy-61398dbbf1b7dc364c54e999fa983ce6fb078e3b.tar.xz
gsoc2013-empathy-61398dbbf1b7dc364c54e999fa983ce6fb078e3b.tar.zst
gsoc2013-empathy-61398dbbf1b7dc364c54e999fa983ce6fb078e3b.zip
Construct the GTalk widget according to the icon name
-rw-r--r--libempathy-gtk/empathy-account-widget.c29
1 files changed, 28 insertions, 1 deletions
diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c
index 3d81a1790..641ef00ba 100644
--- a/libempathy-gtk/empathy-account-widget.c
+++ b/libempathy-gtk/empathy-account-widget.c
@@ -792,8 +792,14 @@ 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;
- if (priv->simple)
+ is_gtalk = !tp_strdiff (
+ empathy_account_settings_get_icon_name (priv->settings),
+ "im-google-talk");
+
+ if (priv->simple && !is_gtalk)
{
self->ui_details->gui = empathy_builder_get_file (filename,
"vbox_jabber_simple", &self->ui_details->widget,
@@ -818,6 +824,19 @@ account_widget_build_jabber (EmpathyAccountWidget *self,
self->ui_details->default_focus = g_strdup ("entry_id_simple");
}
+ else if (priv->simple && is_gtalk)
+ {
+ self->ui_details->gui = empathy_builder_get_file (filename,
+ "vbox_gtalk_simple", &self->ui_details->widget,
+ NULL);
+
+ empathy_account_widget_handle_params (self,
+ "entry_id_g_simple", "account",
+ "entry_password_g_simple", "password",
+ NULL);
+
+ self->ui_details->default_focus = g_strdup ("entry_id_g_simple");
+ }
else
{
self->ui_details->gui = empathy_builder_get_file (filename,
@@ -825,6 +844,8 @@ account_widget_build_jabber (EmpathyAccountWidget *self,
"vbox_jabber_settings", &self->ui_details->widget,
"spinbutton_port", &spinbutton_port,
"checkbutton_ssl", &checkbutton_ssl,
+ "label_username_example", &label_example_jabber,
+ "label_username_g_example", &label_example_gtalk,
NULL);
empathy_account_widget_handle_params (self,
@@ -846,6 +867,12 @@ account_widget_build_jabber (EmpathyAccountWidget *self,
g_signal_connect (checkbutton_ssl, "toggled",
G_CALLBACK (account_widget_jabber_ssl_toggled_cb),
self);
+
+ if (is_gtalk)
+ {
+ gtk_widget_hide (label_example_jabber);
+ gtk_widget_show (label_example_gtalk);
+ }
}
}