[Tkabber-dev] r1501 - in trunk/tkabber: . msgs

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Thu Sep 11 19:23:14 MSD 2008


Author: sergei
Date: 2008-09-11 19:23:11 +0400 (Thu, 11 Sep 2008)
New Revision: 1501

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/gpgme.tcl
   trunk/tkabber/msgs/de.msg
   trunk/tkabber/msgs/es.msg
   trunk/tkabber/msgs/it.msg
   trunk/tkabber/msgs/nl.msg
   trunk/tkabber/msgs/pl.msg
   trunk/tkabber/msgs/ru.msg
   trunk/tkabber/msgs/uk.msg
Log:
	* gpgme.tcl: Added gpg package (http://code.google.com/p/tclgpg) as an
	  alternative package for encryption/signing messages.

	* msgs/de.msg, msgs/es.msg, msgs/it.msg, msgs/nl.msg, msgs/pl.msg,
	  msgs/ru.msg, msgs/uk.msg: Replaced GPGME by more generic GPG.


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2008-09-11 04:42:02 UTC (rev 1500)
+++ trunk/tkabber/ChangeLog	2008-09-11 15:23:11 UTC (rev 1501)
@@ -3,6 +3,12 @@
 	* plugins/chat/draw_timestamp.tcl: Raised priority to enable
 	  timestamps for error and info messages.
 
+	* gpgme.tcl: Added gpg package (http://code.google.com/p/tclgpg) as an
+	  alternative package for encryption/signing messages.
+
+	* msgs/de.msg, msgs/es.msg, msgs/it.msg, msgs/nl.msg, msgs/pl.msg,
+	  msgs/ru.msg, msgs/uk.msg: Replaced GPGME by more generic GPG.
+
 2008-09-10  Sergei Golovan  <sgolovan at nes.ru>
 
 	* disco.tcl: Added procedure which returns features list for a node.

Modified: trunk/tkabber/gpgme.tcl
===================================================================
--- trunk/tkabber/gpgme.tcl	2008-09-11 04:42:02 UTC (rev 1500)
+++ trunk/tkabber/gpgme.tcl	2008-09-11 15:23:11 UTC (rev 1501)
@@ -67,39 +67,40 @@
 
 #############################################################################
 
-if {[catch {package require gpgme}]} {
-    debugmsg ssj "unable to load the GPGME package, so no crypto!"
-    set have_gpgme 0
+if {![catch {package require gpg}]} {
+    set gpgPkg gpg
+} elseif {![catch {package require gpgme}]} {
+    set gpgPkg gpgme
+} else {
+    debugmsg ssj "unable to load the GPG package, so no crypto!"
     return
-} else {
-    set have_gpgme 1
 }
 
 namespace eval ::ssj {
     variable options
 
-    custom::defgroup GPGME [::msgcat::mc "GPGME options (signing and encryption)."] \
+    custom::defgroup GPG [::msgcat::mc "GPG options (signing and encryption)."] \
 	-group Tkabber
 
     custom::defvar options(one-passphrase) 1 \
 	[::msgcat::mc "Use the same passphrase for signing and decrypting messages."] \
-	-group GPGME -type boolean
+	-group GPG -type boolean
 
     custom::defvar options(sign-traffic) 0 \
 	[::msgcat::mc "GPG-sign outgoing messages and presence updates."] \
-	-group GPGME -type boolean
+	-group GPG -type boolean
 
     custom::defvar options(encrypt-traffic) 0 \
 	[::msgcat::mc "GPG-encrypt outgoing messages where possible."] \
-	-group GPGME -type boolean
+	-group GPG -type boolean
 
     custom::defvar options(key) "" \
 	[::msgcat::mc "Use specified key ID for signing and decrypting messages."] \
-	-group GPGME -type string
+	-group GPG -type string
 
     custom::defvar options(display_sig_warnings) 1 \
 	[::msgcat::mc "Display warning dialogs when signature verification fails."] \
-	-group GPGME -type boolean
+	-group GPG -type boolean
 }
 
 
@@ -143,10 +144,12 @@
 
 
 proc ::ssj::once_only {connid {armorP 0}} {
-    global env
+    global env gpgPkg
     variable options
     variable ctx
 
+    debugmsg ssj "ONCE_ONLY $connid"
+
     if {[info exists ctx($connid)] && ![cequal $ctx($connid) ""]} {
         $ctx($connid) -operation set   \
 		      -property  armor \
@@ -155,7 +158,7 @@
         return
     }
 
-    set ctx($connid) [gpgme::context]
+    set ctx($connid) [${gpgPkg}::context]
     $ctx($connid) -operation set   \
 		  -property  armor \
 		  -value     $armorP
@@ -786,6 +789,7 @@
 
 
 proc ::ssj::encrypted:output {connid data to} {
+    global gpgPkg
     variable ctx
     variable e4me
     variable j2k
@@ -810,7 +814,7 @@
         set name $bto
     }
 
-    set recipient [gpgme::recipient]
+    set recipient [${gpgPkg}::recipient]
     $recipient -operation add   \
 	       -name      $name \
                -validity  full
@@ -955,6 +959,7 @@
 }
 
 proc ::ssj::encryptP {connid jid} {
+    global gpgPkg
     variable ctx
     variable j2k
     variable options
@@ -1008,7 +1013,7 @@
         set name $bjid
     }
 
-    [set recipient [gpgme::recipient]] \
+    [set recipient [${gpgPkg}::recipient]] \
             -operation add   \
             -name      $name \
             -validity  full
@@ -1029,6 +1034,7 @@
 #############################################################################
 
 proc ::ssj::e4meP {connid keys} {
+    global gpgPkg
     variable ctx
     variable e4me
     variable signers
@@ -1039,7 +1045,7 @@
 
     set e4me($connid) {}
     foreach signer $signers($connid) {
-        [set recipient [gpgme::recipient]] \
+        [set recipient [${gpgPkg}::recipient]] \
                 -operation add     \
                 -name      $signer \
                 -validity  full

Modified: trunk/tkabber/msgs/de.msg
===================================================================
--- trunk/tkabber/msgs/de.msg	2008-09-11 04:42:02 UTC (rev 1500)
+++ trunk/tkabber/msgs/de.msg	2008-09-11 15:23:11 UTC (rev 1501)
@@ -157,7 +157,7 @@
 ::msgcat::mcset de "Fetch GPG key"                                          "GPG-Schlüssel abrufen"
 ::msgcat::mcset de "GPG-encrypt outgoing messages where possible."          "Ausgehende Nachrichten GPG-verschlüsseln wo möglich."
 ::msgcat::mcset de "GPG-sign outgoing messages and presence updates."       "Ausgehende Nachrichten und Präsenz-Aktualisierungen GPG-signieren."
-::msgcat::mcset de "GPGME options (signing and encryption)."                "GPGME-Optionen (verschlüsseln und signieren)."
+::msgcat::mcset de "GPG options (signing and encryption)."                  "GPG-Optionen (verschlüsseln und signieren)."
 ::msgcat::mcset de "Invalid signature"                                      "Ungültige Signatur"
 ::msgcat::mcset de "Key ID"                                                 "Schlüssel-ID"
 ::msgcat::mcset de "Malformed signature block"                              "Missgebildeter Signatur-Block"

Modified: trunk/tkabber/msgs/es.msg
===================================================================
--- trunk/tkabber/msgs/es.msg	2008-09-11 04:42:02 UTC (rev 1500)
+++ trunk/tkabber/msgs/es.msg	2008-09-11 15:23:11 UTC (rev 1501)
@@ -425,7 +425,7 @@
 ::msgcat::mcset es "GIF images" "GIF"
 ::msgcat::mcset es "GPG-encrypt outgoing messages where possible." "Cifrar con GPG los mensajes salientes siempre que sea posible."
 ::msgcat::mcset es "GPG-sign outgoing messages and presence updates." "Firmar con GPG los mensajes y presencias salientes."
-::msgcat::mcset es "GPGME options (signing and encryption)." "Opciones de GPGME (firma y cifrado)."
+::msgcat::mcset es "GPG options (signing and encryption)." "Opciones de GPG (firma y cifrado)."
 ::msgcat::mcset es "GPS datum:" "GPS datum:"
 ::msgcat::mcset es "Generate chat messages when chat peer changes his/her status and/or status message" "Generar mensajes de charla cuando el contacto cambia su estado o su mensaje de estado"
 ::msgcat::mcset es "Generate enter/exit messages" "Generar mensajes de entrada/salida"

Modified: trunk/tkabber/msgs/it.msg
===================================================================
--- trunk/tkabber/msgs/it.msg	2008-09-11 04:42:02 UTC (rev 1500)
+++ trunk/tkabber/msgs/it.msg	2008-09-11 15:23:11 UTC (rev 1501)
@@ -204,7 +204,7 @@
 ::msgcat::mcset it "Fetch GPG key" "Prelieva GPG key"
 ::msgcat::mcset it "GPG-encrypt outgoing messages where possible." "Cripta con GPG messaggi in uscita quando possibile."
 ::msgcat::mcset it "GPG-sign outgoing messages and presence updates." "Segna con GPG messagi in uscita e aggiornamenti della presenza."
-::msgcat::mcset it "GPGME options (signing and encryption)." "Opzioni di GPGME (signatura e criptamento)"
+::msgcat::mcset it "GPG options (signing and encryption)." "Opzioni di GPG (signatura e criptamento)"
 ::msgcat::mcset it "Invalid signature" "Signatura non valida"
 ::msgcat::mcset it "Malformed signature block" "Signatura malformata"
 ::msgcat::mcset it "Multiple signatures having different authenticity" "Signature differenti hanno una autenticita diversa"

Modified: trunk/tkabber/msgs/nl.msg
===================================================================
--- trunk/tkabber/msgs/nl.msg	2008-09-11 04:42:02 UTC (rev 1500)
+++ trunk/tkabber/msgs/nl.msg	2008-09-11 15:23:11 UTC (rev 1501)
@@ -159,7 +159,7 @@
 ::msgcat::mcset nl "Unable to sign message body: %s.\n\nSigning traffic is now disabled.\n\nSend it WITHOUT a signature?" "Kon berichtinhoud niet ondertekenen: %s.\n\nOndertekenen van verkeer staat nu af.\n\nWilt u het ZONDER handtekening verzenden?"
 ::msgcat::mcset nl "Data purported sent by %s can't be deciphered.\n\n%s." "De gegevens die worden beweerd verzonden te zijn door %s kunnen niet ontcijferd worden.\n\n%s."
 ::msgcat::mcset nl "Unable to encipher data for %s: %s.\n\nEncrypting traffic to this user is now disabled.\n\nSend it as PLAINTEXT?" "De gegevens voor %s kunnen niet ontcijferd worden: %s.\n\nDe versleuteling van verkeer naar deze contactpersoon staat nu af.\n\nWilt u het verzenden als PLATTE TEKST?"
-::msgcat::mcset nl "GPGME options (signing and encryption)." "Opties van GPGME (ondertekenen en versleutelen)"
+::msgcat::mcset nl "GPG options (signing and encryption)." "Opties van GPG (ondertekenen en versleutelen)"
 ::msgcat::mcset nl "Use the same passphrase for signing and decrypting messages." "Dezelfde passphrase gebruiken voor ondertekenen en ontcijferen van berichten."
 ::msgcat::mcset nl "GPG-sign outgoing messages and presence updates." "Uitgaande berichten en aanwezigheidswijzigingen met GPG ondertekenen."
 ::msgcat::mcset nl "GPG-encrypt outgoing messages where possible." "Uitgaande berichten versleutelen met GPG wanneer mogelijk."

Modified: trunk/tkabber/msgs/pl.msg
===================================================================
--- trunk/tkabber/msgs/pl.msg	2008-09-11 04:42:02 UTC (rev 1500)
+++ trunk/tkabber/msgs/pl.msg	2008-09-11 15:23:11 UTC (rev 1501)
@@ -250,7 +250,7 @@
 ::msgcat::mcset pl "User ID" "ID użytkownika"
 ::msgcat::mcset pl "Select Key for Signing %s Traffic" "Wybierz klucz do podpisywania wiadomości od %s"
 ::msgcat::mcset pl "Fetch GPG key" "Pobierz klucz GPG z serwera kluczy"
-::msgcat::mcset pl "GPGME options (signing and encryption)." "Ustwienia GPGME (podpisywanie i szyfrowanie wiadomości)."
+::msgcat::mcset pl "GPG options (signing and encryption)." "Ustwienia GPG (podpisywanie i szyfrowanie wiadomości)."
 ::msgcat::mcset pl "Use the same passphrase for signing and decrypting messages." "Używaj tego samego hasła do podpisywania i odszyfrowania wiadomości."
 ::msgcat::mcset pl "GPG-sign outgoing messages and presence updates." "Podpisz za pomocą GPG wychodzące wiadomości i zmiany statusu."
 ::msgcat::mcset pl "GPG-encrypt outgoing messages where possible." "Szyfruj za pomocą GPG wychodzące wiadomości jeżeli to możliwe."

Modified: trunk/tkabber/msgs/ru.msg
===================================================================
--- trunk/tkabber/msgs/ru.msg	2008-09-11 04:42:02 UTC (rev 1500)
+++ trunk/tkabber/msgs/ru.msg	2008-09-11 15:23:11 UTC (rev 1501)
@@ -736,7 +736,7 @@
 ::msgcat::mcset ru "GPG-sign outgoing messages and presence updates."\
 	"Подписывать исходящие сообщения и обновления присутствия с помощью\
 	GPG."
-::msgcat::mcset ru "GPGME options (signing and encryption)." "Параметры GPGME\
+::msgcat::mcset ru "GPG options (signing and encryption)." "Параметры GPG\
 	(цифровая подпись и шифрование)."
 ::msgcat::mcset ru "GPS datum:" "Система координат GPS:"
 ::msgcat::mcset ru "Grant Admin Privileges" "Предоставить права\

Modified: trunk/tkabber/msgs/uk.msg
===================================================================
--- trunk/tkabber/msgs/uk.msg	2008-09-11 04:42:02 UTC (rev 1500)
+++ trunk/tkabber/msgs/uk.msg	2008-09-11 15:23:11 UTC (rev 1501)
@@ -374,7 +374,7 @@
     "Шифрувати вихідні повідомлення з допомогою GPG, якщо це можливо."
 ::msgcat::mcset uk "GPG-sign outgoing messages and presence updates." \
     "Підписувати вихідні повідомлення і оновлення присутності за допомогою GPG."
-::msgcat::mcset uk "GPGME options (signing and encryption)." "Параметри GPGME (цифровий підпис і шифрування)."
+::msgcat::mcset uk "GPG options (signing and encryption)." "Параметри GPG (цифровий підпис і шифрування)."
 ::msgcat::mcset uk "Grant Admin Privileges" "Надати адміністративні привілеї"
 ::msgcat::mcset uk "Grant Membership" "Надати членство"
 ::msgcat::mcset uk "Grant Moderator Privileges" "Надати привілеї модератора"



More information about the Tkabber-dev mailing list