Sparse "About" requester - version number, compile date and URL only.

svn path=/trunk/netsurf/; revision=5697
This commit is contained in:
Chris Young 2008-11-15 23:54:09 +00:00
parent d6874d05b1
commit 52eb07dc5b
2 changed files with 29 additions and 6 deletions

View File

@ -39,6 +39,9 @@
#include "amiga/save_complete.h"
BOOL menualreadyinit;
const char * const netsurf_version;
const char * const versvn;
const char * const verdate;
void ami_menu_scan(struct tree *tree,struct NewMenu *menu);
void ami_menu_scan_2(struct tree *tree,struct node *root,WORD *gen,ULONG *item,struct NewMenu *menu);
@ -112,7 +115,7 @@ struct NewMenu *ami_create_menu(ULONG type)
{ NM_ITEM,0,"K",0,0,0,}, // close tab
{ NM_ITEM,0,0,0,0,0,}, // close window
{ NM_ITEM,NM_BARLABEL,0,0,0,0,},
{ NM_ITEM,0,"?",NM_ITEMDISABLED,0,0,}, // about
{ NM_ITEM,0,"?",0,0,0,}, // about
{ NM_ITEM,0,"Q",0,0,0,}, // quit
{NM_TITLE,0,0,0,0,0,}, // edit
{ NM_ITEM,0,"C",0,0,0,}, // copy
@ -506,7 +509,20 @@ void ami_menupick(ULONG code,struct gui_window_2 *gwin,struct MenuItem *item)
break;
case 9: // about
// do nothing
ami_update_pointer(gwin->win,GUI_POINTER_WAIT);
TimedDosRequesterTags(
TDR_ImageType,TDRIMAGE_INFO,
TDR_TitleString,messages_get("NetSurf"),
TDR_Window,gwin->win,
TDR_GadgetString,messages_get("OK"),
TDR_FormatString,"NetSurf %s\n%s (%s)\n\nhttp://www.netsurf-browser.org",
TDR_Arg1,netsurf_version,
TDR_Arg2,versvn,
TDR_Arg3,verdate,
TAG_DONE);
ami_update_pointer(gwin->win,GUI_POINTER_DEFAULT);
break;
case 10: // quit

View File

@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* This file generates an AmigaOS compliant version string in version.h */
/* This file generates an AmigaOS compliant version string in version.c */
address command 'svn info >t:ns_svn'
@ -38,8 +38,15 @@ if open('tmp','desktop/version.c','R') then do
end
majorver = compress(word(var,5),";")
date = translate(date('E'),'.','/')
say '/* This file was automatically generated from version.rexx */'
say 'static __attribute__((used)) char verstag[] = "\0$VER: NetSurf' majorver || '.' || svnrev '(' || date || ')\0";'
/* ARexx only returns two digits for year, but AmigaOS version string dates are
* supposed to have four digits for the year, so the below specifies the prefix
* (century-1 really). This will need to be increased in 2100 and every hundred
* years thereafter, if this script is still in use :-) */
century = 20
date = translate(left(date('E'),6) || century || right(date('E'),2),'.','/')
say '/* This file was automatically generated by version.rexx */'
say 'static const __attribute__((used)) char *verstag = "\0$VER: NetSurf' majorver || '.' || svnrev '(' || date || ')\0";'
say 'const char * const versvn = "SVN' svnrev || '";'
say 'const char * const verdate = "' || date || '";'