# HG changeset patch # User Stu Tomlinson # Date 1139761161 0 # Node ID 0d73a901901383824ac2db5990b4026d24ed08dc # Parent 049847559e9683c39ea9af00d4b204da8ff4a872 [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: Tailor Script diff -r 049847559e96 -r 0d73a9019013 COPYRIGHT --- 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 diff -r 049847559e96 -r 0d73a9019013 src/gtkstatusbox.c --- 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)); } }