diff options
author | rootavish <[email protected]> | 2014-07-23 00:18:47 +0530 |
---|---|---|
committer | rootavish <[email protected]> | 2014-07-23 00:18:47 +0530 |
commit | b219a4a96ed7f38bf3de46bff790b139955bd927 (patch) | |
tree | 2b343eca1700182dd1696c617e074be237b0e3bb /shell | |
parent | 529473758fee66ac2fb0f2c89e4298789d183d5b (diff) | |
download | atril-b219a4a96ed7f38bf3de46bff790b139955bd927.tar.bz2 atril-b219a4a96ed7f38bf3de46bff790b139955bd927.tar.xz |
Cleaned some code, added select-all functionality
Select all functionality to select all content from the webview.
Cleaned ev-jobs.c, it had a lot of unused code.
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ev-window.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/shell/ev-window.c b/shell/ev-window.c index 277488c6..9232cbb6 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -453,13 +453,13 @@ ev_window_setup_action_sensitivity (EvWindow *ev_window) ev_window_set_action_sensitive (ev_window, "EditRotateRight", has_pages && !(document->iswebdocument)); /* View menu */ - /*If it has pages it is a document, so our check for a webdocument won't lead to a crash. We need to switch these off since more than one + /*If it has pages it is a document, so our check for a webdocument won't lead to a crash. We need to switch these view modes off since more than one *webview is hard to manage, and would lead to unexpected behaviour in case the number of webviews gets too large. */ ev_window_set_action_sensitive (ev_window, "ViewContinuous", has_pages && !(document->iswebdocument)); ev_window_set_action_sensitive (ev_window, "ViewDual", has_pages && !(document->iswebdocument)); ev_window_set_action_sensitive (ev_window, "ViewBestFit", has_pages && !(document->iswebdocument)); - ev_window_set_action_sensitive (ev_window, "ViewPageWidth", has_pages); + ev_window_set_action_sensitive (ev_window, "ViewPageWidth", has_pages && !(document->iswebdocument)); ev_window_set_action_sensitive (ev_window, "ViewReload", has_pages); ev_window_set_action_sensitive (ev_window, "ViewAutoscroll", has_pages && !(document->iswebdocument)); ev_window_set_action_sensitive (ev_window, "ViewInvertedColors", has_pages); @@ -930,6 +930,13 @@ view_selection_changed_cb (EvView *view, } static void +web_view_selection_changed_cb(EvWebView *webview, + EvWindow *window) +{ + +} + +static void ev_window_page_changed_cb (EvWindow *ev_window, gint old_page, gint new_page, @@ -3723,6 +3730,8 @@ ev_window_cmd_edit_select_all (GtkAction *action, EvWindow *ev_window) egg_find_bar_grab_focus(ev_window->priv->find_bar); } else if (ev_window->priv->document->iswebdocument == FALSE ) { ev_view_select_all (EV_VIEW (ev_window->priv->view)); + } else { + ev_web_view_select_all(EV_WEB_VIEW(ev_window->priv->webview)); } } |