Added "Disable IDE DMA" safemode option.
MenuItem::SetData() now asks for a const parameter. The safemode menu options now set their MenuItem::Data() to the safemode option string. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12191 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
a350a0f58e
commit
2d7ad656ec
@ -1,7 +1,7 @@
|
||||
/*
|
||||
** Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
** Distributed under the terms of the Haiku License.
|
||||
*/
|
||||
* Copyright 2004-2005, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef KERNEL_BOOT_MENU_H
|
||||
#define KERNEL_BOOT_MENU_H
|
||||
|
||||
@ -43,8 +43,8 @@ class MenuItem : public DoublyLinkedListLinkImpl<MenuItem> {
|
||||
void SetType(menu_item_type type);
|
||||
menu_item_type Type() const { return fType; }
|
||||
|
||||
void SetData(void *data);
|
||||
void *Data() const { return fData; }
|
||||
void SetData(const void *data);
|
||||
const void *Data() const { return fData; }
|
||||
|
||||
void SetHelpText(const char *text);
|
||||
const char *HelpText() const { return fHelpText; }
|
||||
@ -63,7 +63,7 @@ class MenuItem : public DoublyLinkedListLinkImpl<MenuItem> {
|
||||
bool fIsEnabled;
|
||||
menu_item_type fType;
|
||||
Menu *fMenu, *fSubMenu;
|
||||
void *fData;
|
||||
const void *fData;
|
||||
const char *fHelpText;
|
||||
};
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
** Copyright 2003-2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
** Distributed under the terms of the Haiku License.
|
||||
*/
|
||||
* Copyright 2003-2005, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
|
||||
#include "menu.h"
|
||||
@ -16,6 +16,7 @@
|
||||
#include <boot/vfs.h>
|
||||
#include <boot/platform.h>
|
||||
#include <boot/stdio.h>
|
||||
#include <safemode.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
@ -109,7 +110,7 @@ MenuItem::SetEnabled(bool enabled)
|
||||
|
||||
|
||||
void
|
||||
MenuItem::SetData(void *data)
|
||||
MenuItem::SetData(const void *data)
|
||||
{
|
||||
fData = data;
|
||||
}
|
||||
@ -404,8 +405,13 @@ add_safe_mode_menu()
|
||||
MenuItem *item;
|
||||
|
||||
safeMenu->AddItem(item = new MenuItem("Safe mode"));
|
||||
item->SetData(B_SAFEMODE_SAFE_MODE);
|
||||
item->SetType(MENU_ITEM_MARKABLE);
|
||||
safeMenu->AddItem(item = new MenuItem("Disable user add-ons"));
|
||||
item->SetData(B_SAFEMODE_DISABLE_USER_ADD_ONS);
|
||||
item->SetType(MENU_ITEM_MARKABLE);
|
||||
safeMenu->AddItem(item = new MenuItem("Disable IDE DMA"));
|
||||
item->SetData(B_SAFEMODE_DISABLE_IDE_DMA);
|
||||
item->SetType(MENU_ITEM_MARKABLE);
|
||||
|
||||
platform_add_menus(safeMenu);
|
||||
|
Loading…
Reference in New Issue
Block a user