Bug 471465 - gnome-applet-timer never stops pulsing
gnome-applet-timer never stops pulsing
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: gnome-applet-timer (Show other bugs)
10
All Linux
medium Severity medium
: ---
: ---
Assigned To: Christoph Wickert
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-11-13 15:43 EST by Will Woods
Modified: 2009-01-14 22:10 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-14 22:10:20 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
timer-applet-2.0.1-stop-pulsing.patch (779 bytes, patch)
2008-11-13 15:43 EST, Will Woods
no flags Details | Diff
Patch to fix notify problem (884 bytes, patch)
2008-12-24 10:16 EST, Paul W. Frields
no flags Details | Diff
Patch that fixes notify problem, and timer recurrence (1.04 KB, patch)
2008-12-24 10:29 EST, Paul W. Frields
no flags Details | Diff
Patch that *really* fixes notify problem, and timer recurrence (I hope) (1.21 KB, patch)
2008-12-24 11:14 EST, Paul W. Frields
no flags Details | Diff

  None (edit)
Description Will Woods 2008-11-13 15:43:24 EST
Created attachment 323497 [details]
timer-applet-2.0.1-stop-pulsing.patch

The gnome timer applet never stops pulsing after a timer completes successfully. This is pretty annoying. It seems like the state-change signal is not being fired/caught properly, but I'm not sure why.

The attached patch fixes the bug by doing _stop_pulsing_button() when the applet is clicked in a FINISHED state.
Comment 1 Christoph Wickert 2008-11-15 15:43:03 EST
Sorry I did not respond erlier, I was busy with ambassadors action and Xfce. I will look into the patch later this week I promise.
Comment 2 Christoph Wickert 2008-11-25 17:12:35 EST
What exactly is your patch supposed to do? For me (still on F9) the applet stops pulsing when I click it once it's finished and I don't see this a change in it's behavior with your patch applied.
Comment 3 Bug Zapper 2008-11-26 00:20:24 EST
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 4 Zing 2008-11-27 22:52:21 EST
I just upgraded to fc10 from fc9 and I do see the behaviour noted in the bug report.

The problem is exactly that in fc10, once the timer finishes and starts pulsing, it doesn't stop pulsing when you click on it.  You have to basically remove from panel and re-add it.

I really have no idea beyond this why it happens or who's at fault, etc., but I've locally applied the attached patch and it works for me.
Comment 5 Zing 2008-11-28 01:01:25 EST
Update: although the patch allows you to stop the pulsing, the timer is then left in a weird state (blue circle here).  Any further timer countdowns that are set don't trigger a notification or sound.
Comment 6 Christoph Wickert 2008-11-28 08:32:05 EST
Now that I have upgraded to F10 I reproduce the bug. The applet never stops pulsing, even when clicked.
Comment 7 Michael Schwendt 2008-12-23 13:42:05 EST
Two observations:

1) Clicking the flashing status icon of a "Finished" timer run works around the problem. Don't click away the notification dialog.

2) Modifying controllers/TimerApplet.py to remove the [pynotify related] self._notifier begin() and end() calls makes the problem disappear, too.
Comment 8 Paul W. Frields 2008-12-23 23:27:51 EST
Yup, something pynotify related here, since the following error occurs on the pynotify.Notification object 'closed' signal:

TypeError: _on_notification_closed() takes exactly 3 arguments (4 given)

If you choose option 1 from comment #7, you'll need to be quick -- once the notification disappears, you're stuck.  It would be super if a smarter PyGTK person looked into this.
Comment 9 Michael Schwendt 2008-12-24 04:03:01 EST
bug 471496 (libnotify) is what I've run into. Building it without the patch fixes this bug. Alternatively, one needs to "fix" _on_notification_closed to match the changed API.
Comment 10 Paul W. Frields 2008-12-24 10:16:01 EST
Created attachment 327818 [details]
Patch to fix notify problem

This patch takes care of the pulsing problem and properly resets the timer.  But there still seems to be a problem with the notification update, which is supposed to reappear every 60 seconds if the timer's not acknowledged.

I'm not sure whether we can expect a libnotify change, so I'm including the patch here for review and further work.
Comment 11 Paul W. Frields 2008-12-24 10:29:08 EST
Created attachment 327819 [details]
Patch that fixes notify problem, and timer recurrence

Ah, I figured out this time what Michael had clearly pointed out.  This new patch actually makes everything work swimmingly here.  Maybe we can get the maintainer to accept, issue a new package, and work with upstream to get this accepted there?
Comment 12 Paul W. Frields 2008-12-24 10:40:14 EST
Comment on attachment 327819 [details]
Patch that fixes notify problem, and timer recurrence

My testing was faulty, so I apologize for spamming this bug.  Neither of these patches fully fixes the problem.
Comment 13 Michael Schwendt 2008-12-24 11:07:07 EST
Yes, adding the extra "reason" arg to the callback function is not enough. I've tried that, too, but then other tracebacks happen in several places [in glib close(), in pulsebutton] - all that is not reproducible with libnotify reverted to the old API.

libnotify upstream has reverted the patch (comment 9) anyway and wrapped it into a new function [notify_notification_get_closed_reason()].
Comment 14 Paul W. Frields 2008-12-24 11:14:40 EST
Created attachment 327821 [details]
Patch that *really* fixes notify problem, and timer recurrence (I hope)

OK, at the risk of becoming the most laughed-at FPL in Fedora history (or did that already happen?), I'm sending one more patch.  I think I got the testing right.  By way of explanation:

* Added a parameter to the _on_notification_closed() function to capture the new "reason" int that's in the patched libnotify, since there's no telling if/when that will be fixed in F-10
* Only clear _hander_id if it still exists
* Only close the notification if it still exists (i.e. if the user ignores the notification bubble while visible and clicks the timer instead)

I'm now running a patched RPM here and everything seems to work as it should.  I tested these uses:

* Clicking the notification, then the timer to reset
* Clicking the notification, wait to ensure the new reminder notification appears in 60 sec
* Wait for the notification to disappear, wait to ensure the reminder notification appears in 60 sec
* Click the timer to reset, ignoring the notification

All seems to work as intended here, with libnotify-0.4.4-12.fc10.  Sorry for the earlier spam and I hope this patch is acceptable or at least helpful to someone.
Comment 15 Michael Schwendt 2008-12-24 11:38:13 EST
You could "import glib" and "except glib.GError" instead of catching and ignoring all exceptions.

Good enough as a work-around.

libnotify 0.4.5 will change it again. ;)
Comment 16 Christoph Wickert 2009-01-02 23:34:22 EST
Thanks for all the hints. I will look at this this weekend on my F10 box.
Comment 17 Christoph Wickert 2009-01-04 13:57:17 EST
(In reply to comment #15)
> You could "import glib" and "except glib.GError" instead of catching and
> ignoring all exceptions.

That's what I did in gnome-applet-timer-2.0.1-7.fc10.
Comment 18 Fedora Update System 2009-01-04 14:00:37 EST
gnome-applet-timer-2.0.1-7.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/gnome-applet-timer-2.0.1-7.fc10
Comment 19 Fedora Update System 2009-01-04 15:38:02 EST
gnome-applet-timer-2.0.1-8.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/gnome-applet-timer-2.0.1-8.fc10
Comment 20 Christoph Wickert 2009-01-04 15:43:17 EST
Uh, the package from comment #18 crashed upon login, so I build gnome-applet-timer-2.0.1-8.fc10 wit Paul's patch. Works fine here, please test.
Comment 21 Michael Schwendt 2009-01-05 05:15:10 EST
My comment 15 referred to Paul's patch in comment 14, which could be improved in its first try...except block.

Nowhere did I mean that you could do what you've tried in -8.fc10
Comment 22 Christoph Wickert 2009-01-05 10:29:49 EST
(In reply to comment #21)
> My comment 15 referred to Paul's patch in comment 14, which could be improved
> in its first try...except block.

Thanks for the clarification.

> Nowhere did I mean that you could do what you've tried in -8.fc10

You mean -7.fc10, right?
Comment 23 Fedora Update System 2009-01-05 19:07:10 EST
gnome-applet-timer-2.0.1-9.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/gnome-applet-timer-2.0.1-9.fc10
Comment 24 Fedora Update System 2009-01-07 04:37:30 EST
gnome-applet-timer-2.0.1-9.fc10 has been pushed to the Fedora 10 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update gnome-applet-timer'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-0228
Comment 25 Fedora Update System 2009-01-14 22:10:16 EST
gnome-applet-timer-2.0.1-9.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.