Mercurial > pidgin.yaz
changeset 12256:0eed625872f7
[gaim-migrate @ 14558]
When using GTK+ 2.2.1, starting Gaim would pop up 10 "Custom status" dialogs
because clearing the non-per-account statusboxes to turn them into
per-account statusboxes triggered every status in it.
This fixes that by unsetting the model before screwing with it.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Tue, 29 Nov 2005 18:25:12 +0000 |
parents | e0b512d67792 |
children | ca27de274225 |
files | src/gtkstatusbox.c |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gtkstatusbox.c Tue Nov 29 17:15:36 2005 +0000 +++ b/src/gtkstatusbox.c Tue Nov 29 18:25:12 2005 +0000 @@ -181,11 +181,13 @@ statusbox, GAIM_CALLBACK(account_status_changed_cb)); statusbox->status_changed_signal = 0; } + if (statusbox->account) statusbox->status_changed_signal = gaim_signal_connect(gaim_accounts_get_handle(), "account-status-changed", statusbox, GAIM_CALLBACK(account_status_changed_cb), statusbox); gtk_gaim_status_box_regenerate(statusbox); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, param_id, pspec); @@ -383,8 +385,11 @@ icon_size = gtk_icon_size_from_name(GAIM_ICON_SIZE_STATUS); + /* 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)); + account = GTK_GAIM_STATUS_BOX(status_box)->account; if (account == NULL) { @@ -425,7 +430,6 @@ } update_to_reflect_account_status(status_box, account, gaim_account_get_active_status(account)); } - } static gboolean scroll_event_cb(GtkWidget *w, GdkEventScroll *event, GtkIMHtml *imhtml)