Only add the Auth feature if WebKit didn't already
This commit is contained in:
parent
3763990c3a
commit
5aaff908cb
2 changed files with 10 additions and 7 deletions
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue