]> spindle.queued.net Git - midori/commitdiff
Only add the Auth feature if WebKit didn't already
authorChristian Dywan <christian@twotoasts.de>
Tue, 17 Feb 2009 17:34:27 +0000 (18:34 +0100)
committerChristian Dywan <christian@twotoasts.de>
Tue, 17 Feb 2009 17:34:27 +0000 (18:34 +0100)
katze/katze-http-auth.c
midori/main.c

index 2ba53a5656532b331ef181b27439d3c5f3662e63..fd15d87c14101d578e4112e3ef841e8534ec8d1a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- Copyright (C) 2009 Christian Dywan <christian@twotoasts.de>
+ Copyright (C) 2008-2009 Christian Dywan <christian@twotoasts.de>
 
  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,
index fe7f62ba4583d07dde1e5c541d5abdd0723c53af..8c7d81f5d4baa108f27ebc9aa14b7132090787e6 100644 (file)
@@ -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);