From 2136857e26a118c5a15ef67a41612a4f73830ad5 Mon Sep 17 00:00:00 2001 From: Harishankar Date: Thu, 25 Mar 2010 20:58:14 +0530 Subject: [PATCH] Removed the confirmation dialog on encode Removed the confirmation dialog on encode because of a tkinter bug. --- mainwindow.py | 26 ++++++++++++++------------ mainwindow.pyc | Bin 12943 -> 12810 bytes 2 files changed, 14 insertions(+), 12 deletions(-) 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""" diff --git a/mainwindow.pyc b/mainwindow.pyc index 6c7e9df967c6d25f84cebd4f30e8e833af8a6083..8ccc3632e67584b30d194f67421a02bf5a11ec89 100644 GIT binary patch delta 763 zcmY+C&1(};5Wr_PAI--mwj^!R>Y7;4lv2_pR;)ru8&T9&FzZQLNTVC;)+SrB+m@EJ z3c*S(8f3f(rFs#>i2rRuHT<&^@4gL32U_!8itJ`9SxB<^oFwJpgs& zg^2hjC0G%!1F8=JH8*fz5N6z9RCad-LD+7s4Q3=TdiOaGL|W-4|K(e8LN&H8#QQho zzlhyd>aEuHs&|NOPS9PTNuc?lA&GAMaHUVCHD8U2{w5xvpZ*jL$Y10x5RWvBVM%t` z;lP{&`{{0bK45u-FPXQN%4XG|x9vMPYd`DwfXZ>F8*yq{S;)Mv%ehDlR90VJ7EF)=hPQZGx>VaK@Y*N@=Eb1?f$$+HEQlcJA@Cuhr=XYaS%r{b=EJ$)^S$Ssd%0`!UBzSn zD)+sbsvLdc>G$GEHtJ0lcLA3HR2QrQtRR>UP~9LqKz72a0Qy@%(*vp(R3FIPgrGNb z$q#A(WH*@Qpax+XDN)1!NdZ>)R|X3`h_VOB7=l?B=-ItpA>eAA?1fog{0Lxi&ruS6 zP;;Q(iUYLhfo=Z(9eblJJ7|If-RUGwkOhzfbQ07MP%ek_u^<2#F^-}1+#D~hJJwG30tr1Oe+VOSdH zmb{wNwXC97*KM)tmVo!|r`2O+t|vTUG_&W`)pn@< zHR7bb-QY!3*v?@K-`L5>DB?%96&2a-NH6=@*ozixkFMhvdn-DK_|5(!S^->S3-K@( z*^PJ;7TB|RBzlD!))D-K456OTKrq?&c*H+Jp+x9rp~O1wvWJPCmNhQKoTT0%+~eRc z6CjmRHPuX|qz#fc*@KRA&PO~PVm~^PecdGfD_Ck@YHCtqkx(EM37Z55feOTc-%Brh z*;$8GY`e4eSgEf?>3%|xK=*6X`_YZWeA>)N2~t~GsOu08u%@o8p9YnXW53>~uH%0J DV&Kem -- 2.20.1