Mercurial > pidgin
changeset 17210:9ca9f87b4b47
Use gmail.com as the default domain for Google Talk accounts
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Thu, 24 May 2007 18:55:14 +0000 |
parents | 9c7abb947af4 |
children | 3e611b1b379c f9c17090f347 |
files | pidgin/gtkaccount.c |
diffstat | 1 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/pidgin/gtkaccount.c Thu May 24 00:35:15 2007 +0000 +++ b/pidgin/gtkaccount.c Thu May 24 18:55:14 2007 +0000 @@ -388,6 +388,8 @@ GtkWidget *hbox; GtkWidget *vbox; GtkWidget *entry; + GtkWidget *menu; + GtkWidget *item; GList *user_splits; GList *l, *l2; char *username = NULL; @@ -474,7 +476,7 @@ GtkWidget *entry = l->data; PurpleAccountUserSplit *split = l2->data; - const char *value = NULL; + const char *value = NULL, *protocol = NULL; char *c; if (dialog->account != NULL) { @@ -488,10 +490,17 @@ value = c; } } - if (value == NULL) value = purple_account_user_split_get_default_value(split); + /* Google Talk default domain hackery! */ + menu = gtk_option_menu_get_menu(GTK_OPTION_MENU(dialog->protocol_menu)); + item = gtk_menu_get_active(GTK_MENU(menu)); + protocol = g_object_get_data(G_OBJECT(item), "protocol"); + if (value == NULL && !strcmp(protocol, "prpl-fake") && + !strcmp(purple_account_user_split_get_text(split), _("Domain"))) + value = "gmail.com"; + if (value != NULL) gtk_entry_set_text(GTK_ENTRY(entry), value); }