summaryrefslogtreecommitdiff
path: root/beos
diff options
context:
space:
mode:
authorFran├žois Revol <revol@free.fr>2014-07-31 11:33:39 +0200
committerFran├žois Revol <revol@free.fr>2014-07-31 11:33:39 +0200
commit43fea75b7290cdcbfafa8e159dc3832581352755 (patch)
treebf4e562c8e4ffab43f75639fc76a85f6a93f0646 /beos
parent116149c61c3d14da579c9e9be14f48f41ebd4f37 (diff)
downloadnetsurf-43fea75b7290cdcbfafa8e159dc3832581352755.tar.gz
netsurf-43fea75b7290cdcbfafa8e159dc3832581352755.tar.bz2
beos: Disable non-working menu entries
So at lest people won't expect too much.
Diffstat (limited to 'beos')
-rw-r--r--beos/scaffolding.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/beos/scaffolding.cpp b/beos/scaffolding.cpp
index 0f87420a5..45815fa1a 100644
--- a/beos/scaffolding.cpp
+++ b/beos/scaffolding.cpp
@@ -1496,7 +1496,7 @@ void nsbeos_attach_toplevel_view(nsbeos_scaffolding *g, BView *view)
}
-static BMenuItem *make_menu_item(const char *name, BMessage *message)
+static BMenuItem *make_menu_item(const char *name, BMessage *message, bool enabled=false)
{
BMenuItem *item;
BString label(messages_get(name));
@@ -1546,6 +1546,8 @@ static BMenuItem *make_menu_item(const char *name, BMessage *message)
item = new BMenuItem(label.String(), message, key, mods);
+ item->SetEnabled(enabled);
+
return item;
}
@@ -1730,7 +1732,7 @@ nsbeos_scaffolding *nsbeos_new_scaffolding(struct gui_window *toplevel)
menu->AddItem(item);
message = new BMessage(APPLICATION_QUIT);
- item = make_menu_item("Quit", message);
+ item = make_menu_item("Quit", message, true);
menu->AddItem(item);
// Page menu
@@ -1778,11 +1780,11 @@ nsbeos_scaffolding *nsbeos_new_scaffolding(struct gui_window *toplevel)
menu->AddItem(item);
message = new BMessage(BROWSER_NEW_WINDOW);
- item = make_menu_item("NewWindow", message);
+ item = make_menu_item("NewWindow", message, true);
menu->AddItem(item);
message = new BMessage(BROWSER_VIEW_SOURCE);
- item = make_menu_item("ViewSrc", message);
+ item = make_menu_item("ViewSrc", message, true);
menu->AddItem(item);
// Object menu
@@ -1809,15 +1811,15 @@ nsbeos_scaffolding *nsbeos_new_scaffolding(struct gui_window *toplevel)
g->menu_bar->AddItem(menu);
message = new BMessage(BROWSER_NAVIGATE_HOME);
- item = make_menu_item("Home", message);
+ item = make_menu_item("Home", message, true);
menu->AddItem(item);
message = new BMessage(BROWSER_NAVIGATE_BACK);
- item = make_menu_item("Back", message);
+ item = make_menu_item("Back", message, true);
menu->AddItem(item);
message = new BMessage(BROWSER_NAVIGATE_FORWARD);
- item = make_menu_item("Forward", message);
+ item = make_menu_item("Forward", message, true);
menu->AddItem(item);
message = new BMessage(BROWSER_NAVIGATE_UP);
@@ -1825,11 +1827,11 @@ nsbeos_scaffolding *nsbeos_new_scaffolding(struct gui_window *toplevel)
menu->AddItem(item);
message = new BMessage(BROWSER_NAVIGATE_RELOAD);
- item = make_menu_item("Reload", message);
+ item = make_menu_item("Reload", message, true);
menu->AddItem(item);
message = new BMessage(BROWSER_NAVIGATE_STOP);
- item = make_menu_item("Stop", message);
+ item = make_menu_item("Stop", message, true);
menu->AddItem(item);
// View menu