@@ -96,7 +96,22 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
...
@@ -96,7 +96,22 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
customdict={}
customdict={}
try:
try:
execfile("custombtn.txt",customdict)
execfile("custombtn.txt",customdict)
self.custombuttons+=customdict["btns"]
iflen(customdict["btns"]):
ifnotlen(self.custombuttons):
try:
self.custombuttons=customdict["btns"]
forninxrange(len(self.custombuttons)):
self.cbutton_save(n,self.custombuttons[n])
os.rename("custombtn.txt","custombtn.old")
rco=open("custombtn.txt","w")
rco.write("# I moved all your custom buttons into .pronsolerc.\n# Please don't add them here any more.\n# Backup of your old buttons is in custombtn.old\n")
rco.close()
exceptIOError,x:
printstr(x)
else:
print"Note!!! You have specified custom buttons in both custombtn.txt and .pronsolerc"
print"Ignoring custombtn.txt. Remove all current buttons to revert to custombtn.txt"
except:
except:
pass
pass
self.popmenu()
self.popmenu()
...
@@ -109,6 +124,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
...
@@ -109,6 +124,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
#self.p.endcb=self.endcb
#self.p.endcb=self.endcb
self.starttime=0
self.starttime=0
self.curlayer=0
self.curlayer=0
self.cur_button=None
defstartcb(self):
defstartcb(self):
self.starttime=time.time()
self.starttime=time.time()
...
@@ -219,22 +235,9 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
...
@@ -219,22 +235,9 @@ class PronterWindow(wx.Frame,pronsole.pronsole):