summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-04-19 14:54:06 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-04-19 14:54:06 +0000
commitcfd5e84d59e615d93f721f7c016f5606487657ac (patch)
tree68ee1fde81476e8cdd6fc285cea61277e6d54673
parent01ff549a2303122360f819c3344ff8a374839d82 (diff)
faster, even faster
git-svn-id: http://svn.miranda-ng.org/main/trunk@16718 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/Clist_modern/src/modern_clc.cpp1
-rw-r--r--plugins/Sessions/Src/stdafx.h8
-rw-r--r--src/mir_app/src/clc.cpp21
-rw-r--r--src/mir_app/src/clui.cpp4
4 files changed, 18 insertions, 16 deletions
diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp
index d93c693191..30be3a17a7 100644
--- a/plugins/Clist_modern/src/modern_clc.cpp
+++ b/plugins/Clist_modern/src/modern_clc.cpp
@@ -1578,7 +1578,6 @@ static LRESULT clcOnIntmStatusChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM
}
}
- pcli->pfnInitAutoRebuild(hwnd);
return ret;
}
diff --git a/plugins/Sessions/Src/stdafx.h b/plugins/Sessions/Src/stdafx.h
index f76831d72e..b1ec730c64 100644
--- a/plugins/Sessions/Src/stdafx.h
+++ b/plugins/Sessions/Src/stdafx.h
@@ -31,7 +31,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <m_langpack.h>
#include <m_icolib.h>
#include <m_message.h>
-#include <m_clist.h>
+#include <m_clistint.h>
#include <m_hotkeys.h>
#include <win2k.h>
@@ -70,6 +70,6 @@ extern bool g_bOtherWarnings;
extern bool g_bCrashRecovery;
extern bool g_bIncompletedSave;
-#define TIMERID_LOAD 12
-#define TIMERID_SHOW 11
-#define TIMERID_REBUILDAFTER 14
+#define TIMERID_SHOW 11
+#define TIMERID_LOAD 12
+
diff --git a/src/mir_app/src/clc.cpp b/src/mir_app/src/clc.cpp
index 556e2ca308..6169fef209 100644
--- a/src/mir_app/src/clc.cpp
+++ b/src/mir_app/src/clc.cpp
@@ -44,7 +44,7 @@ void fnInitAutoRebuild(HWND hWnd)
{
if (!cli.bAutoRebuild && hWnd) {
cli.bAutoRebuild = true;
- SendMessage(hWnd, CLM_AUTOREBUILD, 0, 0);
+ PostMessage(hWnd, CLM_AUTOREBUILD, 0, 0);
}
}
@@ -790,29 +790,35 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam
case TIMERID_RENAME:
cli.pfnBeginRenameSelection(hwnd, dat);
break;
+
case TIMERID_DRAGAUTOSCROLL:
cli.pfnScrollTo(hwnd, dat, dat->yScroll + dat->dragAutoScrolling * dat->rowHeight * 2, 0);
break;
+
case TIMERID_INFOTIP:
+ KillTimer(hwnd, wParam);
{
CLCINFOTIP it;
- RECT clRect;
- POINT ptClientOffset = { 0 };
-
- KillTimer(hwnd, wParam);
GetCursorPos(&it.ptCursor);
ScreenToClient(hwnd, &it.ptCursor);
if (it.ptCursor.x != dat->ptInfoTip.x || it.ptCursor.y != dat->ptInfoTip.y)
break;
+
+ RECT clRect;
GetClientRect(hwnd, &clRect);
+
it.rcItem.left = 0;
it.rcItem.right = clRect.right;
+
hit = cli.pfnHitTest(hwnd, dat, it.ptCursor.x, it.ptCursor.y, &contact, NULL, NULL);
if (hit == -1)
break;
if (contact->type != CLCIT_GROUP && contact->type != CLCIT_CONTACT)
break;
+
ClientToScreen(hwnd, &it.ptCursor);
+
+ POINT ptClientOffset = { 0 };
ClientToScreen(hwnd, &ptClientOffset);
it.isTreeFocused = GetFocus() == hwnd;
it.rcItem.top = cli.pfnGetRowTopY(dat, hit) - dat->yScroll;
@@ -822,9 +828,10 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam
it.hItem = (contact->type == CLCIT_GROUP) ? (HANDLE)contact->groupId : (HANDLE)contact->hContact;
it.cbSize = sizeof(it);
dat->hInfoTipItem = cli.pfnContactToHItem(contact);
- NotifyEventHooks(hShowInfoTipEvent, 0, (LPARAM)& it);
- break;
+ NotifyEventHooks(hShowInfoTipEvent, 0, (LPARAM)&it);
}
+ break;
+
case TIMERID_REBUILDAFTER:
KillTimer(hwnd, TIMERID_REBUILDAFTER);
cli.pfnInvalidateRect(hwnd, NULL, FALSE);
diff --git a/src/mir_app/src/clui.cpp b/src/mir_app/src/clui.cpp
index d3f19c7a5c..fe2ae6ad3c 100644
--- a/src/mir_app/src/clui.cpp
+++ b/src/mir_app/src/clui.cpp
@@ -795,10 +795,6 @@ CLS_HIDEEMPTYGROUPS : 0), 0, 0, 0, 0, hwnd, NULL, cli.hInst, NULL);
cli.pfnSetAllExtraIcons((UINT_PTR)nmc->hItem);
return TRUE;
- case CLN_LISTREBUILT:
- cli.pfnSetAllExtraIcons(NULL);
- return(FALSE);
-
case NM_KEYDOWN:
return CallService(MS_CLIST_MENUPROCESSHOTKEY, ((NMKEY*)lParam)->nVKey, MPCF_MAINMENU | MPCF_CONTACTMENU);