1
0
Fork 0

Make sure all workspaces have a non-empty, non-null name

The change to using gconf_client_all_entries() in commit 2d57b1b4
meant that workspaces without a GConf key for their name were not
getting a name at all. Fix this by doing a post-processing loop
to set workspace names that were not otherwise set.

Alternate to patch from Tomas Frydrych
https://bugzilla.gnome.org/show_bug.cgi?id=613136
This commit is contained in:
Owen W. Taylor 2010-04-12 13:14:46 -04:00
parent debf08cac0
commit 94d47dc25e

View file

@ -2004,6 +2004,8 @@ init_commands (void)
static void
init_workspace_names (void)
{
int i;
#ifdef HAVE_GCONF
GSList *list, *l;
const char *str_val;
@ -2022,14 +2024,14 @@ init_workspace_names (void)
gconf_entry_free (entry);
}
g_slist_free (list);
#else
int i;
#endif /* HAVE_GCONF */
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