summaryrefslogtreecommitdiff
path: root/amiga/menu.c
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2011-03-13 18:51:25 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2011-03-13 18:51:25 +0000
commit10a70af7bed316619f1b541eea228db7dbd6ecb2 (patch)
tree78a66ffaf4f8f98b4b1c277eca74b9e22dd6c84b /amiga/menu.c
parentdd5b65e33bfc73ad707d6aca92db4f842689581f (diff)
downloadnetsurf-10a70af7bed316619f1b541eea228db7dbd6ecb2.tar.gz
netsurf-10a70af7bed316619f1b541eea228db7dbd6ecb2.tar.bz2
Add Credits and Licence buttons to About requester.
svn path=/trunk/netsurf/; revision=12031
Diffstat (limited to 'amiga/menu.c')
-rwxr-xr-xamiga/menu.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/amiga/menu.c b/amiga/menu.c
index f70ace127..27c32308c 100755
--- a/amiga/menu.c
+++ b/amiga/menu.c
@@ -66,6 +66,7 @@
#include "desktop/save_complete.h"
#include "desktop/selection.h"
#include "desktop/textinput.h"
+#include "desktop/plugin.h"
#include "utils/messages.h"
#include "utils/url.h"
@@ -467,22 +468,16 @@ void ami_menu_scan_2(struct tree *tree,struct node *root,WORD *gen,
void ami_menupick(ULONG code,struct gui_window_2 *gwin,struct MenuItem *item)
{
struct browser_window *bw;
- struct gui_window tgw;
ULONG menunum=0,itemnum=0,subnum=0;
menunum = MENUNUM(code);
itemnum = ITEMNUM(code);
subnum = SUBNUM(code);
- bool openwin=false;
- bool opentab=true;
char *temp;
BPTR lock = 0;
char *source_data;
ULONG source_size;
struct bitmap *bm;
-
- tgw.tab_node = NULL;
- tgw.tab = 0;
- tgw.shared = gwin;
+ int sel = 0;
switch(menunum)
{
@@ -490,11 +485,11 @@ void ami_menupick(ULONG code,struct gui_window_2 *gwin,struct MenuItem *item)
switch(itemnum)
{
case 0: // new window
- bw = browser_window_create(option_homepage_url, NULL, 0, true, openwin);
+ bw = browser_window_create(option_homepage_url, NULL, 0, true, false);
break;
case 1: // new tab
- bw = browser_window_create(option_homepage_url, gwin->bw, 0, true, opentab);
+ bw = browser_window_create(option_homepage_url, gwin->bw, 0, true, true);
break;
case 3: // open local file
@@ -652,11 +647,11 @@ void ami_menupick(ULONG code,struct gui_window_2 *gwin,struct MenuItem *item)
case 11: // about
ami_update_pointer(gwin->win,GUI_POINTER_WAIT);
- TimedDosRequesterTags(
+ sel = TimedDosRequesterTags(
TDR_ImageType,TDRIMAGE_INFO,
TDR_TitleString,messages_get("NetSurf"),
TDR_Window,gwin->win,
- TDR_GadgetString,messages_get("OK"),
+ TDR_GadgetString, "OK|Credits|Licence",
#ifndef NDEBUG
TDR_FormatString,"NetSurf %s\n%s\n%s (%s)\n\nhttp://www.netsurf-browser.org",
#else
@@ -672,6 +667,11 @@ void ami_menupick(ULONG code,struct gui_window_2 *gwin,struct MenuItem *item)
TDR_Arg4,verdate,
TAG_DONE);
+ if(sel == 2)
+ browser_window_create("about:credits", NULL, 0, true, false);
+ else if(sel == 0)
+ browser_window_create("about:licence", NULL, 0, true, false);
+
ami_update_pointer(gwin->win,GUI_POINTER_DEFAULT);
break;
@@ -710,7 +710,6 @@ void ami_menupick(ULONG code,struct gui_window_2 *gwin,struct MenuItem *item)
case 2: // paste
browser_window_key_press(gwin->bw, KEY_PASTE);
- //gui_paste_from_clipboard(&tgw,0,0);
break;
case 4: // select all