Add the number of total documents on windows dialog's title bar
Close #8338, close #9245
This commit is contained in:
parent
7aafa2e8fe
commit
435834651b
@ -49,6 +49,7 @@ using namespace std;
|
|||||||
#define WD_CLMNPATH "ColumnPath"
|
#define WD_CLMNPATH "ColumnPath"
|
||||||
#define WD_CLMNTYPE "ColumnType"
|
#define WD_CLMNTYPE "ColumnType"
|
||||||
#define WD_CLMNSIZE "ColumnSize"
|
#define WD_CLMNSIZE "ColumnSize"
|
||||||
|
#define WD_TABTOTAL "TabsTotal"
|
||||||
|
|
||||||
static const TCHAR *readonlyString = TEXT(" [Read Only]");
|
static const TCHAR *readonlyString = TEXT(" [Read Only]");
|
||||||
const UINT WDN_NOTIFY = RegisterWindowMessage(TEXT("WDN_NOTIFY"));
|
const UINT WDN_NOTIFY = RegisterWindowMessage(TEXT("WDN_NOTIFY"));
|
||||||
@ -723,6 +724,7 @@ void WindowsDlg::doRefresh(bool invalidate /*= false*/)
|
|||||||
|
|
||||||
resetSelection();
|
resetSelection();
|
||||||
updateButtonState();
|
updateButtonState();
|
||||||
|
doCount();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -865,6 +867,22 @@ void WindowsDlg::doClose()
|
|||||||
}
|
}
|
||||||
ListView_SetItemCount(_hList, _idxMap.size());
|
ListView_SetItemCount(_hList, _idxMap.size());
|
||||||
}
|
}
|
||||||
|
doCount();
|
||||||
|
}
|
||||||
|
|
||||||
|
//this function will be called everytime when close is performed
|
||||||
|
//as well as each time refresh is performed to keep updated
|
||||||
|
void WindowsDlg::doCount()
|
||||||
|
{
|
||||||
|
NativeLangSpeaker* pNativeSpeaker = (NppParameters::getInstance()).getNativeLangSpeaker();
|
||||||
|
|
||||||
|
TCHAR count[32];
|
||||||
|
wsprintf(count, TEXT("%d"), _idxMap.size());
|
||||||
|
|
||||||
|
generic_string msg = TEXT("Windows -- ");
|
||||||
|
msg += pNativeSpeaker->getAttrNameStr(TEXT("Total documents opened: "), WD_ROOTNODE, WD_TABTOTAL);
|
||||||
|
msg += count;
|
||||||
|
SetWindowText(_hSelf,msg.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowsDlg::doSortToTabs()
|
void WindowsDlg::doSortToTabs()
|
||||||
|
@ -83,6 +83,7 @@ protected :
|
|||||||
void updateButtonState();
|
void updateButtonState();
|
||||||
void activateCurrent();
|
void activateCurrent();
|
||||||
void doColumnSort();
|
void doColumnSort();
|
||||||
|
void doCount();
|
||||||
|
|
||||||
HWND _hList = nullptr;
|
HWND _hList = nullptr;
|
||||||
static RECT _lastKnownLocation;
|
static RECT _lastKnownLocation;
|
||||||
|
Loading…
Reference in New Issue
Block a user