lxqt-panel icon indicating copy to clipboard operation
lxqt-panel copied to clipboard

Fancy Menu: misbehavior if an favorite app is disinstalled.

Open stefonarch opened this issue 1 year ago • 9 comments

Removing an application which was previously added to the favorites menu triggers 2 errors:

  • nothing happens if clicked
  • Right click displays "Add to favorites" but in fact it will remove it

screen_area_mar_20:11:06_

Expected Behavior

An error should be displayed if launched

Current Behavior

It gets removed if panel is restarted.

See above

Steps to Reproduce (for bugs)
  1. Add an application to favorites
  2. Disinstall it
  3. Click the item, right click the item in the menu/favorites
System Information
  • LXQt Version: git

stefonarch avatar Feb 20 '24 19:02 stefonarch

Didn't test immediately panel restart. So it's not a big thing.

stefonarch avatar Feb 20 '24 19:02 stefonarch

We have telepathy: today I was going to test exactly the same thing.

Why did you close it? If an app is removed, it's logical to expect that its corresponding item under Favorites should be removed the next time Fancy Menu is shown.

tsujan avatar Feb 20 '24 19:02 tsujan

I stumpled by chance open that, in my debian testing VM I had 2 pcmanfm, the gtk one and ours, so I removed it and saw it.

stefonarch avatar Feb 20 '24 20:02 stefonarch

That doesn't rule out telepathy ;)

tsujan avatar Feb 20 '24 20:02 tsujan

We could detect .desktop file being deleted with a dir watcher. And also use XdgDesktopFile::tryExec() for some rare case where executable is removed but desktop file is kept and remove items returning false (might have some side effects if keeping desktop file was intended behavior). Is there some hook like xdg updating mime cache which will inform desktop files changed?

Also please tag me in things related to FancyMenu because I really like following it's baby steps. Sometimes I miss these discussions.

gfgit avatar Feb 22 '24 12:02 gfgit

Also please tag me in things related to FancyMenu because I really like following it's baby steps. Sometimes I miss these discussions.

You can "watch" lxqt-panel and other repos of interest, to miss nothing.

stefonarch avatar Feb 22 '24 12:02 stefonarch

We could detect .desktop file being deleted with a dir watcher.

I haven't looked into it yet, but I don't think watching desktop entries is the solution, because they can be in ~/.local/share/applications and persist after uninstalling apps.

tsujan avatar Feb 22 '24 12:02 tsujan

Perhaps the most resource-friendly approach is tell the user about the absence of their executables (e.g., by showing a message when he tries to activate them) and let him to remove them. Just a suggestion....

tsujan avatar Feb 22 '24 12:02 tsujan

You can "watch" lxqt-panel and other repos of interest, to miss nothing.

Thanks did't think of that.

Perhaps the most resource-friendly approach is tell the user about the absence of their executables (e.g., by showing a message when he tries to activate them) and let him to remove them. Just a suggestion....

I like it. Also I don't expect this would happen frequently.

gfgit avatar Feb 22 '24 13:02 gfgit