Mercurial > pidgin
comparison pidgin/gtkutils.c @ 32700:b961222cf067
Remove UI hack for XMPP sub-prpls.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Wed, 28 Dec 2011 09:00:48 +0000 |
parents | 763d65f3f758 |
children | b8a6a07aa5b0 |
comparison
equal
deleted
inserted
replaced
32699:eca1f14826e5 | 32700:b961222cf067 |
---|---|
705 PurplePlugin *plugin; | 705 PurplePlugin *plugin; |
706 GdkPixbuf *pixbuf = NULL; | 706 GdkPixbuf *pixbuf = NULL; |
707 GtkTreeIter iter; | 707 GtkTreeIter iter; |
708 GtkListStore *ls; | 708 GtkListStore *ls; |
709 GList *p; | 709 GList *p; |
710 const char *gtalk_name = NULL, *facebook_name = NULL; | |
711 int i; | 710 int i; |
712 | 711 |
713 ls = gtk_list_store_new(3, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_POINTER); | 712 ls = gtk_list_store_new(3, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_POINTER); |
714 | 713 |
715 aop_menu = g_malloc0(sizeof(AopMenu)); | 714 aop_menu = g_malloc0(sizeof(AopMenu)); |
716 aop_menu->default_item = -1; | 715 aop_menu->default_item = -1; |
717 aop_menu->model = GTK_TREE_MODEL(ls); | 716 aop_menu->model = GTK_TREE_MODEL(ls); |
718 | 717 |
719 if (purple_find_prpl("prpl-jabber")) { | |
720 gtalk_name = _("Google Talk"); | |
721 facebook_name = _("Facebook (XMPP)"); | |
722 } | |
723 | |
724 for (p = purple_plugins_get_protocols(), i = 0; | 718 for (p = purple_plugins_get_protocols(), i = 0; |
725 p != NULL; | 719 p != NULL; |
726 p = p->next, i++) { | 720 p = p->next, i++) { |
727 | 721 |
728 plugin = (PurplePlugin *)p->data; | 722 plugin = (PurplePlugin *)p->data; |
729 | |
730 if (gtalk_name && strcmp(gtalk_name, plugin->info->name) < 0) { | |
731 char *filename = g_build_filename(DATADIR, "pixmaps", "pidgin", "protocols", | |
732 "16", "google-talk.png", NULL); | |
733 pixbuf = pidgin_pixbuf_new_from_file(filename); | |
734 g_free(filename); | |
735 | |
736 gtk_list_store_append(ls, &iter); | |
737 gtk_list_store_set(ls, &iter, 0, pixbuf, 1, gtalk_name, 2, "prpl-jabber", -1); | |
738 | |
739 if (pixbuf) | |
740 g_object_unref(pixbuf); | |
741 | |
742 gtalk_name = NULL; | |
743 i++; | |
744 } | |
745 | |
746 if (facebook_name && strcmp(facebook_name, plugin->info->name) < 0) { | |
747 char *filename = g_build_filename(DATADIR, "pixmaps", "pidgin", "protocols", | |
748 "16", "facebook.png", NULL); | |
749 | |
750 pixbuf = pidgin_pixbuf_new_from_file(filename); | |
751 g_free(filename); | |
752 | |
753 gtk_list_store_append(ls, &iter); | |
754 gtk_list_store_set(ls, &iter, 0, pixbuf, 1, facebook_name, 2, "prpl-jabber", -1); | |
755 | |
756 if (pixbuf) | |
757 g_object_unref(pixbuf); | |
758 | |
759 facebook_name = NULL; | |
760 i++; | |
761 } | |
762 | 723 |
763 pixbuf = pidgin_create_prpl_icon_from_prpl(plugin, PIDGIN_PRPL_ICON_SMALL, NULL); | 724 pixbuf = pidgin_create_prpl_icon_from_prpl(plugin, PIDGIN_PRPL_ICON_SMALL, NULL); |
764 | 725 |
765 gtk_list_store_append(ls, &iter); | 726 gtk_list_store_append(ls, &iter); |
766 gtk_list_store_set(ls, &iter, 0, pixbuf, 1, plugin->info->name, 2, plugin->info->id, -1); | 727 gtk_list_store_set(ls, &iter, 0, pixbuf, 1, plugin->info->name, 2, plugin->info->id, -1); |