cpw.qulogic.gtk3: 0ec34b5f: Remove UI hack for XMPP sub-prpls.

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


----------------------------------------------------------------------
Revision: 0ec34b5fe4a7bf03df245566ab9b8e2ca0412b81
Parent:   7f42fed8175cb4a47b58d579c77cefdc1917a18e
Author:   qulogic at pidgin.im
Date:     12/28/11 04:00:48
Branch:   im.pidgin.cpw.qulogic.gtk3
URL: http://d.pidgin.im/viewmtn/revision/info/0ec34b5fe4a7bf03df245566ab9b8e2ca0412b81

Changelog: 

Remove UI hack for XMPP sub-prpls.

Changes against parent 7f42fed8175cb4a47b58d579c77cefdc1917a18e

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

-------------- next part --------------
============================================================
--- pidgin/gtkutils.c	86ee83df8349c84bd0b8819e37375deff98e801a
+++ pidgin/gtkutils.c	7f8e3a5049db21b4a1cfa87016d05cddfd8111d7
@@ -707,7 +707,6 @@ create_protocols_menu(const char *defaul
 	GtkTreeIter iter;
 	GtkListStore *ls;
 	GList *p;
-	const char *gtalk_name = NULL, *facebook_name = NULL;
 	int i;
 
 	ls = gtk_list_store_new(3, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_POINTER);
@@ -716,50 +715,12 @@ create_protocols_menu(const char *defaul
 	aop_menu->default_item = -1;
 	aop_menu->model = GTK_TREE_MODEL(ls);
 
-	if (purple_find_prpl("prpl-jabber")) {
-		gtalk_name = _("Google Talk");
-		facebook_name = _("Facebook (XMPP)");
-	}
-
 	for (p = purple_plugins_get_protocols(), i = 0;
 		 p != NULL;
 		 p = p->next, i++) {
 
 		plugin = (PurplePlugin *)p->data;
 
-		if (gtalk_name && strcmp(gtalk_name, plugin->info->name) < 0) {
-			char *filename = g_build_filename(DATADIR, "pixmaps", "pidgin", "protocols",
-			                                  "16", "google-talk.png", NULL);
-			pixbuf = pidgin_pixbuf_new_from_file(filename);
-			g_free(filename);
-
-			gtk_list_store_append(ls, &iter);
-			gtk_list_store_set(ls, &iter, 0, pixbuf, 1, gtalk_name, 2, "prpl-jabber", -1);
-
-			if (pixbuf)
-				g_object_unref(pixbuf);
-
-			gtalk_name = NULL;
-			i++;
-		}
-
-		if (facebook_name && strcmp(facebook_name, plugin->info->name) < 0) {
-			char *filename = g_build_filename(DATADIR, "pixmaps", "pidgin", "protocols",
-			                                  "16", "facebook.png", NULL);
-
-			pixbuf = pidgin_pixbuf_new_from_file(filename);
-			g_free(filename);
-
-			gtk_list_store_append(ls, &iter);
-			gtk_list_store_set(ls, &iter, 0, pixbuf, 1, facebook_name, 2, "prpl-jabber", -1);
-
-			if (pixbuf)
-				g_object_unref(pixbuf);
-
-			facebook_name = NULL;
-			i++;
-		}
-
 		pixbuf = pidgin_create_prpl_icon_from_prpl(plugin, PIDGIN_PRPL_ICON_SMALL, NULL);
 
 		gtk_list_store_append(ls, &iter);
============================================================
--- libpurple/protocols/jabber/libfacebook.c	7494d26527a2d278b375557313438e34b7f0972a
+++ libpurple/protocols/jabber/libfacebook.c	192940c9d99da186612b5ba045977a8c01103d54
@@ -49,6 +49,12 @@
 #include "data.h"
 #include "ibb.h"
 
+static const char *
+facebook_list_icon(PurpleAccount *a, PurpleBuddy *b)
+{
+	return "facebook";
+}
+
 static PurplePlugin *my_protocol = NULL;
 
 static PurplePluginProtocolInfo prpl_info =
@@ -62,7 +68,7 @@ static PurplePluginProtocolInfo prpl_inf
 	NULL,							/* user_splits */
 	NULL,							/* protocol_options */
 	{"png", 32, 32, 96, 96, 0, PURPLE_ICON_SCALE_SEND | PURPLE_ICON_SCALE_DISPLAY}, /* icon_spec */
-	jabber_list_icon,				/* list_icon */
+	facebook_list_icon,				/* list_icon */
 	jabber_list_emblem,			/* list_emblems */
 	jabber_status_text,				/* status_text */
 	jabber_tooltip_text,			/* tooltip_text */
============================================================
--- libpurple/protocols/jabber/libgtalk.c	9c5bf80040713fcd10b8b6b647bb035012c006a9
+++ libpurple/protocols/jabber/libgtalk.c	92fda027c37912d11805e536b52639679f48ac30
@@ -49,6 +49,12 @@
 #include "data.h"
 #include "ibb.h"
 
+static const char *
+gtalk_list_icon(PurpleAccount *a, PurpleBuddy *b)
+{
+	return "google-talk";
+}
+
 static PurplePlugin *my_protocol = NULL;
 
 static PurplePluginProtocolInfo prpl_info =
@@ -62,7 +68,7 @@ static PurplePluginProtocolInfo prpl_inf
 	NULL,							/* user_splits */
 	NULL,							/* protocol_options */
 	{"png", 32, 32, 96, 96, 0, PURPLE_ICON_SCALE_SEND | PURPLE_ICON_SCALE_DISPLAY}, /* icon_spec */
-	jabber_list_icon,				/* list_icon */
+	gtalk_list_icon,				/* list_icon */
 	jabber_list_emblem,			/* list_emblems */
 	jabber_status_text,				/* status_text */
 	jabber_tooltip_text,			/* tooltip_text */


More information about the Commits mailing list