summaryrefslogtreecommitdiff
path: root/plugins/Scriver/src/msgs.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2014-06-14 17:31:23 +0000
committerRobert Pösel <robyer@seznam.cz>2014-06-14 17:31:23 +0000
commit469640071ddd9581b45f70f3dc2b9c4c2cc31199 (patch)
tree3a5356d0471bbd160e7e37aaf20f3ab376cb902d /plugins/Scriver/src/msgs.cpp
parentc3a49bd95dce1276b4b02e0c236146f2184e31cc (diff)
MS_MSG_SETSTATUSTEXT improvements
- clear statusbar by using NULL as lParam - TabSRMM: remember custom statusbar text when switching between tabs git-svn-id: http://svn.miranda-ng.org/main/trunk@9481 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Scriver/src/msgs.cpp')
-rw-r--r--plugins/Scriver/src/msgs.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp
index 81d0a5ecc5..c416c65989 100644
--- a/plugins/Scriver/src/msgs.cpp
+++ b/plugins/Scriver/src/msgs.cpp
@@ -327,13 +327,6 @@ static INT_PTR GetWindowData(WPARAM wParam, LPARAM lParam)
static INT_PTR SetStatusText(WPARAM wParam, LPARAM lParam)
{
- StatusTextData *st = (StatusTextData*)lParam;
- if (st == NULL)
- return 1;
-
- if (st->cbSize != sizeof(StatusTextData))
- return 1;
-
HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, wParam);
if (hwnd == NULL)
hwnd = SM_FindWindowByContact(wParam);
@@ -344,8 +337,13 @@ static INT_PTR SetStatusText(WPARAM wParam, LPARAM lParam)
if (dat == NULL || dat->parent == NULL)
return 1;
- SendMessage(dat->parent->hwndStatus, SB_SETICON, 0, (LPARAM)st->hIcon);
- SendMessage(dat->parent->hwndStatus, SB_SETTEXT, 0, (LPARAM)st->tszText);
+ StatusTextData *st = (StatusTextData*)lParam;
+ if (st != NULL && st->cbSize != sizeof(StatusTextData))
+ return 1;
+
+ SendMessage(dat->parent->hwndStatus, SB_SETICON, 0, (LPARAM)(st == NULL ? 0 : st->hIcon));
+ SendMessage(dat->parent->hwndStatus, SB_SETTEXT, 0, (LPARAM)(st == NULL ? _T("") : st->tszText));
+
return 0;
}