Support for JEP-0145: Annotations

Bug #140336 reported by sander
2
Affects Status Importance Assigned to Milestone
Coccinella
Fix Released
Wishlist
buzzdee

Bug Description

Maybe support for this XEP would be nice?:
http://xmpp.org/extensions/xep-0145.html

Maybe you can copy some code from Tkabber (at least it can be
tested with Tkabber)?:
http://jabberstudio.org/cgi-bin/viewcvs.cgi/cvs/tkabber/tkabber/plugins/gen
eral/annotations.tcl?view=markup

sander (s-devrieze)
Changed in coccinella:
importance: Medium → Wishlist
sander (s-devrieze)
Changed in coccinella:
assignee: nobody → matsben
Revision history for this message
buzzdee (sebastia) wrote :

To use XEP-0145, XEP-0049 is needed.
I created a patch to implement XEP-0049 (jabberlib/private.tcl)
I found that XEP-0049 was already used to store GroupChat bookmarks, therefore I removed some code out of jabber/GroupChat.tcl and now use methods provided by the new part of jlib::private there.
So this works "again" with the XEP-0049 part in a separate file.

Further the patch contains a jabberlib/annotations.tcl file which implements XEP-0145.
Due to the fact that it is not yet used anywhere, it is untested ;)

I'll go try integrating it into jabber/UserInfo.tcl.
When I do so, should I search for Notes.tcl and see whether I can find an "old" note, which subseqently would be stored onto the server and removed from the Notes.tcl when the user hits the save button?
Or could I just ignore any existance of a local Notes.tcl file, that would make it probably easier to implement the stuff.

Anyways, as both XEP-0049 and XEP-0145 are historical specifications, I'm asking whether it will get included into Coccinella at all this way? Otherwise I'd stop here and just take it as a refreshing/learning TCL session ;)

cheers

buzzdee (sebastia)
Changed in coccinella:
status: New → In Progress
Revision history for this message
sander (s-devrieze) wrote :

Both XEPs are historical, but this is no problem (read http://xmpp.org/extensions/xep-0001.html#types-Historical ). Also, both XEPs are today "Active" instead of "Experimental" (at the time when I wrote the description). So, yes it will be included, but only as long as my computer does not explodes ;-) Please go ahead!

Coccinella still is alpha software so it would be no problem to skip such code.

PS: did you copied code from Tkabber as I mentioned in the bug description? If so, this may be a problem as I wrote that description when Coccinella still was GPLv2 licensed (today GPLv3, besides some parts which are BSD). I m not sure, but Tkabber possibly still is GPLv2 so that may be a problem.

Changed in coccinella:
assignee: Mats (matsben) → buzzdee (sebastia)
Revision history for this message
buzzdee (sebastia) wrote :

The only thing I copied from tkabber was the idea to put each XEP into a separate file. I took a look at it, but decided that they are doing a lot of things different, than in coccinella.
Most of the stuff got inspired from GroupChat.tcl.

So I'll take a look at integrating XEP-0145 it into UserInfo.tcl.

cheers

buzzdee (sebastia)
Changed in coccinella:
milestone: none → 0.96.16
Revision history for this message
buzzdee (sebastia) wrote :

I updated the patch (need to upload it )to:
A) in GroupChat.tcl not use directly the jabber:iq:private, but use jabber:iq::annotations instead. This allows to remove even more code from GroupChat.tcl and use functionality from annotations.tcl

B) Add stuff to Profiles.tcl to store and retrieve the notes from the server (not yet displaying them, due to problems mentioned below).

However, to get it working similar to the stuff in the "Client/Service" tab, I need to implement sth. like that:

 http://wiki.tcl.tk/1917

In the "Client/Service" Tab there it uses ttk::label which supports a -textvariable but not a -yscrollcommand (as far as I researched)

The tk text widget doesn't seem to support a -textvariable. The stuff mentioned at the link above would add a -textvariable to the tk text widget.

Would it be OK to add those files to the coccinella sources at some place? The license refers to the "Standard TCL license agreement", which is sth. like BSD license.

However, when the note becomes larger than the twelve lines, then an exception is shown. There seems to be a problem with the scrollbar, which also exists in the actual version.

window ".juserinfo12318433273icql00-bugdead-prodsde.frall.nb.not.f.s" isn't packed
window ".juserinfo12318433273icql00-bugdead-prodsde.frall.nb.not.f.s" isn't packed
    while executing
"$manager info $wscrollbar"
    (procedure "::UI::ScrollSet" line 12)
    invoked from within
"::UI::ScrollSet .juserinfo12318433273icql00-bugdead-prodsde.frall.nb.not.f.s {pack .juserinfo12318433273icql00-bugdead-prodsde.frall.nb.not.f.s -side righ..."
    (vertical scrolling command executed by text)

Revision history for this message
buzzdee (sebastia) wrote :

This patch adds contrib/TracedText.tcl and jabberlib/private.tcl and jabberlib/annotations.tcl.

jabber/GroupChat.tcl was rewritten to use jabberlib/annotations for bookmark storage. actually removing some code now provided with annotations.tcl

jabber/UserInfo.tcl was rewritten to use XEP-145, provided by jabberlib/annotations.tcl instead of the Notes.tcl file.
Note: It doesn't care about existing Notes.tcl files and their contents.

works well for me on OpenBSD 4.6.

sander (s-devrieze)
description: updated
Revision history for this message
buzzdee (sebastia) wrote :

svn revision 2755 now supports XEP-145.

Changed in coccinella:
status: In Progress → Fix Committed
buzzdee (sebastia)
Changed in coccinella:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.