From ce07ebcea8d4c0460b58de7b59bb94734b650cbe Mon Sep 17 00:00:00 2001 From: François Revel Date: Thu, 16 Oct 2008 16:01:44 +0000 Subject: - handle NetPositive what codes; this makes it easy to use NetSurf instead by just changing the archived message used to instantiate it. - fix background view color, some host apps hide the BDragger, making it visible. - handle mailto: urls as a special case, we historically use the prefered app for text/x-email. svn path=/trunk/netsurf/; revision=5584 --- beos/beos_gui.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'beos/beos_gui.cpp') diff --git a/beos/beos_gui.cpp b/beos/beos_gui.cpp index a0ff9ce81..2e8d2ca0f 100644 --- a/beos/beos_gui.cpp +++ b/beos/beos_gui.cpp @@ -162,6 +162,15 @@ NSBrowserApplication::MessageReceived(BMessage *message) case 'urlc': case 'urle': case 'menu': + // NetPositive messages + case B_NETPOSITIVE_OPEN_URL: + case B_NETPOSITIVE_BACK: + case B_NETPOSITIVE_FORWARD: + case B_NETPOSITIVE_HOME: + case B_NETPOSITIVE_RELOAD: + case B_NETPOSITIVE_STOP: + case B_NETPOSITIVE_DOWN: + case B_NETPOSITIVE_UP: //DetachCurrentMessage(); //nsbeos_pipe_message(message, this, fGuiWindow); break; @@ -943,6 +952,11 @@ void gui_launch_url(const char *url) BString arg(url); mimeType.Append(arg, arg.FindFirst(":")); + // special case, text/x-email is used traditionally + // use it instead + if (arg.IFindFirst("mailto:") == 0) + mimeType = "text/x-email"; + // the protocol should be alphanum // we just check if it's registered // if not there is likely no supporting app anyway -- cgit v1.2.3