From 712f5f9f45105ce66f0f8d4fff40857924943ae8 Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Tue, 4 Aug 2009 13:20:52 +0200 Subject: Add simple implementations for many widgets --- libempathy-gtk/empathy-account-widget-aim.ui | 66 +++++++ libempathy-gtk/empathy-account-widget-groupwise.ui | 66 +++++++ libempathy-gtk/empathy-account-widget-icq.ui | 66 +++++++ libempathy-gtk/empathy-account-widget-jabber.ui | 66 +++++++ libempathy-gtk/empathy-account-widget-msn.ui | 66 +++++++ libempathy-gtk/empathy-account-widget-sip.ui | 66 +++++++ libempathy-gtk/empathy-account-widget-yahoo.ui | 66 +++++++ libempathy-gtk/empathy-account-widget.c | 218 +++++++++++++++------ 8 files changed, 615 insertions(+), 65 deletions(-) (limited to 'libempathy-gtk') diff --git a/libempathy-gtk/empathy-account-widget-aim.ui b/libempathy-gtk/empathy-account-widget-aim.ui index 7f7ac3a60..d6696f583 100644 --- a/libempathy-gtk/empathy-account-widget-aim.ui +++ b/libempathy-gtk/empathy-account-widget-aim.ui @@ -190,4 +190,70 @@ + + True + vertical + 6 + + + True + 0 + What is your AIM screen name? + + + 0 + + + + + True + 0 + 0 + 0.34999999403953552 + 0.34999999403953552 + 12 + + + True + True + + + + + + 1 + + + + + True + 0 + What is your AIM password? + + + 2 + + + + + True + 0 + 0 + 0.34999999403953552 + 0.34999999403953552 + 12 + + + True + True + False + + + + + + 3 + + + diff --git a/libempathy-gtk/empathy-account-widget-groupwise.ui b/libempathy-gtk/empathy-account-widget-groupwise.ui index 84157527d..f5ddf8d9f 100644 --- a/libempathy-gtk/empathy-account-widget-groupwise.ui +++ b/libempathy-gtk/empathy-account-widget-groupwise.ui @@ -194,4 +194,70 @@ + + True + vertical + 6 + + + True + 0 + What is your GroupWise User ID? + + + 0 + + + + + True + 0 + 0 + 0.34999999403953552 + 0.34999999403953552 + 12 + + + True + True + + + + + + 1 + + + + + True + 0 + What is your GroupWise password? + + + 2 + + + + + True + 0 + 0 + 0.34999999403953552 + 0.34999999403953552 + 12 + + + True + True + False + + + + + + 3 + + + diff --git a/libempathy-gtk/empathy-account-widget-icq.ui b/libempathy-gtk/empathy-account-widget-icq.ui index 5eab0b75b..b2a62c215 100644 --- a/libempathy-gtk/empathy-account-widget-icq.ui +++ b/libempathy-gtk/empathy-account-widget-icq.ui @@ -219,4 +219,70 @@ + + True + vertical + 6 + + + True + 0 + What is your ICQ UIN? + + + 0 + + + + + True + 0 + 0 + 0.34999999403953552 + 0.34999999403953552 + 12 + + + True + True + + + + + + 1 + + + + + True + 0 + What is your ICQ password? + + + 2 + + + + + True + 0 + 0 + 0.34999999403953552 + 0.34999999403953552 + 12 + + + True + True + False + + + + + + 3 + + + diff --git a/libempathy-gtk/empathy-account-widget-jabber.ui b/libempathy-gtk/empathy-account-widget-jabber.ui index 4b0aa15ad..a2165393c 100644 --- a/libempathy-gtk/empathy-account-widget-jabber.ui +++ b/libempathy-gtk/empathy-account-widget-jabber.ui @@ -348,4 +348,70 @@ + + True + vertical + 6 + + + True + 0 + What is your Jabber ID? + + + 0 + + + + + True + 0 + 0 + 0.34999999403953552 + 0.34999999403953552 + 12 + + + True + True + + + + + + 1 + + + + + True + 0 + What is your Jabber password? + + + 2 + + + + + True + 0 + 0 + 0.34999999403953552 + 0.5 + 12 + + + True + True + False + + + + + + 3 + + + diff --git a/libempathy-gtk/empathy-account-widget-msn.ui b/libempathy-gtk/empathy-account-widget-msn.ui index 1d7bde038..2f06d88e7 100644 --- a/libempathy-gtk/empathy-account-widget-msn.ui +++ b/libempathy-gtk/empathy-account-widget-msn.ui @@ -194,4 +194,70 @@ + + True + vertical + 6 + + + True + 0 + What is your Windows Live user name? + + + 0 + + + + + True + 0 + 0 + 0.34999999403953552 + 0.34999999403953552 + 12 + + + True + True + + + + + + 1 + + + + + True + 0 + What is your Windows Live password? + + + 2 + + + + + True + 0 + 0 + 0.34999999403953552 + 0.34999999403953552 + 12 + + + True + True + False + + + + + + 3 + + + diff --git a/libempathy-gtk/empathy-account-widget-sip.ui b/libempathy-gtk/empathy-account-widget-sip.ui index 406f22c94..edb70e426 100644 --- a/libempathy-gtk/empathy-account-widget-sip.ui +++ b/libempathy-gtk/empathy-account-widget-sip.ui @@ -212,4 +212,70 @@ + + True + vertical + 6 + + + True + 0 + What is your SIP login ID? + + + 0 + + + + + True + 0 + 0 + 0.34999999403953552 + 0.34999999403953552 + 12 + + + True + True + + + + + + 1 + + + + + True + 0 + What is your SIP account password? + + + 2 + + + + + True + 0 + 0 + 0.34999999403953552 + 0.34999999403953552 + 12 + + + True + True + False + + + + + + 3 + + + diff --git a/libempathy-gtk/empathy-account-widget-yahoo.ui b/libempathy-gtk/empathy-account-widget-yahoo.ui index 31e932674..75c27f15c 100644 --- a/libempathy-gtk/empathy-account-widget-yahoo.ui +++ b/libempathy-gtk/empathy-account-widget-yahoo.ui @@ -294,4 +294,70 @@ + + True + vertical + 6 + + + True + 0 + What is your Yahoo! ID? + + + 0 + + + + + True + 0 + 0 + 0.34999999403953552 + 0.34999999403953552 + 12 + + + True + True + + + + + + 1 + + + + + True + 0 + What is your Yahoo! password? + + + 2 + + + + + True + 0 + 0 + 0.34999999403953552 + 0.34999999403953552 + 12 + + + True + True + False + + + + + + 3 + + + diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c index 4a6b8f21d..3bd8309fa 100644 --- a/libempathy-gtk/empathy-account-widget.c +++ b/libempathy-gtk/empathy-account-widget.c @@ -596,19 +596,37 @@ static void account_widget_build_msn (EmpathyAccountWidget *self, const char *filename) { - self->ui_details->gui = empathy_builder_get_file (filename, - "vbox_msn_settings", &self->ui_details->widget, - NULL); + EmpathyAccountWidgetPriv *priv = GET_PRIV (self); - empathy_account_widget_handle_params (self, - "entry_id", "account", - "entry_password", "password", - "entry_server", "server", - "spinbutton_port", "port", - NULL); + if (priv->simple) + { + self->ui_details->gui = empathy_builder_get_file (filename, + "vbox_msn_simple", &self->ui_details->widget, + NULL); + + empathy_account_widget_handle_params (self, + "entry_id_simple", "account", + "entry_password_simple", "password", + NULL); + + self->ui_details->default_focus = g_strdup ("entry_id_simple"); + } + else + { + self->ui_details->gui = empathy_builder_get_file (filename, + "vbox_msn_settings", &self->ui_details->widget, + NULL); - self->ui_details->default_focus = g_strdup ("entry_id"); - self->ui_details->add_forget = TRUE; + empathy_account_widget_handle_params (self, + "entry_id", "account", + "entry_password", "password", + "entry_server", "server", + "spinbutton_port", "port", + NULL); + + self->ui_details->default_focus = g_strdup ("entry_id"); + self->ui_details->add_forget = TRUE; + } } static void @@ -626,11 +644,11 @@ account_widget_build_jabber (EmpathyAccountWidget *self, NULL); empathy_account_widget_handle_params (self, - "entry_simple_id", "account", - "entry_simple_password", "password", + "entry_id_simple", "account", + "entry_password_simple", "password", NULL); - self->ui_details->default_focus = g_strdup ("entry_simple_id"); + self->ui_details->default_focus = g_strdup ("entry_id_simple"); } else { @@ -666,87 +684,157 @@ static void account_widget_build_icq (EmpathyAccountWidget *self, const char *filename) { + EmpathyAccountWidgetPriv *priv = GET_PRIV (self); GtkWidget *spinbutton_port; - self->ui_details->gui = empathy_builder_get_file (filename, - "vbox_icq_settings", &self->ui_details->widget, - "spinbutton_port", &spinbutton_port, - NULL); + if (priv->simple) + { + self->ui_details->gui = empathy_builder_get_file (filename, + "vbox_icq_simple", &self->ui_details->widget, + NULL); - empathy_account_widget_handle_params (self, - "entry_uin", "account", - "entry_password", "password", - "entry_server", "server", - "spinbutton_port", "port", - "entry_charset", "charset", - NULL); + empathy_account_widget_handle_params (self, + "entry_uin_simple", "account", + "entry_password_simple", "password", + NULL); - self->ui_details->default_focus = g_strdup ("entry_uin"); - self->ui_details->add_forget = TRUE; + self->ui_details->default_focus = g_strdup ("entry_uin_simple"); + } + else + { + self->ui_details->gui = empathy_builder_get_file (filename, + "vbox_icq_settings", &self->ui_details->widget, + "spinbutton_port", &spinbutton_port, + NULL); + + empathy_account_widget_handle_params (self, + "entry_uin", "account", + "entry_password", "password", + "entry_server", "server", + "spinbutton_port", "port", + "entry_charset", "charset", + NULL); + + self->ui_details->default_focus = g_strdup ("entry_uin"); + self->ui_details->add_forget = TRUE; + } } static void account_widget_build_aim (EmpathyAccountWidget *self, const char *filename) { + EmpathyAccountWidgetPriv *priv = GET_PRIV (self); GtkWidget *spinbutton_port; - self->ui_details->gui = empathy_builder_get_file (filename, - "vbox_aim_settings", &self->ui_details->widget, - "spinbutton_port", &spinbutton_port, - NULL); + if (priv->simple) + { + self->ui_details->gui = empathy_builder_get_file (filename, + "vbox_aim_simple", &self->ui_details->widget, + NULL); - empathy_account_widget_handle_params (self, - "entry_screenname", "account", - "entry_password", "password", - "entry_server", "server", - "spinbutton_port", "port", - NULL); + empathy_account_widget_handle_params (self, + "entry_screenname_simple", "account", + "entry_password_simple", "password", + NULL); + + self->ui_details->default_focus = g_strdup ("entry_screenname_simple"); + } + else + { + self->ui_details->gui = empathy_builder_get_file (filename, + "vbox_aim_settings", &self->ui_details->widget, + "spinbutton_port", &spinbutton_port, + NULL); - self->ui_details->default_focus = g_strdup ("entry_screenname"); - self->ui_details->add_forget = TRUE; + empathy_account_widget_handle_params (self, + "entry_screenname", "account", + "entry_password", "password", + "entry_server", "server", + "spinbutton_port", "port", + NULL); + + self->ui_details->default_focus = g_strdup ("entry_screenname"); + self->ui_details->add_forget = TRUE; + } } static void account_widget_build_yahoo (EmpathyAccountWidget *self, const char *filename) { - self->ui_details->gui = empathy_builder_get_file (filename, - "vbox_yahoo_settings", &self->ui_details->widget, - NULL); + EmpathyAccountWidgetPriv *priv = GET_PRIV (self); + + if (priv->simple) + { + self->ui_details->gui = empathy_builder_get_file (filename, + "vbox_yahoo_simple", &self->ui_details->widget, + NULL); - empathy_account_widget_handle_params (self, - "entry_id", "account", - "entry_password", "password", - "entry_server", "server", - "entry_locale", "room-list-locale", - "entry_charset", "charset", - "spinbutton_port", "port", - "checkbutton_yahoojp", "yahoojp", - "checkbutton_ignore_invites", "ignore-invites", - NULL); + empathy_account_widget_handle_params (self, + "entry_id_simple", "account", + "entry_password_simple", "password", + NULL); - self->ui_details->default_focus = g_strdup ("entry_id"); - self->ui_details->add_forget = TRUE; + self->ui_details->default_focus = g_strdup ("entry_id_simple"); + } + else + { + self->ui_details->gui = empathy_builder_get_file (filename, + "vbox_yahoo_settings", &self->ui_details->widget, + NULL); + + empathy_account_widget_handle_params (self, + "entry_id", "account", + "entry_password", "password", + "entry_server", "server", + "entry_locale", "room-list-locale", + "entry_charset", "charset", + "spinbutton_port", "port", + "checkbutton_yahoojp", "yahoojp", + "checkbutton_ignore_invites", "ignore-invites", + NULL); + + self->ui_details->default_focus = g_strdup ("entry_id"); + self->ui_details->add_forget = TRUE; + } } static void account_widget_build_groupwise (EmpathyAccountWidget *self, const char *filename) { - self->ui_details->gui = empathy_builder_get_file (filename, - "vbox_groupwise_settings", &self->ui_details->widget, - NULL); + EmpathyAccountWidgetPriv *priv = GET_PRIV (self); + + if (priv->simple) + { + self->ui_details->gui = empathy_builder_get_file (filename, + "vbox_groupwise_simple", &self->ui_details->widget, + NULL); - empathy_account_widget_handle_params (self, - "entry_id", "account", - "entry_password", "password", - "entry_server", "server", - "spinbutton_port", "port", - NULL); + empathy_account_widget_handle_params (self, + "entry_id_simple", "account", + "entry_password_simple", "password", + NULL); - self->ui_details->default_focus = g_strdup ("entry_id"); - self->ui_details->add_forget = TRUE; + self->ui_details->default_focus = g_strdup ("entry_id_simple"); + } + else + { + self->ui_details->gui = empathy_builder_get_file (filename, + "vbox_groupwise_settings", &self->ui_details->widget, + NULL); + + empathy_account_widget_handle_params (self, + "entry_id", "account", + "entry_password", "password", + "entry_server", "server", + "spinbutton_port", "port", + NULL); + + self->ui_details->default_focus = g_strdup ("entry_id"); + self->ui_details->add_forget = TRUE; + } } static void -- cgit v1.2.3