summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFran├žois Revol <revol@free.fr>2016-11-21 15:16:34 (GMT)
committer Fran├žois Revol <revol@free.fr>2016-11-21 15:16:34 (GMT)
commit35146ef0c8f72526683f306a07d5cc70a070fe85 (patch)
tree1704153134457ffb3883dffb417cdeed8be00bb3
parentbcce8cc7b41f869fa2b022f85622cd389082d0f5 (diff)
downloadnetsurf-35146ef0c8f72526683f306a07d5cc70a070fe85.tar.gz
netsurf-35146ef0c8f72526683f306a07d5cc70a070fe85.tar.bz2
haiku: try to open source in preferred app for source-code first
We still fall back to the hardcoded list, but we first check for the user's prefered code editor.
-rw-r--r--frontends/beos/gui.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/frontends/beos/gui.cpp b/frontends/beos/gui.cpp
index 8c6614d..254fa90 100644
--- a/frontends/beos/gui.cpp
+++ b/frontends/beos/gui.cpp
@@ -877,6 +877,7 @@ void nsbeos_gui_view_source(struct hlcache_handle *content)
// apps to try
const char *editorSigs[] = {
+ "text/x-source-code",
"application/x-vnd.beunited.pe",
"application/x-vnd.XEmacs",
"application/x-vnd.Haiku-StyledEdit",
@@ -891,10 +892,11 @@ void nsbeos_gui_view_source(struct hlcache_handle *content)
BMessenger msgr(editorSigs[i], team);
if (msgr.SendMessage(&m) >= B_OK)
break;
+
}
err = be_roster->Launch(editorSigs[i], (BMessage *)&m, &team);
- if (err >= B_OK)
+ if (err >= B_OK || err == B_ALREADY_RUNNING)
break;
}
}