summaryrefslogtreecommitdiff
path: root/riscos/menus.c
diff options
context:
space:
mode:
authorAdrian Lees <adrian@aemulor.com>2009-02-02 00:06:31 +0000
committerAdrian Lees <adrian@aemulor.com>2009-02-02 00:06:31 +0000
commit15e8ba0270fac14839fd4dda65418904bfd0c880 (patch)
tree3967ca33f543add1b7b838486092381460e1260b /riscos/menus.c
parenta15d9876caa4a0b3a31f1c7fafb724be984d95fb (diff)
downloadnetsurf-15e8ba0270fac14839fd4dda65418904bfd0c880.tar.gz
netsurf-15e8ba0270fac14839fd4dda65418904bfd0c880.tar.bz2
Selection menu and save/download tweaks
svn path=/trunk/netsurf/; revision=6349
Diffstat (limited to 'riscos/menus.c')
-rw-r--r--riscos/menus.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/riscos/menus.c b/riscos/menus.c
index 0f9277d24..cc88f905e 100644
--- a/riscos/menus.c
+++ b/riscos/menus.c
@@ -2099,9 +2099,9 @@ void ro_gui_menu_prepare_action(wimp_w owner, menu_action action,
break;
case BROWSER_SELECTION:
- /* make menu available if there's a selection or an input field for pasting */
+ /* make menu available if there's anything that /could/ be selected */
ro_gui_menu_set_entry_shaded(current_menu, action,
- !(c && (bw->paste_callback || (bw->sel && selection_defined(bw->sel)))));
+ !c || (c->type != CONTENT_HTML && c->type != CONTENT_TEXTPLAIN));
break;
case BROWSER_SELECTION_SAVE:
if (c && (!bw->sel || !selection_defined(bw->sel))) c = NULL;
@@ -2110,10 +2110,14 @@ void ro_gui_menu_prepare_action(wimp_w owner, menu_action action,
ro_gui_save_prepare(GUI_SAVE_TEXT_SELECTION, NULL, bw->sel, NULL, NULL);
break;
case BROWSER_SELECTION_COPY:
- case BROWSER_SELECTION_CUT:
ro_gui_menu_set_entry_shaded(current_menu, action,
!(c && bw->sel && selection_defined(bw->sel)));
break;
+ case BROWSER_SELECTION_CUT:
+ ro_gui_menu_set_entry_shaded(current_menu, action,
+ !(c && bw->sel && selection_defined(bw->sel)
+ && !selection_read_only(bw->sel)));
+ break;
case BROWSER_SELECTION_PASTE:
ro_gui_menu_set_entry_shaded(current_menu, action, !(c && bw->paste_callback));
break;