/* config.c generated by valac 0.26.2, the Vala compiler
 * generated from config.vala, do not modify */

/*
 Copyright (C) 2014 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
 License as published by the Free Software Foundation; either
 version 2.1 of the License, or (at your option) any later version.

 See the file COPYING for the full license text.
*/

#include <glib.h>
#include <glib-object.h>
#include "toolbar-editor.h"
#include <stdlib.h>
#include <string.h>
#include <glib/gstdio.h>

#define __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_key_file_free0(var) ((var == NULL) ? NULL : (var = (g_key_file_free (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL)))

struct _AdblockConfigPrivate {
	GList* subscriptions;
	gchar* _path;
	GKeyFile* keyfile;
	gboolean should_save;
	gboolean _enabled;
	guint _size;
};


static gpointer adblock_config_parent_class = NULL;

#define ADBLOCK_CONFIG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), ADBLOCK_TYPE_CONFIG, AdblockConfigPrivate))
enum  {
	ADBLOCK_CONFIG_DUMMY_PROPERTY,
	ADBLOCK_CONFIG_PATH,
	ADBLOCK_CONFIG_ENABLED,
	ADBLOCK_CONFIG_SIZE
};
static void _g_object_unref0_ (gpointer var);
static void _g_list_free__g_object_unref0_ (GList* self);
static void adblock_config_set_path (AdblockConfig* self, const gchar* value);
static void adblock_config_set_size (AdblockConfig* self, guint value);
static void adblock_config_load_file (AdblockConfig* self, const gchar* filename);
static void adblock_config_enabled_changed (AdblockConfig* self, GParamSpec* pspec);
static void _adblock_config_enabled_changed_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void adblock_config_active_changed (AdblockConfig* self, GObject* subscription, GParamSpec* pspec);
static void adblock_config_update_filters (AdblockConfig* self);
static gboolean adblock_config_contains (AdblockConfig* self, AdblockSubscription* subscription);
static void _adblock_config_active_changed_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void adblock_config_finalize (GObject* obj);
static void _vala_adblock_config_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_adblock_config_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
static gint _vala_array_length (gpointer array);


static void _g_object_unref0_ (gpointer var) {
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
#line 71 "config.c"
}


static void _g_list_free__g_object_unref0_ (GList* self) {
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	g_list_foreach (self, (GFunc) _g_object_unref0_, NULL);
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	g_list_free (self);
#line 80 "config.c"
}


AdblockConfig* adblock_config_construct (GType object_type, const gchar* path, const gchar* presets) {
	AdblockConfig * self = NULL;
	const gchar* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
#line 20 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	self = (AdblockConfig*) g_object_new (object_type, NULL);
#line 21 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	self->priv->should_save = FALSE;
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	__g_list_free__g_object_unref0_0 (self->priv->subscriptions);
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	self->priv->subscriptions = NULL;
#line 23 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	adblock_config_set_enabled (self, TRUE);
#line 24 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_tmp0_ = path;
#line 24 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	adblock_config_set_path (self, _tmp0_);
#line 25 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	adblock_config_set_size (self, (guint) 0);
#line 26 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_tmp1_ = path;
#line 26 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	adblock_config_load_file (self, _tmp1_);
#line 27 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_tmp2_ = presets;
#line 27 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	adblock_config_load_file (self, _tmp2_);
#line 28 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	self->priv->should_save = TRUE;
#line 20 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	return self;
#line 117 "config.c"
}


AdblockConfig* adblock_config_new (const gchar* path, const gchar* presets) {
#line 20 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	return adblock_config_construct (ADBLOCK_TYPE_CONFIG, path, presets);
#line 124 "config.c"
}


static glong string_strnlen (gchar* str, glong maxlen) {
	glong result = 0L;
	gchar* end = NULL;
	gchar* _tmp0_ = NULL;
	glong _tmp1_ = 0L;
	gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
#line 1197 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp0_ = str;
#line 1197 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp1_ = maxlen;
#line 1197 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp2_ = memchr (_tmp0_, 0, (gsize) _tmp1_);
#line 1197 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	end = _tmp2_;
#line 1198 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp3_ = end;
#line 1198 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	if (_tmp3_ == NULL) {
#line 147 "config.c"
		glong _tmp4_ = 0L;
#line 1199 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_tmp4_ = maxlen;
#line 1199 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		result = _tmp4_;
#line 1199 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		return result;
#line 155 "config.c"
	} else {
		gchar* _tmp5_ = NULL;
		gchar* _tmp6_ = NULL;
#line 1201 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_tmp5_ = end;
#line 1201 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_tmp6_ = str;
#line 1201 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		result = (glong) (_tmp5_ - _tmp6_);
#line 1201 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		return result;
#line 167 "config.c"
	}
}


static gchar* string_substring (const gchar* self, glong offset, glong len) {
	gchar* result = NULL;
	glong string_length = 0L;
	gboolean _tmp0_ = FALSE;
	glong _tmp1_ = 0L;
	glong _tmp8_ = 0L;
	glong _tmp14_ = 0L;
	glong _tmp17_ = 0L;
	glong _tmp18_ = 0L;
	glong _tmp19_ = 0L;
	glong _tmp20_ = 0L;
	glong _tmp21_ = 0L;
	gchar* _tmp22_ = NULL;
#line 1208 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, NULL);
#line 1210 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp1_ = offset;
#line 1210 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	if (_tmp1_ >= ((glong) 0)) {
#line 191 "config.c"
		glong _tmp2_ = 0L;
#line 1210 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_tmp2_ = len;
#line 1210 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_tmp0_ = _tmp2_ >= ((glong) 0);
#line 197 "config.c"
	} else {
#line 1210 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_tmp0_ = FALSE;
#line 201 "config.c"
	}
