Bug 382535 - Impossible to predefine filters with --getopenfilename
Summary: Impossible to predefine filters with --getopenfilename
Status: RESOLVED FIXED
Alias: None
Product: kdialog
Classification: Applications
Component: general (show other bugs)
Version: 1.0
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Brad Hards
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-20 12:03 UTC by Nico Dorn
Modified: 2019-09-04 19:54 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nico Dorn 2017-07-20 12:03:24 UTC
The code below opens the expected dialog window but doesn't set the passed filters. Since it doesn't set any filters, no file can be selected - until one types the filters manually.

I think the bug was introduced with the latest revision of KDE Frameworks, i.e. version 5.36.0.

kdialog --getopenfilename /tmp/ ".tar.gz"
Comment 1 Nico Dorn 2017-07-20 12:12:31 UTC
Pardon me! It must have been introduced with KDE Applications 17.04.3, naturally. :)
Comment 2 Christoph Feck 2017-07-21 11:09:57 UTC
kdialog --getopenfile /tmp/ "Tar File (*.tar.gz)"
is the official glob type syntax and works. I am not sure if your glob without a name and a correct pattern worked because of a bug, or if it was a documented feature.
Comment 3 Nico Dorn 2017-07-21 11:27:53 UTC
Thanks for your answer! That works indeed. It used to work without wildcard. But it's correct to presume it's use.

So I'd say, this is not a bug, but I would like to propse to add another helpline to kdialog --help, since filters can be used for several functions. Something like that:

Arguments:
  [arg]      Arguments - depending on main option
  [filter]   File type filter - usage: "*.xml" or "XML file (*.xml)"