From 047bfc1ee1b4574823062dd9a8061f0463f42816 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 7 Oct 2024 20:55:50 +0300 Subject: =?UTF-8?q?fixes=20#4691=20(NewStory:=20=D0=B4=D0=BE=D0=B1=D0=B0?= =?UTF-8?q?=D0=B2=D0=B8=D1=82=D1=8C=20=D0=B2=D0=BE=D0=B7=D0=BC=D0=BE=D0=B6?= =?UTF-8?q?=D0=BD=D0=BE=D1=81=D1=82=D1=8C=20=D1=80=D0=B5=D0=B4=D0=B0=D0=BA?= =?UTF-8?q?=D1=82=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D1=82=D1=8C=20=D1=81=D0=BE?= =?UTF-8?q?=D0=B1=D1=8B=D1=82=D0=B8=D0=B5=20=D0=BF=D0=B5=D1=80=D0=B5=D0=B4?= =?UTF-8?q?=D0=B0=D1=87=D0=B8=20=D1=84=D0=B0=D0=B9=D0=BB=D0=B0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/NewStory/src/history_control.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'plugins/NewStory/src/history_control.cpp') diff --git a/plugins/NewStory/src/history_control.cpp b/plugins/NewStory/src/history_control.cpp index 4b2082582d..1222ed338f 100644 --- a/plugins/NewStory/src/history_control.cpp +++ b/plugins/NewStory/src/history_control.cpp @@ -227,8 +227,6 @@ void NewstoryListData::BeginEditItem() return; ItemData *item = LoadItem(caret); - if (item->dbe.eventType != EVENTTYPE_MESSAGE) - return; RECT rc; GetClientRect(m_hwnd, &rc); int height = rc.bottom - rc.top, width = rc.right - rc.left; @@ -261,6 +259,9 @@ void NewstoryListData::BeginEditItem() mir_subclassWindow(hwndEditBox, HistoryEditWndProc); SendMessage(hwndEditBox, WM_SETFONT, (WPARAM)g_fontTable[fontid].hfnt, 0); SendMessage(hwndEditBox, EM_SETMARGINS, EC_RIGHTMARGIN, 100); + if (item->dbe.eventType != EVENTTYPE_MESSAGE) + SendMessage(hwndEditBox, EM_SETREADONLY, TRUE, 0); + ShowWindow(hwndEditBox, SW_SHOW); SetFocus(hwndEditBox); SetForegroundWindow(hwndEditBox); @@ -1477,7 +1478,7 @@ LRESULT CALLBACK NewstoryListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM auto *pItem = data->LoadItem(idx); pt.y -= pItem->savedTop; - if (pItem->m_bOfflineFile) { + if (pItem->m_bOfflineFile && !pItem->m_bOfflineDownloaded) { Srmm_DownloadOfflineFile(pItem->dbe.hContact, pItem->dbe.getEvent(), OFD_DOWNLOAD | OFD_RUN); return 0; } -- cgit v1.2.3