#line 1210 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	if (_tmp0_) {
#line 205 "config.c"
		glong _tmp3_ = 0L;
		glong _tmp4_ = 0L;
		glong _tmp5_ = 0L;
#line 1212 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_tmp3_ = offset;
#line 1212 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_tmp4_ = len;
#line 1212 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_tmp5_ = string_strnlen ((gchar*) self, _tmp3_ + _tmp4_);
#line 1212 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		string_length = _tmp5_;
#line 217 "config.c"
	} else {
		gint _tmp6_ = 0;
		gint _tmp7_ = 0;
#line 1214 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_tmp6_ = strlen (self);
#line 1214 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_tmp7_ = _tmp6_;
#line 1214 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		string_length = (glong) _tmp7_;
#line 227 "config.c"
	}
#line 1217 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp8_ = offset;
#line 1217 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	if (_tmp8_ < ((glong) 0)) {
#line 233 "config.c"
		glong _tmp9_ = 0L;
		glong _tmp10_ = 0L;
		glong _tmp11_ = 0L;
#line 1218 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_tmp9_ = string_length;
#line 1218 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_tmp10_ = offset;
#line 1218 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		offset = _tmp9_ + _tmp10_;
#line 1219 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_tmp11_ = offset;
#line 1219 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		g_return_val_if_fail (_tmp11_ >= ((glong) 0), NULL);
#line 247 "config.c"
	} else {
		glong _tmp12_ = 0L;
		glong _tmp13_ = 0L;
#line 1221 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_tmp12_ = offset;
#line 1221 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_tmp13_ = string_length;
#line 1221 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		g_return_val_if_fail (_tmp12_ <= _tmp13_, NULL);
#line 257 "config.c"
	}
#line 1223 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp14_ = len;
#line 1223 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	if (_tmp14_ < ((glong) 0)) {
#line 263 "config.c"
		glong _tmp15_ = 0L;
		glong _tmp16_ = 0L;
#line 1224 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_tmp15_ = string_length;
#line 1224 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_tmp16_ = offset;
#line 1224 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		len = _tmp15_ - _tmp16_;
#line 272 "config.c"
	}
#line 1226 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp17_ = offset;
#line 1226 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp18_ = len;
#line 1226 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp19_ = string_length;
#line 1226 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	g_return_val_if_fail ((_tmp17_ + _tmp18_) <= _tmp19_, NULL);
#line 1227 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp20_ = offset;
#line 1227 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp21_ = len;
#line 1227 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp22_ = g_strndup (((gchar*) self) + _tmp20_, (gsize) _tmp21_);
#line 1227 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	result = _tmp22_;
#line 1227 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	return result;
#line 292 "config.c"
}


static void _adblock_config_enabled_changed_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 66 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	adblock_config_enabled_changed ((AdblockConfig*) self, pspec);
#line 299 "config.c"
}


static void adblock_config_load_file (AdblockConfig* self, const gchar* filename) {
	const gchar* _tmp0_ = NULL;
	GKeyFile* _tmp1_ = NULL;
	GError * _inner_error_ = NULL;
#line 31 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	g_return_if_fail (self != NULL);
#line 32 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_tmp0_ = filename;
#line 32 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	if (_tmp0_ == NULL) {
#line 33 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		return;
#line 315 "config.c"
	}
#line 35 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_tmp1_ = g_key_file_new ();
#line 35 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_g_key_file_free0 (self->priv->keyfile);
#line 35 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	self->priv->keyfile = _tmp1_;
#line 323 "config.c"
	{
		GKeyFile* _tmp2_ = NULL;
		const gchar* _tmp3_ = NULL;
		gchar** filters = NULL;
		GKeyFile* _tmp4_ = NULL;
		gsize _tmp5_;
		gchar** _tmp6_ = NULL;
		gint filters_length1 = 0;
		gint _filters_size_ = 0;
		gchar** _tmp7_ = NULL;
		gint _tmp7__length1 = 0;
		gboolean _tmp37_ = FALSE;
		GKeyFile* _tmp38_ = NULL;
		gboolean _tmp39_ = FALSE;
#line 37 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		_tmp2_ = self->priv->keyfile;
#line 37 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		_tmp3_ = filename;
#line 37 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		g_key_file_load_from_file (_tmp2_, _tmp3_, G_KEY_FILE_NONE, &_inner_error_);
#line 37 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 37 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
			if (g_error_matches (_inner_error_, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_KEY_NOT_FOUND)) {
#line 348 "config.c"
				goto __catch0_g_key_file_error_key_not_found;
			}
#line 37 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
			if (g_error_matches (_inner_error_, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_GROUP_NOT_FOUND)) {
#line 353 "config.c"
				goto __catch0_g_key_file_error_group_not_found;
			}
#line 37 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
			if (g_error_matches (_inner_error_, G_FILE_ERROR, G_FILE_ERROR_NOENT)) {
#line 358 "config.c"
				goto __catch0_g_file_error_noent;
			}
			goto __catch0_g_error;
		}
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		_tmp4_ = self->priv->keyfile;
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		_tmp6_ = g_key_file_get_string_list (_tmp4_, "settings", "filters", &_tmp5_, &_inner_error_);
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		filters = _tmp6_;
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		filters_length1 = _tmp5_;
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		_filters_size_ = filters_length1;
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
			if (g_error_matches (_inner_error_, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_KEY_NOT_FOUND)) {
#line 377 "config.c"
				goto __catch0_g_key_file_error_key_not_found;
			}
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
			if (g_error_matches (_inner_error_, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_GROUP_NOT_FOUND)) {
#line 382 "config.c"
				goto __catch0_g_key_file_error_group_not_found;
			}
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
			if (g_error_matches (_inner_error_, G_FILE_ERROR, G_FILE_ERROR_NOENT)) {
#line 387 "config.c"
				goto __catch0_g_file_error_noent;
			}
			goto __catch0_g_error;
		}
