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