Tinymail newsflash

Tinymail can now not only show attachments, it can also store them on a VFS destination.

But because GnomeVFS might be something that’s difficult to support on a mobile platform, I decided to go further than usual with the concept of shared libraries:

  • First I decoupled libtinymailui from it’s Gtk+ dependency and created a libtinymailui-gtk that implements the interfaces defined in libtinymailui. I did this in case somebody decides to write another user interface implementation. For example an ncurses or a qt one.
  • Then I created libtinymail-gnomevfs which at this moment only implements a VfsStream. I reused most of its code from EmVFSStream which you can find in Evolution. It’s stuff like this that illustrates my opinion about that we should split Evolution in multiple reusable libraries. Not all Evolution code is bad or bloated, its good pieces just aren’t very reusable at this moment. Note that this library can be implemented differently (for example by not using gnomevfs but something more suitable for your mobile platform). Look at the source code, it would be extremely easy to do that.
  • Then I adjusted tinymails MsgWindow Gtk+ implementation in such a way that it gets the selected MsgMimePart from the IconView and writes it to the VfsStream that gets created using the uri that the filechooser dialog returned.

Somebody on IRC asked me to add the possibility to create plugins in Python. I might sooner or later introduce a plugin system. I already decided to use the strategy design pattern for the plugin system. Once such infrastructure is in place, I might create Python plugin infrastructure using the decorator design pattern. I’ll create a plugin that decorates a normal plugin type.

But I’ll first try to finish tinymails basic functionality a bit. Still on the todo-list is of course the possibility to create e-mails and to send them using an SMTP service. And implementing a GeckoStream like TextBufferStream so that I can write HTML-mails to a Gecko component. Perhaps also a stream that can write to an Opera HTML widget.