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 771469 - Right click menu active for empty items on list view
Right click menu active for empty items on list view
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: general
3.21.x
Other Linux
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-09-15 06:36 UTC by Mohammed Sadiq
Modified: 2016-09-20 14:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
files-view: don't allow compress if no selection (1.37 KB, patch)
2016-09-15 11:51 UTC, Carlos Soriano
committed Details | Review

Description Mohammed Sadiq 2016-09-15 06:36:15 UTC
Right click menu active for empty items on list view.


How to reproduce:

1. Enable List view
2. Application menu -> Preferences -> check 'Allow folders to be expanded'
3. Expand some empty folder -> Select item labeled 'Empty' -> Right click

Result: 
The menu is active, and even the 'compress' item can be clicked to compress, which bring up the compress dialog, though does nothing.

Expected result:
Probably, right click should have no action there.
Comment 1 Carlos Soriano 2016-09-15 11:51:57 UTC
Created attachment 335622 [details] [review]
files-view: don't allow compress if no selection

We weren't checking if there is some file selected to enable/disable
the compress action, which was causing the context menu item be always
displayed if we clicked an element that is not a file.
As odd as it sounds, this happens when allow to expand folders in list
view, since the "empty" element is selectable but not a file.
To fix that, check whether we have a file selected or not.
Comment 2 Carlos Soriano 2016-09-20 14:45:57 UTC
Attachment 335622 [details] pushed as 858dee7 - files-view: don't allow compress if no selection