summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-11-12 20:12:53 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-11-12 20:12:53 +0300
commit488214ac8af0c4aeb1a5c1d8fd48368daaf4c4c7 (patch)
tree96b0db981b4f5054f24d484902b597ba7da1c1a5 /plugins/TabSRMM/src
parent9b35784c5042984fbb60785f0a4a41a64af545f6 (diff)
end of ME_OPT_INITIALISE related zoo in another plugins
Diffstat (limited to 'plugins/TabSRMM/src')
-rw-r--r--plugins/TabSRMM/src/functions.h1
-rw-r--r--plugins/TabSRMM/src/msgoptions.cpp130
-rw-r--r--plugins/TabSRMM/src/msgs.cpp3
3 files changed, 65 insertions, 69 deletions
diff --git a/plugins/TabSRMM/src/functions.h b/plugins/TabSRMM/src/functions.h
index 5b1c88200d..a4877a57b9 100644
--- a/plugins/TabSRMM/src/functions.h
+++ b/plugins/TabSRMM/src/functions.h
@@ -114,7 +114,6 @@ void TSAPI LoadIconTheme();
int DbEventIsForMsgWindow(DBEVENTINFO *dbei);
-int TSAPI InitOptions(void);
int TSAPI DbEventIsShown(DBEVENTINFO *dbei);
// custom tab control
diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp
index 8730257d47..2170dc0884 100644
--- a/plugins/TabSRMM/src/msgoptions.cpp
+++ b/plugins/TabSRMM/src/msgoptions.cpp
@@ -1292,67 +1292,6 @@ static fontSettings[MSGDLGFONTCOUNT + 1];
#define SRFONTSETTINGMODULE FONTMODULE
-static int OptInitialise(WPARAM wParam, LPARAM lParam)
-{
- if (PluginConfig.g_bPopupAvail)
- TN_OptionsInitialize(wParam, lParam);
-
- // message sessions' options
- OPTIONSDIALOGPAGE odpnew = {};
- odpnew.position = 910000000;
- odpnew.flags = ODPF_BOLDGROUPS;
- odpnew.szTitle.a = LPGEN("Message sessions");
-
- odpnew.szTab.a = LPGEN("General");
- odpnew.pDialog = new COptMainDlg();
- g_plugin.addOptions(wParam, &odpnew);
-
- odpnew.szTab.a = LPGEN("Tabs and layout");
- odpnew.pDialog = new COptTabbedDlg();
- g_plugin.addOptions(wParam, &odpnew);
-
- odpnew.szTab.a = LPGEN("Containers");
- odpnew.pDialog = new COptContainersDlg();
- g_plugin.addOptions(wParam, &odpnew);
-
- odpnew.szTab.a = LPGEN("Message log");
- odpnew.pDialog = new COptLogDlg();
- g_plugin.addOptions(wParam, &odpnew);
-
- odpnew.szTab.a = LPGEN("Advanced tweaks");
- odpnew.pDialog = new COptAdvancedDlg();
- g_plugin.addOptions(wParam, &odpnew);
-
- odpnew.szGroup.a = LPGEN("Message sessions");
- odpnew.szTitle.a = LPGEN("Typing notify");
- odpnew.pDialog = new COptTypingDlg();
- g_plugin.addOptions(wParam, &odpnew);
-
- // skin options
- OPTIONSDIALOGPAGE odp = {};
- odp.flags = ODPF_BOLDGROUPS;
- odp.position = 910000000;
- odp.szGroup.a = LPGEN("Skins");
- odp.szTitle.a = LPGEN("Message window");
-
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_SKIN);
- odp.szTab.a = LPGEN("Load and apply");
- odp.pfnDlgProc = DlgProcSkinOpts;
- g_plugin.addOptions(wParam, &odp);
-
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_TABCONFIG);
- odp.szTab.a = LPGEN("Window layout tweaks");
- odp.pfnDlgProc = DlgProcTabConfig;
- g_plugin.addOptions(wParam, &odp);
-
- // popup options
- Popup_Options(wParam);
-
- // group chats
- Chat_Options(wParam);
- return 0;
-}
-
enum
{
CBVT_NONE,
@@ -1463,12 +1402,6 @@ void OptCheckBox_Save(HWND hwnd, OptCheckBox *cb)
}
}
-int TSAPI InitOptions(void)
-{
- HookEvent(ME_OPT_INITIALISE, OptInitialise);
- return 0;
-}
-
INT_PTR CALLBACK DlgProcSetupStatusModes(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
DWORD dwStatusMask = GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
@@ -1527,3 +1460,66 @@ INT_PTR CALLBACK DlgProcSetupStatusModes(HWND hwndDlg, UINT msg, WPARAM wParam,
}
return FALSE;
}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
+int OptInitialise(WPARAM wParam, LPARAM lParam)
+{
+ if (PluginConfig.g_bPopupAvail)
+ TN_OptionsInitialize(wParam, lParam);
+
+ // message sessions' options
+ OPTIONSDIALOGPAGE odpnew = {};
+ odpnew.position = 910000000;
+ odpnew.flags = ODPF_BOLDGROUPS;
+ odpnew.szTitle.a = LPGEN("Message sessions");
+
+ odpnew.szTab.a = LPGEN("General");
+ odpnew.pDialog = new COptMainDlg();
+ g_plugin.addOptions(wParam, &odpnew);
+
+ odpnew.szTab.a = LPGEN("Tabs and layout");
+ odpnew.pDialog = new COptTabbedDlg();
+ g_plugin.addOptions(wParam, &odpnew);
+
+ odpnew.szTab.a = LPGEN("Containers");
+ odpnew.pDialog = new COptContainersDlg();
+ g_plugin.addOptions(wParam, &odpnew);
+
+ odpnew.szTab.a = LPGEN("Message log");
+ odpnew.pDialog = new COptLogDlg();
+ g_plugin.addOptions(wParam, &odpnew);
+
+ odpnew.szTab.a = LPGEN("Advanced tweaks");
+ odpnew.pDialog = new COptAdvancedDlg();
+ g_plugin.addOptions(wParam, &odpnew);
+
+ odpnew.szGroup.a = LPGEN("Message sessions");
+ odpnew.szTitle.a = LPGEN("Typing notify");
+ odpnew.pDialog = new COptTypingDlg();
+ g_plugin.addOptions(wParam, &odpnew);
+
+ // skin options
+ OPTIONSDIALOGPAGE odp = {};
+ odp.flags = ODPF_BOLDGROUPS;
+ odp.position = 910000000;
+ odp.szGroup.a = LPGEN("Skins");
+ odp.szTitle.a = LPGEN("Message window");
+
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_SKIN);
+ odp.szTab.a = LPGEN("Load and apply");
+ odp.pfnDlgProc = DlgProcSkinOpts;
+ g_plugin.addOptions(wParam, &odp);
+
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_TABCONFIG);
+ odp.szTab.a = LPGEN("Window layout tweaks");
+ odp.pfnDlgProc = DlgProcTabConfig;
+ g_plugin.addOptions(wParam, &odp);
+
+ // popup options
+ Popup_Options(wParam);
+
+ // group chats
+ Chat_Options(wParam);
+ return 0;
+}
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp
index 2c2374ab9c..b6261b6165 100644
--- a/plugins/TabSRMM/src/msgs.cpp
+++ b/plugins/TabSRMM/src/msgs.cpp
@@ -37,6 +37,7 @@ HMODULE g_hIconDLL = nullptr, g_hMsftedit;
static void UnloadIcons();
+int OptInitialise(WPARAM wParam, LPARAM lParam);
void Chat_AddIcons();
/////////////////////////////////////////////////////////////////////////////////////////
@@ -1051,7 +1052,7 @@ int LoadSendRecvMessageModule(void)
Skin = new CSkin;
sendLater = new CSendLater;
- InitOptions();
+ HookEvent(ME_OPT_INITIALISE, OptInitialise);
InitAPI();