예제 #1
0
OptionsMenu::OptionsMenu(OptionsMenuState& state) :
				_state(state) {

	ConfigHandler& cf = ConfigHandler::getInstance();

	addItem(
			MenuItem("Fullscreen", [&]() {}, cf.getFullscreen(), 1,
					MenuItem::OptionType::TOGGLE));
	addItem(
			MenuItem("Music volume", [&]() {}, cf.getMusicVolume(),
					MIX_MAX_VOLUME, MenuItem::OptionType::SLIDER));
	addItem(
			MenuItem("SFX volume", [&]() {}, cf.getSfxVolume(), MIX_MAX_VOLUME,
					MenuItem::OptionType::SLIDER));
	addItem(MenuItem("Configure keys", [&]() {
		_state.configurePlayerKeys(_items.at(_selection).getValue() + 1);
	}, 0, 1, MenuItem::OptionType::PLAYER));
	addItem(MenuItem("Apply", [&]() {
		cf.setFullscreen(_items.at(0).getValue());
		cf.setMusicVolume(_items.at(1).getValue());
		cf.setSfxVolume(_items.at(2).getValue());
		cf.saveConfig();
		_state.goBack();
	}));
}
예제 #2
0
int driverSelectionMenu(CursesInterface &ncInterface) {
	// First, detect hardware for which we have to install drivers.
	string tmp_hw = get_tmp_file();
	system("lspci > " + tmp_hw);
	vector<string> hw = ReadFileStrings(tmp_hw);
	// Check for VirtualBox
	bool hasVirtualBox=false;
	int hasNvidia=-1;
	int hasRadeon=-1;
	for(size_t i=0; i<hw.size(); ++i) {
		if (hw[i].find("VirtualBox")!=std::string::npos) hasVirtualBox = true;
		if (hw[i].find("VGA compatible controller")!=std::string::npos && hw[i].find("nVidia")!=std::string::npos) hasNvidia = i;
		if (hw[i].find("VGA compatible controller")!=std::string::npos && hw[i].find("Radeon")!=std::string::npos) hasRadeon = i;
	}
	if (hasNvidia==-1) return 1;
	vector<MenuItem> menuItems;
	menuItems.push_back(MenuItem(_("Latest"), _("Latest GeForce (series 6xxx and later)")));
	menuItems.push_back(MenuItem("173", _("GeForce FX series")));
	menuItems.push_back(MenuItem("96", _("GeForce 4 series")));
	menuItems.push_back(MenuItem(_("Skip"), _("Do not install driver")));

	string ret = ncInterface.showMenu2(_("Videocard detected: ") + hw[hasNvidia] + _("\nChoose driver for it:"), menuItems);
	if (!ret.empty() && ret != _("Skip")) {
		if (ret!=_("Latest")) {
			WriteFile(SETUPCONFIG_NVIDIA, string("legacy" + ret));
		}
		else {
			WriteFile(SETUPCONFIG_NVIDIA, "generic");
			
		}
	}
	return 0;
}
예제 #3
0
파일: raidtool.cpp 프로젝트: khvalera/mpkg
int raidMainMenu() {
    vector<MenuItem> menuItems;
    menuItems.push_back(MenuItem("ASSEMBLE", "Собрать уже существующий массив из доступных устройств"));
    menuItems.push_back(MenuItem("CREATE", "Создать новый массив"));
    menuItems.push_back(MenuItem("STOP", "Остановить существующий массив"));
    menuItems.push_back(MenuItem("EXIT", "Выход"));
    string ret = "CHECK";
    while (!ret.empty() && ret != "EXIT") {
        ret = ncInterface.showMenu2("Утилита управления RAID-массивами", menuItems);
        if (ret == "ASSEMBLE") {
            raidAssembleMenu();
            continue;
        }
        if (ret == "CREATE") {
            raidCreateMenu();
            continue;
        }
        if (ret == "STOP") {
            raidStopMenu();
            continue;
        }
        /*if (ret == "MANAGE") {
        	raidManageMenu();
        	continue;
        }*/
    }
    return 0;
}
예제 #4
0
//Constructor
GameOverState::GameOverState()
{
	//Default value
	userSelection = 0;

	//Initialize SDL_ttf
	TTF_Init();

	//Font
	titleFont = TTF_OpenFont( "arcade classic.ttf", 48 );
	menuFont = TTF_OpenFont( "emulogic.ttf", 18 );

	//Colors
	SDL_Color whiteText = { 255, 255, 255 };
	SDL_Color redText = { 255, 0, 0 };

	//Text
	gameOver = TTF_RenderText_Solid( titleFont, "GAME OVER", redText );

	//Text positions
    titleOffset.x = 250;
    titleOffset.y = 100;

	//Menu Initialisation
	int menuPos = 450;
	menuItems.push_back(MenuItem("Play Again", menuFont, whiteText, menuPos, 200));
	menuItems.push_back(MenuItem("Exit to Menu", menuFont, whiteText, menuPos, 250));
}
예제 #5
0
int TextSetup::setMountPoints() {
	mech.updatePartitionLists();
	vector<MenuItem> m;
	string filesystem;

	string fslabel;
	for (size_t i=0; i<mech.partitions.size(); ++i) {
		if (mech.partitions[i].fslabel.empty()) fslabel = _(", no label");
		else fslabel=_(", label: ") + mech.partitions[i].fslabel;
		m.push_back(MenuItem(mech.partitions[i].devname, humanizeSize((int64_t) atol(mech.partitions[i].size.c_str())*(int64_t) 1048576) + ", " + mech.partitions[i].fstype + fslabel));
	}
	m.push_back(MenuItem("CONTINUE", _("Continue to next step")));



	// Let's do some rock :)
	string part, mount_point, fs_options;
	do {
		part = ncInterface.showMenu2(_("Please select partition to specify it's mount point and formatting options"), m, part);
		if (part.empty() || part=="CONTINUE") break;
		showPartitionMenu(part);
	} while (part!="CONTINUE" && !part.empty());

	return 0;
}
예제 #6
0
int TextSetup::setPackageSource() {
	vector<MenuItem> m;
	m.push_back(MenuItem("Disc", _("Install from installation DVD or USB flash")));
	m.push_back(MenuItem("Network", _("Install from official network repository")));
	m.push_back(MenuItem("ISO", _("Install from ISO image")));
	m.push_back(MenuItem("HDD", _("Install from directory on local hard drive")));
	m.push_back(MenuItem("Custom", _("Specify custom repository set")));
	
	settings["pkgsource"] = ncInterface.showMenu2(_("Please, choose package source from a list below:"), m, settings["pkgsource"]);
	
	string repo, ret_repo, volname, rep_location;
	if (settings["pkgsource"].empty()) return 1;
	if (settings["pkgsource"]=="Disc") repo="dvd";
	if (settings["pkgsource"]=="Network") repo="http://core.agilialinux.ru/" + distro_version + "/";
	if (settings["pkgsource"]=="ISO") repo=getISORepoPath();
	if (settings["pkgsource"]=="HDD") repo=getHDDRepoPath();
	if (settings["pkgsource"]=="Custom") repo=getCustomRepoPath();
	



	ncInterface.showInfoBox(_("Retrieving setup variants from repository..."));
	customPkgSetList = mech.getCustomPkgSetList(repo, &ret_repo, &volname, &rep_location);
	settings["pkgsource"] = ret_repo;
	settings["volname"] = volname;
	settings["rep_location"] = rep_location;
	
	if (customPkgSetList.empty()) {
		if (ncInterface.showYesNo(_("Failed to retrieve required data from specified repository. Select another one?"))) return setPackageSource();
		else return 2;
	}
	setAdditionalRepositories();

	return 0;
}
예제 #7
0
void LevelMenuUserInterface::onActivate()
{
   Parent::onActivate();
   mTypeSelectDone = false;
   menuTitle = "CHOOSE LEVEL TYPE:";

   GameConnection *gc = gClientGame->getConnectionToServer();
   if(!gc || !gc->mLevelTypes.size())
      return;
   
   menuItems.clear();
   menuItems.push_back(MenuItem(gc->mLevelTypes[0].getString(),0));

   for(S32 i = 1; i < gc->mLevelTypes.size();i++)
   {
      S32 j;
      for(j = 0;j < menuItems.size();j++)
         if(!stricmp(gc->mLevelTypes[i].getString(),menuItems[j].mText))
            break;
      if(j == menuItems.size())
      {
         menuItems.push_back(MenuItem(gc->mLevelTypes[i].getString(), i));
      }
   }
}
예제 #8
0
PauseMenu::PauseMenu(Game& game) :
				_game(game) {
	addItem(MenuItem("RESUME", [this]() {_game.inputTogglePause();}));
	addItem(
			MenuItem("QUIT",
					[]() {StateManager::getInstance().returnToTitle();}));
}
예제 #9
0
void AdminMenuUserInterface::onActivate()
{
   menuTitle = "ADMINISTRATOR OPTIONS:";
   menuItems.clear();
   menuItems.push_back(MenuItem("CHANGE LEVEL",0));
   menuItems.push_back(MenuItem("CHANGE A PLAYER'S TEAM",1));
   menuItems.push_back(MenuItem("KICK A PLAYER",2));
}
예제 #10
0
int TextSetup::setNvidiaDriver() {
	if (!mech.checkNvidiaLoad()) return 0;
	vector<MenuItem> m;
	m.push_back(MenuItem("latest", _("Latest NVIDIA driver for GeForce 6 and newer cards")));
	m.push_back(MenuItem("173", _("Legacy NVIDIA driver (173.xx) for GeForce 5 FX cards")));
	m.push_back(MenuItem("96", _("Legacy NVIDIA driver (96.xx) for GeForce 4 and older cards")));
	m.push_back(MenuItem("nv", _("NV: Non-accelerated opensource driver")));
	m.push_back(MenuItem("nouveau", _("Nouveau: accelerated, but unstable, opensource driver")));
	settings["nvidia-driver"]=ncInterface.showMenu2(_("You have NVIDIA video card. Please select appropriate driver to use:"), m, settings["nvidia-driver"]);
	if (settings["nvidia-driver"].empty()) return 1;
	return 0;
}
예제 #11
0
void main()
{
	DataBase dataBase;

	Menu mainMenu("Main Menu",dataBase);
	mainMenu.AddBranch(Menu("Clients",mainMenu.Data()));
	mainMenu.AddBranch(Menu("Warehouse",mainMenu.Data()));
	mainMenu.AddBranch(Menu("Orders",mainMenu.Data()));

	mainMenu.Branch(0).AddBranch(Menu("Show",mainMenu.Data()));
	mainMenu.Branch(0).AddItem(MenuItem("Add new client",AddClient));
	mainMenu.Branch(0).Branch(0).AddItem(MenuItem("Show all",ShowAllClients));

	mainMenu.Branch(1).AddBranch(Menu("Show",mainMenu.Data()));
	mainMenu.Branch(1).AddItem(MenuItem("Add Item", AddItem));
	mainMenu.Branch(1).AddItem(MenuItem("Set quantity",SetQuantity));
	mainMenu.Branch(1).Branch(0).AddItem(MenuItem("Show all",ShowWarehouse));

	mainMenu.Branch(2).AddBranch(Menu("Show",mainMenu.Data()));
	mainMenu.Branch(2).Branch(0).AddItem(MenuItem("Show all orders",ShowAllOrders));
	mainMenu.Branch(2).Branch(0).AddItem(MenuItem("Details",ShowOrder));
	mainMenu.Branch(2).AddItem(MenuItem("Add Order",AddOrder));	

	RandomDataBase(dataBase);

	mainMenu.Run();
}
예제 #12
0
int main(int, char **) {
	dialogMode = true;
	CursesInterface ncInterface;
	ncInterface.setTitle(_("AgiliaLinux setup"));
	ncInterface.setSubtitle(_("Bootloader selection"));
	vector<MenuItem> menuItems;
	menuItems.push_back(MenuItem("GRUB2", _("GRand Unified Bootloader 2 (default)")));
	menuItems.push_back(MenuItem("LILO", "LInux LOader"));
	menuItems.push_back(MenuItem("None", _("Do not install boot loader")));
	string bootLoader = ncInterface.showMenu2(_("Choose boot loader type.\nIf unsure - choose default:"), menuItems);
	if (bootLoader.empty()) return 1;
	WriteFile(SETUPCONFIG_BOOTLOADER, bootLoader);
	return 0;
}
예제 #13
0
MainMenuUserInterface::MainMenuUserInterface()
{
   dSprintf(titleBuffer, sizeof(titleBuffer), "%s:", ZAP_GAME_STRING);
   menuTitle = titleBuffer;
   motd[0] = 0;
   menuSubTitle = "A TORQUE NETWORK LIBRARY GAME - WWW.OPENTNL.ORG";
   menuFooter = "(C) 2004 GARAGEGAMES.COM, INC.";

   menuItems.push_back(MenuItem("JOIN LAN/INTERNET GAME", 0));
   menuItems.push_back(MenuItem("HOST GAME",1));
   menuItems.push_back(MenuItem("INSTRUCTIONS",2));
   menuItems.push_back(MenuItem("OPTIONS",3));
   menuItems.push_back(MenuItem("QUIT",4));
}
예제 #14
0
void Menu::init(sf::RenderWindow *app) {
	this->app = app;

	font.loadFromFile("res/fonts/arial.ttf");

	sf::Text t;
	t.setFont(font);
	t.setCharacterSize(40);
	t.setColor(sf::Color::White);

	items.push_back(MenuItem(t, "New Game", GAME));
	items.push_back(MenuItem(t, "Load Game", EXIT));
	items.push_back(MenuItem(t, "Tutorial", EXIT));
	items.push_back(MenuItem(t, "Exit", EXIT));
}
예제 #15
0
int TextSetup::setBootLoader() {
	settings["fbmode"] = "text"; // Required for compatibility
	
	// TODO: Stub - initrd options
	settings["initrd_delay"] = "0";
	settings["initrd_modules"] = "";
	settings["kernel_options"] = "";
	settings["tmpfs_tmp"] = "0";
	// END OF STUB
	
	string fstype;
	vector<MenuItem> m;
	m.push_back(MenuItem("MBR", _("Install in Master Boot Record (recommended")));
	m.push_back(MenuItem("Partition", _("Install on partition (for advanced users only)")));
	m.push_back(MenuItem("None", _("Do not install bootloader (think twice!)")));

	
	string b_type = ncInterface.showMenu2(_("Select where to install bootloader. If in doubt, select 'MBR'. All other options requires some additional preparations, which you should do manually."), m, "MBR");
	if (b_type=="None") {
		settings["bootloader"]="none";
		return 0;
	}
		m.clear();
	if (b_type=="MBR") {
		for (size_t i=0; i<mech.drives.size(); ++i) {
			m.push_back(MenuItem(mech.drives[i].tag, mech.drives[i].value));
		}

		settings["bootloader"] = ncInterface.showMenu2(_("Select disk for bootloader. Note for GPT users: you need a hybrid partition table to use GRUB on it."), m);
		if (settings["bootloader"].empty()) return setBootLoader();
	}
	else if (b_type=="Partition") {
		for (size_t i=0; i<mech.partitions.size(); ++i) {
			// Blacklist some unbootable stuff
			fstype = partitions[mech.partitions[i].devname]["fs"]=="NONE";
			if (fstype=="NONE") fstype = mech.partitions[i].fstype;
			if (partitions[mech.partitions[i].devname]["mountpoint"].empty()) continue;
			if (partitions[mech.partitions[i].devname]["mountpoint"]=="swap") continue;
			if (fstype=="xfs" || fstype=="swap" || fstype=="unformatted") continue;
			m.push_back(MenuItem(mech.partitions[i].devname, humanizeSize((int64_t) atol(mech.partitions[i].size.c_str())*(int64_t) 1048576) + ", " + fstype + " " + partitions[mech.partitions[i].devname]["mountpoint"]));
		}
		settings["bootloader"] = ncInterface.showMenu2(_("Select partition for bootloader. Note: not all partitions listed here are suitable for keeping bootloader on it."), m);
		if (settings["bootloader"].empty()) return setBootLoader();
	}
	else return 1;
	
	return 0;
}
예제 #16
0
파일: root.cpp 프로젝트: SirAnthony/mpkg
int main(int, char **) {
	dialogMode = true;
	CursesInterface ncInterface;
	ncInterface.setTitle(_("AgiliaLinux setup"));
	ncInterface.setSubtitle(_("Root partition selection"));
	vector<pEntry> rootList = getPartitionList();
	if (rootList.empty()) {
		ncInterface.showMsgBox(_("No partitions found for root filesystem. Create it first."));
		return 1;
	}

	string swapPartition = ReadFile(SETUPCONFIG_SWAP);
	vector<MenuItem> menuItems;
	int def_id=0;
	for (size_t i=0; i<rootList.size(); i++) {
		menuItems.push_back(MenuItem(rootList[i].devname, rootList[i].fstype + " (" + rootList[i].size + "Mb)"));
		if (rootList[i].devname==swapPartition) continue;
	}

	string rootPartition;
	int rootSelectNum;
	rootSelectNum = ncInterface.showMenu(_("Choose root partition for AgiliaLinux:"), menuItems, def_id);
		
	if (rootSelectNum<0) return 1;
	rootPartition = rootList[rootSelectNum].devname;
	
	WriteFile(SETUPCONFIG_ROOT, rootPartition);
	return 0;
}
예제 #17
0
void SingleTaskMenu::build()
{
    TaskFactoryPtr factory = m_app.factory();
    TaskPtr specimen = factory->create(m_tablename);

    // Common items
    QString info_icon_filename = UiFunc::iconFilename(UiConst::ICON_INFO);
    m_items = {
        MenuItem(tr("Options")).setLabelOnly(),
        MAKE_CHANGE_PATIENT(app),
        MenuItem(
            tr("Task information"),
            HtmlMenuItem(
                m_title,
                FileFunc::taskHtmlFilename(specimen->infoFilenameStem()),
                info_icon_filename),
            info_icon_filename
        ),
        MenuItem(tr("Task instances") + ": " + m_title).setLabelOnly(),
    };

    // Task items
    TaskPtrList tasklist = factory->fetch(m_tablename);
    qDebug() << Q_FUNC_INFO << "-" << tasklist.size() << "tasks";
    for (auto task : tasklist) {
        m_items.append(MenuItem(task, false));
    }

    // Call parent buildMenu()
    MenuWindow::build();

    // Signals
    connect(&m_app, &CamcopsApp::selectedPatientChanged,
            this, &SingleTaskMenu::selectedPatientChanged,
            Qt::UniqueConnection);
    connect(&m_app, &CamcopsApp::taskAlterationFinished,
            this, &SingleTaskMenu::taskFinished,
            Qt::UniqueConnection);
    connect(this, &SingleTaskMenu::offerAdd,
            m_p_header, &MenuHeader::offerAdd,
            Qt::UniqueConnection);
    connect(m_p_header, &MenuHeader::addClicked,
            this, &SingleTaskMenu::addTask,
            Qt::UniqueConnection);

    emit offerAdd(m_anonymous || m_app.patientSelected());
}
예제 #18
0
/** @brief Load the list of MenuItems available in the xml cfg file
* @remarks Fill the internal m_MenuItemList list.
* @param _XMLNode The current node that should be opened on <commands><commandlist>
* @throw exception thrown by MSXML usage
*/
void MenuCommandSetCfg::_LoadMenuItemList(MSXML::IXMLDOMNodePtr _XMLNode)
{
	if(NULL==_XMLNode){
		return;
	}
	const _bstr_t ATTR_NAME(_T("name"));
	const _bstr_t ATTR_CMDID(_T("cmdid"));
	const _bstr_t ATTR_BITMAP(_T("bitmap"));
	const _bstr_t ATTR_TOOLTIP(_T("tooltip"));
	const _bstr_t ATTR_STATUS(_T("status"));

	std::string		sFolder= _GetBitmapFolder();
	std::string		sName;
	std::string		sBitmap;
	std::string		sTooltip;
	std::string		sStatus;
	std::string		sCmdId;
	CmdMenuItem_t	CmdId;

	MenuItem oItem;
	MSXML::IXMLDOMNodePtr XMLNode= _XMLNode->firstChild;
	MSXML::IXMLDOMNodePtr XMLAttribute;
	while(XMLNode)
	{
		CmdId= CmdNone;
		sName.empty();
		sCmdId.empty();
		sBitmap.empty();
		sTooltip.empty();
		sStatus.empty();

		XMLAttribute= XMLNode->attributes->getNamedItem(ATTR_CMDID);
		if(XMLAttribute){
			sCmdId= XMLAttribute->text;
			CmdId= (CmdMenuItem_t)atoi(sCmdId.c_str());
		}
		XMLAttribute= XMLNode->attributes->getNamedItem(ATTR_BITMAP);
		if(XMLAttribute){
			sBitmap= sFolder;
			sBitmap.append(XMLAttribute->text);
		}
		XMLAttribute= XMLNode->attributes->getNamedItem(ATTR_TOOLTIP);
		if(XMLAttribute){
			sTooltip= XMLAttribute->text;
		}
		XMLAttribute= XMLNode->attributes->getNamedItem(ATTR_STATUS);
		if(XMLAttribute){
			sStatus= XMLAttribute->text;
		}
		XMLAttribute= XMLNode->attributes->getNamedItem(ATTR_NAME);
		if(XMLAttribute){
			sName= XMLAttribute->text;
		}

		m_MenuItemList.push_back(MenuItem(CmdId, sName.c_str(), sTooltip.c_str(), sStatus.c_str(), sBitmap.c_str()));

		XMLNode = XMLNode->nextSibling;
	}
}
예제 #19
0
QList<QAction *> SinglePageWidget::createViewActions(QList<ItemView::Mode> modes)
{
    QList<QPair<QString, int> > vals;
    for (ItemView::Mode m: modes) {
        vals.append(MenuItem(viewTypeString(m), m));
    }
    return createActions(vals, view->viewMode(), this, SLOT(viewModeSelected()));
}
예제 #20
0
bool WrapperDLL::Tool_MenuItem(void* self,const char16_t* label,const char16_t* shortcut,bool* p_selected){
	auto self_ = (Tool*)self;
	auto arg0 = label;
	auto arg1 = shortcut;
	auto arg2 = p_selected;
	auto ret = self_->MenuItem(arg0,arg1,arg2);
	return ret;
};
예제 #21
0
 ColourDialog( int num, const int* cols ) 
   : MenuDialog(this,"pen"),
     m_colours(cols)					     
 {
   m_columns = 4;
   m_buttonDim = Vec2(BUTTON_HEIGHT, BUTTON_HEIGHT);
   for (int i=0; i<num; i++) {
     switch(i) {
     case 0: addItem( MenuItem("O",Event(Event::SELECT,1,i)) ); break;
     case 1: addItem( MenuItem("X",Event(Event::SELECT,1,i)) ); break;
     default: addItem( MenuItem("/",Event(Event::SELECT,1,i)) ); break;
     }
   }
   Vec2 size = m_buttonDim*5;
   sizeTo(size);
   m_targetPos = Vec2(SCREEN_WIDTH - m_pos.width(),0);
 }
