fix: xdg portal version detection for file dialogs on linux (#46922)
* chore: use dbus thread for portal version detection Co-authored-by: deepak1556 <hop2deep@gmail.com> * Update shell/browser/ui/file_dialog_linux_portal.cc Co-authored-by: Robo <hop2deep@gmail.com> Co-authored-by: Charles Kerr <charles@charleskerr.com> --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: deepak1556 <hop2deep@gmail.com> Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
parent
0810fe54d4
commit
01994637e8
5 changed files with 172 additions and 86 deletions
|
@ -18,7 +18,6 @@
|
|||
#include "shell/common/gin_helper/dictionary.h"
|
||||
#include "shell/common/gin_helper/promise.h"
|
||||
#include "ui/shell_dialogs/select_file_dialog.h"
|
||||
#include "ui/shell_dialogs/select_file_dialog_linux_portal.h"
|
||||
#include "ui/shell_dialogs/select_file_policy.h"
|
||||
#include "ui/shell_dialogs/selected_file_info.h"
|
||||
|
||||
|
@ -60,11 +59,9 @@ ui::SelectFileDialog::FileTypeInfo GetFilterInfo(const Filters& filters) {
|
|||
}
|
||||
|
||||
void LogIfNeededAboutUnsupportedPortalFeature(const DialogSettings& settings) {
|
||||
if (!settings.default_path.empty() &&
|
||||
ui::SelectFileDialogLinuxPortal::IsPortalAvailable() &&
|
||||
ui::SelectFileDialogLinuxPortal::GetPortalVersion() < 4) {
|
||||
LOG(INFO) << "Available portal version "
|
||||
<< ui::SelectFileDialogLinuxPortal::GetPortalVersion()
|
||||
if (!settings.default_path.empty() && IsPortalAvailable() &&
|
||||
GetPortalVersion() < 4) {
|
||||
LOG(INFO) << "Available portal version " << GetPortalVersion()
|
||||
<< " does not support defaultPath option, try the non-portal"
|
||||
<< " file chooser dialogs by launching with"
|
||||
<< " --xdg-portal-required-version";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue