diff options
author | George Hazan <ghazan@miranda.im> | 2018-07-11 21:32:58 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-07-11 21:33:11 +0300 |
commit | f719c8b921c7a46b76453476204224d40c682914 (patch) | |
tree | c6d92dc450893e7f5abe60c2046ec9c2d1e3db36 /plugins/Clist_modern | |
parent | 16ad355c8bdc438c3107ee3ba3ad0bf0b8c395fa (diff) |
int hLangpack/m_hLang removed and replaced with HPLUGIN
Diffstat (limited to 'plugins/Clist_modern')
-rw-r--r-- | plugins/Clist_modern/src/cluiframes.cpp | 16 | ||||
-rw-r--r-- | plugins/Clist_modern/src/cluiframes.h | 2 | ||||
-rw-r--r-- | plugins/Clist_modern/src/groupmenu.cpp | 4 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clcopts.cpp | 3 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clistmenus.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clistopts.cpp | 3 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clui.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_skinopt.cpp | 3 |
8 files changed, 16 insertions, 19 deletions
diff --git a/plugins/Clist_modern/src/cluiframes.cpp b/plugins/Clist_modern/src/cluiframes.cpp index 6d85477399..c29b26e41e 100644 --- a/plugins/Clist_modern/src/cluiframes.cpp +++ b/plugins/Clist_modern/src/cluiframes.cpp @@ -735,7 +735,7 @@ static int CLUIFramesGetalClientFrame(void) static HGENMENU addFrameMenuItem(TMO_MenuItem *pmi, FRAMEWND &F, int frameid, bool bMain)
{
- pmi->langId = F.hLang;
+ pmi->pPlugin = F.pPlugin;
HGENMENU res = (bMain) ? Menu_AddMainMenuItem(pmi) : Menu_AddContextFrameMenuItem(pmi);
if (pmi->pszService != nullptr)
Menu_ConfigureItem(res, MCI_OPT_EXECPARAM, frameid);
@@ -751,7 +751,7 @@ static HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popupp auto &F = g_pfwFrames[framepos];
FrameMenuHandles &fmh = (frameid == -1) ? cont : F.MenuHandles;
- CMenuItem mi(g_plugin);
+ CMenuItem mi(&g_plugin);
mi.root = root;
mi.position = popuppos++;
mi.name.a = LPGEN("&Visible");
@@ -1041,7 +1041,7 @@ static int _us_DoSetFrameOptions(WPARAM wParam, LPARAM lParam) fw.TitleBar.tbname = mir_a2u((char*)lParam);
if (fw.floating && (fw.TitleBar.tbname != nullptr))
- SetWindowText(fw.ContainerWnd, TranslateW_LP(fw.TitleBar.tbname, fw.hLang));
+ SetWindowText(fw.ContainerWnd, TranslateW_LP(fw.TitleBar.tbname, fw.pPlugin));
return 0;
case FO_TBTIPNAME:
@@ -1473,7 +1473,7 @@ static int CLUIFramesLoadMainMenu() g_frameMenus.destroy();
// create frames menu
- CMenuItem mi(g_plugin);
+ CMenuItem mi(&g_plugin);
mi.root = cont.MainMenuItem;
int separator = 3000200000;
for (int i = 0; i < g_nFramesCount; i++) {
@@ -1525,7 +1525,7 @@ static int _us_DoAddFrame(WPARAM wParam, LPARAM lParam) F.hWnd = clfrm->hWnd;
F.height = clfrm->height;
F.TitleBar.hicon = clfrm->hIcon;
- F.hLang = (int)lParam;
+ F.pPlugin = (HPLUGIN)lParam;
F.floating = FALSE;
if (clfrm->Flags & F_NO_SUBCONTAINER || !g_CluiData.fLayered)
F.OwnerWindow = (HWND)-2;
@@ -1560,7 +1560,7 @@ static int _us_DoAddFrame(WPARAM wParam, LPARAM lParam) //Frames[nFramescount].OwnerWindow = 0;
- F.TitleBar.hwnd = CreateWindow(CLUIFrameTitleBarClassName, TranslateW_LP(F.name, F.hLang),
+ F.TitleBar.hwnd = CreateWindow(CLUIFrameTitleBarClassName, TranslateW_LP(F.name, F.pPlugin),
(db_get_b(0, CLUIFrameModule, "RemoveAllTitleBarBorders", 1) ? 0 : WS_BORDER)
| WS_CHILD | WS_CLIPCHILDREN |
(F.TitleBar.ShowTitleBar ? WS_VISIBLE : 0) |
@@ -2492,7 +2492,7 @@ int DrawTitleBar(HDC hdcMem2, RECT *rect, int Frameid) textrc.top += 2;
}
- wchar_t *wszTitle = TranslateW_LP(F.TitleBar.tbname, F.hLang);
+ wchar_t *wszTitle = TranslateW_LP(F.TitleBar.tbname, F.pPlugin);
ske_TextOut(hdcMem, textrc.left, textrc.top, wszTitle, (int)mir_wstrlen(wszTitle));
if (!AlignCOLLIconToLeft)
@@ -3315,7 +3315,7 @@ int LoadCLUIFramesModule(void) InitGroupMenus();
{
// create root menu
- CMenuItem mi(g_plugin);
+ CMenuItem mi(&g_plugin);
SET_UID(mi, 0x3931AC4, 0x7A32, 0x4D9C, 0x99, 0x92, 0x94, 0xD4, 0xB5, 0x9B, 0xD6, 0xB6);
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_FRAME);
mi.position = 3000090000;
diff --git a/plugins/Clist_modern/src/cluiframes.h b/plugins/Clist_modern/src/cluiframes.h index a7a24d3a81..c17510f0a6 100644 --- a/plugins/Clist_modern/src/cluiframes.h +++ b/plugins/Clist_modern/src/cluiframes.h @@ -117,7 +117,7 @@ struct FRAMEWND POINT FloatingPos;
POINT FloatingSize;
int order;
- int hLang;
+ HPLUGIN pPlugin;
DockOpt dockOpt;
HWND OwnerWindow;
tPaintCallbackProc PaintCallbackProc;
diff --git a/plugins/Clist_modern/src/groupmenu.cpp b/plugins/Clist_modern/src/groupmenu.cpp index 431bc8ace8..193fc9e445 100644 --- a/plugins/Clist_modern/src/groupmenu.cpp +++ b/plugins/Clist_modern/src/groupmenu.cpp @@ -56,7 +56,7 @@ void InitGroupMenus(void) InitSubGroupMenus();
- CMenuItem mi(g_plugin);
+ CMenuItem mi(&g_plugin);
SET_UID(mi, 0xe386678a, 0x5aee, 0x4bfa, 0xa8, 0x23, 0xd, 0xa0, 0x11, 0x99, 0xb1, 0x98);
mi.position = 500;
@@ -132,7 +132,7 @@ void InitSubGroupMenus(void) // add exit command to menu
GroupMenuParam gmp = { POPUP_GROUPSHOWOFFLINE, 0 };
- CMenuItem mi(g_plugin);
+ CMenuItem mi(&g_plugin);
SET_UID(mi, 0x7E081A28, 0x19B3, 0x407F, 0x80, 0x6B, 0x70, 0xC3, 0xC3, 0xA9, 0xD2, 0xA4);
mi.position = 1002;
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
diff --git a/plugins/Clist_modern/src/modern_clcopts.cpp b/plugins/Clist_modern/src/modern_clcopts.cpp index 5927682020..8f8ac960f5 100644 --- a/plugins/Clist_modern/src/modern_clcopts.cpp +++ b/plugins/Clist_modern/src/modern_clcopts.cpp @@ -1518,8 +1518,7 @@ static clist_opt_items[] = int ClcOptInit(WPARAM wParam, LPARAM)
{
- OPTIONSDIALOGPAGE odp = { 0 };
- odp.hInstance = g_plugin.getInst();
+ OPTIONSDIALOGPAGE odp = {};
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_CLC);
odp.szTitle.a = LPGEN("Contact list");
odp.pfnDlgProc = DlgProcClistListOpts;
diff --git a/plugins/Clist_modern/src/modern_clistmenus.cpp b/plugins/Clist_modern/src/modern_clistmenus.cpp index 923242e93f..95eec95d18 100644 --- a/plugins/Clist_modern/src/modern_clistmenus.cpp +++ b/plugins/Clist_modern/src/modern_clistmenus.cpp @@ -93,7 +93,7 @@ INT_PTR FAV_ToggleShowOffline(WPARAM hContact, LPARAM) void LoadFavoriteContactMenu()
{
- CMenuItem mi(g_plugin);
+ CMenuItem mi(&g_plugin);
SET_UID(mi, 0xf99a2320, 0xc024, 0x48bd, 0x81, 0xf7, 0x9f, 0xa2, 0x5, 0xb0, 0x7f, 0xdc);
mi.name.w = FAVMENUROOTNAME;
mi.flags = CMIF_UNICODE;
diff --git a/plugins/Clist_modern/src/modern_clistopts.cpp b/plugins/Clist_modern/src/modern_clistopts.cpp index 4481781157..da055263f7 100644 --- a/plugins/Clist_modern/src/modern_clistopts.cpp +++ b/plugins/Clist_modern/src/modern_clistopts.cpp @@ -929,9 +929,8 @@ static row_opt_items[] = int CListOptInit(WPARAM wParam, LPARAM)
{
- OPTIONSDIALOGPAGE odp = { 0 };
+ OPTIONSDIALOGPAGE odp = {};
odp.position = -200000000;
- odp.hInstance = g_plugin.getInst();
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_ITEMS);
odp.szGroup.a = LPGEN("Contact list");
odp.szTitle.a = LPGEN("Row items");
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp index 181d59c2e1..5abbec1ca8 100644 --- a/plugins/Clist_modern/src/modern_clui.cpp +++ b/plugins/Clist_modern/src/modern_clui.cpp @@ -325,7 +325,7 @@ HRESULT CLUI::RegisterAvatarMenu() {
g_plugin.registerIcon(LPGEN("Contact list"), iconItem);
- CMenuItem mi(g_plugin);
+ CMenuItem mi(&g_plugin);
SET_UID(mi, 0x1cc99858, 0x40ca, 0x4558, 0xae, 0x10, 0xba, 0x81, 0xaf, 0x4c, 0x67, 0xb5);
CreateServiceFunction("CList/ShowContactAvatar", CLUI::Service_Menu_ShowContactAvatar);
mi.position = 2000150000;
diff --git a/plugins/Clist_modern/src/modern_skinopt.cpp b/plugins/Clist_modern/src/modern_skinopt.cpp index bfd20fc48b..e474281160 100644 --- a/plugins/Clist_modern/src/modern_skinopt.cpp +++ b/plugins/Clist_modern/src/modern_skinopt.cpp @@ -48,9 +48,8 @@ int SkinOptInit(WPARAM wParam, LPARAM) { if (!g_CluiData.fDisableSkinEngine) { //Tabbed settings - OPTIONSDIALOGPAGE odp = { 0 }; + OPTIONSDIALOGPAGE odp = {}; odp.position = -200000000; - odp.hInstance = g_plugin.getInst(); odp.pfnDlgProc = DlgSkinOpts; odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_SKIN); odp.szGroup.w = LPGENW("Skins"); |