summaryrefslogtreecommitdiff
path: root/riscos
diff options
context:
space:
mode:
Diffstat (limited to 'riscos')
-rw-r--r--riscos/401login.c15
-rw-r--r--riscos/dialog.c6
-rw-r--r--riscos/gui.c3
-rw-r--r--riscos/gui.h1
-rw-r--r--riscos/menus.c1
-rw-r--r--riscos/window.c9
6 files changed, 21 insertions, 14 deletions
diff --git a/riscos/401login.c b/riscos/401login.c
index c5693d2e3..2bff170f3 100644
--- a/riscos/401login.c
+++ b/riscos/401login.c
@@ -106,11 +106,16 @@ void ro_gui_401login_open(char *host, char* realm, char *fetchurl)
bool ro_gui_401login_keypress(wimp_key *key) {
- if (key->c == wimp_KEY_RETURN) {
- get_unamepwd();
- ro_gui_dialog_close(dialog_401li);
- browser_window_open_location(bwin, url);
- return true;
+ switch (key->c) {
+ case wimp_KEY_RETURN:
+ get_unamepwd();
+ ro_gui_dialog_close(dialog_401li);
+ browser_window_open_location(bwin, url);
+ return true;
+ case wimp_KEY_ESCAPE:
+ ro_gui_dialog_close(dialog_401li);
+ break;
+ default: break;
}
return false;
diff --git a/riscos/dialog.c b/riscos/dialog.c
index 31ca9f6c8..47e6d40b2 100644
--- a/riscos/dialog.c
+++ b/riscos/dialog.c
@@ -16,17 +16,13 @@
#include "oslib/osspriteop.h"
#include "oslib/wimp.h"
#include "netsurf/desktop/netsurf.h"
+#include "netsurf/riscos/constdata.h"
#include "netsurf/riscos/gui.h"
#include "netsurf/riscos/options.h"
#include "netsurf/utils/log.h"
#include "netsurf/utils/messages.h"
#include "netsurf/utils/utils.h"
-
-#define GESTURES_URL "file:///%3CNetSurf$Dir%3E/Resources/gestures"
-#define THEMES_URL "http://netsurf.sourceforge.net/themes/"
-
-
wimp_w dialog_info, dialog_saveas, dialog_config, dialog_config_br,
dialog_config_prox, dialog_config_th, download_template,
dialog_401li;
diff --git a/riscos/gui.c b/riscos/gui.c
index ceca684cd..0b241dcc6 100644
--- a/riscos/gui.c
+++ b/riscos/gui.c
@@ -26,6 +26,7 @@
#include "netsurf/render/form.h"
#include "netsurf/render/html.h"
#include "netsurf/riscos/about.h"
+#include "netsurf/riscos/constdata.h"
#include "netsurf/riscos/gui.h"
#include "netsurf/riscos/plugin.h"
#include "netsurf/riscos/theme.h"
@@ -36,8 +37,6 @@
const char *__dynamic_da_name = "NetSurf"; /**< For UnixLib. */
-const char *HOME_URL = "file:///%3CNetSurf$Dir%3E/Docs/en/intro";
-const char *HELP_URL = "file:///%3CNetSurf$Dir%3E/Docs/en/index";
char *NETSURF_DIR;
wimp_menu *combo_menu;
diff --git a/riscos/gui.h b/riscos/gui.h
index c0a5db322..b894a1e01 100644
--- a/riscos/gui.h
+++ b/riscos/gui.h
@@ -25,7 +25,6 @@ extern wimp_menu *current_menu, *iconbar_menu, *browser_menu,
*combo_menu, *theme_menu;
extern int current_menu_x, current_menu_y, iconbar_menu_height;
extern struct form_control *current_gadget;
-extern const char *HOME_URL;
extern gui_window *window_list;
extern bool gui_reformat_pending;
diff --git a/riscos/menus.c b/riscos/menus.c
index 12dbd1cb5..12777ace3 100644
--- a/riscos/menus.c
+++ b/riscos/menus.c
@@ -11,6 +11,7 @@
#include <string.h>
#include "oslib/wimp.h"
#include "netsurf/desktop/gui.h"
+#include "netsurf/riscos/constdata.h"
#include "netsurf/riscos/gui.h"
#include "netsurf/riscos/theme.h"
#include "netsurf/utils/log.h"
diff --git a/riscos/window.c b/riscos/window.c
index 206205a30..8d5da2df9 100644
--- a/riscos/window.c
+++ b/riscos/window.c
@@ -16,6 +16,7 @@
#include "oslib/wimp.h"
#include "oslib/wimpspriteop.h"
#include "netsurf/riscos/about.h"
+#include "netsurf/riscos/constdata.h"
#include "netsurf/riscos/gui.h"
#include "netsurf/riscos/theme.h"
#include "netsurf/utils/log.h"
@@ -703,7 +704,13 @@ bool ro_gui_window_keypress(gui_window *g, int key, bool toolbar)
if (strcasecmp(g->url, "about:") == 0) {
about_create();
browser_window_open_location(g->data.browser.bw,
- "file:///%3CWimp$ScrapDir%3E/WWW/NetSurf/About");
+ ABOUT_URL);
+ } else if (strcasecmp(g->url, "help:") == 0) {
+ browser_window_open_location(g->data.browser.bw,
+ HELP_URL);
+ } else if (strcasecmp(g->url, "home:") == 0) {
+ browser_window_open_location(g->data.browser.bw,
+ HOME_URL);
} else {
char *url = xcalloc(1, 10 + strlen(g->url));
char *url2;