comparison src/gtkblist.c @ 13375:a6b846c71358

[gaim-migrate @ 15748] Set a handle for the "You've been disconnected, Reconnect? Modify Account?" dialog so that Gaim closes the dialog if you delete the account. This prevents a crash when doing the following. 1. An account gets disconnected (you can reproduce this by setting your oscar login host to "DoesNotExist" 2. Click on the error button to bring up the dialog 3. Delete the account from the account editor 4. Click on Connect or Modify in the error dialog gaim_request dialogs have a high potential for crashes if the handle is not specified. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Thu, 02 Mar 2006 13:40:52 +0000
parents 999571d910ed
children ffd724befbf8
comparison
equal deleted inserted replaced
13374:14d1892e0932 13375:a6b846c71358
3491 3491
3492 account = user_data; 3492 account = user_data;
3493 primary = g_strdup_printf(_("%s disconnected"), 3493 primary = g_strdup_printf(_("%s disconnected"),
3494 gaim_account_get_username(account)); 3494 gaim_account_get_username(account));
3495 text = g_hash_table_lookup(gtkblist->connection_errors, account); 3495 text = g_hash_table_lookup(gtkblist->connection_errors, account);
3496 3496
3497 if (gaim_account_is_connected(account)) 3497 if (gaim_account_is_connected(account))
3498 { 3498 {
3499 gaim_notify_formatted(NULL, _("Connection Error"), 3499 gaim_notify_formatted(NULL, _("Connection Error"),
3500 primary, NULL, text, NULL, NULL); 3500 primary, NULL, text, NULL, NULL);
3501 } 3501 }
3502 else 3502 else
3503 { 3503 {
3504 gboolean enabled = gaim_account_get_enabled(account, gaim_core_get_ui()); 3504 gboolean enabled = gaim_account_get_enabled(account, gaim_core_get_ui());
3505 gaim_request_action(NULL, _("Connection Error"), primary, text, 2, 3505 gaim_request_action(account, _("Connection Error"), primary, text, 2,
3506 account, 3, 3506 account, 3,
3507 _("OK"), NULL, 3507 _("OK"), NULL,
3508 _("Modify Account"), GAIM_CALLBACK(ce_modify_account_cb), 3508 _("Modify Account"), GAIM_CALLBACK(ce_modify_account_cb),
3509 enabled ? _("Connect") : _("Enable Account"), 3509 enabled ? _("Connect") : _("Enable Account"),
3510 enabled ? GAIM_CALLBACK(gaim_account_connect) : 3510 enabled ? GAIM_CALLBACK(gaim_account_connect) :
3511 GAIM_CALLBACK(ce_enable_account_cb)); 3511 GAIM_CALLBACK(ce_enable_account_cb));
3512 } 3512 }
3513 gtk_widget_destroy(GTK_WIDGET(widget)); 3513 gtk_widget_destroy(GTK_WIDGET(widget));
3514 g_hash_table_remove(gtkblist->connection_errors, account); 3514 g_hash_table_remove(gtkblist->connection_errors, account);
3515 } 3515 }