/*
- 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
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,
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);
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);