diff options
author | George Hazan <ghazan@miranda.im> | 2018-04-06 21:37:45 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-04-06 21:37:45 +0300 |
commit | d5558b6f67918ea8f951fd0408eff18532a63d4e (patch) | |
tree | ac73e7988e1d6a06f588717d6b93cea90bec16e3 /src | |
parent | 4f5b5ef8c908156bd30d5bb391c1e238cbcc2f0c (diff) |
CLIST_INTERFACE::pfnClcOptionsChanged => Clist_ClcOptionsChanged
CLIST_INTERFACE::pfnRegisterFileDropping & CLIST_INTERFACE::pfnUnregisterFileDropping => suspended
Diffstat (limited to 'src')
-rw-r--r-- | src/core/stdclist/src/clcfonts.cpp | 2 | ||||
-rw-r--r-- | src/core/stdclist/src/clcopts.cpp | 4 | ||||
-rw-r--r-- | src/mir_app/src/clc.cpp | 8 | ||||
-rw-r--r-- | src/mir_app/src/clc.h | 8 | ||||
-rw-r--r-- | src/mir_app/src/clcfiledrop.cpp | 20 | ||||
-rw-r--r-- | src/mir_app/src/clistcore.cpp | 4 | ||||
-rw-r--r-- | src/mir_app/src/mir_app.def | 1 | ||||
-rw-r--r-- | src/mir_app/src/mir_app64.def | 1 |
8 files changed, 12 insertions, 36 deletions
diff --git a/src/core/stdclist/src/clcfonts.cpp b/src/core/stdclist/src/clcfonts.cpp index c8f06365f1..a68e3979aa 100644 --- a/src/core/stdclist/src/clcfonts.cpp +++ b/src/core/stdclist/src/clcfonts.cpp @@ -45,7 +45,7 @@ static clistFontDescr[] = static int FS_FontsChanged(WPARAM, LPARAM)
{
- pcli->pfnClcOptionsChanged();
+ Clist_ClcOptionsChanged();
return 0;
}
diff --git a/src/core/stdclist/src/clcopts.cpp b/src/core/stdclist/src/clcopts.cpp index 7f3d5a69ed..0450672c0d 100644 --- a/src/core/stdclist/src/clcopts.cpp +++ b/src/core/stdclist/src/clcopts.cpp @@ -261,7 +261,7 @@ static INT_PTR CALLBACK DlgProcClcMainOpts(HWND hwndDlg, UINT msg, WPARAM wParam db_set_b(NULL, "CLC", "NoVScrollBar", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_NOSCROLLBAR) ? 1 : 0));
db_set_b(NULL, "CLC", "RowHeight", (BYTE)SendDlgItemMessage(hwndDlg, IDC_ROWHEIGHTSPIN, UDM_GETPOS, 0, 0));
db_set_b(NULL, "CLC", "GammaCorrect", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_GAMMACORRECT));
- pcli->pfnClcOptionsChanged();
+ Clist_ClcOptionsChanged();
return TRUE;
}
break;
@@ -409,7 +409,7 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, flags |= CLBF_PROPORTIONAL;
db_set_w(NULL, "CLC", "BkBmpUse", flags);
}
- pcli->pfnClcOptionsChanged();
+ Clist_ClcOptionsChanged();
return TRUE;
}
break;
diff --git a/src/mir_app/src/clc.cpp b/src/mir_app/src/clc.cpp index 9cd81ba7d2..0cb995c13e 100644 --- a/src/mir_app/src/clc.cpp +++ b/src/mir_app/src/clc.cpp @@ -58,7 +58,7 @@ MIR_APP_DLL(void) Clist_BroadcastAsync(int msg, WPARAM wParam, LPARAM lParam) WindowList_BroadcastAsync(hClcWindowList, msg, wParam, lParam);
}
-void fnClcOptionsChanged(void)
+MIR_APP_DLL(void) Clist_ClcOptionsChanged(void)
{
Clist_Broadcast(INTM_RELOADOPTIONS, 0, 0);
}
@@ -211,8 +211,6 @@ int LoadCLCModule(void) CreateServiceFunction(MS_CLC_SETINFOTIPHOVERTIME, SetInfoTipHoverTime);
CreateServiceFunction(MS_CLC_GETINFOTIPHOVERTIME, GetInfoTipHoverTime);
- InitFileDropping();
-
HookEvent(ME_SYSTEM_MODULESLOADED, ClcModulesLoaded);
HookEvent(ME_PROTO_ACCLISTCHANGED, ClcAccountsChanged);
HookEvent(ME_DB_CONTACT_SETTINGCHANGED, ClcSettingChanged);
@@ -255,7 +253,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam switch (uMsg) {
case WM_CREATE:
WindowList_Add(hClcWindowList, hwnd);
- cli.pfnRegisterFileDropping(hwnd);
+ RegisterFileDropping(hwnd);
if (dat == nullptr) {
dat = new ClcData();
SetWindowLongPtr(hwnd, 0, (LONG_PTR)dat);
@@ -1280,7 +1278,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam DeleteObject(dat->hBmpBackground);
FreeGroup(&dat->list);
delete dat;
- cli.pfnUnregisterFileDropping(hwnd);
+ UnregisterFileDropping(hwnd);
WindowList_Remove(hClcWindowList, hwnd);
}
return DefWindowProc(hwnd, uMsg, wParam, lParam);
diff --git a/src/mir_app/src/clc.h b/src/mir_app/src/clc.h index 5a9099cd49..2abed41833 100644 --- a/src/mir_app/src/clc.h +++ b/src/mir_app/src/clc.h @@ -42,8 +42,6 @@ extern HIMAGELIST hCListImages; extern bool g_bReadyToInitClist;
extern OBJLIST<MenuProto> g_menuProtos;
-void fnClcOptionsChanged(void);
-
LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
/* clcidents.c */
@@ -107,10 +105,8 @@ void fnCheckCacheItem(ClcCacheEntry *p); void fnFreeCacheItem(ClcCacheEntry *p);
/* clcfiledrop.c */
-void InitFileDropping(void);
-
-void fnRegisterFileDropping(HWND hwnd);
-void fnUnregisterFileDropping(HWND hwnd);
+void RegisterFileDropping(HWND hwnd);
+void UnregisterFileDropping(HWND hwnd);
/* clistevents.c */
struct CListEvent* fnAddEvent(CLISTEVENT *cle);
diff --git a/src/mir_app/src/clcfiledrop.cpp b/src/mir_app/src/clcfiledrop.cpp index 93960b09c4..1065de73de 100644 --- a/src/mir_app/src/clcfiledrop.cpp +++ b/src/mir_app/src/clcfiledrop.cpp @@ -246,28 +246,12 @@ HRESULT CDropTarget::Drop(IDataObject * pDataObj, DWORD /*fKeyState*/, POINTL pt return S_OK;
}
-static VOID CALLBACK CreateDropTargetHelperTimerProc(HWND hwnd, UINT, UINT_PTR idEvent, DWORD)
-{
- KillTimer(hwnd, idEvent);
- //This is a ludicrously slow function (~200ms) so we delay load it a bit.
- if (S_OK != CoCreateInstance(CLSID_DragDropHelper, nullptr, CLSCTX_INPROC_SERVER,
- IID_IDropTargetHelper, (LPVOID*)&dropTarget.pDropTargetHelper))
- dropTarget.pDropTargetHelper = nullptr;
-}
-
-void InitFileDropping(void)
-{
- // Disabled as this function loads tons of dlls for no apparenet reason
- // we will se what the reaction will be
-// SetTimer(nullptr, 1, 1000, CreateDropTargetHelperTimerProc);
-}
-
-void fnRegisterFileDropping(HWND hwnd)
+void RegisterFileDropping(HWND hwnd)
{
RegisterDragDrop(hwnd, (IDropTarget *) & dropTarget);
}
-void fnUnregisterFileDropping(HWND hwnd)
+void UnregisterFileDropping(HWND hwnd)
{
RevokeDragDrop(hwnd);
}
diff --git a/src/mir_app/src/clistcore.cpp b/src/mir_app/src/clistcore.cpp index b885d86ba2..0e454969f0 100644 --- a/src/mir_app/src/clistcore.cpp +++ b/src/mir_app/src/clistcore.cpp @@ -62,12 +62,8 @@ void InitClistCore() cli.bDisplayLocked = true;
cli.menuProtos = &g_menuProtos;
- cli.pfnClcOptionsChanged = fnClcOptionsChanged;
cli.pfnContactListControlWndProc = fnContactListControlWndProc;
- cli.pfnRegisterFileDropping = fnRegisterFileDropping;
- cli.pfnUnregisterFileDropping = fnUnregisterFileDropping;
-
cli.pfnGetRowsPriorTo = fnGetRowsPriorTo;
cli.pfnFindItem = fnFindItem;
cli.pfnGetRowByIndex = fnGetRowByIndex;
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def index e8b2c97f9b..e274058e7e 100644 --- a/src/mir_app/src/mir_app.def +++ b/src/mir_app/src/mir_app.def @@ -575,3 +575,4 @@ Clist_GetGroupCountsText @594 Clist_SaveStateAndRebuildList @595
Clist_DeleteItemFromTree @596
Clist_RemoveItemFromGroup @597
+Clist_ClcOptionsChanged @598
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def index d9782165d9..37564261f0 100644 --- a/src/mir_app/src/mir_app64.def +++ b/src/mir_app/src/mir_app64.def @@ -575,3 +575,4 @@ Clist_GetGroupCountsText @594 Clist_SaveStateAndRebuildList @595
Clist_DeleteItemFromTree @596
Clist_RemoveItemFromGroup @597
+Clist_ClcOptionsChanged @598
|