Merge lp:~timchen119/notify-osd/notify-osd.lp404658 into lp:notify-osd

Proposed by Tim Chen
Status: Rejected
Rejected by: Sebastien Bacher
Proposed branch: lp:~timchen119/notify-osd/notify-osd.lp404658
Merge into: lp:notify-osd
Diff against target: 79 lines (+33/-21)
2 files modified
debian/changelog (+10/-0)
src/stack.c (+23/-21)
To merge this branch: bzr merge lp:~timchen119/notify-osd/notify-osd.lp404658
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Ubuntu Sponsors Pending
Review via email: mp+192467@code.launchpad.net

Commit message

Provide the "x-canonical-private-synchronous" to work with notifications different with LAYOUT_ICON_INDICATOR layout.
  Currently the "x-canonical-private-synchronous" interface only provide this layout to support brightness and volume control.

  This make following command behave correctly.
  $notify-send "RF-status" "enabled" -h string:x-canonical-private-synchronous:1 -h string:image_path:/tmp/test.jpg

  Canonical OEM projects need this function to

  * enable OSD for enable/disable WiFi or bluetooth with a hotkey
  * enable OSD for display switching with a hotkey
(LP: #404658)

Description of the change

  Provide the "x-canonical-private-synchronous" to work with notifications different with LAYOUT_ICON_INDICATOR layout.
  Currently the "x-canonical-private-synchronous" interface only provide this layout to support brightness and volume control.

  This make following command behave correctly.
  $notify-send "RF-status" "enabled" -h string:x-canonical-private-synchronous:1 -h string:image_path:/tmp/test.jpg

  Canonical OEM projects need this function to

  * enable OSD for enable/disable WiFi or bluetooth with a hotkey
  * enable OSD for display switching with a hotkey

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:472
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~timchen119/notify-osd/notify-osd.lp404658/+merge/192467/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/notify-osd-ci/5/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/notify-osd-trusty-amd64-ci/1
    SUCCESS: http://jenkins.qa.ubuntu.com/job/notify-osd-trusty-armhf-ci/1
    SUCCESS: http://jenkins.qa.ubuntu.com/job/notify-osd-trusty-i386-ci/1

Click here to trigger a rebuild:
http://10.97.0.26:8080/job/notify-osd-ci/5/rebuild

review: Needs Fixing (continuous-integration)
473. By Tim Chen

* Add changelog.

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

Thanks for this patch, but it doesn't fully fix bug #404658. The summary and body of a synchronous notification are not updated when a new synchronous notification is sent.

This patch also changes whitespace around the changed lines.

I've incorporated your patch in lp:~~larsu/notify-osd/update-sync.

Unmerged revisions

473. By Tim Chen

* Add changelog.

472. By Tim Chen

Provide the "x-canonical-private-synchronous" to work with notifications different with LAYOUT_ICON_INDICATOR layout.
Currently the "x-canonical-private-synchronous" interface only provide this layout to support brightness and volume control.

This make following command behave correctly.
$notify-send "RF-status" "enabled" -h string:x-canonical-private-synchronous:1 -h string:image_path:/tmp/test.jpg

Canonical OEM projects need this function to

* enable OSD for enable/disable WiFi or bluetooth with a hotkey
* enable OSD for display switching with a hotkey

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2013-09-17 22:04:19 +0000
3+++ debian/changelog 2013-10-24 09:19:38 +0000
4@@ -1,3 +1,13 @@
5+notify-osd (0.9.35+13.10.20130917.1-0ubuntu2) UNRELEASE; urgency=low
6+
7+ * Provide the "x-canonical-private-synchronous" to work with notifications
8+ different with LAYOUT_ICON_INDICATOR layout.
9+ Currently the "x-canonical-private-synchronous" interface only provide
10+ this layout to support brightness and volume control.
11+ (LP: #404658)
12+
13+ -- Jian-Ding Chen (timchen119) <tim.chen119@canonical.com> Thu, 24 Oct 2013 17:15:38 +0800
14+
15 notify-osd (0.9.35+13.10.20130917.1-0ubuntu1) saucy; urgency=low
16
17 [ Sami Jaktholm ]
18
19=== modified file 'src/stack.c'
20--- src/stack.c 2013-09-08 08:38:11 +0000
21+++ src/stack.c 2013-10-24 09:19:38 +0000
22@@ -630,6 +630,29 @@
23 g_free (sender);
24 }
25
26+ if (hints)
27+ {
28+ data = (GValue*) g_hash_table_lookup (hints, "x-canonical-private-synchronous");
29+ compat = (GValue*) g_hash_table_lookup (hints, "synchronous");
30+ if ((data && G_VALUE_HOLDS_STRING (data)) || (compat && G_VALUE_HOLDS_STRING (compat)))
31+ {
32+ if (sync_bubble != NULL
33+ && IS_BUBBLE (sync_bubble))
34+ {
35+ g_object_unref (bubble);
36+ bubble = sync_bubble;
37+ /* Setup default value for default layout. */
38+ bubble_set_value (bubble, -2);
39+ }
40+
41+ if (data && G_VALUE_HOLDS_STRING (data))
42+ bubble_set_synchronous (bubble, g_value_get_string (data));
43+
44+ if (compat && G_VALUE_HOLDS_STRING (compat))
45+ bubble_set_synchronous (bubble, g_value_get_string (compat));
46+ }
47+ }
48+
49 if (new_bubble && hints)
50 {
51 data = (GValue*) g_hash_table_lookup (hints, "x-canonical-append");
52@@ -665,27 +688,6 @@
53
54 if (hints)
55 {
56- data = (GValue*) g_hash_table_lookup (hints, "x-canonical-private-synchronous");
57- compat = (GValue*) g_hash_table_lookup (hints, "synchronous");
58- if ((data && G_VALUE_HOLDS_STRING (data)) || (compat && G_VALUE_HOLDS_STRING (compat)))
59- {
60- if (sync_bubble != NULL
61- && IS_BUBBLE (sync_bubble))
62- {
63- g_object_unref (bubble);
64- bubble = sync_bubble;
65- }
66-
67- if (data && G_VALUE_HOLDS_STRING (data))
68- bubble_set_synchronous (bubble, g_value_get_string (data));
69-
70- if (compat && G_VALUE_HOLDS_STRING (compat))
71- bubble_set_synchronous (bubble, g_value_get_string (compat));
72- }
73- }
74-
75- if (hints)
76- {
77 data = (GValue*) g_hash_table_lookup (hints, "value");
78 if (data && G_VALUE_HOLDS_INT (data))
79 bubble_set_value (bubble, g_value_get_int (data));

Subscribers

People subscribed via source and target branches