mirror of
https://github.com/Open-Shell/Open-Shell-Menu.git
synced 2026-06-14 03:16:38 +10:00
Fix open/save file dialog getting stuck after Windows 11 update (#2457)
We will run those APIs on separate STA thread and pump messages while waiting for the dialog to end. fixes #2431 fixes #2426 fixes #2418 fixes #2417 fixes #2390 fixes #2372 fixes #2371 fixes #2370 fixes #2364 fixes #2361 fixes #2360 fixes #2343 fixes #2332 fixes #2322 fixes #2320 fixes #2319 fixes #2312 fixes #2299
This commit is contained in:
@@ -1670,7 +1670,7 @@ LRESULT CSettingsDlg::OnBackup( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL&
|
||||
ofn.lpstrTitle=title;
|
||||
ofn.lpstrDefExt=L".xml";
|
||||
ofn.Flags=OFN_DONTADDTORECENT|OFN_ENABLESIZING|OFN_EXPLORER|OFN_PATHMUSTEXIST|OFN_OVERWRITEPROMPT|OFN_HIDEREADONLY|OFN_NOCHANGEDIR;
|
||||
if (GetSaveFileName(&ofn))
|
||||
if (GetSaveFileNameSafe(&ofn))
|
||||
{
|
||||
CString err=g_SettingsManager.SaveSettingsXml(path);
|
||||
if (!err.IsEmpty())
|
||||
@@ -1699,7 +1699,7 @@ LRESULT CSettingsDlg::OnBackup( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL&
|
||||
CString title=LoadStringEx(IDS_XML_TITLE_LOAD);
|
||||
ofn.lpstrTitle=title;
|
||||
ofn.Flags=OFN_DONTADDTORECENT|OFN_ENABLESIZING|OFN_EXPLORER|OFN_FILEMUSTEXIST|OFN_HIDEREADONLY|OFN_NOCHANGEDIR;
|
||||
if (GetOpenFileName(&ofn))
|
||||
if (GetOpenFileNameSafe(&ofn))
|
||||
{
|
||||
SetCurTab(m_Index,true); // reload tab once to force-close any active edit boxes
|
||||
CString error=g_SettingsManager.LoadSettingsXml(path);
|
||||
|
||||
Reference in New Issue
Block a user