Mercurial > pidgin.yaz
diff src/account.c @ 12070:e4666705944b
[gaim-migrate @ 14365]
patches [ 1353462 ] account-disabled/enabled signals, use them in account dialog
and [ 1355690 ] Add/remove statusbox when accounts are enabled/disabled
some parts of the first one didn't apply, but they were doc changes, so
i figured charkins could diff them.
committer: Tailor Script <tailor@pidgin.im>
author | Tim Ringenbach <marv@pidgin.im> |
---|---|
date | Sun, 13 Nov 2005 03:45:16 +0000 |
parents | 41d84ac57cb6 |
children | 980c877bd238 |
line wrap: on
line diff
--- a/src/account.c Sun Nov 13 03:39:06 2005 +0000 +++ b/src/account.c Sun Nov 13 03:45:16 2005 +0000 @@ -1292,13 +1292,21 @@ gboolean value) { GaimConnection *gc; + gboolean was_enabled = FALSE; g_return_if_fail(account != NULL); g_return_if_fail(ui != NULL); + was_enabled = gaim_account_get_enabled(account, ui); + gaim_account_set_ui_bool(account, ui, "auto-login", value); gc = gaim_account_get_connection(account); + if(was_enabled && !value) + gaim_signal_emit(gaim_accounts_get_handle(), "account-disabled", account); + else if(!was_enabled && value) + gaim_signal_emit(gaim_accounts_get_handle(), "account-enabled", account); + if ((gc != NULL) && (gc->wants_to_die == TRUE)) return; @@ -2252,6 +2260,16 @@ gaim_value_new(GAIM_TYPE_SUBTYPE, GAIM_SUBTYPE_ACCOUNT)); + gaim_signal_register(handle, "account-disabled", + gaim_marshal_VOID__POINTER, NULL, 1, + gaim_value_new(GAIM_TYPE_SUBTYPE, + GAIM_SUBTYPE_ACCOUNT)); + + gaim_signal_register(handle, "account-enabled", + gaim_marshal_VOID__POINTER, NULL, 1, + gaim_value_new(GAIM_TYPE_SUBTYPE, + GAIM_SUBTYPE_ACCOUNT)); + gaim_signal_register(handle, "account-setting-info", gaim_marshal_VOID__POINTER_POINTER, NULL, 2, gaim_value_new(GAIM_TYPE_SUBTYPE,