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

Proposed by Andrea Azzarone
Status: Merged
Approved by: Stephen M. Webb
Approved revision: no longer in the source branch.
Merged at revision: 3916
Proposed branch: lp:~azzar1/unity/lp-1408212
Merge into: lp:unity
Diff against target: 41 lines (+12/-12)
1 file modified
unity-shared/UnitySettings.cpp (+12/-12)
To merge this branch: bzr merge lp:~azzar1/unity/lp-1408212
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+248566@code.launchpad.net

Commit message

Actually connect to changed::* signal in UnitySettings.cpp.

Description of the change

Due to a change in gsettings we to connect to the change signal before getting the value. I'm actually working on GSettingsProperty that should make gsettings easier to use in Unity. I still need some time, so it's better to send this before.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'unity-shared/UnitySettings.cpp'
2--- unity-shared/UnitySettings.cpp 2014-12-19 13:03:44 +0000
3+++ unity-shared/UnitySettings.cpp 2015-02-04 15:28:50 +0000
4@@ -91,18 +91,6 @@
5 for (unsigned i = 0; i < monitors::MAX; ++i)
6 em_converters_.emplace_back(std::make_shared<EMConverter>());
7
8- // The order is important here, DPI is the last thing to be updated
9- UpdateLimSetting();
10- UpdateTextScaleFactor();
11- UpdateCursorScaleFactor();
12- UpdateFontSize();
13- UpdateDPI();
14-
15- CacheFormFactor();
16- CacheDoubleClickActivate();
17-
18- UScreen::GetDefault()->changed.connect(sigc::hide(sigc::hide(sigc::mem_fun(this, &Impl::UpdateDPI))));
19-
20 signals_.Add<void, GSettings*, const gchar*>(usettings_, "changed::" + FORM_FACTOR, [this] (GSettings*, const gchar*) {
21 CacheFormFactor();
22 });
23@@ -150,6 +138,18 @@
24 signals_.Add<void, GSettings*, const gchar*>(lim_settings_, "changed", [this] (GSettings*, const gchar*) {
25 UpdateLimSetting();
26 });
27+
28+ UScreen::GetDefault()->changed.connect(sigc::hide(sigc::hide(sigc::mem_fun(this, &Impl::UpdateDPI))));
29+
30+ // The order is important here, DPI is the last thing to be updated
31+ UpdateLimSetting();
32+ UpdateTextScaleFactor();
33+ UpdateCursorScaleFactor();
34+ UpdateFontSize();
35+ UpdateDPI();
36+
37+ CacheFormFactor();
38+ CacheDoubleClickActivate();
39 }
40
41 void CacheFormFactor()