diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2015-08-17 17:20:22 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2015-08-17 17:20:22 +0000 |
commit | b403244afc0e6718816d890594dad65d8619c15d (patch) | |
tree | 74400770fb71124d91f9741fde51913aa92c62f6 /plugins/Scriver | |
parent | be3717abb738ab3afdd8e70ec529254130fbb550 (diff) |
Scriver:
- Some settings are now applied without a restart (merges r10545, closes #993, patch by mkvreak)
- minor warnings fixed
git-svn-id: http://svn.miranda-ng.org/main/trunk@14977 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Scriver')
-rw-r--r-- | plugins/Scriver/src/chat/options.cpp | 1 | ||||
-rw-r--r-- | plugins/Scriver/src/chat/window.cpp | 16 | ||||
-rw-r--r-- | plugins/Scriver/src/msgdialog.cpp | 5 | ||||
-rw-r--r-- | plugins/Scriver/src/msgwindow.cpp | 12 |
4 files changed, 19 insertions, 15 deletions
diff --git a/plugins/Scriver/src/chat/options.cpp b/plugins/Scriver/src/chat/options.cpp index 446e0d1fa7..254fb28675 100644 --- a/plugins/Scriver/src/chat/options.cpp +++ b/plugins/Scriver/src/chat/options.cpp @@ -605,6 +605,7 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lPa g_Settings.bLogIndentEnabled = (db_get_b(NULL, CHAT_MODULE, "LogIndentEnabled", 1) != 0) ? TRUE : FALSE;
pci->MM_FontsChanged();
+ pci->ReloadSettings();
pci->SM_BroadcastMessage(NULL, GC_SETWNDPROPS, 0, 0, TRUE);
return TRUE;
}
diff --git a/plugins/Scriver/src/chat/window.cpp b/plugins/Scriver/src/chat/window.cpp index ef5dc2eceb..b8923a07ec 100644 --- a/plugins/Scriver/src/chat/window.cpp +++ b/plugins/Scriver/src/chat/window.cpp @@ -1555,14 +1555,14 @@ LABEL_SHOWWINDOW: case GC_SCROLLTOBOTTOM:
if ((GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_CHAT_LOG), GWL_STYLE) & WS_VSCROLL) != 0) {
- SCROLLINFO si = { 0 };
- si.cbSize = sizeof(si);
- si.fMask = SIF_PAGE | SIF_RANGE;
- GetScrollInfo(GetDlgItem(hwndDlg, IDC_CHAT_LOG), SB_VERT, &si);
-
- si.fMask = SIF_POS;
- si.nPos = si.nMax - si.nPage + 1;
- SetScrollInfo(GetDlgItem(hwndDlg, IDC_CHAT_LOG), SB_VERT, &si, TRUE);
+ SCROLLINFO sci = { 0 };
+ sci.cbSize = sizeof(sci);
+ sci.fMask = SIF_PAGE | SIF_RANGE;
+ GetScrollInfo(GetDlgItem(hwndDlg, IDC_CHAT_LOG), SB_VERT, &sci);
+
+ sci.fMask = SIF_POS;
+ sci.nPos = sci.nMax - sci.nPage + 1;
+ SetScrollInfo(GetDlgItem(hwndDlg, IDC_CHAT_LOG), SB_VERT, &sci, TRUE);
CHARRANGE sel;
sel.cpMin = sel.cpMax = GetRichTextLength(GetDlgItem(hwndDlg, IDC_CHAT_LOG), CP_ACP, FALSE);
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp index 3ac1b73d06..0637424ddf 100644 --- a/plugins/Scriver/src/msgdialog.cpp +++ b/plugins/Scriver/src/msgdialog.cpp @@ -1010,7 +1010,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP }
break;
- case DM_UPDATETABCONTROL:
+ case DM_UPDATETABCONTROL: {
TabControlData tcd;
tcd.iFlags = TCDF_TEXT | TCDF_ICON;
tcd.hIcon = GetTabIcon(dat);
@@ -1018,6 +1018,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP SendMessage(dat->hwndParent, CM_UPDATETABCONTROL, (WPARAM)&tcd, (LPARAM)hwndDlg);
mir_free(tcd.pszText);
break;
+ }
case DM_UPDATETITLEBAR:
{
@@ -1699,7 +1700,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP dbei.pBlob = (PBYTE)mir_alloc(dbei.cbBlob);
db_event_get(dat->hDbEventLast, &dbei);
if (DbEventIsMessageOrCustom(&dbei)) {
- TCHAR *buffer = DbGetEventTextT(&dbei, CP_ACP);
+ buffer = DbGetEventTextT(&dbei, CP_ACP);
if (buffer != NULL) {
TCHAR *quotedBuffer = GetQuotedTextW(buffer);
SendDlgItemMessage(hwndDlg, IDC_MESSAGE, EM_SETTEXTEX, (WPARAM)&st, (LPARAM)quotedBuffer);
diff --git a/plugins/Scriver/src/msgwindow.cpp b/plugins/Scriver/src/msgwindow.cpp index 74e66c8331..aea6b87cd8 100644 --- a/plugins/Scriver/src/msgwindow.cpp +++ b/plugins/Scriver/src/msgwindow.cpp @@ -735,12 +735,10 @@ INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR if (!dat && msg != WM_INITDIALOG)
return FALSE;
- RECT rc;
DWORD ws;
switch (msg) {
case WM_INITDIALOG:
- HMENU hMenu;
{
int savePerContact = db_get_b(NULL, SRMMMOD, SRMSGSET_SAVEPERCONTACT, SRMSGDEFSET_SAVEPERCONTACT);
NewMessageWindowLParam *newData = (NewMessageWindowLParam *)lParam;
@@ -790,7 +788,7 @@ INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR if (!savePerContact && db_get_b(NULL, SRMMMOD, SRMSGSET_CASCADE, SRMSGDEFSET_CASCADE))
WindowList_Broadcast(g_dat.hParentWindowList, DM_CASCADENEWWINDOW, (WPARAM)hwndDlg, (LPARAM)&dat->windowWasCascaded);
- hMenu = GetSystemMenu(hwndDlg, FALSE);
+ HMENU hMenu = GetSystemMenu(hwndDlg, FALSE);
InsertMenu(hMenu, 0, MF_BYPOSITION | MF_SEPARATOR, 0, NULL);
if (dat->bTopmost) {
InsertMenu(hMenu, 0, MF_BYPOSITION | MF_ENABLED | MF_CHECKED | MF_STRING, IDM_TOPMOST, TranslateT("Always on top"));
@@ -837,7 +835,7 @@ INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR if (IsIconic(hwndDlg))
MoveWindow(dat->hwndActive, dat->childRect.left, dat->childRect.top, dat->childRect.right - dat->childRect.left, dat->childRect.bottom - dat->childRect.top, TRUE);
else {
- RECT rcStatus, rcChild, rcWindow;
+ RECT rcStatus, rcChild, rcWindow, rc;
SIZE size;
dat->bMinimized = 0;
GetClientRect(hwndDlg, &rc);
@@ -964,6 +962,7 @@ INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR else if (pNMHDR->hwndFrom == dat->hwndStatus) {
switch (pNMHDR->code) {
case NM_CLICK:
+ RECT rc;
NMMOUSE *nm = (NMMOUSE*)lParam;
SendMessage(dat->hwndStatus, SB_GETRECT, SendMessage(dat->hwndStatus, SB_GETPARTS, 0, 0) - 2, (LPARAM)&rc);
if (nm->pt.x >= rc.left) {
@@ -1001,6 +1000,7 @@ INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR pt2 = pt;
ScreenToClient(dat->hwndStatus, &pt);
+ RECT rc;
SendMessage(dat->hwndStatus, SB_GETRECT, SendMessage(dat->hwndStatus, SB_GETPARTS, 0, 0) - 2, (LPARAM)&rc);
if (pt.x >= rc.left) {
MessageWindowTabData *mwtd = GetChildFromHWND(dat, dat->hwndActive);
@@ -1357,17 +1357,19 @@ INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR SendMessage(hwndDlg, WM_SIZE, 0, 0);
break;
- case DM_SWITCHTITLEBAR:
+ case DM_SWITCHTITLEBAR: {
dat->flags2 ^= SMF2_SHOWTITLEBAR;
ws = GetWindowLongPtr(hwndDlg, GWL_STYLE) & ~(WS_CAPTION);
if (dat->flags2 & SMF2_SHOWTITLEBAR)
ws |= WS_CAPTION;
SetWindowLongPtr(hwndDlg, GWL_STYLE, ws);
+ RECT rc;
GetWindowRect(hwndDlg, &rc);
SetWindowPos(hwndDlg, 0, 0, 0, rc.right - rc.left, rc.bottom - rc.top,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER | SWP_FRAMECHANGED | SWP_NOSENDCHANGING);
RedrawWindow(hwndDlg, NULL, NULL, RDW_ERASE | RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN);
+ }
break;
case DM_CASCADENEWWINDOW:
|