summaryrefslogtreecommitdiff
path: root/amiga
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2011-10-29 13:51:19 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2011-10-29 13:51:19 +0000
commitb84ebeed36e7756551be68bbde0e206b0a85d11e (patch)
treec8a1531087629dbfa55ed5fe45451ae4bc896cd3 /amiga
parentd0ad76a77a78b12d2e62cba3b2646a5abb104cc4 (diff)
downloadnetsurf-b84ebeed36e7756551be68bbde0e206b0a85d11e.tar.gz
netsurf-b84ebeed36e7756551be68bbde0e206b0a85d11e.tar.bz2
Stop abusing Messages with continual load of LangNames
svn path=/trunk/netsurf/; revision=13098
Diffstat (limited to 'amiga')
-rwxr-xr-xamiga/gui.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/amiga/gui.c b/amiga/gui.c
index dee27107c..82efa0650 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -244,7 +244,7 @@ bool ami_gui_map_filename(char **remapped, const char *path, const char *file, c
}
if(found == false) *remapped = strdup(file);
- LOG(("Remapped %s to %s in path %s", file, *remapped, path));
+ else LOG(("Remapped %s to %s in path %s using %s", file, *remapped, path, map));
return found;
}
@@ -256,7 +256,7 @@ bool ami_gui_check_resource(char *fullpath, const char *file)
char *remapped;
BPTR lock = 0;
- ami_gui_map_filename(&remapped, fullpath, file, "Resource.map"))
+ ami_gui_map_filename(&remapped, fullpath, file, "Resource.map");
path_add_part(fullpath, 1024, remapped);
if(lock = Lock(fullpath, ACCESS_READ))
@@ -265,7 +265,7 @@ bool ami_gui_check_resource(char *fullpath, const char *file)
found = true;
}
- LOG(("Checking for %s : result %ld", fullpath, found));
+ if(found) LOG(("Found %s", fullpath));
free(remapped);
return found;
@@ -277,6 +277,7 @@ bool ami_locate_resource(char *fullpath, const char *file)
int i;
BPTR lock = 0;
bool found = false;
+ char *remapped;
/* Firstly check the user's selected theme. NB: ami_locate_resource()
* gets called for Messages before options are loaded */
@@ -290,12 +291,6 @@ bool ami_locate_resource(char *fullpath, const char *file)
/* If not found, start on the user's preferred languages */
- if(lock=Lock("PROGDIR:Resources/LangNames",ACCESS_READ))
- {
- UnLock(lock);
- messages_load("PROGDIR:Resources/LangNames");
- }
-
locale = OpenLocale(NULL);
for(i=0;i<10;i++)
@@ -304,7 +299,10 @@ bool ami_locate_resource(char *fullpath, const char *file)
if(locale->loc_PrefLanguages[i])
{
- strcat(fullpath,messages_get(locale->loc_PrefLanguages[i]));
+ ami_gui_map_filename(&remapped, "PROGDIR:Resources",
+ locale->loc_PrefLanguages[i], "LangNames");
+ path_add_part(fullpath, 1024, remapped);
+
found = ami_gui_check_resource(fullpath, file);
}
else