#line 39 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		_tmp7_ = filters;
#line 39 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		_tmp7__length1 = filters_length1;
#line 396 "config.c"
		{
			gchar** filter_collection = NULL;
			gint filter_collection_length1 = 0;
			gint _filter_collection_size_ = 0;
			gint filter_it = 0;
#line 39 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
			filter_collection = _tmp7_;
#line 39 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
			filter_collection_length1 = _tmp7__length1;
#line 39 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
			for (filter_it = 0; filter_it < _tmp7__length1; filter_it = filter_it + 1) {
#line 408 "config.c"
				gchar* _tmp8_ = NULL;
				gchar* filter = NULL;
#line 39 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
				_tmp8_ = g_strdup (filter_collection[filter_it]);
#line 39 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
				filter = _tmp8_;
#line 415 "config.c"
				{
					gboolean active = FALSE;
					gchar* uri = NULL;
					const gchar* _tmp9_ = NULL;
					gchar* _tmp10_ = NULL;
					const gchar* _tmp11_ = NULL;
					gboolean _tmp12_ = FALSE;
					AdblockSubscription* sub = NULL;
					const gchar* _tmp29_ = NULL;
					AdblockSubscription* _tmp30_ = NULL;
					AdblockSubscription* _tmp31_ = NULL;
					gboolean _tmp32_ = FALSE;
					AdblockSubscription* _tmp33_ = NULL;
					AdblockUpdater* _tmp34_ = NULL;
					AdblockUpdater* _tmp35_ = NULL;
					AdblockSubscription* _tmp36_ = NULL;
#line 40 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					active = FALSE;
#line 41 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					_tmp9_ = filter;
#line 41 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					_tmp10_ = g_strdup (_tmp9_);
#line 41 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					uri = _tmp10_;
#line 42 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					_tmp11_ = filter;
#line 42 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					_tmp12_ = g_str_has_prefix (_tmp11_, "http-/");
#line 42 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					if (_tmp12_) {
#line 446 "config.c"
						const gchar* _tmp13_ = NULL;
						gchar* _tmp14_ = NULL;
						gchar* _tmp15_ = NULL;
						gchar* _tmp16_ = NULL;
#line 43 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
						_tmp13_ = filter;
#line 43 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
						_tmp14_ = string_substring (_tmp13_, (glong) 5, (glong) (-1));
#line 43 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
						_tmp15_ = _tmp14_;
#line 43 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
						_tmp16_ = g_strconcat ("http:", _tmp15_, NULL);
#line 43 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
						_g_free0 (uri);
#line 43 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
						uri = _tmp16_;
#line 43 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
						_g_free0 (_tmp15_);
#line 465 "config.c"
					} else {
						const gchar* _tmp17_ = NULL;
						gboolean _tmp18_ = FALSE;
#line 44 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
						_tmp17_ = filter;
#line 44 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
						_tmp18_ = g_str_has_prefix (_tmp17_, "file-/");
#line 44 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
						if (_tmp18_) {
#line 475 "config.c"
							const gchar* _tmp19_ = NULL;
							gchar* _tmp20_ = NULL;
							gchar* _tmp21_ = NULL;
							gchar* _tmp22_ = NULL;
#line 45 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
							_tmp19_ = filter;
#line 45 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
							_tmp20_ = string_substring (_tmp19_, (glong) 5, (glong) (-1));
#line 45 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
							_tmp21_ = _tmp20_;
#line 45 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
							_tmp22_ = g_strconcat ("file:", _tmp21_, NULL);
#line 45 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
							_g_free0 (uri);
#line 45 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
							uri = _tmp22_;
#line 45 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
							_g_free0 (_tmp21_);
#line 494 "config.c"
						} else {
							const gchar* _tmp23_ = NULL;
							gboolean _tmp24_ = FALSE;
#line 46 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
							_tmp23_ = filter;
#line 46 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
							_tmp24_ = g_str_has_prefix (_tmp23_, "http-:");
#line 46 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
							if (_tmp24_) {
#line 504 "config.c"
								const gchar* _tmp25_ = NULL;
								gchar* _tmp26_ = NULL;
								gchar* _tmp27_ = NULL;
								gchar* _tmp28_ = NULL;
#line 47 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
								_tmp25_ = filter;
#line 47 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
								_tmp26_ = string_substring (_tmp25_, (glong) 5, (glong) (-1));
#line 47 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
								_tmp27_ = _tmp26_;
#line 47 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
								_tmp28_ = g_strconcat ("https", _tmp27_, NULL);
#line 47 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
								_g_free0 (uri);
#line 47 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
								uri = _tmp28_;
#line 47 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
								_g_free0 (_tmp27_);
#line 523 "config.c"
							} else {
#line 49 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
								active = TRUE;
#line 527 "config.c"
							}
						}
					}
#line 50 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					_tmp29_ = uri;
#line 50 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					_tmp30_ = adblock_subscription_new (_tmp29_);
#line 50 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					sub = _tmp30_;
#line 51 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					_tmp31_ = sub;
#line 51 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					_tmp32_ = active;
#line 51 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					adblock_subscription_set_active (_tmp31_, _tmp32_);
#line 52 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					_tmp33_ = sub;
#line 52 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					_tmp34_ = adblock_updater_new ();
#line 52 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					_tmp35_ = _tmp34_;
#line 52 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					adblock_subscription_add_feature (_tmp33_, (AdblockFeature*) _tmp35_);
#line 52 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					_g_object_unref0 (_tmp35_);
#line 53 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					_tmp36_ = sub;
#line 53 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					adblock_config_add (self, _tmp36_);
#line 39 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					_g_object_unref0 (sub);
#line 39 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					_g_free0 (uri);
#line 39 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					_g_free0 (filter);
#line 563 "config.c"
				}
			}
		}
