# HG changeset patch # User Mark Doliner # Date 1111983993 0 # Node ID 36ed17d3ad9de673c4e33f1a414753d3ef163001 # Parent c6600b133594d236c84af0dc08d90cf24abfbbd4 [gaim-migrate @ 12363] Changing your away message by just typing new text into the GtkStatusBox works again. I broke that earlier today when I fix a small bit of the which-status-is-the-active-status-in-this-presence thing. I also removed the log in or out in account.c depending on the status that was set. This was already handled by most of the PRPLs, and I feel that's the best way to do it. There was some talk of removing the login and close PRPL callbacks, and I'm not entirely against that, but things are starting to get pretty good. I don't see a need to change that right now. Also, I'm going to add a link to my (Mark Doliner) blog, for google, I guess: http://www.livejournal.com/users/thekingant/ diff -r c6600b133594 -r 36ed17d3ad9d src/account.c --- a/src/account.c Mon Mar 28 03:55:29 2005 +0000 +++ b/src/account.c Mon Mar 28 04:26:33 2005 +0000 @@ -278,7 +278,7 @@ xmlnode *node, *child; GList *cur; - node = xmlnode_new("accounts"); + node = xmlnode_new("account"); xmlnode_set_attrib(node, "version", "1.0"); for (cur = gaim_accounts_get_all(); cur != NULL; cur = cur->next) @@ -298,7 +298,7 @@ if (!accounts_loaded) { - gaim_debug_error("accounts", "Attempted to save accounts before " + gaim_debug_error("account", "Attempted to save accounts before " "they were read!\n"); return; } @@ -1140,51 +1140,28 @@ gboolean active, va_list args) { GaimStatus *status; - GaimStatusType *status_type; g_return_if_fail(account != NULL); g_return_if_fail(status_id != NULL); + gaim_debug_info("account", "Changing status for %s, setting %s to %d\n", + gaim_account_get_username(account), status_id, active); + status = gaim_account_get_status(account, status_id); if (status == NULL) { - gaim_debug_error("accounts", + gaim_debug_error("account", "Invalid status ID %s for account %s (%s)\n", status_id, gaim_account_get_username(account), gaim_account_get_protocol_id(account)); return; } - status_type = gaim_status_get_type(status); - - /* - * If this account should be disconnected, but is online, then disconnect. - */ - if (active && - (gaim_status_type_get_primitive(status_type) == GAIM_STATUS_OFFLINE) && - gaim_account_is_connected(account)) - { - account->gc->wants_to_die = TRUE; - gaim_account_disconnect(account); - - /* No need to actually set the status, so we just exit */ - return; - } /* Our current statuses are saved to accounts.xml */ schedule_accounts_save(); if (active || gaim_status_is_independent(status)) gaim_status_set_active_with_attrs(status, active, args); - - /* - * If this account should be connected, but is not, then connect. - */ - if (active && - (gaim_status_type_get_primitive(status_type) != GAIM_STATUS_OFFLINE) && - !gaim_account_is_connected(account)) - { - gaim_account_connect(account); - } } void @@ -1759,7 +1736,7 @@ index = g_list_index(accounts, account); if (index == -1) { - gaim_debug_error("accounts", + gaim_debug_error("account", "Unregistered account (%s) discovered during reorder!\n", gaim_account_get_username(account)); return; diff -r c6600b133594 -r 36ed17d3ad9d src/status.c --- a/src/status.c Mon Mar 28 03:55:29 2005 +0000 +++ b/src/status.c Mon Mar 28 04:26:33 2005 +0000 @@ -722,7 +722,7 @@ if (gaim_status_is_exclusive(status)) { old_status = gaim_presence_get_active_status(presence); - if (old_status != NULL) + if (old_status != NULL && (old_status != status)) old_status->active = FALSE; presence->active_status = status; }