mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-25 07:49:38 +03:00
Remove some bw derefs.
This commit is contained in:
parent
e546e03895
commit
9d3c2b18c4
@ -3571,19 +3571,18 @@ void ro_gui_window_toolbar_click(void *data,
|
|||||||
{
|
{
|
||||||
gui_save_type save_type;
|
gui_save_type save_type;
|
||||||
|
|
||||||
if (g->bw->current_content == NULL)
|
if (!browser_window_has_content(g->bw))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
hlcache_handle *h = g->bw->current_content;
|
|
||||||
|
|
||||||
if (ro_gui_shift_pressed())
|
if (ro_gui_shift_pressed())
|
||||||
save_type = GUI_SAVE_LINK_URL;
|
save_type = GUI_SAVE_LINK_URL;
|
||||||
else
|
else
|
||||||
save_type = GUI_SAVE_LINK_TEXT;
|
save_type = GUI_SAVE_LINK_TEXT;
|
||||||
|
|
||||||
ro_gui_drag_save_link(save_type,
|
ro_gui_drag_save_link(save_type,
|
||||||
nsurl_access(hlcache_handle_get_url(h)),
|
nsurl_access(
|
||||||
content_get_title(h), g);
|
browser_window_get_url(g->bw)),
|
||||||
|
browser_window_get_title(g->bw), g);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -3687,14 +3686,14 @@ void ro_gui_window_toolbar_click(void *data,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case TOOLBAR_BUTTON_UP:
|
case TOOLBAR_BUTTON_UP:
|
||||||
if (g->bw != NULL && g->bw->current_content != NULL)
|
if (g->bw != NULL && browser_window_has_content(g->bw))
|
||||||
ro_gui_window_navigate_up(g->bw->window,
|
ro_gui_window_navigate_up(g,
|
||||||
nsurl_access(hlcache_handle_get_url(
|
nsurl_access(browser_window_get_url(
|
||||||
g->bw->current_content)));
|
g->bw)));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TOOLBAR_BUTTON_UP_NEW:
|
case TOOLBAR_BUTTON_UP_NEW:
|
||||||
if (g->bw && g->bw->current_content) {
|
if (g->bw && browser_window_has_content(g->bw)) {
|
||||||
hlcache_handle *h = g->bw->current_content;
|
hlcache_handle *h = g->bw->current_content;
|
||||||
nserror error;
|
nserror error;
|
||||||
|
|
||||||
@ -3713,7 +3712,7 @@ void ro_gui_window_toolbar_click(void *data,
|
|||||||
*/
|
*/
|
||||||
ro_gui_window_navigate_up(new_bw->window,
|
ro_gui_window_navigate_up(new_bw->window,
|
||||||
nsurl_access(hlcache_handle_get_url(h)));
|
nsurl_access(hlcache_handle_get_url(h)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user