#line 55 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		_tmp38_ = self->priv->keyfile;
#line 55 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		_tmp39_ = g_key_file_get_boolean (_tmp38_, "settings", "disabled", &_inner_error_);
#line 55 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		_tmp37_ = _tmp39_;
#line 55 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 55 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
			filters = (_vala_array_free (filters, filters_length1, (GDestroyNotify) g_free), NULL);
#line 55 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
			if (g_error_matches (_inner_error_, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_KEY_NOT_FOUND)) {
#line 579 "config.c"
				goto __catch0_g_key_file_error_key_not_found;
			}
#line 55 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
			if (g_error_matches (_inner_error_, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_GROUP_NOT_FOUND)) {
#line 584 "config.c"
				goto __catch0_g_key_file_error_group_not_found;
			}
#line 55 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
			if (g_error_matches (_inner_error_, G_FILE_ERROR, G_FILE_ERROR_NOENT)) {
#line 589 "config.c"
				goto __catch0_g_file_error_noent;
			}
			goto __catch0_g_error;
		}
#line 55 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		adblock_config_set_enabled (self, !_tmp37_);
#line 36 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		filters = (_vala_array_free (filters, filters_length1, (GDestroyNotify) g_free), NULL);
#line 598 "config.c"
	}
	goto __finally0;
	__catch0_g_key_file_error_key_not_found:
	{
		GError* key_error = NULL;
#line 36 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		key_error = _inner_error_;
#line 36 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		_inner_error_ = NULL;
#line 36 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		_g_error_free0 (key_error);
#line 610 "config.c"
	}
	goto __finally0;
	__catch0_g_key_file_error_group_not_found:
	{
		GError* group_error = NULL;
#line 36 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		group_error = _inner_error_;
#line 36 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		_inner_error_ = NULL;
#line 36 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		_g_error_free0 (group_error);
#line 622 "config.c"
	}
	goto __finally0;
	__catch0_g_file_error_noent:
	{
		GError* exist_error = NULL;
#line 36 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		exist_error = _inner_error_;
#line 36 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		_inner_error_ = NULL;
#line 36 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		_g_error_free0 (exist_error);
#line 634 "config.c"
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* settings_error = NULL;
		const gchar* _tmp40_ = NULL;
		GError* _tmp41_ = NULL;
		const gchar* _tmp42_ = NULL;
#line 36 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		settings_error = _inner_error_;
#line 36 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		_inner_error_ = NULL;
#line 63 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		_tmp40_ = filename;
#line 63 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		_tmp41_ = settings_error;
#line 63 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		_tmp42_ = _tmp41_->message;
#line 63 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		g_warning ("config.vala:63: Error reading settings from %s: %s\n", _tmp40_, _tmp42_);
#line 36 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		_g_error_free0 (settings_error);
#line 657 "config.c"
	}
	__finally0:
#line 36 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 36 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 36 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		g_clear_error (&_inner_error_);
#line 36 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		return;
#line 668 "config.c"
	}
#line 66 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	g_signal_connect_object ((GObject*) self, "notify::enabled", (GCallback) _adblock_config_enabled_changed_g_object_notify, self, 0);
#line 672 "config.c"
}


static void adblock_config_enabled_changed (AdblockConfig* self, GParamSpec* pspec) {
	GKeyFile* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	g_return_if_fail (self != NULL);
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	g_return_if_fail (pspec != NULL);
#line 70 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_tmp0_ = self->priv->keyfile;
#line 70 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_tmp1_ = self->priv->_enabled;
#line 70 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	g_key_file_set_boolean (_tmp0_, "settings", "disabled", !_tmp1_);
#line 71 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	adblock_config_save (self);
#line 691 "config.c"
}


static void adblock_config_active_changed (AdblockConfig* self, GObject* subscription, GParamSpec* pspec) {
#line 74 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	g_return_if_fail (self != NULL);
#line 74 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	g_return_if_fail (subscription != NULL);
#line 74 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	g_return_if_fail (pspec != NULL);
#line 75 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	adblock_config_update_filters (self);
#line 704 "config.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 80 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	return self ? g_object_ref (self) : NULL;
#line 711 "config.c"
}


