Use talk.google.com as the default server for Google Talk accounts

Thu, 24 May 2007 19:05:56 +0000

author
Sean Egan <seanegan@pidgin.im>
date
Thu, 24 May 2007 19:05:56 +0000
changeset 17302
073f3871ef48
parent 17301
7af76e506062
child 17310
22529674d8c8

Use talk.google.com as the default server for Google Talk accounts

pidgin/gtkaccount.c file | annotate | diff | comparison | revisions
--- 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);
 

mercurial