# HG changeset patch # User Sean Egan # Date 1180033556 0 # Node ID 3e611b1b379cff3cd0ac4a419b1a78d9d535c4e0 # Parent 9ca9f87b4b47ce308e38067a36346302b84450e4 Use talk.google.com as the default server for Google Talk accounts diff -r 9ca9f87b4b47 -r 3e611b1b379c pidgin/gtkaccount.c --- a/pidgin/gtkaccount.c Thu May 24 18:55:14 2007 +0000 +++ b/pidgin/gtkaccount.c Thu May 24 19:05:56 2007 +0000 @@ -689,7 +689,7 @@ { PurpleAccountOption *option; PurpleAccount *account; - GtkWidget *frame, *vbox, *check, *entry, *combo; + GtkWidget *frame, *vbox, *check, *entry, *combo, *menu, *item; const GList *list, *node; gint i, idx, int_value; GtkListStore *model; @@ -699,7 +699,7 @@ GList *l; char buf[1024]; char *title; - const char *str_value; + const char *str_value, *protocol; gboolean bool_value; if (dialog->protocol_frame != NULL) { @@ -822,6 +822,14 @@ gtk_entry_set_invisible_char(GTK_ENTRY(entry), PIDGIN_INVISIBLE_CHAR); } + /* 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 (str_value == NULL && !strcmp(protocol, "prpl-fake") && + !strcmp(_("Connect server"), purple_account_option_get_text(option))) + str_value = "talk.google.com"; + if (str_value != NULL) gtk_entry_set_text(GTK_ENTRY(entry), str_value);