mate-desktop / mate-menus

Library for the Desktop Menu freedesktop.org specification
https://mate-desktop.org
GNU General Public License v2.0
26 stars 22 forks source link

Wine applications not being added to Wine sub-menu #2

Closed jelabarre59 closed 7 years ago

jelabarre59 commented 12 years ago

Under the old Gnome2 system, as well as various other desktops, whenever an application was installed through Wine, it would be added to it's appropriate sub-menu under the Wine menu entry in the Gnome menu. Something has changed in the Mate fork of this, since now nothing is getting added. To even get the Wine menu at all I had to edit /etc/xdg/menus/mate-applications.menu to add the "MergeDir" section. But even after doing that, subsequent Wine application installs are not creating the appropriate sub-menus.

As an example: once you have made the modification in /etc/xdg/menus/mate-applications.menu to see the Wine menu, try installing IrfanView (a quick and non-intrusive install to try) using Winetricks with the command "winetricks irfanview", which will run the appropriate steps needed. (you may want to grab the latest development build at https://code.google.com/p/winetricks/source/checkout ). Once you've run this, it will create the desktop entries (if you have checked the options to do so), will put "IrfavView - Thumbnails" in the "Other" menu, but does not create the IrfanView submenu under the Wine menu, and does not create an entry for IrfanView anyplace in the menus.

Expected behavior is that it should create sub-menus under the Wine menu (as had happened under other desktop shells/environments), or add it directly to the Wine menu if the application in question would create it's icon as a top-level item.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/2954106-wine-applications-not-being-added-to-wine-sub-menu?utm_campaign=plugin&utm_content=tracker%2F1587698&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1587698&utm_medium=issues&utm_source=github).
mahiuchun commented 11 years ago

Same here, Ubuntu 12.04

infirit commented 11 years ago

Looks like https://github.com/mate-desktop/mate-menus/pull/6 will solve this issue.

DrReD commented 10 years ago

the problem happens because mate-menus still ignores the following xdg-specified directory in the user home dir: ~/.config/menus/applications-merged ()

A workaround is to: cd ~/.config/menus/ ; ln -s applications-merged mate-applications-merged

As for the fix, I suppose it should be similar to the one done recently to make it see the system-wide xdg applications-merged directory.

raveit65 commented 10 years ago

For getting this work we need to adopt this code from cinnamon https://github.com/linuxmint/Cinnamon/commit/e41e6480d032230864d7faf5a925c9d0b7814bf6 This would create 'mate-applications-merged' in xdg directory and if mate-session is starting the first time also in ~/.config/menus/ . The question is where we add this code? mate-menu or mate-session? I'm willing to prepare a PR but i don't know which package and file in code is the right place. Here i need your help Stefano.

besser82 commented 10 years ago

Hello toghether!

I'm another Fedora Packager / Developer like @NiceandGently. He asked me on this issue. For me POV the cinnamon-code mentioned would do the trick, although this is a vile hack. Placing a symlink in $HOME/.config is less problematic than introducing some scratch-written code which additionally parses applications-merged. In my opinion this sniplet should be added into mate-menu. That seems to be more semanticly correct, since the issue discussed here affects mate-menu and not the session itself.

Cheers, besser82

rezso commented 9 years ago

@NiceandGently: the best way (imho) if we add the Cinnamon's setup_merge_dir_symlink() fuction to matemenu-tree.c file, and call this function in resolve_default_merge_dirs().

joakim-tjernlund commented 7 years ago

Is this still a problem?

raveit65 commented 7 years ago

@NiceandGently: the best way (imho) if we add the Cinnamon's setup_merge_dir_symlink() fuction to matemenu-tree.c file, and call this function in resolve_default_merge_dirs().

@rezso Any chance of a pull request for this?

rezso commented 7 years ago

@raveit65 https://github.com/mate-desktop/mate-menus/pull/55

raveit65 commented 7 years ago

Anyone around here who use wine and can test if this PR works? Maybe on gentoo? @joakim-tjernlund

joakim-tjernlund commented 7 years ago

Mail me a patch for MATE 1.18 and I will test it

raveit65 commented 7 years ago

mail ????, simply add .patch to PR link in browsers :-) https://patch-diff.githubusercontent.com/raw/mate-desktop/mate-menus/pull/55.patch

