mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-28 01:09:39 +03:00
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.
This commit is contained in:
parent
bcce8cc7b4
commit
35146ef0c8
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user