From 8e5d9bd01ca5fcb75f1a6e27ff008cb5ebb67e16 Mon Sep 17 00:00:00 2001 From: Saeed Rasooli Date: Sat, 4 Aug 2018 22:37:13 +0800 Subject: [PATCH] ui_gtk: avoid changing Format combobox based on file extention if a format is already selected, #141 --- ui/ui_gtk.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/ui_gtk.py b/ui/ui_gtk.py index 64045b581..e06a0f3de 100644 --- a/ui/ui_gtk.py +++ b/ui/ui_gtk.py @@ -647,7 +647,7 @@ def convertInputEntryChanged(self, widget=None): if not isfile(inPath): return - if self.pref["ui_autoSetFormat"]: # and not inFormat: + if self.pref["ui_autoSetFormat"] and not inFormat: self.convertInputFormatCombo.setActive(inFormatNew) self.status("Select output file") @@ -671,7 +671,7 @@ def convertOutputEntryChanged(self, widget=None): outPath = urlToPath(outPath) self.convertOutputEntry.set_text(outPath) - if self.pref["ui_autoSetFormat"]: # and not outFormat: + if self.pref["ui_autoSetFormat"] and not outFormat: outExt = getCopressedFileExt(outPath) try: outFormatNew = Glossary.extFormat[outExt] @@ -749,7 +749,7 @@ def reverseInputEntryChanged(self, widget=None): inExt = getCopressedFileExt(inPath) inFormatNew = Glossary.extFormat.get(inExt) - if inFormatNew and self.pref["ui_autoSetFormat"]: # and not inFormat: + if inFormatNew and self.pref["ui_autoSetFormat"] and not inFormat: self.reverseInputFormatCombo.setActive(inFormatNew) if self.pref["ui_autoSetOutputFileName"]: