Merge lp:~john-ledbetter/notify-osd/bug-fixing into lp:notify-osd/lucid

Proposed by John Ledbetter
Status: Merged
Approved by: Mirco Müller
Approved revision: 429
Merged at revision: 431
Proposed branch: lp:~john-ledbetter/notify-osd/bug-fixing
Merge into: lp:notify-osd/lucid
Diff against target: 57 lines (+29/-0)
2 files modified
src/bubble.c (+26/-0)
src/bubble.h (+3/-0)
To merge this branch: bzr merge lp:~john-ledbetter/notify-osd/bug-fixing
Reviewer Review Type Date Requested Status
Mirco Müller (community) Approve
Review via email: mp+39068@code.launchpad.net

Commit message

Fixes LP:#500663 (Notifications will not expire while the mouse is over them)

Description of the change

While the mouse is over a notification bubble, the bubble will not expire. When the mouse leaves the bubble, the bubble will persist for 3000 ms and then expire. (per https://wiki.ubuntu.com/NotifyOSD#Animations%20and%20durations)

This fixes LP:#500663

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

when mouse over bubble, the bubble will be transparent, i can not see it clearly, and stopping the timer don't make any difference.

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/bubble.c'
2--- src/bubble.c 2010-10-05 17:54:42 +0000
3+++ src/bubble.c 2010-10-21 17:12:49 +0000
4@@ -2691,6 +2691,16 @@
5 {
6 priv->mouse_over = flag;
7 update_shape (self);
8+
9+ if (flag) {
10+ g_debug("mouse entered bubble, supressing timeout");
11+ bubble_clear_timer(self);
12+ } else {
13+ g_debug("mouse left bubble, continuing timeout");
14+ bubble_set_timeout(self, 3000);
15+ bubble_start_timer(self, TRUE);
16+ }
17+
18 }
19
20 }
21@@ -3121,6 +3131,22 @@
22 }
23
24 void
25+bubble_clear_timer (Bubble* self)
26+{
27+ guint timer_id;
28+
29+ if (!self || !IS_BUBBLE (self))
30+ return;
31+
32+ timer_id = GET_PRIVATE(self)->timer_id;
33+
34+ if (timer_id > 0) {
35+ g_source_remove (timer_id);
36+ bubble_set_timer_id(self, 0);
37+ }
38+}
39+
40+void
41 bubble_get_position (Bubble* self,
42 gint* x,
43 gint* y)
44
45=== modified file 'src/bubble.h'
46--- src/bubble.h 2009-10-20 08:51:11 +0000
47+++ src/bubble.h 2010-10-21 17:12:49 +0000
48@@ -193,6 +193,9 @@
49 gboolean trigger);
50
51 void
52+bubble_clear_timer (Bubble* self);
53+
54+void
55 bubble_get_position (Bubble* self,
56 gint* x,
57 gint* y);

Subscribers

People subscribed via source and target branches

to all changes: