Merge lp:~jeremywootten/pantheon-files/fix-1639228-switch-tabs-in-column-view-not-update-pathbar into lp:~elementary-apps/pantheon-files/trunk

Proposed by Jeremy Wootten
Status: Merged
Approved by: Zisu Andrei
Approved revision: 2375
Merged at revision: 2375
Proposed branch: lp:~jeremywootten/pantheon-files/fix-1639228-switch-tabs-in-column-view-not-update-pathbar
Merge into: lp:~elementary-apps/pantheon-files/trunk
Diff against target: 58 lines (+14/-11)
3 files modified
src/View/Miller.vala (+9/-9)
src/View/ViewContainer.vala (+3/-1)
src/View/Window.vala (+2/-1)
To merge this branch: bzr merge lp:~jeremywootten/pantheon-files/fix-1639228-switch-tabs-in-column-view-not-update-pathbar
Reviewer Review Type Date Requested Status
Zisu Andrei (community) Approve
Review via email: mp+310354@code.launchpad.net

Commit message

Fix breadcrumb update on column view tab switch

Description of the change

Column view must always emit "active" signal when one of its slots is activated, even if it is already the current slot. This is so pathbar and other UI changes when switching back to the tab.

TO TEST:

1. Create two tabs, one of which is in Column View.
2. Select the Column View tab.
3. Select the other tab.
4 Reselect the Column View tab

In trunk, the path bar does not change back to the correct path when reselecting the Column View.

In this branch, the correct path is always shown.

To post a comment you must log in.
Revision history for this message
Zisu Andrei (matzipan) wrote :

I can confirm this fixes the issue and doesn't introduce any regressions.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/View/Miller.vala'
2--- src/View/Miller.vala 2016-07-19 08:32:27 +0000
3+++ src/View/Miller.vala 2016-11-08 19:28:24 +0000
4@@ -303,15 +303,15 @@
5 schedule_scroll_to_slot (slot, animate);
6 }
7
8- if (this.current_slot == slot)
9- return;
10-
11- slot_list.@foreach ((s) => {
12- if (s != slot)
13- s.inactive ();
14- });
15-
16- current_slot = slot;
17+ if (this.current_slot != slot) {
18+ slot_list.@foreach ((s) => {
19+ if (s != slot)
20+ s.inactive ();
21+ });
22+
23+ current_slot = slot;
24+ }
25+ /* Always emit this signal so that UI updates (e.g. pathbar) */
26 active ();
27 }
28
29
30=== modified file 'src/View/ViewContainer.vala'
31--- src/View/ViewContainer.vala 2016-09-18 10:37:53 +0000
32+++ src/View/ViewContainer.vala 2016-11-08 19:28:24 +0000
33@@ -429,7 +429,9 @@
34 if (aslot != null) {
35 /* Since async loading it may not have been determined whether slot is loadable */
36 aslot.set_active_state (is_active, animate);
37- active ();
38+ if (is_active) {
39+ active ();
40+ }
41 }
42 }
43
44
45=== modified file 'src/View/Window.vala'
46--- src/View/Window.vala 2016-09-25 20:38:35 +0000
47+++ src/View/Window.vala 2016-11-08 19:28:24 +0000
48@@ -1018,8 +1018,9 @@
49 }
50
51 private void update_top_menu () {
52- if (restoring_tabs || current_tab == null)
53+ if (restoring_tabs || current_tab == null) {
54 return;
55+ }
56
57 /* Update browser buttons */
58 top_menu.set_back_menu (current_tab.get_go_back_path_list ());

Subscribers

People subscribed via source and target branches

to all changes: