Fix build and opening source file in editor.

svn path=/trunk/netsurf/; revision=5485
This commit is contained in:
François Revel 2008-10-05 15:10:22 +00:00
parent 4708c7b259
commit ae7290a2e2
1 changed files with 10 additions and 8 deletions

View File

@ -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;
}
}