Merge lp:~unity-team/unity/fix.810325 into lp:unity

Proposed by Mirco Müller
Status: Rejected
Rejected by: Gord Allott
Proposed branch: lp:~unity-team/unity/fix.810325
Merge into: lp:unity
Prerequisite: lp:~gordallott/unity/unity.background-color
Diff against target: 65 lines (+25/-0) (has conflicts)
3 files modified
com.canonical.Unity.gschema.xml (+6/-0)
plugins/unityshell/src/BGHash.cpp (+18/-0)
tests/CMakeLists.txt (+1/-0)
Text conflict in plugins/unityshell/src/PanelView.cpp
Text conflict in plugins/unityshell/src/PanelView.h
To merge this branch: bzr merge lp:~unity-team/unity/fix.810325
Reviewer Review Type Date Requested Status
Gord Allott (community) Disapprove
Review via email: mp+68648@code.launchpad.net

This proposal supersedes a proposal from 2011-07-20.

Description of the change

Once the new average-color of the wallpaper is computed, in addition to being broadcasted via ubus within the unity-process, it is also written to a newly introduced GSettings key "com.canonical.Unity average-bg-color".

This will be picked up by the NotifyOSD-process, thus it is able to update the rendering of future notifications.

To post a comment you must log in.
Revision history for this message
Gord Allott (gordallott) wrote :

Rejecting for now, simply because we can't do this this cycle and the code will just rot in here

review: Disapprove

Unmerged revisions

1274. By Mirco Müller

sometimes my brain hurts

1273. By Mirco Müller

Trying to fix LP: #810325

1272. By Gord Allott

merged latest trunk

1271. By Gord Allott

added dep on unity-core for the tests

1270. By Gord Allott

initalises bghash in unity shell instead of the dash

1269. By Gord Allott

merge latest trunk

1268. By Gord Allott

added request colour support over ubus

1267. By Gord Allott

bias the left hand side

1266. By Gord Allott

added support on the launcher for changing the colour, my editor fixed the whitespace in the launcher too, sorry about that.

1265. By Gord Allott

merged trunk, hated CMake some more

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 2011-07-20 06:41:32 +0000
3+++ com.canonical.Unity.gschema.xml 2011-07-21 09:53:28 +0000
4@@ -25,7 +25,13 @@
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+
15 <schema path="/desktop/unity/launcher/" id="com.canonical.Unity.Launcher" gettext-domain="unity">
16 <key type="as" name="favorites">
17 <default>[ 'ubiquity-gtkui.desktop', 'nautilus-home.desktop', 'firefox.desktop', 'libreoffice-writer.desktop', 'libreoffice-calc.desktop', 'libreoffice-impress.desktop', 'ubuntu-software-center.desktop', 'ubuntuone-control-panel-gtk.desktop' ]</default>
18
19=== modified file 'plugins/unityshell/src/BGHash.cpp'
20--- plugins/unityshell/src/BGHash.cpp 2011-07-21 09:53:27 +0000
21+++ plugins/unityshell/src/BGHash.cpp 2011-07-21 09:53:28 +0000
22@@ -28,6 +28,8 @@
23 int level_of_recursion;
24 const int MAX_LEVEL_OF_RECURSION = 16;
25 const int MIN_LEVEL_OF_RECURSION = 2;
26+ const gchar* AVG_BG_COLOR = "average-bg-color\0";
27+ const gchar* UNITY_SCHEMA = "com.canonical.Unity\0";
28 }
29 namespace unity {
30
31@@ -300,6 +302,22 @@
32 _current_color.blue,
33 _current_color.alpha)
34 );
35+
36+ GSettings* settings = NULL;
37+ gchar* color_string = NULL;
38+ GdkColor color = {0,
39+ (guint16) (_current_color.red * 65535.0),
40+ (guint16) (_current_color.green * 65535.0),
41+ (guint16) (_current_color.blue * 65535.0)};
42+
43+ settings = g_settings_new (UNITY_SCHEMA);
44+ if (settings)
45+ {
46+ color_string = gdk_color_to_string (&color);
47+ g_settings_set_string (settings, AVG_BG_COLOR, color_string);
48+ g_object_unref (settings);
49+ g_free (color_string);
50+ }
51 }
52
53 GdkPixbuf *BGHash::GetPixbufFromBG ()
54
55=== modified file 'tests/CMakeLists.txt'
56--- tests/CMakeLists.txt 2011-07-21 09:53:27 +0000
57+++ tests/CMakeLists.txt 2011-07-21 09:53:28 +0000
58@@ -296,6 +296,7 @@
59 ${UNITY_SRC}/ubus-server.h
60 )
61 add_dependencies (test-bg-hash unity-core-${UNITY_API_VERSION})
62+
63 #
64 # GTest tests
65 #