Coccinella - Matben's blog
/matben
Blog of Mats Bengtsson
enMats Bengtsson 1959 - 2008
/mats-bengtsson
<div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><blockquote>
<p><img title="Picture of Mats Bengtsson" src="/stuff/mats.jpg" alt="Mats Bengtsson in Sweden" width="500" height="436" /></p>
<p><cite>Mats Bengtsson, the founder of Coccinella, passed away on November 29, 2008. He was born in 1959 and had a very successful career in academics and specifically in his field of interest, <a href="http://en.wikipedia.org/wiki/Theoretical_physics">theoretical physics</a>. Early in school he distinguished himself particularly in mathematics and he even produced his own math books in primary school when his teachers were not able to help him further on. He graduated at <a href="http://en.wikipedia.org/wiki/Lund_University">Lund university</a> as an engineer, continued as a research student in theoretical physics and presented his doctoral thesis, ”<a href="http://en.scientificcommons.org/33798874">Parton showers in a phenomenological context</a>”, at the age of 28 years. He spent a post-doc period in Germany (Aachen), but previously he had also been at the <a href="http://cern.ch/">Cern laboratory</a>.</cite></p></blockquote>
<!--break-->
<blockquote><p><cite>After his exams he started to work at <a href="http://en.wikipedia.org/wiki/ABB_Asea_Brown_Boveri">ABB</a> for a short period of time, before he ended up in <a href="http://en.wikipedia.org/wiki/Link%C3%B6ping">Linköping</a> where he received a research position at <a title="Totalförsvarets forskningsinstitut" href="http://www.foi.se/FOI/templates/Page____6630.aspx">FOI</a>, the Swedish Defence Research Agency. In Linköping he and his partner Mari stayed for quite a few years. During his entire life Mats had several hobbies such as <a title="Aerial sport of gliding" href="http://en.wikipedia.org/wiki/Gliding">gliding</a> and <a href="http://en.wikipedia.org/wiki/Rail_transport_modelling">model railroading</a>. Unfortunately, Mats was struck by a chronic condition during the last 15 years of his life, but was able to work hard in periods on his special project, the Coccinella program which is an interactive communicative Internet program. He initiated and developed this computer program and released it as open-source on the Net so others may contribute to the program’s development and refinement over time. Hopefully Coccinella will remain and be continuously upgraded in Mats’ spirit and visions.</cite></p>
<p><b>--<br />By Mari Lundberg, Mats girlfriend</b></p>
</blockquote>
<p>Coccinella 0.96.12 <em>*will*</em> be released on March 18, 2009. However, this release will not introduce many changes because Mats was the driving force of the Coccinella project. Therefore, I will blog over the next few months about interesting projects and challenging features that Mats had on his TODO list. Hopefully, this will interest you to build further on the shoulders of a giant!</p></div></div></div><div class="field field-name-taxonomy-vocabulary-2 field-type-taxonomy-term-reference field-label-above"><div class="field-label">Story type: </div><div class="field-items"><div class="field-item even"><a href="/matben" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">Matben's blog</a></div><div class="field-item odd"><a href="/devel" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">Development</a></div><div class="field-item even"><a href="/sander" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">Sander's blog</a></div></div></div>Tue, 13 Jan 2009 22:30:19 +0000sander312 at /mats-bengtsson#commentsTcl/Tk - Recent Advances
/tcl-tk-recent-advances
<div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><div style="float: right; width: 197px; margin: 0 0 10px 10px;"><img title="Ladybug on the move" src="/stuff/warm-ladybug-1.jpg" alt="Ladybug with warm background" width="197" height="240" /><br /><em>Credit: <a title="freebird4" href="http://flickr.com/photos/freebird4/432305693/" rel="nofollow">freebird4</a>, License: <a title="Creative Commons Attribution-Noncommercial 2.0 Generic" href="http://creativecommons.org/licenses/by-nc/2.0/deed.en" rel="nofollow">by-nc</a></em></div>
<p>There has been a lot of news in the Tcl/Tk community the last month or so, and I thought it's time to compile them here since <a href="/download">Coccinella</a> is written in Tcl. Tcl's windowing toolkit, Tk, has been "known" to be ugly and outdated. With the 8.5 release last December the tile package, now named ttk (Themed Tk), is included in the core which brings true native widgets on Windows (yes, Vista too) and Mac. Since Mac is my native platform, I can tell you that Tk beats both Qt and gtk, but perhaps I haven't seen the latest of them.</p>
<!--break-->
<p>The question is then, where does this put Linux/Unix? There are a number of themes included in ttk which looks OK on these platforms, but there is nothing exactly like Qt or gtk. Instead, there have been a <a href="http://www.ellogon.org/petasis/index.php?option=com_content&task=view&id=24&Itemid=40">tileqt package</a> written by Georgios Petasis which has delivered true Qt widgets. With ttk in the core, there have been some initial problems getting this to work due to missing stub tables etc., but it should work with the latest Tcl/Tk 8.5.3 release.</p>
<p>Just a few days ago the very same person <a href="http://groups.google.com/group/comp.lang.tcl/browse_thread/thread/854288686e568ebb#">announced</a> <a href="http://www.ellogon.org/petasis/index.php?option=com_content&task=view&id=29&Itemid=45">tilegtk</a> which does the same thing for the gtk toolkit. This is very, very, good news. Imagine that you can switch theme, and toolkits, on the fly without any program restart. This already works with the other themes and will likely work with tilegtk as well. My question to you is: which other toolkit has this flexibility?</p>
<p>I have already mentioned my <a href="/svg-graphics">recent advances with tkpath</a> in this blog thread, and I will mention it again. This is the super canvas which is lacking in Tk, and which will bring not only tight SVG support, but also make Tk come on par with canvas like widgets from other toolkits. Still more to do.</p>
<p>Recently my attention turned to <a href="http://webkit.org/">WebKit</a> which has its <a href="http://en.wikipedia.org/wiki/WebKit">history</a> of its own. Dual licensed as LGPL/BSD it fits the Tcl community well. I have looked at some of the sources, and judging from the wxWidgets backend, it doesn't look terribly difficult to make it a Tk widget, but there could be show stoppers, like event loop integration etc.</p>
<p>When all this comes together it will make Tk a very competitive toolkit.</p>
</div></div></div><div class="field field-name-taxonomy-vocabulary-2 field-type-taxonomy-term-reference field-label-above"><div class="field-label">Story type: </div><div class="field-items"><div class="field-item even"><a href="/matben" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">Matben's blog</a></div><div class="field-item odd"><a href="/devel" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">Development</a></div></div></div>Fri, 08 Aug 2008 12:04:25 +0000matben274 at /tcl-tk-recent-advances#commentsSVG Graphics
/svg-graphics
<div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p>Just released is my tkpath package version 0.3.0 which for the first time brings a new canvas widget to Tcl/Tk which conforms to a more "modern" 2D drawing model found in <a href="http://www.w3.org/TR/SVG11/">SVG</a>.</p>
<p>My motiviation for producing close to 43 thousand lines of C code for just this widget is because it is necessary for adding SVG graphics to the whiteboard in Coccinella. It doesn't claim to be a full featured SVG viewer. In fact, there is no support for translating svg tkpath yet, but since I have carefully designed the widget with SVG in mind, it shouldn't be too difficult to write such script code. SVG is really big and I don't claim every part is supported. For instance, clipping is yet unsupported. Remember, it is still version 0.3.0. </p>
<p>For the curious you can visit the <a href="http://tclbitprint.sourceforge.net/">SourceForge page</a> where some screenshots can be found and the complete sources can be checked out. Before I have written a svg2tkp importer I don't have much fancy graphics to show.</p>
</div></div></div><div class="field field-name-taxonomy-vocabulary-2 field-type-taxonomy-term-reference field-label-above"><div class="field-label">Story type: </div><div class="field-items"><div class="field-item even"><a href="/matben" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">Matben's blog</a></div><div class="field-item odd"><a href="/devel" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">Development</a></div></div></div>Thu, 17 Jul 2008 13:31:39 +0000matben256 at /svg-graphics#commentsTcl/Tk 8.5
/node/236
<div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p>I have just removed the compatibility code for Tcl/Tk 8.4 in cvs, and Coccinella therefore now requires Tcl/Tk 8.5. Since 8.5 was released already in December last year I thought that five months should be enough to allow for people running Coccinella from sources to get a Tcl/Tk 8.5 installation. </p>
<!--break--><p>Well, there is not much to install if you run a single executable <a href="http://www.equi4.com/tclkit/download.html">tclkit</a> which can be found for most platforms. If you don't find your platform there it is not difficult to build Tcl/Tk yourself. Since the tile package is contained in the core Tk of 8.5, only the treectrl and tkpng packages require additional builds.</p>
<p>Speaking of 8.5, the direct reason the switch is made now is that I used the <a href="http://tcl.tk/man/tcl8.5/TclCmd/dict.htm">dict command</a> for the new themeing engine. As typical with Tcl, commands (and manual pages) look deceptively simple. The hardcore programmer who is used to pointers and reference counts can't understand that Tcl has it all built in. Dictionaries can be seen as a hash table that maps from arbitrary strings to arbitrary strings. But here it can also contain other dicts in a recursive manner. This makes it very useful for representing a kind of arrays with multiple keys. Before 8.5, the standard way was to form a string like arrayName($key1,$key2) where "$key1,$key2" was used to lookup the value. This was clearly very ugly. With dicts you set values as:</p>
<pre>
dict set myDict $key1 $key2 ... $value
</pre><p>which implicitly creates a hierarchy of dictionaries.</p>
</div></div></div><div class="field field-name-taxonomy-vocabulary-2 field-type-taxonomy-term-reference field-label-above"><div class="field-label">Story type: </div><div class="field-items"><div class="field-item even"><a href="/matben" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">Matben's blog</a></div><div class="field-item odd"><a href="/devel" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">Development</a></div></div></div>Tue, 27 May 2008 14:40:49 +0000matben236 at /node/236#commentsSVG graphics in Tk
/node/182
<div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p>The whiteboard in Coccinella has now come one step further to use <a href="http://www.w3.org/TR/SVG11/">SVG graphics</a>. Well, it's not there, yet, but an important step has been taken.</p>
<p>The <a href="http://www.tcl.tk/man/tcl8.5/TkCmd/canvas.htm">canvas widget</a> in Tcl/Tk is way too limited to use as a basis to implement SVG support on the scripting level. For some time I have therefore developed the <a href="http://tclbitprint.sourceforge.net/">tkpath package</a> which adds all needed drawing elements from SVG, see <a href="http://tclbitprint.sourceforge.net/tkpath/cairo/index.html"> some shots</a>, using the C plug in structure. However, this is too limited for SVG and its underlying XML tree structure. I have therefore made a new canvas widget, based on code from the existing Tk canvas, but instead of having a flat display structure, I have now implemented a complete tree structure, including a permanent root group item, which mirrors the XML structure. Some code come from the existing <a href="http://www.tcl.tk/man/tcl8.5/TkCmd/ttk_treeview.htm">ttk::treeview</a> and <a href="http://tktreectrl.sourceforge.net/treectrl.html">TreeCtrl</a> widgets which have a similar tree layout.</p>
<p>Added to this widget is then all the items, styles, gradients etc. from my tkpath package. My aim is to keep 100% compatibility with the old canvas, which is needed to get acceptance from the Tcl community. All items from tkpath, which have SVG counterparts, also have a -parent option which can be reconfigured to be any group item. Such an option hasn't been added to the standard canvas items which instead, by default, always will be child of the root item. </p>
<p>Not all things have been implemented. One major part is the inheritance mechanism where elements get there style and display options from its parent group items. In principle, each item, or element, must keep track of its own options as well as its inherited display options. These are kept in a Tk_PathStyle struct but having two of these would become much to heavy. On the other hand, recomputing the inheritance chain each time an item is displayed, or hit tested etc., is too cpu intensive. </p>
<p>So while most things are in place, other need some more thoughts. Nothing released yet, and nothing in cvs, yet.</p>
</div></div></div><div class="field field-name-taxonomy-vocabulary-2 field-type-taxonomy-term-reference field-label-above"><div class="field-label">Story type: </div><div class="field-items"><div class="field-item even"><a href="/matben" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">Matben's blog</a></div><div class="field-item odd"><a href="/devel" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">Development</a></div></div></div>Sun, 10 Feb 2008 14:46:48 +0000matben182 at /node/182#commentssipub + SVG = true!
/node/132
<div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p>That cryptic title means: <a href="http://www.xmpp.org/extensions/xep-0137.html">Stream Initiation using Publish Subscribe</a> and <a href="http://www.w3.org/Graphics/SVG/">Scalable Vector Graphics</a> are living well together. That didn't made you any wiser, did it? The long story then.</p>
<p>Several efforts have been made to add a whiteboarding protocol to XMPP based on SVG, which is the web standard for 2D graphics, but a dynamic environment like XMPP is very far from a static web situation. In particular, there are <a href="/memo/sync">synchronization issues</a> and a few other things. One of the other things is that image entities are referenced using a HTTP link, and that wont work well for clients which normally live behind NATs and firewalls etc. </p>
<p>XMPP specifies a number of file transfer protocols (<a href="http://www.xmpp.org/extensions/xep-0095.html">si</a>, <a href="http://www.xmpp.org/extensions/xep-0047.html">ibb</a>, <a href="http://www.xmpp.org/extensions/xep-0096.html">ftrans</a>, <a href="http://www.xmpp.org/extensions/xep-0065.html">bytestreams</a>) and a runner up is something based on jingle using UDP instead of TCP. The problem with all these standard file transfer protocols is that they assume that files are pushed to users, instead of being pulled (or GET) which is the situation on the web. The <a href="http://www.xmpp.org/extensions/xep-0137.html">sipub protocol</a> is a variant where users can "pull", or "get" a file, just as getting a HTTP link.</p>
<p>It turned out that it was pretty straightforward to add it to my Coccinella SVG protocol. In a whiteboard chat session, if a user opens an image the following stanza is sent:</p>
<pre>
<message to='[email protected]/z' type='chat'>
<thread>768681</thread>
<x xmlns='http://jabber.org/protocol/svgwb'>
<image x='80.0' y='80.0'
xlink:href='http://../antivirus.png'
id='111958708' width='32' height='32'>
<sipub xmlns='http://jabber.org/protocol/si-pub'
from='[email protected]/x'
id='1a3b2315-9ec6bdc'
mime-type='image/png'
profile='http://jabber.org/protocol/si/profile/file-transfer'>
<file xmlns='http://jabber.org/protocol/si/profile/file-transfer'
name='antivirus.png'
size='2074'/>
</sipub>
</image>
</x>
</message>
</pre><p> which is just an ordinary SVG image, but with a sipub element as a child. The HTTP link can be used for something else, or just ignored. A variant could be to use the XMPP URI "recvfile" <a href="http://www.xmpp.org/extensions/xep-0096.html#registrar-querytypes-recvfile">syntax</a> but I see no need to have another syntax when we already have the xml elements. </p>
<p>This is now implemented in the cvs version but must be switched on by <a href="/node/103">some command line arguments</a>. I should say that this is only made for the SVG image element, but I see no particular problem to use it also for foreignObject elements, or any other elements which reference an external entity. Also implemented is the XMPP "recvfile" URi syntax, but it is unclear how useful it is.</p>
</div></div></div><div class="field field-name-taxonomy-vocabulary-2 field-type-taxonomy-term-reference field-label-above"><div class="field-label">Story type: </div><div class="field-items"><div class="field-item even"><a href="/matben" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">Matben's blog</a></div><div class="field-item odd"><a href="/devel" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">Development</a></div></div></div>Tue, 27 Nov 2007 08:49:24 +0000matben132 at /node/132#commentsStyled Chats
/node/130
<div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p>Using a HTML/CSS rendering machine for user interfaces seem popular these days as it gives extended ways for customization using style sheets. And many people are used to hack CSS files from the web which extends the group of possible contributors. Several clients use it for the chat window, <a title="Message styles on the Adium website" href="http://www.adiumxtras.com/index.php?a=search&cat_id=5">Adium</a> on Mac OS X, <a title="How to change Google Talk chat theme" href="http://www.google.com/support/talk/bin/answer.py?answer=35751">Gtalk</a> on Windows, <a title="Chat styles on kde-look.org" href="http://www.kde-look.org/index.php?xcontentmode=26">Kopete</a> on linux.</p>
<p>To my knowledge, these clients rely on platform specific rendering APIs, and doing this on an x-platform client like Coccinella would be very difficult and create a very large maintenance burden. Since Coccinella is using <a href="http://www.tcl.tk/">Tk</a> for its user interface, which is an extremely portable toolkit and has a very high level API, this would require a HTML/CSS rendering widget written entirely for Tk. Fortunately, such a project is running and is called <a href="http://tkhtml.tcl.tk/">Tkhtml3</a> (Tcl/Tk projects usually take very straight names). People who know this business understand that writing such a widget from scratch is a giant undertaking, and not many toolkits have succeeded. </p>
<p>Tkhtml3 is still a <a title="cvs timeline showing recent Tkhtml3 events" href="http://tkhtml.tcl.tk/cvstrac/timeline">fast moving target</a> and many things aren't working as they should, but it looks very promising. I couldn't resist adding support for <a href="http://coccinella.cvs.sourceforge.net/coccinella/coccinella/jabber/ChatTheme.tcl?view=log">styled chats</a> in Coccinella, just for the fun of it. <img src="/stuff/chatStyles.png" width="490" height="427" alt="Coccinella chat window using message style" title="Chat window showing a message style" /><br />
The only docs I had was a <a title="Kopete Chat Window Style Guide" href="http://kopete.kde.org/chatwindowstyleguide/index.html">page from Kopete</a> which I don't know how well it reflects any kind of standard, if there is any. It is clear that the chat style theme directory structure resembles a Mac OS X bundle, and it is not far fetched that it comes from Adium. As I've already said, it is an experiment which looks promising, and not all themes render correctly. But it is x-platform! I built it on Mac OS X (10.2), and on MinGW on Windows just with configure/make. Straight out of the box! <a title="People who contributed to Coccinella" href="/people">Antonio</a> had it running on Linux without any instructions. </p>
</div></div></div><div class="field field-name-taxonomy-vocabulary-2 field-type-taxonomy-term-reference field-label-above"><div class="field-label">Story type: </div><div class="field-items"><div class="field-item even"><a href="/matben" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">Matben's blog</a></div><div class="field-item odd"><a href="/devel" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">Development</a></div></div></div>Wed, 21 Nov 2007 13:55:23 +0000matben130 at /node/130#commentsSubscription Process
/node/127
<div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p>The <a href="http://www.xmpp.org/rfcs/rfc3921.html#int">subscription process</a> is notoriously problematic in XMPP. While doing extended support for multiple simultaneous subscriptions, I just noted that if I deny a subscription by sending "unsubscribed", that used to be all that was needed.</p>
<p>But now I see that there is still a roster item in my roster with subscription="none". It looks like ejabberd just adds it there and does not remove it when I deny the subscription. Going back to the <a href="http://www.xmpp.org/rfcs/rfc3921.html">XMPP "bible"</a> to find out what actually shall happen, I see that it is allowed by the server to do so for tracking purposes, but it should be cleaned up after a contact denies. I cite sect. 8.2.1: "Note: If the contact's server previously added the user to the contact's roster for tracking purposes, it MUST remove the relevant item at this time." </p>
<p>From a users perspective I find it doubtful that I get a roster item while I'm in the middle of processing a subscription request. I think a server shall handle this tracking internally and not push items to a user before it has had any chance to reject or deny.</p>
</div></div></div><div class="field field-name-taxonomy-vocabulary-2 field-type-taxonomy-term-reference field-label-above"><div class="field-label">Story type: </div><div class="field-items"><div class="field-item even"><a href="/matben" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">Matben's blog</a></div><div class="field-item odd"><a href="/devel" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">Development</a></div></div></div>Mon, 19 Nov 2007 13:58:01 +0000matben127 at /node/127#commentsSpell Checking
/node/114
<div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p>Spell checkers have found their way from word processors, email clients, and now, to chat clients. Maybe this is a sign of chatting reaching the mainstream audience, I don't know. In any case there is now a first implementation of spell-as-you-type function in Coccinella using the ispell or aspell command line tools.</p>
<p>I have no idea of how Firefox implements spell checking, but they have a nice feature for downloading extra dictionaries. Just right click a text field and select "Languages > Add dictionaries..." to take you to their web site. As a first attempt I have added the usual spell-as-you-type checking, popup menu to get suggestions to replace word, selection of dictionaries, and possibility to add a word to current dictionary. All is implemented using the "pipe" mode of ispell and aspell. It works on all platforms. I have some remaining questions regarding encoding issues, but else things are working.</p>
<p>It may seem like a simple task to implement spell-as-you-type but there are a number of situations to take care off. First, since spell checking can be expensive we don't want to check unnecessarily. Second, a word must be checked when we can assume we have finished typing it, or if we are editing it. Simple as it may sound, difficult to make ad-hoc rules that cover all situations. This issue can be traced at our <a href="https://bugs.launchpad.net/coccinella/+bug/144824">tracker</a>.</p>
</div></div></div><div class="field field-name-taxonomy-vocabulary-2 field-type-taxonomy-term-reference field-label-above"><div class="field-label">Story type: </div><div class="field-items"><div class="field-item even"><a href="/matben" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">Matben's blog</a></div><div class="field-item odd"><a href="/devel" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">Development</a></div></div></div>Fri, 26 Oct 2007 13:15:29 +0000matben114 at /node/114#commentsThe Secret Gardens of DnD
/node/112
<div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p>The Drag and Drop (DnD) areas of an application is like the fields in a garden. Some areas, or widgets, can deliver something, acting as a drag source, like your potato field you have in your backyard (You say you don't have any?. Strange!), while other receive something, acting as a drop source. Some areas are both sources and targets. And you can't know which role a widget has until you have actually tested.</p>
<!--break--><p>As an example, try to drag a simple word to Firefox. If I drag the word "exit" to Firefox, it tries to open <a href="http://www.exit.se">http://www.exit.se</a>. Good or bad?</p>
<p>In an <a href="/node/110">earlier post</a> I presented the DnD internal of the roster. This time I will give a snapshot of what other DnD you can do. Starting with the roster as a drag source, it can deliver data in two formats, text/plain and text/uri-list. The latter is just a list of URI encoded files. The text/plain supplies data in a format that an application must have any chance to understand, and I just picked a comma separated list of bare JID URIs, like:</p>
<pre>xmpp:[email protected], xmpp:[email protected], ...</pre><p>If you drag a group, or even the online/offline folders, all users within that tree will be delivered. Also the Coccinella drop targets must understand this format.</p>
<p>If you drag a single contact, a group, or the online/offline folders to your desktop, you will get a file for each contact in a platform dependent way. If you open such a file, which contains an URI link, it will poke Coccinella to send a message to that person. Currently this works only on Windows. </p>
<p>Then there are tons of drop targets. Drag contacts to the (1-1) chat window and it will initiate an invitation to a newly created common chat room. Do the same thing with the group chat window and it will invite all dropped users. If you already have an invitation dialog, drop contacts on the Contact ID field, and the dialog will adjust to allow a field for each contact. Actually, most dialogs that accept a JID is a drop target for an XMPP URI. </p>
<p>To send a file to an online contact, just drag it to the roster and drop it over the contact. Cool! Change your avatar by dropping an image file to the avatar menu button in the roster window, or on your own vCard. You can also get another contact's avatar just by open its vCard and drag the image to your desktop to get an image file with the contacts bare JID as its name, but with the correct file extension. The same works from the avatar in the chat dialog.</p>
<p>I rely on the <a href="http://sourceforge.net/projects/tkdnd/">tkdnd extension</a> for this and it hasn't been ported to Mac OS X. I guess I have to do it myself some sunny day...</p>
</div></div></div><div class="field field-name-taxonomy-vocabulary-2 field-type-taxonomy-term-reference field-label-above"><div class="field-label">Story type: </div><div class="field-items"><div class="field-item even"><a href="/matben" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">Matben's blog</a></div><div class="field-item odd"><a href="/devel" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">Development</a></div></div></div>Fri, 19 Oct 2007 07:29:54 +0000matben112 at /node/112#comments