summaryrefslogtreecommitdiff
path: root/src/core/prefs.c
diff options
context:
space:
mode:
authorThomas Thurman <tthurman@gnome.org>2010-08-03 08:35:08 -0400
committerThomas Thurman <tthurman@gnome.org>2011-01-15 17:49:19 -0500
commit04d5891337bb09f64e51d4be5f5c48b2ea60c547 (patch)
tree7a63d411f2c1d2135d07c89f7c60552e0a56d78b /src/core/prefs.c
parente6964750909bbe8a5c5ca217f1acee2405a566b5 (diff)
downloadmetacity-bug625781.tar.gz
When we're first reading in the workspace names, set any which don't get assigned a name of their own to a default value. Fixes: 625781bug625781
Diffstat (limited to 'src/core/prefs.c')
-rw-r--r--src/core/prefs.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/core/prefs.c b/src/core/prefs.c
index af6e304d..fdedef40 100644
--- a/src/core/prefs.c
+++ b/src/core/prefs.c
@@ -1929,6 +1929,10 @@ init_commands (void)
static void
init_workspace_names (void)
{
+ int i;
+ for (i = 0; i < MAX_REASONABLE_WORKSPACES; i++)
+ workspace_names[i] = NULL;
+
#ifdef HAVE_GCONF
GSList *list, *l;
const char *str_val;
@@ -1947,14 +1951,15 @@ init_workspace_names (void)
gconf_entry_free (entry);
}
g_slist_free (list);
-#else
- int i;
+#endif /* HAVE_GCONF */
+
+ /* initialise any we didn't see */
for (i = 0; i < MAX_REASONABLE_WORKSPACES; i++)
- workspace_names[i] = g_strdup_printf (_("Workspace %d"), i + 1);
+ if (workspace_names[i]==NULL)
+ workspace_names[i] = g_strdup_printf (_("Workspace %d"), i + 1);
meta_topic (META_DEBUG_PREFS,
"Initialized workspace names\n");
-#endif /* HAVE_GCONF */
}
static gboolean