# HG changeset patch # User Elliott Sales de Andrade # Date 1325062848 0 # Node ID b961222cf0677baa79df26301befe02134981a8a # Parent eca1f14826e57858542b82e1de54ecaf9adb0c95 Remove UI hack for XMPP sub-prpls. diff -r eca1f14826e5 -r b961222cf067 libpurple/protocols/jabber/libfacebook.c --- a/libpurple/protocols/jabber/libfacebook.c Wed Dec 28 08:47:49 2011 +0000 +++ b/libpurple/protocols/jabber/libfacebook.c Wed Dec 28 09:00:48 2011 +0000 @@ -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 @@ 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 */ diff -r eca1f14826e5 -r b961222cf067 libpurple/protocols/jabber/libgtalk.c --- a/libpurple/protocols/jabber/libgtalk.c Wed Dec 28 08:47:49 2011 +0000 +++ b/libpurple/protocols/jabber/libgtalk.c Wed Dec 28 09:00:48 2011 +0000 @@ -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 @@ 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 */ diff -r eca1f14826e5 -r b961222cf067 pidgin/gtkutils.c --- a/pidgin/gtkutils.c Wed Dec 28 08:47:49 2011 +0000 +++ b/pidgin/gtkutils.c Wed Dec 28 09:00:48 2011 +0000 @@ -707,7 +707,6 @@ 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 @@ 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);