Mercurial > pidgin.yaz
comparison pidgin/gtkblist.c @ 22297:00c20312e289
Don't clear account errors during account-error-changed emission. I can't
reproduce Stu's crash, but this fixes the error minidialog duplication I was
seeing when trying to reproduce it, and I believe the cause is the same.
References #4815
author | Will Thompson <will.thompson@collabora.co.uk> |
---|---|
date | Sat, 16 Feb 2008 14:42:57 +0000 |
parents | 3afd04d5f9d6 |
children | 7c5734075af3 |
comparison
equal
deleted
inserted
replaced
22296:6d3f8042f21f | 22297:00c20312e289 |
---|---|
4406 /***********************************/ | 4406 /***********************************/ |
4407 /* Connection error handling stuff */ | 4407 /* Connection error handling stuff */ |
4408 /***********************************/ | 4408 /***********************************/ |
4409 | 4409 |
4410 #define OBJECT_DATA_KEY_ACCOUNT "account" | 4410 #define OBJECT_DATA_KEY_ACCOUNT "account" |
4411 #define DO_NOT_CLEAR_ERROR "do-not-clear-error" | |
4411 | 4412 |
4412 static gboolean | 4413 static gboolean |
4413 find_account_widget(GObject *widget, | 4414 find_account_widget(GObject *widget, |
4414 PurpleAccount *account) | 4415 PurpleAccount *account) |
4415 { | 4416 { |
4468 remove_child_widget_by_account(GtkContainer *container, | 4469 remove_child_widget_by_account(GtkContainer *container, |
4469 PurpleAccount *account) | 4470 PurpleAccount *account) |
4470 { | 4471 { |
4471 GtkWidget *widget = find_child_widget_by_account(container, account); | 4472 GtkWidget *widget = find_child_widget_by_account(container, account); |
4472 if(widget) { | 4473 if(widget) { |
4474 /* Since we are destroying the widget in response to a change in | |
4475 * error, we should not clear the error. | |
4476 */ | |
4477 g_object_set_data(G_OBJECT(widget), DO_NOT_CLEAR_ERROR, | |
4478 GINT_TO_POINTER(TRUE)); | |
4473 gtk_widget_destroy(widget); | 4479 gtk_widget_destroy(widget); |
4474 } | 4480 } |
4475 } | 4481 } |
4476 | 4482 |
4477 /* Generic error buttons */ | 4483 /* Generic error buttons */ |
4493 static void | 4499 static void |
4494 generic_error_destroy_cb(GtkObject *dialog, | 4500 generic_error_destroy_cb(GtkObject *dialog, |
4495 PurpleAccount *account) | 4501 PurpleAccount *account) |
4496 { | 4502 { |
4497 g_hash_table_remove(gtkblist->connection_errors, account); | 4503 g_hash_table_remove(gtkblist->connection_errors, account); |
4498 purple_account_clear_current_error(account); | 4504 /* If the error dialog is being destroyed in response to the |
4505 * account-error-changed signal, we don't want to clear the current | |
4506 * error. | |
4507 */ | |
4508 if (g_object_get_data(G_OBJECT(dialog), DO_NOT_CLEAR_ERROR) == NULL) | |
4509 purple_account_clear_current_error(account); | |
4499 } | 4510 } |
4500 | 4511 |
4501 #define SSL_FAQ_URI "http://d.pidgin.im/wiki/FAQssl" | 4512 #define SSL_FAQ_URI "http://d.pidgin.im/wiki/FAQssl" |
4502 | 4513 |
4503 static void | 4514 static void |