static void adblock_config_update_filters (AdblockConfig* self) {
	GString* filters = NULL;
	GString* _tmp0_ = NULL;
	GList* _tmp1_ = NULL;
	GString* _tmp59_ = NULL;
	const gchar* _tmp60_ = NULL;
	gboolean _tmp61_ = FALSE;
	gchar** list = NULL;
	GString* _tmp65_ = NULL;
	const gchar* _tmp66_ = NULL;
	gchar** _tmp67_ = NULL;
	gchar** _tmp68_ = NULL;
	gint list_length1 = 0;
	gint _list_size_ = 0;
	GKeyFile* _tmp69_ = NULL;
#line 78 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	g_return_if_fail (self != NULL);
#line 79 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_tmp0_ = g_string_new ("");
#line 79 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	filters = _tmp0_;
#line 80 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_tmp1_ = self->priv->subscriptions;
#line 738 "config.c"
	{
		GList* sub_collection = NULL;
		GList* sub_it = NULL;
#line 80 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		sub_collection = _tmp1_;
#line 80 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		for (sub_it = sub_collection; sub_it != NULL; sub_it = sub_it->next) {
#line 746 "config.c"
			AdblockSubscription* _tmp2_ = NULL;
			AdblockSubscription* sub = NULL;
#line 80 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
			_tmp2_ = _g_object_ref0 ((AdblockSubscription*) sub_it->data);
#line 80 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
			sub = _tmp2_;
#line 753 "config.c"
			{
				AdblockSubscription* _tmp3_ = NULL;
				gboolean _tmp4_ = FALSE;
				gboolean _tmp5_ = FALSE;
				gboolean _tmp6_ = FALSE;
				AdblockSubscription* _tmp7_ = NULL;
				const gchar* _tmp8_ = NULL;
				const gchar* _tmp9_ = NULL;
				gboolean _tmp10_ = FALSE;
				GString* _tmp58_ = NULL;
#line 81 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
				_tmp3_ = sub;
#line 81 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
				_tmp4_ = adblock_subscription_get_mutable (_tmp3_);
#line 81 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
				_tmp5_ = _tmp4_;
#line 81 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
				if (!_tmp5_) {
#line 82 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					_g_object_unref0 (sub);
#line 82 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					continue;
#line 776 "config.c"
				}
#line 83 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
				_tmp7_ = sub;
#line 83 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
				_tmp8_ = adblock_subscription_get_uri (_tmp7_);
#line 83 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
				_tmp9_ = _tmp8_;
#line 83 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
				_tmp10_ = g_str_has_prefix (_tmp9_, "http:");
#line 83 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
				if (_tmp10_) {
#line 788 "config.c"
					AdblockSubscription* _tmp11_ = NULL;
					gboolean _tmp12_ = FALSE;
					gboolean _tmp13_ = FALSE;
#line 83 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					_tmp11_ = sub;
#line 83 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					_tmp12_ = adblock_subscription_get_active (_tmp11_);
#line 83 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					_tmp13_ = _tmp12_;
#line 83 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					_tmp6_ = !_tmp13_;
#line 800 "config.c"
				} else {
#line 83 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					_tmp6_ = FALSE;
#line 804 "config.c"
				}
#line 83 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
				if (_tmp6_) {
#line 808 "config.c"
					GString* _tmp14_ = NULL;
					AdblockSubscription* _tmp15_ = NULL;
					const gchar* _tmp16_ = NULL;
					const gchar* _tmp17_ = NULL;
					gchar* _tmp18_ = NULL;
					gchar* _tmp19_ = NULL;
					gchar* _tmp20_ = NULL;
					gchar* _tmp21_ = NULL;
#line 84 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					_tmp14_ = filters;
#line 84 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					_tmp15_ = sub;
#line 84 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					_tmp16_ = adblock_subscription_get_uri (_tmp15_);
#line 84 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					_tmp17_ = _tmp16_;
#line 84 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					_tmp18_ = string_substring (_tmp17_, (glong) 4, (glong) (-1));
#line 84 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					_tmp19_ = _tmp18_;
#line 84 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					_tmp20_ = g_strconcat ("http-", _tmp19_, NULL);
#line 84 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					_tmp21_ = _tmp20_;
#line 84 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					g_string_append (_tmp14_, _tmp21_);
#line 84 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					_g_free0 (_tmp21_);
#line 84 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					_g_free0 (_tmp19_);
#line 839 "config.c"
				} else {
					gboolean _tmp22_ = FALSE;
					AdblockSubscription* _tmp23_ = NULL;
					const gchar* _tmp24_ = NULL;
					const gchar* _tmp25_ = NULL;
					gboolean _tmp26_ = FALSE;
#line 85 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					_tmp23_ = sub;
#line 85 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					_tmp24_ = adblock_subscription_get_uri (_tmp23_);
#line 85 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					_tmp25_ = _tmp24_;
#line 85 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					_tmp26_ = g_str_has_prefix (_tmp25_, "file:");
#line 85 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					if (_tmp26_) {
#line 856 "config.c"
						AdblockSubscription* _tmp27_ = NULL;
						gboolean _tmp28_ = FALSE;
						gboolean _tmp29_ = FALSE;
#line 85 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
						_tmp27_ = sub;
#line 85 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
						_tmp28_ = adblock_subscription_get_active (_tmp27_);
#line 85 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
						_tmp29_ = _tmp28_;
#line 85 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
						_tmp22_ = !_tmp29_;
#line 868 "config.c"
					} else {
#line 85 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
						_tmp22_ = FALSE;
#line 872 "config.c"
					}
#line 85 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					if (_tmp22_) {
#line 876 "config.c"
						GString* _tmp30_ = NULL;
						AdblockSubscription* _tmp31_ = NULL;
						const gchar* _tmp32_ = NULL;
						const gchar* _tmp33_ = NULL;
						gchar* _tmp34_ = NULL;
						gchar* _tmp35_ = NULL;
						gchar* _tmp36_ = NULL;
						gchar* _tmp37_ = NULL;
#line 86 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
						_tmp30_ = filters;
#line 86 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
						_tmp31_ = sub;
#line 86 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
						_tmp32_ = adblock_subscription_get_uri (_tmp31_);
#line 86 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
						_tmp33_ = _tmp32_;
#line 86 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
						_tmp34_ = string_substring (_tmp33_, (glong) 5, (glong) (-1));
#line 86 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
						_tmp35_ = _tmp34_;
#line 86 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
						_tmp36_ = g_strconcat ("file-", _tmp35_, NULL);
#line 86 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
						_tmp37_ = _tmp36_;
#line 86 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
						g_string_append (_tmp30_, _tmp37_);
#line 86 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
						_g_free0 (_tmp37_);
#line 86 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
						_g_free0 (_tmp35_);
#line 907 "config.c"
					} else {
						gboolean _tmp38_ = FALSE;
						AdblockSubscription* _tmp39_ = NULL;
						const gchar* _tmp40_ = NULL;
						const gchar* _tmp41_ = NULL;
						gboolean _tmp42_ = FALSE;
#line 87 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
						_tmp39_ = sub;
#line 87 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
						_tmp40_ = adblock_subscription_get_uri (_tmp39_);
#line 87 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
						_tmp41_ = _tmp40_;
#line 87 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
						_tmp42_ = g_str_has_prefix (_tmp41_, "https:");
#line 87 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
						if (_tmp42_) {
#line 924 "config.c"
							AdblockSubscription* _tmp43_ = NULL;
							gboolean _tmp44_ = FALSE;
							gboolean _tmp45_ = FALSE;
#line 87 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
							_tmp43_ = sub;
#line 87 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
							_tmp44_ = adblock_subscription_get_active (_tmp43_);
#line 87 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
							_tmp45_ = _tmp44_;
#line 87 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
							_tmp38_ = !_tmp45_;
#line 936 "config.c"
						} else {
#line 87 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
							_tmp38_ = FALSE;
#line 940 "config.c"
						}
#line 87 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
						if (_tmp38_) {
#line 944 "config.c"
							GString* _tmp46_ = NULL;
							AdblockSubscription* _tmp47_ = NULL;
							const gchar* _tmp48_ = NULL;
							const gchar* _tmp49_ = NULL;
							gchar* _tmp50_ = NULL;
							gchar* _tmp51_ = NULL;
							gchar* _tmp52_ = NULL;
							gchar* _tmp53_ = NULL;
#line 88 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
							_tmp46_ = filters;
#line 88 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
							_tmp47_ = sub;
#line 88 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
							_tmp48_ = adblock_subscription_get_uri (_tmp47_);
#line 88 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
							_tmp49_ = _tmp48_;
#line 88 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
							_tmp50_ = string_substring (_tmp49_, (glong) 5, (glong) (-1));
#line 88 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
							_tmp51_ = _tmp50_;
#line 88 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
							_tmp52_ = g_strconcat ("http-", _tmp51_, NULL);
#line 88 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
							_tmp53_ = _tmp52_;
#line 88 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
							g_string_append (_tmp46_, _tmp53_);
#line 88 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
							_g_free0 (_tmp53_);
#line 88 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
							_g_free0 (_tmp51_);
#line 975 "config.c"
						} else {
							GString* _tmp54_ = NULL;
							AdblockSubscription* _tmp55_ = NULL;
							const gchar* _tmp56_ = NULL;
							const gchar* _tmp57_ = NULL;
#line 90 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
							_tmp54_ = filters;
#line 90 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
							_tmp55_ = sub;
#line 90 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
							_tmp56_ = adblock_subscription_get_uri (_tmp55_);
#line 90 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
							_tmp57_ = _tmp56_;
#line 90 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
							g_string_append (_tmp54_, _tmp57_);
#line 991 "config.c"
						}
					}
				}
#line 91 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
				_tmp58_ = filters;
#line 91 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
				g_string_append_c (_tmp58_, ';');
#line 80 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
				_g_object_unref0 (sub);
#line 1001 "config.c"
			}
		}
	}
