const JString&
CBSearchFilterHistoryMenu::GetFilter
	(
	const JIndex	index,
	JBoolean*		invert
	)
	const
{
	JString s;
	*invert = JI2B(GetItemNMShortcut(index, &s) && s == kInvertFlag);

	return JXTextMenu::GetItemText(index);
}
JString
JXFileHistoryMenu::GetFile
	(
	const JIndex index
	)
	const
{
	JString path;
	const JBoolean ok = GetItemNMShortcut(index, &path);
	assert( ok );
	path.TrimWhitespace();

	return JCombinePathAndName(path, JXTextMenu::GetItemText(index));
}
const JString&
JXFSCommandHistoryMenu::GetCommand
	(
	const JIndex				index,
	JFSBinding::CommandType*	type,
	JBoolean*					singleFile
	)
	const
{
	JString typeStr;
	if (!GetItemNMShortcut(index, &typeStr))
		{
		*type       = JFSBinding::kRunPlain;
		*singleFile = kJFalse;
		}
	else if (typeStr == kRunInShellStr)
		{
		*type       = JFSBinding::kRunInShell;
		*singleFile = kJFalse;
		}
	else if (typeStr == kRunInShellSingleStr)
		{
		*type       = JFSBinding::kRunInShell;
		*singleFile = kJTrue;
		}
	else if (typeStr == kRunInWindowStr)
		{
		*type       = JFSBinding::kRunInWindow;
		*singleFile = kJFalse;
		}
	else if (typeStr == kRunInWindowSingleStr)
		{
		*type       = JFSBinding::kRunInWindow;
		*singleFile = kJTrue;
		}
	else
		{
		assert( typeStr == kRunSingleStr );

		*type       = JFSBinding::kRunPlain;
		*singleFile = kJTrue;
		}

	return JXTextMenu::GetItemText(index);
}
void
WizChatShortcutMenu::CheckForShortcut()
{
	JString nmShortcut;
	const JString& text = itsMessage->GetText();

	const JSize count = GetItemCount();
	for (JIndex i=1; i<=count; i++)
		{
		if (GetItemNMShortcut(i, &nmShortcut))
			{
			nmShortcut.TrimWhitespace();
			if (nmShortcut == text)
				{
				itsMessage->SetText(GetItemText(i));
				return;
				}
			}
		}
}