summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-10-15 20:17:32 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-10-15 20:17:32 +0300
commitbc730b337e64b6cf5c2a604e3e27487cf1e252b9 (patch)
treec05934a763ec43a9d6da6142fff381c1bc97b72c /plugins
parentbb8e49d3e4a63cceaa9a68ef62229d87c1792535 (diff)
fixes #3737 (tabSRMM: смайлы во встроенном журнале не заменяются на графические)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/TabSRMM/src/globals.cpp24
-rw-r--r--plugins/TabSRMM/src/globals.h15
2 files changed, 25 insertions, 14 deletions
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp
index e78f4aa48c..0af46fc489 100644
--- a/plugins/TabSRMM/src/globals.cpp
+++ b/plugins/TabSRMM/src/globals.cpp
@@ -89,13 +89,9 @@ void CGlobals::reloadSystemStartup()
//
// any initialation for 3rd party plugins must go here.
-void CGlobals::reloadSystemModulesChanged()
+void CGlobals::reloadModulesLoaded()
{
- // smiley add
- if (ServiceExists(MS_SMILEYADD_REPLACESMILEYS)) {
- PluginConfig.g_SmileyAddAvail = 1;
- HookEvent(ME_SMILEYADD_OPTIONSCHANGED, ::SmileyAddOptionsChanged);
- }
+ OnModuleLoaded(0, 0);
m_hwndClist = g_clistApi.hwndContactList;
@@ -210,6 +206,9 @@ void CGlobals::hookSystemEvents()
HookEvent(ME_AV_AVATARCHANGED, ::AvatarChanged);
HookEvent(ME_AV_MYAVATARCHANGED, ::MyAvatarChanged);
+
+ HookEvent(ME_SYSTEM_MODULELOAD, OnModuleLoaded);
+ HookEvent(ME_SYSTEM_MODULEUNLOAD, OnModuleLoaded);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -228,7 +227,7 @@ int CGlobals::ModulesLoaded(WPARAM, LPARAM)
::CreateImageList(true);
::CB_InitCustomButtons();
- PluginConfig.reloadSystemModulesChanged();
+ PluginConfig.reloadModulesLoaded();
::Chat_ModulesLoaded();
::BuildContainerMenu();
@@ -406,6 +405,17 @@ int CGlobals::PreshutdownSendRecv(WPARAM, LPARAM)
return 0;
}
+int CGlobals::OnModuleLoaded(WPARAM, LPARAM)
+{
+ // smiley add
+ if (ServiceExists(MS_SMILEYADD_REPLACESMILEYS)) {
+ if (!PluginConfig.g_SmileyAddAvail)
+ HookEvent(ME_SMILEYADD_OPTIONSCHANGED, ::SmileyAddOptionsChanged);
+ PluginConfig.g_SmileyAddAvail = true;
+ }
+ return 0;
+}
+
int CGlobals::OkToExit(WPARAM, LPARAM)
{
CWarning::destroyAll();
diff --git a/plugins/TabSRMM/src/globals.h b/plugins/TabSRMM/src/globals.h
index f60627770b..7d384a2aa2 100644
--- a/plugins/TabSRMM/src/globals.h
+++ b/plugins/TabSRMM/src/globals.h
@@ -56,7 +56,7 @@ public:
}
void reloadAdv();
void reloadSystemStartup();
- void reloadSystemModulesChanged();
+ void reloadModulesLoaded();
void reloadSettings(bool fReloadSkins = true);
void hookSystemEvents();
@@ -134,12 +134,13 @@ private:
static int m_exLine;
static bool m_exAllowContinue;
private:
- static int ModulesLoaded(WPARAM wParam, LPARAM lParam);
- static int DBSettingChanged(WPARAM wParam, LPARAM lParam);
- static int DBContactDeleted(WPARAM wParam, LPARAM lParam);
- static int PreshutdownSendRecv(WPARAM wParam, LPARAM lParam);
- static int MetaContactEvent(WPARAM wParam, LPARAM lParam);
- static int OkToExit(WPARAM wParam, LPARAM lParam);
+ static int ModulesLoaded(WPARAM, LPARAM);
+ static int DBSettingChanged(WPARAM, LPARAM);
+ static int DBContactDeleted(WPARAM, LPARAM);
+ static int PreshutdownSendRecv(WPARAM, LPARAM);
+ static int MetaContactEvent(WPARAM, LPARAM);
+ static int OkToExit(WPARAM, LPARAM);
+ static int OnModuleLoaded(WPARAM, LPARAM);
static void RestoreUnreadMessageAlerts(void);
};