#line 94 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_tmp59_ = filters;
#line 94 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_tmp60_ = _tmp59_->str;
#line 94 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_tmp61_ = g_str_has_suffix (_tmp60_, ";");
#line 94 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	if (_tmp61_) {
#line 1013 "config.c"
		GString* _tmp62_ = NULL;
		GString* _tmp63_ = NULL;
		gssize _tmp64_ = 0L;
#line 95 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		_tmp62_ = filters;
#line 95 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		_tmp63_ = filters;
#line 95 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		_tmp64_ = _tmp63_->len;
#line 95 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		g_string_truncate (_tmp62_, (gsize) (_tmp64_ - 1));
#line 1025 "config.c"
	}
#line 96 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_tmp65_ = filters;
#line 96 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_tmp66_ = _tmp65_->str;
#line 96 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_tmp68_ = _tmp67_ = g_strsplit (_tmp66_, ";", 0);
#line 96 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	list = _tmp68_;
#line 96 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	list_length1 = _vala_array_length (_tmp67_);
#line 96 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_list_size_ = list_length1;
#line 97 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_tmp69_ = self->priv->keyfile;
#line 97 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	g_key_file_set_string_list (_tmp69_, "settings", "filters", (const gchar* const*) list, list_length1);
#line 99 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	adblock_config_save (self);
#line 78 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	list = (_vala_array_free (list, list_length1, (GDestroyNotify) g_free), NULL);
#line 78 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_g_string_free0 (filters);
#line 1049 "config.c"
}


void adblock_config_save (AdblockConfig* self) {
	GError * _inner_error_ = NULL;
#line 103 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	g_return_if_fail (self != NULL);
#line 1057 "config.c"
	{
		const gchar* _tmp0_ = NULL;
		GKeyFile* _tmp1_ = NULL;
		gchar* _tmp2_ = NULL;
		gchar* _tmp3_ = NULL;
#line 105 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		_tmp0_ = self->priv->_path;
#line 105 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		_tmp1_ = self->priv->keyfile;
#line 105 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		_tmp2_ = g_key_file_to_data (_tmp1_, NULL, NULL);
#line 105 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		_tmp3_ = _tmp2_;
#line 105 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		g_file_set_contents (_tmp0_, _tmp3_, (gssize) (-1), &_inner_error_);
#line 105 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		_g_free0 (_tmp3_);
#line 105 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1077 "config.c"
			goto __catch1_g_error;
		}
	}
	goto __finally1;
	__catch1_g_error:
	{
		GError* _error_ = NULL;
		GError* _tmp4_ = NULL;
		const gchar* _tmp5_ = NULL;
#line 104 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		_error_ = _inner_error_;
#line 104 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		_inner_error_ = NULL;
#line 107 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		_tmp4_ = _error_;
#line 107 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		_tmp5_ = _tmp4_->message;
#line 107 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		g_warning ("config.vala:107: Failed to save settings: %s", _tmp5_);
#line 104 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		_g_error_free0 (_error_);
#line 1099 "config.c"
	}
	__finally1:
#line 104 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 104 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 104 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		g_clear_error (&_inner_error_);
#line 104 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		return;
#line 1110 "config.c"
	}
}


