[Sumover-dev] [svn commit] r4071 - vic/branches/mpeg4/tcl

sumover-dev at cs.ucl.ac.uk sumover-dev at cs.ucl.ac.uk
Fri Jun 15 22:22:34 BST 2007


Author: turam
Date: Fri Jun 15 22:22:29 2007
New Revision: 4071

Modified:
   vic/branches/mpeg4/tcl/accessgrid.tcl
   vic/branches/mpeg4/tcl/autoplace_ui.tcl

Log:
Silence console output; Fix up autoplace window locations for linux and osx

Modified: vic/branches/mpeg4/tcl/accessgrid.tcl
==============================================================================
--- vic/branches/mpeg4/tcl/accessgrid.tcl	(original)
+++ vic/branches/mpeg4/tcl/accessgrid.tcl	Fri Jun 15 22:22:29 2007
@@ -16,7 +16,7 @@
     global tcl_platform
     if { 0 && $tcl_platform(platform) == "windows" } {
 	ag_stdout_init_window
-	ag_puts  "Stdout window initialized ..."
+	#ag_puts  "Stdout window initialized ..."
   }
 }
 
@@ -64,10 +64,10 @@
 
 
     if [ file exists "vic.prefs" ] {
-		ag_puts "reading prefsfile  ..."
+		#ag_puts "reading prefsfile  ..."
 		option readfile "vic.prefs" startupFile
     } else {
-		ag_puts "no prefsfile available..."
+		#ag_puts "no prefsfile available..."
     }
 }
 
@@ -95,20 +95,36 @@
     set ag_vwin(large,cif,width) 704
     set ag_vwin(large,cif,height) 576
 
-    set ag_win(small,unix,width) 250
-    set ag_win(small,unix,height) 200
+    # platform-specific window sizes
+    # - small
+    set ag_win(small,x11,width) 184
+    set ag_win(small,x11,height) 181
 
-    set ag_win(small,windows,width) 184
-    set ag_win(small,windows,height) 171
+    set ag_win(small,aqua,width) 177
+    set ag_win(small,aqua,height) 167
 
-    set ag_win(medium,unix,width) 365
-    set ag_win(medium,unix,height) 338
+    set ag_win(small,win32,width) 184
+    set ag_win(small,win32,height) 171
 
-    set ag_win(medium,windows,width) 360
-    set ag_win(medium,windows,height) 315
+    # - medium sizes
+    set ag_win(medium,x11,width) 360
+    set ag_win(medium,x11,height) 347
 
-    set ag_win(large,windows,width) 712
-    set ag_win(large,windows,height) 603
+    set ag_win(medium,aqua,width) 355
+    set ag_win(medium,aqua,height) 313
+
+    set ag_win(medium,win32,width) 360
+    set ag_win(medium,win32,height) 315
+
+    # - large sizes
+    set ag_win(large,x11,width) 710
+    set ag_win(large,x11,height) 606
+
+    set ag_win(large,aqua,width) 705
+    set ag_win(large,aqua,height) 601
+
+    set ag_win(large,win32,width) 712
+    set ag_win(large,win32,height) 603
 
     set ag_window_cur_x 0
     set ag_window_cur_y 0
@@ -233,8 +249,8 @@
     global ag_window_cur_x ag_window_cur_y
     global ag_window_grid_placement
 
-    ag_puts "Allocating slot: cur=$ag_window_cur_x $ag_window_cur_y size=$ag_window_grid_width $ag_window_grid_height"
-    ag_puts "Alignment is $ag_window_grid_placement"
+    #ag_puts "Allocating slot: cur=$ag_window_cur_x $ag_window_cur_y size=$ag_window_grid_width $ag_window_grid_height"
+    #ag_puts "Alignment is $ag_window_grid_placement"
     if {$ag_window_cur_x >= $ag_window_grid_width || $ag_window_cur_y >= $ag_window_grid_height} {
 	#	ag_puts "No slots available"
 		return ""
@@ -271,11 +287,11 @@
     global tcl_platform
     
     set platform $tcl_platform(platform)
-    set screen_x [expr $ag_window_grid_base_x + $x * $ag_win($ag_window_grid_mode,$platform,width)]
-    set screen_y [expr $ag_window_grid_base_y + $y * $ag_win($ag_window_grid_mode,$platform,height)]
+    set screen_x [expr $ag_window_grid_base_x + $x * $ag_win($ag_window_grid_mode,[ windowingsystem],width)]
+    set screen_y [expr $ag_window_grid_base_y + $y * $ag_win($ag_window_grid_mode,[ windowingsystem],height)]
     
-    ag_puts "ag_window_grid_base x,y = $ag_window_grid_base_x , $ag_window_grid_base_y"
-    ag_puts "ag_map_slot returns $screen_x , $screen_y"
+    #ag_puts "ag_window_grid_base x,y = $ag_window_grid_base_x , $ag_window_grid_base_y"
+    #ag_puts "ag_map_slot returns $screen_x , $screen_y"
     return [list $screen_x $screen_y]
 }
 
