diff pidgin/gtkutils.c @ 17084:10c7c5d4ea25

Patch from Gabriel Schulhof to fix the Google-Talk selection.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sun, 13 May 2007 10:26:08 +0000
parents fdd1a73aa37e
children 7ade887fd3f6 7ca09df1ea55 92c3c2eeba87
line wrap: on
line diff
--- a/pidgin/gtkutils.c	Sun May 13 09:42:37 2007 +0000
+++ b/pidgin/gtkutils.c	Sun May 13 10:26:08 2007 +0000
@@ -510,10 +510,10 @@
 	const char *proto_name;
 	char buf[256];
 	int i, selected_index = -1;
-	char *gtalk_name = NULL;
+	const char *gtalk_name = NULL;
 
 	if (purple_find_prpl("prpl-jabber"))
-		gtalk_name = g_strdup(_("Google Talk"));
+		gtalk_name = _("Google Talk");
 
 	optmenu = gtk_option_menu_new();
 	gtk_widget_show(optmenu);
@@ -548,10 +548,9 @@
 				image = gtk_image_new();
 
 			gtalk_item = pidgin_protocol_option_menu_item(menu, sg, image, gtalk_name, "prpl-fake");
-			g_object_set_data(G_OBJECT(gtalk_item), "real_protocol", plugin->info->id);
+			g_object_set_data(G_OBJECT(gtalk_item), "real_protocol", "prpl-jabber");
 			i++;
 
-			g_free(gtalk_name);
 			gtalk_name = NULL;
 		}
 
@@ -586,12 +585,6 @@
 			g_object_unref(G_OBJECT(pixbuf));
 	}
 
-	/* This is only needed if Pidgin has zero prpls compiled in, but
-	 * I'm doing it because it's proper and might make a difference
-	 * for automated source checkers. */
-	g_free(gtalk_name);
-
-
 	gtk_option_menu_set_menu(GTK_OPTION_MENU(optmenu), menu);
 
 	if (selected_index != -1)