[tomboy-list] Searching notes with Deskbar-Applet
sanfordarmstrong at gmail.com
Sun Nov 18 09:36:05 PST 2007
On Nov 18, 2007 9:12 AM, Sebastian Pölsterl <marduk at k-d-w.org> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> Sandy Armstrong schrieb:
> > On Nov 18, 2007 2:26 AM, Sebastian Pölsterl <marduk at k-d-w.org> wrote:
> >> However, instead of searching the XML file, I would like to see a method
> >> in the D-Bus interface of Tomboy that allows you to search all notes. It
> >> would be great if such a method would return the same results as the
> >> search dialog within Tomboy.
> >> What do you think, is it possible that such a method can be added during
> >> the current release cycle?
> > There is an outstanding bug  in Tomboy to add searching to the dbus
> > interface. It will require a fair bit of refactoring in our current
> > search code. If anybody is interested in tackling this I'd be happy
> > to provide some guidance. I'm not sure if Boyd or myself can actually
> > commit to doing the work this cycle.
> Great to see that you already had the idea if such method.
> I'm not familiar with Tomboy at all, but C#, how long do you think it
> would take me to implement this feature? If it's not too difficult I
> would step up and implement it.
Actually, it wouldn't really be too bad. The search code is coupled
to the GUI code in RecentChanges.cs, but it shouldn't be too hard to
break it up. I haven't looked too much into it, but you could
probably break some bits of the PerformSearch() method out into a
public static method, and then just add a new method in
RemoteControl.cs (which is where all the dbus methods are) that calls
the stuff in RecentChanges and returns a string array of note URIs.
Probably wouldn't take more than a few hours for a newbie to make a
rough patch? I'm happy to help with coding guidance and patch review,
preferably via that bugzilla bug.
By the way, I don't think the search code currently searches for note
tags. But that would be a Tomboy bug  that should be fixed this
cycle assuming we ship our note tagging code.
More information about the Tomboy-list