Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly handle OnlyShowIn and NotShowIn. #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DidierSpaier
Copy link

OnlyShowIn and NotShowIn relate to a "real" desktop, not a window manager.

For instance if the DE is LXDE and OnlyShowIn=LXDE; the desktop entry
should be included it the menu, even if a WM like FVWM is used.

OnlyShowIn and NotShowIn relate to a "real" desktop, not a window manager.

For instance if the DE is LXDE and OnlyShowIn=LXDE; the desktop entry
should be included it the menu, even if a WM like FVWM is used.
@gapan
Copy link
Owner

gapan commented Mar 31, 2017

I'm not sure about this. If you're using a DE, shouldn't you be also using that DE's menu system?

@DidierSpaier
Copy link
Author

DidierSpaier commented Mar 31, 2017 via email

@DidierSpaier
Copy link
Author

DidierSpaier commented Mar 31, 2017

I forgot that I couldn't upload the pics here. See them there:
http://slint.fr/testing/LXDE_with_FVWM1.png
http://slint.fr/testing/LXDE_with_FVWM2.png

@gapan
Copy link
Owner

gapan commented May 4, 2018

Revisiting this, I'm still not sure about it.

What if you are currently inside a DE, but want to create a menu for a WM, that you will use when you exit the DE? This way, it will include all menu entries that were specific to the DE. It makes the output dependent on the currently running environment and I'm not comfortable with that.

@DidierSpaier
Copy link
Author

DidierSpaier commented May 4, 2018

You wrote:
"What if you are currently inside a DE, but want to create a menu for a WM, that you will use when you exit the DE?"
But why would I do that? In Slint at least, all menus are refreshed when starting the DE, whatever it be.

In case of OnlyShowIn most excluded entries wouldn't work or stand if included in the other DE anyway, as they are mostly settings specific to a given DE. So, why include in a menu entries that the user will think are "broken"?

As an example I attach the output of" grep -r OnlyShowIn|sort" typed from /usr/share/applications in a Slint system.

OnlyShowIn.txt

PS the KDE entries you see in the list are because I don't want to start akonadi & such in other DEs than KDE itself, thus exclude all PIM appas outside from KDE.

@gapan
Copy link
Owner

gapan commented May 5, 2018

But why would I do that?

I don't know about you, but I do it all the time!

In case of OnlyShowIn most excluded entries wouldn't work or stand if included in the other DE anyway, as they are mostly settings specific to a given DE. So, why include in a menu entries that the user will think are "broken"?

That's exactly my point! If, for example, I am in MATE and want to create a menu for JWM, I don't want OnlyShowIn=MATE entries in my menu.

Also, if I'm in MATE and want to create a menu for JWM, I would definitely want entries with NotShowIn=MATE included.

@DidierSpaier
Copy link
Author

Well, I appears I had forgotten the specific context in which I emitted this pull request and failed to read again the proposed patch before providing my recent answers, my bad.

Actually the issue I initially mentioned only occurs if following conditions are met:

  1. XDG_CURRENT_DESKTOP is set to one of the desktops mentioned in an OnlyShowIn or NotShowIn conditions of a .desktop file
  2. The DE allows to set as desktop menu (raised with a right or left click in on the desktop) the menu associated with the window manager .

Practically in Slint these conditions are met for LXDE only. In this case, without applying the patch I miss in the menu provided by xdgmenumaker all entries with "OnlyShowIn=LXDE":
libfm-pref-apps.desktop:OnlyShowIn=LXDE;
lxappearance.desktop:OnlyShowIn=LXDE;
lxrandr.desktop:OnlyShowIn=LXDE;
lxsession-default-apps.desktop:OnlyShowIn=LXDE;
lxsession-edit.desktop:OnlyShowIn=LXDE;
lxtask.desktop:OnlyShowIn=LXDE;
and this regardless of the window manager used. Among those shipped in Slint and built with xdgmenumaker this can be blackbox, fluxbox, fbwm (the default), twm or windowmaker.

Granted these missing entries are not the end of the world as the can be accessed from the panel's menu anyway, so this pull request is not so important after all. I just wanted in this post to clarify a bit its rationale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants