[Tkabber-dev] r539 - in trunk/plugins/juick: . msgs

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Wed Sep 18 21:37:01 MSK 2013


Author: Totktonada
Date: 2013-09-18 21:37:01 +0400 (Wed, 18 Sep 2013)
New Revision: 539

Modified:
   trunk/plugins/juick/juick.tcl
   trunk/plugins/juick/msgs/ru.msg
Log:
Juick plugin (svn branch):

Add option for more exact messages indicating.
    
This option determines whether replies to your posts indicated as
personal messages. Enabled by default.


Modified: trunk/plugins/juick/juick.tcl
===================================================================
--- trunk/plugins/juick/juick.tcl	2013-09-18 17:04:06 UTC (rev 538)
+++ trunk/plugins/juick/juick.tcl	2013-09-18 17:37:01 UTC (rev 539)
@@ -47,9 +47,14 @@
         -type string
 custom::defvar options(special_update_juick_tab) 1 \
         [::msgcat::mc \
-            "Only private messages and replies to your comments is personal message."] \
+            "Indicate as personal message only private messages and replies to you."] \
         -group $group \
         -type boolean
+custom::defvar options(special_update_juick_tab_replies_to_posts) 1 \
+        [::msgcat::mc \
+            "Whether replies to your posts is \"replies to you\"."] \
+        -group $group \
+        -type boolean
 
 proc load {} {
     ::richtext::entity_state juick_numbers 1
@@ -186,14 +191,19 @@
 }
 
 proc is_personal_juick_message {from body x} {
+    variable options
+
     set private_msg [regexp {^Private message from @.+:\n} $body]
 
     set reply_to_comment [regexp \
         {Reply by @[^\n ]+:\n>.+\n\n@([^\n ]+) .+\n\n#\d+/\d+ http://juick.com/\d+#\d+$} \
         $body -> reply_to_nick]
 
-    set reply_to_my_comment [expr {$reply_to_comment && [is_reply_to_you $x]}]
-    return [expr {$private_msg || $reply_to_my_comment}]
+    set reply_to_me [is_reply_to_you $x]
+    set matchall $options(special_update_juick_tab_replies_to_posts)
+
+    return [expr { $private_msg || \
+        ($reply_to_me && ($matchall || $reply_to_comment))}]
 }
 
 proc update_juick_tab {chatid from type body x} {

Modified: trunk/plugins/juick/msgs/ru.msg
===================================================================
--- trunk/plugins/juick/msgs/ru.msg	2013-09-18 17:04:06 UTC (rev 538)
+++ trunk/plugins/juick/msgs/ru.msg	2013-09-18 17:37:01 UTC (rev 539)
@@ -3,4 +3,5 @@
 ::msgcat::mcset ru "\[J\] Open thing in browser." "\[J\] Открыть сущность в браузере."
 ::msgcat::mcset ru "Juick settings." "Параметры расширения для удобной работы с Juick"
 ::msgcat::mcset ru "Main Juick JID. This used for forwarding things from other chats." "Главный JID Juick'а. Используется для перенаправления сущностей из других чатов."
-::msgcat::mcset ru "Only private messages and replies to your comments is personal message." "Только приватные сообщения и ответы на ваши комментарии являются персональными сообщениями."
+::msgcat::mcset ru "Indicate as personal message only private messages and replies to you." "Отмечать как персональные только приватные и адресованные вам сообщения."
+::msgcat::mcset ru "Whether replies to your posts is \"replies to you\"." "Считать ли комментарии к вашим постам \"адресованными вам сообщениями\"."



More information about the Tkabber-dev mailing list