summaryrefslogtreecommitdiff
path: root/frontends/amiga
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2017-06-10 18:34:05 +0100
committerVincent Sanders <vince@kyllikki.org>2017-06-10 18:37:21 +0100
commit653ccb78a9d819d21dc8d3e6d57d724215f50605 (patch)
tree0490bc5d0e85dafdc59949a1f65f6724a5217029 /frontends/amiga
parent92ecc77768dc86ed6a8d2d9aa1b0f49567878b2c (diff)
downloadnetsurf-653ccb78a9d819d21dc8d3e6d57d724215f50605.tar.gz
netsurf-653ccb78a9d819d21dc8d3e6d57d724215f50605.tar.bz2
Split local history data from viewer in headers
This separates the local history data object API from the viewing API. It also changes the api to return nsurl references instead of strings.
Diffstat (limited to 'frontends/amiga')
-rwxr-xr-xfrontends/amiga/history_local.c27
1 files changed, 21 insertions, 6 deletions
diff --git a/frontends/amiga/history_local.c b/frontends/amiga/history_local.c
index 8d1f4ac4a..84f656192 100755
--- a/frontends/amiga/history_local.c
+++ b/frontends/amiga/history_local.c
@@ -44,7 +44,8 @@
#include "utils/log.h"
#include "utils/utils.h"
#include "utils/messages.h"
-#include "desktop/browser_history.h"
+#include "utils/nsurl.h"
+#include "desktop/local_history.h"
#include "netsurf/browser_window.h"
#include "netsurf/plotters.h"
#include "netsurf/window.h"
@@ -252,7 +253,7 @@ static BOOL ami_history_event(void *w)
struct history_window *hw = (struct history_window *)w;
ULONG result = 0;
uint16 code;
- const char *url;
+ nsurl *url = NULL;
struct IBox *bbox;
ULONG xs, ys;
@@ -287,10 +288,24 @@ static BOOL ami_history_event(void *w)
ami_gui_free_space_box(bbox);
- RefreshSetGadgetAttrs((APTR)hw->objects[GID_BROWSER],
- hw->win, NULL,
- GA_HintInfo, url,
- TAG_DONE);
+ if (url == NULL) {
+ RefreshSetGadgetAttrs(
+ (APTR)hw->objects[GID_BROWSER],
+ hw->win,
+ NULL,
+ GA_HintInfo,
+ NULL,
+ TAG_DONE);
+ } else {
+ RefreshSetGadgetAttrs(
+ (APTR)hw->objects[GID_BROWSER],
+ hw->win,
+ NULL,
+ GA_HintInfo,
+ nsurl_access(url),
+ TAG_DONE);
+ nsurl_unref(url);
+ }
break;
case WMHI_NEWSIZE: