GNOME Bugzilla – Bug 653440
Support XDG_CURRENT_DESKTOP
Last modified: 2011-08-12 08:45:55 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.
Thanks for the patch. We need to merge the gobject-review branch first, and I'll take a look at merging this afterwards.
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.
(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.
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.
Created attachment 192821 [details] [review] Use * as disable-filter trigger
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 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.
Rewrote the patch, and pushed.