summaryrefslogtreecommitdiff
path: root/windows
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2013-02-22 14:19:04 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2013-02-22 14:19:04 +0000
commit4fd095c06081104bbf6b5c02af4f37a16ae70cb5 (patch)
tree04b73d3426d9115a9cd28d506256985e6d95931b /windows
parent8195113196049538b7f713eff358cc4ac40ecaf1 (diff)
downloadnetsurf-4fd095c06081104bbf6b5c02af4f37a16ae70cb5.tar.gz
netsurf-4fd095c06081104bbf6b5c02af4f37a16ae70cb5.tar.bz2
Update for core change.
Diffstat (limited to 'windows')
-rw-r--r--windows/gui.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/windows/gui.c b/windows/gui.c
index 101767962..7f2c740d1 100644
--- a/windows/gui.c
+++ b/windows/gui.c
@@ -367,8 +367,10 @@ static void nsws_window_update_forward_back(struct gui_window *w)
static void nsws_update_edit(struct gui_window *w)
{
+ browser_editor_flags editor_flags = (w->bw == NULL) ?
+ BW_EDITOR_NONE : browser_window_get_editor_flags(w->bw);
bool paste, copy, del;
- bool sel = (w->bw != NULL && browser_window_has_selection(w->bw));
+ bool sel = (editor_flags & BW_EDITOR_CAN_COPY);
if (GetFocus() == w->urlbar) {
DWORD i, ii;
SendMessage(w->urlbar, EM_GETSEL, (WPARAM)&i, (LPARAM)&ii);
@@ -377,9 +379,9 @@ static void nsws_update_edit(struct gui_window *w)
del = (i != ii);
} else if (sel){
- paste = (w->bw->paste_callback != NULL);
+ paste = (editor_flags & BW_EDITOR_CAN_PASTE);
copy = sel;
- del = (sel && (w->bw->caret_callback != NULL));
+ del = (editor_flags & BW_EDITOR_CAN_CUT);
} else {
paste = false;
copy = false;