Merge lp:~azzar1/unity/lp-1237359 into lp:unity

Proposed by Andrea Azzarone
Status: Merged
Approved by: Christopher Townsend
Approved revision: no longer in the source branch.
Merged at revision: 3568
Proposed branch: lp:~azzar1/unity/lp-1237359
Merge into: lp:unity
Diff against target: 53 lines (+5/-4)
4 files modified
launcher/ApplicationLauncherIcon.cpp (+1/-1)
launcher/LauncherIcon.cpp (+1/-1)
tests/test_application_launcher_icon.cpp (+2/-1)
tests/test_launcher_icon.cpp (+1/-1)
To merge this branch: bzr merge lp:~azzar1/unity/lp-1237359
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Christopher Townsend Approve
Review via email: mp+190661@code.launchpad.net

Commit message

Don't ignore Stick command is the icon is already sticky but save==true.

Description of the change

== Problem ==
Bug #1237359: [regression] Icons rearranged on Launcher not saved after reboot High In Progress

== Fix ==
Don't ignore Stick command is the icon is already sticky but save==true.

== Test ==
Unit tests updated.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Christopher Townsend (townsend) wrote :

Works well. +1

Will hold off on global approval until we get word from Stephen.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Christopher Townsend (townsend) wrote :

Since this going to be for 7.1 as well, then globally approving.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'launcher/ApplicationLauncherIcon.cpp'
2--- launcher/ApplicationLauncherIcon.cpp 2013-10-10 13:00:42 +0000
3+++ launcher/ApplicationLauncherIcon.cpp 2013-10-11 14:55:30 +0000
4@@ -858,7 +858,7 @@
5
6 void ApplicationLauncherIcon::Stick(bool save)
7 {
8- if (IsSticky())
9+ if (IsSticky() && !save)
10 return;
11
12 app_->sticky = true;
13
14=== modified file 'launcher/LauncherIcon.cpp'
15--- launcher/LauncherIcon.cpp 2013-10-10 12:21:42 +0000
16+++ launcher/LauncherIcon.cpp 2013-10-11 14:55:30 +0000
17@@ -1145,7 +1145,7 @@
18
19 void LauncherIcon::Stick(bool save)
20 {
21- if (_sticky)
22+ if (_sticky && !save)
23 return;
24
25 _sticky = true;
26
27=== modified file 'tests/test_application_launcher_icon.cpp'
28--- tests/test_application_launcher_icon.cpp 2013-10-10 13:03:01 +0000
29+++ tests/test_application_launcher_icon.cpp 2013-10-11 14:55:30 +0000
30@@ -220,8 +220,9 @@
31 EXPECT_TRUE(usc_icon->IsVisible());
32 EXPECT_FALSE(saved);
33
34+ EXPECT_CALL(*unity_app_, LogEvent(ApplicationEventType::ACCESS, _)).Times(1);
35 usc_icon->Stick(true);
36- EXPECT_FALSE(saved);
37+ EXPECT_TRUE(saved);
38 }
39
40 TEST_F(TestApplicationLauncherIcon, StickDesktopLessApp)
41
42=== modified file 'tests/test_launcher_icon.cpp'
43--- tests/test_launcher_icon.cpp 2013-09-30 15:31:43 +0000
44+++ tests/test_launcher_icon.cpp 2013-10-11 14:55:30 +0000
45@@ -87,7 +87,7 @@
46 EXPECT_FALSE(saved);
47
48 icon.Stick(true);
49- EXPECT_FALSE(saved);
50+ EXPECT_TRUE(saved);
51 }
52
53 TEST_F(TestLauncherIcon, StickAndSave)