gobjectification: 25a7956a: Keep track of enabled accounts.
sadrul at pidgin.im
sadrul at pidgin.im
Sun Jun 22 14:41:31 EDT 2008
-----------------------------------------------------------------
Revision: 25a7956a58e2d73e89d4e5fb686847e93f8c993d
Ancestor: 5ddd94fb6809d2acabfe23720c14ae24b37a9fd9
Author: sadrul at pidgin.im
Date: 2008-06-22T14:19:22
Branch: im.pidgin.gobjectification
URL: http://d.pidgin.im/viewmtn/revision/info/25a7956a58e2d73e89d4e5fb686847e93f8c993d
Modified files:
libpurple/account.c
ChangeLog:
Keep track of enabled accounts.
-------------- next part --------------
============================================================
--- libpurple/account.c 8c7ed2a18ca9b1228f70dc6dd8edd00e082a6a99
+++ libpurple/account.c 193239c73aed0dc6179cc31f751654278eade88e
@@ -1399,6 +1399,9 @@ purple_account_set_enabled(PurpleAccount
PURPLE_ACCOUNT_GET_PRIVATE(account)->enabled = value;
g_object_notify(G_OBJECT(account), PROP_ENABLED_S);
+ purple_account_set_ui_bool(account, purple_core_get_ui(),
+ "enabled", value);
+
gc = purple_account_get_connection(account);
/* XXX: I don't know where to move these signals. */
@@ -1417,6 +1420,8 @@ purple_account_set_enabled(PurpleAccount
purple_account_connect(account);
else if (!value && !purple_account_is_disconnected(account))
purple_account_disconnect(account);
+
+ schedule_accounts_save();
}
void
@@ -1649,6 +1654,11 @@ purple_account_set_ui_bool(PurpleAccount
g_hash_table_insert(table, g_strdup(name), setting);
+ if (strcmp(ui, purple_core_get_ui()) == 0 &&
+ strcmp(name, "enabled") == 0) {
+ purple_account_set_enabled(account, value);
+ }
+
schedule_accounts_save();
}
@@ -2523,6 +2533,7 @@ purple_accounts_init(void)
purple_signal_connect(conn_handle, "connection-error", handle,
PURPLE_CALLBACK(connection_error_cb), NULL);
#endif
+ accounts_loaded = TRUE;
}
void
More information about the Commits
mailing list