After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 613136 - remove over-restrictive assert from meta_prefs_get_workspace_name()
remove over-restrictive assert from meta_prefs_get_workspace_name()
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2010-03-17 10:59 UTC by Tomas Frydrych
Modified: 2010-04-13 12:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch that removes assert (931 bytes, patch)
2010-03-17 10:59 UTC, Tomas Frydrych
none Details | Review
Make sure all workspaces have a non-empty, non-null name (1.44 KB, patch)
2010-04-12 17:17 UTC, Owen Taylor
committed Details | Review

Description Tomas Frydrych 2010-03-17 10:59:06 UTC
Created attachment 156349 [details] [review]
patch that removes assert

The initial value of the workspace_names array are NULL unless the gconf
key exists; the absence of a preference key is not a good enough reason to
abort (e.g., Moblin ships with a very minimal gconf key set).
Comment 1 Owen Taylor 2010-04-12 17:14:57 UTC
Review of attachment 156349 [details] [review]:

Problem is real, but fix doesn't look right to me - we shouldn't just return NULL there.

The current situation is a regression from:

 http://git.gnome.org/browse/mutter/commit?id=2d57b1b4

Prior to that commit all values in the workspace_names array would either have values set by the user, or Workspace %d. After the commit, those not in GConf would have empty values. (This applies to workspaces 17-36 even with the standard GConf schemas)

I'll attach an alternate patch.
Comment 2 Owen Taylor 2010-04-12 17:17:31 UTC
Created attachment 158507 [details] [review]
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 Frydrich
Comment 3 Colin Walters 2010-04-12 18:23:15 UTC
Review of attachment 158507 [details] [review]:

This looks OK.
Comment 4 Tomas Frydrych 2010-04-13 07:17:48 UTC
(In reply to comment #2)
> Alternate to patch from Tomas Frydrich
                                     ^
That should be a 'y' please ;-), but yep, the alternate patch is fine.
Comment 5 Owen Taylor 2010-04-13 12:53:35 UTC
Fixed mispelling prior to pushing. Sorry about that!

Attachment 158507 [details] pushed as 94d47dc - Make sure all workspaces have a non-empty, non-null name