AdblockSubscription* adblock_config_get (AdblockConfig* self, guint index) {
	AdblockSubscription* result = NULL;
	GList* _tmp0_ = NULL;
	guint _tmp1_ = 0U;
	gconstpointer _tmp2_ = NULL;
	AdblockSubscription* _tmp3_ = NULL;
#line 112 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 113 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_tmp0_ = self->priv->subscriptions;
#line 113 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_tmp1_ = index;
#line 113 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_tmp2_ = g_list_nth_data (_tmp0_, _tmp1_);
#line 113 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_tmp3_ = _g_object_ref0 ((AdblockSubscription*) _tmp2_);
#line 113 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	result = _tmp3_;
#line 113 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	return result;
#line 1135 "config.c"
}


static gboolean adblock_config_contains (AdblockConfig* self, AdblockSubscription* subscription) {
	gboolean result = FALSE;
	GList* _tmp0_ = NULL;
#line 117 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 117 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	g_return_val_if_fail (subscription != NULL, FALSE);
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_tmp0_ = self->priv->subscriptions;
#line 1148 "config.c"
	{
		GList* sub_collection = NULL;
		GList* sub_it = NULL;
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		sub_collection = _tmp0_;
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		for (sub_it = sub_collection; sub_it != NULL; sub_it = sub_it->next) {
#line 1156 "config.c"
			AdblockSubscription* _tmp1_ = NULL;
			AdblockSubscription* sub = NULL;
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
			_tmp1_ = _g_object_ref0 ((AdblockSubscription*) sub_it->data);
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
			sub = _tmp1_;
#line 1163 "config.c"
			{
				AdblockSubscription* _tmp2_ = NULL;
				const gchar* _tmp3_ = NULL;
				const gchar* _tmp4_ = NULL;
				AdblockSubscription* _tmp5_ = NULL;
				const gchar* _tmp6_ = NULL;
				const gchar* _tmp7_ = NULL;
#line 119 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
				_tmp2_ = sub;
#line 119 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
				_tmp3_ = adblock_subscription_get_uri (_tmp2_);
#line 119 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
				_tmp4_ = _tmp3_;
#line 119 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
				_tmp5_ = subscription;
#line 119 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
				_tmp6_ = adblock_subscription_get_uri (_tmp5_);
#line 119 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
				_tmp7_ = _tmp6_;
#line 119 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
				if (g_strcmp0 (_tmp4_, _tmp7_) == 0) {
#line 120 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					result = TRUE;
#line 120 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					_g_object_unref0 (sub);
#line 120 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
					return result;
#line 1191 "config.c"
				}
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
				_g_object_unref0 (sub);
#line 1195 "config.c"
			}
		}
	}
#line 121 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	result = FALSE;
#line 121 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	return result;
#line 1203 "config.c"
}


static void _adblock_config_active_changed_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 128 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	adblock_config_active_changed ((AdblockConfig*) self, _sender, pspec);
#line 1210 "config.c"
}


gboolean adblock_config_add (AdblockConfig* self, AdblockSubscription* sub) {
	gboolean result = FALSE;
	AdblockSubscription* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	AdblockSubscription* _tmp2_ = NULL;
	AdblockSubscription* _tmp3_ = NULL;
	AdblockSubscription* _tmp4_ = NULL;
	guint _tmp5_ = 0U;
	gboolean _tmp6_ = FALSE;
#line 124 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 124 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	g_return_val_if_fail (sub != NULL, FALSE);
#line 125 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_tmp0_ = sub;
#line 125 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_tmp1_ = adblock_config_contains (self, _tmp0_);
#line 125 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	if (_tmp1_) {
#line 126 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		result = FALSE;
#line 126 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		return result;
#line 1237 "config.c"
	}
#line 128 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_tmp2_ = sub;
#line 128 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	g_signal_connect_object ((GObject*) _tmp2_, "notify::active", (GCallback) _adblock_config_active_changed_g_object_notify, self, 0);
#line 129 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_tmp3_ = sub;
#line 129 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_tmp4_ = _g_object_ref0 (_tmp3_);
#line 129 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	self->priv->subscriptions = g_list_append (self->priv->subscriptions, _tmp4_);
#line 130 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_tmp5_ = self->priv->_size;
#line 130 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	adblock_config_set_size (self, _tmp5_ + 1);
#line 131 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_tmp6_ = self->priv->should_save;
#line 131 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	if (_tmp6_) {
#line 132 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		adblock_config_update_filters (self);
#line 1259 "config.c"
	}
#line 133 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	result = TRUE;
#line 133 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	return result;
#line 1265 "config.c"
}


void adblock_config_remove (AdblockConfig* self, AdblockSubscription* sub) {
	AdblockSubscription* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	AdblockSubscription* _tmp2_ = NULL;
	AdblockSubscription* _tmp3_ = NULL;
	guint _tmp4_ = 0U;
	GQuark _tmp5_ = 0U;
	guint _tmp6_ = 0U;
#line 136 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	g_return_if_fail (self != NULL);
#line 136 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	g_return_if_fail (sub != NULL);
#line 137 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_tmp0_ = sub;
#line 137 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_tmp1_ = adblock_config_contains (self, _tmp0_);
#line 137 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	if (!_tmp1_) {
#line 138 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		return;
#line 1289 "config.c"
	}
#line 140 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_tmp2_ = sub;
#line 140 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	self->priv->subscriptions = g_list_remove (self->priv->subscriptions, _tmp2_);
#line 141 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_tmp3_ = sub;
#line 141 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	g_signal_parse_name ("notify::active", G_TYPE_OBJECT, &_tmp4_, &_tmp5_, TRUE);
#line 141 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	g_signal_handlers_disconnect_matched ((GObject*) _tmp3_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp4_, _tmp5_, NULL, (GCallback) _adblock_config_active_changed_g_object_notify, self);
#line 142 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	adblock_config_update_filters (self);
#line 143 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_tmp6_ = self->priv->_size;
#line 143 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	adblock_config_set_size (self, _tmp6_ - 1);
#line 1307 "config.c"
}


