[evolution] action_show_webkit_gpu_cb: Use current view when searching for a web view



commit f08abddd7e5ebe91ef16e91391ffb0864697ce21
Author: Milan Crha <mcrha redhat com>
Date:   Thu Jan 7 13:01:23 2021 +0100

    action_show_webkit_gpu_cb: Use current view when searching for a web view
    
    Use current view when searching for the WebKitWebView, thus the page
    is loaded in this view, not in the first being created after start.

 src/shell/e-shell-window-actions.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/shell/e-shell-window-actions.c b/src/shell/e-shell-window-actions.c
index a4d0829720..92094739f5 100644
--- a/src/shell/e-shell-window-actions.c
+++ b/src/shell/e-shell-window-actions.c
@@ -687,8 +687,13 @@ action_show_webkit_gpu_cb (GtkAction *action,
                           EShellWindow *shell_window)
 {
        WebKitWebView *webview;
+       EShellView *shell_view;
+       EShellContent *shell_content;
+
+       shell_view = e_shell_window_get_shell_view (shell_window, e_shell_window_get_active_view 
(shell_window));
+       shell_content = e_shell_view_get_shell_content (shell_view);
 
-       webview = shell_window_actions_find_webview (GTK_CONTAINER (shell_window));
+       webview = shell_window_actions_find_webview (GTK_CONTAINER (shell_content));
 
        if (webview)
                webkit_web_view_load_uri (webview, "webkit://gpu");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]