diff options
author | Ole Loots <ole@monochrom.net> | 2013-09-21 05:29:04 +0200 |
---|---|---|
committer | Ole Loots <ole@monochrom.net> | 2013-10-06 01:24:17 +0200 |
commit | 49f4fa0d787c867ed24ac49897feb347939d4ef3 (patch) | |
tree | 3400ff2f7072abd6f05863aed7157f7084e51cb9 /atari/gui.c | |
parent | 074b07253551fb6aeb1d71ee4dfbf9b838cbf663 (diff) | |
download | netsurf-49f4fa0d787c867ed24ac49897feb347939d4ef3.tar.gz netsurf-49f4fa0d787c867ed24ac49897feb347939d4ef3.tar.bz2 |
Hotlist and History and Cookies Manager implemented.
(The Cookie Manager window is a new one)
Diffstat (limited to 'atari/gui.c')
-rw-r--r-- | atari/gui.c | 44 |
1 files changed, 35 insertions, 9 deletions
diff --git a/atari/gui.c b/atari/gui.c index 3f056a1bc..33d63b436 100644 --- a/atari/gui.c +++ b/atari/gui.c @@ -63,6 +63,7 @@ #include "atari/statusbar.h" #include "atari/toolbar.h" #include "atari/hotlist.h" +#include "atari/cookies.h" #include "atari/history.h" #include "atari/login.h" #include "atari/encoding.h" @@ -171,12 +172,14 @@ void gui_poll(bool active) tmp = tmp->next; } - // TODO: reenable treeview redraws -/* - if(hl.tv->redraw){ - atari_treeview_redraw(hl.tv); - } + // TODO: implement generic treeview redraw function + // TODO: rename hl to atari_hotlist or create getter for it... + //atari_treeview_redraw(hl.tv); + atari_hotlist_redraw(); + atari_cookie_manager_redraw(); + atari_global_history_redraw(); +/* // TODO: reenable history redraws if(gl_history.tv->redraw){ atari_treeview_redraw(gl_history.tv); } @@ -541,6 +544,27 @@ void gui_window_set_url(struct gui_window *w, const char *url) } } +struct gui_window * gui_window_get_input_window(void) +{ + return(input_window); +} + +char * gui_window_get_url(struct gui_window *gw) +{ + if (gw == NULL) { + return(NULL); + } + return(gw->url); +} + +char * gui_window_get_title(struct gui_window *gw) +{ + if (gw == NULL) { + return(NULL); + } + return(gw->title); +} + static void throbber_advance( void * data ) { @@ -809,15 +833,16 @@ void gui_quit(void) struct gui_window * tmp = window_list; /* Destroy all remaining browser windows: */ - while( gw ) { + while (gw) { tmp = gw->next; browser_window_destroy(gw->browser->bw); gw = tmp; } /* destroy the treeview windows: */ - atari_global_history_destroy(); + //atari_global_history_destroy(); atari_hotlist_destroy(); + atari_cookie_manager_destroy(); /* shutdown netsurf treeview framework: */ treeview_fini(); @@ -1036,8 +1061,9 @@ static void gui_init2(int argc, char** argv) treeview_init(0); /* Initialize the specific treeview windows: */ - atari_global_history_init(); + //atari_global_history_init(); atari_hotlist_init(); + atari_cookie_manager_init(); /* Initialize the toolbar framework: */ toolbar_init(); @@ -1084,7 +1110,7 @@ int main(int argc, char** argv) /* user options setup */ ret = nsoption_init(set_defaults, &nsoptions, &nsoptions_default); if (ret != NSERROR_OK) { - die("Options failed to initialise"); + die("Options failed to initialise"); } nsoption_read(options, NULL); nsoption_commandline(&argc, argv, NULL); |