Skip to content

Commit

Permalink
keep list of windows
Browse files Browse the repository at this point in the history
  • Loading branch information
enkiv2 committed Nov 28, 2017
1 parent 625a819 commit a586f90
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions mtv/mtv.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@

import cStringIO

url2hash={}
clipboard=None
global clipboard
clipboard=None
url2hash={}
windows=[]

def genHLColor(obj):
gen=Random(obj)
Expand Down Expand Up @@ -96,6 +97,7 @@ def concatext2str(concatext):
def spawnTranslitEditor(edl):
top=TranslitEditorFrame(Toplevel())
top.pack()
windows.append(top)
try:
top.ed.openEDL(target)
except:
Expand Down Expand Up @@ -387,15 +389,10 @@ def main():
top=TranslitEditorFrame(Tk())
top.pack()
ed=top.ed
windows.append(top)
if len(sys.argv)>1:
target=sys.argv[1]
if(cmdtype=="text"):
ed.openTextAsEDL(target)
else:
try:
ed.openEDL(target)
except:
ed.openTextAsEDL(target)
spawnTranslitEditor(target)
top.mainloop()

if __name__=="__main__":
Expand Down

0 comments on commit a586f90

Please sign in to comment.