Merge lp:~jeremywootten/pantheon-files/fix-1467096-rubberbanding-from-blank-in-tree-view into lp:~elementary-apps/pantheon-files/trunk

Proposed by Jeremy Wootten
Status: Merged
Approved by: Cody Garver
Approved revision: 1878
Merged at revision: 1888
Proposed branch: lp:~jeremywootten/pantheon-files/fix-1467096-rubberbanding-from-blank-in-tree-view
Merge into: lp:~elementary-apps/pantheon-files/trunk
Diff against target: 30 lines (+7/-2)
2 files modified
src/View/AbstractDirectoryView.vala (+4/-0)
src/View/AbstractTreeView.vala (+3/-2)
To merge this branch: bzr merge lp:~jeremywootten/pantheon-files/fix-1467096-rubberbanding-from-blank-in-tree-view
Reviewer Review Type Date Requested Status
elementary Apps team Pending
Review via email: mp+264501@code.launchpad.net

Commit message

Do not allow rubberbanding to start in TreeView when not on a path (lp:1467096)

Description of the change

This branch fixes a problem with starting a rubberband selection on the blank are below the last row in TreeView (this seems to be a bug in Gtk.TreeView). It is now prohibited to start a rubberband selection this way (comparable file managers such as Thunar also prohibit this).

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/View/AbstractDirectoryView.vala'
2--- src/View/AbstractDirectoryView.vala 2015-07-08 22:12:30 +0000
3+++ src/View/AbstractDirectoryView.vala 2015-07-12 19:00:59 +0000
4@@ -2818,6 +2818,10 @@
5 result = expand_collapse (path);
6 break;
7
8+ case ClickZone.INVALID:
9+ result = true; /* Prevent rubberbanding */
10+ break;
11+
12 default:
13 break;
14 }
15
16=== modified file 'src/View/AbstractTreeView.vala'
17--- src/View/AbstractTreeView.vala 2015-05-23 11:53:47 +0000
18+++ src/View/AbstractTreeView.vala 2015-07-12 19:00:59 +0000
19@@ -191,9 +191,10 @@
20 tree.get_path_at_pos ((int)event.x, (int)event.y, out p, out c, out cx, out cy);
21 path = p;
22 depth = p != null ? p.get_depth () : 0;
23- zone = (p != null ? ClickZone.BLANK_PATH : ClickZone.BLANK_NO_PATH);
24+ /* Do not allow rubberbanding to start except on a row in tree view */
25+ zone = (p != null ? ClickZone.BLANK_PATH : ClickZone.INVALID);
26
27- if (c != null && c == name_column) {
28+ if (p != null && c != null && c == name_column) {
29 int? x_offset = null, width = null;
30 c.cell_get_position (icon_renderer, out x_offset, out width);
31

Subscribers

People subscribed via source and target branches

to all changes: