[PD-cvs] pd/src u_main.tk,1.1.1.4.2.7.4.10,1.1.1.4.2.7.4.11 s_main.c,1.1.1.4.2.8.4.3,1.1.1.4.2.8.4.4

matju at users.sourceforge.net matju at users.sourceforge.net
Sun Mar 7 06:31:37 CET 2004


Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26859

Modified Files:
      Tag: impd_0_37
	u_main.tk s_main.c 
Log Message:
not using environment variables (because win32)


Index: u_main.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/u_main.tk,v
retrieving revision 1.1.1.4.2.7.4.10
retrieving revision 1.1.1.4.2.7.4.11
diff -C2 -d -r1.1.1.4.2.7.4.10 -r1.1.1.4.2.7.4.11
*** u_main.tk	5 Mar 2004 19:02:10 -0000	1.1.1.4.2.7.4.10
--- u_main.tk	7 Mar 2004 05:31:35 -0000	1.1.1.4.2.7.4.11
***************
*** 702,712 ****
      	-orient horizontal
  
!     global env
!     if {[info exists env(pd_look)]} {
  	make_button_bar $name.bbar $name
  	pack $name.bbar -side top -fill x -expand no
      }
  
!     if {[info exists env(pd_statusbar)]} {
  	frame $name.stat -border 2 -relief ridge
  #	entry $name.stat.pos -width 10 -state disabled \
--- 702,712 ----
      	-orient horizontal
  
!     global cmdline
!     if {[string compare $cmdline(look) ""]} {
  	make_button_bar $name.bbar $name
  	pack $name.bbar -side top -fill x -expand no
      }
  
!     if {$cmdline(statusbar)} {
  	frame $name.stat -border 2 -relief ridge
  #	entry $name.stat.pos -width 10 -state disabled \
***************
*** 993,997 ****
  #   after 1 [concat raise $name]
  #    after 1 [list canvas_animate $name]
!     if {[info exists env(pd_statusbar)]} {
          bind $name.c <Motion> "+stat_pos_update $name %x %y"
      }
--- 993,997 ----
  #   after 1 [concat raise $name]
  #    after 1 [list canvas_animate $name]
!     if {$cmdline(statusbar)} {
          bind $name.c <Motion> "+stat_pos_update $name %x %y"
      }
***************
*** 3355,3381 ****
  ############ console
  
! #puts "pd_console_scrollback = $env(pd_console_scrollback)"
! set errMsg ""
! catch {
! if {$env(pd_console_scrollback) != 0} {
! 	frame .log
! 	text .log.1 -width 60 -height 10 -yscrollcommand ".log.2 set"
! 	scrollbar .log.2 -command ".log.1 yview"
! 	.log.1 insert end "This is the PureData log\n"
! 	pack .log.1 -side left -fill both -expand yes
! 	pack .log.2 -side left -fill y -expand no
! 	pack .log -fill both -expand yes
! 	.log.2 set 0.0 1.0
  }
! } errMsg
! if {[string compare "" $errMsg] != 0} {puts stderr "ERROR: $errMsg"}
  set console_scrollback_count 0
  proc post_to_gui {x} {
! 	global env
  	global console_scrollback_count
  	set oldpos [lindex [.log.2 get] 1]
  	.log.1 insert end $x
  	incr console_scrollback_count
! 	if {$console_scrollback_count >= $env(pd_console_scrollback)} {
  		.log.1 delete 1.0 2.0
  	}
--- 3355,3384 ----
  ############ console
  
! proc make_console {} {
! 	global cmdline
! 	set errMsg ""
! 	catch {
! 	if {$cmdline(console) != 0} {
! 		frame .log
! 		text .log.1 -width 60 -height 10 -yscrollcommand ".log.2 set"
! 		scrollbar .log.2 -command ".log.1 yview"
! 		.log.1 insert end "This is the PureData log\n"
! 		pack .log.1 -side left -fill both -expand yes
! 		pack .log.2 -side left -fill y -expand no
! 		pack .log -fill both -expand yes
! 		.log.2 set 0.0 1.0
! 	}
! 	} errMsg
! 	if {[string compare "" $errMsg] != 0} {puts stderr "ERROR: $errMsg"}
  }
! 
  set console_scrollback_count 0
  proc post_to_gui {x} {
! 	global cmdline
  	global console_scrollback_count
  	set oldpos [lindex [.log.2 get] 1]
  	.log.1 insert end $x
  	incr console_scrollback_count
! 	if {$console_scrollback_count >= $cmdline(console)} {
  		.log.1 delete 1.0 2.0
  	}
***************
*** 3435,3443 ****
  }
  
! global env
! if {$env(pd_console_scrollback) != 0} {
  	listener_new .tcl "Tcl"
  	bind .tcl.entry <Return> {tcl_eval}
! }
  
  ############ button bar
--- 3438,3447 ----
  }
  
! global cmdline
! after 1 {
! if {$cmdline(console) != 0} {
  	listener_new .tcl "Tcl"
  	bind .tcl.entry <Return> {tcl_eval}
! }}
  
  ############ button bar
***************
*** 3470,3476 ****
  proc load_button_bar {} {
  	global butt
! 	global env
  	set icons {mode_edit mode_run}
! 	set dir $env(pd_look)
  	foreach b $butt {
  		if {[string compare [lindex $b 2] noload]!=0} {
--- 3474,3480 ----
  proc load_button_bar {} {
  	global butt
! 	global cmdline
  	set icons {mode_edit mode_run}
! 	set dir $cmdline(look)
  	foreach b $butt {
  		if {[string compare [lindex $b 2] noload]!=0} {
***************
*** 3484,3490 ****
  	}
  }
- if {[info exists env(pd_look)]} {load_button_bar}
  
  proc make_button_bar {self doc} {
          global butt
  	frame $self
--- 3488,3496 ----
  	}
  }
  
+ set buttons_loaded 0
  proc make_button_bar {self doc} {
+ 	global buttons_loaded
+ 	if {!$buttons_loaded} {load_button_bar}
          global butt
  	frame $self

Index: s_main.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_main.c,v
retrieving revision 1.1.1.4.2.8.4.3
retrieving revision 1.1.1.4.2.8.4.4
diff -C2 -d -r1.1.1.4.2.8.4.3 -r1.1.1.4.2.8.4.4
*** s_main.c	27 Feb 2004 05:20:52 -0000	1.1.1.4.2.8.4.3
--- s_main.c	7 Mar 2004 05:31:35 -0000	1.1.1.4.2.8.4.4
***************
*** 236,239 ****
--- 236,242 ----
  static void sys_addreferencepath(void);
  
+ static int option_statusbar = 0;
+ static char *option_look = "";
+ 
  /* this is called from main() in s_entry.c */
  int sys_main(int argc, char **argv)
***************
*** 260,264 ****
  	char buf[64];
  	sprintf(buf,"%d",console_scrollback);
- 	setenv("pd_console_scrollback",buf,1);
  	if (console_scrollback) {
  	    void guiprint(char *fmt, va_list ap);
--- 263,266 ----
***************
*** 271,274 ****
--- 273,280 ----
      	return(1);
  
+     sys_vgui("global cmdline; set cmdline(console) %d; "
+ 	    "set cmdline(look) %s; set cmdline(statusbar) %d; make_console\n",
+ 	    console_scrollback,option_look,option_statusbar);
+     
  	    /* open audio and MIDI */
      sys_open_midi(sys_nmidiin, sys_midiindevlist,
***************
*** 775,779 ****
      	    argc -= 2; argv += 2;
      	}
- 	/* Matju { */
      	else if (!strcmp(*argv,"-console"))
  	{
--- 781,784 ----
***************
*** 784,796 ****
  	else if (!strcmp(*argv,"-look"))
  	{
! 		setenv("pd_look",argv[1],1);
  		argc-=2; argv+=2;
  	}
  	else if (!strcmp(*argv,"-statusbar"))
  	{
! 		setenv("pd_statusbar","1",1);
  		argc-=1; argv+=1;
  	}
- 	/* } */
  	else
      	{
--- 789,800 ----
  	else if (!strcmp(*argv,"-look"))
  	{
! 		option_look = strdup(argv[1]);
  		argc-=2; argv+=2;
  	}
  	else if (!strcmp(*argv,"-statusbar"))
  	{
! 		option_statusbar = 1;
  		argc-=1; argv+=1;
  	}
  	else
      	{





More information about the Pd-cvs mailing list