diff options
author | George Hazan <george.hazan@gmail.com> | 2023-10-25 15:54:35 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-10-25 15:54:35 +0300 |
commit | 00e45cff4a226194768ebf006e76cce4ee5700d1 (patch) | |
tree | eb002eb73346825795b7f0c99165ef210f9a5fcb /protocols | |
parent | 2399415bb543d77fae4028b6d2d9d9eecc4ea9b0 (diff) |
code cleaning
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/YAMN/src/browser/mailbrowser.cpp | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/protocols/YAMN/src/browser/mailbrowser.cpp b/protocols/YAMN/src/browser/mailbrowser.cpp index 28e6c87f1d..651320cad6 100644 --- a/protocols/YAMN/src/browser/mailbrowser.cpp +++ b/protocols/YAMN/src/browser/mailbrowser.cpp @@ -16,8 +16,6 @@ #define MAILBROWSER_MINXSIZE 200 // min size of mail browser window
#define MAILBROWSER_MINYSIZE 130
-#define MAILBROWSERTITLE LPGEN("%s - %d new mail messages, %d total")
-
void __cdecl ShowEmailThread(void *Param);
// --------------------------------------------------------------------------------------------------
@@ -342,17 +340,9 @@ int UpdateMails(HWND hDlg, CAccount *ActualAccount, uint32_t nflags, uint32_t nn if (RunMailBrowser || RunPopups)
AddNewMailsToListView(hDlg == nullptr ? nullptr : GetDlgItem(hDlg, IDC_LISTMAILS), ActualAccount, nflags);
- if (RunMailBrowser) {
- size_t len = mir_strlen(ActualAccount->Name) + mir_strlen(Translate(MAILBROWSERTITLE)) + 10; // +10 chars for numbers
- char *TitleStrA = new char[len];
- wchar_t *TitleStrW = new wchar_t[len];
-
- mir_snprintf(TitleStrA, len, Translate(MAILBROWSERTITLE), ActualAccount->Name, MN.Real.DisplayUC + MN.Virtual.DisplayUC, MN.Real.Display + MN.Virtual.Display);
- MultiByteToWideChar(CP_ACP, MB_USEGLYPHCHARS, TitleStrA, -1, TitleStrW, (int)mir_strlen(TitleStrA) + 1);
- SetWindowTextW(hDlg, TitleStrW);
- delete[] TitleStrA;
- delete[] TitleStrW;
- }
+ if (RunMailBrowser)
+ SetWindowTextW(hDlg, CMStringW(FORMAT, LPGENW("%s - %d new mail messages, %d total"),
+ _A2T(ActualAccount->Name).get(), MN.Real.DisplayUC + MN.Virtual.DisplayUC, MN.Real.Display + MN.Virtual.Display));
DoMailActions(hDlg, ActualAccount, &MN, nflags, nnflags);
|