gobjectification: 5ddd94fb: Get rid of the account-alias-changed sig...
sadrul at pidgin.im
sadrul at pidgin.im
Sun Jun 22 14:41:52 EDT 2008
-----------------------------------------------------------------
Revision: 5ddd94fb6809d2acabfe23720c14ae24b37a9fd9
Ancestor: c9132cca3739ff1c47ef41beafb8521c3ed8b8bb
Author: sadrul at pidgin.im
Date: 2008-06-22T14:06:07
Branch: im.pidgin.gobjectification
URL: http://d.pidgin.im/viewmtn/revision/info/5ddd94fb6809d2acabfe23720c14ae24b37a9fd9
Modified files:
libpurple/account.c libpurple/plugins/signals-test.c
ChangeLog:
Get rid of the account-alias-changed signal, since we get a notify::alias
signal when we change the alias.
I was thinking about getting rid of account-enabled/-disabled signal,
thanks to notify::enabled. But there are places where we want to be
notified of *any* account being enabled/disabled, instead of a particular
account. How do we want to deal with such signals? Bunch them into the
PurpleAccountManager (like account-added/-removed)?
-------------- next part --------------
============================================================
--- libpurple/account.c 8a88522e9db92bdb685808eca6613d0d8f97d03d
+++ libpurple/account.c 8c7ed2a18ca9b1228f70dc6dd8edd00e082a6a99
@@ -1401,18 +1401,17 @@ purple_account_set_enabled(PurpleAccount
gc = purple_account_get_connection(account);
+ /* XXX: I don't know where to move these signals. */
if(was_enabled && !value)
purple_signal_emit(purple_accounts_get_handle(), "account-disabled", account);
else if(!was_enabled && value)
purple_signal_emit(purple_accounts_get_handle(), "account-enabled", account);
+#warning Do something about wants-to-die. Perhaps check if current_error is fatal?
#if 0
if ((gc != NULL) && (gc->wants_to_die == TRUE))
-#else
-#warning Do something about wants-to-die. Perhaps check if current_error is fatal?
- if (gc != NULL)
+ return;
#endif
- return;
if (value && purple_presence_is_online(account->presence))
purple_account_connect(account);
@@ -2491,12 +2490,6 @@ purple_accounts_init(void)
purple_value_new(PURPLE_TYPE_SUBTYPE,
PURPLE_SUBTYPE_STATUS));
- purple_signal_register(handle, "account-alias-changed",
- purple_marshal_VOID__POINTER_POINTER, NULL, 2,
- purple_value_new(PURPLE_TYPE_SUBTYPE,
- PURPLE_SUBTYPE_ACCOUNT),
- purple_value_new(PURPLE_TYPE_STRING));
-
purple_signal_register(handle, "account-authorization-requested",
purple_marshal_INT__POINTER_POINTER,
purple_value_new(PURPLE_TYPE_INT), 2,
============================================================
--- libpurple/plugins/signals-test.c 886485358ccc7e2a33edd6a84da33608645d7f3f
+++ libpurple/plugins/signals-test.c 7026864d4ed92fe4628c50bf849115ed54357817
@@ -67,14 +67,6 @@ account_status_changed(PurpleAccount *ac
purple_status_get_name(new));
}
-static void
-account_alias_changed(PurpleAccount *account, const char *old, gpointer data)
-{
- purple_debug_misc("signals test", "account-alias-changed (%s, %s, %s)\n",
- purple_account_get_username(account),
- old, purple_account_get_alias(account));
-}
-
static int
account_authorization_requested_cb(PurpleAccount *account, const char *user, gpointer data)
{
@@ -583,8 +575,6 @@ plugin_load(PurplePlugin *plugin)
plugin, PURPLE_CALLBACK(account_set_info_cb), NULL);
purple_signal_connect(accounts_handle, "account-status-changed",
plugin, PURPLE_CALLBACK(account_status_changed), NULL);
- purple_signal_connect(accounts_handle, "account-alias-changed",
- plugin, PURPLE_CALLBACK(account_alias_changed), NULL);
purple_signal_connect(accounts_handle, "account-authorization-requested",
plugin, PURPLE_CALLBACK(account_authorization_requested_cb), NULL);
purple_signal_connect(accounts_handle, "account-authorization-denied",
More information about the Commits
mailing list