summaryrefslogtreecommitdiff
path: root/beos/beos_fetch_rsrc.cpp
diff options
context:
space:
mode:
authorFran├žois Revel <mmu_man@netsurf-browser.org>2008-10-16 14:24:09 +0000
committerFran├žois Revel <mmu_man@netsurf-browser.org>2008-10-16 14:24:09 +0000
commitb3a5250f994bd772b14dad3472384b8534e0ad4f (patch)
tree711d9b956250102904d625a8db19995dfc5ea736 /beos/beos_fetch_rsrc.cpp
parent6330f8e475bad2aa9dd3f0f7994a25980491023c (diff)
downloadnetsurf-b3a5250f994bd772b14dad3472384b8534e0ad4f.tar.gz
netsurf-b3a5250f994bd772b14dad3472384b8534e0ad4f.tar.bz2
Add Replicant support. No it's not about cyborgs, just embedding NetSurf into another app, like Tracker (the desktop), or documentation browsers like BeHappy...
svn path=/trunk/netsurf/; revision=5583
Diffstat (limited to 'beos/beos_fetch_rsrc.cpp')
-rw-r--r--beos/beos_fetch_rsrc.cpp17
1 files changed, 3 insertions, 14 deletions
diff --git a/beos/beos_fetch_rsrc.cpp b/beos/beos_fetch_rsrc.cpp
index 36bea4206..c595f51cf 100644
--- a/beos/beos_fetch_rsrc.cpp
+++ b/beos/beos_fetch_rsrc.cpp
@@ -47,6 +47,7 @@ extern "C" {
#include "utils/base64.h"
}
#include "beos/beos_fetch_rsrc.h"
+#include "beos/beos_gui.h"
#include <image.h>
#include <Resources.h>
@@ -317,21 +318,9 @@ static void fetch_rsrc_poll(const char *scheme)
*/
static int find_app_resources()
{
- image_info info;
- const char *path = NULL;
- int32 cookie = 0;
- while (get_next_image_info(0, &cookie, &info) == B_OK) {
-//fprintf(stderr, "%p <> %p, %p\n", (char *)&find_app_resources, (char *)info.text, (char *)info.text + info.text_size);
- if (((char *)&find_app_resources >= (char *)info.text)
- && ((char *)&find_app_resources < (char *)info.text + info.text_size)) {
-//fprintf(stderr, "match\n");
- path = info.name;
- break;
- }
- }
- if (path == NULL)
+ char path[B_PATH_NAME_LENGTH];
+ if (nsbeos_find_app_path(path) < B_OK)
return B_ERROR;
-
//fprintf(stderr, "loading resources from '%s'\n", path);
BFile file(path, B_READ_ONLY);