mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-24 21:16:50 +03:00
[project @ 2004-06-22 20:39:16 by bursa]
Implement reload, with ^R shortcut. svn path=/import/netsurf/; revision=994
This commit is contained in:
parent
e4d780c476
commit
07ef69aea3
@ -396,6 +396,22 @@ void browser_window_stop(struct browser_window *bw)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reload the page in a browser window.
|
||||
*
|
||||
* \param bw browser window
|
||||
*/
|
||||
|
||||
void browser_window_reload(struct browser_window *bw)
|
||||
{
|
||||
if (!bw->current_content || bw->loading_content)
|
||||
return;
|
||||
|
||||
bw->current_content->fresh = false;
|
||||
browser_window_go_post(bw, bw->current_content->url, 0, 0, false);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Change the status bar of a browser window.
|
||||
*
|
||||
|
@ -90,6 +90,7 @@ void browser_window_go_post(struct browser_window *bw, const char *url,
|
||||
struct form_successful_control *post_multipart,
|
||||
bool history_add);
|
||||
void browser_window_stop(struct browser_window *bw);
|
||||
void browser_window_reload(struct browser_window *bw);
|
||||
void browser_window_destroy(struct browser_window *bw);
|
||||
|
||||
int browser_window_action(struct browser_window* bw, struct browser_action* act);
|
||||
|
@ -669,21 +669,16 @@ void ro_gui_toolbar_click(gui_window* g, wimp_pointer* pointer)
|
||||
browser_window_stop(g->data.browser.bw);
|
||||
break;
|
||||
|
||||
case ICON_TOOLBAR_RELOAD:
|
||||
browser_window_reload(g->data.browser.bw);
|
||||
break;
|
||||
|
||||
case ICON_TOOLBAR_HISTORY:
|
||||
ro_gui_history_open(g->data.browser.bw,
|
||||
g->data.browser.bw->history,
|
||||
pointer->pos.x, pointer->pos.y);
|
||||
break;
|
||||
|
||||
case ICON_TOOLBAR_RELOAD:
|
||||
/* browser_window_open_location_historical(g->data.browser.bw,
|
||||
g->data.browser.bw->url
|
||||
#ifdef WITH_POST
|
||||
, 0, 0
|
||||
#endif
|
||||
);*/
|
||||
break;
|
||||
|
||||
case ICON_TOOLBAR_SCALE:
|
||||
current_gui = g;
|
||||
ro_gui_menu_prepare_scale();
|
||||
@ -841,7 +836,7 @@ bool ro_gui_window_keypress(gui_window *g, int key, bool toolbar)
|
||||
if (!toolbar) {
|
||||
int c = key;
|
||||
/* Munge cursor keys into unused control chars */
|
||||
/* We can't map on to any of: 3,8,10,13,17,21,22,23 or 24
|
||||
/* We can't map on to any of: 3,8,10,13,17,18,21,22,23 or 24
|
||||
* That leaves 1,2,4-7,11,12,14-16,18-20,25-31 and 129-159
|
||||
*/
|
||||
if (c == 394) c = 9; /* Tab */
|
||||
@ -946,6 +941,10 @@ bool ro_gui_window_keypress(gui_window *g, int key, bool toolbar)
|
||||
browser_window_stop(g->data.browser.bw);
|
||||
return true;
|
||||
|
||||
case 18: /* CTRL+R */
|
||||
browser_window_reload(g->data.browser.bw);
|
||||
return true;
|
||||
|
||||
case 17: /* CTRL+Q (Zoom out) */
|
||||
current_gui = g;
|
||||
if (0.1 < current_gui->scale) {
|
||||
|
Loading…
Reference in New Issue
Block a user