summaryrefslogtreecommitdiff
path: root/beos/beos_scaffolding.cpp
diff options
context:
space:
mode:
authorFrançois Revel <mmu_man@netsurf-browser.org>2008-10-02 17:03:39 +0000
committerFrançois Revel <mmu_man@netsurf-browser.org>2008-10-02 17:03:39 +0000
commitd2f5d19da68c376161b30f3651c92e89036bf34e (patch)
tree3f9e2f9f378ba92bf303061049f2d2c1a7329269 /beos/beos_scaffolding.cpp
parent121ac2c698ad17e656d6c4ad9b537c53a2adc578 (diff)
downloadnetsurf-d2f5d19da68c376161b30f3651c92e89036bf34e.tar.gz
netsurf-d2f5d19da68c376161b30f3651c92e89036bf34e.tar.bz2
Partially fix menu shortcut handling, however I'm not sure how to set Function keys...
svn path=/trunk/netsurf/; revision=5472
Diffstat (limited to 'beos/beos_scaffolding.cpp')
-rw-r--r--beos/beos_scaffolding.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/beos/beos_scaffolding.cpp b/beos/beos_scaffolding.cpp
index 26209a7d2..521898f96 100644
--- a/beos/beos_scaffolding.cpp
+++ b/beos/beos_scaffolding.cpp
@@ -1200,10 +1200,11 @@ static BMenuItem *make_menu_item(const char *name, BMessage *msg)
if (start > 0 && (label.Length() - start > 1)
&& (label.Length() - start < 7)
&& (label[start + 1] == 'F'
+ || !strcmp(label.String() + start + 1, "PRINT")
|| label[start + 1] == '\xe2'
|| label[start + 1] == '^')) {
- label.MoveInto(accel, start, label.Length());
+ label.MoveInto(accel, start + 1, label.Length());
// strip the trailing spaces
while (label[label.Length() - 1] == ' ')
label.Truncate(label.Length() - 1);
@@ -1216,6 +1217,11 @@ static BMenuItem *make_menu_item(const char *name, BMessage *msg)
accel.RemoveFirst("^");
mods |= B_CONTROL_KEY; // ALT!!!
}
+ if (accel.FindFirst("PRINT") > -1) {
+ accel.RemoveFirst("PRINT");
+ //mods |= ; // ALT!!!
+ key = B_PRINT_KEY;
+ }
if (accel.Length() > 1 && accel[0] == 'F') { // Function key
int num;
if (sscanf(accel.String(), "F%d", &num) > 0) {