summaryrefslogtreecommitdiff
path: root/riscos
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2014-10-18 10:16:00 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2014-10-18 10:16:00 +0100
commit34cdbcfc2553e2e16f47308352ec69a64a2740a3 (patch)
treed5e41c69fd8a371afa40f5d37c980e5116ddd062 /riscos
parent56a5ad11f3e98ef50a8de243dc509c3a0c603e32 (diff)
downloadnetsurf-34cdbcfc2553e2e16f47308352ec69a64a2740a3.tar.gz
netsurf-34cdbcfc2553e2e16f47308352ec69a64a2740a3.tar.bz2
Move up_available fn to core.
Diffstat (limited to 'riscos')
-rw-r--r--riscos/window.c34
1 files changed, 2 insertions, 32 deletions
diff --git a/riscos/window.c b/riscos/window.c
index f32b1d5bb..236f1651a 100644
--- a/riscos/window.c
+++ b/riscos/window.c
@@ -126,7 +126,6 @@ static void ro_gui_window_toolbar_click(void *data,
static bool ro_gui_window_content_export_types(hlcache_handle *h,
bool *export_draw, bool *export_sprite);
-static bool ro_gui_window_up_available(struct browser_window *bw);
static void ro_gui_window_prepare_pageinfo(struct gui_window *g);
static void ro_gui_window_prepare_objectinfo(hlcache_handle *object,
const char *href);
@@ -2335,7 +2334,7 @@ bool ro_gui_window_menu_prepare(wimp_w w, wimp_i i, wimp_menu *menu,
!browser_window_stop_available(bw));
ro_gui_menu_set_entry_shaded(menu, BROWSER_NAVIGATE_UP,
- !ro_gui_window_up_available(bw));
+ !browser_window_up_available(bw));
@@ -3802,35 +3801,6 @@ bool ro_gui_window_content_export_types(hlcache_handle *h,
/**
- * Return true if a browser window can navigate upwards.
- *
- * \todo This should probably be somewhere else but in window.c.
- *
- * \param bw the browser window to test.
- * \return true if navigation up is possible otherwise false.
- */
-
-bool ro_gui_window_up_available(struct browser_window *bw)
-{
- bool result = false;
- nsurl *parent;
-
- if (bw != NULL && bw->current_content != NULL) {
- nserror err = nsurl_parent(hlcache_handle_get_url(
- bw->current_content), &parent);
- if (err == NSERROR_OK) {
- result = nsurl_compare(hlcache_handle_get_url(
- bw->current_content), parent,
- NSURL_COMPLETE) == false;
- nsurl_unref(parent);
- }
- }
-
- return result;
-}
-
-
-/**
* Prepare the page info window for use.
*
* \param *g The GUI window block to use.
@@ -4366,7 +4336,7 @@ void ro_gui_window_update_toolbar_buttons(struct gui_window *g)
!browser_window_forward_available(bw));
ro_toolbar_set_button_shaded_state(toolbar, TOOLBAR_BUTTON_UP,
- !ro_gui_window_up_available(bw));
+ !browser_window_up_available(bw));
ro_toolbar_set_button_shaded_state(toolbar, TOOLBAR_BUTTON_SEARCH,
h == NULL || (content_get_type(h) != CONTENT_HTML &&