padding: 0;
}
-.entry.progressbar {
- background-image: -gtk-gradient(linear,
- left top, left bottom, from (@selected_bg_color), to (@selected_bg_color));
- color: @selected_fg_color;
-}
-
-.entry.security_unknown {
- background-image: -gtk-gradient(linear,
- left top, left bottom, from (#ef7070), to(#ef7070));
- color: #000;
-}
-
-.entry.security_trusted {
- background-image: -gtk-gradient(linear,
- left top, left bottom, from (#d1eeb9), to(#d1eeb9));
- color: #000;
-}
-
GtkOverlay > * {
padding: 4px;
border-style: solid;
for (; proxies != NULL; proxies = g_slist_next (proxies))
if (GTK_IS_TOOL_ITEM (proxies->data))
{
- #if !GTK_CHECK_VERSION (3, 0, 0)
- const gchar* bg_color = NULL;
- const gchar* fg_color = NULL;
- #endif
GtkWidget* entry = midori_location_action_entry_for_proxy (proxies->data);
GdkScreen* screen = gtk_widget_get_screen (entry);
GtkIconTheme* icon_theme = gtk_icon_theme_get_for_screen (screen);
if (hint == MIDORI_SECURITY_UNKNOWN)
{
#if !GTK_CHECK_VERSION (3, 0, 0)
- bg_color = "#ef7070";
- fg_color = "#000";
#endif
#if !HAVE_HILDON
if (gtk_icon_theme_has_icon (icon_theme, "channel-insecure-symbolic"))
else if (hint == MIDORI_SECURITY_TRUSTED)
{
#if !GTK_CHECK_VERSION (3, 0, 0)
- bg_color = "#d1eeb9";
- fg_color = "#000";
#endif
#if !HAVE_HILDON
if (gtk_icon_theme_has_icon (icon_theme, "channel-secure-symbolic"))
gtk_icon_entry_set_tooltip (GTK_ICON_ENTRY (entry),
GTK_ICON_ENTRY_PRIMARY, _("Open, unencrypted connection"));
}
-
- {
- #if GTK_CHECK_VERSION (3, 0, 0)
- GtkStyleContext* context = gtk_widget_get_style_context (entry);
- if (hint == MIDORI_SECURITY_UNKNOWN)
- {
- gtk_style_context_add_class (context, "security_unknown");
- gtk_style_context_remove_class (context, "security_trusted");
- }
- else if (hint == MIDORI_SECURITY_TRUSTED)
- {
- gtk_style_context_add_class (context, "security_trusted");
- gtk_style_context_remove_class (context, "security_unknown");
- }
- else if (hint == MIDORI_SECURITY_NONE)
- {
- gtk_style_context_remove_class (context, "security_unknown");
- gtk_style_context_remove_class (context, "security_trusted");
- }
- #else
- GdkColor color = { 0 };
- if (bg_color) gdk_color_parse (bg_color, &color);
- gtk_widget_modify_base (entry, GTK_STATE_NORMAL, bg_color ? &color : NULL);
- if (fg_color) gdk_color_parse (fg_color, &color);
- gtk_widget_modify_text (entry, GTK_STATE_NORMAL, fg_color ? &color : NULL);
- #endif
- }
}
}
g_object_thaw_notify (G_OBJECT (view));
}
+static gboolean
+midori_view_display_error (MidoriView* view,
+ const gchar* uri,
+ const gchar* title,
+ const gchar* message,
+ const gchar* description,
+ const gchar* try_again,
+ WebKitWebFrame* web_frame);
+
static void
webkit_web_view_load_committed_cb (WebKitWebView* web_view,
WebKitWebFrame* web_frame,
if (message
&& soup_message_get_flags (message) & SOUP_MESSAGE_CERTIFICATE_TRUSTED)
view->security = MIDORI_SECURITY_TRUSTED;
+ else if (!view->special)
+ {
+ view->security = MIDORI_SECURITY_UNKNOWN;
+ midori_view_stop_loading (view);
+ midori_view_display_error (
+ view, view->uri, view->title ? view->title : view->uri,
+ _("Security unknown"),
+ _("The certificate is invalid or unknown"),
+ _("Load Page"),
+ NULL);
+ }
else
#endif
view->security = MIDORI_SECURITY_UNKNOWN;