mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-28 17:23:09 +03:00
[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
This commit is contained in:
parent
343038c6b4
commit
05d75afd89
Binary file not shown.
@ -36,13 +36,11 @@ static struct browser_window *bwin;
|
|||||||
|
|
||||||
void ro_gui_401login_init(void)
|
void ro_gui_401login_init(void)
|
||||||
{
|
{
|
||||||
char name[20];
|
char name[20] = "login";
|
||||||
int context, window_size, data_size;
|
int context, window_size, data_size;
|
||||||
char *data;
|
char *data;
|
||||||
os_error *e;
|
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,
|
e = xwimp_load_template(wimp_GET_SIZE, 0, 0, wimp_NO_FONTS,
|
||||||
name, 0, &window_size, &data_size, &context);
|
name, 0, &window_size, &data_size, &context);
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include "oslib/osfile.h"
|
#include "oslib/osfile.h"
|
||||||
#include "oslib/osfind.h"
|
#include "oslib/osfind.h"
|
||||||
#include "oslib/osfscontrol.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> <tr><td align=\"center\"><h2>NetSurf %s</h2><tr><td align=\"center\"><h5>Copyright © 2002, 2003 NetSurf Developers.</h5><tr><td> </table></table><hr>"; /**< About page header */
|
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> <tr><td align=\"center\"><h2>NetSurf %s</h2><tr><td align=\"center\"><h5>Copyright © 2002, 2003 NetSurf Developers.</h5><tr><td> </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> <br><table border=\"0\" cellspacing=\"2\" width=\"100%\">"; /**< Plugin table header */
|
static const char *pabtplghd = "<!-- Plugin information --><strong><i>The following plugins are installed on your system:</i></strong><br> <br><table border=\"0\" cellspacing=\"2\" width=\"100%\">"; /**< Plugin table header */
|
||||||
@ -80,8 +81,8 @@ void about_create(void) {
|
|||||||
struct about_page *abt;
|
struct about_page *abt;
|
||||||
struct plugd *temp;
|
struct plugd *temp;
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
char *buf, *val, var[20], *ptype, *pdetails, *fname, *furl, *p, *leafname;
|
char *buf, *val, var[20], *ptype, *pdetails, *fname, *furl;
|
||||||
int i, nofiles, j, w, h, size, pneeded;
|
int i, nofiles, j, w, h, size;
|
||||||
fileswitch_object_type fot;
|
fileswitch_object_type fot;
|
||||||
os_error *e;
|
os_error *e;
|
||||||
|
|
||||||
@ -177,40 +178,38 @@ void about_create(void) {
|
|||||||
/* get actual file name */
|
/* get actual file name */
|
||||||
sprintf(var, "%2.2d*", j);
|
sprintf(var, "%2.2d*", j);
|
||||||
LOG(("var: %s", var));
|
LOG(("var: %s", var));
|
||||||
sprintf(buf, "%s.", val);
|
|
||||||
LOG(("buf: %s", buf));
|
void *name = (void*)xcalloc((unsigned int)20, sizeof(char));
|
||||||
e = xosfscontrol_canonicalise_path(var, 0, 0, buf, 0, &pneeded);
|
|
||||||
|
e = xosgbpb_dir_entries(val, (osgbpb_string_list*)name,
|
||||||
|
1, 0, 255, var, NULL, NULL);
|
||||||
if (e) {
|
if (e) {
|
||||||
LOG(("%s", e->errmess));
|
LOG(("%s", e->errmess));
|
||||||
return;
|
xfree(name);
|
||||||
|
xfree(pdetails);
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
fname = xcalloc((unsigned int)(10-pneeded), sizeof(char));
|
LOG(("fname: %s", (char*)name));
|
||||||
e = xosfscontrol_canonicalise_path(var, fname, 0, buf,
|
sprintf(buf, "%s.%s", val, (char*)name);
|
||||||
(10-pneeded), 0);
|
furl = xcalloc(strlen(buf) + 20, sizeof(char));
|
||||||
if (e) {
|
|
||||||
LOG(("%s", e->errmess));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
LOG(("fname: %s", fname));
|
|
||||||
furl = xcalloc(strlen(fname) + 20, sizeof(char));
|
|
||||||
|
|
||||||
/* grab leafname and get width and height */
|
/* grab leafname and get width and height */
|
||||||
p = strrchr(fname, '.');
|
h = atoi((char*)name+6);
|
||||||
leafname = xstrdup(p);
|
((char*)name)[6] = 0;
|
||||||
h = atoi(leafname+7);
|
w = atoi((char*)name+2);
|
||||||
leafname[7] = 0;
|
|
||||||
w = atoi(leafname+3);
|
xfree(name);
|
||||||
|
|
||||||
/* convert to URL */
|
/* convert to URL */
|
||||||
__unixify(fname, 0, furl, strlen(fname)+20, 0);
|
__unixify(buf, 0, furl, strlen(buf)+20, 0);
|
||||||
sprintf(fname, "file://%s", furl);
|
sprintf(buf, "file://%s", furl);
|
||||||
xfree(furl);
|
xfree(furl);
|
||||||
|
|
||||||
LOG(("furl: %s", fname));
|
LOG(("furl: %s", buf));
|
||||||
furl = xcalloc(strlen(paboutpl3) + strlen(ptype) + strlen(fname) + strlen(pdetails) + 10, sizeof(char));
|
furl = xcalloc(strlen(paboutpl3) + strlen(ptype) + strlen(buf) +
|
||||||
sprintf(furl, paboutpl3, ptype, fname, ptype, w, h, pdetails);
|
strlen(pdetails) + 10, sizeof(char));
|
||||||
|
sprintf(furl, paboutpl3, ptype, buf, ptype, w, h, pdetails);
|
||||||
abt->plugd = new_plugin(abt->plugd, furl);
|
abt->plugd = new_plugin(abt->plugd, furl);
|
||||||
xfree(fname);
|
|
||||||
xfree(pdetails);
|
xfree(pdetails);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user