Mercurial > pidgin.yaz
changeset 13110:0e7f19583825
[gaim-migrate @ 15472]
Luke, this commit is for you, baby
When starting Gaim with 'gaim -n', don't modify the last used status
by making it "OFFLINE." Instead, find an already-existant transient
OFFLINE status and use that or create one if needed.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Fri, 03 Feb 2006 04:04:48 +0000 |
parents | 079f7a452e3a |
children | 328e8cf2fb02 |
files | src/gtkmain.c |
diffstat | 1 files changed, 10 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gtkmain.c Fri Feb 03 03:51:08 2006 +0000 +++ b/src/gtkmain.c Fri Feb 03 04:04:48 2006 +0000 @@ -714,8 +714,16 @@ { /* Set all accounts to "offline" */ GaimSavedStatus *saved_status; - saved_status = gaim_savedstatus_get_current(); - gaim_savedstatus_set_type(saved_status, GAIM_STATUS_OFFLINE); + + /* If we've used this type+message before, lookup the transient status */ + saved_status = gaim_savedstatus_find_by_type_and_message( + GAIM_STATUS_OFFLINE, NULL); + + /* If this type+message is unique then create a new transient saved status */ + if (saved_status == NULL) + saved_status = gaim_savedstatus_new(NULL, GAIM_STATUS_OFFLINE); + + /* Set the status for each account */ gaim_savedstatus_activate(saved_status); } else