Example #1
0
void CDirstatDoc::OnUpdateExplorerHere(CCmdUI *pCmdUI)
{
	pCmdUI->Enable(
		DirectoryListHasFocus()
		&& GetSelection() != NULL
		&& GetSelection()->GetType() != IT_FREESPACE
		&& GetSelection()->GetType() != IT_UNKNOWN
	);
}
Example #2
0
void CDirstatDoc::OnUpdateCleanupProperties(CCmdUI *pCmdUI)
{
	pCmdUI->Enable(
		DirectoryListHasFocus()
		&& GetSelection() != NULL
		&& GetSelection()->GetType() != IT_FREESPACE
		&& GetSelection()->GetType() != IT_UNKNOWN
		&& GetSelection()->GetType() != IT_FILESFOLDER
	);
}
Example #3
0
void CDirstatDoc::OnUpdateUserdefinedcleanup(CCmdUI *pCmdUI)
{
	int i= pCmdUI->m_nID - ID_USERDEFINEDCLEANUP0;
	CItem *item= GetSelection();

	pCmdUI->Enable(
		DirectoryListHasFocus()
		&& GetOptions()->IsUserDefinedCleanupEnabled(i)
		&& UserDefinedCleanupWorksForItem(GetOptions()->GetUserDefinedCleanup(i), item)
	);
}
Example #4
0
void CDirstatDoc::OnUpdateCleanupDelete(CCmdUI *pCmdUI)
{
	CItem *item= GetSelection();
	
	pCmdUI->Enable(
		DirectoryListHasFocus()
		&& item != NULL
		&& (item->GetType() == IT_DIRECTORY || item->GetType() == IT_FILE)
		&& !item->IsRootItem()
	);
}
Example #5
0
void CDirstatDoc::OnUpdateCommandPromptHere(CCmdUI *pCmdUI)
{
	pCmdUI->Enable(
		DirectoryListHasFocus()
		&& GetSelection() != NULL 
		&& GetSelection()->GetType() != IT_MYCOMPUTER
		&& GetSelection()->GetType() != IT_FREESPACE
		&& GetSelection()->GetType() != IT_UNKNOWN
		&& ! GetSelection()->HasUncPath()
	);
}
Example #6
0
void CDirstatDoc::OnUpdateEditCopy(CCmdUI *pCmdUI)
{
	const CItem *item= GetSelection();
	pCmdUI->Enable(
		DirectoryListHasFocus() &&
		item != NULL && 
		item->GetType() != IT_MYCOMPUTER &&
		item->GetType() != IT_FILESFOLDER &&
		item->GetType() != IT_FREESPACE &&
		item->GetType() != IT_UNKNOWN
	);
}
Example #7
0
void CDirstatDoc::OnUpdateCleanupDelete(CCmdUI *pCmdUI)
{
    // FIXME: Multi-select
    CItem *item = GetSelection(0);

    pCmdUI->Enable(
        DirectoryListHasFocus()
        && item != NULL
        && (IT_DIRECTORY == item->GetType() || IT_FILE == item->GetType())
        && !item->IsRootItem()
    );
}
Example #8
0
void CDirstatDoc::OnUpdateExplorerHere(CCmdUI *pCmdUI)
{
    pCmdUI->Enable(
        DirectoryListHasFocus()
        // FIXME: Multi-select
        && GetSelection(0) != NULL
        // FIXME: Multi-select
        && GetSelection(0)->GetType() != IT_FREESPACE
        // FIXME: Multi-select
        && GetSelection(0)->GetType() != IT_UNKNOWN
    );
}
Example #9
0
void CDirstatDoc::OnUpdateCommandPromptHere(CCmdUI *pCmdUI)
{
    pCmdUI->Enable(
        DirectoryListHasFocus()
        // FIXME: Multi-select
        && GetSelection(0) != NULL
        // FIXME: Multi-select
        && GetSelection(0)->GetType() != IT_MYCOMPUTER
        // FIXME: Multi-select
        && GetSelection(0)->GetType() != IT_FREESPACE
        // FIXME: Multi-select
        && GetSelection(0)->GetType() != IT_UNKNOWN
        // FIXME: Multi-select
        && ! GetSelection(0)->HasUncPath()
    );
}