diff options
author | Richard Wilson <rjw@netsurf-browser.org> | 2005-06-23 17:24:23 +0000 |
---|---|---|
committer | Richard Wilson <rjw@netsurf-browser.org> | 2005-06-23 17:24:23 +0000 |
commit | f559054c1a1b0819e52e0f9d04fc55be484746c5 (patch) | |
tree | 2c6652666c751a1a368920679da0ba85b01854d8 /riscos/menus.c | |
parent | b88a81b9d9570c3219dc924c3dd2b424d99ee4c3 (diff) | |
download | netsurf-f559054c1a1b0819e52e0f9d04fc55be484746c5.tar.gz netsurf-f559054c1a1b0819e52e0f9d04fc55be484746c5.tar.bz2 |
[project @ 2005-06-23 17:24:23 by rjw]
Allow images to be unloaded to disk or compressed in memory. Provide thumbnails in all tree windows (hotlist, history). Optimise the application initialisation times. Part 2 of 2.
svn path=/import/netsurf/; revision=1762
Diffstat (limited to 'riscos/menus.c')
-rw-r--r-- | riscos/menus.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/riscos/menus.c b/riscos/menus.c index b895395c9..1cb4cae05 100644 --- a/riscos/menus.c +++ b/riscos/menus.c @@ -31,6 +31,7 @@ #include "netsurf/riscos/wimp.h" #include "netsurf/utils/log.h" #include "netsurf/utils/messages.h" +#include "netsurf/utils/url.h" #include "netsurf/utils/utils.h" #include "netsurf/utils/utf8.h" @@ -1277,6 +1278,8 @@ bool ro_gui_menu_handle_action(wimp_w owner, menu_action action, struct node *node; os_error *error; char url[80]; + url_func_result res; + char *norm_url = NULL; ro_gui_menu_get_window_details(owner, &g, &bw, &c, &t, &tree); @@ -1312,11 +1315,17 @@ bool ro_gui_menu_handle_action(wimp_w owner, menu_action action, /* hotlist actions */ case HOTLIST_ADD_URL: - if ((!hotlist_tree) || (!c)) + if ((!hotlist_tree) || (!c) || (!c->url)) return false; + res = url_normalize(c->url, &norm_url); + if (res != URL_FUNC_OK) { + warn_user("NoMemory", 0); + return false; + } node = tree_create_URL_node(hotlist_tree->root, - c->title, c->url, ro_content_filetype(c), + c->title, norm_url, ro_content_filetype(c), time(NULL), -1, 0); + free(norm_url); if (node) { tree_redraw_area(hotlist_tree, node->box.x - NODE_INSTEP, 0, @@ -1325,6 +1334,7 @@ bool ro_gui_menu_handle_action(wimp_w owner, menu_action action, false, true); ro_gui_tree_scroll_visible(hotlist_tree, &node->data); + ro_gui_hotlist_save(); } return true; case HOTLIST_SHOW: |