@@ -300,7 +316,7 @@
 proc ag_set_initial_location_and_size {src x y width height} {
     global userwin_size userwin_x userwin_y
     
-    ag_puts "new source $src has x=$x y=$y width=$width height=$height"
+    #ag_puts "new source $src has x=$x y=$y width=$width height=$height"
     
     set userwin_x($src) $x
     set userwin_y($src) $y
@@ -405,13 +421,13 @@
 	#
 
 	if { [$src mute] != "0" } {
-	    ag_puts "$src is muted, skipping"
+	    #ag_puts "$src is muted, skipping"
 	    continue
 	} elseif { $glue_source($src) == 1	 } {
-	    ag_puts "$src is glued, skipping"
+	    #ag_puts "$src is glued, skipping"
 	    continue
 	} else {
-	    ag_puts "Placing $src [ag_src_ident $src]"
+	    #ag_puts "Placing $src [ag_src_ident $src]"
 	}
 	
 	
@@ -451,7 +467,7 @@
     }
 
     if {![info exists win]} {
-	ag_puts "HMM, didn't find window for $src"
+	#ag_puts "HMM, didn't find window for $src"
 	return
     }
 

Modified: vic/branches/mpeg4/tcl/autoplace_ui.tcl
==============================================================================
--- vic/branches/mpeg4/tcl/autoplace_ui.tcl	(original)
+++ vic/branches/mpeg4/tcl/autoplace_ui.tcl	Fri Jun 15 22:22:29 2007
@@ -48,7 +48,7 @@
 
 		if { ! [info exists top ]} {
 
-			ag_puts "in show_ui [namespace current]"
+			#ag_puts "in show_ui [namespace current]"
 			set top [build_ui]
 		}
 
@@ -77,8 +77,8 @@
 	    
 		set platform $tcl_platform(platform)
 
-		set win_width $ag_win($ag_window_grid_mode,$platform,width)
-		set win_height $ag_win($ag_window_grid_mode,$platform,height)
+		set win_width $ag_win($ag_window_grid_mode,[windowingsystem],width)
+		set win_height $ag_win($ag_window_grid_mode,[windowingsystem],height)
 
 		if { $ap_active } { 
 			set startx [expr int($ag_window_grid_base_x * $scale)]
@@ -105,10 +105,10 @@
 
 		set mon_list [get_monitors]
 		if { $mon_list == ""} {
-			ag_puts "Did not find monitor list"
+			#ag_puts "Did not find monitor list"
 			set mon_list [list [ list 0 0 [winfo screenwidth $top] [winfo screenheight $top]]]
 		}
-		ag_puts "Using monitor list $mon_list"
+		#ag_puts "Using monitor list $mon_list"
 		frame $top.ap -relief ridge -borderwidth 3
 		pack $top.ap -fill both -expand 1 
 		ag_build_autoplacer $top.ap $mon_list
@@ -247,7 +247,7 @@
     }
     
     proc write_prefs {} {
-		ag_puts "write_prefs !"
+		#ag_puts "write_prefs !"
 		
 		variable parcel_width
 		variable parcel_height
@@ -283,7 +283,7 @@
 		#
 		# store the placementdirection
 		#
-		ag_puts $fh "*ag_window_grid_placement: $ag_window_grid_placement"
+		puts $fh "*ag_window_grid_placement: $ag_window_grid_placement"
 		close $fh
     }
 
@@ -450,8 +450,8 @@
 
 		set platform $tcl_platform(platform)
 		
-		set win_width $ag_win($ag_window_grid_mode,$platform,width)
-		set win_height $ag_win($ag_window_grid_mode,$platform,height)
+		set win_width $ag_win($ag_window_grid_mode,[windowingsystem],width)
+		set win_height $ag_win($ag_window_grid_mode,[windowingsystem],height)
 
 		#
 		# Sort the start/end positions so that start is at top left



More information about the Sumover-dev mailing list