Repository navigation
Conversation
…se button When the new path-selection-enabled preference is on, pressing the right mouse button on an empty area of an icon view and dragging draws a path. Every icon the path enters is toggled: the first pass selects it, the next pass deselects it, and so on. The path is sampled in small steps so fast strokes cannot skip icons. A right-click on an icon, or a right-click without dragging, behaves as before. The preference is off by default.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
icon-view: Add optional freeform (brush) selection with the right mouse button
What
Adds an opt-in way to select many icons with a single stroke. When the new
org.nemo.preferences path-selection-enabledkey is true, pressing the rightmouse button on an empty area of an icon view (or the desktop) and dragging
draws a path, and every icon the path enters is toggled.
Behaviour
behaves exactly as before, including right-button drag and drop.
Toggling happens when the path enters an icon, with a small exit margin so
hand jitter on an icon's edge does not toggle it twice.
Implementation
nemo-icon-container.c: newnemo_icon_container_path_select_begin/move/end()and
nemo_icon_container_is_point_on_icon(). Hit testing reusesnemo_icon_canvas_item_hit_test_rectangle()like the rubberband, and a newwas_inside_pathbit inNemoIcontracks which icons the stroke is inside.nemo-icon-view.c: event handling and drawing of the stroke.org.nemo.gschema.xml/nemo-global-preferences.h: the new key.Testing
Tested on Linux Mint 22 (Cinnamon, X11, GTK 3.24) on the desktop and in folder
windows (icon view, compact view, several zoom levels), with the key both on
and off. Not tested on Wayland, with several monitors, or with touch input.
Open questions
There is no checkbox in the preferences dialog yet. I'm happy to add one, or to
use a modifier key or another gesture if that fits Nemo better.