[Tkabber-dev] r822 - in trunk/tkabber-plugins: . osd

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Tue Dec 5 23:06:23 MSK 2006


Author: sergei
Date: 2006-12-05 23:06:21 +0300 (Tue, 05 Dec 2006)
New Revision: 822

Modified:
   trunk/tkabber-plugins/ChangeLog
   trunk/tkabber-plugins/osd/osd.tcl
Log:
	* osd/osd.tcl: Don't notify on history messages read from the
	  log files.


Modified: trunk/tkabber-plugins/ChangeLog
===================================================================
--- trunk/tkabber-plugins/ChangeLog	2006-12-05 15:33:36 UTC (rev 821)
+++ trunk/tkabber-plugins/ChangeLog	2006-12-05 20:06:21 UTC (rev 822)
@@ -1,3 +1,8 @@
+2006-12-05  Sergei Golovan  <sgolovan at nes.ru>
+
+	* osd/osd.tcl: Don't notify on history messages read from the
+	  log files.
+
 2006-12-03  Sergei Golovan  <sgolovan at nes.ru>
 
 	* whiteboard/svgrender.tcl, whiteboard/whiteboard.tcl,

Modified: trunk/tkabber-plugins/osd/osd.tcl
===================================================================
--- trunk/tkabber-plugins/osd/osd.tcl	2006-12-05 15:33:36 UTC (rev 821)
+++ trunk/tkabber-plugins/osd/osd.tcl	2006-12-05 20:06:21 UTC (rev 822)
@@ -86,6 +86,18 @@
     if {[chat::is_our_jid $chatid $from] || ![cequal $type chat]} {
 	return
     }
+
+    foreach xelem $extras {
+	jlib::wrapper:splitxml $xelem tag vars isempty chdata children
+	
+	# Don't notify if this 'empty' tag is present. It indicates
+	# messages history in chat window.
+	if {[cequal $tag ""] && \
+		[cequal [jlib::wrapper:getattr $vars xmlns] tkabber:x:nolog]} {
+	    return
+	}
+    }
+
     set nick [get_nick [chat::get_connid $chatid] $from $type]
     osd::try_write "New message from $nick"
 }



More information about the Tkabber-dev mailing list