View Single Post
Old 12-26-2011, 06:11 AM   #11
katze_sonne
Junior Member
katze_sonne began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Dec 2011
Device: Kindle 4 NT
Hi,

thanks for your answer!

Quote:
The dialog is supposed to show the extension being added
I know - but that's also not the case in the "original" code, which was there before. Also in the add book dialog there are no file extensions shown... (and AFAIK it's the same syntax I used)

The "choose_files"-function is imported from the /gui2/__init__.py-script, I Think (line 615). There the Class FileDialog is used. It is defined in lines 528 and following. Actually I am not really sure about what this code:
Code:
extensions = ['*'+(i if i.startswith('.') else '.'+i) for i in
                        extensions]
                ftext += '%s (%s);;'%(text, ' '.join(extensions))
...does, but I think it extracts the file extension and hangs it at the end again, so that the QFileDialog is called the right way (so it can show the file extension, if you do not have the standard GNOME3-Theme)

Quote:
Not showing the extensions reduces usability of the dialog.
True, but in my opinion it's not a reason why importing file shouldn't work *at all*...

Quote:
Furthermore it is the correct was to use QFileDialog as per the official Qt documentation:
Sorry, what do you mean by this sentence? I've read over it severel times now, but I just don't get it... (and I had a look at the pyqt documentation)

katze_sonne
katze_sonne is offline   Reply With Quote