From: Christian Dywan Date: Tue, 17 Feb 2009 17:34:27 +0000 (+0100) Subject: Only add the Auth feature if WebKit didn't already X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5aaff908cbc7772d27f232f45c0cdaca1be7bef9;p=midori Only add the Auth feature if WebKit didn't already --- diff --git a/katze/katze-http-auth.c b/katze/katze-http-auth.c index 2ba53a56..fd15d87c 100644 --- a/katze/katze-http-auth.c +++ b/katze/katze-http-auth.c @@ -1,5 +1,5 @@ /* - Copyright (C) 2009 Christian Dywan + Copyright (C) 2008-2009 Christian Dywan This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -39,7 +39,7 @@ katze_http_auth_session_feature_iface_init (SoupSessionFeatureInterface *iface, G_DEFINE_TYPE_WITH_CODE (KatzeHttpAuth, katze_http_auth, G_TYPE_OBJECT, G_IMPLEMENT_INTERFACE (SOUP_TYPE_SESSION_FEATURE, - katze_http_auth_session_feature_iface_init)) + katze_http_auth_session_feature_iface_init)); static void authentication_dialog_response_cb (GtkWidget* dialog, diff --git a/midori/main.c b/midori/main.c index fe7f62ba..8c7d81f5 100644 --- a/midori/main.c +++ b/midori/main.c @@ -216,10 +216,10 @@ settings_new_from_file (const gchar* filename) enum_value->value_name, NULL); enum_value = g_enum_get_value_by_name (enum_class, str); if (enum_value) - g_object_set (settings, property, enum_value->value, NULL); - else - g_warning (_("Value '%s' is invalid for %s"), - str, property); + g_object_set (settings, property, enum_value->value, NULL); + else + g_warning (_("Value '%s' is invalid for %s"), + str, property); g_free (str); g_type_class_unref (enum_class); @@ -1409,7 +1409,10 @@ soup_session_constructed_cb (GObject* object) g_signal_connect (settings, "notify::ident-string", G_CALLBACK (soup_session_settings_notify_ident_string_cb), object); - soup_session_add_feature_by_type (session, KATZE_TYPE_HTTP_AUTH); + /* Only add the Auth feature if WebKit didn't already */ + if (!g_signal_has_handler_pending (session, + g_signal_lookup ("authenticate", SOUP_TYPE_SESSION), 0, FALSE)) + soup_session_add_feature_by_type (session, KATZE_TYPE_HTTP_AUTH); midori_soup_session_debug (session); feature = g_object_new (KATZE_TYPE_HTTP_COOKIES, NULL);