예제 #22
0
파일: menu.c 프로젝트: merckhung/oluxos
void MenuInit( void ) {

    MenuBackground();
    MenuTitle();
    MenuItem();
    MenuCentral();
    MenuHelp();
}
예제 #23
0
int TextSetup::setNetworkSettings() {
	// Three things: hostname, network name, network manager.
	// TODO: error handling (empty input, insane values, and so on).
	settings["hostname"] = ncInterface.showInputBox(_("Enter hostname:"), "agilia-box");
	settings["netname"] = ncInterface.showInputBox(_("Enter network name. Leave 'example.net' for intranet:"), "example.net");
	
	int hasNetworkManager = system("[ \"`cat /tmp/setup_variants/" + settings["setup_variant"] + ".list | grep '^NetworkManager$'`\" = \"\" ]");
	int hasWicd = system("[ \"`cat /tmp/setup_variants/" + settings["setup_variant"] + ".list | grep '^wicd$'`\" = \"\" ]");

	vector<MenuItem> m;
	if (hasNetworkManager) m.push_back(MenuItem("networkmanager", "Network Manager"));
	if (hasWicd) m.push_back(MenuItem("wicd", "Wicd"));
	m.push_back(MenuItem("netconfig", "Manual configuration via /etc/conf.d/network"));
	if (m.size()==1) settings["netman"]="netconfig";
	else settings["netman"] = ncInterface.showMenu2(_("Select the way you wish to manage your network:"), m);

	return 0;
}
예제 #24
0
void HMenuField::ResizeLocalized(const char* label, const char* itemLabel)
{
	SetLabel(label);
	BMenuItem* item = MenuItem();
	if (item && itemLabel)
		item->SetLabel(itemLabel);
	SetDivider(label == NULL ? 0 : StringWidth(label)+StringWidth("n"));
	ResizeToPreferred();
} /* HMenuField::ResizeLocalized */
예제 #25
0
vector<MenuItem> TextSetup::getKnownFilesystems() {
	vector<MenuItem> formatOptions;
	formatOptions.push_back(MenuItem("ext4", _("4th version of standard linux filesystem"), _("New version of EXT, developed to superseed EXT3. The fastest journaling filesystem in most cases.")));
	formatOptions.push_back(MenuItem("ext3", _("Standard journaling Linux filesystem"), _("Seems to be a best balance between reliability and performance")));
	formatOptions.push_back(MenuItem("ext2", _("Standard Linux filesystem (without journaling)."), _("Old, stable, very fast (it doesn't use jounal), but less reliable")));
	formatOptions.push_back(MenuItem("xfs", _("Fast filesystem developed by SGI"), _("The best choise to store data (especially large files). Supports online defragmentation and other advanced features. Not recommended to use as root FS or /home")));
	formatOptions.push_back(MenuItem("jfs", _("Journaling filesystem by IBM"), _("Another good filesystem for general use.")));
	formatOptions.push_back(MenuItem("reiserfs", _("Journaling filesystem developed by Hans Reiser"), _("ReiserFS is a general-purpose, journaled computer file system designed and implemented by a team at Namesys led by Hans Reiser. ReiserFS is currently supported on Linux. Introduced in version 2.4.1 of the Linux kernel, it was the first journaling file system to be included in the standard kernel")));
	formatOptions.push_back(MenuItem("btrfs", _("B-Tree FS, new EXPERIMENTAL filesystem similar to ZFS. Separate /boot partition required to use it as root filesystem.")));
	formatOptions.push_back(MenuItem("nilfs2", _("NILFS2, new EXPERIMENTAL snapshot-based filesystem. Separate /boot partition required to use it as root filesystem.")));

	formatOptions.push_back(MenuItem("NONE", _("Do not format (use as is and keep data)")));
	return formatOptions;

}
예제 #26
0
파일: menu.cpp 프로젝트: SGOrava/Tetris
void Menu::addItem(const char* nazov, void (* action)(game*))
{
	MenuItem item = MenuItem(nazov, action);

	polozky.push_back(item);

	# ifdef DEBUG
		cout << "Item was added" << endl;
	# endif
}
예제 #27
0
파일: raidtool.cpp 프로젝트: khvalera/mpkg
int raidStopMenu() {
    vector<RaidArray> activeArrays;
    vector<MenuItem> menuItems;
    string ret;
    while(true) {
        activeArrays = getActiveRaidArrays();
        menuItems.clear();
        for (unsigned int i=0; i<activeArrays.size(); ++i) {
            menuItems.push_back(MenuItem(activeArrays[i].md_dev, activeArrays[i].extra_description));
        }
        menuItems.push_back(MenuItem("OK", "Готово"));
        ret = ncInterface.showMenu2("Выберите массив для остановки", menuItems);
        if (ret.find("/dev/")==std::string::npos) return 0;
        if (stopRaidArray(ret)) {
            ncInterface.showMsgBox("RAID-массив остановить не удалось");
        }
    }
    return 0;
}
예제 #28
0
	void Menu(int Index)
	{
	MLeft=40;
	MTop=60;
	MWidth=340;
	MenuItem(MLeft,MTop+50,MWidth,"1.Recieve File.");
	if(Index==1)
	{
	Draw(1);
	}
	else
	{
	Draw(0);
	}
	MenuItem(MLeft,MTop+30,MWidth,"2.Send File.");
	if(Index==2)
	{
	Draw(1);
	}
	else
	{
	Draw(0);
	}
	MenuItem(MLeft,MTop+30,MWidth,"3.Chat Utility.");
	if(Index==3)
	{
	Draw(1);
	}
	else
	{
	Draw(0);
	}
	MenuItem(MLeft,MTop+30,MWidth,"4.Exit.");
	if(Index==4)
	{
	Draw(1);
	}
	else
	{
	Draw(0);
	}
	}
