diff options
author | George Hazan <ghazan@miranda.im> | 2023-03-09 16:25:07 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2023-03-09 16:25:07 +0300 |
commit | a7e8fb839f9e8eb92e7dc66b189faa93c37a9957 (patch) | |
tree | 0f10a9fbb38d068ebb7ff0a58d25cbb43654e4f3 | |
parent | c844602f5ce38621c6bd832155a43b0b8f8efc16 (diff) |
MS_HISTORY_EMPTY - added flag to wipe history automagically
-rw-r--r-- | include/m_history.h | 2 | ||||
-rw-r--r-- | src/mir_app/src/srmm_statusicon.cpp | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/include/m_history.h b/include/m_history.h index 2fb8c66cd6..402e019e8b 100644 --- a/include/m_history.h +++ b/include/m_history.h @@ -36,7 +36,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /////////////////////////////////////////////////////////////////////////////////////////
// Empties contact's history
// wParam = (MCONTACT)hContact
-// lParam = 0 (unused)
+// lParam = (BOOL)bForce - force history deletion, don't ask questions
// hContact can be NULL to wipe system history
#define MS_HISTORY_EMPTY "History/EmptyHistory"
diff --git a/src/mir_app/src/srmm_statusicon.cpp b/src/mir_app/src/srmm_statusicon.cpp index 12a613610e..580cf6d424 100644 --- a/src/mir_app/src/srmm_statusicon.cpp +++ b/src/mir_app/src/srmm_statusicon.cpp @@ -270,10 +270,11 @@ void KillModuleSrmmIcons(CMPluginBase *pPlugin) static HGENMENU hmiEmpty;
-static INT_PTR svcEmptyHistory(WPARAM hContact, LPARAM)
+static INT_PTR svcEmptyHistory(WPARAM hContact, LPARAM lParam)
{
- if (IDYES != MessageBoxW(nullptr, TranslateT("Are you sure to remove all events from history?"), L"Miranda", MB_YESNO | MB_ICONQUESTION))
- return 1;
+ 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())
|