cpw.qulogic.gtk3: a927fe43: Avoid calling gtk_combo_box_set_active t...

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


----------------------------------------------------------------------
Revision: a927fe43f41e4248cad0c94e5fd21e89be055fcb
Parent:   d9b73ddb77c2e5a45b7897fa15b38f945785f7e3
Author:   qulogic at pidgin.im
Date:     12/29/11 00:36:32
Branch:   im.pidgin.cpw.qulogic.gtk3
URL: http://d.pidgin.im/viewmtn/revision/info/a927fe43f41e4248cad0c94e5fd21e89be055fcb

Changelog: 

Avoid calling gtk_combo_box_set_active twice in some cases.

Changes against parent d9b73ddb77c2e5a45b7897fa15b38f945785f7e3

  patched  pidgin/gtkutils.c

-------------- next part --------------
============================================================
--- pidgin/gtkutils.c	4739e751baad9d23c4c9ba3567a2e2bbf319c057
+++ pidgin/gtkutils.c	94c4ee35da43718937ef50c8ae2549952dfe5d7d
@@ -679,8 +679,6 @@ aop_option_menu_new(AopMenu *aop_menu, G
 	gtk_cell_layout_add_attribute(GTK_CELL_LAYOUT(optmenu), cr, "text", AOP_NAME_COLUMN);
 
 	aop_option_menu_replace_menu(optmenu, aop_menu);
-	if (aop_menu->default_item == -1)
-		gtk_combo_box_set_active(GTK_COMBO_BOX(optmenu), 0);
 	g_object_set_data(G_OBJECT(optmenu), "user_data", user_data);
 
 	g_signal_connect(G_OBJECT(optmenu), "changed", G_CALLBACK(aop_menu_cb), cb);
@@ -720,7 +718,7 @@ create_protocols_menu(const char *defaul
 	ls = gtk_list_store_new(AOP_COLUMN_COUNT, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_POINTER);
 
 	aop_menu = g_malloc0(sizeof(AopMenu));
-	aop_menu->default_item = -1;
+	aop_menu->default_item = 0;
 	aop_menu->model = GTK_TREE_MODEL(ls);
 
 	for (p = purple_plugins_get_protocols(), i = 0;
@@ -744,6 +742,7 @@ create_protocols_menu(const char *defaul
 		if (default_proto_id != NULL && !strcmp(plugin->info->id, default_proto_id))
 			aop_menu->default_item = i;
 	}
+
 	return aop_menu;
 }
 
@@ -788,7 +787,7 @@ create_account_menu(PurpleAccount *defau
 	ls = gtk_list_store_new(AOP_COLUMN_COUNT, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_POINTER);
 
 	aop_menu = g_malloc0(sizeof(AopMenu));
-	aop_menu->default_item = -1;
+	aop_menu->default_item = 0;
 	aop_menu->model = GTK_TREE_MODEL(ls);
 
 	for (p = list, i = 0; p != NULL; p = p->next, i++) {
@@ -837,6 +836,7 @@ create_account_menu(PurpleAccount *defau
 		if (default_account && account == default_account)
 			aop_menu->default_item = i;
 	}
+
 	return aop_menu;
 }
 


More information about the Commits mailing list