diff options
author | Steve Fryatt <steve@stevefryatt.org.uk> | 2010-10-24 20:00:45 +0000 |
---|---|---|
committer | Steve Fryatt <steve@stevefryatt.org.uk> | 2010-10-24 20:00:45 +0000 |
commit | ba197f29c7e4784a6d649b262d3951e5e7fef41b (patch) | |
tree | 3e1c7f506e5a94bc0cfd781547d151f6369d95ed /riscos/hotlist.c | |
parent | 00434615ed1a25b7d722e942406d0ddc8c08cdf3 (diff) | |
download | netsurf-ba197f29c7e4784a6d649b262d3951e5e7fef41b.tar.gz netsurf-ba197f29c7e4784a6d649b262d3951e5e7fef41b.tar.bz2 |
Partially re-enable toolbar buttons in RO treeview windows.
svn path=/trunk/netsurf/; revision=10906
Diffstat (limited to 'riscos/hotlist.c')
-rw-r--r-- | riscos/hotlist.c | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/riscos/hotlist.c b/riscos/hotlist.c index 6e2d176cc..aed66532a 100644 --- a/riscos/hotlist.c +++ b/riscos/hotlist.c @@ -173,6 +173,68 @@ void ro_gui_hotlist_open(void) } /** + * Handle Mouse Click events on the toolbar. + * + * \param *pointer Pointer to the Mouse Click Event block. + * \return Return true if click handled; else false. + */ + +bool ro_gui_hotlist_toolbar_click(wimp_pointer *pointer) +{ + LOG(("Entering hotlist toolbar handler: b=%d, i=%d", pointer->buttons, pointer->i)); + + switch (pointer->i) { + case ICON_TOOLBAR_DELETE: + if (pointer->buttons == wimp_CLICK_SELECT) { + hotlist_delete_selected(); + return true; + } + break; + case ICON_TOOLBAR_EXPAND: + if (pointer->buttons == wimp_CLICK_SELECT) { + hotlist_expand_addresses(); + return true; + } else if (pointer->buttons == wimp_CLICK_ADJUST) { + hotlist_collapse_addresses(); + return true; + } + break; + case ICON_TOOLBAR_OPEN: + if (pointer->buttons == wimp_CLICK_SELECT) { + hotlist_expand_directories(); + return true; + } else if (pointer->buttons == wimp_CLICK_ADJUST) { + hotlist_collapse_directories(); + return true; + } + break; + case ICON_TOOLBAR_LAUNCH: + if (pointer->buttons == wimp_CLICK_SELECT) { + hotlist_launch_selected(); + return true; + } + break; + case ICON_TOOLBAR_CREATE: + if (pointer->buttons == wimp_CLICK_SELECT) { + hotlist_add_folder(); + return true; + } + break; + } + + + /* \todo -- We assume that the owning module will have attached a window menu + * to our parent window. If it hasn't, this call will quietly fail. + */ + + if (pointer->buttons == wimp_CLICK_MENU) + return ro_gui_wimp_event_process_window_menu_click(pointer); + + return true; +} + + +/** * Prepare the hotlist menu for opening * * \param window The window owning the menu. |