From 0b4d97a8a474667c09631582fe742f718f906aca Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 26 Jul 2009 11:44:01 -0600 Subject: [PATCH] Fix file selection dialogs not choosing the correct file extension filter by default --- src/calibre/gui2/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/gui2/__init__.py b/src/calibre/gui2/__init__.py index f5dcdcfebe..12f6fb2025 100644 --- a/src/calibre/gui2/__init__.py +++ b/src/calibre/gui2/__init__.py @@ -342,6 +342,8 @@ class FileDialog(QObject): ftext += '%s (%s);;'%(text, ' '.join(extensions)) if add_all_files_filter or not ftext: ftext += 'All files (*)' + if ftext.endswith(';;'): + ftext = ftext[:-2] self.dialog_name = name if name else 'dialog_' + title self.selected_files = None