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
1=== modified file 'src/Widgets/CategoryView.vala'
2--- src/Widgets/CategoryView.vala 2014-10-17 01:18:02 +0000
3+++ src/Widgets/CategoryView.vala 2014-10-27 19:10:56 +0000
4@@ -53,11 +53,12 @@
5 container.add (app_view);
6 add (container);
7
8+ connect_events ();
9 setup_sidebar ();
10- connect_events ();
11 }
12
13 public void setup_sidebar () {
14+ var old_selected = category_switcher.selected;
15 category_ids.clear ();
16 category_switcher.clear ();
17 app_view.set_size_request (-1, -1);
18@@ -83,6 +84,8 @@
19
20 int columns = view.columns - removing_columns;
21 app_view.resize (view.rows, columns);
22+
23+ category_switcher.selected = old_selected;
24 }
25
26 private void connect_events () {
27@@ -91,8 +94,6 @@
28 string category = category_ids.get (nth);
29 show_filtered_apps (category);
30 });
31-
32- category_switcher.selected = 0; //Must be after everything else
33 }
34
35 private void add_app (Backend.App app) {
36
37=== modified file 'src/Widgets/Sidebar.vala'
38--- src/Widgets/Sidebar.vala 2014-10-15 21:44:44 +0000
39+++ src/Widgets/Sidebar.vala 2014-10-27 19:10:56 +0000
40@@ -28,7 +28,7 @@
41 }
42 }
43
44- private int _selected;
45+ private int _selected = 0;
46 public int selected {
47 get {
48 return _selected;

Subscribers

People subscribed via source and target branches