Use API to find out if a browser window has a selection.

svn path=/trunk/netsurf/; revision=12683
This commit is contained in:
Michael Drake 2011-08-31 11:47:02 +00:00
parent f2e3b559f0
commit ca162211f5

View File

@ -202,11 +202,11 @@ static inline bool compare_float( float a, float b )
SEL action = [item action];
if (action == @selector(copy:)) {
return selection_defined( browser->sel );
return browser_window_has_selection( browser );
}
if (action == @selector(cut:)) {
return selection_defined( browser->sel ) && browser->caret_callback != NULL;
return browser_window_has_selection( browser ) && browser->caret_callback != NULL;
}
if (action == @selector(paste:)) {