[project @ 2003-12-19 01:00:22 by jmb]

Add build date to Info dialog.
Move populate_version into utils

svn path=/import/netsurf/; revision=433
This commit is contained in:
John Mark Bell 2003-12-19 01:00:22 +00:00
parent 4f52950690
commit 7d67bd5a31
2 changed files with 8 additions and 37 deletions

View File

@ -27,7 +27,6 @@
#include "oslib/osfind.h"
#include "oslib/osfscontrol.h"
static const char *version = "%s (%s %s %s)"; /**< version string prototype */
static const char *pabouthdr = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/transitional.dtd\"><html><head><title>About NetSurf</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 */
static const char *paboutpl1 = "<tr valign=\"top\"><td width=\"30%%\"><font size=\"2\"><strong>%s</strong></font></td><td width=\"70%%\"><font size=\"2\">%s</font></td></tr><tr><td colspan=\"2\" bgcolor=\"#dddddd\" height=\"1\"></td></tr>"; /**< Plugin entry without image */
@ -55,39 +54,6 @@ struct plugd {
};
struct plugd *new_plugin(struct plugd *pd, char* details);
char* populate_version(void);
/**
* Fills in the version string.
* The release version is defined in the Messages file.
*/
char *populate_version(void) {
char *p;
char *day;
char *mon;
char *year;
char *temp = xcalloc(12, sizeof(char));
char *ret = xcalloc(30, sizeof(char));
sprintf(temp, "%s", __DATE__);
p = strchr(temp, ' ');
*p = 0;
mon = strdup(temp);
if (strchr(p+1, ' ') == p+1)
day = p+2;
else
day = p+1;
p = strchr(day, ' ');
*p = 0;
year = p+1;
sprintf(ret, version, messages_get("Version:CVS Test Build"), day, mon, year);
xfree(temp);
return ret;
}
/**
* Adds a plugin's details to the head of the linked list of plugin details

View File

@ -64,9 +64,14 @@ static void set_icon_string_i(wimp_w w, wimp_i i, int num);
void ro_gui_dialog_init(void)
{
char *ver;
dialog_info = ro_gui_dialog_create("info");
/* fill in about box version info */
set_icon_string(dialog_info, 4, messages_get("Version:CVS Test Build"));
ver = populate_version();
set_icon_string(dialog_info, 4, ver);
xfree(ver);
dialog_saveas = ro_gui_dialog_create("saveas");
dialog_config = ro_gui_dialog_create("config");
dialog_config_br = ro_gui_dialog_create("config_br");
@ -228,7 +233,7 @@ void ro_gui_dialog_click_config_br(wimp_pointer *pointer)
break;
case ICON_CONFIG_BR_EXPLAIN:
bw = create_browser_window(browser_TITLE | browser_TOOLBAR |
browser_SCROLL_X_ALWAYS | browser_SCROLL_Y_ALWAYS, 320, 256);
browser_SCROLL_X_ALWAYS | browser_SCROLL_Y_ALWAYS, 320, 256, NULL);
gui_window_show(bw->window);
browser_window_open_location(bw, GESTURES_URL);
break;
@ -291,7 +296,7 @@ void ro_gui_dialog_click_config_th(wimp_pointer *pointer)
break;
case ICON_CONFIG_TH_GET:
bw = create_browser_window(browser_TITLE | browser_TOOLBAR |
browser_SCROLL_X_ALWAYS | browser_SCROLL_Y_ALWAYS, 480, 320);
browser_SCROLL_X_ALWAYS | browser_SCROLL_Y_ALWAYS, 480, 320, NULL);
gui_window_show(bw->window);
browser_window_open_location(bw, THEMES_URL);
break;