diff options
author | George Hazan <george.hazan@gmail.com> | 2024-02-26 12:00:20 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-02-26 12:00:24 +0300 |
commit | 84f26abba25b68ca38f829abe44716f8f663939a (patch) | |
tree | 12fdf360c9af80f1b4d8bf7917ba5799c89fcff3 /plugins | |
parent | b3bcb31b9d7677c5c776414a9c2c9267f603c141 (diff) |
fixes #4228 (tabSRMM: add ability to hide a warning about unsent messages in the queue)
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/TabSRMM/src/container.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdialog.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/sendqueue.cpp | 6 | ||||
-rw-r--r-- | plugins/TabSRMM/src/sendqueue.h | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/utils.h | 1 | ||||
-rw-r--r-- | plugins/TabSRMM/src/warning.cpp | 19 |
6 files changed, 16 insertions, 16 deletions
diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp index e528413cb6..fd8e52cf53 100644 --- a/plugins/TabSRMM/src/container.cpp +++ b/plugins/TabSRMM/src/container.cpp @@ -2134,7 +2134,7 @@ panel_found: return TRUE;
pContainer->m_exFlags |= CNT_EX_CLOSEWARN;
- LRESULT result = SendQueue::WarnPendingJobs(iOpenJobs);
+ LRESULT result = SendQueue::WarnPendingJobs();
pContainer->m_exFlags &= ~CNT_EX_CLOSEWARN;
if (result == IDNO)
return TRUE;
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index 46088dabc7..d036181d41 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -2695,7 +2695,7 @@ INT_PTR CMsgDialog::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) return TRUE;
m_bWarnClose = true;
- LRESULT result = SendQueue::WarnPendingJobs(0);
+ LRESULT result = SendQueue::WarnPendingJobs();
m_bWarnClose = false;
if (result == IDNO)
return TRUE;
diff --git a/plugins/TabSRMM/src/sendqueue.cpp b/plugins/TabSRMM/src/sendqueue.cpp index e009e98496..fe4d158e73 100644 --- a/plugins/TabSRMM/src/sendqueue.cpp +++ b/plugins/TabSRMM/src/sendqueue.cpp @@ -517,11 +517,9 @@ int SendQueue::ackMessage(CMsgDialog *dat, WPARAM wParam, LPARAM lParam) return 0;
}
-LRESULT SendQueue::WarnPendingJobs(unsigned int)
+LRESULT SendQueue::WarnPendingJobs()
{
- return MessageBox(nullptr,
- TranslateT("There are unsent messages waiting for confirmation.\nIf you close the window now, Miranda will try to send them but may be unable to inform you about possible delivery errors.\nDo you really want to close the window(s)?"),
- TranslateT("Message window warning"), MB_YESNO | MB_ICONHAND);
+ return CWarning::show(CWarning::WARN_SEND_ERROR, MB_YESNO | MB_ICONHAND);
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/TabSRMM/src/sendqueue.h b/plugins/TabSRMM/src/sendqueue.h index 40403d1773..8d9ae31613 100644 --- a/plugins/TabSRMM/src/sendqueue.h +++ b/plugins/TabSRMM/src/sendqueue.h @@ -98,7 +98,7 @@ public: int doSendLater(int iIndex, CMsgDialog *dat, MCONTACT hContact = 0, bool fIsSendLater = true);
// static members
- static LRESULT TSAPI WarnPendingJobs(unsigned int uNrMessages);
+ static LRESULT TSAPI WarnPendingJobs();
private:
SendJob m_jobs[NR_SENDJOBS];
diff --git a/plugins/TabSRMM/src/utils.h b/plugins/TabSRMM/src/utils.h index 84f13af34d..4337763eb3 100644 --- a/plugins/TabSRMM/src/utils.h +++ b/plugins/TabSRMM/src/utils.h @@ -127,6 +127,7 @@ namespace CWarning WARN_CLOSEWINDOW,
WARN_OPTION_CLOSE,
WARN_THEME_OVERWRITE,
+ WARN_SEND_ERROR,
WARN_LAST
};
diff --git a/plugins/TabSRMM/src/warning.cpp b/plugins/TabSRMM/src/warning.cpp index c6bfe01550..eaf324114d 100644 --- a/plugins/TabSRMM/src/warning.cpp +++ b/plugins/TabSRMM/src/warning.cpp @@ -242,15 +242,16 @@ public: static wchar_t *Warnings[] = {
nullptr,
LPGENW("Save file|Unable to save temporary file"), // WARN_SAVEFILE
- LPGENW("Edit user notes|You are editing the user notes. Click the button again or use the hotkey (default: Alt+N) to save the notes and return to normal messaging mode"), /* WARN_EDITUSERNOTES */
- LPGENW("Missing component|The icon pack is missing. Please install it to the default icons folder.\n\nNo icons will be available"), /* WARN_ICONPACKMISSING */
- LPGENW("Aero peek warning|You have enabled Aero Peek features and loaded a custom container window skin\n\nThis can result in minor visual anomalies in the live preview feature."), /* WARN_AEROPEEKSKIN */
- LPGENW("File transfer problem|Sending the image by file transfer failed.\n\nPossible reasons: File transfers not supported, either you or the target contact is offline, or you are invisible and the target contact is not on your visibility list."), /* WARN_IMGSVC_MISSING */
- LPGENW("Settings problem|The option \\b1 History -> Imitate IEView API\\b0 is enabled and the History++ plugin is active. This can cause problems when using IEView as message log viewer.\n\nShould I correct the option (a restart is required)?"), /* WARN_HPP_APICHECK */
- LPGENW("Configuration issue|The unattended send feature is disabled. The \\b1 send later\\b0 and \\b1 send to multiple contacts\\b0 features depend on it.\n\nYou must enable it under \\b1Options -> Message sessions -> Advanced tweaks\\b0. Changing this option requires a restart."), /* WARN_NO_SENDLATER */
- LPGENW("Closing Window|You are about to close a window with multiple tabs open.\n\nProceed?"), /* WARN_CLOSEWINDOW */
- LPGENW("Closing options dialog|To reflect the changes done by importing a theme in the options dialog, the dialog must be closed after loading a theme \\b1 and unsaved changes might be lost\\b0 .\n\nDo you want to continue?"), /* WARN_OPTION_CLOSE */
- LPGENW("Loading a theme|Loading a color and font theme can overwrite the settings defined by your skin.\n\nDo you want to continue?"), /* WARN_THEME_OVERWRITE */
+ LPGENW("Edit user notes|You are editing the user notes. Click the button again or use the hotkey (default: Alt+N) to save the notes and return to normal messaging mode"), // WARN_EDITUSERNOTES
+ LPGENW("Missing component|The icon pack is missing. Please install it to the default icons folder.\n\nNo icons will be available"), // WARN_ICONPACKMISSING
+ LPGENW("Aero peek warning|You have enabled Aero Peek features and loaded a custom container window skin\n\nThis can result in minor visual anomalies in the live preview feature."), // WARN_AEROPEEKSKIN
+ LPGENW("File transfer problem|Sending the image by file transfer failed.\n\nPossible reasons: File transfers not supported, either you or the target contact is offline, or you are invisible and the target contact is not on your visibility list."), // WARN_IMGSVC_MISSING
+ LPGENW("Settings problem|The option \\b1 History -> Imitate IEView API\\b0 is enabled and the History++ plugin is active. This can cause problems when using IEView as message log viewer.\n\nShould I correct the option (a restart is required)?"), // WARN_HPP_APICHECK
+ LPGENW("Configuration issue|The unattended send feature is disabled. The \\b1 send later\\b0 and \\b1 send to multiple contacts\\b0 features depend on it.\n\nYou must enable it under \\b1Options -> Message sessions -> Advanced tweaks\\b0. Changing this option requires a restart."), // WARN_NO_SENDLATER
+ LPGENW("Closing Window|You are about to close a window with multiple tabs open.\n\nProceed?"), // WARN_CLOSEWINDOW
+ LPGENW("Closing options dialog|To reflect the changes done by importing a theme in the options dialog, the dialog must be closed after loading a theme \\b1 and unsaved changes might be lost\\b0 .\n\nDo you want to continue?"), // WARN_OPTION_CLOSE
+ LPGENW("Loading a theme|Loading a color and font theme can overwrite the settings defined by your skin.\n\nDo you want to continue?"), // WARN_THEME_OVERWRITE
+ LPGENW("There are unsent messages waiting for confirmation.\nIf you close the window now, Miranda will try to send them but may be unable to inform you about possible delivery errors.\nDo you really want to close the window(s)?"), // WARN_SEND_ERROR
};
/////////////////////////////////////////////////////////////////////////////////////////
|