After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 465639 - Events not exposed over dbus
Events not exposed over dbus
Status: RESOLVED FIXED
Product: tomboy
Classification: Applications
Component: General
unspecified
Other All
: Normal enhancement
: ---
Assigned To: Tomboy Maintainers
Tomboy Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-08-11 09:51 UTC by John Carr
Modified: 2008-02-26 20:52 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Implement added, saved, renamed and deleted events to RemoteControl.cs (1.63 KB, patch)
2007-08-11 09:53 UTC, John Carr
none Details | Review
Fun test for attached patch :) (1.13 KB, text/x-python)
2007-08-11 14:52 UTC, John Carr
  Details
Dbus events - but no renamed event this time.. (1.35 KB, patch)
2007-08-11 15:15 UTC, John Carr
committed Details | Review
Test with 4 (commented out) ways to break (1.58 KB, text/x-python)
2007-08-25 08:16 UTC, John Carr
  Details

Description John Carr 2007-08-11 09:51:40 UTC
Applications that work with Tomboy over dbus don't know when a note has changed. Please implement event handlers so we can track Add, Modify and Delete operations.
Comment 1 John Carr 2007-08-11 09:53:51 UTC
Created attachment 93479 [details] [review]
Implement added, saved, renamed and deleted events to RemoteControl.cs

Here is my first attempt at this, might need cleaning up. Tested it against Conduit and it works :D

I'll write a minimal python script to demonstrate it works later if desired...
Comment 2 Sandy Armstrong 2007-08-11 12:12:36 UTC
John, this looks sweet (who knew it was so easy?).  I'd like to see some demo client code, and test it a bunch to see what happens when the dbus client is dead, etc.

I'm also not sure if we should expose the NoteRenamed event.  I know that sounds convenient, but the way our code currently works that event may be fired several times while editing the the note title...and it might not make sense for a dbus client to respond each time.  Just food for thought.  :-)

Thanks for the awesomeness!
Comment 3 John Carr 2007-08-11 14:52:09 UTC
Created attachment 93492 [details]
Fun test for attached patch :)

Apply my patch, compile, run tomboy. Start this test. Create, save and delete notes... You should see popups - its bottom right for me..
Comment 4 John Carr 2007-08-11 15:15:17 UTC
Created attachment 93496 [details] [review]
Dbus events - but no renamed event this time..

This removes the Renamed event from dbus and I think i had a typo in the Delete handler.
Comment 5 John Carr 2007-08-25 08:16:09 UTC
Created attachment 94306 [details]
Test with 4 (commented out) ways to break

At Sandy's request, I have added 4 crashers to the test. Enjoy.
Comment 6 Sandy Armstrong 2007-08-27 04:34:16 UTC
Committed in r1443, along with test.  I just modified the delete event to pass the title as well as the note URI.

The save event gets propagated quite frequently.  At some point we should address that.

Thanks for the work, John!