Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16:/tmp/cvs-serv26203/src Modified Files: data.c defaults.c mswindow.c Log Message: New option richTextMove to allow window movement of the richtext message windows specificaly. Off by default. Makes it easier to highlight and select text in the message windows. Removed scroll to caret upon adding a new message to a richtext window, this was unnecessarily scrolling the window to the bottom in certain situations. Index: mswindow.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v retrieving revision 1.75 retrieving revision 1.76 diff -u -d -r1.75 -r1.76 --- mswindow.c 18 Apr 2007 02:05:26 -0000 1.75 +++ mswindow.c 18 Apr 2007 09:41:32 -0000 1.76 @@ -6167,12 +6167,12 @@ { // Scroll if mouse isn't in window, or if mouse is in // window but scrollback is already at bottom - if (!findMouseInWin (& x, &y, (W_Window) win) || diff == 1) + if (!findMouseInWin (&x, &y, (W_Window) win) || diff == 1) point.y += W_Textheight * diff; SendMessage (win->hwnd, EM_SETSCROLLPOS, 0, (LPARAM) &point); } //SendMessage (win->hwnd, EM_HIDESELECTION, FALSE, 0); - SendMessage (win->hwnd, EM_SCROLLCARET, 0, 0); + //SendMessage (win->hwnd, EM_SCROLLCARET, 0, 0); if (cr.cpMin != cr.cpMax) SendMessage (win->hwnd, EM_SETSEL, 0, (LPARAM) &cr); @@ -6194,7 +6194,8 @@ case WM_LBUTTONDOWN: BringWindowToTop (hwnd); // fake a caption hit to move window - SendMessage(hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0); + if (richTextMove) + SendMessage(hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0); break; case WM_NCRBUTTONDOWN: if (GetWindowLongPtr(hwnd, GWL_STYLE) & WS_SIZEBOX) Index: defaults.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v retrieving revision 1.80 retrieving revision 1.81 diff -u -d -r1.80 -r1.81 --- defaults.c 14 Apr 2007 09:49:34 -0000 1.80 +++ defaults.c 18 Apr 2007 09:41:32 -0000 1.81 @@ -573,6 +573,12 @@ NULL } }, + {"richTextMove", &richTextMove, RC_BOOL, + { + "Enable rich text windows moving", + NULL + } + }, {"rotatePlanets", &rotatePlanets, RC_BOOL, { "Rotate planets (only works with new planet bitmaps)", @@ -1712,6 +1718,7 @@ mainTitleBar = booleanDefault ("mainTitleBar", mainTitleBar); allowWheelActions = booleanDefault ("allowWheelActions", allowWheelActions); richText = booleanDefault ("richText", richText); + richTextMove = booleanDefault ("richTextMove", richTextMove); newQuit = booleanDefault ("newQuit", newQuit); newTeams = booleanDefault ("newTeams", newTeams); soundVolume= intDefault ("soundVolume", soundVolume); Index: data.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v retrieving revision 1.84 retrieving revision 1.85 diff -u -d -r1.84 -r1.85 --- data.c 14 Apr 2007 09:49:34 -0000 1.84 +++ data.c 18 Apr 2007 09:41:32 -0000 1.85 @@ -814,6 +814,7 @@ WNDPROC lpfnDefRichEditWndProc; /* default window proc */ int richText = 0; /* rich text message windows */ +int richTextMove = 0; /* allow rich text windows to be moved */ int newQuit = 0; /* new quit clock */ int newTeams = 0; /* new team windows */ int soundVolume = 64; /* Starting sound volume (0-128 range) */