[Feature Request] Allow creating subdirectories for directories in preinstalled system path

Bug #1315872 reported by Pasi Lallinaho
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MenuLibre
Fix Released
Wishlist
OmegaPhil

Bug Description

Currently, one can't create a subdirectory for directories in preinstalled system path, eg. Games. Instead of giving an ambiguous message and forcing the user to create a new Games-directory, MenuLibre should allow this by copying the system path directory to ~/.local.

Pasi Lallinaho (knome)
Changed in menulibre:
status: New → Confirmed
Sean Davis (bluesabre)
Changed in menulibre:
importance: Undecided → Low
Sean Davis (bluesabre)
summary: - Allow creating subdirectories for directories in preinstalled system
- path
+ [Feature Request] Allow creating subdirectories for directories in
+ preinstalled system path
Sean Davis (bluesabre)
Changed in menulibre:
importance: Low → Wishlist
Revision history for this message
OmegaPhil (omegaphil) wrote :

This functionality was actually removed on purpose by Sean in commits 6a3559199017408de8658ecbe0265afff77f7ad1 ('Prevent adding submenus to pre-installed system paths.', Sat Mar 1 12:13:41 2014 -0500) and 0a01372ed134b3a5858f82f44de823b130ccb57c ('Do not run xdg-desktop-menu install on known system directories', Sat Mar 1 11:41:49 2014 -0500), although there is no justification given.

I have disabled the checks to prevent adding directories to system directories, and also found that items added in these custom directories need to have explicit Include nodes in the output XML - attached is a test commit that works for me (i.e. there are still some debug comments in there etc).

Is this approach OK?

Revision history for this message
Sean Davis (bluesabre) wrote :

This patch does not seem to work fully for me.

Test Performed:
1. Create a new "Testing" directory under the "Development" directory.
2. Create a new "App" launcher under the "Testing" directory.
3. Check Xfce menu, "App" launcher is under the "Development" directory.
4. Restart Menulibre. "Testing" directory is visible under the "Development" directory, but has no contents. "App" launcher is missing.
5. Create a new "App2" launcher under the "Testing" directory.
6. Check Xfce menu, "App2" launcher is under the "Development" directory.
7. Restart Menulibre. "Testing" directory is visible under the "Development" directory, but has no contents. "App" and "App2 launchers are missing.

OmegaPhil (omegaphil)
Changed in menulibre:
assignee: nobody → OmegaPhil (omegaphil)
Revision history for this message
OmegaPhil (omegaphil) wrote :

OK, looks like when the launcher is created in the custom directory, it takes on the directory's category, which is going to cause problems (since that is a major factor in GMenu organising things I think) - I will investigate.

Revision history for this message
OmegaPhil (omegaphil) wrote :

This patch fixes launcher category determination + detection of a parent custom user directory when deciding whether to force Include the node or not.

I'm able to successfully add a launcher to top level, a normal directory, into a custom user directory at top level and inside a normal directory, etc.

Revision history for this message
OmegaPhil (omegaphil) wrote :

Heres the fix for the error on searching, since it hasn't been reported separately and you're sure to see this/deal with it etc.

Revision history for this message
OmegaPhil (omegaphil) wrote :

v2 of the main patch - the previous version had started to let top-level categories leak into the first launcher of a directory again.

Revision history for this message
Sean Davis (bluesabre) wrote :

The latest version of this patch no longer force-enables the ability to add subdirectories. I added that back in, but noticed that it is no longer possible to move an entry into a lower level subdirectory.

Revision history for this message
OmegaPhil (omegaphil) wrote :

Yes, they are separate patches (rather than one dump of everything) - I'll look into moving into subdirectories now.

Revision history for this message
OmegaPhil (omegaphil) wrote :

Got it - this bug was introduced with my original includes change - there were more hardcoded model indicies that needed incrementing, see attached.

Revision history for this message
Sean Davis (bluesabre) wrote :

These patches resolve this issue fully. I have applied your changes to master.

http://bazaar.launchpad.net/~menulibre-dev/menulibre/master/revision/357

Changed in menulibre:
status: Confirmed → Fix Committed
Sean Davis (bluesabre)
Changed in menulibre:
milestone: none → 2.1.4
Sean Davis (bluesabre)
Changed in menulibre:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.