Merge lp://qastaging/~desrt/notify-osd/GNOME_BACKGROUND_REPRESENTATIVE_COLORS into lp://qastaging/~canonical-dx-team/notify-osd/precise

Proposed by desrt
Status: Merged
Approved by: Mirco Müller
Approved revision: 454
Merge reported by: Mirco Müller
Merged at revision: not available
Proposed branch: lp://qastaging/~desrt/notify-osd/GNOME_BACKGROUND_REPRESENTATIVE_COLORS
Merge into: lp://qastaging/~canonical-dx-team/notify-osd/precise
Diff against target: 225 lines (+56/-73)
3 files modified
src/bubble.c (+8/-8)
src/defaults.c (+45/-64)
src/defaults.h (+3/-1)
To merge this branch: bzr merge lp://qastaging/~desrt/notify-osd/GNOME_BACKGROUND_REPRESENTATIVE_COLORS
Reviewer Review Type Date Requested Status
Mirco Müller (community) Approve
Review via email: mp+96837@code.qastaging.launchpad.net

Description of the change

Get background colour using _GNOME_BACKGROUND_REPRESENTATIVE_COLORS

...instead of pulling it out of Unity's GSettings.

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

This is being added to libgnome-desktop (which is how the desktop gets set) here: https://bugzilla.gnome.org/show_bug.cgi?id=671750

Revision history for this message
David Barth (dbarth) wrote :

Looks good, but can you add some tests?

What happens if the property does not exist? Is there a corresponding default mechanism to provide a sane value?

IMO, the test should verify that changing the background color results in the right color being received in the bubble.c function. Then, that border line values don't result in a crash and trigger a reasonable fallback value.

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

The way a bubble is initialized and defaults_refresh_bg_color_property() goes about updating the "bubble-bg-color", it'll fall back to the typical dark grey color, should the X-property "_GNOME_BACKGROUND_REPRESENTATIVE_COLORS" not be available. I tested that by defaults_refresh_bg_color_property() returning early not touching "bubble-bg-color" at all.

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

After discussion on IRC, the effort/benefit relation forbids an automated test for this. We need a proper framework for testing such system-wide changes correctly. Until we have that in place a manual-test will have to do.

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

Since I can't commit to desrt's branch I'll approve this and add the manual-test with my merge to trunk. So... approved.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches