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

Proposed by Andrea Azzarone on 2013-10-11
Status: Merged
Approved by: Andrea Azzarone on 2013-11-07
Approved revision: 3566
Merged at revision: 3576
Proposed branch: lp:~azzar1/unity/lp-1237359-7.1
Merge into: lp:unity/7.1
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-7.1
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve on 2013-11-20
Christopher Townsend 2013-10-11 Approve on 2013-10-11
Review via email: mp+190690@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.
Christopher Townsend (townsend) wrote :

+1

review: Approve
review: Approve (continuous-integration)

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:57:31 +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:57:31 +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:57:31 +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:57:31 +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)

Subscribers

People subscribed via source and target branches

to all changes: