summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2003-12-31 17:09:03 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2003-12-31 17:09:03 +0000
commit05d75afd898d44493717852e5f3c3eae406e5510 (patch)
tree2be54829f6cb984e1bcd3f7207c6af986a65f20b
parent343038c6b49cbd7822974bdf14ee1eb4b88dc346 (diff)
downloadnetsurf-05d75afd898d44493717852e5f3c3eae406e5510.tar.gz
netsurf-05d75afd898d44493717852e5f3c3eae406e5510.tar.bz2
[project @ 2003-12-31 17:09:03 by jmb]
Rename login template to "login". Use OS_GBPB9 to get filename of plugin logos. svn path=/import/netsurf/; revision=474
-rw-r--r--!NetSurf/Resources/en/Templates,fecbin4312 -> 4312 bytes
-rw-r--r--riscos/401login.c6
-rw-r--r--riscos/about.c51
3 files changed, 27 insertions, 30 deletions
diff --git a/!NetSurf/Resources/en/Templates,fec b/!NetSurf/Resources/en/Templates,fec
index b0416adfc..9baecfc61 100644
--- a/!NetSurf/Resources/en/Templates,fec
+++ b/!NetSurf/Resources/en/Templates,fec
Binary files differ
diff --git a/riscos/401login.c b/riscos/401login.c
index 195e4c740..2aa644390 100644
--- a/riscos/401login.c
+++ b/riscos/401login.c
@@ -36,14 +36,12 @@ static struct browser_window *bwin;
void ro_gui_401login_init(void)
{
- char name[20];
+ char name[20] = "login";
int context, window_size, data_size;
char *data;
os_error *e;
- strncpy(name, "dialog_401li", 20);
-
- /* find required buffer sizes */
+ /* find required buffer sizes */
e = xwimp_load_template(wimp_GET_SIZE, 0, 0, wimp_NO_FONTS,
name, 0, &window_size, &data_size, &context);
if (e) {
diff --git a/riscos/about.c b/riscos/about.c
index e7ca7be30..0318f5299 100644
--- a/riscos/about.c
+++ b/riscos/about.c
@@ -28,6 +28,7 @@
#include "oslib/osfile.h"
#include "oslib/osfind.h"
#include "oslib/osfscontrol.h"
+#include "oslib/osgbpb.h"
static const char *pabouthdr = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/transitional.dtd\"><html><head><title>%s</title></head><body bgcolor=\"#f3f3ff\"><!-- About header --><table border=\"0\" width=\"100%%\" bgcolor=\"#94adff\" cellspacing=\"2\"><tr><td><a href=\"http://netsurf.sf.net\"><img src=\"file:///%%3CNetSurf$Dir%%3E/About/nslogo\" alt=\"Netsurf logo\"></a><td><table bgcolor=\"#94adff\" border=\"0\"><tr><td>&nbsp;<tr><td align=\"center\"><h2>NetSurf %s</h2><tr><td align=\"center\"><h5>Copyright &copy; 2002, 2003 NetSurf Developers.</h5><tr><td>&nbsp;</table></table><hr>"; /**< About page header */
static const char *pabtplghd = "<!-- Plugin information --><strong><i>The following plugins are installed on your system:</i></strong><br>&nbsp;<br><table border=\"0\" cellspacing=\"2\" width=\"100%\">"; /**< Plugin table header */
@@ -80,8 +81,8 @@ void about_create(void) {
struct about_page *abt;
struct plugd *temp;
FILE *fp;
- char *buf, *val, var[20], *ptype, *pdetails, *fname, *furl, *p, *leafname;
- int i, nofiles, j, w, h, size, pneeded;
+ char *buf, *val, var[20], *ptype, *pdetails, *fname, *furl;
+ int i, nofiles, j, w, h, size;
fileswitch_object_type fot;
os_error *e;
@@ -177,40 +178,38 @@ void about_create(void) {
/* get actual file name */
sprintf(var, "%2.2d*", j);
LOG(("var: %s", var));
- sprintf(buf, "%s.", val);
- LOG(("buf: %s", buf));
- e = xosfscontrol_canonicalise_path(var, 0, 0, buf, 0, &pneeded);
- if (e) {
- LOG(("%s", e->errmess));
- return;
- }
- fname = xcalloc((unsigned int)(10-pneeded), sizeof(char));
- e = xosfscontrol_canonicalise_path(var, fname, 0, buf,
- (10-pneeded), 0);
+
+ void *name = (void*)xcalloc((unsigned int)20, sizeof(char));
+
+ e = xosgbpb_dir_entries(val, (osgbpb_string_list*)name,
+ 1, 0, 255, var, NULL, NULL);
if (e) {
LOG(("%s", e->errmess));
- return;
+ xfree(name);
+ xfree(pdetails);
+ continue;
}
- LOG(("fname: %s", fname));
- furl = xcalloc(strlen(fname) + 20, sizeof(char));
+ LOG(("fname: %s", (char*)name));
+ sprintf(buf, "%s.%s", val, (char*)name);
+ furl = xcalloc(strlen(buf) + 20, sizeof(char));
/* grab leafname and get width and height */
- p = strrchr(fname, '.');
- leafname = xstrdup(p);
- h = atoi(leafname+7);
- leafname[7] = 0;
- w = atoi(leafname+3);
+ h = atoi((char*)name+6);
+ ((char*)name)[6] = 0;
+ w = atoi((char*)name+2);
+
+ xfree(name);
/* convert to URL */
- __unixify(fname, 0, furl, strlen(fname)+20, 0);
- sprintf(fname, "file://%s", furl);
+ __unixify(buf, 0, furl, strlen(buf)+20, 0);
+ sprintf(buf, "file://%s", furl);
xfree(furl);
- LOG(("furl: %s", fname));
- furl = xcalloc(strlen(paboutpl3) + strlen(ptype) + strlen(fname) + strlen(pdetails) + 10, sizeof(char));
- sprintf(furl, paboutpl3, ptype, fname, ptype, w, h, pdetails);
+ LOG(("furl: %s", buf));
+ furl = xcalloc(strlen(paboutpl3) + strlen(ptype) + strlen(buf) +
+ strlen(pdetails) + 10, sizeof(char));
+ sprintf(furl, paboutpl3, ptype, buf, ptype, w, h, pdetails);
abt->plugd = new_plugin(abt->plugd, furl);
- xfree(fname);
xfree(pdetails);
continue;
}