[gaim-migrate @ 15472]

Fri, 03 Feb 2006 04:04:48 +0000

author
Mark Doliner <markdoliner@pidgin.im>
date
Fri, 03 Feb 2006 04:04:48 +0000
changeset 13111
31caa48825f7
parent 13110
052e717c7281
child 13112
d2c4ff0321e1

[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.

src/gtkmain.c file | annotate | diff | comparison | revisions
--- 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

mercurial