# HG changeset patch # User Mark Doliner # Date 1138939488 0 # Node ID 0e7f1958382574c811054f05b12f85b80515e671 # Parent 079f7a452e3a7dc217f70980e1fdb6bb66e44b20 [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 diff -r 079f7a452e3a -r 0e7f19583825 src/gtkmain.c --- 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