Beispiel #1
0
void
TFilePanel::ShowContextMenu(BPoint point, const entry_ref* ref, BView* view)
{
	EnableNamedMenuItem(fWindowContextMenu, kNewFolder,
		!TargetModel()->IsRoot());
	EnableNamedMenuItem(fWindowContextMenu, kOpenParentDir,
		!TargetModel()->IsRoot());
	EnableNamedMenuItem(fWindowContextMenu, kMoveToTrash,
		!TargetModel()->IsRoot());

	_inherited::ShowContextMenu(point, ref, view);
}
Beispiel #2
0
void
SetICSMode ()
{
  SetMenuEnables(icsEnables);

#if ZIPPY
  if (appData.zippyPlay && !appData.noChessProgram) { /* [DM] icsEngineAnalyze */
     EnableNamedMenuItem("Mode.AnalysisMode", True);
     EnableNamedMenuItem("Engine.Engine#1Settings", True);
  }
#endif
}
Beispiel #3
0
void
TFilePanel::MenusBeginning()
{
	int32 count = PoseView()->SelectionList()->CountItems();

	EnableNamedMenuItem(fMenuBar, kNewFolder, !TargetModel()->IsRoot());
	EnableNamedMenuItem(fMenuBar, kMoveToTrash, !TargetModel()->IsRoot()
		&& count);
	EnableNamedMenuItem(fMenuBar, kGetInfo, count != 0);
	EnableNamedMenuItem(fMenuBar, kEditItem, count == 1);

	SetCutItem(fMenuBar);
	SetCopyItem(fMenuBar);
	SetPasteItem(fMenuBar);

	fIsTrackingMenu = true;
}
Beispiel #4
0
void
SetMachineThinkingEnables ()
{
  if (appData.noChessProgram) return;
  SetMenuEnables(machineThinkingEnables);
  switch (gameMode) {
  case MachinePlaysBlack:
  case MachinePlaysWhite:
  case TwoMachinesPlay:
    EnableNamedMenuItem(ModeToWidgetName(gameMode), True);
    break;
  default:
    break;
  }
}
Beispiel #5
0
void
GreyRevert (Boolean grey)
{
    EnableNamedMenuItem("Edit.Revert", !grey);
    EnableNamedMenuItem("Edit.Annotate", !grey);
}