Tab context menu bug fixes

Disable "Open containing Folder in Explorer" and "Open Containing Folder in CMD" commands for document non-exist on hard disk.

Close #5312
This commit is contained in:
Rajendra Singh 2019-02-11 23:15:36 +05:30 committed by Don HO
parent fbffdd8825
commit 17c40213ca

View File

@ -565,6 +565,8 @@ BOOL Notepad_plus::notify(SCNotification *notification)
bool isFileExisting = PathFileExists(buf->getFullPathName()) != FALSE; bool isFileExisting = PathFileExists(buf->getFullPathName()) != FALSE;
_tabPopupMenu.enableItem(IDM_FILE_DELETE, isFileExisting); _tabPopupMenu.enableItem(IDM_FILE_DELETE, isFileExisting);
_tabPopupMenu.enableItem(IDM_FILE_RENAME, isFileExisting); _tabPopupMenu.enableItem(IDM_FILE_RENAME, isFileExisting);
_tabPopupMenu.enableItem(IDM_FILE_OPEN_FOLDER, isFileExisting);
_tabPopupMenu.enableItem(IDM_FILE_OPEN_CMD, isFileExisting);
_tabPopupMenu.enableItem(IDM_FILE_OPEN_DEFAULT_VIEWER, isAssoCommandExisting(buf->getFullPathName())); _tabPopupMenu.enableItem(IDM_FILE_OPEN_DEFAULT_VIEWER, isAssoCommandExisting(buf->getFullPathName()));