Closed demurgos closed 7 years ago
While playing with kdialog
, I noticed the following:
kdialog --getopenfilename .
works but kdialog --caption Virtaal --getopenfilename .
yields Unknown option 'caption'.
instead of opening the dialog. It could be the source of this issue.
Thank you for the report. Are you able to provide a proper fix with a pull request? Thanks again!
It seems that we should additionally test for the presence of kdialog before assuming it is the right path to follow under KDE. The code currently assumes that kdialog is available if running under KDE.
I'll take a look at it this week-end but please notice that this issue really reports two bugs:
kdialog
is available under KDEkdialog
is installed, it does not work.Due to the lack of manual, here is the "official" source code the argument parser of kdialog
:
https://cgit.kde.org/kdialog.git/tree/src/kdialog.cpp?h=fd50a04df49bac3ce3e95f3eef5e5aa38b4021e0#n286
After testing and checking the source code above, I found the reason of the error: the caption
option is invalid.
As you can see above, I submitted two pull requests to address this issue.
The first one removes the invalid kdialog
option, the second one adds a better test for the existence of kdialog
.
@friedelwolff Could you take a look at these PRs?
Try it instead of kdialog:
https://github.com/blackPantherOS/playground/tree/master/pydialog
It is a Python3-Qt5 alternative of the kdialog
Since PyDialog
is in Python, it may be better to directly integrate it with Virtaal.
I also just wrote a cross-platform equivalent to the "open-file" feature of kdialog. For the moment there's just a programmatic Rust API, but I'll add a a CLI once it's more stable. Not sure about the other widget though. Native dialog "Open File".
Hi, I am using Arch Linux with KDE 5 (Plasma). I am unable to use the "open" button (both in the welcome screen and toolbar) to open a file to translate. I receive the following error related to
kdialog
:I logged the command:
I then installed the KDialog package. The error message disappeared, but the file picker still does not open.
As a temporary workaround, I hardcoded
dialog_to_use
toNone
in native_widget.py. It fixed my problem but for the moment it's just a hack.