summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2010-07-11 15:34:35 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2010-07-11 15:34:35 +0000
commit1c48e85ce9b7c82cb6b5e5d3bee88ad77d001c1c (patch)
tree8a67143ae3760212995445432c7666bec7e5bc01
parentf6f1fe1ceefc31f254184684596d84a84f17c67a (diff)
downloadnetsurf-1c48e85ce9b7c82cb6b5e5d3bee88ad77d001c1c.tar.gz
netsurf-1c48e85ce9b7c82cb6b5e5d3bee88ad77d001c1c.tar.bz2
Add commands BACK, FORWARD, HOME and RELOAD to correspond with the buttons on the GUI.
svn path=/trunk/netsurf/; revision=10628
-rwxr-xr-xamiga/arexx.c59
-rwxr-xr-xamiga/dist/NetSurf.guide6
2 files changed, 63 insertions, 2 deletions
diff --git a/amiga/arexx.c b/amiga/arexx.c
index a85b8cc0d..1be7b452b 100755
--- a/amiga/arexx.c
+++ b/amiga/arexx.c
@@ -43,7 +43,11 @@ enum
RX_GETTITLE,
RX_VERSION,
RX_SAVE,
- RX_PUBSCREEN
+ RX_PUBSCREEN,
+ RX_BACK,
+ RX_FORWARD,
+ RX_HOME,
+ RX_RELOAD
};
STATIC char result[100];
@@ -56,6 +60,10 @@ STATIC VOID rx_gettitle(struct ARexxCmd *, struct RexxMsg *);
STATIC VOID rx_version(struct ARexxCmd *, struct RexxMsg *);
STATIC VOID rx_save(struct ARexxCmd *, struct RexxMsg *);
STATIC VOID rx_pubscreen(struct ARexxCmd *, struct RexxMsg *);
+STATIC VOID rx_back(struct ARexxCmd *, struct RexxMsg *);
+STATIC VOID rx_forward(struct ARexxCmd *, struct RexxMsg *);
+STATIC VOID rx_home(struct ARexxCmd *, struct RexxMsg *);
+STATIC VOID rx_reload(struct ARexxCmd *, struct RexxMsg *);
STATIC struct ARexxCmd Commands[] =
{
@@ -67,6 +75,10 @@ STATIC struct ARexxCmd Commands[] =
{"VERSION",RX_VERSION,rx_version,"VERSION/N,SVN=REVISION/N,RELEASE/S", 0, NULL, 0, 0, NULL },
{"SAVE",RX_SAVE,rx_save,"FILENAME/A", 0, NULL, 0, 0, NULL },
{"GETSCREENNAME",RX_PUBSCREEN,rx_pubscreen,NULL, 0, NULL, 0, 0, NULL },
+ {"BACK", RX_BACK, rx_back, "WINDOW/K/N, TAB/K/N", 0, NULL, 0, 0, NULL },
+ {"FORWARD", RX_FORWARD, rx_forward, "WINDOW/K/N, TAB/K/N", 0, NULL, 0, 0, NULL },
+ {"HOME", RX_HOME, rx_home, "WINDOW/K/N, TAB/K/N", 0, NULL, 0, 0, NULL },
+ {"RELOAD", RX_RELOAD, rx_reload, "FORCE/S, WINDOW/K/N, TAB/K/N", 0, NULL, 0, 0, NULL },
{ NULL, 0, NULL, NULL, 0, NULL, 0, 0, NULL }
};
@@ -280,3 +292,48 @@ STATIC VOID rx_pubscreen(struct ARexxCmd *cmd, struct RexxMsg *rxm __attribute__
cmd->ac_Result = result;
}
+
+STATIC VOID rx_back(struct ARexxCmd *cmd, struct RexxMsg *rxm __attribute__((unused)))
+{
+ if(curbw)
+ {
+ if(browser_window_back_available(curbw))
+ {
+ history_back(curbw, curbw->history);
+ }
+ }
+}
+
+STATIC VOID rx_forward(struct ARexxCmd *cmd, struct RexxMsg *rxm __attribute__((unused)))
+{
+ if(curbw)
+ {
+ if(browser_window_forward_available(curbw))
+ {
+ history_forward(curbw, curbw->history);
+ }
+ }
+}
+
+STATIC VOID rx_home(struct ARexxCmd *cmd, struct RexxMsg *rxm __attribute__((unused)))
+{
+ if(curbw)
+ {
+ browser_window_go(curbw, option_homepage_url, NULL, true);
+ }
+}
+
+STATIC VOID rx_reload(struct ARexxCmd *cmd, struct RexxMsg *rxm __attribute__((unused)))
+{
+ if(curbw)
+ {
+ if(cmd->ac_ArgList[0]) /* FORCE */
+ {
+ browser_window_reload(curbw, true);
+ }
+ else
+ {
+ browser_window_reload(curbw, false);
+ }
+ }
+}
diff --git a/amiga/dist/NetSurf.guide b/amiga/dist/NetSurf.guide
index 1623d89c7..2f8f63668 100755
--- a/amiga/dist/NetSurf.guide
+++ b/amiga/dist/NetSurf.guide
@@ -77,7 +77,11 @@ Commands are:
@{b}TOFRONT@{ub} Brings NetSurf's screen to the front
@{b}GETURL@{ub} Puts the URL displayed in the current window/tab into RESULT
@{b}GETTITLE@{ub} Puts the title of the page displayed in the current window/tab into RESULT
-@{b}GETSCREENNAME@{ub} (3.8303) Puts the name of the screen NetSurf is running on into RESULT.
+@{b}GETSCREENNAME@{ub} (2.8303) Puts the name of the screen NetSurf is running on into RESULT.
+@{b}BACK@{ub} (2.10626) Move back one page in history.
+@{b}FORWARD@{ub} (2.10626) Move forward one page in history.
+@{b}HOME@{ub} (2.10626) Move back to the home page.
+@{b}RELOAD FORCE/S@{ub} (2.10626) Reload the current page, FORCE will do a full reload.
@{b}VERSION VERSION/N REVISION/N RELEASE/S@{ub} Returns the current version of NetSurf in RESULT. You can also do version checking by supplying a VERSION and optional REVISION to check against. If the version of NetSurf is the same or higher 1 will be returned, if it is older 0. If RELEASE is specified, the command operates on the release version rather than the internal version number.
The ARexx menu will be populated with scripts named #?.nsrx in @{"arexx_dir" link options 9}, up to a maximum of 20 entries. The titles of these entries will be the comments field of the file (or the filename if comments field is empty).