Trace window updating in real-time on Linux
This commit is contained in:
parent
fd55f0854d
commit
8b5b174ba1
|
|
@ -418,10 +418,13 @@ def run_file(self=None):
|
|||
outputtext.scroll_bottom() # this doesn't work
|
||||
except:
|
||||
pass
|
||||
r = misc_funcs.RepeatTimer(0.02, updatetrace, args=[outputtext])
|
||||
print dir(outputwin.window)
|
||||
r.daemon = True
|
||||
r.start()
|
||||
return True
|
||||
if hasattr(svlgui, 'gobject'):
|
||||
svlgui.gobject.timeout_add(20, updatetrace, outputtext)
|
||||
else:
|
||||
r = misc_funcs.RepeatTimer(0.02, updatetrace, args=[outputtext])
|
||||
r.daemon = True
|
||||
r.start()
|
||||
if svlgui.PLATFORM=="osx":
|
||||
osx_flash_player_loc = "/Applications/Flash\ Player\ Debugger.app"
|
||||
success = svlgui.execute("open -a "+osx_flash_player_loc+" "+os.getenv('HOME')+"/test.swf")
|
||||
|
|
|
|||
|
|
@ -231,7 +231,7 @@ class MainWindowOSX:
|
|||
# self.toolbox.buttons[1][0]._int().enabled = False
|
||||
self.toolbox.buttons[3][0]._int().enabled = False
|
||||
self.toolbox.buttons[4][0]._int().enabled = False
|
||||
self.scriptwindow = svlgui.TextView()
|
||||
self.scriptwindow = svlgui.TextView(code=True)
|
||||
self.paintgroup = svlgui.RadioGroup("Draw straight", "Draw smooth", "Draw as inked")
|
||||
def setmode(self):
|
||||
svlgui.PMODE = self.value
|
||||
|
|
|
|||
|
|
@ -1211,7 +1211,7 @@ class TextView(Widget):
|
|||
if SYSTEM=="osx":
|
||||
self.box.text = text
|
||||
text = property(_gettext, _settext)
|
||||
def __init__(self,editable=True,width=False,height=False):
|
||||
def __init__(self,editable=True,width=False,height=False,code=False):
|
||||
if SYSTEM=="gtk":
|
||||
self.sw=ScrolledWindow()
|
||||
self.box=gtk.TextView()
|
||||
|
|
@ -1229,8 +1229,10 @@ class TextView(Widget):
|
|||
def mouse_down(self, event):
|
||||
self.become_target()
|
||||
GUI.TextEditor.mouse_down(self, event)
|
||||
# self.box = OSXTextEditor(scrolling="hv")
|
||||
self.box = CodeEditor()
|
||||
if code:
|
||||
self.box = CodeEditor()
|
||||
else:
|
||||
self.box = OSXTextEditor(scrolling="hv")
|
||||
self.box.font = Font("Courier", 12, [])
|
||||
if width and height:
|
||||
self.box.size = (width, height)
|
||||
|
|
@ -1246,6 +1248,7 @@ class TextView(Widget):
|
|||
def scroll_bottom(self):
|
||||
if SYSTEM=="osx":
|
||||
self.scroll_page_down();
|
||||
self.box.invalidate()
|
||||
|
||||
class TextEntry(Widget):
|
||||
def __init__(self,text="",password=False):
|
||||
|
|
|
|||
Loading…
Reference in New Issue