Skip to content

Commit

Permalink
[NEW_FEDATURE] Implement VerticalFileSwitcher feature (in progress).
Browse files Browse the repository at this point in the history
- Notepad-plus svn trunk @ 776
  • Loading branch information
donho committed Jun 16, 2011
1 parent d2a9c3e commit e15fed5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
10 changes: 8 additions & 2 deletions PowerEditor/src/Notepad_plus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4054,9 +4054,11 @@ void Notepad_plus::notifyBufferChanged(Buffer * buffer, int mask)
bool subActive = (_subEditView.getCurrentBuffer() == buffer);

//Only event that applies to non-active Buffers
if (mask & BufferChangeStatus) { //reload etc
if (mask & BufferChangeStatus)
{ //reload etc
bool didDialog = false;
switch(buffer->getStatus()) {
switch(buffer->getStatus())
{
case DOC_UNNAMED: //nothing todo
{
break;
Expand Down Expand Up @@ -4188,6 +4190,10 @@ void Notepad_plus::notifyBufferChanged(Buffer * buffer, int mask)
setDisplayFormat(buffer->getFormat());
enableConvertMenuItems(buffer->getFormat());
}

if (_pFileSwitcherPanel)
_pFileSwitcherPanel->setItemIconStatus((int)buffer);

}

void Notepad_plus::notifyBufferActivated(BufferID bufid, int view)
Expand Down
4 changes: 0 additions & 4 deletions PowerEditor/src/NppCommands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -847,8 +847,6 @@ void Notepad_plus::command(int id)
{
Buffer * buf = _pEditView->getCurrentBuffer();
buf->setUserReadOnly(!buf->getUserReadOnly());
if (_pFileSwitcherPanel)
_pFileSwitcherPanel->setItemIconStatus((int)buf);
}
break;

Expand All @@ -861,8 +859,6 @@ void Notepad_plus::command(int id)

::SetFileAttributes(buf->getFullPathName(), dwFileAttribs);
buf->setFileReadOnly(false);
if (_pFileSwitcherPanel)
_pFileSwitcherPanel->setItemIconStatus((int)buf);
}
break;

Expand Down
3 changes: 0 additions & 3 deletions PowerEditor/src/NppNotification.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,6 @@ BOOL Notepad_plus::notify(SCNotification *notification)
}
bool isDirty = notification->nmhdr.code == SCN_SAVEPOINTLEFT;
buf->setDirty(isDirty);
if (_pFileSwitcherPanel)
_pFileSwitcherPanel->setItemIconStatus((int)buf);

break;
}

Expand Down

0 comments on commit e15fed5

Please sign in to comment.