summaryrefslogtreecommitdiff
path: root/riscos/hotlist.c
diff options
context:
space:
mode:
authorSteve Fryatt <steve@stevefryatt.org.uk>2010-10-24 21:52:16 +0000
committerSteve Fryatt <steve@stevefryatt.org.uk>2010-10-24 21:52:16 +0000
commita1194cd03ffca1ebe29275bdab7c03a441d554e1 (patch)
tree0e77500e1034f72d6b66fee57f29f670ea07ed0b /riscos/hotlist.c
parentba197f29c7e4784a6d649b262d3951e5e7fef41b (diff)
downloadnetsurf-a1194cd03ffca1ebe29275bdab7c03a441d554e1.tar.gz
netsurf-a1194cd03ffca1ebe29275bdab7c03a441d554e1.tar.bz2
Re-enable toolbar editing and button selection in RO treeview windows.
svn path=/trunk/netsurf/; revision=10907
Diffstat (limited to 'riscos/hotlist.c')
-rw-r--r--riscos/hotlist.c30
1 files changed, 24 insertions, 6 deletions
diff --git a/riscos/hotlist.c b/riscos/hotlist.c
index aed66532a..61202eaa2 100644
--- a/riscos/hotlist.c
+++ b/riscos/hotlist.c
@@ -181,7 +181,11 @@ void ro_gui_hotlist_open(void)
bool ro_gui_hotlist_toolbar_click(wimp_pointer *pointer)
{
- LOG(("Entering hotlist toolbar handler: b=%d, i=%d", pointer->buttons, pointer->i));
+ if (hotlist_window.toolbar->editor != NULL) {
+ ro_gui_theme_toolbar_editor_click(hotlist_window.toolbar,
+ pointer);
+ return true;
+ }
switch (pointer->i) {
case ICON_TOOLBAR_DELETE:
@@ -254,17 +258,17 @@ void ro_gui_hotlist_menu_prepare(wimp_w window, wimp_menu *menu)
ro_gui_menu_set_entry_shaded(hotlist_window.menu, TOOLBAR_BUTTONS,
(hotlist_window.toolbar == NULL ||
- hotlist_window.toolbar->editor));
+ hotlist_window.toolbar->editor != NULL));
ro_gui_menu_set_entry_ticked(hotlist_window.menu, TOOLBAR_BUTTONS,
(hotlist_window.toolbar != NULL &&
(hotlist_window.toolbar->display_buttons ||
- hotlist_window.toolbar->editor)));
+ (hotlist_window.toolbar->editor != NULL))));
ro_gui_menu_set_entry_shaded(hotlist_window.menu, TOOLBAR_EDIT,
hotlist_window.toolbar == NULL);
ro_gui_menu_set_entry_ticked(hotlist_window.menu, TOOLBAR_EDIT,
(hotlist_window.toolbar != NULL &&
- hotlist_window.toolbar->editor));
+ hotlist_window.toolbar->editor != NULL));
ro_gui_save_prepare(GUI_SAVE_HOTLIST_EXPORT_HTML,
NULL, NULL, NULL, NULL);
@@ -341,6 +345,14 @@ bool ro_gui_hotlist_menu_select(wimp_w window, wimp_menu *menu,
case TREE_CLEAR_SELECTION:
hotlist_clear_selection();
return true;
+ case TOOLBAR_BUTTONS:
+ hotlist_window.toolbar->display_buttons =
+ !hotlist_window.toolbar->display_buttons;
+ ro_gui_theme_refresh_toolbar(hotlist_window.toolbar);
+ return true;
+ case TOOLBAR_EDIT:
+ ro_gui_theme_toggle_edit(hotlist_window.toolbar);
+ return true;
default:
return false;
}
@@ -350,11 +362,17 @@ bool ro_gui_hotlist_menu_select(wimp_w window, wimp_menu *menu,
/**
* Update the theme details of the hotlist window.
+ *
+ * \param full_update true to force a full theme change; false to
+ * refresh the toolbar size.
*/
-void ro_gui_hotlist_update_theme(void)
+void ro_gui_hotlist_update_theme(bool full_update)
{
- ro_treeview_update_theme(hotlist_window.tv);
+ if (full_update)
+ ro_treeview_update_theme(hotlist_window.tv);
+ else
+ ro_treeview_update_toolbar(hotlist_window.tv);
}
/**