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 /atari/hotlist.c | |
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 'atari/hotlist.c')
-rwxr-xr-x | atari/hotlist.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/atari/hotlist.c b/atari/hotlist.c index 9211f3c4f..57cf0c08b 100755 --- a/atari/hotlist.c +++ b/atari/hotlist.c @@ -28,7 +28,7 @@ #include "content/hlcache.h" #include "content/urldb.h" #include "utils/nsoption.h" -#include "desktop/hotlist_old.h" +#include "desktop/hotlist.h" #include "desktop/tree.h" #include "desktop/gui.h" #include "utils/log.h" @@ -61,20 +61,20 @@ static short handle_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8]) switch (msg[4]) { case TOOLBAR_HOTLIST_CREATE_FOLDER: - hotlist_old_add_folder(true); + hotlist_add_folder(NULL, false, 0); break; case TOOLBAR_HOTLIST_ADD: - atari_hotlist_add_page("http://www.de", ""); + atari_hotlist_add_page(NULL, NULL); break; case TOOLBAR_HOTLIST_DELETE: - hotlist_old_delete_selected(); + hotlist_keypress(KEY_DELETE_LEFT); gemtk_wm_exec_redraw(tv->window, NULL); break; case TOOLBAR_HOTLIST_EDIT: - hotlist_old_edit_selected(); + hotlist_edit_selection(); break; } @@ -207,15 +207,20 @@ void atari_hotlist_add_page( const char * url, const char * title ) struct node * root; struct node * selected = NULL; struct node * folder = NULL; + nsurl *nsurl; NSTREEVIEW tv = hl.tv; if(hl.tv == NULL ) return; atari_hotlist_open(); + if (nsurl_create(url, &nsurl) != NSERROR_OK) + return; + if( hl.tv->click.x >= 0 && hl.tv->click.y >= 0 ){ - hotlist_old_add_page_xy( url, hl.tv->click.x, hl.tv->click.y ); + hotlist_add_entry( nsurl, title, true, hl.tv->click.y ); } else { - hotlist_old_add_page( url ); + hotlist_add_url( nsurl ); } + nsurl_unref(nsurl); } |