After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 325528 - Bloated nautilus contextual menu
Bloated nautilus contextual menu
Status: RESOLVED FIXED
Product: filemanager-actions
Classification: Other
Component: general
0.99
Other All
: Normal major
: ---
Assigned To: Nautilus-actions Maintainer(s)
Nautilus-actions Maintainer(s)
Depends on: 314579
Blocks:
 
 
Reported: 2006-01-02 16:14 UTC by Frederic Ruaudel
Modified: 2009-10-20 15:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Incomplete patch (11.24 KB, patch)
2008-02-02 22:42 UTC, Oumar Aziz OUATTARA
none Details | Review

Description Frederic Ruaudel 2006-01-02 16:14:27 UTC
The Nautilus popup menu can become bloated.

Other information:
This problem has been first submited on gnomefiles.org comments[1] :

----
 Context menu bloat
 By Eugenia (IP: ---.hsd1.ca.comcast.net) - Posted on 2005-09-08 12:52:10
--
Please do not place the actions on the root of the nautilus context menu. 
This is incosistent with the menu each time, and it adds up bloat. The 
Actions should have their own sub-menu IMHO.
----

----
 Re: Context menu bloat
 By GrumZ (IP: ---.embl-grenoble.fr) - Posted on 2005-09-08 14:34:02
---
Yes, you're right, it can became quickly bloated. If we look at the HIG, 
it say not to add more than 10 items in a popup menu but it also advices 
not putting submenu. For menu in general, it advices not creating a submenu 
with less than 3 items. So as a compromise, I can try to create a submenu 
when there are more than three configured actions for a selection. What do 
you think ?
----

----
 RE: Context menu bloat
 By Eugenia (IP: ---.hsd1.ca.comcast.net) - Posted on 2005-09-08 14:35:44
---
No, this is even worse!!! You see, having some actions somtimes on the root 
and sometimes on submenu is really bad usability as it is not consistent. 
IMHO, it should always be a submenu, in this particular case.
----

Don't really know what to think about this !? :-/

[1] http://www.gnomefiles.org/comment.php?soft_id=1057#3683
Comment 1 Frederic Ruaudel 2006-01-02 16:15:11 UTC
Note: This report has been initially submitted on the old nautilus-actions bug
tracker : 

http://www.grumz.net/node/95
Comment 2 Frederic Ruaudel 2006-01-02 16:16:01 UTC
Another comment on Gnomefiles.org from one of the nautilus maintainers postponed the resolution of this issue for at least 6 months :

----
 Nautilus submenu support
 By Christian Neumair (IP: ---.dip0.t-ipconnect.de) - Posted on 2005-09-08 21:02:38
---
Sorry to disappoint you guys, but nautilus extensions (like nautilus-action) don't have 
any chance to use submenus (yet). It is scheduled [1] for Nautilus 2.14, though.

[1] http://bugzilla.gnome.org/show_bug.cgi?id=314579
----
Comment 3 Frederic Ruaudel 2006-01-02 16:18:12 UTC
If I may voice my opinion, I am cardinally opposed to Eugenias' suggestion. Nautilus-Actions is a power-user tool and as such should not force something on the user.

What would be best, when subfolders finally become available to extensions, is to let the user build exactly the hierarchy she wishes. She could put all actions into the root menu, create subfolders for the actions or any combination of these. Basically a right-click menu editor.

And if that is possible, let user disable built-in nautilus menu commands as well. I'll give you an example - I never use the trashcan and have activated the Delete option in the menu. Now I would like to get rid of the Move to Trash option.

In general - a power-user tool should have some nice defaults, but give as many options as possible.

Note: Comment originally posted by Anonymous : 

http://www.grumz.net/node/95#comment-43
Comment 4 Frederic Ruaudel 2006-01-02 16:19:53 UTC
Yes, it is a good idea. I thought about this possibility too.

For the built-in functions, I don't think that I can interract with them from an extension. If it is effectively not possible (must be verified first), maybe it would be a good idea to report a feature request on nautilus' Bugzilla.

BTW, all opinions are welcome until nautilus 2.14 release.
Comment 5 Frederic Ruaudel 2006-01-02 16:21:07 UTC
> BTW, all opinions are welcome until nautilus 2.14 release.

I'm a little lazy, can you give a link where I can file a feature request for this (allow messing with menu items from extensions)?

:)

Note: Comment originally posted by Anonymous : 

http://www.grumz.net/node/95#comment-46
Comment 6 Frederic Ruaudel 2006-01-02 16:21:56 UTC
Sorry, I won't because first we have to check if it is possible or not. I'm not sure it is or not, and last time I asked somebody to fill a bug on nautilus bugzilla, the problem was in my code.

So please don't fill any request on nautilus bugzilla unless somebody has checked that it is not already possible.

thanks in advance
Comment 7 Frederic Ruaudel 2006-01-02 16:22:31 UTC
A quick note about this problem. In fact, the 'bloat problem' is not as critical as for example with G-Scripts (AKA nautilus scripts). As they appear in a contextual manner, you can have a hundred configs without having more than three or four items per selection. If you set up good conditions for your configs, you should not have too much bloating in fact.
Anyway, as soon as nautilus will give the means to create submenus, we will implement them.
Comment 8 Ariel 2007-02-25 02:54:37 UTC
I think the user should decide if she needs to have de Action rigth in the context menu, or a submenu, think of the following (which i actually have)

      Send via Bluetooth
      Send via Irda
      Send by email
      Send to Trash
      Send to CD Burner Folder
      Send to GmailDrive
      Send to PDA sync folder
      Send to Backup Hard Disk
      Send to USB Drive

Whe i select a PS file i have additionaly of the above:
      Convert to PDF
      Convert to DVI
      Convert to PS.GZ
      Convert to DjVu

This has already cluttered my menu, if i had the option to create subfolders i would group all of them into two subfolders named just "Send to" and "Convert to".

I think Frederic Ruaudel is right: "Nautilus-Actions is a power-user tool and as such should not force something on the user". So give the user the freedom to decide if she wants to group into submenus or if she wants to clutter the context menu. It all up to the users decition, let the users choose.

This will get really cool if i had the "Send to" submenu and when i opened that submenu i got all my actions easily recongizable with an icon, bluetooth will have his blue antenna, gmaildrive the G logo, etc. 

I think Nautilus Actions is one of the coolest features Gnome has ever had, this kind of thing will cause envy to my WinFriends and even my MacFriends. 

This is really fantastic.

Comment 9 Oumar Aziz OUATTARA 2008-02-01 18:22:48 UTC
hi,

I am trying to define how to implement this.

I propose, considering having a new optional entry in an action that would be called "parent". If this entry doesn't exist, we put the action at the root, otherwise we create the "parent" entry in nautilus context menu and append the action in the submenu.

How about it ?
 
Comment 10 Oumar Aziz OUATTARA 2008-02-02 22:42:37 UTC
Created attachment 104283 [details] [review]
Incomplete patch

Hello,
I have created this patch using the svn trunc source code.
I didn't update nact, so you should use gconf-editor to add a "parent" key in the action with the value of the parent menu.

But the patch is incomplete. I am not a C++ developer so I didn't manage well the menu system in nautilus-actions.c. 
So I pass a toplevel menu list in the nautilus_actions_create_menu_item() function and I want to :
- first check if the parent menu is in the list and use it to append the new menu
- or create a parent menu and append it to the toplevel list.
- finally return either the menu or the parent if the menu is not toplevel

So TODO :
- check if I did well the job explained above
- in nautilus_actions_get_file_items append the return result only if it doesn't exist in the list

Note that this mod will only work with the patch provided in http://bugzilla.gnome.org/show_bug.cgi?id=513854,
Ubuntu users can use the wattazoum PPA (https://edge.launchpad.net/~wattazoum/+archive) to have a nautilus package that apply that patch

I really love nautilus actions and I understand that this software requires a lot of work. I really think that this feature is a must. so please, take time to complete, fix, test and release this patch.

Thank you for your work
Comment 11 Pierre Wieser 2009-10-20 15:24:27 UTC
Hi all

I close this point as it is fixed in master, which is to be released on next monday. In this version, you will be able to define menus, and to freely reorder the items inside it ;-)

Regards
Pierre