Merge lp:~tintou/slingshot/fixed-regression into lp:~elementary-pantheon/slingshot/trunk

Proposed by Corentin Noël
Status: Merged
Approved by: Danielle Foré
Approved revision: 475
Merged at revision: 476
Proposed branch: lp:~tintou/slingshot/fixed-regression
Merge into: lp:~elementary-pantheon/slingshot/trunk
Diff against target: 48 lines (+5/-4)
2 files modified
src/Widgets/CategoryView.vala (+4/-3)
src/Widgets/Sidebar.vala (+1/-1)
To merge this branch: bzr merge lp:~tintou/slingshot/fixed-regression
Reviewer Review Type Date Requested Status
Danielle Foré testing Approve
Tom Beckmann (community) code & codestyle Approve
Review via email: mp+239764@code.launchpad.net

Commit message

Fixed regression triggered by rev 466, now the category view has always an item selected

Description of the change

Fixed regression triggered by rev 466, now the category view has always an item selected

To post a comment you must log in.
Revision history for this message
Tom Beckmann (tombeckmann) wrote :

Code looks good.

review: Approve (code & codestyle)
Revision history for this message
Danielle Foré (danrabbit) wrote :

After testing for a day, I'm unable to reproduce the bug :)

review: Approve (testing)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/Widgets/CategoryView.vala'
--- src/Widgets/CategoryView.vala 2014-10-17 01:18:02 +0000
+++ src/Widgets/CategoryView.vala 2014-10-27 19:10:56 +0000
@@ -53,11 +53,12 @@
53 container.add (app_view);53 container.add (app_view);
54 add (container);54 add (container);
5555
56 connect_events ();
56 setup_sidebar ();57 setup_sidebar ();
57 connect_events ();
58 }58 }
5959
60 public void setup_sidebar () {60 public void setup_sidebar () {
61 var old_selected = category_switcher.selected;
61 category_ids.clear ();62 category_ids.clear ();
62 category_switcher.clear ();63 category_switcher.clear ();
63 app_view.set_size_request (-1, -1);64 app_view.set_size_request (-1, -1);
@@ -83,6 +84,8 @@
8384
84 int columns = view.columns - removing_columns;85 int columns = view.columns - removing_columns;
85 app_view.resize (view.rows, columns);86 app_view.resize (view.rows, columns);
87
88 category_switcher.selected = old_selected;
86 }89 }
8790
88 private void connect_events () {91 private void connect_events () {
@@ -91,8 +94,6 @@
91 string category = category_ids.get (nth);94 string category = category_ids.get (nth);
92 show_filtered_apps (category);95 show_filtered_apps (category);
93 });96 });
94
95 category_switcher.selected = 0; //Must be after everything else
96 }97 }
9798
98 private void add_app (Backend.App app) {99 private void add_app (Backend.App app) {
99100
=== modified file 'src/Widgets/Sidebar.vala'
--- src/Widgets/Sidebar.vala 2014-10-15 21:44:44 +0000
+++ src/Widgets/Sidebar.vala 2014-10-27 19:10:56 +0000
@@ -28,7 +28,7 @@
28 }28 }
29 }29 }
3030
31 private int _selected;31 private int _selected = 0;
32 public int selected {32 public int selected {
33 get {33 get {
34 return _selected;34 return _selected;

Subscribers

People subscribed via source and target branches