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

Proposed by Tim Chen
Status: Rejected
Rejected by: Sebastien Bacher
Proposed branch: lp:~timchen119/notify-osd/notify-osd.precise.lp404658
Merge into: lp:ubuntu/precise/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.precise.lp404658
Reviewer Review Type Date Requested Status
Ubuntu branches Pending
Review via email: mp+192468@code.launchpad.net

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.
63. By Tim Chen

* Add changelog

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for the work, settings as rejected for the same reason than https://code.launchpad.net/~timchen119/notify-osd/notify-osd.lp404658/+merge/192467

Unmerged revisions

63. By Tim Chen

* Add changelog

62. 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 2012-04-10 15:19:23 +0000
3+++ debian/changelog 2013-10-30 07:06:13 +0000
4@@ -1,3 +1,13 @@
5+notify-osd (0.9.34-0ubuntu3) precise; 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> Wed, 30 Oct 2013 15:02:28 +0800
14+
15 notify-osd (0.9.34-0ubuntu2) precise; urgency=low
16
17 * Backport Cimi's color tweaks improvements (lp: #977974)
18
19=== modified file 'src/stack.c'
20--- src/stack.c 2011-07-11 18:24:23 +0000
21+++ src/stack.c 2013-10-30 07:06:13 +0000
22@@ -629,6 +629,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@@ -662,27 +685,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

to all changes: