# HG changeset patch # User Sean Egan # Date 1133288712 0 # Node ID 0eed625872f7b78a9c3b03d998660b00f85ff768 # Parent e0b512d6779212d70eb197c0a7d54024c137b0e0 [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 diff -r e0b512d67792 -r 0eed625872f7 src/gtkstatusbox.c --- 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)