From 1d03aaeea71aac9f3c4b2e4f879a0a5e572d9ca2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Thu, 18 Jan 2007 10:29:19 +0000 Subject: [PATCH] When an app sig has been given, use it instead of the mime type to open docs. This way 'open application/x-vnd.Be-NPOS foo.html' would work as expected, instead of opening NetPos and open the file in the default browser. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19853 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/bin/open.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bin/open.cpp b/src/bin/open.cpp index b93feaf3d0..e1aed07048 100644 --- a/src/bin/open.cpp +++ b/src/bin/open.cpp @@ -20,7 +20,7 @@ const char *kTrackerSignature = "application/x-vnd.Be-TRAK"; -const char *openWith = kTrackerSignature; +const char *openWith = NULL; status_t OpenFile(BEntry &entry, int32 line=-1, int32 col=-1) @@ -29,7 +29,7 @@ status_t OpenFile(BEntry &entry, int32 line=-1, int32 col=-1) entry_ref ref; entry.GetRef(&ref); - BMessenger target(openWith); + BMessenger target(openWith?openWith:kTrackerSignature); if (target.IsValid()) { BMessage message(B_REFS_RECEIVED); message.AddRef("refs", &ref); @@ -89,7 +89,7 @@ main(int argc, char **argv) mimeType.Append(arg, arg.FindFirst(":")); char *args[2] = { *argv, NULL }; - status = be_roster->Launch(mimeType.String(), 1, args); + status = be_roster->Launch(openWith?openWith:mimeType.String(), 1, args); if (status == B_OK) continue;