Allow to compile also with libsoup below 2.4.
authorDaniel Carl <danielcarl@gmx.de>
Thu, 29 May 2014 18:41:11 +0000 (20:41 +0200)
committerDaniel Carl <danielcarl@gmx.de>
Thu, 29 May 2014 18:44:32 +0000 (20:44 +0200)
README.md
src/setting.c

index b327f1a..3468507 100644 (file)
--- a/README.md
+++ b/README.md
@@ -44,7 +44,7 @@ the [vimb project page][vimb].
 ## dependencies
 - libwebkit >=1.5.0
 - libgtk+-2.0
-- libsoup-2.4
+- libsoup >=2.38
 
 ## install
 Edit config.mk to match your local setup.
index 75f2c2e..327ef0d 100644 (file)
@@ -929,14 +929,14 @@ static SettingStatus hsts(const Setting *s, const SettingType type)
 {
     gboolean active;
     if (type == SETTING_GET) {
-        active = soup_session_has_feature(vb.session, HSTS_TYPE_PROVIDER);
+        active = (soup_session_get_feature(vb.session, HSTS_TYPE_PROVIDER) != NULL);
         print_value(s, &active);
 
         return SETTING_OK;
     }
 
     if (type == SETTING_TOGGLE) {
-        active = !soup_session_has_feature(vb.session, HSTS_TYPE_PROVIDER);
+        active = (soup_session_get_feature(vb.session, HSTS_TYPE_PROVIDER) == NULL);
         print_value(s, &active);
     } else {
         active = (s->arg.i != 0);