Filedialog location is stored when dialog is closed.
When dialog is reopenned it opens to same location.
Location info is stored as long as the application is running.
From: Janne Kekkonen janne.kekkonen@gmail.com
Empty registry node for parallel devices will cause Realterm to crash.
Wine-bug:https://bugs.winehq.org/show_bug.cgi?id=58598 --- dlls/mountmgr.sys/device.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/dlls/mountmgr.sys/device.c b/dlls/mountmgr.sys/device.c index ba019cdb13d..a7d569b9cd6 100644 --- a/dlls/mountmgr.sys/device.c +++ b/dlls/mountmgr.sys/device.c @@ -1986,6 +1986,9 @@ static void create_port_devices( DRIVER_OBJECT *driver, const char *devices ) DWORD port_len, type, size; int i, n;
+ /*If no devices do not create registry entry*/ + if (strlen(devices)==0) return; + if (driver == serial_driver) { dosdev_fmt = "com%u";
From: Janne Kekkonen janne.kekkonen@gmail.com
Prevent creating empty registry node. User definitions for serial and parallel ports are taken into count.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=58598 --- dlls/mountmgr.sys/device.c | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-)
diff --git a/dlls/mountmgr.sys/device.c b/dlls/mountmgr.sys/device.c index a7d569b9cd6..664a44079a7 100644 --- a/dlls/mountmgr.sys/device.c +++ b/dlls/mountmgr.sys/device.c @@ -1985,9 +1985,10 @@ static void create_port_devices( DRIVER_OBJECT *driver, const char *devices ) WCHAR port[7]; DWORD port_len, type, size; int i, n; - - /*If no devices do not create registry entry*/ - if (strlen(devices)==0) return; + HKEY hKey; + BOOL user_defined_ports; + WCHAR port_name[256]; + DWORD port_name_len;
if (driver == serial_driver) { @@ -2002,6 +2003,26 @@ static void create_port_devices( DRIVER_OBJECT *driver, const char *devices ) port_prefix = L"LPT"; }
+ /* Check for user defined ports*/ + user_defined_ports=TRUE; + if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"Software\Wine\Ports" , 0, KEY_READ , &hKey)==ERROR_SUCCESS) + { + i=0; + port_name_len = 255; + user_defined_ports=FALSE; + while ((RegEnumValueW(hKey, i, port_name, &port_name_len, NULL, NULL, NULL, NULL) == ERROR_SUCCESS)) { + if (wcsnicmp( port_name, port_prefix, 3)==0){ + user_defined_ports=TRUE; + break; + } + i++; + port_name_len = 255; + } + RegCloseKey(hKey); + } + /*If no user defined ports and no devices do not create registry entry*/ + if(!user_defined_ports && strlen(devices)==0) return; + /* @@ Wine registry key: HKLM\Software\Wine\Ports */
RegCreateKeyExW( HKEY_LOCAL_MACHINE, L"Software\Wine\Ports", 0, NULL, 0,
From: Janne Kekkonen janne.kekkonen@gmail.com
Prevent creating empty registry node. User definitions for serial and parallel ports are taken into count. Removed double variables.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=58598 --- dlls/mountmgr.sys/device.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/dlls/mountmgr.sys/device.c b/dlls/mountmgr.sys/device.c index 664a44079a7..a9d9dcf38f6 100644 --- a/dlls/mountmgr.sys/device.c +++ b/dlls/mountmgr.sys/device.c @@ -1987,8 +1987,6 @@ static void create_port_devices( DRIVER_OBJECT *driver, const char *devices ) int i, n; HKEY hKey; BOOL user_defined_ports; - WCHAR port_name[256]; - DWORD port_name_len;
if (driver == serial_driver) { @@ -2008,15 +2006,15 @@ static void create_port_devices( DRIVER_OBJECT *driver, const char *devices ) if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"Software\Wine\Ports" , 0, KEY_READ , &hKey)==ERROR_SUCCESS) { i=0; - port_name_len = 255; + port_len = ARRAY_SIZE(port); user_defined_ports=FALSE; - while ((RegEnumValueW(hKey, i, port_name, &port_name_len, NULL, NULL, NULL, NULL) == ERROR_SUCCESS)) { - if (wcsnicmp( port_name, port_prefix, 3)==0){ + while ((RegEnumValueW(hKey, i, port, &port_len, NULL, NULL, NULL, NULL) == ERROR_SUCCESS)) { + if (wcsnicmp( port, port_prefix, 3)==0){ user_defined_ports=TRUE; break; } i++; - port_name_len = 255; + port_len = 255; } RegCloseKey(hKey); }
From: Janne Kekkonen janne.kekkonen@gmail.com
fix port_len setting
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=58598 --- dlls/mountmgr.sys/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/mountmgr.sys/device.c b/dlls/mountmgr.sys/device.c index a9d9dcf38f6..da25a22c164 100644 --- a/dlls/mountmgr.sys/device.c +++ b/dlls/mountmgr.sys/device.c @@ -2014,7 +2014,7 @@ static void create_port_devices( DRIVER_OBJECT *driver, const char *devices ) break; } i++; - port_len = 255; + port_len = ARRAY_SIZE(port); } RegCloseKey(hKey); }
From: Janne Kekkonen janne.kekkonen@gmail.com
Filedialog location is stored when dialog is closed. When dialog is reopenned it opens to same location. Location info is stored as long as the application is running.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=40738 --- dlls/comdlg32/filedlg.c | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/dlls/comdlg32/filedlg.c b/dlls/comdlg32/filedlg.c index 43066f02d83..8b52b744fcd 100644 --- a/dlls/comdlg32/filedlg.c +++ b/dlls/comdlg32/filedlg.c @@ -132,6 +132,7 @@ typedef struct tagLookInInfo
static const char LookInInfosStr[] = "LookInInfos"; /* LOOKIN combo box property */ static SIZE MemDialogSize = { 0, 0}; /* keep size of the (resizable) dialog */ +static RECT MemDialogPos = {-1, -1, -1, -1}; /* keep the position of the dialog */
FileOpenDlgInfos *get_filedlg_infoptr(HWND hwnd) { @@ -1318,6 +1319,10 @@ INT_PTR CALLBACK FileOpenDlgProc95(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM l GetWindowRect( hwnd, &rc ); rc.right += client_adjusted.right - client.right; rc.bottom += client_adjusted.bottom - client.bottom; + + if (MemDialogPos.left<0 && MemDialogPos.top<0) + GetWindowRect( hwnd, &MemDialogPos); + SetWindowPos(hwnd, 0, 0, 0, rc.right - rc.left, rc.bottom - rc.top, SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOMOVE);
@@ -1373,6 +1378,8 @@ INT_PTR CALLBACK FileOpenDlgProc95(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM l 0, 0, MemDialogSize.cx, MemDialogSize.cy, SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER); } + /*move window*/ + SetWindowPos(hwnd,NULL,MemDialogPos.left, MemDialogPos.top, 0, 0, SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOZORDER);
if(fodInfos->ofnInfos->Flags & OFN_EXPLORER) SendCustomDlgNotificationMessage(hwnd,CDN_SELCHANGE); @@ -1408,6 +1415,8 @@ INT_PTR CALLBACK FileOpenDlgProc95(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM l if (fodInfos && fodInfos->ofnInfos->Flags & OFN_ENABLESIZING) MemDialogSize = fodInfos->sizedlg;
+ GetWindowRect(hwnd,&MemDialogPos); + if (places_bar) { himl = (HIMAGELIST)SendDlgItemMessageW(hwnd, IDC_TOOLBARPLACES, TB_GETIMAGELIST, 0, 0);
Please, check the commits. It seems like there are a lot of extra ones.
Hello,\ i might need some advise with removing the extra stuff.
I created new branch which points to master. I cherry picked the one commit that is for file dialog change to this branch. After this i tried to force push changes.
Force push gives message: Everything up-to-date