Bug 241531
Summary: | Notification action is never called | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Tim Waugh <twaugh> | ||||||||||
Component: | system-config-printer | Assignee: | Tim Waugh <twaugh> | ||||||||||
Status: | CLOSED RAWHIDE | QA Contact: | |||||||||||
Severity: | medium | Docs Contact: | |||||||||||
Priority: | medium | ||||||||||||
Version: | rawhide | CC: | lmacken | ||||||||||
Target Milestone: | --- | ||||||||||||
Target Release: | --- | ||||||||||||
Hardware: | x86_64 | ||||||||||||
OS: | Linux | ||||||||||||
Whiteboard: | |||||||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||||||
Doc Text: | Story Points: | --- | |||||||||||
Clone Of: | Environment: | ||||||||||||
Last Closed: | 2007-07-05 11:53:51 UTC | Type: | --- | ||||||||||
Regression: | --- | Mount Type: | --- | ||||||||||
Documentation: | --- | CRM: | |||||||||||
Verified Versions: | Category: | --- | |||||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||||
Embargoed: | |||||||||||||
Bug Depends On: | |||||||||||||
Bug Blocks: | 157324 | ||||||||||||
Attachments: |
|
Description
Tim Waugh
2007-05-27 12:03:38 UTC
Created attachment 155518 [details]
test-server.py
Created attachment 155519 [details]
test-client.py
Hmm, maybe pynotify.init() needs to be called before connecting to the bus. But why would that be? No, that isn't it. Here is a revised test case. WORKS FINE on Fedora Core 6: libnotify-0.4.2-5.fc6 notify-python-0.1.0-3.fc6 FAILS on Fedora 7: libnotify-0.4.4-2.fc7 notify-python-0.1.0-4.fc7 Created attachment 156211 [details]
test-client.py
Created attachment 156212 [details]
test-server.py
In fact, here is a much simpler test case: ==> #!/usr/bin/python import pynotify import gobject class Note: def __init__ (self, loop): self.loop = loop def show (self): n = pynotify.Notification ('title', 'text') n.set_timeout (pynotify.EXPIRES_NEVER) n.add_action ("configure", "Configure", self.configure) n.show () def configure (self, *args): print args self.loop.quit () pynotify.init ("foo") loop = gobject.MainLoop () n = Note(loop) n.show () loop.run () <== How to reproduce: 1. Run the python code 2. Click the 'Configure' button Actual results: Program continues to run. Expected results: Program displays output and stops. Additional information: Works fine in FC6, fails in F7. `notify-send foo` doesn't seem to even work in rawhide. 'notify-send foo' does work in rawhide now anyway, but the simple test case in comment #7 still fails to trigger the action (in rawhide). It does work in FC-6 and F-7. I installed the libnotify-debuginfo package and put a breakpoint on _action_signal_handler(). It was never called -- however, 'dbus-monitor --session' showed that the ActionInvoked signal was sent. dbus-1.0.2-4.fc7 dbus-glib-0.73-1.fc7 notification-daemon-0.3.7-4.fc8 libnotify-0.4.4-6.fc8 notify-python-0.1.0-4.fc7 Reassigned to libnotify owner. Oddly enough, a very similar testcase works: #!/usr/bin/env python import gobject import pynotify def foo_cb(n, action): print "button clicked" n.close() if __name__ == '__main__': pynotify.init ("foo") loop = gobject.MainLoop () n = pynotify.Notification("title", "text") n.set_timeout (pynotify.EXPIRES_NEVER) n.add_action ("foo", "foo", foo_cb) n.show() loop.run () Argh! I see the problem now with the test case in comment #7 -- n (the pynotify.Notification object) goes out of scope as soon as Note.show() returns..! Sorry for the noise. |