mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
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:
parent
debf08cac0
commit
94d47dc25e
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user