summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/m_srmm_int.h5
-rw-r--r--plugins/Scriver/src/msgdialog.cpp2
-rw-r--r--plugins/Scriver/src/msgs.h1
-rw-r--r--plugins/Scriver/src/msgutils.cpp5
-rw-r--r--plugins/TabSRMM/src/msgdialog.cpp4
-rw-r--r--plugins/TabSRMM/src/msgs.h2
-rw-r--r--protocols/JabberG/src/jabber.cpp3
-rw-r--r--protocols/JabberG/src/jabber_file.cpp17
-rw-r--r--protocols/JabberG/src/stdafx.h2
-rw-r--r--protocols/Telegram/src/avatars.cpp2
-rw-r--r--protocols/Telegram/src/main.cpp2
-rw-r--r--protocols/Telegram/src/stdafx.h2
-rw-r--r--src/core/stdmsg/src/msgs.h2
-rw-r--r--src/mir_app/mir_app.vcxproj1
-rw-r--r--src/mir_app/mir_app.vcxproj.filters3
-rw-r--r--src/mir_app/src/srmm_base.cpp20
-rw-r--r--src/mir_app/src/srmm_main.cpp122
-rw-r--r--src/mir_app/src/srmm_statusicon.cpp85
-rw-r--r--src/mir_app/src/srmm_util.cpp2
19 files changed, 173 insertions, 109 deletions
diff --git a/include/m_srmm_int.h b/include/m_srmm_int.h
index b2813d9a0b..2ed23a5bf7 100644
--- a/include/m_srmm_int.h
+++ b/include/m_srmm_int.h
@@ -237,6 +237,7 @@ class MIR_APP_EXPORT CSrmmBaseDialog : public CDlgBase
CSrmmBaseDialog &operator=(const CSrmmBaseDialog &) = delete;
void OnNickListTimer(CTimer *);
+ void OnRedrawTimer(CTimer *);
protected:
CSrmmBaseDialog(CMPluginBase &pPlugin, int idDialog, struct SESSION_INFO *si = nullptr);
@@ -294,10 +295,11 @@ public:
bool m_bFGSet, m_bBGSet;
bool m_bInMenu;
COLORREF m_iFG, m_iBG;
- CTimer timerFlash, timerType, timerNickList;
+ CTimer timerFlash, timerType, timerNickList, timerRedraw;
void ClearLog();
void RedrawLog();
+ void ScheduleRedrawLog();
void ShowColorChooser(int iCtrlId);
void UpdateNickList(void);
@@ -308,6 +310,7 @@ public:
virtual bool GetFirstEvent() PURE;
virtual bool IsActive() const PURE;
virtual void LoadSettings() PURE;
+ virtual void RemakeLog() PURE;
virtual void SetStatusText(const wchar_t *, HICON) {}
virtual void ShowFilterMenu() {}
virtual void UpdateFilterButton();
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp
index c69bf8a266..c9d6c1869e 100644
--- a/plugins/Scriver/src/msgdialog.cpp
+++ b/plugins/Scriver/src/msgdialog.cpp
@@ -1077,7 +1077,7 @@ INT_PTR CMsgDialog::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
case DM_REMAKELOG:
if (wParam == 0 || wParam == m_hContact)
- m_pLog->LogEvents(m_hDbEventFirst, -1, 0);
+ RemakeLog();
InvalidateRect(m_pLog->GetHwnd(), nullptr, FALSE);
break;
diff --git a/plugins/Scriver/src/msgs.h b/plugins/Scriver/src/msgs.h
index 936da01f5d..c6422300d7 100644
--- a/plugins/Scriver/src/msgs.h
+++ b/plugins/Scriver/src/msgs.h
@@ -133,6 +133,7 @@ public:
void EventAdded(MEVENT, const DB::EventInfo &dbei) override;
bool GetFirstEvent() override;
void LoadSettings() override;
+ void RemakeLog() override;
void SetStatusText(const wchar_t *, HICON) override;
void ShowFilterMenu() override;
void UpdateFilterButton() override;
diff --git a/plugins/Scriver/src/msgutils.cpp b/plugins/Scriver/src/msgutils.cpp
index e0e8cd0325..bb9da0e619 100644
--- a/plugins/Scriver/src/msgutils.cpp
+++ b/plugins/Scriver/src/msgutils.cpp
@@ -344,7 +344,10 @@ void CMsgDialog::Reattach(HWND hwndContainer)
}
}
-/////////////////////////////////////////////////////////////////////////////////////////
+void CMsgDialog::RemakeLog()
+{
+ m_pLog->LogEvents(m_hDbEventFirst, -1, 0);
+}
void CMsgDialog::SetDialogToType()
{
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp
index 02b5eb8de5..c89031d2bd 100644
--- a/plugins/TabSRMM/src/msgdialog.cpp
+++ b/plugins/TabSRMM/src/msgdialog.cpp
@@ -312,7 +312,7 @@ LRESULT CALLBACK SplitterSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
CMsgDialog::CMsgDialog(int iDlgId, MCONTACT hContact) :
CSuper(g_plugin, iDlgId),
m_pPanel(this),
- timerAwayMsg(this, 4),
+ timerAwayMsg(this, 100),
m_btnAdd(this, IDC_ADD),
m_btnQuote(this, IDC_QUOTE),
m_btnCancelAdd(this, IDC_CANCELADD)
@@ -329,7 +329,7 @@ CMsgDialog::CMsgDialog(int iDlgId, MCONTACT hContact) :
CMsgDialog::CMsgDialog(SESSION_INFO *si) :
CSuper(g_plugin, IDD_CHANNEL, si),
m_pPanel(this),
- timerAwayMsg(this, 4),
+ timerAwayMsg(this, 100),
m_btnAdd(this, IDC_ADD),
m_btnQuote(this, IDC_QUOTE),
m_btnCancelAdd(this, IDC_CANCELADD)
diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h
index 9305fd8ace..1bd350f520 100644
--- a/plugins/TabSRMM/src/msgs.h
+++ b/plugins/TabSRMM/src/msgs.h
@@ -597,6 +597,7 @@ public:
bool GetFirstEvent() override;
bool IsActive() const override;
void LoadSettings() override;
+ void RemakeLog() override;
void SetStatusText(const wchar_t *, HICON) override;
void ShowFilterMenu() override;
void UpdateFilterButton() override;
@@ -647,7 +648,6 @@ public:
void LimitMessageText(int iLen);
int LoadLocalFlags(void);
void NotifyDeliveryFailure(void) const;
- void RemakeLog(void);
void SaveSplitter(void);
void SelectContainer(void);
void SetDialogToType(void);
diff --git a/protocols/JabberG/src/jabber.cpp b/protocols/JabberG/src/jabber.cpp
index 1c13d97a87..e19f7bc264 100644
--- a/protocols/JabberG/src/jabber.cpp
+++ b/protocols/JabberG/src/jabber.cpp
@@ -36,7 +36,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#pragma comment(lib, "Secur32.lib")
HMODULE hMsftedit;
-HANDLE g_hevEventEdited;
CMPlugin g_plugin;
@@ -127,8 +126,6 @@ int CMPlugin::Load()
bPlatform = false;
#endif
- g_hevEventEdited = CreateHookableEvent(ME_DB_EVENT_EDITED);
-
Miranda_GetVersionText(szCoreVersion, _countof(szCoreVersion));
CallService(MS_UTILS_GETCOUNTRYLIST, (WPARAM)&g_cbCountries, (LPARAM)&g_countries);
diff --git a/protocols/JabberG/src/jabber_file.cpp b/protocols/JabberG/src/jabber_file.cpp
index aea0b617b1..863874a011 100644
--- a/protocols/JabberG/src/jabber_file.cpp
+++ b/protocols/JabberG/src/jabber_file.cpp
@@ -31,9 +31,9 @@ INT_PTR __cdecl CJabberProto::OnOfflineFile(WPARAM param, LPARAM)
return 0;
}
-void __cdecl CJabberProto::OfflineFileThread(OFDTHREAD *param)
+void __cdecl CJabberProto::OfflineFileThread(OFDTHREAD *ofd)
{
- DB::EventInfo dbei(param->hDbEvent);
+ DB::EventInfo dbei(ofd->hDbEvent);
if (m_bJabberOnline && dbei && !strcmp(dbei.szModule, m_szModuleName) && dbei.eventType == EVENTTYPE_FILE) {
DB::FILE_BLOB blob(dbei);
if (const char *url = blob.getUrl()) {
@@ -49,7 +49,7 @@ void __cdecl CJabberProto::OfflineFileThread(OFDTHREAD *param)
}
else if (ret != 2 || (strcmp(protocol, "https") && strcmp(protocol, "http"))) {
debugLogA("Wrong url");
- delete param;
+ delete ofd;
return;
}
@@ -63,7 +63,7 @@ void __cdecl CJabberProto::OfflineFileThread(OFDTHREAD *param)
// download the page
NLHR_PTR nlhrReply(Netlib_HttpTransaction(m_hNetlibUser, &nlhr));
if (nlhrReply && nlhrReply->resultCode == 200) {
- FILE *f = _wfopen(param->wszPath, L"wb");
+ FILE *f = _wfopen(ofd->wszPath, L"wb");
size_t written = 0;
if (f) {
if (encrypted) {
@@ -96,17 +96,16 @@ void __cdecl CJabberProto::OfflineFileThread(OFDTHREAD *param)
if (written) {
DBVARIANT dbv = { DBVT_DWORD };
dbv.dVal = (DWORD)written;
- db_event_setJson(param->hDbEvent, "ft", &dbv);
- db_event_setJson(param->hDbEvent, "fs", &dbv);
- NotifyEventHooks(g_hevEventEdited, 0, param->hDbEvent);
+ db_event_setJson(ofd->hDbEvent, "ft", &dbv);
+ db_event_setJson(ofd->hDbEvent, "fs", &dbv);
- param->Finish();
+ ofd->Finish();
}
}
}
}
- delete param;
+ delete ofd;
}
void CJabberProto::OnCreateOfflineFile(DB::FILE_BLOB &blob, void *pHandle)
diff --git a/protocols/JabberG/src/stdafx.h b/protocols/JabberG/src/stdafx.h
index a96311c6f0..bc16368761 100644
--- a/protocols/JabberG/src/stdafx.h
+++ b/protocols/JabberG/src/stdafx.h
@@ -508,7 +508,7 @@ extern unsigned int g_nTempFileId;
extern int g_cbCountries;
extern struct CountryListEntry* g_countries;
-extern HANDLE hExtListInit, hDiscoInfoResult, g_hevEventEdited;
+extern HANDLE hExtListInit, hDiscoInfoResult;
/*******************************************************************
* Function declarations
diff --git a/protocols/Telegram/src/avatars.cpp b/protocols/Telegram/src/avatars.cpp
index 4a08866989..48236fd9e7 100644
--- a/protocols/Telegram/src/avatars.cpp
+++ b/protocols/Telegram/src/avatars.cpp
@@ -204,8 +204,6 @@ void CTelegramProto::ProcessFile(TD::updateFile *pObj)
F->ofd->ResetFileName(wszFullName); // resulting ofd->wszPath may differ from wszFullName
MoveFileW(wszExistingFile, F->ofd->wszPath);
- NotifyEventHooks(g_plugin.m_hevEventEdited, 0, F->ofd->hDbEvent);
-
F->ofd->Finish();
}
diff --git a/protocols/Telegram/src/main.cpp b/protocols/Telegram/src/main.cpp
index 9ed452ad48..32206a9b6c 100644
--- a/protocols/Telegram/src/main.cpp
+++ b/protocols/Telegram/src/main.cpp
@@ -49,7 +49,5 @@ int CMPlugin::Load()
registerIcon("Protocols/Telegram", iconList, "tg");
m_hIcon = ExtraIcon_RegisterIcolib("tg_premium", LPGEN("Telegram Premium user"), getIconHandle(IDI_PREMIUM));
-
- m_hevEventEdited = CreateHookableEvent(ME_DB_EVENT_EDITED);
return 0;
}
diff --git a/protocols/Telegram/src/stdafx.h b/protocols/Telegram/src/stdafx.h
index dad748c7cd..f6e7100f53 100644
--- a/protocols/Telegram/src/stdafx.h
+++ b/protocols/Telegram/src/stdafx.h
@@ -49,7 +49,7 @@ struct CMPlugin : public ACCPROTOPLUGIN<CTelegramProto>
{
CMPlugin();
- HANDLE m_hIcon, m_hevEventEdited;
+ HANDLE m_hIcon;
int Load() override;
};
diff --git a/src/core/stdmsg/src/msgs.h b/src/core/stdmsg/src/msgs.h
index 79140be1b0..51662e669d 100644
--- a/src/core/stdmsg/src/msgs.h
+++ b/src/core/stdmsg/src/msgs.h
@@ -96,7 +96,6 @@ public:
LRESULT WndProc_Nicklist(UINT msg, WPARAM wParam, LPARAM lParam) override;
void OnActivate();
- void RemakeLog();
void UpdateAvatar();
void UserTyping(int nSecs);
@@ -143,6 +142,7 @@ public:
bool GetFirstEvent() override;
bool IsActive() const override;
void LoadSettings() override;
+ void RemakeLog() override;
void SetStatusText(const wchar_t *, HICON) override;
void ShowFilterMenu() override;
void UpdateFilterButton() override;
diff --git a/src/mir_app/mir_app.vcxproj b/src/mir_app/mir_app.vcxproj
index c0855b8ea5..fa8e33adfb 100644
--- a/src/mir_app/mir_app.vcxproj
+++ b/src/mir_app/mir_app.vcxproj
@@ -160,6 +160,7 @@
<ClCompile Include="src\srmm_log.cpp" />
<ClCompile Include="src\srmm_log_hpp.cpp" />
<ClCompile Include="src\srmm_log_rtf.cpp" />
+ <ClCompile Include="src\srmm_main.cpp" />
<ClCompile Include="src\srmm_statusicon.cpp" />
<ClCompile Include="src\srmm_toolbar.cpp" />
<ClCompile Include="src\srmm_util.cpp" />
diff --git a/src/mir_app/mir_app.vcxproj.filters b/src/mir_app/mir_app.vcxproj.filters
index 69928a983f..bcc2243516 100644
--- a/src/mir_app/mir_app.vcxproj.filters
+++ b/src/mir_app/mir_app.vcxproj.filters
@@ -428,6 +428,9 @@
<ClCompile Include="src\fileutils.cpp">
<Filter>Source Files\File</Filter>
</ClCompile>
+ <ClCompile Include="src\srmm_main.cpp">
+ <Filter>Source Files\SRMM</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\filter.h">
diff --git a/src/mir_app/src/srmm_base.cpp b/src/mir_app/src/srmm_base.cpp
index 1fe703958a..34f57f0b16 100644
--- a/src/mir_app/src/srmm_base.cpp
+++ b/src/mir_app/src/srmm_base.cpp
@@ -31,6 +31,7 @@ CSrmmBaseDialog::CSrmmBaseDialog(CMPluginBase &pPlugin, int idDialog, SESSION_IN
timerFlash(this, 1),
timerType(this, 2),
timerNickList(this, 3),
+ timerRedraw(this, 4),
m_message(this, IDC_SRMM_MESSAGE),
m_nickList(this, IDC_SRMM_NICKLIST),
@@ -61,6 +62,8 @@ CSrmmBaseDialog::CSrmmBaseDialog(CMPluginBase &pPlugin, int idDialog, SESSION_IN
m_nickList.OnDblClick = Callback(this, &CSrmmBaseDialog::onDblClick_List);
+ timerRedraw.OnEvent = Callback(this, &CSrmmBaseDialog::OnRedrawTimer);
+
if (si) {
m_hContact = si->hContact;
@@ -652,6 +655,23 @@ void CSrmmBaseDialog::RedrawLog()
ClearLog();
}
+void CSrmmBaseDialog::OnRedrawTimer(CTimer *pTimer)
+{
+ pTimer->Stop();
+
+ if (isChat())
+ RedrawLog();
+ else
+ RemakeLog();
+}
+
+void CSrmmBaseDialog::ScheduleRedrawLog()
+{
+ timerRedraw.Start(100);
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
void CSrmmBaseDialog::UpdateChatLog()
{
if (!m_si->pMI->bDatabase || m_si->bHistoryInit)
diff --git a/src/mir_app/src/srmm_main.cpp b/src/mir_app/src/srmm_main.cpp
new file mode 100644
index 0000000000..9de2c1bdb0
--- /dev/null
+++ b/src/mir_app/src/srmm_main.cpp
@@ -0,0 +1,122 @@
+/*
+
+Copyright (C) 2012-23 Miranda NG team (https://miranda-ng.org)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation version 2
+of the License.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "stdafx.h"
+
+HCURSOR g_hCurHyperlinkHand;
+HANDLE hHookIconsChanged, hHookIconPressedEvt, hHookSrmmEvent;
+
+static HANDLE hHookEmptyHistory;
+static HGENMENU hmiEmpty;
+
+void LoadSrmmToolbarModule();
+void UnloadSrmmToolbarModule();
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// Empty history service for main menu
+
+static INT_PTR svcEmptyHistory(WPARAM hContact, LPARAM lParam)
+{
+ if (NotifyEventHooks(hHookEmptyHistory))
+ return 2;
+
+ if (lParam == 0)
+ if (IDYES != MessageBoxW(nullptr, TranslateT("Are you sure to remove all events from history?"), L"Miranda", MB_YESNO | MB_ICONQUESTION))
+ return 1;
+
+ DB::ECPTR pCursor(DB::Events(hContact));
+ while (pCursor.FetchNext())
+ pCursor.DeleteEvent();
+ return 0;
+}
+
+static int OnPrebuildContactMenu(WPARAM hContact, LPARAM)
+{
+ Menu_ShowItem(hmiEmpty, db_event_first(hContact) != 0);
+ return 0;
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// Built-in hook to redraw RTF-based event logs on event's change/deletion
+
+static int OnRedrawLog(WPARAM hContact, LPARAM)
+{
+ if (auto *pDlg = Srmm_FindDialog(hContact))
+ pDlg->ScheduleRedrawLog();
+
+ if (db_mc_isSub(hContact))
+ if (auto *pDlg = Srmm_FindDialog(db_mc_getMeta(hContact)))
+ pDlg->ScheduleRedrawLog();
+
+ return 0;
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
+void SrmmModulesLoaded()
+{
+ // menu item
+ CMenuItem mi(&g_plugin);
+ SET_UID(mi, 0x0d4306aa, 0xe31e, 0x46ee, 0x89, 0x88, 0x3a, 0x2e, 0x05, 0xa6, 0xf3, 0xbc);
+ mi.pszService = MS_HISTORY_EMPTY;
+ mi.name.a = LPGEN("Empty history");
+ mi.position = 1000090001;
+ mi.hIcon = Skin_LoadIcon(SKINICON_OTHER_DELETE);
+ hmiEmpty = Menu_AddContactMenuItem(&mi);
+
+ // create menu item in main menu for empty system history
+ SET_UID(mi, 0x633AD23C, 0x24B5, 0x4914, 0xB2, 0x40, 0xAD, 0x9F, 0xAC, 0xB5, 0x64, 0xED);
+ mi.position = 500060002;
+ mi.name.a = LPGEN("Empty system history");
+ mi.pszService = MS_HISTORY_EMPTY;
+ mi.hIcon = Skin_LoadIcon(SKINICON_OTHER_DELETE);
+ Menu_AddMainMenuItem(&mi);
+
+ HookEvent(ME_CLIST_PREBUILDCONTACTMENU, OnPrebuildContactMenu);
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
+int LoadSrmmModule()
+{
+ g_hCurHyperlinkHand = LoadCursor(nullptr, IDC_HAND);
+
+ LoadSrmmToolbarModule();
+
+ CreateServiceFunction(MS_HISTORY_EMPTY, svcEmptyHistory);
+ hHookEmptyHistory = CreateHookableEvent(ME_HISTORY_EMPTY);
+
+ hHookSrmmEvent = CreateHookableEvent(ME_MSG_WINDOWEVENT);
+ hHookIconsChanged = CreateHookableEvent(ME_MSG_ICONSCHANGED);
+ hHookIconPressedEvt = CreateHookableEvent(ME_MSG_ICONPRESSED);
+
+ HookEvent(ME_DB_EVENT_EDITED, OnRedrawLog);
+ HookEvent(ME_DB_EVENT_DELETED, OnRedrawLog);
+ return 0;
+}
+
+void UnloadSrmmModule()
+{
+ DestroyHookableEvent(hHookIconsChanged);
+ DestroyHookableEvent(hHookSrmmEvent);
+ DestroyHookableEvent(hHookIconPressedEvt);
+
+ DestroyCursor(g_hCurHyperlinkHand);
+
+ UnloadSrmmToolbarModule();
+}
diff --git a/src/mir_app/src/srmm_statusicon.cpp b/src/mir_app/src/srmm_statusicon.cpp
index 94de15aa2f..508a9a4ba8 100644
--- a/src/mir_app/src/srmm_statusicon.cpp
+++ b/src/mir_app/src/srmm_statusicon.cpp
@@ -23,15 +23,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
-HCURSOR g_hCurHyperlinkHand;
-HANDLE hHookSrmmEvent;
-
-static HANDLE hHookIconsChanged, hHookIconPressedEvt, hHookEmptyHistory;
+extern HANDLE hHookIconsChanged, hHookIconPressedEvt, hHookEmptyHistory;
static mir_cs csIcons;
-void LoadSrmmToolbarModule();
-void UnloadSrmmToolbarModule();
-
void SafeDestroyIcon(HICON hIcon)
{
if (hIcon != nullptr)
@@ -265,80 +259,3 @@ void KillModuleSrmmIcons(CMPluginBase *pPlugin)
if (it->pPlugin == pPlugin)
arIcons.removeItem(&it);
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-static HGENMENU hmiEmpty;
-
-static INT_PTR svcEmptyHistory(WPARAM hContact, LPARAM lParam)
-{
- if (NotifyEventHooks(hHookEmptyHistory))
- return 2;
-
- if (lParam == 0)
- if (IDYES != MessageBoxW(nullptr, TranslateT("Are you sure to remove all events from history?"), L"Miranda", MB_YESNO | MB_ICONQUESTION))
- return 1;
-
- DB::ECPTR pCursor(DB::Events(hContact));
- while (pCursor.FetchNext())
- pCursor.DeleteEvent();
- return 0;
-}
-
-static int OnPrebuildContactMenu(WPARAM hContact, LPARAM)
-{
- Menu_ShowItem(hmiEmpty, db_event_first(hContact) != 0);
- return 0;
-}
-
-void SrmmModulesLoaded()
-{
- // menu item
- CMenuItem mi(&g_plugin);
- SET_UID(mi, 0x0d4306aa, 0xe31e, 0x46ee, 0x89, 0x88, 0x3a, 0x2e, 0x05, 0xa6, 0xf3, 0xbc);
- mi.pszService = MS_HISTORY_EMPTY;
- mi.name.a = LPGEN("Empty history");
- mi.position = 1000090001;
- mi.hIcon = Skin_LoadIcon(SKINICON_OTHER_DELETE);
- hmiEmpty = Menu_AddContactMenuItem(&mi);
-
- // create menu item in main menu for empty system history
- SET_UID(mi, 0x633AD23C, 0x24B5, 0x4914, 0xB2, 0x40, 0xAD, 0x9F, 0xAC, 0xB5, 0x64, 0xED);
- mi.position = 500060002;
- mi.name.a = LPGEN("Empty system history");
- mi.pszService = MS_HISTORY_EMPTY;
- mi.hIcon = Skin_LoadIcon(SKINICON_OTHER_DELETE);
- Menu_AddMainMenuItem(&mi);
-
- HookEvent(ME_CLIST_PREBUILDCONTACTMENU, OnPrebuildContactMenu);
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-int LoadSrmmModule()
-{
- g_hCurHyperlinkHand = LoadCursor(nullptr, IDC_HAND);
-
- LoadSrmmToolbarModule();
-
- CreateServiceFunction(MS_HISTORY_EMPTY, svcEmptyHistory);
- hHookEmptyHistory = CreateHookableEvent(ME_HISTORY_EMPTY);
-
- hHookSrmmEvent = CreateHookableEvent(ME_MSG_WINDOWEVENT);
- hHookIconsChanged = CreateHookableEvent(ME_MSG_ICONSCHANGED);
- hHookIconPressedEvt = CreateHookableEvent(ME_MSG_ICONPRESSED);
- return 0;
-}
-
-void UnloadSrmmModule()
-{
- arIcons.destroy();
-
- DestroyHookableEvent(hHookIconsChanged);
- DestroyHookableEvent(hHookSrmmEvent);
- DestroyHookableEvent(hHookIconPressedEvt);
-
- DestroyCursor(g_hCurHyperlinkHand);
-
- UnloadSrmmToolbarModule();
-}
diff --git a/src/mir_app/src/srmm_util.cpp b/src/mir_app/src/srmm_util.cpp
index bd2897bef1..955eafa6c0 100644
--- a/src/mir_app/src/srmm_util.cpp
+++ b/src/mir_app/src/srmm_util.cpp
@@ -120,6 +120,8 @@ void OFDTHREAD::Finish()
dbv.pwszVal = wszPath.GetBuffer();
db_event_setJson(hDbEvent, "lf", &dbv);
+ NotifyEventHooks(g_hevEventEdited, db_event_getContact(hDbEvent), hDbEvent);
+
if (bOpen)
ShellExecuteW(nullptr, L"open", wszPath, nullptr, nullptr, SW_SHOWDEFAULT);
}