diff --git a/FCHost/fchost/fchost_handler_linux.cc b/FCHost/fchost/fchost_handler_linux.cc index d78e9f63c1c85af0a4f46e901d59204d1f4b7ebf..9e02a67bf31562a7bfbc453f150d4f3852ecf0b0 100644 --- a/FCHost/fchost/fchost_handler_linux.cc +++ b/FCHost/fchost/fchost_handler_linux.cc @@ -64,10 +64,6 @@ namespace { } #endif - // kdialog does not support these - mode = static_cast<CefDialogHandler::FileDialogMode>(mode & ~(CefDialogHandler::FileDialogMode::FILE_DIALOG_OVERWRITEPROMPT_FLAG)); - mode = static_cast<CefDialogHandler::FileDialogMode>(mode & ~(CefDialogHandler::FileDialogMode::FILE_DIALOG_HIDEREADONLY_FLAG)); - switch (mode) { case CefDialogHandler::FileDialogMode::FILE_DIALOG_OPEN_MULTIPLE: cmdLine << " --multiple"; [[fallthrough]]; @@ -108,15 +104,7 @@ namespace { const std::vector<CefString>& accept_filters) { std::ostringstream cmdLine; - cmdLine << "zenity --file-selection"; - - // zenity does not support these - mode = static_cast<CefDialogHandler::FileDialogMode>(mode & ~(CefDialogHandler::FileDialogMode::FILE_DIALOG_HIDEREADONLY_FLAG)); - - if (mode & CefDialogHandler::FileDialogMode::FILE_DIALOG_OVERWRITEPROMPT_FLAG) { - cmdLine << " --confirm-overwrite"; - } - mode = static_cast<CefDialogHandler::FileDialogMode>(mode & ~(CefDialogHandler::FileDialogMode::FILE_DIALOG_OVERWRITEPROMPT_FLAG)); + cmdLine << "zenity --file-selection --confirm-overwrite"; switch (mode) { case CefDialogHandler::FileDialogMode::FILE_DIALOG_OPEN_MULTIPLE: @@ -247,7 +235,7 @@ void FCHostHandler::PlatformTitleChange(CefRefPtr<CefBrowser> browser, const Cef bool FCHostHandler::OnFileDialog(CefRefPtr<CefBrowser> /* browser */, CefDialogHandler::FileDialogMode mode, const CefString& title, const CefString& default_file_path, const std::vector<CefString>& accept_filters, - int /* selected_accept_filter */, CefRefPtr<CefFileDialogCallback> callback) + CefRefPtr<CefFileDialogCallback> callback) { static DialogHelper helper; @@ -262,6 +250,6 @@ bool FCHostHandler::OnFileDialog(CefRefPtr<CefBrowser> /* browser */, CefDialogH std::vector<CefString> selected; selected.push_back(fn); - callback->Continue(0, selected); + callback->Continue(selected); return true; }