diff --git a/gradint-build/Makefile b/gradint-build/Makefile index f115f6b40f8669c3fb1b16132f17661582ec29f3..db426dbea13af1248abace937cdca03c1f3476aa 100644 --- a/gradint-build/Makefile +++ b/gradint-build/Makefile @@ -1,5 +1,5 @@ # This file is part of the source code of -# gradint v0.9937 (c) 2002-2009 Silas S. Brown. GPL v3+. +# gradint v0.9938 (c) 2002-2009 Silas S. Brown. GPL v3+. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or diff --git a/gradint-build/src/booktime.py b/gradint-build/src/booktime.py index d99da86690ca44f236a484a4dff6efa19f27f90a..73d5dd5767a6cff7a621c7fc11b7a1e1ccf4ab97 100644 --- a/gradint-build/src/booktime.py +++ b/gradint-build/src/booktime.py @@ -1,5 +1,5 @@ # This file is part of the source code of -# gradint v0.9937 (c) 2002-2009 Silas S. Brown. GPL v3+. +# gradint v0.9938 (c) 2002-2009 Silas S. Brown. GPL v3+. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or diff --git a/gradint-build/src/filescan.py b/gradint-build/src/filescan.py index cc55c0b1c93350511ea78ef91be618bc0c4a3547..392fa2dcec1e1d72798e169ffd4692784dc70a3a 100644 --- a/gradint-build/src/filescan.py +++ b/gradint-build/src/filescan.py @@ -1,5 +1,5 @@ # This file is part of the source code of -# gradint v0.9937 (c) 2002-2009 Silas S. Brown. GPL v3+. +# gradint v0.9938 (c) 2002-2009 Silas S. Brown. GPL v3+. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or diff --git a/gradint-build/src/frontend.py b/gradint-build/src/frontend.py index 17932c85a8782ac02f4bff6e7d1c78f0057a3355..beacd983c0a4ba53bfb633f79cb8520afa0a273c 100644 --- a/gradint-build/src/frontend.py +++ b/gradint-build/src/frontend.py @@ -1,5 +1,5 @@ # This file is part of the source code of -# gradint v0.9937 (c) 2002-2009 Silas S. Brown. GPL v3+. +# gradint v0.9938 (c) 2002-2009 Silas S. Brown. GPL v3+. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or diff --git a/gradint-build/src/lessonplan.py b/gradint-build/src/lessonplan.py index 3b62a736614877c8d7dbe2f0db2846c808f09ad8..3d1b451c0058e618d90ad3de8c21e596f17880a1 100644 --- a/gradint-build/src/lessonplan.py +++ b/gradint-build/src/lessonplan.py @@ -1,5 +1,5 @@ # This file is part of the source code of -# gradint v0.9937 (c) 2002-2009 Silas S. Brown. GPL v3+. +# gradint v0.9938 (c) 2002-2009 Silas S. Brown. GPL v3+. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or diff --git a/gradint-build/src/loop.py b/gradint-build/src/loop.py index 209e39869bd491a1f00c3febb8684faff54c245d..3debe6f8c79c90f78585bfb023db5041ed1c133d 100644 --- a/gradint-build/src/loop.py +++ b/gradint-build/src/loop.py @@ -1,5 +1,5 @@ # This file is part of the source code of -# gradint v0.9937 (c) 2002-2009 Silas S. Brown. GPL v3+. +# gradint v0.9938 (c) 2002-2009 Silas S. Brown. GPL v3+. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or diff --git a/gradint-build/src/makeevent.py b/gradint-build/src/makeevent.py index 6562397fc43b6f19ec2018dccd5d399f421238dc..91b97682ef773ba3572ae49cb79d1adb0af51cc0 100644 --- a/gradint-build/src/makeevent.py +++ b/gradint-build/src/makeevent.py @@ -1,5 +1,5 @@ # This file is part of the source code of -# gradint v0.9937 (c) 2002-2009 Silas S. Brown. GPL v3+. +# gradint v0.9938 (c) 2002-2009 Silas S. Brown. GPL v3+. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or diff --git a/gradint-build/src/play.py b/gradint-build/src/play.py index ea58d021abeaf9144b0e67405b904558530570f2..330f418e0f4d428aa1af2ea9f40ec95ee7336733 100644 --- a/gradint-build/src/play.py +++ b/gradint-build/src/play.py @@ -1,5 +1,5 @@ # This file is part of the source code of -# gradint v0.9937 (c) 2002-2009 Silas S. Brown. GPL v3+. +# gradint v0.9938 (c) 2002-2009 Silas S. Brown. GPL v3+. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or diff --git a/gradint-build/src/recording.py b/gradint-build/src/recording.py index 1efc4b596056418a5b907150f377e22d76456a80..a76b2c7e1df221a2b4f7e972b700740f6e858ac7 100644 --- a/gradint-build/src/recording.py +++ b/gradint-build/src/recording.py @@ -1,5 +1,5 @@ # This file is part of the source code of -# gradint v0.9937 (c) 2002-2009 Silas S. Brown. GPL v3+. +# gradint v0.9938 (c) 2002-2009 Silas S. Brown. GPL v3+. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or @@ -243,9 +243,9 @@ class RecorderControls: try: ftext = ensure_unicode(u8strip(open(filename).read().strip(wsp))) except IOError: return False l = Tkinter.Label(self.grid,text=ftext,wraplength=int(self.ourCanvas.winfo_screenwidth()/(1+len(self.languagesToDraw)))) - l.grid(row=row,column=col,columnspan=3) + l.grid(row=row,column=col,columnspan=2,sticky="w") l.bind('<Button-1>',lambda *args:self.startSynthEdit(l,row,col,filename)) - return True + return True # do NOT put it in self.coords2buttons (not to do with space bar stuff etc) def startSynthEdit(self,l,row,col,filename): if hasattr(self,"renameToCancel"): rr,cc = self.renameToCancel @@ -254,13 +254,13 @@ class RecorderControls: editText,editEntry = addTextBox(self.grid,"nopack") try: editText.set(ensure_unicode(u8strip(open(filename).read().strip(wsp)))) except IOError: pass - editEntry.grid(row=row,column=col,sticky='we',columnspan=3) + editEntry.grid(row=row,column=col,sticky='we',columnspan=2) editEntry.bind('<Return>',lambda *args:self.doEdit(editText,editEntry,row,col,filename)) editEntry.bind('<Escape>',lambda *args:self.cancelEdit(editEntry,row,col,filename)) self.scrollIntoView(editEntry) - if hasattr(self.coords2buttons.get((row-1,col+1),""),"is_synth_label"): - self.addLabel(row-1,col+1,localise("(synth'd)")) - self.coords2buttons[(row-1,col+1)].is_synth_label = True + if hasattr(self.coords2buttons.get((row-1,col),""),"is_synth_label"): + self.addLabel(row-1,col,localise("(synth'd)")) + self.coords2buttons[(row-1,col)].is_synth_label = True def doEdit(self,editText,editEntry,row,col,filename): text = editText.get().encode("utf-8").strip(wsp) if text: open(filename,"w").write(text+"\n") @@ -271,10 +271,10 @@ class RecorderControls: def cancelEdit(self,editEntry,row,col,filename): editEntry.grid_forget() labelAdded = self.addSynthLabel(filename,row,col) - if hasattr(self.coords2buttons.get((row-1,col+1),""),"is_synth_label"): - if labelAdded: self.addLabel(row-1,col+1,localise("(synth'd)")) - else: self.addButton(row-1,col+1,text=localise("Synthesize"),command=(lambda *args:self.startSynthEdit(None,row,col,filename))) - self.coords2buttons[(row-1,col+1)].is_synth_label = True + if hasattr(self.coords2buttons.get((row-1,col),""),"is_synth_label"): + if labelAdded: self.addLabel(row-1,col,localise("(synth'd)")) + else: self.addButton(row-1,col,text=localise("Synthesize"),command=(lambda *args:self.startSynthEdit(None,row,col,filename))) + self.coords2buttons[(row-1,col)].is_synth_label = True def all2mp3_or_zip(self): self.CompressButton["text"] = localise("Compressing, please wait") if got_program("lame"): wavToMp3(self.currentDir) # TODO not in the GUI thread !! (but lock our other buttons while it's doing it) @@ -529,6 +529,7 @@ class RecorderControls: self.grid,self.ourCanvas = setupScrollbar(self.frame,2) if hasattr(self,"oldCanvasBbox"): del self.oldCanvasBbox # unconditionally reconfigure scrollbar even if bounds are unchanged + for languageNo in range(len(self.languagesToDraw)): self.grid.grid_columnconfigure(3+3*languageNo,weight=1) # prefer expanding the last col of each language rather than evenly curRow = 0 ; prefix2row = {} maxPrefix = 0 ; self.has_recordFrom_buttons = False @@ -561,7 +562,7 @@ class RecorderControls: self.addLabel(curRow,0,utext=filename2unicode(prefix)) foundTxt = {} for lang in self.languagesToDraw: - if prefix+"_"+lang+dottxt in l: foundTxt[lang]=(self.currentDir+os.sep+prefix+"_"+lang+dottxt,1+3*self.languagesToDraw.index(lang)) + if prefix+"_"+lang+dottxt in l: foundTxt[lang]=(self.currentDir+os.sep+prefix+"_"+lang+dottxt,2+3*self.languagesToDraw.index(lang)) prefix2row[prefix] = curRow for lang in self.languagesToDraw: self.updateFile(prefix+"_"+lang+dotwav,curRow,self.languagesToDraw.index(lang),state=0,txtExists=(lang in foundTxt)) @@ -578,7 +579,7 @@ class RecorderControls: if curRow<3 and not hadDirectories: self.addMore() # anyway r=Tkinter.Frame(self.frame) - r.grid(row=3,columnspan=2) + r.grid(columnspan=2) r2 = Tkinter.Frame(r) ; r2.pack(side="left") Tkinter.Button(r2,text=localise("Advanced"),command=self.do_openInExplorer).pack() Tkinter.Button(r2,text=localise("Record from file"),command=self.do_recordFromFile).pack() @@ -591,7 +592,7 @@ class RecorderControls: if hasattr(self,"CompressButton"): self.CompressButton.pack(side="left") Tkinter.Button(r,text=localise(cond(recorderMode,"Quit","Back to main menu")),command=self.finished).pack(side="left") - Tkinter.Label(self.frame,text="Choose a word and start recording. Then press space to advance (see control at top). You can also browse and manage previous recordings. Click on filenames at left to rename (multi-line pastes are allowed); click synthesized text to edit it.",wraplength=cond(olpc or winCEsound,self.ourCanvas.winfo_screenwidth(),min(int(self.ourCanvas.winfo_screenwidth()*.7),512))).grid(row=4,columnspan=2) # (512-pixel max. so the column isn't too wide to read on wide screens, TODO increase if the font is large) + Tkinter.Label(self.frame,text="Choose a word and start recording. Then press space to advance (see control at top). You can also browse and manage previous recordings. Click on filenames at left to rename (multi-line pastes are allowed); click synthesized text to edit it.",wraplength=cond(olpc or winCEsound,self.ourCanvas.winfo_screenwidth(),min(int(self.ourCanvas.winfo_screenwidth()*.7),512))).grid(columnspan=2) # (512-pixel max. so the column isn't too wide to read on wide screens, TODO increase if the font is large) # (Don't worry about making the text files editable - editable filenames should be enough + easier to browse the result outside Gradint; can include both languages in the filename if you like - hope the users figure this out as we don't want to make the instructions too complex) def doRecWords(): # called from GUI thread diff --git a/gradint-build/src/sequence.py b/gradint-build/src/sequence.py index 2c45b6ebb032530509dc6fe3b6c1bf1305d353dd..fd7525e95cc3a4ee10d911228c3d85d0d8129224 100644 --- a/gradint-build/src/sequence.py +++ b/gradint-build/src/sequence.py @@ -1,5 +1,5 @@ # This file is part of the source code of -# gradint v0.9937 (c) 2002-2009 Silas S. Brown. GPL v3+. +# gradint v0.9938 (c) 2002-2009 Silas S. Brown. GPL v3+. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or diff --git a/gradint-build/src/synth.py b/gradint-build/src/synth.py index b0e217076954e6112bd89216721d2ca67500905d..323efa72ff41460261e600b13c019c7250c16064 100644 --- a/gradint-build/src/synth.py +++ b/gradint-build/src/synth.py @@ -1,5 +1,5 @@ # This file is part of the source code of -# gradint v0.9937 (c) 2002-2009 Silas S. Brown. GPL v3+. +# gradint v0.9938 (c) 2002-2009 Silas S. Brown. GPL v3+. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or diff --git a/gradint-build/src/system.py b/gradint-build/src/system.py index 43c95f1c9f7f8a6e8d9399a577e2a105d7d7c5d5..de7b4768bc0e193f8d1d018e385e47904882e7f8 100644 --- a/gradint-build/src/system.py +++ b/gradint-build/src/system.py @@ -1,5 +1,5 @@ # This file is part of the source code of -# gradint v0.9937 (c) 2002-2009 Silas S. Brown. GPL v3+. +# gradint v0.9938 (c) 2002-2009 Silas S. Brown. GPL v3+. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or diff --git a/gradint-build/src/top.py b/gradint-build/src/top.py index 203b24a97becd4b6a7d3640e3c06507ec9af7deb..4149d9d6aabeec64a49763c65327970d69f134ee 100644 --- a/gradint-build/src/top.py +++ b/gradint-build/src/top.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -program_name = "gradint v0.9937 (c) 2002-2009 Silas S. Brown. GPL v3+." +program_name = "gradint v0.9938 (c) 2002-2009 Silas S. Brown. GPL v3+." # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gradint-build/thindown.py b/gradint-build/thindown.py index 3a1be2d97ace929eb745afdb191a7fe63da52ff5..fb46e19c95ebc6587fe852175f9c979459768226 100644 --- a/gradint-build/thindown.py +++ b/gradint-build/thindown.py @@ -1,5 +1,5 @@ # This file is part of the source code of -# gradint v0.9937 (c) 2002-2009 Silas S. Brown. GPL v3+. +# gradint v0.9938 (c) 2002-2009 Silas S. Brown. GPL v3+. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or