On 02/13/2013 03:27 PM, Petr Gregor wrote:
Hi,
first I would like to thank you for Gajim :)

Next, I would like to ask you to add support for "positive feedback"
when receipt is received. For example tick next to the message or some
color change or something.
Now gajim notifies me when message is not delivered but it works only
with compatible clients so I do not know if message is "delivered" or
"unknown becouse of incompatible client on the other side"

Hi Petr,

This is something that is not hard to implement (patch attached) but I don't know how to include that in Gajim. I don't want that to be the default behaviour, that sounds too intrusive to me.

Any idea?

diff -r 001d4e759427 icons/hicolor/16x16/actions/gajim-receipt_received.png
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/icons/hicolor/16x16/actions/gajim-receipt_received.png	Sat Feb 16 23:51:52 2013 +0100
@@ -0,0 +1,3 @@
+‰PNG
+
+
IHDRóÿabKGDùC»	pHYsHHFÉk>	vpAg\ƭÆIDAT8Ëc` he``Ò5\L¬L•¤hžÂÀ ;w6³‚ãBËEq+"JøJ™ÙʼnÐ<‘Az>×,yû¥¦òV§ÿšáýY8‡«„Á•¿æ æy@ÍSäm—oÈX›ø/x¾×éÿ*å²/Eüø=f20üÿÿŸAy¹”±òR);†ÙLÌ󀚻¤æs1pÎd·Za°!mGÜ¿àžÿeçñÿ—èåùm×`>[=LY’!äª-ƒÆR«Üƒ)—Še=’[*ÀÃÀ¨¸FˆAt%›¼Ã6“
GâÿEòÿ¯½Uö¿Ül¡ß"i<s„ÝyÅ$"즚Y×*»°âú¢ÿ‹®ÍùŸt(ò¡êz1ƒJŠ^m7œOû—z>ê¿Í1½ÿ:+å‹åòÍau`ãòef`´ºÔq¢U@ʦ˜§¥§sþϺ3ùÿ”Û=ÿ“N†?L;s¢övñßüÛ)ÿ}®Ùý·Ú«û[ºYx.K<ƒ8WK4œ<&Ù±ºôÛĘ-Õ~w1è×£ÆÿýOÚþw=iü_ù<÷ôSßÿ—l~«Í—›ËÝÎ$.TËÅ ú) òØXýXÄZxbM6k>‹}ð¿þ}ÉÿÆO¥ÿ3?GýyâþÛø Ö\å5⊋¥ü¾é`Æg/8¥±HNˆu<`þ,çkÜÿŠYÿ“߆ÿ¶;g:×ü´Ž¸Îa†î?9¸£\fƒÀjåR±ágýž•¿ÊývÕnÜÝqWþo#œèLª3hc±ØlpƳ#çQ²„ý3`:ùC|²÷}eËöƍ)ô++Ã:†GÿoÓ6“gSíÐ=.ô0%tEXtdate:create2009-09-13T13:31:22+02:00Kï%tEXtdate:modify2009-09-13T13:31:22+02:00gGóSIEND®B`‚
\ No newline at end of file
diff -r 001d4e759427 src/conversation_textview.py
--- a/src/conversation_textview.py	Sat Feb 16 23:49:39 2013 +0100
+++ b/src/conversation_textview.py	Sat Feb 16 23:51:52 2013 +0100
@@ -171,7 +171,9 @@
 
     FOCUS_OUT_LINE_PIXBUF = gtkgui_helpers.get_icon_pixmap('gajim-muc_separator')
     XEP0184_WARNING_PIXBUF = gtkgui_helpers.get_icon_pixmap(
-            'gajim-receipt_missing')
+        'gajim-receipt_missing')
+    XEP0184_RECEIVED_PIXBUF = gtkgui_helpers.get_icon_pixmap(
+        'gajim-receipt_received')
 
     # smooth scroll constants
     MAX_SCROLL_TIME = 0.4 # seconds
@@ -499,22 +501,28 @@
         if id_ not in self.xep0184_marks:
             return
 
-        if self.xep0184_shown[id_] == NOT_SHOWN:
-            self.xep0184_shown[id_] = ALREADY_RECEIVED
-            return
-
         buffer_ = self.tv.get_buffer()
         buffer_.begin_user_action()
 
+        if self.xep0184_shown[id_] != NOT_SHOWN:
+            begin_iter = buffer_.get_iter_at_mark(self.xep0184_marks[id_])
+
+            end_iter = begin_iter.copy()
+            # XXX: Is there a nicer way?
+            end_iter.forward_char()
+            end_iter.forward_char()
+
+            buffer_.delete(begin_iter, end_iter)
+
         begin_iter = buffer_.get_iter_at_mark(self.xep0184_marks[id_])
+        buffer_.insert(begin_iter, ' ')
+        anchor = buffer_.create_child_anchor(begin_iter)
+        img = TextViewImage(anchor, '')
+        img.set_from_pixbuf(ConversationTextview.XEP0184_RECEIVED_PIXBUF)
+        img.show()
+        self.tv.add_child_at_anchor(img, anchor)
 
-        end_iter = begin_iter.copy()
-        # XXX: Is there a nicer way?
-        end_iter.forward_char()
-        end_iter.forward_char()
-
-        buffer_.delete(begin_iter, end_iter)
-        buffer_.delete_mark(self.xep0184_marks[id_])
+        self.xep0184_shown[id_] = ALREADY_RECEIVED
 
         buffer_.end_user_action()
 
_______________________________________________
Gajim-devel mailing list
Gajim-devel@gajim.org
http://lists.gajim.org/cgi-bin/listinfo/gajim-devel

Reply via email to