Fix incorrect icon for monitoring status in Document list panel and in Document switcher

Fix #8783, close #9046
This commit is contained in:
Delhove Erwan 2020-10-22 14:55:22 +02:00 committed by Don HO
parent 9cd6e6513f
commit a2233b105d
No known key found for this signature in database
GPG Key ID: 6C429F1D8D84F46E
2 changed files with 5 additions and 5 deletions

View File

@ -53,7 +53,7 @@
using namespace std; using namespace std;
enum tb_stat {tb_saved, tb_unsaved, tb_ro}; enum tb_stat {tb_saved, tb_unsaved, tb_ro, tb_monitored};
#define DIR_LEFT true #define DIR_LEFT true
#define DIR_RIGHT false #define DIR_RIGHT false
@ -4951,14 +4951,14 @@ void Notepad_plus::getTaskListInfo(TaskListInfo *tli)
{ {
BufferID bufID = _pDocTab->getBufferByIndex(i); BufferID bufID = _pDocTab->getBufferByIndex(i);
Buffer * b = MainFileManager.getBufferByID(bufID); Buffer * b = MainFileManager.getBufferByID(bufID);
int status = b->isReadOnly()?tb_ro:(b->isDirty()?tb_unsaved:tb_saved); int status = b->isMonitoringOn()?tb_monitored:(b->isReadOnly()?tb_ro:(b->isDirty()?tb_unsaved:tb_saved));
tli->_tlfsLst.push_back(TaskLstFnStatus(currentView(), i, b->getFullPathName(), status, (void *)bufID)); tli->_tlfsLst.push_back(TaskLstFnStatus(currentView(), i, b->getFullPathName(), status, (void *)bufID));
} }
for (int i = 0 ; i < nonCurrentNbDoc ; ++i) for (int i = 0 ; i < nonCurrentNbDoc ; ++i)
{ {
BufferID bufID = _pNonDocTab->getBufferByIndex(i); BufferID bufID = _pNonDocTab->getBufferByIndex(i);
Buffer * b = MainFileManager.getBufferByID(bufID); Buffer * b = MainFileManager.getBufferByID(bufID);
int status = b->isReadOnly()?tb_ro:(b->isDirty()?tb_unsaved:tb_saved); int status = b->isMonitoringOn()?tb_monitored:(b->isReadOnly()?tb_ro:(b->isDirty()?tb_unsaved:tb_saved));
tli->_tlfsLst.push_back(TaskLstFnStatus(otherView(), i, b->getFullPathName(), status, (void *)bufID)); tli->_tlfsLst.push_back(TaskLstFnStatus(otherView(), i, b->getFullPathName(), status, (void *)bufID));
} }
} }

View File

@ -222,7 +222,7 @@ void VerticalFileSwitcherListView::setItemIconStatus(BufferID bufferID)
LVITEM item; LVITEM item;
item.pszText = fn; item.pszText = fn;
item.iSubItem = 0; item.iSubItem = 0;
item.iImage = buf->getUserReadOnly()||buf->getFileReadOnly()?2:(buf->isDirty()?1:0); item.iImage = buf->isMonitoringOn()?3:(buf->isReadOnly()?2:(buf->isDirty()?1:0));
int nbItem = ListView_GetItemCount(_hSelf); int nbItem = ListView_GetItemCount(_hSelf);
@ -301,7 +301,7 @@ int VerticalFileSwitcherListView::add(BufferID bufferID, int iView)
item.pszText = fn; item.pszText = fn;
item.iItem = index; item.iItem = index;
item.iSubItem = 0; item.iSubItem = 0;
item.iImage = buf->getUserReadOnly()||buf->getFileReadOnly()?2:(buf->isDirty()?1:0); item.iImage = buf->isMonitoringOn()?3:(buf->isReadOnly()?2:(buf->isDirty()?1:0));
item.lParam = reinterpret_cast<LPARAM>(tl); item.lParam = reinterpret_cast<LPARAM>(tl);
ListView_InsertItem(_hSelf, &item); ListView_InsertItem(_hSelf, &item);