diff options
author | Carlos Garcia Campos <cgarcia@igalia.com> | 2012-08-09 18:22:32 +0800 |
---|---|---|
committer | Carlos Garcia Campos <carlosgc@gnome.org> | 2012-08-09 20:50:33 +0800 |
commit | 2baca54cfea1c4b12d2b363d744c72f24f7f71c3 (patch) | |
tree | a6cf2b1087dae4971594582c7ab215046bd52deb /src/ephy-window.c | |
parent | 833d2ba2b1f1c08c73f47c0bb3ef843fa94c7055 (diff) | |
download | gsoc2013-epiphany-2baca54cfea1c4b12d2b363d744c72f24f7f71c3.tar gsoc2013-epiphany-2baca54cfea1c4b12d2b363d744c72f24f7f71c3.tar.gz gsoc2013-epiphany-2baca54cfea1c4b12d2b363d744c72f24f7f71c3.tar.bz2 gsoc2013-epiphany-2baca54cfea1c4b12d2b363d744c72f24f7f71c3.tar.lz gsoc2013-epiphany-2baca54cfea1c4b12d2b363d744c72f24f7f71c3.tar.xz gsoc2013-epiphany-2baca54cfea1c4b12d2b363d744c72f24f7f71c3.tar.zst gsoc2013-epiphany-2baca54cfea1c4b12d2b363d744c72f24f7f71c3.zip |
Show information about the SSL errors when clicking on lock icon
If libgcr is available it's used to show the information about the TLS
certificate in the dialog too.
https://bugzilla.gnome.org/show_bug.cgi?id=681506
Diffstat (limited to 'src/ephy-window.c')
-rw-r--r-- | src/ephy-window.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c index bf91d30b6..c9113c2eb 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -25,6 +25,7 @@ #include "ephy-action-helper.h" #include "ephy-bookmarks-ui.h" +#include "ephy-certificate-dialog.h" #include "ephy-combined-stop-reload-action.h" #include "ephy-debug.h" #include "ephy-download-widget.h" @@ -3429,6 +3430,30 @@ zoom_to_level_cb (GtkAction *action, ephy_window_set_zoom (window, zoom); } +static void +lock_clicked_cb (EphyLocationController *controller, + EphyWindow *window) +{ + EphyWindowPrivate *priv = window->priv; + EphyWebView *view; + GTlsCertificate *certificate; + GTlsCertificateFlags tls_errors; + GtkWidget *certificate_dialog; + + view = ephy_embed_get_web_view (priv->active_embed); + ephy_web_view_get_security_level (view, NULL, &certificate, &tls_errors); + + certificate_dialog = ephy_certificate_dialog_new (GTK_WINDOW (window), + ephy_location_controller_get_address (controller), + certificate, + tls_errors); + gtk_window_set_destroy_with_parent (GTK_WINDOW (certificate_dialog), TRUE); + g_signal_connect (certificate_dialog, "response", + G_CALLBACK (gtk_widget_destroy), + NULL); + gtk_widget_show (certificate_dialog); +} + static GtkWidget * setup_toolbar (EphyWindow *window) { @@ -3559,6 +3584,8 @@ ephy_window_constructor (GType type, G_CALLBACK (sync_user_input_cb), window); g_signal_connect_swapped (priv->location_controller, "open-link", G_CALLBACK (ephy_link_open), window); + g_signal_connect (priv->location_controller, "lock-clicked", + G_CALLBACK (lock_clicked_cb), window); g_signal_connect_swapped (priv->notebook, "open-link", G_CALLBACK (ephy_link_open), window); |