X-Git-Url: https://harishankar.org/repos/?p=biamove.git;a=blobdiff_plain;f=mainwindow.py;h=821207d35033e951bee67a89ef34d6e9b52abb48;hp=f696d69e6312e9fa6b86352b58cc17da6dbb1a7b;hb=2136857e26a118c5a15ef67a41612a4f73830ad5;hpb=81d67ae9cd2c27ac180871c69be6dcf79e8daf88 diff --git a/mainwindow.py b/mainwindow.py index f696d69..821207d 100644 --- a/mainwindow.py +++ b/mainwindow.py @@ -89,19 +89,21 @@ class MainWindow (Tkinter.Frame): tkMessageBox.showerror ("Cannot encode", "No input and/or output file specified") else: commandlist = self.build_mencoder_command () - - if tkMessageBox.askyesno ("Confirm", "Are you sure you wish to encode (in *NIX you must have TERM environment variable set)?"): - if sys.platform.startswith ('win'): - po, pi = os.popen2 ("cmd /K " + subprocess.list2cmdline (commandlist)) - else: - if "TERM" in os.environ: - if os.environ["TERM"] == "xterm": - term_command = os.environ["TERM"] + " -hold -e " + subprocess.list2cmdline (commandlist) - else: - term_command = os.environ["TERM"] + " -e " + subprocess.list2cmdline(commandlist) - po, pi = os.popen2 (term_command) + + # this line is commented out because the confirmation dialog box is not working properly + # TKinter bug... +# if tkMessageBox.askyesno ("Confirm", "Are you sure you wish to encode (in *NIX you must have TERM environment variable set)?"): + if sys.platform.startswith ('win'): + po, pi = os.popen2 ("cmd /K " + subprocess.list2cmdline (commandlist)) + else: + if "TERM" in os.environ: + if os.environ["TERM"] == "xterm": + term_command = os.environ["TERM"] + " -hold -e " + subprocess.list2cmdline (commandlist) else: - tkMessageBox.showerror ("Cannot encode", "The TERM environment variable is not set. Cannot find a suitable terminal.") + term_command = os.environ["TERM"] + " -e " + subprocess.list2cmdline(commandlist) + po, pi = os.popen2 (term_command) + else: + tkMessageBox.showerror ("Cannot encode", "The TERM environment variable is not set. Cannot find a suitable terminal.") def on_save_profile (self): """ Called when the save profile button is clicked"""