From: Xavier Claessens Date: Wed, 20 Feb 2008 15:51:45 +0000 (+0000) Subject: Add a GUI to configure yahoo accounts. Fixes bug #513674 (Susana). X-Git-Url: https://git.0d.be/?p=empathy.git;a=commitdiff_plain;h=f2411ed2aa83dcce8c90f522610a0e6b1b163ecf Add a GUI to configure yahoo accounts. Fixes bug #513674 (Susana). svn path=/trunk/; revision=658 --- diff --git a/data/yahoo.profile b/data/yahoo.profile index 10898d48..f4173d1a 100644 --- a/data/yahoo.profile +++ b/data/yahoo.profile @@ -3,7 +3,7 @@ Manager=haze Protocol=yahoo DisplayName=Yahoo IconName = im-yahoo -ConfigurationUI = haze +ConfigurationUI = yahoo Capabilities = chat-p2p, supports-alias, supports-avatars, supports-roster VCardDefault = 1 VCardField = X-YAHOO diff --git a/libempathy-gtk/empathy-account-widget-yahoo.glade b/libempathy-gtk/empathy-account-widget-yahoo.glade new file mode 100644 index 00000000..4d0bcc11 --- /dev/null +++ b/libempathy-gtk/empathy-account-widget-yahoo.glade @@ -0,0 +1,526 @@ + + + + + + + True + Yahoo! account settings + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + False + False + True + False + False + GDK_WINDOW_TYPE_HINT_NORMAL + GDK_GRAVITY_NORTH_WEST + True + False + + + + True + False + 6 + + + + True + 2 + 3 + False + 6 + 12 + + + + True + Pass_word: + True + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + entry_password + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 1 + 2 + fill + + + + + + + True + Forget password and clear the entry. + True + GTK_RELIEF_NORMAL + True + + + + True + gtk-clear + 1 + 0.5 + 0.5 + 0 + 0 + + + + + 2 + 3 + 1 + 2 + fill + + + + + + + True + Login I_D: + True + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + entry_id + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 0 + 1 + fill + + + + + + + True + True + True + True + 0 + + True + False + + + 1 + 3 + 0 + 1 + + + + + + + True + True + True + False + 0 + + True + False + + + 1 + 2 + 1 + 2 + + + + + + 0 + False + False + + + + + + True + True + False + 0 + + + + True + False + 0 + + + + True + 7 + 2 + False + 6 + 12 + + + + True + True + _Ignore conference and chatroom invitations + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + 2 + 0 + 1 + fill + + + + + + + True + _Room List locale: + True + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + entry_locale + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 1 + 2 + fill + + + + + + + True + _Charset: + True + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + entry_charset + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 2 + 3 + fill + + + + + + + True + True + True + True + 0 + + True + False + + + 1 + 2 + 1 + 2 + + + + + + + True + True + True + True + 0 + + True + False + + + 1 + 2 + 2 + 3 + + + + + + + True + _Server: + True + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + entry_server + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 3 + 4 + fill + + + + + + + True + _Port: + True + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + spinbutton_port + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 4 + 5 + fill + + + + + + + True + True + True + True + 0 + + True + False + + + 1 + 2 + 3 + 4 + + + + + + + True + True + 1 + 0 + True + GTK_UPDATE_ALWAYS + False + False + 5050 1 65556 1 10 10 + + + 1 + 2 + 4 + 5 + + + + + + + True + J_apan server: + True + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + entry_serverjp + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 6 + 7 + fill + + + + + + + True + True + True + True + 0 + + True + False + + + 1 + 2 + 6 + 7 + + + + + + + True + True + Use _Yahoo Japan + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + 2 + 5 + 6 + fill + + + + + + 0 + True + True + + + + + + + + True + <b>Advanced</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + False + + + + + + + diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c index b6521977..267c9511 100644 --- a/libempathy-gtk/empathy-account-widget.c +++ b/libempathy-gtk/empathy-account-widget.c @@ -590,3 +590,38 @@ empathy_account_widget_icq_new (McAccount *account) return widget; } +GtkWidget * +empathy_account_widget_yahoo_new (McAccount *account) +{ + GladeXML *glade; + GtkWidget *widget; + + glade = empathy_glade_get_file ("empathy-account-widget-yahoo.glade", + "vbox_yahoo_settings", + NULL, + "vbox_yahoo_settings", &widget, + NULL); + + empathy_account_widget_handle_params (account, glade, + "entry_id", "account", + "entry_password", "password", + "entry_server", "server", + "entry_serverjp", "serverjp", + "entry_locale", "room-list-locale", + "entry_charset", "charset", + "spinbutton_port", "port", + "checkbutton_yahoojp", "yahoojp", + "checkbutton_ignore_invites", "ignore-invites", + NULL); + + emapthy_account_widget_add_forget_button (account, glade, + "button_forget", + "entry_password"); + + g_object_unref (glade); + + gtk_widget_show (widget); + + return widget; +} + diff --git a/libempathy-gtk/empathy-account-widget.h b/libempathy-gtk/empathy-account-widget.h index 8ba36c85..f7959fa9 100644 --- a/libempathy-gtk/empathy-account-widget.h +++ b/libempathy-gtk/empathy-account-widget.h @@ -45,6 +45,7 @@ GtkWidget *empathy_account_widget_salut_new (McAccount *account); GtkWidget *empathy_account_widget_msn_new (McAccount *account); GtkWidget *empathy_account_widget_jabber_new (McAccount *account); GtkWidget *empathy_account_widget_icq_new (McAccount *account); +GtkWidget *empathy_account_widget_yahoo_new (McAccount *account); G_END_DECLS diff --git a/libempathy-gtk/empathy-accounts-dialog.c b/libempathy-gtk/empathy-accounts-dialog.c index 2131c9f1..e8f8efd8 100644 --- a/libempathy-gtk/empathy-accounts-dialog.c +++ b/libempathy-gtk/empathy-accounts-dialog.c @@ -278,6 +278,10 @@ accounts_dialog_update_account (EmpathyAccountsDialog *dialog, dialog->settings_widget = empathy_account_widget_icq_new (account); } + else if (!tp_strdiff (config_ui, "yahoo")) { + dialog->settings_widget = + empathy_account_widget_yahoo_new (account); + } else { dialog->settings_widget = empathy_account_widget_generic_new (account);