[Tkabber-dev] r847 - in trunk/tkabber-plugins: . whiteboard

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Thu Dec 28 15:25:17 MSK 2006


Author: sergei
Date: 2006-12-28 15:25:15 +0300 (Thu, 28 Dec 2006)
New Revision: 847

Modified:
   trunk/tkabber-plugins/ChangeLog
   trunk/tkabber-plugins/whiteboard/whiteboard.tcl
Log:
	* whiteboard/whiteboard.tcl: Added whiteboard saving option.


Modified: trunk/tkabber-plugins/ChangeLog
===================================================================
--- trunk/tkabber-plugins/ChangeLog	2006-12-26 16:03:11 UTC (rev 846)
+++ trunk/tkabber-plugins/ChangeLog	2006-12-28 12:25:15 UTC (rev 847)
@@ -1,3 +1,7 @@
+2006-12-28  Sergei Golovan <sgolovan at nes.ru>
+
+	* whiteboard/whiteboard.tcl: Added whiteboard saving option.
+
 2006-12-24  Sergei Golovan <sgolovan at nes.ru>
 
 	* reversi/msgs/uk.msg, debug/msgs/uk.msg, checkers/msgs/uk.msg,

Modified: trunk/tkabber-plugins/whiteboard/whiteboard.tcl
===================================================================
--- trunk/tkabber-plugins/whiteboard/whiteboard.tcl	2006-12-26 16:03:11 UTC (rev 846)
+++ trunk/tkabber-plugins/whiteboard/whiteboard.tcl	2006-12-28 12:25:15 UTC (rev 847)
@@ -98,6 +98,10 @@
 	-command [list [namespace current]::send_clear $chatid]
     pack $w.tb.clear -side bottom -anchor w -fill x
 
+    button $w.tb.save -text [::msgcat::mc "Save..."] \
+	-command [list [namespace current]::save_wb $chatid]
+    pack $w.tb.save -side bottom -anchor w -fill x
+
     frame $w.tb.spacer1 -relief sunken -bd 1 -height 2 -highlightthickness 0
     pack $w.tb.spacer1 -side bottom -anchor w -fill x -pady 2m
 
@@ -222,6 +226,17 @@
     $w.tb.color cget -width
 }
 
+proc wb::save_wb {chatid} {
+    set w [win_id whiteboard $chatid]
+
+    set filepath [tk_getSaveFile -defaultextension .eps \
+				 -filetypes {{{Encapsulated PostScript files} *.eps}
+					     {{All files}        *}}]
+
+    if {$filepath == ""} return
+    $w.c postscript -file $filepath
+}
+
 ###############################################################################
 
 proc wb::create_id {} {



More information about the Tkabber-dev mailing list