Merge lp:~desrt/unity/no-average-bg-color-gsettings into lp:unity

Proposed by Allison Karlitskaya
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: no longer in the source branch.
Merged at revision: 2138
Proposed branch: lp:~desrt/unity/no-average-bg-color-gsettings
Merge into: lp:unity
Diff against target: 52 lines (+0/-24)
2 files modified
com.canonical.Unity.gschema.xml (+0/-5)
plugins/unityshell/src/BGHash.cpp (+0/-19)
To merge this branch: bzr merge lp:~desrt/unity/no-average-bg-color-gsettings
Reviewer Review Type Date Requested Status
Allison Karlitskaya (community) Approve
Mirco Müller (community) Approve
Unity Team Pending
Review via email: mp+96863@code.launchpad.net

Commit message

don't store average-bg-color in GSettings

This is now exported by libgnome-desktop as an X property on the root window. Interested applications can pick it up from there.

Description of the change

don't store average-bg-color in GSettings

This is now exported by libgnome-desktop as an X property on the root
window. Interested applications can pick it up from there.

To post a comment you must log in.
Revision history for this message
Tim Penhey (thumper) wrote :

I'd like Mirco to look at this as he uses this with notify-osd I think.

Revision history for this message
Mirco Müller (macslow) wrote :

Looking at this before the weekend and updating my related branches accordingly.

Revision history for this message
Mirco Müller (macslow) wrote :

With the changes from Ryan in notify-osd (merge-proposed), this is good to go in.

review: Approve
Revision history for this message
Unity Merger (unity-merger) wrote :

No commit message specified.

Revision history for this message
Allison Karlitskaya (desrt) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'com.canonical.Unity.gschema.xml'
2--- com.canonical.Unity.gschema.xml 2012-02-22 13:59:25 +0000
3+++ com.canonical.Unity.gschema.xml 2012-03-10 04:56:20 +0000
4@@ -20,11 +20,6 @@
5 <summary>Whether the home screen should be expanded.</summary>
6 <description>Whether the home screen should be expanded.</description>
7 </key>
8- <key type="s" name="average-bg-color">
9- <default>'#757550507B7BFFFF'</default>
10- <summary>Average background color</summary>
11- <description>The average color derived from the currently set desktop-wallpaper. This is written/updated by the Unity-process and read by NotifyOSD-process for example.</description>
12- </key>
13 </schema>
14 <schema path="/desktop/unity/launcher/" id="com.canonical.Unity.Launcher" gettext-domain="unity">
15 <key type="as" name="favorites">
16
17=== modified file 'plugins/unityshell/src/BGHash.cpp'
18--- plugins/unityshell/src/BGHash.cpp 2012-02-22 13:40:18 +0000
19+++ plugins/unityshell/src/BGHash.cpp 2012-03-10 04:56:20 +0000
20@@ -35,8 +35,6 @@
21 int level_of_recursion;
22 const int MAX_LEVEL_OF_RECURSION = 16;
23 const int MIN_LEVEL_OF_RECURSION = 2;
24- std::string AVG_BG_COLOR = "average-bg-color";
25- std::string UNITY_SCHEMA = "com.canonical.Unity";
26 }
27 namespace unity {
28
29@@ -343,23 +341,6 @@
30 _hires_time_start = g_get_monotonic_time();
31 _hires_time_end = 500 * 1000; // 500 milliseconds
32 _transition_handler = g_timeout_add (1000/60, (GSourceFunc)BGHash::OnTransitionCallback, this);
33-
34- // export to gsettings
35- GSettings* settings = NULL;
36- GdkColor color = {0,
37- (guint16) (_new_color.red * 65535.0 * 0.7f),
38- (guint16) (_new_color.green * 65535.0 * 0.7f),
39- (guint16) (_new_color.blue * 65535.0 * 0.7f)};
40-
41- settings = g_settings_new (UNITY_SCHEMA.c_str());
42- if (settings)
43- {
44- unity::glib::String color_string(gdk_color_to_string(&color));
45- LOG_DEBUG(logger) << "Setting gsettings key to: " << color_string;
46- g_settings_set_string(settings, AVG_BG_COLOR.c_str(), color_string);
47- g_object_unref (settings);
48- }
49-
50 }
51
52 gboolean BGHash::OnTransitionCallback(BGHash *self)