diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2013-02-22 14:19:04 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2013-02-22 14:19:04 +0000 |
commit | 4fd095c06081104bbf6b5c02af4f37a16ae70cb5 (patch) | |
tree | 04b73d3426d9115a9cd28d506256985e6d95931b /windows | |
parent | 8195113196049538b7f713eff358cc4ac40ecaf1 (diff) | |
download | netsurf-4fd095c06081104bbf6b5c02af4f37a16ae70cb5.tar.gz netsurf-4fd095c06081104bbf6b5c02af4f37a16ae70cb5.tar.bz2 |
Update for core change.
Diffstat (limited to 'windows')
-rw-r--r-- | windows/gui.c | 8 |
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; |