Native file dialog used incorrectly

Bug #1715648 reported by Zsombor
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
calibre
Fix Released
Undecided
Unassigned

Bug Description

Using 3.7 from the official on KDE (on Kubuntu if it matters).

I've noticed that the new version use a different, native file dialog as opposed to the previous versions. However it seems, it is initialized incorrectly, as it is opens up, with the followings:

"
Name: --multiple
Filter: /previous/file/path
"

Unfortunately, the file list shows my ~/Documents directory as a directory tree, without any files. So I can't add any new books to calibre.

I have to manually clear the filter field, to see the file list. And I have to re-navigate back to the last used directory manually. Which both found a bit annoying.

Revision history for this message
Kovid Goyal (kovid) wrote : Re: calibre bug 1715648

Works fine on my KDE system. Probably kdialog on your system is too old.
Post the output of running

kdialog --help

in a terminal on your system. Annoylingly kdialog has a useless version
number, so I have to rely on parsing the output of --help to detect
functionality.

 status incomplete

Changed in calibre:
status: New → Incomplete
Revision history for this message
Zsombor (gzsombor) wrote :
Download full text (4.0 KiB)

As my system locale is Hungarian, it shows the following:

"
/ ➜ kdialog --help 16:24
Használat: kdialog [Qt-paraméterek] [KDE-paraméterek] [paraméterek][arg]

A KDialog segítségével parancsfájlokból lehet párbeszédablakokat megjeleníteni

Általános paraméterek:
  --help Információ megjelenítése a paraméterekről
  --help-qt A(z) Qt-specifikus paraméterek megjelenítése
  --help-kde A(z) KDE-specifikus paraméterek megjelenítése
  --help-all Az összes lehetséges paraméter megjelenítése
  --author A szerző(k) nevének megjelenítése
  -v, --version A verzióinformáció megjelenítése
  --license A licencinformáció megjelenítése
  -- A paraméterek vége

Paraméterek:
  --yesno <text> Kérdező üzenetablak Igen/Nem nyomógombokkal
  --yesnocancel <text> Kérdező üzenetablak Igen/Nem/Mégsem nyomógombokkal
  --warningyesno <text> Figyelmeztető ablak Igen/Nem gombokkal
  --warningcontinuecancel <text> Figyelmeztető ablak Folytatás/Mégsem gombokkal
  --warningyesnocancel <text> Figyelmeztető ablak Igen/Nem/Mégsem gombokkal
  --yes-label <text> Szöveg használata az Igen gomb címkéjeként
  --no-label <text> Szöveg használata a Nem gomb címkéjeként
  --cancel-label <text> Szöveg használata a Mégsem gomb címkéjeként
  --continue-label <text> Szöveg használata a Folytatás gomb címkéjeként
  --sorry <text> „Elnézést” üzenetablak
  --detailedsorry <text> <details> „Elnézést” üzenetablak kinyitható Részletek mezővel
  --error <text> „Hiba” üzenetablak
  --detailederror <text> <details> „Hiba” üzenetablak kinyitható Részletek mezővel
  --msgbox <text> Üzenetablak-párbeszédablak
  --inputbox <text> <init> Adatbeviteli ablak
  --password <text> Jelszóbeviteli ablak
  --textbox <file> [width] [height] Szöveges üzenetablak
  --textinputbox <text> <init> [width] [height] Szövegbeviteli ablak
  --combobox <text> item [item] [item] ... Kombinált listás ablak
  --menu <text> [tag item] [tag item] ... Menüablak
  --checklist <text> [tag item status] ... Jelölőnégyzetes ablak
  --radiolist <text> [tag item status] ... Választógombos ablak
  --passivepopup <text> <timeout> Passzív felbukkanó ablak
  --getopenfilename [startDir] [filter] Fájlmegnyitási párbeszédablak
  --getsavefilename [startDir] [filter] Fájlmentési párbeszédablak
  --getexistingdirectory [startDir] Párbeszédablak egy már létező könyvtár kiválasztásához
  --getopenurl [startDir] [filter] Párbeszédablak egy létező URL megnyitásához
  --getsaveurl [startDir] [filter] Párbeszédablak egy URL mentéséhez
  --geticon [group] [context] Ikonválasztó párbeszédablak
  --progressbar <text> [totalsteps] Folyamatjelző ablak, D-Bus-hivatkozást ad vissza a kommunikációhoz
  --getcolor Párbeszédablak szín kiválasztásához
  --title <text> Az ablak felirata
  --default <text> Alapértelmezett bejegyzés kombinált listák...

Read more...

Revision history for this message
Kovid Goyal (kovid) wrote :

Localization does not matter. Parsing checks for --option names. Your kdialog is missing the --separate-output option, which is the cause of this. I will add a check for it in the next release.

Revision history for this message
Kovid Goyal (kovid) wrote :

Actually, no, it is not missing that option (I saw only the truncated output previously).

Revision history for this message
Kovid Goyal (kovid) wrote :

Does this command work?

kdialog --getopenfilename --multiple --separate-output /tmp 'Books (*.epub *.mobi)\nAll files (*)'

it should open kdialog at /tmp with filters for Books and All files.

Revision history for this message
Zsombor (gzsombor) wrote :

The problem with your command is that --getopenfilename expects to have 2 consecutive arguments, so in your example, this is why it screws the result.

However if I run:
kdialog --multiple --separate-output --getopenfilename /tmp 'Books (*.epub *.mobi)\nAll files (*)'

It works

Revision history for this message
Kovid Goyal (kovid) wrote :

Not in the version of kdialog on my system. Sigh. kdialog is a truly
awful piece of software. In any case, this is easily worked around in
calibre.

Revision history for this message
Kovid Goyal (kovid) wrote : Fixed in master

Fixed in branch master. The fix will be in the next release. calibre is usually released every alternate Friday.

 status fixreleased

Changed in calibre:
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.