diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2013-09-02 22:41:04 +0100 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2013-09-02 22:41:04 +0100 |
commit | cf8ffa412a55a8884fdd8f348b3fb28108d59b6c (patch) | |
tree | ff9a998daae20f16a3537d78bd141ea662863cf8 /riscos | |
parent | e9f65ff9cb60c94b43d4b875892918b90fb2a067 (diff) | |
download | netsurf-cf8ffa412a55a8884fdd8f348b3fb28108d59b6c.tar.gz netsurf-cf8ffa412a55a8884fdd8f348b3fb28108d59b6c.tar.bz2 |
Remove old hotlist, cookies, and history_global_core modules.
New versions of expand/collapse node functions for these modules aren't yet implemented.
Diffstat (limited to 'riscos')
-rw-r--r-- | riscos/cookies.c | 10 | ||||
-rw-r--r-- | riscos/global_history.c | 13 | ||||
-rw-r--r-- | riscos/gui.c | 3 | ||||
-rw-r--r-- | riscos/hotlist.c | 52 | ||||
-rw-r--r-- | riscos/menus.c | 3 | ||||
-rw-r--r-- | riscos/save.c | 8 | ||||
-rw-r--r-- | riscos/window.c | 5 |
7 files changed, 54 insertions, 40 deletions
diff --git a/riscos/cookies.c b/riscos/cookies.c index eb74f515e..dfdbc5d20 100644 --- a/riscos/cookies.c +++ b/riscos/cookies.c @@ -31,8 +31,8 @@ #include "oslib/wimpspriteop.h" #include "content/urldb.h" #include "desktop/cookie_manager.h" -#include "desktop/cookies_old.h" #include "desktop/tree.h" +#include "desktop/textinput.h" #include "riscos/cookies.h" #include "riscos/dialog.h" #include "riscos/menus.h" @@ -179,7 +179,7 @@ void ro_gui_cookies_toolbar_click(button_bar_action action) { switch (action) { case TOOLBAR_BUTTON_DELETE: - cookies_delete_selected(); + cookie_manager_keypress(KEY_DELETE_LEFT); break; case TOOLBAR_BUTTON_EXPAND: @@ -318,13 +318,13 @@ bool ro_gui_cookies_menu_select(wimp_w w, wimp_i i, wimp_menu *menu, cookies_collapse_cookies(); return true; case TREE_SELECTION_DELETE: - cookies_delete_selected(); + cookie_manager_keypress(KEY_DELETE_LEFT); return true; case TREE_SELECT_ALL: - cookies_select_all(); + cookie_manager_keypress(KEY_SELECT_ALL); return true; case TREE_CLEAR_SELECTION: - cookies_clear_selection(); + cookie_manager_keypress(KEY_CLEAR_SELECTION); return true; case TOOLBAR_BUTTONS: ro_toolbar_set_display_buttons(cookies_window.toolbar, diff --git a/riscos/global_history.c b/riscos/global_history.c index 3a060c02d..aecc98903 100644 --- a/riscos/global_history.c +++ b/riscos/global_history.c @@ -30,7 +30,6 @@ #include "oslib/wimp.h" #include "oslib/wimpspriteop.h" #include "content/urldb.h" -#include "desktop/history_global_core.h" #include "desktop/global_history.h" #include "desktop/tree.h" #include "riscos/dialog.h" @@ -186,7 +185,7 @@ void ro_gui_global_history_toolbar_click(button_bar_action action) { switch (action) { case TOOLBAR_BUTTON_DELETE: - history_global_delete_selected(); + global_history_keypress(KEY_DELETE_LEFT); break; case TOOLBAR_BUTTON_EXPAND: @@ -206,7 +205,7 @@ void ro_gui_global_history_toolbar_click(button_bar_action action) break; case TOOLBAR_BUTTON_LAUNCH: - history_global_launch_selected(false); + global_history_keypress(KEY_CR); break; default: @@ -343,16 +342,16 @@ bool ro_gui_global_history_menu_select(wimp_w w, wimp_i i, wimp_menu *menu, history_global_collapse_addresses(); return true; case TREE_SELECTION_LAUNCH: - history_global_launch_selected(false); + global_history_keypress(KEY_CR); return true; case TREE_SELECTION_DELETE: - history_global_delete_selected(); + global_history_keypress(KEY_DELETE_LEFT); return true; case TREE_SELECT_ALL: - history_global_select_all(); + global_history_keypress(KEY_SELECT_ALL); return true; case TREE_CLEAR_SELECTION: - history_global_clear_selection(); + global_history_keypress(KEY_CLEAR_SELECTION); return true; case TOOLBAR_BUTTONS: ro_toolbar_set_display_buttons(global_history_window.toolbar, diff --git a/riscos/gui.c b/riscos/gui.c index 39a34de9a..58114540e 100644 --- a/riscos/gui.c +++ b/riscos/gui.c @@ -55,10 +55,7 @@ #include "content/hlcache.h" #include "content/urldb.h" #include "content/fetchers/resource.h" -#include "desktop/cookies_old.h" #include "desktop/gui.h" -#include "desktop/history_global_core.h" -#include "desktop/hotlist_old.h" #include "desktop/netsurf.h" #include "utils/nsoption.h" #include "desktop/save_complete.h" diff --git a/riscos/hotlist.c b/riscos/hotlist.c index 721e532bb..73c800280 100644 --- a/riscos/hotlist.c +++ b/riscos/hotlist.c @@ -33,7 +33,6 @@ #include "content/content.h" #include "content/hlcache.h" #include "content/urldb.h" -#include "desktop/hotlist_old.h" #include "desktop/hotlist.h" #include "desktop/tree.h" #include "riscos/dialog.h" @@ -228,7 +227,7 @@ void ro_gui_hotlist_toolbar_click(button_bar_action action) { switch (action) { case TOOLBAR_BUTTON_DELETE: - hotlist_old_delete_selected(); + hotlist_keypress(KEY_DELETE_LEFT); break; case TOOLBAR_BUTTON_EXPAND: @@ -248,11 +247,11 @@ void ro_gui_hotlist_toolbar_click(button_bar_action action) break; case TOOLBAR_BUTTON_LAUNCH: - hotlist_old_launch_selected(false); + hotlist_keypress(KEY_CR); break; case TOOLBAR_BUTTON_CREATE: - hotlist_old_add_folder(true); + hotlist_add_folder(NULL, false, 0); break; default: @@ -367,10 +366,10 @@ bool ro_gui_hotlist_menu_select(wimp_w w, wimp_i i, wimp_menu *menu, ro_gui_dialog_open_persistent(w, dialog_saveas, true); return true; case TREE_NEW_FOLDER: - hotlist_old_add_folder(true); + hotlist_add_folder(NULL, false, 0); return true; case TREE_NEW_LINK: - hotlist_old_add_entry(true); + hotlist_add_entry(NULL, NULL, false, 0); return true; case TREE_EXPAND_ALL: hotlist_old_expand_all(); @@ -391,19 +390,19 @@ bool ro_gui_hotlist_menu_select(wimp_w w, wimp_i i, wimp_menu *menu, hotlist_old_collapse_addresses(); return true; case TREE_SELECTION_EDIT: - hotlist_old_edit_selected(); + hotlist_edit_selection(); return true; case TREE_SELECTION_LAUNCH: - hotlist_old_launch_selected(false); + hotlist_keypress(KEY_CR); return true; case TREE_SELECTION_DELETE: - hotlist_old_delete_selected(); + hotlist_keypress(KEY_DELETE_LEFT); return true; case TREE_SELECT_ALL: - hotlist_old_select_all(); + hotlist_keypress(KEY_SELECT_ALL); return true; case TREE_CLEAR_SELECTION: - hotlist_old_clear_selection(); + hotlist_keypress(KEY_CLEAR_SELECTION); return true; case TOOLBAR_BUTTONS: ro_toolbar_set_display_buttons(hotlist_window.toolbar, @@ -469,12 +468,16 @@ void ro_gui_hotlist_add_page(const char *url) if (url == NULL) return; + if (nsurl_create(url, &nsurl) != NSERROR_OK) + return; + /* If we're not using external hotlists, add the page to NetSurf's * own hotlist and return... */ if (!nsoption_bool(external_hotlists)) { - hotlist_old_add_page(url); + hotlist_add_url(nsurl); + nsurl_unref(nsurl); return; } @@ -487,8 +490,6 @@ void ro_gui_hotlist_add_page(const char *url) LOG(("Sending Hotlist AddURL to potential hotlist clients.")); - if (nsurl_create(url, &nsurl) != NSERROR_OK) - return; data = urldb_get_url_data(nsurl); if (data == NULL) return; @@ -534,8 +535,15 @@ static void ro_gui_hotlist_addurl_bounce(wimp_message *message) { LOG(("Hotlist AddURL Bounced")); - if (hotlist_url != NULL) - hotlist_old_add_page(hotlist_url); + if (hotlist_url != NULL) { + nsurl *nsurl; + + if (nsurl_create(hotlist_url, &nsurl) != NSERROR_OK) + return; + + hotlist_add_page(nsurl); + nsurl_unref(nsurl); + } ro_gui_hotlist_add_cleanup(); @@ -591,14 +599,24 @@ void ro_gui_hotlist_add_cleanup(void) void ro_gui_hotlist_url_drop(wimp_message *message, const char *url) { int x, y; + nsurl *nsurl; + if (hotlist_window.window != message->data.data_xfer.w) return; + if (url == NULL) + return; + + if (nsurl_create(url, &nsurl) != NSERROR_OK) + return; + ro_gui_tree_get_tree_coordinates(hotlist_window.tree, message->data.data_xfer.pos.x, message->data.data_xfer.pos.y, &x, &y); - hotlist_old_add_page_xy(url, x, y); + + hotlist_add_entry(nsurl, NULL, true, y); + nsurl_unref(nsurl); } #endif diff --git a/riscos/menus.c b/riscos/menus.c index 5a576f879..e51fc34c5 100644 --- a/riscos/menus.c +++ b/riscos/menus.c @@ -34,10 +34,9 @@ #include "content/content.h" #include "content/hlcache.h" #include "content/urldb.h" -#include "desktop/cookies_old.h" +#include "desktop/cookie_manager.h" #include "desktop/browser.h" #include "desktop/gui.h" -#include "desktop/history_global_core.h" #include "desktop/local_history.h" #include "desktop/netsurf.h" #include "desktop/textinput.h" diff --git a/riscos/save.c b/riscos/save.c index 0a9114080..ad2d4c467 100644 --- a/riscos/save.c +++ b/riscos/save.c @@ -37,8 +37,8 @@ #include "oslib/wimpspriteop.h" #include "content/content.h" #include "content/hlcache.h" -#include "desktop/hotlist_old.h" -#include "desktop/history_global_core.h" +#include "desktop/hotlist.h" +#include "desktop/global_history.h" #include "desktop/netsurf.h" #include "desktop/save_complete.h" #include "desktop/save_text.h" @@ -882,7 +882,7 @@ bool ro_gui_save_content(hlcache_handle *h, char *path, bool force_overwrite) LINK_TEXT, path); case GUI_SAVE_HOTLIST_EXPORT_HTML: - if (!hotlist_old_export(path)) + if (hotlist_export(path, NULL) != NSERROR_OK) return false; error = xosfile_set_type(path, 0xfaf); if (error) @@ -890,7 +890,7 @@ bool ro_gui_save_content(hlcache_handle *h, char *path, bool force_overwrite) error->errnum, error->errmess)); break; case GUI_SAVE_HISTORY_EXPORT_HTML: - if (!history_global_export(path)) + if (global_history_export(path, NULL) != NSERROR_OK) return false; error = xosfile_set_type(path, 0xfaf); if (error) diff --git a/riscos/window.c b/riscos/window.c index 797176378..d3375bebe 100644 --- a/riscos/window.c +++ b/riscos/window.c @@ -46,7 +46,7 @@ #include "content/urldb.h" #include "css/css.h" #include "desktop/browser_private.h" -#include "desktop/cookies_old.h" +#include "desktop/cookie_manager.h" #include "desktop/scrollbar.h" #include "desktop/frames.h" #include "desktop/local_history.h" @@ -2763,7 +2763,8 @@ bool ro_gui_window_menu_select(wimp_w w, wimp_i i, wimp_menu *menu, break; case COOKIES_DELETE: - cookies_delete_all(); + cookie_manager_keypress(KEY_SELECT_ALL); + cookie_manager_keypress(KEY_DELETE_LEFT); break; /* page actions */ |