Mercurial > pidgin.yaz
diff src/gtkaccount.c @ 12125:3c1bac709234
[gaim-migrate @ 14425]
Change /core/savedstatus/current and /core/savedstatus/idleaway
to ints (they used to be strings, where the value was the title of a
GaimSavedStatus).
The value is now equal to the "creation" timestamp of a saved_status.
The creation timestamp is used as the unique key. The primary reason
for this is to allow for saved statuses to have NULL titles. NULL titles
are needed for transient statuses. I also added a "last_used" timestamp.
This all paves the way for keeping track of recently used statuses
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Fri, 18 Nov 2005 07:23:29 +0000 |
parents | 355c7acbb61d |
children | cda86ce5b026 |
line wrap: on
line diff
--- a/src/gtkaccount.c Fri Nov 18 06:35:07 2005 +0000 +++ b/src/gtkaccount.c Fri Nov 18 07:23:29 2005 +0000 @@ -1622,14 +1622,10 @@ /* If this is a new account, then sign on! */ if (new) { - const char *current_savedstatus_name; - const GaimSavedStatus *saved_status = NULL; - - current_savedstatus_name = gaim_prefs_get_string("/core/savedstatus/current"); - if (current_savedstatus_name) - saved_status = gaim_savedstatus_find(current_savedstatus_name); - - if (saved_status) { + const GaimSavedStatus *saved_status; + + saved_status = gaim_savedstatus_get_current(); + if (saved_status != NULL) { gaim_savedstatus_activate_for_account(saved_status, account); gaim_account_set_enabled(account, GAIM_GTK_UI, TRUE); } @@ -2177,7 +2173,6 @@ GtkTreeModel *model = GTK_TREE_MODEL(dialog->model); GtkTreeIter iter; gboolean enabled; - const char *current_savedstatus_name; const GaimSavedStatus *saved_status; gtk_tree_model_get_iter_from_string(model, &iter, path_str); @@ -2187,8 +2182,7 @@ -1); /* Set the statuses for this account to the current status */ - current_savedstatus_name = gaim_prefs_get_string("/core/savedstatus/current"); - saved_status = gaim_savedstatus_find(current_savedstatus_name); + saved_status = gaim_savedstatus_get_current(); gaim_savedstatus_activate_for_account(saved_status, account); gaim_account_set_enabled(account, GAIM_GTK_UI, !enabled);