[PD-cvs] pd/src desire.tk,1.1.2.166,1.1.2.167

Mathieu Bouchard matju at users.sourceforge.net
Thu Apr 20 03:42:43 CEST 2006


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

Modified Files:
      Tag: devel_0_39
	desire.tk 
Log Message:
objectivising pdrc_editor


Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.166
retrieving revision 1.1.2.167
diff -C2 -d -r1.1.2.166 -r1.1.2.167
*** desire.tk	20 Apr 2006 01:21:04 -0000	1.1.2.166
--- desire.tk	20 Apr 2006 01:42:41 -0000	1.1.2.167
***************
*** 3464,3472 ****
  	}
  	pack $f -side top -fill x
- #<<<<<<< desire.tk
- #	catch {$f.label configure -width 40 -anchor e}
- #=======
  	catch {$f.label configure -width 45 -anchor nw}
- #>>>>>>> 1.1.2.165
      }
  }
--- 3464,3468 ----
***************
*** 3583,3606 ****
  }
  
  proc pdrc_editor_ok {self} {pdrc_editor_apply $self; pdrc_editor_cancel $self}
  proc pdrc_editor_cancel {self} {destroy $self}
  proc pdrc_editor_apply {self} {
  	set self [string trimleft $self .]
! 	pdrc_write $self
  }
  
! proc notebook_select {self i} {
!   global _
    catch {
!     .$self.bar.$_($self:section) configure -relief raised
!     place forget .$self.main.$_($self:section)
    }
!   set _($self:section) $i
!   place .$self.main.$_($self:section) -x 0 -y 0
!   .$self.bar.$_($self:section) configure -relief sunken
  }
  
! proc pdrc_read {self} {
! 	global pdrc_options pdrc_options_h _ cmdline
  	set fd [open $cmdline(rcfilename) "RDONLY CREAT"]
  	set contents [split [string map {"\n" " "} [read $fd]] " "]
--- 3579,3604 ----
  }
  
+ class_new pdrc_editor
+ 
  proc pdrc_editor_ok {self} {pdrc_editor_apply $self; pdrc_editor_cancel $self}
  proc pdrc_editor_cancel {self} {destroy $self}
  proc pdrc_editor_apply {self} {
  	set self [string trimleft $self .]
! 	pdrc_editor_write $self
  }
  
! def pdrc_editor page_select {i} {
!   set f .$self.1
    catch {
!     $f.bar.$@section configure -relief raised
!     place forget $f.main.$@section
    }
!   set @section $i
!   place $f.main.$@section -x 0 -y 0
!   $f.bar.$@section configure -relief sunken
  }
  
! def pdrc_editor read {} {
! 	global pdrc_options pdrc_options_h cmdline
  	set fd [open $cmdline(rcfilename) "RDONLY CREAT"]
  	set contents [split [string map {"\n" " "} [read $fd]] " "]
***************
*** 3631,3636 ****
  }
  
! proc pdrc_write {self} {
! 	global pdrc_options pdrc_options_h _ cmdline
  	set fd [open $cmdline(rcfilename) w]
  	foreach {type name desc} $pdrc_options {
--- 3629,3634 ----
  }
  
! def pdrc_editor write {} {
! 	global pdrc_options pdrc_options_h cmdline
  	set fd [open $cmdline(rcfilename) w]
  	foreach {type name desc} $pdrc_options {
***************
*** 3647,3659 ****
  }
  
! proc pdrc_editor_new {} {
  	global _ pdrc_options
! 	set self pdrc
! 	pdrc_read $self
  	toplevel .$self
! 	frame .$self.1
! 	frame .$self.1.bar
! 	frame .$self.1.buttonsep -height 2 -borderwidth 1 -relief sunken
! 	frame .$self.1.main -borderwidth 1 -relief raised -width 600 -height 350
  	set section 0
  	foreach {type name desc} $pdrc_options {
--- 3645,3657 ----
  }
  
! def pdrc_editor init {} {
  	global _ pdrc_options
! 	$self read
  	toplevel .$self
! 	set f .$self.1
! 	frame $f
! 	frame $f.bar
! 	frame $f.buttonsep -height 2 -borderwidth 1 -relief sunken
! 	frame $f.main -borderwidth 1 -relief raised -width 600 -height 350
  	set section 0
  	foreach {type name desc} $pdrc_options {
***************
*** 3662,3673 ****
  	    section {
  		incr section
! 		frame .$self.1.main.$section
! 		button .$self.1.bar.$section -text $desc \
! 			-command [list notebook_select $self.1 $section]
! 		pack .$self.1.bar.$section -side left
  	    }
  	    alias {}
  	    radio {
! 		properties_dialog $self .$self.1.main.$section pdrc_editor_ok \
  			[list [lindex $name 0] "$desc" choice {}]
  	    }
--- 3660,3670 ----
  	    section {
  		incr section
! 		frame $f.main.$section
! 		pack [button $f.bar.$section -text $desc \
! 			-command [list $self page_select $section]] -side left
  	    }
  	    alias {}
  	    radio {
! 		properties_dialog $self $f.main.$section pdrc_editor_ok \
  			[list [lindex $name 0] "$desc" choice {}]
  	    }
***************
*** 3675,3679 ****
  		#properties_dialog $self .$self.1.main.$section pdrc_editor_ok \
  		#	[list $name "$name: $desc" $type {}]
! 		properties_dialog $self .$self.1.main.$section pdrc_editor_ok \
  			[list $name $desc $type {}]
  	    }
--- 3672,3676 ----
  		#properties_dialog $self .$self.1.main.$section pdrc_editor_ok \
  		#	[list $name "$name: $desc" $type {}]
! 		properties_dialog $self $f.main.$section pdrc_editor_ok \
  			[list $name $desc $type {}]
  	    }
***************
*** 3681,3693 ****
  	}
  	cancel_apply_ok $self pdrc_editor
! 	notebook_select $self.1 1
! 	pack .$self.1.bar -fill x
! 	pack .$self.1.buttonsep
! 	pack .$self.1.main -fill both -expand yes
! 	pack .$self.1
! 	return $self
  }
  
! def Client pdrc_editor {} {pdrc_editor_new}
  
  ############ other stuff #########
--- 3678,3689 ----
  	}
  	cancel_apply_ok $self pdrc_editor
! 	$self page_select 1
! 	pack $f.bar -fill x
! 	pack $f.buttonsep
! 	pack $f.main -fill both -expand yes
! 	pack $f
  }
  
! def Client pdrc_editor {} {pdrc_editor new_as pdrc}
  
  ############ other stuff #########





More information about the Pd-cvs mailing list