summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFran├žois Revel <mmu_man@netsurf-browser.org>2008-10-05 15:10:22 +0000
committerFran├žois Revel <mmu_man@netsurf-browser.org>2008-10-05 15:10:22 +0000
commitae7290a2e292bc0d7247730499471e9fd30493ca (patch)
tree54f759a68d53d84ecc797c28e8d8a4f60460465a
parent4708c7b259dcc71051c8d1c72b0900b41a89be40 (diff)
downloadnetsurf-ae7290a2e292bc0d7247730499471e9fd30493ca.tar.gz
netsurf-ae7290a2e292bc0d7247730499471e9fd30493ca.tar.bz2
Fix build and opening source file in editor.
svn path=/trunk/netsurf/; revision=5485
-rw-r--r--beos/beos_gui.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/beos/beos_gui.cpp b/beos/beos_gui.cpp
index 119c3946c..fe0cba020 100644
--- a/beos/beos_gui.cpp
+++ b/beos/beos_gui.cpp
@@ -875,9 +875,10 @@ void nsbeos_gui_view_source(struct content *content)
warn_user("IOError", strerror(err));
return;
}
- const char *mime = content_mime(content->type);
- file.WriteAttr("BEOS:TYPE", B_MIME_STRING_TYPE, 0LL,
- mime, strlen(mime) + 1);
+ const char *mime = content->mime_type;
+ if (mime)
+ file.WriteAttr("BEOS:TYPE", B_MIME_STRING_TYPE, 0LL,
+ mime, strlen(mime) + 1);
}
@@ -900,14 +901,15 @@ void nsbeos_gui_view_source(struct content *content)
int i;
for (i = 0; editorSigs[i]; i++) {
team_id team = -1;
- BMessenger msgr(editorSigs[i], team);
- if (msgr.SendMessage(&m) >= B_OK)
- break;
- if (be_roster->Launch(editorSigs[i], (BMessage *)NULL, &team) >= B_OK) {
- snooze(1000);
+ {
+ 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)
+ break;
}
}