joakim-tjernlund commented 7 years ago

Ahh, how I have looked for that, why do they not have a button for that :( Can you do something similar on any commit already in the repo?

raveit65 commented 7 years ago

yes, it works on all commits on github .diff or .patch

joakim-tjernlund commented 7 years ago

Good :)

Anyhow, patch installed and after logout/login I see:

cd ~.config/menus/
ls -ld *merged
drwx------ 2 jocke users 41 Jun 20 11:56 applications-merged/
lrwxrwxrwx 1 jocke users 45 Aug 16 17:38 mate-applications-merged -> /home/jocke/.config/menus/applications-merged/

So it works although I would have expect a relative symlink

joakim-tjernlund commented 7 years ago

Could we have this in 1.18 too? Also, it would be nice if you could look out MATE 1.18 branches and release accumulated commits

raveit65 commented 7 years ago

I did already release atril-1.18.1 yesterday. And yes, i will push that to 1.18 branch + a new point release for mate-menus. And wine menu entries are there?

joakim-tjernlund commented 7 years ago

I wonder, should MATE run xdg-user-dirs-update automatically too?

joakim-tjernlund commented 7 years ago

I don't you Wine, sorry. I just stumbled over a Gentoo bug that pointed to this bug so I wanted to know if this was fixed.

raveit65 commented 7 years ago

I have this in autostart here

[rave@mother ~]$ cat /home/rave/.config/autostart/user-dirs-update-gtk.desktop 
[Desktop Entry]
Encoding=UTF-8
Exec=xdg-user-dirs-gtk-update
Name=User folders update

Install by

[root@mother rave]# dnf provides /etc/xdg/autostart/user-dirs-update-gtk.desktop
Letzte Prüfung auf abgelaufene Metadaten: vor 0:04:06 am Mi 16 Aug 2017 17:53:07 CEST.
xdg-user-dirs-gtk-0.10-10.fc26.x86_64 : Gnome integration of special directories
Quelle      : @System
joakim-tjernlund commented 7 years ago

That is xdg-user-dirs-gtk-update, not xdg-user-dirs-update, which I think is different

Gentoo has some funky xinitrc.d file:

cat 10-user-dirs-update-mate
#!/bin/sh

# Create various XDG directories, and write ~/.config/user-dirs.dirs, etc.
# That file is read by glib to get XDG_PICTURES_DIR, etc

if [ "$DESKTOP_SESSION" = "mate" ]; then
    if type xdg-user-dirs-update >/dev/null 2>&1; then
        xdg-user-dirs-update
    fi
fi

I wonder if that should be inside MATE instead.

BTW, would be great if you could release a new mate-themes too, I want to see if yelp scroll fix will help Evolution too, the horizontal scrollbar if not drawn there either.

rezso commented 7 years ago

@raveit65 what do you think, this condition is needed? https://github.com/rezso/mate-menus/commit/16f58f797ddeebb0c5a1f701034b8838a927cea2

raveit65 commented 7 years ago

Let's hear what package maintainer thinks? @XRevan86 Can you handle this PR please?

rezso commented 7 years ago

Okay, after installing Zuma's revenge with wine:

rezso@papi:~/.config$ ls -1 -R ~/.config/menus /home/rezso/.config/menus: applications-merged mate-applications-merged

/home/rezso/.config/menus/applications-merged: 'wine-Programs-PopCap Games-Zuma'\''s Revenge!-Play Zuma'\''s Revenge!.menu' 'wine-Programs-PopCap Games-Zuma'\''s Revenge!-Uninstall Zuma'\''s Revenge!.menu' 'wine-Programs-PopCap Games-Zuma'\''s Revenge!-View Readme.menu' 'wine-Programs-PopCap Games-Zuma'\''s Revenge!-Visit PopCap.com.menu' xdg-desktop-menu-dummy.menu

raveit65 commented 7 years ago

merged https://github.com/mate-desktop/mate-menus/commit/923a0d96b4de690e48e1ebd2efe9ff544cc7b254