diff options
author | George Hazan <ghazan@miranda.im> | 2018-03-06 16:17:32 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-03-06 16:17:32 +0300 |
commit | 7071e88fdeeaa146c8e72894c6eae58f438f2690 (patch) | |
tree | 5befaa1f5dc66da5b1b907eb9894880b28f8b2ac /plugins/Scriver/src | |
parent | 909c090503ce1021a69e7793c550b857ef025e77 (diff) |
PSN_WIZFINISH: new WM_NOTIFY event to be called when one of the options tabs is changed
Diffstat (limited to 'plugins/Scriver/src')
-rw-r--r-- | plugins/Scriver/src/chat_options.cpp | 185 | ||||
-rw-r--r-- | plugins/Scriver/src/msgoptions.cpp | 72 |
2 files changed, 130 insertions, 127 deletions
diff --git a/plugins/Scriver/src/chat_options.cpp b/plugins/Scriver/src/chat_options.cpp index 7ddb5ac90c..6f6a664edc 100644 --- a/plugins/Scriver/src/chat_options.cpp +++ b/plugins/Scriver/src/chat_options.cpp @@ -309,6 +309,11 @@ INT_PTR CALLBACK DlgProcOptions1(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM case 0:
switch (((LPNMHDR)lParam)->code) {
+ case PSN_WIZFINISH:
+ pci->ReloadSettings();
+ Chat_UpdateOptions();
+ break;
+
case PSN_APPLY:
int iLen = GetWindowTextLength(GetDlgItem(hwndDlg, IDC_CHAT_GROUP));
if (iLen > 0) {
@@ -325,9 +330,6 @@ INT_PTR CALLBACK DlgProcOptions1(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM db_unset(0, CHAT_MODULE, "NicklistRowDist");
SaveBranch(GetDlgItem(hwndDlg, IDC_CHAT_CHECKBOXES), branch1, _countof(branch1));
SaveBranch(GetDlgItem(hwndDlg, IDC_CHAT_CHECKBOXES), branch4, _countof(branch4));
-
- pci->ReloadSettings();
- Chat_UpdateOptions();
}
return TRUE;
}
@@ -502,112 +504,115 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM hti.pt.y = (short)HIWORD(GetMessagePos());
ScreenToClient(((LPNMHDR)lParam)->hwndFrom, &hti.pt);
if (TreeView_HitTest(((LPNMHDR)lParam)->hwndFrom, &hti))
- if (hti.flags&TVHT_ONITEMSTATEICON) {
+ if (hti.flags & TVHT_ONITEMSTATEICON)
SendMessage(hwndDlg, UM_CHECKSTATECHANGE, (WPARAM)((LPNMHDR)lParam)->hwndFrom, (LPARAM)hti.hItem);
- }
}
else if (((LPNMHDR)lParam)->code == TVN_KEYDOWN) {
- if (((LPNMTVKEYDOWN)lParam)->wVKey == VK_SPACE) {
- SendMessage(hwndDlg, UM_CHECKSTATECHANGE, (WPARAM)((LPNMHDR)lParam)->hwndFrom,
- (LPARAM)TreeView_GetSelection(((LPNMHDR)lParam)->hwndFrom));
- }
+ if (((LPNMTVKEYDOWN)lParam)->wVKey == VK_SPACE)
+ SendMessage(hwndDlg, UM_CHECKSTATECHANGE, (WPARAM)((LPNMHDR)lParam)->hwndFrom, (LPARAM)TreeView_GetSelection(((LPNMHDR)lParam)->hwndFrom));
}
}
- else if (((LPNMHDR)lParam)->idFrom == 0 && ((LPNMHDR)lParam)->code == PSN_APPLY) {
- char *pszText = nullptr;
- int iLen;
-
- iLen = GetWindowTextLength(GetDlgItem(hwndDlg, IDC_CHAT_HIGHLIGHTWORDS));
- if (iLen > 0) {
- wchar_t *ptszText = (wchar_t*)mir_alloc((iLen + 2) * sizeof(wchar_t));
- wchar_t *p2 = nullptr;
-
- if (ptszText) {
- GetDlgItemText(hwndDlg, IDC_CHAT_HIGHLIGHTWORDS, ptszText, iLen + 1);
- p2 = wcschr(ptszText, (wchar_t)',');
- while (p2) {
- *p2 = ' ';
+ else if (((LPNMHDR)lParam)->idFrom == 0) {
+ switch (((LPNMHDR)lParam)->code) {
+ case PSN_WIZFINISH:
+ pci->ReloadSettings();
+ Chat_UpdateOptions();
+ break;
+
+ case PSN_APPLY:
+ char *pszText = nullptr;
+ int iLen;
+
+ iLen = GetWindowTextLength(GetDlgItem(hwndDlg, IDC_CHAT_HIGHLIGHTWORDS));
+ if (iLen > 0) {
+ wchar_t *ptszText = (wchar_t*)mir_alloc((iLen + 2) * sizeof(wchar_t));
+ wchar_t *p2 = nullptr;
+
+ if (ptszText) {
+ GetDlgItemText(hwndDlg, IDC_CHAT_HIGHLIGHTWORDS, ptszText, iLen + 1);
p2 = wcschr(ptszText, (wchar_t)',');
+ while (p2) {
+ *p2 = ' ';
+ p2 = wcschr(ptszText, (wchar_t)',');
+ }
+ db_set_ws(0, CHAT_MODULE, "HighlightWords", ptszText);
+ mir_free(ptszText);
}
- db_set_ws(0, CHAT_MODULE, "HighlightWords", ptszText);
- mir_free(ptszText);
}
- }
- else db_unset(0, CHAT_MODULE, "HighlightWords");
-
- iLen = GetWindowTextLength(GetDlgItem(hwndDlg, IDC_CHAT_LOGDIRECTORY));
- if (iLen > 0) {
- wchar_t *pszText1 = (wchar_t*)malloc(iLen*sizeof(wchar_t) + 2);
- GetDlgItemText(hwndDlg, IDC_CHAT_LOGDIRECTORY, pszText1, iLen + 1);
- db_set_ws(0, CHAT_MODULE, "LogDirectory", pszText1);
- free(pszText1);
- }
- else {
- mir_wstrncpy(g_Settings.pszLogDir, DEFLOGFILENAME, MAX_PATH);
- db_unset(0, CHAT_MODULE, "LogDirectory");
- }
- pci->SM_InvalidateLogDirectories();
+ else db_unset(0, CHAT_MODULE, "HighlightWords");
- iLen = GetWindowTextLength(GetDlgItem(hwndDlg, IDC_CHAT_LOGTIMESTAMP));
- if (iLen > 0) {
- pszText = (char*)mir_realloc(pszText, iLen + 1);
- GetDlgItemTextA(hwndDlg, IDC_CHAT_LOGTIMESTAMP, pszText, iLen + 1);
- db_set_s(0, CHAT_MODULE, "LogTimestamp", pszText);
- }
- else db_unset(0, CHAT_MODULE, "LogTimestamp");
+ iLen = GetWindowTextLength(GetDlgItem(hwndDlg, IDC_CHAT_LOGDIRECTORY));
+ if (iLen > 0) {
+ wchar_t *pszText1 = (wchar_t*)malloc(iLen * sizeof(wchar_t) + 2);
+ GetDlgItemText(hwndDlg, IDC_CHAT_LOGDIRECTORY, pszText1, iLen + 1);
+ db_set_ws(0, CHAT_MODULE, "LogDirectory", pszText1);
+ free(pszText1);
+ }
+ else {
+ mir_wstrncpy(g_Settings.pszLogDir, DEFLOGFILENAME, MAX_PATH);
+ db_unset(0, CHAT_MODULE, "LogDirectory");
+ }
+ pci->SM_InvalidateLogDirectories();
- iLen = GetWindowTextLength(GetDlgItem(hwndDlg, IDC_CHAT_TIMESTAMP));
- if (iLen > 0) {
- pszText = (char*)mir_realloc(pszText, iLen + 1);
- GetDlgItemTextA(hwndDlg, IDC_CHAT_TIMESTAMP, pszText, iLen + 1);
- db_set_s(0, CHAT_MODULE, "HeaderTime", pszText);
- }
- else db_unset(0, CHAT_MODULE, "HeaderTime");
+ iLen = GetWindowTextLength(GetDlgItem(hwndDlg, IDC_CHAT_LOGTIMESTAMP));
+ if (iLen > 0) {
+ pszText = (char*)mir_realloc(pszText, iLen + 1);
+ GetDlgItemTextA(hwndDlg, IDC_CHAT_LOGTIMESTAMP, pszText, iLen + 1);
+ db_set_s(0, CHAT_MODULE, "LogTimestamp", pszText);
+ }
+ else db_unset(0, CHAT_MODULE, "LogTimestamp");
- iLen = GetWindowTextLength(GetDlgItem(hwndDlg, IDC_CHAT_INSTAMP));
- if (iLen > 0) {
- pszText = (char*)mir_realloc(pszText, iLen + 1);
- GetDlgItemTextA(hwndDlg, IDC_CHAT_INSTAMP, pszText, iLen + 1);
- db_set_s(0, CHAT_MODULE, "HeaderIncoming", pszText);
- }
- else db_unset(0, CHAT_MODULE, "HeaderIncoming");
+ iLen = GetWindowTextLength(GetDlgItem(hwndDlg, IDC_CHAT_TIMESTAMP));
+ if (iLen > 0) {
+ pszText = (char*)mir_realloc(pszText, iLen + 1);
+ GetDlgItemTextA(hwndDlg, IDC_CHAT_TIMESTAMP, pszText, iLen + 1);
+ db_set_s(0, CHAT_MODULE, "HeaderTime", pszText);
+ }
+ else db_unset(0, CHAT_MODULE, "HeaderTime");
- iLen = GetWindowTextLength(GetDlgItem(hwndDlg, IDC_CHAT_OUTSTAMP));
- if (iLen > 0) {
- pszText = (char*)mir_realloc(pszText, iLen + 1);
- GetDlgItemTextA(hwndDlg, IDC_CHAT_OUTSTAMP, pszText, iLen + 1);
- db_set_s(0, CHAT_MODULE, "HeaderOutgoing", pszText);
- }
- else db_unset(0, CHAT_MODULE, "HeaderOutgoing");
+ iLen = GetWindowTextLength(GetDlgItem(hwndDlg, IDC_CHAT_INSTAMP));
+ if (iLen > 0) {
+ pszText = (char*)mir_realloc(pszText, iLen + 1);
+ GetDlgItemTextA(hwndDlg, IDC_CHAT_INSTAMP, pszText, iLen + 1);
+ db_set_s(0, CHAT_MODULE, "HeaderIncoming", pszText);
+ }
+ else db_unset(0, CHAT_MODULE, "HeaderIncoming");
+
+ iLen = GetWindowTextLength(GetDlgItem(hwndDlg, IDC_CHAT_OUTSTAMP));
+ if (iLen > 0) {
+ pszText = (char*)mir_realloc(pszText, iLen + 1);
+ GetDlgItemTextA(hwndDlg, IDC_CHAT_OUTSTAMP, pszText, iLen + 1);
+ db_set_s(0, CHAT_MODULE, "HeaderOutgoing", pszText);
+ }
+ else db_unset(0, CHAT_MODULE, "HeaderOutgoing");
- g_Settings.bHighlightEnabled = IsDlgButtonChecked(hwndDlg, IDC_CHAT_HIGHLIGHT) == BST_CHECKED ? TRUE : FALSE;
- db_set_b(0, CHAT_MODULE, "HighlightEnabled", (BYTE)g_Settings.bHighlightEnabled);
+ g_Settings.bHighlightEnabled = IsDlgButtonChecked(hwndDlg, IDC_CHAT_HIGHLIGHT) == BST_CHECKED ? TRUE : FALSE;
+ db_set_b(0, CHAT_MODULE, "HighlightEnabled", (BYTE)g_Settings.bHighlightEnabled);
- g_Settings.bLoggingEnabled = IsDlgButtonChecked(hwndDlg, IDC_CHAT_LOGGING) == BST_CHECKED ? TRUE : FALSE;
- db_set_b(0, CHAT_MODULE, "LoggingEnabled", (BYTE)g_Settings.bLoggingEnabled);
+ g_Settings.bLoggingEnabled = IsDlgButtonChecked(hwndDlg, IDC_CHAT_LOGGING) == BST_CHECKED ? TRUE : FALSE;
+ db_set_b(0, CHAT_MODULE, "LoggingEnabled", (BYTE)g_Settings.bLoggingEnabled);
- iLen = SendDlgItemMessage(hwndDlg, IDC_CHAT_SPIN2, UDM_GETPOS, 0, 0);
- db_set_w(0, CHAT_MODULE, "LogLimit", (WORD)iLen);
- iLen = SendDlgItemMessage(hwndDlg, IDC_CHAT_SPIN3, UDM_GETPOS, 0, 0);
- db_set_w(0, CHAT_MODULE, "LoggingLimit", (WORD)iLen);
+ iLen = SendDlgItemMessage(hwndDlg, IDC_CHAT_SPIN2, UDM_GETPOS, 0, 0);
+ db_set_w(0, CHAT_MODULE, "LogLimit", (WORD)iLen);
+ iLen = SendDlgItemMessage(hwndDlg, IDC_CHAT_SPIN3, UDM_GETPOS, 0, 0);
+ db_set_w(0, CHAT_MODULE, "LoggingLimit", (WORD)iLen);
- SaveBranch(GetDlgItem(hwndDlg, IDC_CHAT_CHECKBOXES), branch2, _countof(branch2));
- SaveBranch(GetDlgItem(hwndDlg, IDC_CHAT_CHECKBOXES), branch3, _countof(branch3));
+ SaveBranch(GetDlgItem(hwndDlg, IDC_CHAT_CHECKBOXES), branch2, _countof(branch2));
+ SaveBranch(GetDlgItem(hwndDlg, IDC_CHAT_CHECKBOXES), branch3, _countof(branch3));
- mir_free(pszText);
+ mir_free(pszText);
- g_Settings.dwIconFlags = db_get_dw(0, CHAT_MODULE, "IconFlags", 0x0000);
- g_Settings.dwTrayIconFlags = db_get_dw(0, CHAT_MODULE, "TrayIconFlags", 0x1000);
- g_Settings.dwPopupFlags = db_get_dw(0, CHAT_MODULE, "PopupFlags", 0x0000);
- g_Settings.bStripFormat = db_get_b(0, CHAT_MODULE, "TrimFormatting", 0) != 0;
- g_Settings.bTrayIconInactiveOnly = db_get_b(0, CHAT_MODULE, "TrayIconInactiveOnly", 1) != 0;
- g_Settings.bPopupInactiveOnly = db_get_b(0, CHAT_MODULE, "PopUpInactiveOnly", 1) != 0;
- g_Settings.bLogIndentEnabled = (db_get_b(0, CHAT_MODULE, "LogIndentEnabled", 1) != 0) ? TRUE : FALSE;
+ g_Settings.dwIconFlags = db_get_dw(0, CHAT_MODULE, "IconFlags", 0x0000);
+ g_Settings.dwTrayIconFlags = db_get_dw(0, CHAT_MODULE, "TrayIconFlags", 0x1000);
+ g_Settings.dwPopupFlags = db_get_dw(0, CHAT_MODULE, "PopupFlags", 0x0000);
+ g_Settings.bStripFormat = db_get_b(0, CHAT_MODULE, "TrimFormatting", 0) != 0;
+ g_Settings.bTrayIconInactiveOnly = db_get_b(0, CHAT_MODULE, "TrayIconInactiveOnly", 1) != 0;
+ g_Settings.bPopupInactiveOnly = db_get_b(0, CHAT_MODULE, "PopUpInactiveOnly", 1) != 0;
+ g_Settings.bLogIndentEnabled = (db_get_b(0, CHAT_MODULE, "LogIndentEnabled", 1) != 0) ? TRUE : FALSE;
- pci->MM_FontsChanged();
- pci->ReloadSettings();
- Chat_UpdateOptions();
- return TRUE;
+ pci->MM_FontsChanged();
+ return TRUE;
+ }
}
break;
diff --git a/plugins/Scriver/src/msgoptions.cpp b/plugins/Scriver/src/msgoptions.cpp index e790cd41a1..741f64191a 100644 --- a/plugins/Scriver/src/msgoptions.cpp +++ b/plugins/Scriver/src/msgoptions.cpp @@ -230,23 +230,12 @@ static DWORD MakeCheckBoxTreeFlags(HWND hwndTree) return flags;
}
-static int changed = 0;
-
-static void ApplyChanges(int i)
-{
- changed &= ~i;
- if (changed == 0) {
- ReloadGlobals();
- WindowList_Broadcast(g_dat.hParentWindowList, DM_OPTIONSAPPLIED, 0, 0);
- Srmm_Broadcast(DM_OPTIONSAPPLIED, 0, 0);
- Chat_UpdateOptions();
- }
-}
-
-static void MarkChanges(int i, HWND hWnd)
+static void ApplyOptions()
{
- SendMessage(GetParent(hWnd), PSM_CHANGED, 0, 0);
- changed |= i;
+ ReloadGlobals();
+ WindowList_Broadcast(g_dat.hParentWindowList, DM_OPTIONSAPPLIED, 0, 0);
+ Srmm_Broadcast(DM_OPTIONSAPPLIED, 0, 0);
+ Chat_UpdateOptions();
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -341,13 +330,17 @@ static INT_PTR CALLBACK DlgProcTabsOptions(HWND hwndDlg, UINT msg, WPARAM wParam return 0;
break;
}
- MarkChanges(8, hwndDlg);
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
case WM_NOTIFY:
switch (((LPNMHDR)lParam)->idFrom) {
case 0:
switch (((LPNMHDR)lParam)->code) {
+ case PSN_WIZFINISH:
+ ApplyOptions();
+ break;
+
case PSN_APPLY:
db_set_b(0, SRMM_MODULE, SRMSGSET_USETABS, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_USETABS));
db_set_b(0, SRMM_MODULE, SRMSGSET_TABSATBOTTOM, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_TABSATBOTTOM));
@@ -363,8 +356,6 @@ static INT_PTR CALLBACK DlgProcTabsOptions(HWND hwndDlg, UINT msg, WPARAM wParam db_set_b(0, SRMM_MODULE, SRMSGSET_SWITCHTOACTIVE, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SWITCHTOACTIVE));
db_set_b(0, SRMM_MODULE, SRMSGSET_TABCLOSEBUTTON, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_TABCLOSEBUTTON));
db_set_b(0, SRMM_MODULE, SRMSGSET_SEPARATECHATSCONTAINERS, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SEPARATECHATSCONTAINERS));
-
- ApplyChanges(8);
return TRUE;
}
}
@@ -429,7 +420,7 @@ static INT_PTR CALLBACK DlgProcLayoutOptions(HWND hwndDlg, UINT msg, WPARAM wPar return 0;
break;
}
- MarkChanges(16, hwndDlg);
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
case WM_HSCROLL:
@@ -437,13 +428,17 @@ static INT_PTR CALLBACK DlgProcLayoutOptions(HWND hwndDlg, UINT msg, WPARAM wPar SetDlgItemTextA(hwndDlg, IDC_ATRANSPARENCYPERC, str);
mir_snprintf(str, "%d%%", (int)(100 * SendDlgItemMessage(hwndDlg, IDC_ITRANSPARENCYVALUE, TBM_GETPOS, 0, 0) / 256));
SetDlgItemTextA(hwndDlg, IDC_ITRANSPARENCYPERC, str);
- MarkChanges(16, hwndDlg);
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
case WM_NOTIFY:
switch (((LPNMHDR)lParam)->idFrom) {
case 0:
switch (((LPNMHDR)lParam)->code) {
+ case PSN_WIZFINISH:
+ ApplyOptions();
+ break;
+
case PSN_APPLY:
db_set_b(0, SRMM_MODULE, SRMSGSET_SHOWSTATUSBAR, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SHOWSTATUSBAR));
db_set_b(0, SRMM_MODULE, SRMSGSET_SHOWTITLEBAR, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SHOWTITLEBAR));
@@ -461,8 +456,6 @@ static INT_PTR CALLBACK DlgProcLayoutOptions(HWND hwndDlg, UINT msg, WPARAM wPar db_set_w(0, SRMM_MODULE, SRMSGSET_AUTORESIZELINES, (WORD)SendDlgItemMessage(hwndDlg, IDC_INPUTLINESSPIN, UDM_GETPOS, 0, 0));
LoadInfobarFonts();
-
- ApplyChanges(16);
return TRUE;
}
}
@@ -527,7 +520,7 @@ static INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LP CheckDlgButton(hwndDlg, IDC_CASCADE, BST_UNCHECKED);
break;
}
- MarkChanges(2, hwndDlg);
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
case WM_NOTIFY:
@@ -546,18 +539,22 @@ static INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LP TreeView_GetItem(((LPNMHDR)lParam)->hwndFrom, &tvi);
tvi.iImage = tvi.iSelectedImage = tvi.iImage == 1 ? 2 : 1;
TreeView_SetItem(((LPNMHDR)lParam)->hwndFrom, &tvi);
- MarkChanges(2, hwndDlg);
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
}
}
}
else if (((LPNMHDR)lParam)->code == TVN_KEYDOWN) {
if (((LPNMTVKEYDOWN)lParam)->wVKey == VK_SPACE)
- MarkChanges(2, hwndDlg);
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
}
break;
case 0:
switch (((LPNMHDR)lParam)->code) {
+ case PSN_WIZFINISH:
+ ApplyOptions();
+ break;
+
case PSN_APPLY:
db_set_dw(0, SRMM_MODULE, SRMSGSET_POPFLAGS, MakeCheckBoxTreeFlags(GetDlgItem(hwndDlg, IDC_POPLIST)));
db_set_b(0, SRMM_MODULE, SRMSGSET_AUTOPOPUP, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_AUTOPOPUP));
@@ -574,9 +571,6 @@ static INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LP db_set_b(0, SRMM_MODULE, SRMSGSET_CASCADE, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_CASCADE));
db_set_b(0, SRMM_MODULE, SRMSGSET_HIDECONTAINERS, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_HIDECONTAINERS));
-
- ApplyChanges(2);
-
return TRUE;
}
}
@@ -768,13 +762,17 @@ public: case IDC_SRMM_LOG:
return 0;
}
- MarkChanges(4, m_hwnd);
+ SendMessage(GetParent(m_hwnd), PSM_CHANGED, 0, 0);
break;
case WM_NOTIFY:
switch (((LPNMHDR)lParam)->idFrom) {
case 0:
switch (((LPNMHDR)lParam)->code) {
+ case PSN_WIZFINISH:
+ ApplyOptions();
+ break;
+
case PSN_APPLY:
if (IsDlgButtonChecked(m_hwnd, IDC_LOADCOUNT))
db_set_b(0, SRMM_MODULE, SRMSGSET_LOADHISTORY, LOADHISTORY_COUNT);
@@ -801,7 +799,6 @@ public: FreeMsgLogIcons();
LoadMsgLogIcons();
- ApplyChanges(4);
return TRUE;
}
}
@@ -895,7 +892,7 @@ static INT_PTR CALLBACK DlgProcTypeOptions(HWND hwndDlg, UINT msg, WPARAM wParam EnableWindow(GetDlgItem(hwndDlg, IDC_NOTIFYTRAY), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_NOTIFYBALLOON), FALSE);
}
- MarkChanges(4, hwndDlg);
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
case IDC_SHOWNOTIFY:
@@ -909,7 +906,7 @@ static INT_PTR CALLBACK DlgProcTypeOptions(HWND hwndDlg, UINT msg, WPARAM wParam case IDC_NOTIFYTRAY:
case IDC_NOTIFYBALLOON:
case IDC_TYPINGSWITCH:
- MarkChanges(4, hwndDlg);
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
}
break;
@@ -922,7 +919,7 @@ static INT_PTR CALLBACK DlgProcTypeOptions(HWND hwndDlg, UINT msg, WPARAM wParam ResetCList(hwndDlg);
break;
case CLN_CHECKCHANGED:
- MarkChanges(4, hwndDlg);
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
case CLN_LISTREBUILT:
RebuildList(hwndDlg, hItemNew, hItemUnknown);
@@ -983,16 +980,17 @@ int OptInitialise(WPARAM wParam, LPARAM) odp.pDialog = nullptr;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS1);
odp.pfnDlgProc = DlgProcOptions1;
- odp.szTab.a = LPGEN("Group chat");
+ odp.szGroup.a = LPGEN("Message sessions");
+ odp.szTitle.a = LPGEN("Group chats");
+ odp.szTab.a = LPGEN("General");
Options_AddPage(wParam, &odp);
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS2);
odp.pfnDlgProc = DlgProcOptions2;
- odp.szTab.a = LPGEN("Group chat log");
+ odp.szTab.a = LPGEN("Event log");
Options_AddPage(wParam, &odp);
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_MSGTYPE);
- odp.szGroup.a = LPGEN("Message sessions");
odp.szTitle.a = LPGEN("Typing notify");
odp.pfnDlgProc = DlgProcTypeOptions;
odp.szTab.a = nullptr;
|