Merge lp:~elementary-apps/pantheon-files/find-function-selection into lp:~elementary-apps/pantheon-files/trunk

Proposed by Danielle Foré
Status: Merged
Approved by: Jeremy Wootten
Approved revision: 2552
Merged at revision: 2555
Proposed branch: lp:~elementary-apps/pantheon-files/find-function-selection
Merge into: lp:~elementary-apps/pantheon-files/trunk
Diff against target: 21 lines (+7/-3)
1 file modified
libwidgets/View/SearchResults.vala (+7/-3)
To merge this branch: bzr merge lp:~elementary-apps/pantheon-files/find-function-selection
Reviewer Review Type Date Requested Status
Jeremy Wootten code, function Approve
Review via email: mp+323715@code.launchpad.net

Commit message

SearchResults.vala:
* Don't enable hover selection
* Properties in alphabetical order, functions at the end
* Don't select headers

Description of the change

Hover select seems to be false by default and I noticed setting it explicitly seemed to break keyboard navigation. So not setting it at all has the intended behavior.

For anyone other than Jeremy viewing this branch, we want to disable hover mouse select because it has the unintended consequence of making it so pressing enter launchers a random result (the one under your mouse) instead of the top result.

To post a comment you must log in.
Revision history for this message
Jeremy Wootten (jeremywootten) wrote :

Works as expected.

review: Approve (code, function)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libwidgets/View/SearchResults.vala'
2--- libwidgets/View/SearchResults.vala 2017-05-06 17:57:48 +0000
3+++ libwidgets/View/SearchResults.vala 2017-05-06 18:18:05 +0000
4@@ -122,11 +122,15 @@
5 scroll.hscrollbar_policy = Gtk.PolicyType.NEVER;
6
7 view = new Gtk.TreeView ();
8- view.get_selection ().set_mode (Gtk.SelectionMode.BROWSE);
9 view.headers_visible = false;
10+ view.level_indentation = 12;
11 view.show_expanders = false;
12- view.level_indentation = 12;
13- view.set_hover_selection (true);
14+ view.get_selection ().set_mode (Gtk.SelectionMode.BROWSE);
15+
16+ /* Do not select category headers */
17+ view.get_selection ().set_select_function ((selection, list, path, path_selected) => {
18+ return path.get_depth () != 0;
19+ });
20
21 get_style_context ().add_class ("completion-popup");
22

Subscribers

People subscribed via source and target branches