summaryrefslogtreecommitdiff
path: root/riscos/menus.c
diff options
context:
space:
mode:
authorRichard Wilson <rjw@netsurf-browser.org>2005-03-18 23:52:38 +0000
committerRichard Wilson <rjw@netsurf-browser.org>2005-03-18 23:52:38 +0000
commit036622f35fc98ad154a982f1dd6f384f66d79707 (patch)
tree89f47a06134b137a24df04417799330eff9a1cfb /riscos/menus.c
parent793bb9119a04a109c2ac55200f0d4a00d026dee0 (diff)
downloadnetsurf-036622f35fc98ad154a982f1dd6f384f66d79707.tar.gz
netsurf-036622f35fc98ad154a982f1dd6f384f66d79707.tar.bz2
[project @ 2005-03-18 23:52:38 by rjw]
Allow windows to be resized to an absolute minimum (toolbars collapse.) svn path=/import/netsurf/; revision=1541
Diffstat (limited to 'riscos/menus.c')
-rw-r--r--riscos/menus.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/riscos/menus.c b/riscos/menus.c
index 9c7fd4347..55c4ed8a5 100644
--- a/riscos/menus.c
+++ b/riscos/menus.c
@@ -2007,9 +2007,11 @@ void ro_gui_menu_prepare_hotlist(void) {
bool reopen = false;
bool selection = false;
struct node *single = NULL;
+ struct toolbar *hotlist_toolbar;
if (!hotlist_tree)
return;
+ hotlist_toolbar = hotlist_tree->toolbar;
if (hotlist_tree->root->child) {
single = tree_get_selected_node(hotlist_tree->root->child);
@@ -2022,13 +2024,13 @@ void ro_gui_menu_prepare_hotlist(void) {
hotlist_file_menu->entries[2].icon_flags |= wimp_ICON_SHADED;
hotlist_file_menu->entries[3].icon_flags &= wimp_ICON_SHADED;
}
- ro_gui_set_icon_shaded_state(hotlist_toolbar->toolbar_handle,
- ICON_TOOLBAR_OPEN, !hotlist_tree->root->child);
- ro_gui_set_icon_shaded_state(hotlist_toolbar->toolbar_handle,
- ICON_TOOLBAR_EXPAND, !hotlist_tree->root->child);
if (hotlist_toolbar) {
ro_gui_set_icon_shaded_state(hotlist_toolbar->toolbar_handle,
+ ICON_TOOLBAR_OPEN, !hotlist_tree->root->child);
+ ro_gui_set_icon_shaded_state(hotlist_toolbar->toolbar_handle,
+ ICON_TOOLBAR_EXPAND, !hotlist_tree->root->child);
+ ro_gui_set_icon_shaded_state(hotlist_toolbar->toolbar_handle,
ICON_TOOLBAR_DELETE, !selection);
ro_gui_set_icon_shaded_state(hotlist_toolbar->toolbar_handle,
ICON_TOOLBAR_LAUNCH, !selection);
@@ -2070,9 +2072,11 @@ void ro_gui_menu_prepare_global_history(void) {
os_error *error;
bool reopen = false;
bool selection = false;
+ struct toolbar *global_history_toolbar;
if (!global_history_tree)
return;
+ global_history_toolbar = global_history_tree->toolbar;
if (global_history_tree->root->child) {
selection = tree_has_selection(global_history_tree->root->child);
@@ -2084,12 +2088,12 @@ void ro_gui_menu_prepare_global_history(void) {
history_file_menu->entries[1].icon_flags |= wimp_ICON_SHADED;
history_file_menu->entries[2].icon_flags |= wimp_ICON_SHADED;
}
- ro_gui_set_icon_shaded_state(global_history_toolbar->toolbar_handle,
+
+ if (global_history_toolbar) {
+ ro_gui_set_icon_shaded_state(global_history_toolbar->toolbar_handle,
ICON_TOOLBAR_OPEN, !global_history_tree->root->child);
- ro_gui_set_icon_shaded_state(global_history_toolbar->toolbar_handle,
+ ro_gui_set_icon_shaded_state(global_history_toolbar->toolbar_handle,
ICON_TOOLBAR_EXPAND, !global_history_tree->root->child);
-
- if (hotlist_toolbar) {
ro_gui_set_icon_shaded_state(global_history_toolbar->toolbar_handle,
ICON_TOOLBAR_DELETE, !selection);
ro_gui_set_icon_shaded_state(global_history_toolbar->toolbar_handle,