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 653440 - Support XDG_CURRENT_DESKTOP
Support XDG_CURRENT_DESKTOP
Status: RESOLVED FIXED
Product: gnome-menus
Classification: Core
Component: libgnome-menu
3.0.x
Other Linux
: Normal enhancement
: ---
Assigned To: gnome-menus dummy account
gnome-menus dummy account
Depends on:
Blocks:
 
 
Reported: 2011-06-26 18:44 UTC by Nick Schermer
Modified: 2011-08-12 08:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Support XDG_CURRENT_DESKTOP environ (1.76 KB, patch)
2011-06-26 18:44 UTC, Nick Schermer
none Details | Review
Use * as disable-filter trigger (1.78 KB, patch)
2011-07-28 16:21 UTC, Michael Terry
none Details | Review
Use * as disable-filter trigger (1.79 KB, patch)
2011-07-28 16:23 UTC, Michael Terry
reviewed Details | Review

Description Nick Schermer 2011-06-26 18:44:19 UTC
Created attachment 190706 [details] [review]
Support XDG_CURRENT_DESKTOP environ

It would be nice if the menu would support other desktops then gnome. The attached patch implements this with the XDG_CURRENT_DESKTOP env var.

This allows (the reason I wrote the patch) Xfce to have full menu editing capabilities with Alacarte.

The patch could be a bit nicer, but it tried to keep the changes minimal for good readability.
Comment 1 Vincent Untz 2011-06-27 08:26:23 UTC
Thanks for the patch. We need to merge the gobject-review branch first, and I'll take a look at merging this afterwards.
Comment 2 Michael Terry 2011-07-28 16:07:48 UTC
BTW, this patch treats the empty string the same way it's treated in XFCE, which is to turn off filtering.

Which isn't so bad, but it's common to treat unset variables and empty-string variables the same.

I proposed the value "XDG_CURRENT_DESKTOP=*" to mean "turn off filtering" in a recent thread on xdg-list.  (That suggestion didn't get any feedback, but I still think it makes sense.)

Not a big deal, just a thought.
Comment 3 Vincent Untz 2011-07-28 16:13:58 UTC
(In reply to comment #2)
> BTW, this patch treats the empty string the same way it's treated in XFCE,
> which is to turn off filtering.
> 
> Which isn't so bad, but it's common to treat unset variables and empty-string
> variables the same.
> 
> I proposed the value "XDG_CURRENT_DESKTOP=*" to mean "turn off filtering" in a
> recent thread on xdg-list.  (That suggestion didn't get any feedback, but I
> still think it makes sense.)

Agree with your proposal.
Comment 4 Michael Terry 2011-07-28 16:21:31 UTC
Created attachment 192820 [details] [review]
Use * as disable-filter trigger

Awesome, here's an updated patch then.

I also removed the G_LIKELY part because ideally bug 655369 would make this key more likely than not to be set.
Comment 5 Michael Terry 2011-07-28 16:23:19 UTC
Created attachment 192821 [details] [review]
Use * as disable-filter trigger
Comment 6 Michael Terry 2011-07-28 16:24:12 UTC
Sorry, enter too fast just then and didn't enter a comment with this third patch.  This third patch updates the comments around the new code, which I forgot to update in my second patch.
Comment 7 Vincent Untz 2011-08-12 08:45:38 UTC
Comment on attachment 192821 [details] [review]
Use * as disable-filter trigger

Patch needs to be rewritten as code completely changed in git. I've done that.
Comment 8 Vincent Untz 2011-08-12 08:45:55 UTC
Rewrote the patch, and pushed.