summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/stdaway/src/sendmsg.cpp2
-rw-r--r--src/core/stdclist/src/clcopts.cpp4
-rw-r--r--src/core/stdclist/src/clistopts.cpp2
-rw-r--r--src/core/stdclist/src/cluiopts.cpp4
-rw-r--r--src/core/stdfile/src/fileopts.cpp2
-rw-r--r--src/core/stdidle/src/options.cpp2
-rw-r--r--src/core/stdmsg/src/chat_options.cpp6
-rw-r--r--src/core/stdmsg/src/msgoptions.cpp8
-rw-r--r--src/mir_app/src/CMPluginBase.cpp19
-rw-r--r--src/mir_app/src/FontOptions.cpp2
-rw-r--r--src/mir_app/src/contacts.cpp2
-rw-r--r--src/mir_app/src/ei_options.cpp2
-rw-r--r--src/mir_app/src/hotkey_opts.cpp2
-rw-r--r--src/mir_app/src/ignore.cpp2
-rw-r--r--src/mir_app/src/lpopts.cpp4
-rw-r--r--src/mir_app/src/menu_options.cpp2
-rw-r--r--src/mir_app/src/meta_options.cpp2
-rw-r--r--src/mir_app/src/mir_app.def3
-rw-r--r--src/mir_app/src/mir_app64.def3
-rw-r--r--src/mir_app/src/netlibopts.cpp2
-rw-r--r--src/mir_app/src/pluginopts.cpp2
-rw-r--r--src/mir_app/src/proto_opts.cpp4
-rw-r--r--src/mir_app/src/proto_order.cpp2
-rw-r--r--src/mir_app/src/skin2opts.cpp2
-rw-r--r--src/mir_app/src/sounds.cpp2
-rw-r--r--src/mir_app/src/srmm_toolbar.cpp2
-rw-r--r--src/mir_app/src/visibility.cpp2
27 files changed, 57 insertions, 34 deletions
diff --git a/src/core/stdaway/src/sendmsg.cpp b/src/core/stdaway/src/sendmsg.cpp
index 532ad9d1ec..cc416c4ef6 100644
--- a/src/core/stdaway/src/sendmsg.cpp
+++ b/src/core/stdaway/src/sendmsg.cpp
@@ -523,7 +523,7 @@ static int AwayMsgOptInitialise(WPARAM wParam, LPARAM)
odp.szGroup.a = LPGEN("Status");
odp.pfnDlgProc = DlgProcAwayMsgOpts;
odp.flags = ODPF_BOLDGROUPS;
- Options_AddPage(wParam, &odp);
+ g_plugin.addOptions(wParam, &odp);
return 0;
}
diff --git a/src/core/stdclist/src/clcopts.cpp b/src/core/stdclist/src/clcopts.cpp
index e2790adc9c..311e3a959d 100644
--- a/src/core/stdclist/src/clcopts.cpp
+++ b/src/core/stdclist/src/clcopts.cpp
@@ -430,12 +430,12 @@ int ClcOptInit(WPARAM wParam, LPARAM)
odp.szTitle.a = LPGEN("List");
odp.pfnDlgProc = DlgProcClcMainOpts;
odp.flags = ODPF_BOLDGROUPS;
- Options_AddPage(wParam, &odp);
+ g_plugin.addOptions(wParam, &odp);
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_CLCBKG);
odp.szTitle.a = LPGEN("List background");
odp.pfnDlgProc = DlgProcClcBkgOpts;
odp.flags = ODPF_BOLDGROUPS;
- Options_AddPage(wParam, &odp);
+ g_plugin.addOptions(wParam, &odp);
return 0;
}
diff --git a/src/core/stdclist/src/clistopts.cpp b/src/core/stdclist/src/clistopts.cpp
index cf77a0d953..623787e931 100644
--- a/src/core/stdclist/src/clistopts.cpp
+++ b/src/core/stdclist/src/clistopts.cpp
@@ -199,6 +199,6 @@ int CListOptInit(WPARAM wParam, LPARAM)
odp.szTitle.a = LPGEN("Contact list");
odp.pfnDlgProc = DlgProcGenOpts;
odp.flags = ODPF_BOLDGROUPS;
- Options_AddPage(wParam, &odp);
+ g_plugin.addOptions(wParam, &odp);
return 0;
}
diff --git a/src/core/stdclist/src/cluiopts.cpp b/src/core/stdclist/src/cluiopts.cpp
index a2afe36280..f4607ada42 100644
--- a/src/core/stdclist/src/cluiopts.cpp
+++ b/src/core/stdclist/src/cluiopts.cpp
@@ -317,12 +317,12 @@ int CluiOptInit(WPARAM wParam, LPARAM)
odp.szGroup.a = LPGEN("Contact list");
odp.pfnDlgProc = DlgProcCluiOpts;
odp.flags = ODPF_BOLDGROUPS;
- Options_AddPage(wParam, &odp);
+ g_plugin.addOptions(wParam, &odp);
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_SBAR);
odp.szTitle.a = LPGEN("Status bar");
odp.pfnDlgProc = DlgProcSBarOpts;
odp.flags = ODPF_BOLDGROUPS;
- Options_AddPage(wParam, &odp);
+ g_plugin.addOptions(wParam, &odp);
return 0;
}
diff --git a/src/core/stdfile/src/fileopts.cpp b/src/core/stdfile/src/fileopts.cpp
index 3d75637686..88a320883d 100644
--- a/src/core/stdfile/src/fileopts.cpp
+++ b/src/core/stdfile/src/fileopts.cpp
@@ -232,6 +232,6 @@ int FileOptInitialise(WPARAM wParam, LPARAM)
odp.szGroup.a = LPGEN("Events");
odp.pfnDlgProc = DlgProcFileOpts;
odp.flags = ODPF_BOLDGROUPS;
- Options_AddPage(wParam, &odp);
+ g_plugin.addOptions(wParam, &odp);
return 0;
}
diff --git a/src/core/stdidle/src/options.cpp b/src/core/stdidle/src/options.cpp
index 8d34a2909a..4b9beab7ac 100644
--- a/src/core/stdidle/src/options.cpp
+++ b/src/core/stdidle/src/options.cpp
@@ -129,6 +129,6 @@ int IdleOptInit(WPARAM wParam, LPARAM)
odp.szTitle.a = LPGEN("Idle");
odp.flags = ODPF_BOLDGROUPS;
odp.pDialog = new COptionsDlg();
- Options_AddPage(wParam, &odp);
+ g_plugin.addOptions(wParam, &odp);
return 0;
}
diff --git a/src/core/stdmsg/src/chat_options.cpp b/src/core/stdmsg/src/chat_options.cpp
index 45880e5bfc..10b645db68 100644
--- a/src/core/stdmsg/src/chat_options.cpp
+++ b/src/core/stdmsg/src/chat_options.cpp
@@ -672,12 +672,12 @@ int ChatOptionsInitialize(WPARAM wParam)
odp.position = 910000000;
odp.szTab.a = LPGEN("General");
odp.pDialog = new COptMainDlg();
- Options_AddPage(wParam, &odp);
+ g_plugin.addOptions(wParam, &odp);
odp.position = 910000001;
odp.szTab.a = LPGEN("Chat log");
odp.pDialog = new COptLogDlg();
- Options_AddPage(wParam, &odp);
+ g_plugin.addOptions(wParam, &odp);
if (PopupInstalled) {
odp.position = 910000002;
@@ -685,7 +685,7 @@ int ChatOptionsInitialize(WPARAM wParam)
odp.szGroup.a = LPGEN("Popups");
odp.szTab.a = nullptr;
odp.pDialog = new COptPopupDlg();
- Options_AddPage(wParam, &odp);
+ g_plugin.addOptions(wParam, &odp);
}
return 0;
}
diff --git a/src/core/stdmsg/src/msgoptions.cpp b/src/core/stdmsg/src/msgoptions.cpp
index 204f34eaff..640841691d 100644
--- a/src/core/stdmsg/src/msgoptions.cpp
+++ b/src/core/stdmsg/src/msgoptions.cpp
@@ -586,19 +586,19 @@ static int OptInitialise(WPARAM wParam, LPARAM)
odp.szTitle.a = LPGEN("Message sessions");
odp.pDialog = new COptionMainDlg();
- Options_AddPage(wParam, &odp);
+ g_plugin.addOptions(wParam, &odp);
odp.szTab.a = LPGEN("Messaging log");
odp.pDialog = new COptionLogDlg();
- Options_AddPage(wParam, &odp);
+ g_plugin.addOptions(wParam, &odp);
odp.szTab.a = LPGEN("Typing notify");
odp.pDialog = new COptionTypingDlg();
- Options_AddPage(wParam, &odp);
+ g_plugin.addOptions(wParam, &odp);
odp.szTab.a = LPGEN("Tabs");
odp.pDialog = new COptionsTabDlg();
- Options_AddPage(wParam, &odp);
+ g_plugin.addOptions(wParam, &odp);
ChatOptionsInitialize(wParam);
return 0;
diff --git a/src/mir_app/src/CMPluginBase.cpp b/src/mir_app/src/CMPluginBase.cpp
index cc2400269d..d75e34ac09 100644
--- a/src/mir_app/src/CMPluginBase.cpp
+++ b/src/mir_app/src/CMPluginBase.cpp
@@ -97,9 +97,26 @@ void CMPluginBase::tryOpenLog()
/////////////////////////////////////////////////////////////////////////////////////////
+int CMPluginBase::addOptions(WPARAM wParam, struct OPTIONSDIALOGPAGE *odp)
+{
+ return ::Options_AddPage(wParam, odp, m_hLang);
+}
+
+void CMPluginBase::openOptions(const wchar_t *pszGroup, const wchar_t *pszPage, const wchar_t *pszTab)
+{
+ ::Options_Open(pszGroup, pszPage, pszTab, m_hLang);
+}
+
+void CMPluginBase::openOptionsPage(const wchar_t *pszGroup, const wchar_t *pszPage, const wchar_t *pszTab)
+{
+ ::Options_OpenPage(pszGroup, pszPage, pszTab, m_hLang);
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
int CMPluginBase::addUserInfo(WPARAM wParam, OPTIONSDIALOGPAGE *odp)
{
- odp->langId = hLangpack;
+ odp->langId = m_hLang;
return CallService("UserInfo/AddPage", wParam, (LPARAM)odp);
}
diff --git a/src/mir_app/src/FontOptions.cpp b/src/mir_app/src/FontOptions.cpp
index 823afc3955..a6b9bf0ad2 100644
--- a/src/mir_app/src/FontOptions.cpp
+++ b/src/mir_app/src/FontOptions.cpp
@@ -1191,7 +1191,7 @@ int OptInit(WPARAM wParam, LPARAM)
odp.szGroup.a = LPGEN("Customize");
odp.flags = ODPF_BOLDGROUPS;
odp.pfnDlgProc = DlgProcLogOptions;
- Options_AddPage(wParam, &odp);
+ g_plugin.addOptions(wParam, &odp);
return 0;
}
diff --git a/src/mir_app/src/contacts.cpp b/src/mir_app/src/contacts.cpp
index 90b9daad1d..0bd5ab73c9 100644
--- a/src/mir_app/src/contacts.cpp
+++ b/src/mir_app/src/contacts.cpp
@@ -358,7 +358,7 @@ static int ContactOptInit(WPARAM wParam, LPARAM)
odp.szTitle.a = LPGEN("Contact names");
odp.pDialog = new CContactOptsDlg();
odp.flags = ODPF_BOLDGROUPS;
- Options_AddPage(wParam, &odp);
+ g_plugin.addOptions(wParam, &odp);
return 0;
}
diff --git a/src/mir_app/src/ei_options.cpp b/src/mir_app/src/ei_options.cpp
index 35babf713b..02cec8571f 100644
--- a/src/mir_app/src/ei_options.cpp
+++ b/src/mir_app/src/ei_options.cpp
@@ -460,6 +460,6 @@ int InitOptionsCallback(WPARAM wParam, LPARAM)
odp.szTab.a = LPGEN("General");
odp.flags = ODPF_BOLDGROUPS;
odp.pDialog = new CExtraIconOptsDlg();
- Options_AddPage(wParam, &odp);
+ g_plugin.addOptions(wParam, &odp);
return 0;
}
diff --git a/src/mir_app/src/hotkey_opts.cpp b/src/mir_app/src/hotkey_opts.cpp
index d0d495fa8b..c9361e20ff 100644
--- a/src/mir_app/src/hotkey_opts.cpp
+++ b/src/mir_app/src/hotkey_opts.cpp
@@ -1030,6 +1030,6 @@ int HotkeyOptionsInit(WPARAM wParam, LPARAM)
odp.szTitle.a = LPGEN("Hotkeys");
odp.szGroup.a = LPGEN("Customize");
odp.pfnDlgProc = sttOptionsDlgProc;
- Options_AddPage(wParam, &odp);
+ g_plugin.addOptions(wParam, &odp);
return 0;
}
diff --git a/src/mir_app/src/ignore.cpp b/src/mir_app/src/ignore.cpp
index 4659f0ec99..1d2aa10cf5 100644
--- a/src/mir_app/src/ignore.cpp
+++ b/src/mir_app/src/ignore.cpp
@@ -334,7 +334,7 @@ static int IgnoreOptInitialise(WPARAM wParam, LPARAM)
odp.szGroup.a = LPGEN("Contacts");
odp.pfnDlgProc = DlgProcIgnoreOpts;
odp.flags = ODPF_BOLDGROUPS;
- Options_AddPage(wParam, &odp);
+ g_plugin.addOptions(wParam, &odp);
return 0;
}
diff --git a/src/mir_app/src/lpopts.cpp b/src/mir_app/src/lpopts.cpp
index f32e71481f..01916a1a16 100644
--- a/src/mir_app/src/lpopts.cpp
+++ b/src/mir_app/src/lpopts.cpp
@@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
static void CALLBACK OpenOptions(void*)
{
- Options_Open(L"Customize", L"Languages");
+ g_plugin.openOptions(L"Customize", L"Languages");
}
static void ReloadOptions(void *hWnd)
@@ -261,6 +261,6 @@ int LangpackOptionsInit(WPARAM wParam, LPARAM)
odp.szGroup.a = LPGEN("Customize");
odp.flags = ODPF_BOLDGROUPS;
odp.pDialog = new CLangpackDlg();
- Options_AddPage(wParam, &odp);
+ g_plugin.addOptions(wParam, &odp);
return 0;
}
diff --git a/src/mir_app/src/menu_options.cpp b/src/mir_app/src/menu_options.cpp
index 223d8b6e4a..59b5df0a74 100644
--- a/src/mir_app/src/menu_options.cpp
+++ b/src/mir_app/src/menu_options.cpp
@@ -531,7 +531,7 @@ int GenMenuOptInit(WPARAM wParam, LPARAM)
odp.szGroup.a = LPGEN("Customize");
odp.flags = ODPF_BOLDGROUPS;
odp.pDialog = new CGenMenuOptionsPage();
- Options_AddPage(wParam, &odp);
+ g_plugin.addOptions(wParam, &odp);
return ProtocolOrderOptInit(wParam, 0);
}
diff --git a/src/mir_app/src/meta_options.cpp b/src/mir_app/src/meta_options.cpp
index 51c27b9b21..f80d9c3019 100644
--- a/src/mir_app/src/meta_options.cpp
+++ b/src/mir_app/src/meta_options.cpp
@@ -124,6 +124,6 @@ int Meta_OptInit(WPARAM wParam, LPARAM)
odp.szTitle.a = LPGEN("Metacontacts");
odp.szGroup.a = LPGEN("Contacts");
odp.pDialog = new CMetaOptionsDlg();
- Options_AddPage(wParam, &odp);
+ g_plugin.addOptions(wParam, &odp);
return 0;
}
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def
index ed4f7da8f1..1fb62d69ed 100644
--- a/src/mir_app/src/mir_app.def
+++ b/src/mir_app/src/mir_app.def
@@ -596,3 +596,6 @@ GetPluginByLangId @624
GetInstByAddress @625
GetPluginByInstance @626
?addUserInfo@CMPluginBase@@QAEHIPAUOPTIONSDIALOGPAGE@@@Z @627 NONAME
+?addOptions@CMPluginBase@@QAEHIPAUOPTIONSDIALOGPAGE@@@Z @628 NONAME
+?openOptions@CMPluginBase@@QAEXPB_W00@Z @629 NONAME
+?openOptionsPage@CMPluginBase@@QAEXPB_W00@Z @630 NONAME
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def
index 9fae50382f..6d4ca9c44a 100644
--- a/src/mir_app/src/mir_app64.def
+++ b/src/mir_app/src/mir_app64.def
@@ -596,3 +596,6 @@ GetPluginByLangId @624
GetInstByAddress @625
GetPluginByInstance @626
?addUserInfo@CMPluginBase@@QEAAH_KPEAUOPTIONSDIALOGPAGE@@@Z @627 NONAME
+?addOptions@CMPluginBase@@QEAAH_KPEAUOPTIONSDIALOGPAGE@@@Z @628 NONAME
+?openOptions@CMPluginBase@@QEAAXPEB_W00@Z @629 NONAME
+?openOptionsPage@CMPluginBase@@QEAAXPEB_W00@Z @630 NONAME
diff --git a/src/mir_app/src/netlibopts.cpp b/src/mir_app/src/netlibopts.cpp
index 90edef4089..4c8db2c1ce 100644
--- a/src/mir_app/src/netlibopts.cpp
+++ b/src/mir_app/src/netlibopts.cpp
@@ -514,6 +514,6 @@ int NetlibOptInitialise(WPARAM wParam, LPARAM)
odp.szTitle.a = LPGEN("Network");
odp.pfnDlgProc = DlgProcNetlibOpts;
odp.flags = ODPF_BOLDGROUPS;
- Options_AddPage(wParam, &odp);
+ g_plugin.addOptions(wParam, &odp);
return 0;
}
diff --git a/src/mir_app/src/pluginopts.cpp b/src/mir_app/src/pluginopts.cpp
index 4ae83a6145..ee7bc7d146 100644
--- a/src/mir_app/src/pluginopts.cpp
+++ b/src/mir_app/src/pluginopts.cpp
@@ -545,7 +545,7 @@ int PluginOptionsInit(WPARAM wParam, LPARAM)
odp.position = 1300000000;
odp.szTitle.a = LPGEN("Plugins");
odp.flags = ODPF_BOLDGROUPS;
- Options_AddPage(wParam, &odp);
+ g_plugin.addOptions(wParam, &odp);
return 0;
}
diff --git a/src/mir_app/src/proto_opts.cpp b/src/mir_app/src/proto_opts.cpp
index be60116532..edd8114758 100644
--- a/src/mir_app/src/proto_opts.cpp
+++ b/src/mir_app/src/proto_opts.cpp
@@ -507,7 +507,7 @@ public:
pshn.hdr.hwndFrom = m_hwnd;
SendMessage(m_hwnd, WM_NOTIFY, 0, (LPARAM)&pshn);
- Options_Open(nullptr, L"Network");
+ g_plugin.openOptions(nullptr, L"Network");
}
void OnOptions(CCtrlButton*)
@@ -516,7 +516,7 @@ public:
if (idx != -1) {
PROTOACCOUNT *pa = (PROTOACCOUNT*)m_accList.GetItemData(idx);
if (pa->bOldProto)
- Options_Open(L"Network", _A2T(pa->szModuleName));
+ g_plugin.openOptions(L"Network", _A2T(pa->szModuleName));
else
OpenAccountOptions(pa);
}
diff --git a/src/mir_app/src/proto_order.cpp b/src/mir_app/src/proto_order.cpp
index 2e7f0095b3..997f2b2a7b 100644
--- a/src/mir_app/src/proto_order.cpp
+++ b/src/mir_app/src/proto_order.cpp
@@ -228,6 +228,6 @@ int ProtocolOrderOptInit(WPARAM wParam, LPARAM)
odp.szGroup.a = LPGEN("Contact list");
odp.pDialog = new CProtocolOrderOpts();
odp.flags = ODPF_BOLDGROUPS;
- Options_AddPage(wParam, &odp);
+ g_plugin.addOptions(wParam, &odp);
return 0;
}
diff --git a/src/mir_app/src/skin2opts.cpp b/src/mir_app/src/skin2opts.cpp
index f6479cd92a..3d70ba3952 100644
--- a/src/mir_app/src/skin2opts.cpp
+++ b/src/mir_app/src/skin2opts.cpp
@@ -940,6 +940,6 @@ int SkinOptionsInit(WPARAM wParam, LPARAM)
odp.position = -180000000;
odp.pDialog = new CIcoLibOptsDlg();
odp.szTitle.a = LPGEN("Icons");
- Options_AddPage(wParam, &odp);
+ g_plugin.addOptions(wParam, &odp);
return 0;
}
diff --git a/src/mir_app/src/sounds.cpp b/src/mir_app/src/sounds.cpp
index 198dd3cb95..88d95c2be1 100644
--- a/src/mir_app/src/sounds.cpp
+++ b/src/mir_app/src/sounds.cpp
@@ -441,7 +441,7 @@ static int SkinOptionsInit(WPARAM wParam, LPARAM)
odp.szTitle.a = LPGEN("Sounds");
odp.pfnDlgProc = DlgProcSoundOpts;
odp.flags = ODPF_BOLDGROUPS;
- Options_AddPage(wParam, &odp);
+ g_plugin.addOptions(wParam, &odp);
return 0;
}
diff --git a/src/mir_app/src/srmm_toolbar.cpp b/src/mir_app/src/srmm_toolbar.cpp
index 103c1e4020..9e5696d9b6 100644
--- a/src/mir_app/src/srmm_toolbar.cpp
+++ b/src/mir_app/src/srmm_toolbar.cpp
@@ -776,7 +776,7 @@ static int SrmmOptionsInit(WPARAM wParam, LPARAM)
odp.szTitle.a = LPGEN("Toolbar");
odp.flags = ODPF_BOLDGROUPS;
odp.pDialog = new CSrmmToolbarOptions();
- Options_AddPage(wParam, &odp);
+ g_plugin.addOptions(wParam, &odp);
return 0;
}
diff --git a/src/mir_app/src/visibility.cpp b/src/mir_app/src/visibility.cpp
index d12766845c..fee552ce8e 100644
--- a/src/mir_app/src/visibility.cpp
+++ b/src/mir_app/src/visibility.cpp
@@ -279,7 +279,7 @@ static int VisibilityOptInitialise(WPARAM wParam, LPARAM)
odp.szGroup.a = LPGEN("Contacts");
odp.pfnDlgProc = DlgProcVisibilityOpts;
odp.flags = ODPF_BOLDGROUPS;
- Options_AddPage(wParam, &odp);
+ g_plugin.addOptions(wParam, &odp);
return 0;
}