Mercurial > pidgin.yaz
changeset 13241:0d73a9019013
[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 <tailor@pidgin.im>
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Sun, 12 Feb 2006 16:19:21 +0000 |
parents | 049847559e96 |
children | cdd107258f11 |
files | COPYRIGHT src/gtkstatusbox.c |
diffstat | 2 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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)); } }