GUI: no system file picker on Flatpak
portals bring too many issues to deal with issue #2490
This commit is contained in:
parent
0ea4310b22
commit
184b8efcc4
3 changed files with 18 additions and 6 deletions
|
|
@ -5028,6 +5028,7 @@ bool FurnaceGUI::loop() {
|
|||
}
|
||||
|
||||
#ifndef NFD_NON_THREADED
|
||||
#ifndef FLATPAK_WORKAROUNDS
|
||||
if (fileDialog->isOpen() && settings.sysFileDialog) {
|
||||
ImGui::OpenPopup(_("System File Dialog Pending"));
|
||||
}
|
||||
|
|
@ -5040,6 +5041,7 @@ bool FurnaceGUI::loop() {
|
|||
dl->AddRectFilled(ImVec2(0.0f,0.0f),ImVec2(canvasW,canvasH),ImGui::ColorConvertFloat4ToU32(uiColors[GUI_COLOR_MODAL_BACKDROP]));
|
||||
ImGui::EndPopup();
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (fileDialog->render(mobileUI?ImVec2(canvasW-(portrait?0:(60.0*dpiScale)),canvasH-60.0*dpiScale):ImVec2(600.0f*dpiScale,400.0f*dpiScale),ImVec2(canvasW-((mobileUI && !portrait)?(60.0*dpiScale):0),canvasH-(mobileUI?(60.0*dpiScale):0)))) {
|
||||
|
|
@ -5160,13 +5162,7 @@ bool FurnaceGUI::loop() {
|
|||
} else {
|
||||
fileName=fileDialog->getFileName()[0];
|
||||
}
|
||||
#ifdef FLATPAK_WORKAROUNDS
|
||||
// https://github.com/tildearrow/furnace/issues/2096
|
||||
// Flatpak Portals mangling our path hinders us from adding extension
|
||||
if (fileName!="" && !settings.sysFileDialog) {
|
||||
#else
|
||||
if (fileName!="") {
|
||||
#endif
|
||||
if (curFileDialog==GUI_FILE_SAVE) {
|
||||
checkExtension(".fur");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue