[gaim-migrate @ 15607]

Sun, 12 Feb 2006 16:19:21 +0000

author
Kevin Hunter
date
Sun, 12 Feb 2006 16:19:21 +0000
changeset 13242
3b87f908bb32
parent 13241
47f5618a9454
child 13243
5a127fc7db90

[gaim-migrate @ 15607]
Kevin Hunter managed to track down what was causing the problems in the
status selector with Gtk < 2.4. This is presumably a bug in the older
versions of Gtk but we can work around it here.

Thanks Kevin!

committer: Stu Tomlinson <nosnilmot@pidgin.im>

COPYRIGHT file | annotate | diff | comparison | revisions
src/gtkstatusbox.c file | annotate | diff | comparison | revisions
--- a/COPYRIGHT	Sun Feb 12 16:13:27 2006 +0000
+++ b/COPYRIGHT	Sun Feb 12 16:19:21 2006 +0000
@@ -126,6 +126,7 @@
 Greg Hudson
 Magnus Hult
 Karsten Huneycutt
+Kevin Hunter
 Rian Hunter
 Thomas Huriaux
 Hans Petter Jansson
--- a/src/gtkstatusbox.c	Sun Feb 12 16:13:27 2006 +0000
+++ b/src/gtkstatusbox.c	Sun Feb 12 16:19:21 2006 +0000
@@ -642,7 +642,10 @@
 	/* Unset the model while clearing it */
 	gtk_combo_box_set_model(GTK_COMBO_BOX(status_box), NULL);
 	gtk_list_store_clear(status_box->dropdown_store);
-	gtk_combo_box_set_model(GTK_COMBO_BOX(status_box), GTK_TREE_MODEL(status_box->dropdown_store));
+	/* Don't set the model until the new statuses have been added to the box.
+	 * What is presumably a bug in Gtk < 2.4 causes things to get all confused
+	 * if we do this here. */
+	/* gtk_combo_box_set_model(GTK_COMBO_BOX(status_box), GTK_TREE_MODEL(status_box->dropdown_store)); */
 
 	account = GTK_GAIM_STATUS_BOX(status_box)->account;
 	if (account == NULL)
@@ -668,6 +671,7 @@
 		gtk_gaim_status_box_add(GTK_GAIM_STATUS_BOX(status_box), GTK_GAIM_STATUS_BOX_TYPE_CUSTOM, pixbuf, _("New..."), NULL, NULL);
 		gtk_gaim_status_box_add(GTK_GAIM_STATUS_BOX(status_box), GTK_GAIM_STATUS_BOX_TYPE_SAVED, pixbuf, _("Saved..."), NULL, NULL);
 
+		gtk_combo_box_set_model(GTK_COMBO_BOX(status_box), GTK_TREE_MODEL(status_box->dropdown_store));
 		status_menu_refresh_iter(status_box);
 
 	} else {
@@ -691,7 +695,7 @@
 			if (tmp != NULL)
 				g_object_unref(tmp);
 		}
-
+		gtk_combo_box_set_model(GTK_COMBO_BOX(status_box), GTK_TREE_MODEL(status_box->dropdown_store));
 		update_to_reflect_account_status(status_box, account, gaim_account_get_active_status(account));
 	}
 }

mercurial