[Tkabber-dev] r494 - in trunk/plugins/tastebin: . msgs pixmaps

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Thu Sep 22 14:19:12 MSD 2011


Author: ancestor
Date: 2011-09-22 14:19:12 +0400 (Thu, 22 Sep 2011)
New Revision: 494

Added:
   trunk/plugins/tastebin/pixmaps/toolbar.png
Modified:
   trunk/plugins/tastebin/msgs/ru.msg
   trunk/plugins/tastebin/tastebin.tcl
Log:
1) Fixed bugs due to pastebin.com API was changed.
2) Added native pastebin.com icon for toolbar.


Modified: trunk/plugins/tastebin/msgs/ru.msg
===================================================================
--- trunk/plugins/tastebin/msgs/ru.msg	2011-08-22 09:21:48 UTC (rev 493)
+++ trunk/plugins/tastebin/msgs/ru.msg	2011-09-22 10:19:12 UTC (rev 494)
@@ -9,7 +9,7 @@
 ::msgcat::mcset ru "Tastebin" "Tastebin плагин"
 ::msgcat::mcset ru "Tastebin - pastebin uploader" "Tastebin - загрузчик pastebin"
 ::msgcat::mcset ru "Syntax Highlighting" "Подсветка синтаксиса"
-::msgcat::mcset ru "Your name or nick" "Ваше имя или ник"
+::msgcat::mcset ru "Paste name" "Название"
 ::msgcat::mcset ru "Send" "Отправить"
 ::msgcat::mcset ru "Clean" "Очистить"
 ::msgcat::mcset ru "History" "История"

Added: trunk/plugins/tastebin/pixmaps/toolbar.png
===================================================================
(Binary files differ)


Property changes on: trunk/plugins/tastebin/pixmaps/toolbar.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Modified: trunk/plugins/tastebin/tastebin.tcl
===================================================================
--- trunk/plugins/tastebin/tastebin.tcl	2011-08-22 09:21:48 UTC (rev 493)
+++ trunk/plugins/tastebin/tastebin.tcl	2011-09-22 10:19:12 UTC (rev 494)
@@ -68,9 +68,15 @@
 	variable script_dir
 	variable NS
 	
+    set pasteimg toolbar.png
+
+    if {[catch {package require Img}]} {
+        set pasteimg toolbar.gif
+    }
+
 	image create photo \
 		plugins/tastebin-button -file \
-		[file join $script_dir pixmaps toolbar.gif]
+		[file join $script_dir pixmaps $pasteimg]
 	
 	ifacetk::add_toolbar_button \
 		plugins/tastebin-button \
@@ -130,7 +136,7 @@
 	pack $w.main.help_lang -anchor w 
 	pack $w.main.lang -fill x -pady 2
 		
-	label $w.main.help_nick -text [::msgcat::mc "Your name or nick"]
+	label $w.main.help_nick -text [::msgcat::mc "Paste name"]
 	set H [entry $w.main.header]
 	pack $w.main.help_nick -anchor w 
 	pack $w.main.header -fill x -pady 2
@@ -388,7 +394,7 @@
 	variable NS
 	variable options
 	
-	set URL "http://pastebin.com/api_public.php"
+	set URL "http://pastebin.com/api/api_post.php"
 	set HISTORY [$T get 0.0 $options(history_maximum_lines).0]
 	set CODE [$T get 0.0 end]
 	set NAME [$H get]
@@ -413,8 +419,9 @@
 	$T insert 0.0 [::msgcat::mc "Please wait ..."]
 	$T configure -state disabled
 	
-	set post [http::formatQuery paste_code $CODE \
-	paste_format $LANG paste_name $NAME]
+	set post [http::formatQuery api_dev_key "d037ba11d265d3a7232d3eb5d6d1fa64" \
+        api_option "paste" api_paste_code $CODE api_paste_format $LANG \
+        api_paste_name $NAME api_paste_private "1"]
 	
 	set token [http::geturl $URL -query $post]
 	http::wait $token



More information about the Tkabber-dev mailing list