summaryrefslogtreecommitdiff
path: root/plugins/Scriver/src/input.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-03-07 23:14:08 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-03-07 23:14:08 +0300
commit4dde6e6a9b6176050f31df13e91d248b5d7c62b2 (patch)
treef449a243e576cec7968efcca842a7c4db8b6bd85 /plugins/Scriver/src/input.cpp
parent0bc0ec3803c1d95798e551ec7c1d431d2ac98075 (diff)
code cleaning
Diffstat (limited to 'plugins/Scriver/src/input.cpp')
-rw-r--r--plugins/Scriver/src/input.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/plugins/Scriver/src/input.cpp b/plugins/Scriver/src/input.cpp
index 844210c8fe..751c5891f5 100644
--- a/plugins/Scriver/src/input.cpp
+++ b/plugins/Scriver/src/input.cpp
@@ -75,7 +75,7 @@ void InputAreaContextMenu(HWND hwnd, WPARAM, LPARAM lParam, MCONTACT hContact)
mwpd.pt = pt;
NotifyEventHooks(hHookWinPopup, 0, (LPARAM)&mwpd);
- int selection = TrackPopupMenu(hSubMenu, TPM_RETURNCMD, pt.x, pt.y, 0, GetParent(hwnd), NULL);
+ int selection = TrackPopupMenu(hSubMenu, TPM_RETURNCMD, pt.x, pt.y, 0, GetParent(hwnd), nullptr);
// Second notification
mwpd.selection = selection;
@@ -201,40 +201,40 @@ int InputAreaShortcuts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, CScriv
if ((wParam == VK_UP || wParam == VK_DOWN) && isCtrl && !db_get_b(0, SRMMMOD, SRMSGSET_AUTOCLOSE, SRMSGDEFSET_AUTOCLOSE)) {
if (windowData->cmdList) {
- TCmdList *cmdListNew = NULL;
+ TCmdList *cmdListNew = nullptr;
if (wParam == VK_UP) {
- if (windowData->cmdListCurrent == NULL) {
+ if (windowData->cmdListCurrent == nullptr) {
cmdListNew = tcmdlist_last(windowData->cmdList);
- while (cmdListNew != NULL && cmdListNew->temporary) {
+ while (cmdListNew != nullptr && cmdListNew->temporary) {
windowData->cmdList = tcmdlist_remove(windowData->cmdList, cmdListNew);
cmdListNew = tcmdlist_last(windowData->cmdList);
}
- if (cmdListNew != NULL) {
+ if (cmdListNew != nullptr) {
char *textBuffer = GetRichTextUtf(hwnd);
- if (textBuffer != NULL)
+ if (textBuffer != nullptr)
// takes textBuffer to a queue, no leak here
windowData->cmdList = tcmdlist_append(windowData->cmdList, textBuffer, 20, TRUE);
}
}
- else if (windowData->cmdListCurrent->prev != NULL)
+ else if (windowData->cmdListCurrent->prev != nullptr)
cmdListNew = windowData->cmdListCurrent->prev;
}
else {
- if (windowData->cmdListCurrent != NULL) {
- if (windowData->cmdListCurrent->next != NULL)
+ if (windowData->cmdListCurrent != nullptr) {
+ if (windowData->cmdListCurrent->next != nullptr)
cmdListNew = windowData->cmdListCurrent->next;
else if (!windowData->cmdListCurrent->temporary)
SetWindowText(hwnd, L"");
}
}
- if (cmdListNew != NULL) {
+ if (cmdListNew != nullptr) {
SendMessage(hwnd, WM_SETREDRAW, FALSE, 0);
int iLen = SetRichTextRTF(hwnd, cmdListNew->szCmd);
SendMessage(hwnd, EM_SCROLLCARET, 0, 0);
SendMessage(hwnd, WM_SETREDRAW, TRUE, 0);
- RedrawWindow(hwnd, NULL, NULL, RDW_INVALIDATE);
+ RedrawWindow(hwnd, nullptr, nullptr, RDW_INVALIDATE);
SendMessage(hwnd, EM_SETSEL, iLen, iLen);
windowData->cmdListCurrent = cmdListNew;
}