diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2013-09-05 20:26:28 +0100 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2013-09-05 20:26:28 +0100 |
commit | 454fc8dbaa6971944d1459d0a2efff9635b1ef37 (patch) | |
tree | 2991a0ba904654003daccb0804459df6618bdba2 /amiga | |
parent | f59a93f5ee9f1d906463e97d68a05b6075414214 (diff) | |
download | netsurf-454fc8dbaa6971944d1459d0a2efff9635b1ef37.tar.gz netsurf-454fc8dbaa6971944d1459d0a2efff9635b1ef37.tar.bz2 |
Use the nsurl directly
Diffstat (limited to 'amiga')
-rw-r--r-- | amiga/menu.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/amiga/menu.c b/amiga/menu.c index dadb717f1..296ebb32f 100644 --- a/amiga/menu.c +++ b/amiga/menu.c @@ -547,7 +547,7 @@ void ami_menu_arexx_scan(struct gui_window_2 *gwin) gwin->menu[item].nm_Label = NULL; } -static nserror ami_menu_hotlist_add(void *ctx, const char *title, struct nsurl *url, bool is_folder) +static nserror ami_menu_hotlist_add(void *ctx, const char *title, nsurl *url, bool is_folder) { struct ami_hotlist_ctx *menu_ctx = (struct ami_hotlist_ctx *)ctx; UBYTE type; @@ -1143,19 +1143,14 @@ static void ami_menu_item_hotlist_show(struct Hook *hook, APTR window, struct In static void ami_menu_item_hotlist_entries(struct Hook *hook, APTR window, struct IntuiMessage *msg) { - nsurl *url; + nsurl *url = hook->h_Data; nserror error; - char *urltxt = hook->h_Data; struct gui_window_2 *gwin; GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&gwin); - if(urltxt == NULL) return; + if(url == NULL) return; - error = nsurl_create(urltxt, &url); - if (error != NSERROR_OK) { - warn_user(messages_get_errorcode(error), 0); - } else { - browser_window_navigate(gwin->bw, + browser_window_navigate(gwin->bw, url, NULL, BROWSER_WINDOW_HISTORY | @@ -1163,8 +1158,6 @@ static void ami_menu_item_hotlist_entries(struct Hook *hook, APTR window, struct NULL, NULL, NULL); - nsurl_unref(url); - } } static void ami_menu_item_settings_edit(struct Hook *hook, APTR window, struct IntuiMessage *msg) |