[tomboy-list] Note Addin
Matt Guo
matt at mattguo.com
Wed Jan 6 10:11:18 PST 2010
Hey, Thomas
I've updated the tomboy-image plugin, and now it can work with the
lastest tomboy.
And some explanation on how I implement the tomboy image attachment
(i.e. how and when I save/load the images):
1) ImageAddin.Initialize has following code:
Note.Saved += OnNoteSaved;
and in OnNoteSaved, I do the image saving. (acutally tomboy-image just
save the url and insertion point of the inserted images, and if some
other plugin wants to save the content of the images, its also
feasible). The saved info is a xml, and is stored as
System.IO.Path.ChangeExtension(note.FilePath, ".images");
e.g. I have those 2 files on my disk:
~/.local/share/tomboy/4a82fff0-6198-4df9-8ea4-f3bac388521e.images
~/.local/share/tomboy/4a82fff0-6198-4df9-8ea4-f3bac388521e.note
2) in ImageAddin.OnNoteOpened (which overiider NoteAddin.OnNoteOpened)
I load the image from the .images file, and insert them back into the note.
IMO, it count as that I digged existing tomboy API and found some way
to support some simple attachment functions, while I still look
forward to seeing a offical attachment framework so that all things
including storage and synchronization etc can be well mandged in a
consistent way.
On Wed, Dec 16, 2009 at 12:15 PM, Thomas Zieg <thomaszieg at gmail.com> wrote:
> To update, the warning I was getting was caused by the dependency version
> being 0.7 instead of 0.10.
>
> Is there an obvious reason for this? Did the addin system change between
> 0.7 and 0.10?
>
> Now there is no warning when I start Tomboy, but the addin is not visible
> anywhere. I am not sure if anyone has had luck with this addin with a more
> recent version of Tomboy?
>
> Thanks,
> Thomas
>
> On Tue, Dec 15, 2009 at 10:02 PM, Thomas Zieg <thomaszieg at gmail.com> wrote:
>>
>> Hi all,
>>
>> When trying to add the Tomboy-Image addin
>> (http://gitorious.org/tomboy-image/) in version 1.0, I get the following
>> warning message when starting tomboy: WARNING: The add-in
>> 'Tomboy.ImageAddin,0.1' is trying to extend '/Tomboy/NoteAddins', but there
>> isn't any compatible add-in defining this extension point
>>
>> Here is the portion of the TomboyImage.Addin.xml file with the extensions:
>> <Extension path="/Tomboy/NoteAddins">
>> <NoteAddin type="TomboyImage.ImageAddin" />
>> </Extension>
>>
>>
>> One thing that I noticed is that the other addins placed their classes in
>> sub-namespaces of Tomboy, e.g. namespace Tomboy.InsertTimestamp, but the
>> image addin was just using Tomboy, but not an actual sub-namespace.
>>
>> Is that a problem?
>>
>> Thanks for your help,
>> Thomas
>
>
> _______________________________________________
> Tomboy-list mailing list
> Tomboy-list at lists.beatniksoftware.com
> http://lists.beatniksoftware.com/listinfo.cgi/tomboy-list-beatniksoftware.com
>
>
--
B.R.
GUO Rui (Matt)
More information about the Tomboy-list
mailing list