From d2f5d19da68c376161b30f3651c92e89036bf34e Mon Sep 17 00:00:00 2001 From: François Revel Date: Thu, 2 Oct 2008 17:03:39 +0000 Subject: Partially fix menu shortcut handling, however I'm not sure how to set Function keys... svn path=/trunk/netsurf/; revision=5472 --- beos/beos_scaffolding.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'beos') 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) { -- cgit v1.2.3