Codebase list epiphany-browser / 636444f
web-view: don't connect to embed-shell in page-created cb This isn't the right place. It could lead to these signals being connected multiple times due to PSON. Michael Catanzaro 4 years ago
1 changed file(s) with 18 addition(s) and 14 deletion(s). Raw diff Collapse all Expand all
918918
919919 view->web_process_extension = web_process_extension;
920920 g_object_add_weak_pointer (G_OBJECT (view->web_process_extension), (gpointer *)&view->web_process_extension);
921
922 g_signal_connect_object (shell, "password-form-focused",
923 G_CALLBACK (password_form_focused_cb),
924 view, 0);
925
926 g_signal_connect_object (shell, "allow-tls-certificate",
927 G_CALLBACK (allow_tls_certificate_cb),
928 view, 0);
929
930 g_signal_connect_object (shell, "allow-unsafe-browsing",
931 G_CALLBACK (allow_unsafe_browsing_cb),
932 view, 0);
933921 }
934922
935923 static void
29072895 static void
29082896 ephy_web_view_init (EphyWebView *web_view)
29092897 {
2898 EphyEmbedShell *shell;
2899
2900 shell = ephy_embed_shell_get_default ();
2901
29102902 web_view->is_blank = TRUE;
29112903 web_view->ever_committed = FALSE;
29122904 web_view->document_type = EPHY_WEB_VIEW_DOCUMENT_HTML;
29142906
29152907 web_view->file_monitor = ephy_file_monitor_new (web_view);
29162908
2917 web_view->history_service = ephy_embed_shell_get_global_history_service (ephy_embed_shell_get_default ());
2909 web_view->history_service = ephy_embed_shell_get_global_history_service (shell);
29182910 web_view->history_service_cancellable = g_cancellable_new ();
29192911
29202912 g_signal_connect_object (EPHY_SETTINGS_READER, "changed::" EPHY_PREFS_READER_FONT_STYLE,
29842976 G_CALLBACK (authenticate_cb),
29852977 NULL);
29862978
2987 g_signal_connect_object (ephy_embed_shell_get_default (), "page-created",
2979 g_signal_connect_object (shell, "page-created",
29882980 G_CALLBACK (page_created_cb),
2981 web_view, 0);
2982
2983 g_signal_connect_object (shell, "password-form-focused",
2984 G_CALLBACK (password_form_focused_cb),
2985 web_view, 0);
2986
2987 g_signal_connect_object (shell, "allow-tls-certificate",
2988 G_CALLBACK (allow_tls_certificate_cb),
2989 web_view, 0);
2990
2991 g_signal_connect_object (shell, "allow-unsafe-browsing",
2992 G_CALLBACK (allow_unsafe_browsing_cb),
29892993 web_view, 0);
29902994 }
29912995