mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Fixed crash when tray menu is open while the language combobox is open in Manage Settings.
This commit is contained in:
parent
81b6813e3a
commit
e14ef154f3
@ -244,7 +244,7 @@ INT_PTR CDialogAbout::OnInitDialog(WPARAM wParam, LPARAM lParam)
|
||||
HICON hIcon = (HICON)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_RAINMETER), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_SHARED);
|
||||
SendMessage(m_Window, WM_SETICON, ICON_SMALL, (LPARAM)hIcon);
|
||||
|
||||
if (wcscmp(GetString(ID_STR_ISRTL), L"1") == 0)
|
||||
if (*GetString(ID_STR_ISRTL) == L'1')
|
||||
{
|
||||
// Use RTL layout if using a RTL language
|
||||
SetDialogRTL();
|
||||
|
@ -226,7 +226,7 @@ INT_PTR CDialogManage::OnInitDialog(WPARAM wParam, LPARAM lParam)
|
||||
HICON hIcon = (HICON)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_RAINMETER), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_SHARED);
|
||||
SendMessage(m_Window, WM_SETICON, ICON_SMALL, (LPARAM)hIcon);
|
||||
|
||||
if (wcscmp(GetString(ID_STR_ISRTL), L"1") == 0)
|
||||
if (*GetString(ID_STR_ISRTL) == L'1')
|
||||
{
|
||||
// Use RTL layout if using a RTL language
|
||||
SetDialogRTL();
|
||||
@ -882,7 +882,7 @@ INT_PTR CDialogManage::CTabSkins::OnCommand(WPARAM wParam, LPARAM lParam)
|
||||
TrackPopupMenu(
|
||||
menu,
|
||||
TPM_RIGHTBUTTON | TPM_LEFTALIGN,
|
||||
(wcscmp(GetString(ID_STR_ISRTL), L"1") == 0) ? r.right : r.left,
|
||||
(*GetString(ID_STR_ISRTL) == L'1') ? r.right : r.left,
|
||||
--r.bottom,
|
||||
0,
|
||||
m_Window,
|
||||
@ -1048,7 +1048,7 @@ INT_PTR CDialogManage::CTabSkins::OnCommand(WPARAM wParam, LPARAM lParam)
|
||||
TrackPopupMenu(
|
||||
subMenu,
|
||||
TPM_RIGHTBUTTON | TPM_LEFTALIGN,
|
||||
(wcscmp(GetString(ID_STR_ISRTL), L"1") == 0) ? r.right : r.left,
|
||||
(*GetString(ID_STR_ISRTL) == L'1') ? r.right : r.left,
|
||||
--r.bottom,
|
||||
0,
|
||||
m_Window,
|
||||
@ -1709,9 +1709,11 @@ INT_PTR CDialogManage::CTabSettings::OnCommand(WPARAM wParam, LPARAM lParam)
|
||||
case IDC_MANAGESETTINGS_LANGUAGE_COMBOBOX:
|
||||
if (HIWORD(wParam) == CBN_SELCHANGE)
|
||||
{
|
||||
WCHAR buffer[16];
|
||||
int sel = ComboBox_GetCurSel((HWND)lParam);
|
||||
LCID lcid = (LCID)ComboBox_GetItemData((HWND)lParam, sel);
|
||||
if (lcid != Rainmeter->m_ResourceLCID)
|
||||
{
|
||||
WCHAR buffer[16];
|
||||
_ultow(lcid, buffer, 10);
|
||||
WritePrivateProfileString(L"Rainmeter", L"Language", buffer, Rainmeter->GetIniFile().c_str());
|
||||
|
||||
@ -1747,6 +1749,7 @@ INT_PTR CDialogManage::CTabSettings::OnCommand(WPARAM wParam, LPARAM lParam)
|
||||
SendMessage(c_Dialog->GetWindow(), WM_DELAYED_CLOSE, 0, 0);
|
||||
ExecuteBang(L"!Manage Settings"); // Delayed execute
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case IDC_MANAGESETTINGS_CHECKUPDATES_CHECKBOX:
|
||||
|
@ -31,7 +31,7 @@
|
||||
//
|
||||
// Exported functions
|
||||
//
|
||||
EXTERN_C
|
||||
|
||||
#ifdef __cplusplus
|
||||
LIBRARY_EXPORT LPCWSTR __stdcall RmReadString(void* rm, LPCWSTR option, LPCWSTR defValue, BOOL replaceMeasures = TRUE);
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user