const gchar* adblock_config_get_path (AdblockConfig* self) {
	const gchar* result;
	const gchar* _tmp0_ = NULL;
#line 15 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 15 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_tmp0_ = self->priv->_path;
#line 15 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	result = _tmp0_;
#line 15 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	return result;
#line 1322 "config.c"
}


static void adblock_config_set_path (AdblockConfig* self, const gchar* value) {
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 15 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	g_return_if_fail (self != NULL);
#line 15 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_tmp0_ = value;
#line 15 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 15 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_g_free0 (self->priv->_path);
#line 15 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	self->priv->_path = _tmp1_;
#line 15 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	g_object_notify ((GObject *) self, "path");
#line 1341 "config.c"
}


gboolean adblock_config_get_enabled (AdblockConfig* self) {
	gboolean result;
	gboolean _tmp0_ = FALSE;
#line 18 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 18 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_tmp0_ = self->priv->_enabled;
#line 18 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	result = _tmp0_;
#line 18 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	return result;
#line 1356 "config.c"
}


void adblock_config_set_enabled (AdblockConfig* self, gboolean value) {
	gboolean _tmp0_ = FALSE;
#line 18 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	g_return_if_fail (self != NULL);
#line 18 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_tmp0_ = value;
#line 18 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	self->priv->_enabled = _tmp0_;
#line 18 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	g_object_notify ((GObject *) self, "enabled");
#line 1370 "config.c"
}


guint adblock_config_get_size (AdblockConfig* self) {
	guint result;
	guint _tmp0_ = 0U;
#line 115 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	g_return_val_if_fail (self != NULL, 0U);
#line 115 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_tmp0_ = self->priv->_size;
#line 115 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	result = _tmp0_;
#line 115 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	return result;
#line 1385 "config.c"
}


static void adblock_config_set_size (AdblockConfig* self, guint value) {
	guint _tmp0_ = 0U;
#line 115 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	g_return_if_fail (self != NULL);
#line 115 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_tmp0_ = value;
#line 115 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	self->priv->_size = _tmp0_;
#line 115 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	g_object_notify ((GObject *) self, "size");
#line 1399 "config.c"
}


static void adblock_config_class_init (AdblockConfigClass * klass) {
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	adblock_config_parent_class = g_type_class_peek_parent (klass);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	g_type_class_add_private (klass, sizeof (AdblockConfigPrivate));
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_adblock_config_get_property;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_adblock_config_set_property;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	G_OBJECT_CLASS (klass)->finalize = adblock_config_finalize;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), ADBLOCK_CONFIG_PATH, g_param_spec_string ("path", "path", "path", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), ADBLOCK_CONFIG_ENABLED, g_param_spec_boolean ("enabled", "enabled", "enabled", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), ADBLOCK_CONFIG_SIZE, g_param_spec_uint ("size", "size", "size", 0, G_MAXUINT, 0U, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 1420 "config.c"
}


static void adblock_config_instance_init (AdblockConfig * self) {
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	self->priv = ADBLOCK_CONFIG_GET_PRIVATE (self);
#line 1427 "config.c"
}


static void adblock_config_finalize (GObject* obj) {
	AdblockConfig * self;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ADBLOCK_TYPE_CONFIG, AdblockConfig);
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	__g_list_free__g_object_unref0_0 (self->priv->subscriptions);
#line 15 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_g_free0 (self->priv->_path);
#line 16 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	_g_key_file_free0 (self->priv->keyfile);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	G_OBJECT_CLASS (adblock_config_parent_class)->finalize (obj);
#line 1443 "config.c"
}


GType adblock_config_get_type (void) {
	static volatile gsize adblock_config_type_id__volatile = 0;
	if (g_once_init_enter (&adblock_config_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (AdblockConfigClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) adblock_config_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AdblockConfig), 0, (GInstanceInitFunc) adblock_config_instance_init, NULL };
		GType adblock_config_type_id;
		adblock_config_type_id = g_type_register_static (G_TYPE_OBJECT, "AdblockConfig", &g_define_type_info, 0);
		g_once_init_leave (&adblock_config_type_id__volatile, adblock_config_type_id);
	}
	return adblock_config_type_id__volatile;
}


static void _vala_adblock_config_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	AdblockConfig * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ADBLOCK_TYPE_CONFIG, AdblockConfig);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	switch (property_id) {
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		case ADBLOCK_CONFIG_PATH:
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		g_value_set_string (value, adblock_config_get_path (self));
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		break;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		case ADBLOCK_CONFIG_ENABLED:
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		g_value_set_boolean (value, adblock_config_get_enabled (self));
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		break;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		case ADBLOCK_CONFIG_SIZE:
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		g_value_set_uint (value, adblock_config_get_size (self));
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		break;
#line 1482 "config.c"
		default:
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		break;
#line 1488 "config.c"
	}
}


static void _vala_adblock_config_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	AdblockConfig * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ADBLOCK_TYPE_CONFIG, AdblockConfig);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
	switch (property_id) {
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		case ADBLOCK_CONFIG_PATH:
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		adblock_config_set_path (self, g_value_get_string (value));
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		break;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		case ADBLOCK_CONFIG_ENABLED:
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		adblock_config_set_enabled (self, g_value_get_boolean (value));
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		break;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		case ADBLOCK_CONFIG_SIZE:
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		adblock_config_set_size (self, g_value_get_uint (value));
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		break;
#line 1516 "config.c"
		default:
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/adblock/config.vala"
		break;
#line 1522 "config.c"
	}
}


static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	if ((array != NULL) && (destroy_func != NULL)) {
		int i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}


static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}


static gint _vala_array_length (gpointer array) {
	int length;
	length = 0;
	if (array) {
		while (((gpointer*) array)[length]) {
			length++;
		}
	}
	return length;
}



