cpw.qulogic.gtk3: 664b6af7: Remove and replace the Default Domain UI...

qulogic at pidgin.im qulogic at pidgin.im
Thu Dec 29 03:07:05 EST 2011


----------------------------------------------------------------------
Revision: 664b6af7bd94e9d167cff79c3327a9ebcdc7520d
Parent:   a8ed25afaea18162ffe99fd585b13930e56c781c
Author:   qulogic at pidgin.im
Date:     12/28/11 20:43:31
Branch:   im.pidgin.cpw.qulogic.gtk3
URL: http://d.pidgin.im/viewmtn/revision/info/664b6af7bd94e9d167cff79c3327a9ebcdc7520d

Changelog: 

Remove and replace the Default Domain UI hack.

Changes against parent a8ed25afaea18162ffe99fd585b13930e56c781c

  patched  libpurple/protocols/jabber/libfacebook.c
  patched  libpurple/protocols/jabber/libgtalk.c
  patched  pidgin/gtkaccount.c

-------------- next part --------------
============================================================
--- pidgin/gtkaccount.c	d7d5141343a56b92a9cf35bf94b632a6e08276cf
+++ pidgin/gtkaccount.c	f7199e6aa3f1be4f2800c342d820a7f893405036
@@ -166,37 +166,6 @@ static void add_voice_options(AccountPre
 static void add_proxy_options(AccountPrefsDialog *dialog, GtkWidget *parent);
 static void add_voice_options(AccountPrefsDialog *dialog);
 
-static const char *
-google_talk_default_domain_hackery(GtkWidget *protocol_combo, const char *value_if_gtalk)
-{
-	GtkTreeModel *model;
-	GtkTreeIter iter;
-	const char *value = NULL;
-
-	model = gtk_combo_box_get_model(GTK_COMBO_BOX(protocol_combo));
-	if (model != NULL && gtk_combo_box_get_active_iter(GTK_COMBO_BOX(protocol_combo), &iter)) {
-		char *protocol = NULL;
-
-		/* protocol is not stored as G_TYPE_STRING in the model so no g_free necessary */
-		gtk_tree_model_get(model, &iter, 2, &protocol, -1);
-		if (protocol && !strcmp("prpl-jabber", protocol)) {
-			char *item_name = NULL;
-
-			gtk_tree_model_get(model, &iter, 1, &item_name, -1);
-			if (item_name) {
-				if (!strcmp(item_name, _("Google Talk")))
-					value = value_if_gtalk;
-				g_free(item_name);
-			}
-			/* If it's not GTalk, but still Jabber then the value is not NULL, it's empty */
-			if (NULL == value)
-				value = "";
-		}
-	}
-
-	return value;
-}
-
 static GtkWidget *
 add_pref_box(AccountPrefsDialog *dialog, GtkWidget *parent,
 			 const char *text, GtkWidget *widget)
@@ -591,10 +560,6 @@ add_login_options(AccountPrefsDialog *di
 		if (value == NULL)
 			value = purple_account_user_split_get_default_value(split);
 
-		/* Google Talk default domain hackery! */
-		if (!strcmp(_("Domain"), purple_account_user_split_get_text(split)) && !value)
-			value = google_talk_default_domain_hackery(dialog->protocol_menu, "gmail.com");
-
 		if (value != NULL)
 			gtk_entry_set_text(GTK_ENTRY(entry), value);
 	}
============================================================
--- libpurple/protocols/jabber/libfacebook.c	192940c9d99da186612b5ba045977a8c01103d54
+++ libpurple/protocols/jabber/libfacebook.c	a944a03519087524facbb301f961c0b88a292d8a
@@ -260,7 +260,7 @@ init_plugin(PurplePlugin *plugin)
 	GList *encryption_values = NULL;
 
 	/* Translators: 'domain' is used here in the context of Internet domains, e.g. pidgin.im */
-	split = purple_account_user_split_new(_("Domain"), NULL, '@');
+	split = purple_account_user_split_new(_("Domain"), "chat.facebook.com", '@');
 	purple_account_user_split_set_reverse(split, FALSE);
 	prpl_info.user_splits = g_list_append(prpl_info.user_splits, split);
 
============================================================
--- libpurple/protocols/jabber/libgtalk.c	ca0b9463ab26bb2cce9a868224f5dd74a5adfb2a
+++ libpurple/protocols/jabber/libgtalk.c	0de9ebb34859d0bba130b75ba41e1dd1ad06c988
@@ -260,7 +260,7 @@ init_plugin(PurplePlugin *plugin)
 	GList *encryption_values = NULL;
 
 	/* Translators: 'domain' is used here in the context of Internet domains, e.g. pidgin.im */
-	split = purple_account_user_split_new(_("Domain"), NULL, '@');
+	split = purple_account_user_split_new(_("Domain"), "gmail.com", '@');
 	purple_account_user_split_set_reverse(split, FALSE);
 	prpl_info.user_splits = g_list_append(prpl_info.user_splits, split);
 


More information about the Commits mailing list