mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-25 05:27:00 +03:00
add history navigation
svn path=/trunk/netsurf/; revision=6451
This commit is contained in:
parent
239884924f
commit
e4378d3d0c
@ -30,6 +30,7 @@
|
||||
#include "desktop/gui.h"
|
||||
#include "desktop/options.h"
|
||||
#include "utils/messages.h"
|
||||
#include "desktop/history_core.h"
|
||||
|
||||
#include "framebuffer/fb_gui.h"
|
||||
#include "framebuffer/fb_plotters.h"
|
||||
@ -110,6 +111,16 @@ void fb_os_input(struct gui_window *g, bool active)
|
||||
browser_window_destroy(g->bw);
|
||||
break;
|
||||
|
||||
case SDLK_b:
|
||||
if (history_back_available(g->bw->history))
|
||||
history_back(g->bw, g->bw->history);
|
||||
break;
|
||||
|
||||
case SDLK_f:
|
||||
if (history_forward_available(g->bw->history))
|
||||
history_forward(g->bw, g->bw->history);
|
||||
break;
|
||||
|
||||
default:
|
||||
printf("The %s key was pressed!\n",
|
||||
SDL_GetKeyName(event.key.keysym.sym));
|
||||
|
@ -128,7 +128,8 @@ static void fb_redraw(struct gui_window *g)
|
||||
if (c->locked) return;
|
||||
|
||||
content_redraw(c, 0, -g->scrolly, g->width, g->height,
|
||||
g->redraw_box.x0, g->redraw_box.y0, g->redraw_box.x1, g->redraw_box.y1,
|
||||
g->redraw_box.x0, g->redraw_box.y0,
|
||||
g->redraw_box.x1, g->redraw_box.y1,
|
||||
g->bw->scale, 0xFFFFFF);
|
||||
|
||||
fb_os_redraw(&g->redraw_box);
|
||||
|
@ -20,6 +20,13 @@
|
||||
|
||||
void global_history_add(const char *url)
|
||||
{
|
||||
const struct url_data *data;
|
||||
|
||||
data = urldb_get_url_data(url);
|
||||
if (!data)
|
||||
return;
|
||||
|
||||
|
||||
}
|
||||
|
||||
void global_history_add_recent(const char *url)
|
||||
|
Loading…
Reference in New Issue
Block a user