# HG changeset patch # User Mark Doliner # Date 1132285501 0 # Node ID 355c7acbb61d964f06bac30a4056d192d0525501 # Parent 9b06c216e362c5d3e43f92780c6e50f15389e903 [gaim-migrate @ 14423] Renamed /core/status/default and /core/status/idleaway to /core/savedstatus/default and /core/savedstatus/idleaway, and removed to redundant calls to set the 'default' pref /core/savedstatus/default is set by gaim_savedstatus_activate() in savedstatus.c committer: Tailor Script diff -r 9b06c216e362 -r 355c7acbb61d configure.ac --- a/configure.ac Thu Nov 17 17:38:07 2005 +0000 +++ b/configure.ac Fri Nov 18 03:45:01 2005 +0000 @@ -1570,7 +1570,7 @@ po/Makefile.in sounds/Makefile src/Makefile - src/mediastreamer/Makefile + src/mediastreamer/Makefile src/protocols/Makefile src/protocols/bonjour/Makefile src/protocols/gg/Makefile diff -r 9b06c216e362 -r 355c7acbb61d src/gtkaccount.c --- a/src/gtkaccount.c Thu Nov 17 17:38:07 2005 +0000 +++ b/src/gtkaccount.c Fri Nov 18 03:45:01 2005 +0000 @@ -1625,7 +1625,7 @@ const char *current_savedstatus_name; const GaimSavedStatus *saved_status = NULL; - current_savedstatus_name = gaim_prefs_get_string("/core/status/current"); + current_savedstatus_name = gaim_prefs_get_string("/core/savedstatus/current"); if (current_savedstatus_name) saved_status = gaim_savedstatus_find(current_savedstatus_name); @@ -2187,7 +2187,7 @@ -1); /* Set the statuses for this account to the current status */ - current_savedstatus_name = gaim_prefs_get_string("/core/status/current"); + current_savedstatus_name = gaim_prefs_get_string("/core/savedstatus/current"); saved_status = gaim_savedstatus_find(current_savedstatus_name); gaim_savedstatus_activate_for_account(saved_status, account); diff -r 9b06c216e362 -r 355c7acbb61d src/gtkidle.c --- a/src/gtkidle.c Thu Nov 17 17:38:07 2005 +0000 +++ b/src/gtkidle.c Fri Nov 18 03:45:01 2005 +0000 @@ -166,7 +166,7 @@ gaim_account_get_username(account)); /* Mark our accounts "away" using the idleaway status */ - idleaway_name = gaim_prefs_get_string("/core/status/idleaway"); + idleaway_name = gaim_prefs_get_string("/core/savedstatus/idleaway"); saved_status = gaim_savedstatus_find(idleaway_name); if (saved_status) gaim_savedstatus_activate_for_account(saved_status, account); @@ -192,7 +192,7 @@ gaim_account_get_username(account)); /* Return our account to its previous status */ - idleaway_name = gaim_prefs_get_string("/core/status/current"); + idleaway_name = gaim_prefs_get_string("/core/savedstatus/current"); saved_status = gaim_savedstatus_find(idleaway_name); if (saved_status) gaim_savedstatus_activate_for_account(saved_status, account); diff -r 9b06c216e362 -r 355c7acbb61d src/gtkmain.c --- a/src/gtkmain.c Thu Nov 17 17:38:07 2005 +0000 +++ b/src/gtkmain.c Fri Nov 18 03:45:01 2005 +0000 @@ -686,7 +686,6 @@ saved_status = gaim_savedstatus_new(_("Default"), GAIM_STATUS_OFFLINE); else gaim_savedstatus_set_type(saved_status, GAIM_STATUS_OFFLINE); - gaim_prefs_set_string("/core/status/current", _("Default")); gaim_savedstatus_activate(saved_status); } else diff -r 9b06c216e362 -r 355c7acbb61d src/gtkprefs.c --- a/src/gtkprefs.c Thu Nov 17 17:38:07 2005 +0000 +++ b/src/gtkprefs.c Fri Nov 18 03:45:01 2005 +0000 @@ -1702,7 +1702,7 @@ * TODO: Need to allow users to choose a GaimSavedStatus * to use when going idle-away. Or figure out a * better UI for this. Set the preference - * "/core/status/idleaway" to the name of the + * "/core/savedstatus/idleaway" to the name of the * GaimSavedStatus to use. * */ diff -r 9b06c216e362 -r 355c7acbb61d src/gtkstatusbox.c --- a/src/gtkstatusbox.c Thu Nov 17 17:38:07 2005 +0000 +++ b/src/gtkstatusbox.c Fri Nov 18 03:45:01 2005 +0000 @@ -313,7 +313,7 @@ if (status_box->account) return; - current_savedstatus_name = gaim_prefs_get_string("/core/status/current"); + current_savedstatus_name = gaim_prefs_get_string("/core/savedstatus/current"); saved_status = gaim_savedstatus_find(current_savedstatus_name); /* @@ -570,8 +570,8 @@ gtk_gaim_status_box_regenerate(status_box); - /* Monitor changes in the "/core/status/current" preference */ - gaim_prefs_connect_callback(status_box, "/core/status/current", + /* Monitor changes in the "/core/savedstatus/current" preference */ + gaim_prefs_connect_callback(status_box, "/core/savedstatus/current", current_status_pref_changed_cb, status_box); /* TODO: Need to override the destroy method for this object and put the following line in it */ @@ -809,7 +809,7 @@ * "Saved..." then do nothing. Custom statuses are * activated elsewhere, and we update the status_box * accordingly by monitoring the preference - * "/core/status/current" and then calling + * "/core/savedstatus/current" and then calling * update_to_reflect_current_status() */ if ((type < 0) || (type >= GAIM_STATUS_NUM_PRIMITIVES)) @@ -836,7 +836,7 @@ if (!message_changed(message, gaim_status_get_attr_string(status, "message"))) changed = FALSE; } - + if (changed) { if (message) @@ -852,7 +852,7 @@ const char *current = NULL; /* Has the status been really changed? */ - current = gaim_prefs_get_string("/core/status/current"); + current = gaim_prefs_get_string("/core/savedstatus/current"); saved_status = gaim_savedstatus_find(current); if (saved_status && gaim_savedstatus_get_type(saved_status) == type) { @@ -867,7 +867,6 @@ saved_status = gaim_savedstatus_new(_("Default"), type); gaim_savedstatus_set_type(saved_status, type); gaim_savedstatus_set_message(saved_status, message); - gaim_prefs_set_string("/core/status/current", _("Default")); /* Set the status for each account */ gaim_savedstatus_activate(saved_status); diff -r 9b06c216e362 -r 355c7acbb61d src/savedstatuses.c --- a/src/savedstatuses.c Thu Nov 17 17:38:07 2005 +0000 +++ b/src/savedstatuses.c Fri Nov 18 03:45:01 2005 +0000 @@ -621,7 +621,7 @@ g_list_free(accounts); - gaim_prefs_set_string("/core/status/current", + gaim_prefs_set_string("/core/savedstatus/current", gaim_savedstatus_get_title(saved_status)); } @@ -690,6 +690,9 @@ saved_status = gaim_savedstatus_new(_("Default when idle"), GAIM_STATUS_AWAY); gaim_savedstatus_set_message(saved_status, _("I'm not here right now")); } + + gaim_prefs_add_string("/core/savedstatus/current", _("Default")); + gaim_prefs_add_string("/core/savedstatus/idleaway", _("Default when idle")); } void diff -r 9b06c216e362 -r 355c7acbb61d src/status.c --- a/src/status.c Thu Nov 17 17:38:07 2005 +0000 +++ b/src/status.c Fri Nov 18 03:45:01 2005 +0000 @@ -1688,9 +1688,6 @@ gaim_prefs_add_none("/core/status"); gaim_prefs_add_none("/core/status/scores"); - gaim_prefs_add_string("/core/status/current", _("Default")); - gaim_prefs_add_string("/core/status/idleaway", _("Default when idle")); - gaim_prefs_add_int("/core/status/scores/offline", primitive_scores[GAIM_STATUS_OFFLINE]); gaim_prefs_add_int("/core/status/scores/available",