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

Proposed by Andrea Azzarone
Status: Merged
Approved by: Andrea Azzarone
Approved revision: no longer in the source branch.
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
Christopher Townsend Approve
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.
Revision history for this message
Christopher Townsend (townsend) wrote :

+1

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'launcher/ApplicationLauncherIcon.cpp'
--- launcher/ApplicationLauncherIcon.cpp 2013-10-10 13:00:42 +0000
+++ launcher/ApplicationLauncherIcon.cpp 2013-10-11 14:57:31 +0000
@@ -858,7 +858,7 @@
858858
859void ApplicationLauncherIcon::Stick(bool save)859void ApplicationLauncherIcon::Stick(bool save)
860{860{
861 if (IsSticky())861 if (IsSticky() && !save)
862 return;862 return;
863863
864 app_->sticky = true;864 app_->sticky = true;
865865
=== modified file 'launcher/LauncherIcon.cpp'
--- launcher/LauncherIcon.cpp 2013-10-10 12:21:42 +0000
+++ launcher/LauncherIcon.cpp 2013-10-11 14:57:31 +0000
@@ -1145,7 +1145,7 @@
11451145
1146void LauncherIcon::Stick(bool save)1146void LauncherIcon::Stick(bool save)
1147{1147{
1148 if (_sticky)1148 if (_sticky && !save)
1149 return;1149 return;
11501150
1151 _sticky = true;1151 _sticky = true;
11521152
=== modified file 'tests/test_application_launcher_icon.cpp'
--- tests/test_application_launcher_icon.cpp 2013-10-10 13:03:01 +0000
+++ tests/test_application_launcher_icon.cpp 2013-10-11 14:57:31 +0000
@@ -220,8 +220,9 @@
220 EXPECT_TRUE(usc_icon->IsVisible());220 EXPECT_TRUE(usc_icon->IsVisible());
221 EXPECT_FALSE(saved);221 EXPECT_FALSE(saved);
222222
223 EXPECT_CALL(*unity_app_, LogEvent(ApplicationEventType::ACCESS, _)).Times(1);
223 usc_icon->Stick(true);224 usc_icon->Stick(true);
224 EXPECT_FALSE(saved);225 EXPECT_TRUE(saved);
225}226}
226227
227TEST_F(TestApplicationLauncherIcon, StickDesktopLessApp)228TEST_F(TestApplicationLauncherIcon, StickDesktopLessApp)
228229
=== modified file 'tests/test_launcher_icon.cpp'
--- tests/test_launcher_icon.cpp 2013-09-30 15:31:43 +0000
+++ tests/test_launcher_icon.cpp 2013-10-11 14:57:31 +0000
@@ -87,7 +87,7 @@
87 EXPECT_FALSE(saved);87 EXPECT_FALSE(saved);
8888
89 icon.Stick(true);89 icon.Stick(true);
90 EXPECT_FALSE(saved);90 EXPECT_TRUE(saved);
91}91}
9292
93TEST_F(TestLauncherIcon, StickAndSave)93TEST_F(TestLauncherIcon, StickAndSave)

Subscribers

People subscribed via source and target branches

to all changes: