summaryrefslogtreecommitdiff
path: root/riscos
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2014-10-18 17:52:19 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2014-10-18 17:52:19 +0100
commitb727c31de7c4e70d250e140040ea7fc27e0e0e7f (patch)
tree32703e50c0988120aaebed70279f32a408340147 /riscos
parent62395c1186428d7927a2c8743d53a7eb4935bc9b (diff)
downloadnetsurf-b727c31de7c4e70d250e140040ea7fc27e0e0e7f.tar.gz
netsurf-b727c31de7c4e70d250e140040ea7fc27e0e0e7f.tar.bz2
Avoid need for hlcache_handle by using browser APIs.
Diffstat (limited to 'riscos')
-rw-r--r--riscos/window.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/riscos/window.c b/riscos/window.c
index eeec1aec9..125d54ce8 100644
--- a/riscos/window.c
+++ b/riscos/window.c
@@ -4306,14 +4306,12 @@ void ro_gui_throb(void)
void ro_gui_window_update_toolbar_buttons(struct gui_window *g)
{
struct browser_window *bw;
- hlcache_handle *h;
struct toolbar *toolbar;
if (g == NULL || g->toolbar == NULL)
return;
bw = g->bw;
- h = bw->current_content;
toolbar = g->toolbar;
ro_toolbar_set_button_shaded_state(toolbar, TOOLBAR_BUTTON_RELOAD,
@@ -4332,17 +4330,16 @@ void ro_gui_window_update_toolbar_buttons(struct gui_window *g)
!browser_window_up_available(bw));
ro_toolbar_set_button_shaded_state(toolbar, TOOLBAR_BUTTON_SEARCH,
- h == NULL || (content_get_type(h) != CONTENT_HTML &&
- content_get_type(h) != CONTENT_TEXTPLAIN));
+ !browser_window_can_search(bw));
ro_toolbar_set_button_shaded_state(toolbar, TOOLBAR_BUTTON_SCALE,
- h == NULL);
+ !browser_window_has_content(bw));
ro_toolbar_set_button_shaded_state(toolbar, TOOLBAR_BUTTON_PRINT,
- h == NULL);
+ !browser_window_has_content(bw));
ro_toolbar_set_button_shaded_state(toolbar, TOOLBAR_BUTTON_SAVE_SOURCE,
- h == NULL);
+ !browser_window_has_content(bw));
ro_toolbar_update_urlsuggest(toolbar);
}