예제 #29
0
void HJ125T_10Presenter::realPreparePage()
{
  auto result = _watcher.result();

  if (result == CommunicationFail) {
    quit();
    return;
  }

  QString name = RSystemDB::queryText("Read Current Trouble Code");
  _funcSelected[name] = boost::bind(&HJ125T_10Presenter::readCurrentTroubleCode, this);
  emit itemAdd(MenuItem(name, READ_CURRENT_TROUBLE_CODE_ICON, READ_CURRENT_TROUBLE_CODE_ICON_S));

  name = RSystemDB::queryText("Read History Trouble Code");
  _funcSelected[name] = boost::bind(&HJ125T_10Presenter::readHistoryTroubleCode, this);
  emit itemAdd(MenuItem(name, READ_HISTORY_TROUBLE_CODE_ICON, READ_HISTORY_TROUBLE_CODE_ICON_S));

  name = RSystemDB::queryText("Clear Trouble Code");
  _funcSelected[name] = boost::bind(&HJ125T_10Presenter::clearTroubleCode, this);
  emit itemAdd(MenuItem(name, CLEAR_TROUBLE_CODE_ICON, CLEAR_TROUBLE_CODE_ICON_S));

  name = AppInst().db().getText("TPS Idle Adjustment", "Mikuni");
  _funcSelected[name] = boost::bind(&HJ125T_10Presenter::tpsIdleSetting, this);
  emit itemAdd(MenuItem(name, TPS_IDLE_SETTING_ICON, TPS_IDLE_SETTING_ICON_S));

  name = AppInst().db().getText("Long Term Learn Value Zone Initialization", "Mikuni");
  _funcSelected[name] = boost::bind(&HJ125T_10Presenter::longTermLearnValueZoneInitialization, this);
  emit itemAdd(MenuItem(name, LONG_TERM_LEARNING_VALUE_INITIALIZATION_ICON, LONG_TERM_LEARNING_VALUE_INITIALIZATION_ICON_S));

  name = AppInst().db().getText("ISC Learn Value Initialize", "Mikuni");
  _funcSelected[name] = boost::bind(&HJ125T_10Presenter::iscLearnValueInitialization, this);
  emit itemAdd(MenuItem(name, ISC_LEARN_VALUE_INITIALIZATION_ICON, ISC_LEARN_VALUE_INITIALIZATION_ICON_S));

  emit hideStatus();
}
예제 #30
0
int Menu::Output::Menu()
{
	cout << " --- Action ---";
	MenuItem("Create list", Command::Create);
	MenuItem("Add char to list", Command::Add);
	MenuItem("Remove char from list", Command::Remove);
	MenuItem("Copy list", Command::Copy);
	MenuItem("Delete list", Command::Delete);
	MenuItem("Compare lists", Command::Compare);
	MenuItem("Print list", Command::Print);
	MenuItem("Exit", Command::Exit);
	cout << endl;
	return Menu::Input::Number();
}