Mercurial > pidgin.yaz
diff src/savedstatuses.c @ 13246:24ac8fc885b8
[gaim-migrate @ 15612]
When we don't have any saved statuses and we create the default status,
set the preference that keeps track of which status is currently in use
so that we don't create multiple default statuses.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 12 Feb 2006 16:51:55 +0000 |
parents | c97c76d9d347 |
children | d9dbb874a30c |
line wrap: on
line diff
--- a/src/savedstatuses.c Sun Feb 12 16:39:55 2006 +0000 +++ b/src/savedstatuses.c Sun Feb 12 16:51:55 2006 +0000 @@ -583,7 +583,10 @@ g_return_if_fail(status != NULL); g_free(status->message); - status->message = g_strdup(message); + if ((message != NULL) && (*message == '\0')) + status->message = NULL; + else + status->message = g_strdup(message); schedule_save(); } @@ -738,6 +741,8 @@ * using? In any case, add a default status. */ saved_status = gaim_savedstatus_new(NULL, GAIM_STATUS_AVAILABLE); + gaim_prefs_set_int("/core/savedstatus/current", + gaim_savedstatus_get_creation_time(saved_status)); } return saved_status; @@ -760,6 +765,8 @@ */ saved_status = gaim_savedstatus_new(NULL, GAIM_STATUS_AWAY); gaim_savedstatus_set_message(saved_status, _("I'm not here right now")); + gaim_prefs_set_int("/core/savedstatus/idleaway", + gaim_savedstatus_get_creation_time(saved_status)); } else {