Conversation
14be7eb to
5d12935
Compare
4b3f7f1 to
c2bbfe7
Compare
b8d280f to
bba4748
Compare
|
I don't know how useful 'NoDisplay' is here - that's usually reserved for content handlers (Open with... in nemo) or autostart programs (nemo-desktop uses this) - things you don't want to appear in the menu. So it's basically a 'hide' button for the menu - and if you're not using the entry as a content handler and it's not autostart, you may as well not have it. I think it should probably be left to advanced users, it'll just confuse people who are customizing their menu. I wonder if those category limitations mentioned are caused by our customizations in our default menu file. How will this affect people who already have made customizations? I'd like @clefebvre's input on this (and the UI changes in the desktop-editor). I like the idea of just relying on desktop files here. claude review: |
I've no objection to this being removed, however, I can think of a couple of reasons some people might find it useful: To show an item hidden by default, e.g. cinnamon-menu-editor itself (although tbf, that's the only one I've come across), and to hide items e.g. if something is installed as a dependency of another package but you know you'll never use it. e.g. VSCodium (manjaro) installs two icons, "VSCodium" and "VSCodium (Wayland)", user may want to hide one of them if they only use x11 or wayland. LibreOffice, they may want to show LibreOffice Writer but not LibreOffice Impress. Some utilities e.g. "Avahi Zeroconf Browser" (Manjaro) is installed as a dependency of many packages but some users may never use it and want to hide it.
Yes, e.g. the "Education" category contains the rule:
It won't affect them initially, their existing customizations will continue to take effect. That changes when they edit the properties of an already customized app. In cinnamon-desktop-editor, the selected categories will reflect those in the .desktop "Categories=" key, rather than their previous customisations. If they then click "OK", their selected categories (in the cinnamon-desktop-editor dialog) will be written to the .desktop file and all <Include> and <Exclude> rules relating to that particular app will be removed from the .menu file. So basically, they'll have to ensure that they select the categories they want the app to appear in before clicking "OK". While not ideal, this should be somewhat intuitive as they may see that their previously customised category selections appear to have been reset and therefore "fix" them. Preselecting the categories based on the existing <Include> and <Exclude> rules in the menu xml file would be fairly complicated I think. Note: I also added a command line option for cinnamon-desktop-editor, |
|
Fixed all Claude suggestions except number 2. If Added atomic save in menu editor when saving user's Added feedback when selecting mutually exclusive categories in cinnamon-desktop-editor, e.g. when toggling on "Education", "Science" will automatically toggle off and vice versa. Added error dialog to cinnamon-desktop-editor when there's a write error. |
349bbdd to
d0f32de
Compare
cinnamon-menu-editor: Remove item cut/copy/paste from menu editor and add menu category selection to desktop editor instead so that instead of the menu editor adding <Include> and <Exclude> rules to the .menu file when launchers are added to/remove from categories, the desktop editor adds/removes categories to the Categories= field in the .desktop file. Remove code related to separators and menu layout/ordering as these are not used in cinnamon applets. Add "Restore Item" button and remove "Close" button. Handle flatpak apps properly. Use atomic save for .menu file Update some deprecated code. cinnamon-desktop editor: Add menu category selection for launcher editor. Add "Hide (NoDisplay)" toggle for launcher editor and directory editor. Remove unnecessary <Include> and <Exclude> rules from the .menu file added in previous versions of menu-editor when a .desktop file is updated. Show a warning infobar when editing a local file when no "restore" to system is available. Don't create a new .desktop file in ~/.local/share/applications if original is in a subdirectory of ~/.local/share/applications as it would be overriden anyway and edit original instead Add command line option --show-categories so that unnecessary complexity can be avoided when launched from the app menu. Add error dialog for write errors config.py: delete unused constants cinnamon-applications.menu: simplify logic in "Administration" menu remove unused "System" menu
d0f32de to
0e0cf82
Compare
| action=Gtk.FileChooserAction.OPEN | ||
| ) | ||
| chooser.add_buttons( | ||
| Gtk.STOCK_CANCEL, Gtk.ResponseType.REJECT, |
There was a problem hiding this comment.
Probably shouldn't use Gtk.STOCK_* in new code.
cinnamon-menu-editor:
Remove item cut/copy/paste from menu editor and add menu category selection to desktop editor instead so that instead of the menu editor adding <Include> and <Exclude> rules to the .menu file when launchers are added to/removed from categories, the desktop editor adds/removes categories to the Categories= field in the .desktop file.
Remove code related to separators and menu layout/ordering as these are not used in cinnamon applets.
Add "Restore Item" button and remove "Close" button.
Handle flatpak apps properly.
cinnamon-desktop editor:
Add menu category selection for launcher editor.
Add "Hide (NoDisplay)" toggle for launcher editor and directory editor.
Remove unnecessary <Include> and <Exclude> rules from the .menu file added in previous versions of menu-editor when a .desktop file is updated.
Show a warning infobar when editing a local file when no "restore" to system is available.
Don't create a new .desktop file in ~/.local/share/applications if original is in a subdirectory of ~/.local/share/applications as it would be overriden anyway and edit original instead.
Add command line option --show-categories so that unnecessary complexity can be avoided when launched from the app menu.
config.py:
delete unused constants
cinnamon-applications.menu:
simplify logic in "Administration" menu
remove unused "System" menu
Fixes #12890, #11998, #10139, #10581, #10140, #10141, #9293, #7961
Replaces: #13346
Known issues:
Using Categories key in .desktop file instead of <Include> and <Exclude> tags in the .menu xml means that placing an app in some combinations of categories is not possible. An app can't be in Education and Science at the same time, in Universal Access and Preferences at the same time, or in Accessories or Preferences and Administration at the same time. This was not previously the case.
While Wine apps can be added to other categories, they cannot be removed from the Wine category as Wine creates its own .menu file with <Include>'s. This was very likely previously also the case.
Apps installed locally have no "Restore" (to system default) option once edited. This was previously also the case. This includes Wine apps, Steam games, Chrome's PWAs. I have added a warning banner to the editor when the user is editing a locally installed .desktop or .directory file with no restore to system available.