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

/*  This file is part of corebird, a Gtk+ linux Twitter client.
 *  Copyright (C) 2013 Timm Bäder
 *
 *  corebird is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  corebird is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with corebird.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <gee.h>
#include <stdlib.h>
#include <string.h>
#include <sqlite3.h>


#define TYPE_FILTER_LIST_ENTRY (filter_list_entry_get_type ())
#define FILTER_LIST_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FILTER_LIST_ENTRY, FilterListEntry))
#define FILTER_LIST_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_FILTER_LIST_ENTRY, FilterListEntryClass))
#define IS_FILTER_LIST_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FILTER_LIST_ENTRY))
#define IS_FILTER_LIST_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_FILTER_LIST_ENTRY))
#define FILTER_LIST_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_FILTER_LIST_ENTRY, FilterListEntryClass))

typedef struct _FilterListEntry FilterListEntry;
typedef struct _FilterListEntryClass FilterListEntryClass;
typedef struct _FilterListEntryPrivate FilterListEntryPrivate;

#define TYPE_FILTER (filter_get_type ())
#define FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FILTER, Filter))
#define FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_FILTER, FilterClass))
#define IS_FILTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FILTER))
#define IS_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_FILTER))
#define FILTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_FILTER, FilterClass))

typedef struct _Filter Filter;
typedef struct _FilterClass FilterClass;

#define TYPE_ACCOUNT (account_get_type ())
#define ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ACCOUNT, Account))
#define ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ACCOUNT, AccountClass))
#define IS_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ACCOUNT))
#define IS_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ACCOUNT))
#define ACCOUNT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ACCOUNT, AccountClass))

typedef struct _Account Account;
typedef struct _AccountClass AccountClass;

#define TYPE_MAIN_WINDOW (main_window_get_type ())
#define MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MAIN_WINDOW, MainWindow))
#define MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MAIN_WINDOW, MainWindowClass))
#define IS_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MAIN_WINDOW))
#define IS_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MAIN_WINDOW))
#define MAIN_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MAIN_WINDOW, MainWindowClass))

typedef struct _MainWindow MainWindow;
typedef struct _MainWindowClass MainWindowClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _AccountPrivate AccountPrivate;

#define SQL_TYPE_DATABASE (sql_database_get_type ())
#define SQL_DATABASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SQL_TYPE_DATABASE, SqlDatabase))
#define SQL_DATABASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SQL_TYPE_DATABASE, SqlDatabaseClass))
#define SQL_IS_DATABASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SQL_TYPE_DATABASE))
#define SQL_IS_DATABASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SQL_TYPE_DATABASE))
#define SQL_DATABASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SQL_TYPE_DATABASE, SqlDatabaseClass))

typedef struct _SqlDatabase SqlDatabase;
typedef struct _SqlDatabaseClass SqlDatabaseClass;
#define _g_free0(var) (var = (g_free (var), NULL))

struct _FilterListEntry {
	GtkListBoxRow parent_instance;
	FilterListEntryPrivate * priv;
};

struct _FilterListEntryClass {
	GtkListBoxRowClass parent_class;
};

struct _FilterListEntryPrivate {
	GtkLabel* content_label;
	GtkRevealer* revealer;
	GtkStack* stack;
	GtkGrid* normal_box;
	GtkBox* delete_box;
	Filter* _filter;
	Account* account;
	MainWindow* main_window;
};

struct _Account {
	GObject parent_instance;
	AccountPrivate * priv;
	gint64* friends;
	gint friends_length1;
	gint64* blocked;
	gint blocked_length1;
	gint64* muted;
	gint muted_length1;
	gint64* disabled_rts;
	gint disabled_rts_length1;
	GeeArrayList* filters;
};

struct _AccountClass {
	GObjectClass parent_class;
};


static gpointer filter_list_entry_parent_class = NULL;

GType filter_list_entry_get_type (void) G_GNUC_CONST;
GType filter_get_type (void) G_GNUC_CONST;
GType account_get_type (void) G_GNUC_CONST;
GType main_window_get_type (void) G_GNUC_CONST;
#define FILTER_LIST_ENTRY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_FILTER_LIST_ENTRY, FilterListEntryPrivate))
enum  {
	FILTER_LIST_ENTRY_DUMMY_PROPERTY,
	FILTER_LIST_ENTRY_FILTER,
	FILTER_LIST_ENTRY_CONTENT
};
FilterListEntry* filter_list_entry_new (Filter* f, Account* account, MainWindow* main_window);
FilterListEntry* filter_list_entry_construct (GType object_type, Filter* f, Account* account, MainWindow* main_window);
void filter_list_entry_set_filter (FilterListEntry* self, Filter* value);
static void filter_list_entry_menu_button_clicked_cb (FilterListEntry* self);
static void _filter_list_entry_menu_button_clicked_cb_gtk_button_clicked (GtkButton* _sender, gpointer self);
static void filter_list_entry_cancel_button_clicked_cb (FilterListEntry* self);
static void _filter_list_entry_cancel_button_clicked_cb_gtk_button_clicked (GtkButton* _sender, gpointer self);
static void filter_list_entry_delete_button_clicked_cb (FilterListEntry* self);
gint filter_get_id (Filter* self);
Filter* filter_list_entry_get_filter (FilterListEntry* self);
gpointer sql_database_ref (gpointer instance);
void sql_database_unref (gpointer instance);
GParamSpec* sql_param_spec_database (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void sql_value_set_database (GValue* value, gpointer v_object);
void sql_value_take_database (GValue* value, gpointer v_object);
gpointer sql_value_get_database (const GValue* value);
GType sql_database_get_type (void) G_GNUC_CONST;
SqlDatabase* account_get_db (Account* self);
void sql_database_exec (SqlDatabase* self, const gchar* sql, sqlite3_callback callback, void* callback_target);
void main_window_rerun_filters (MainWindow* self);
static void _filter_list_entry_delete_button_clicked_cb_gtk_button_clicked (GtkButton* _sender, gpointer self);
const gchar* filter_get_content (Filter* self);
const gchar* filter_list_entry_get_content (FilterListEntry* self);
void filter_list_entry_set_content (FilterListEntry* self, const gchar* value);
static GObject * filter_list_entry_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void _filter_list_entry___lambda146_ (FilterListEntry* self);
static void __filter_list_entry___lambda146__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void filter_list_entry_finalize (GObject* obj);
static void _vala_filter_list_entry_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_filter_list_entry_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);


FilterListEntry* filter_list_entry_construct (GType object_type, Filter* f, Account* account, MainWindow* main_window) {
	FilterListEntry * self = NULL;
	Filter* _tmp0_ = NULL;
	Account* _tmp1_ = NULL;
	MainWindow* _tmp2_ = NULL;
	g_return_val_if_fail (IS_FILTER (f), NULL);
	g_return_val_if_fail (IS_ACCOUNT (account), NULL);
	g_return_val_if_fail (IS_MAIN_WINDOW (main_window), NULL);
	self = (FilterListEntry*) g_object_new (object_type, NULL);
	_tmp0_ = f;
	filter_list_entry_set_filter (self, _tmp0_);
	_tmp1_ = account;
	self->priv->account = _tmp1_;
	_tmp2_ = main_window;
	self->priv->main_window = _tmp2_;
	return self;
}


FilterListEntry* filter_list_entry_new (Filter* f, Account* account, MainWindow* main_window) {
	return filter_list_entry_construct (TYPE_FILTER_LIST_ENTRY, f, account, main_window);
}


static void filter_list_entry_menu_button_clicked_cb (FilterListEntry* self) {
	GtkStack* _tmp0_ = NULL;
	GtkBox* _tmp1_ = NULL;
	g_return_if_fail (IS_FILTER_LIST_ENTRY (self));
	_tmp0_ = self->priv->stack;
	_tmp1_ = self->priv->delete_box;
	gtk_stack_set_visible_child (_tmp0_, G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_widget_get_type (), GtkWidget));
	gtk_list_box_row_set_activatable (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_list_box_row_get_type (), GtkListBoxRow), FALSE);
}


static void _filter_list_entry_menu_button_clicked_cb_gtk_button_clicked (GtkButton* _sender, gpointer self) {
	filter_list_entry_menu_button_clicked_cb ((FilterListEntry*) self);
}


static void filter_list_entry_cancel_button_clicked_cb (FilterListEntry* self) {
	GtkStack* _tmp0_ = NULL;
	GtkGrid* _tmp1_ = NULL;
	g_return_if_fail (IS_FILTER_LIST_ENTRY (self));
	_tmp0_ = self->priv->stack;
	_tmp1_ = self->priv->normal_box;
	gtk_stack_set_visible_child (_tmp0_, G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_widget_get_type (), GtkWidget));
	gtk_list_box_row_set_activatable (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_list_box_row_get_type (), GtkListBoxRow), TRUE);
}


static void _filter_list_entry_cancel_button_clicked_cb_gtk_button_clicked (GtkButton* _sender, gpointer self) {
	filter_list_entry_cancel_button_clicked_cb ((FilterListEntry*) self);
}


static gpointer _g_object_ref0 (gpointer self) {
	return self ? g_object_ref (self) : NULL;
}


static void filter_list_entry_delete_button_clicked_cb (FilterListEntry* self) {
	g_return_if_fail (IS_FILTER_LIST_ENTRY (self));
	{
		GeeArrayList* _f_list = NULL;
		Account* _tmp0_ = NULL;
		GeeArrayList* _tmp1_ = NULL;
		GeeArrayList* _tmp2_ = NULL;
		gint _f_size = 0;
		GeeArrayList* _tmp3_ = NULL;
		gint _tmp4_ = 0;
		gint _tmp5_ = 0;
		gint _f_index = 0;
		_tmp0_ = self->priv->account;
		_tmp1_ = _tmp0_->filters;
		_tmp2_ = _g_object_ref0 (_tmp1_);
		_f_list = _tmp2_;
		_tmp3_ = _f_list;
		_tmp4_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_COLLECTION, GeeCollection));
		_tmp5_ = _tmp4_;
		_f_size = _tmp5_;
		_f_index = -1;
		while (TRUE) {
			gint _tmp6_ = 0;
			gint _tmp7_ = 0;
			gint _tmp8_ = 0;
			Filter* f = NULL;
			GeeArrayList* _tmp9_ = NULL;
			gint _tmp10_ = 0;
			gpointer _tmp11_ = NULL;
			Filter* _tmp12_ = NULL;
			gint _tmp13_ = 0;
			gint _tmp14_ = 0;
			Filter* _tmp15_ = NULL;
			Filter* _tmp16_ = NULL;
			gint _tmp17_ = 0;
			gint _tmp18_ = 0;
			_tmp6_ = _f_index;
			_f_index = _tmp6_ + 1;
			_tmp7_ = _f_index;
			_tmp8_ = _f_size;
			if (!(_tmp7_ < _tmp8_)) {
				break;
			}
			_tmp9_ = _f_list;
			_tmp10_ = _f_index;
			_tmp11_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), _tmp10_);
			f = (Filter*) _tmp11_;
			_tmp12_ = f;
			_tmp13_ = filter_get_id (_tmp12_);
			_tmp14_ = _tmp13_;
			_tmp15_ = filter_list_entry_get_filter (self);
			_tmp16_ = _tmp15_;
			_tmp17_ = filter_get_id (_tmp16_);
			_tmp18_ = _tmp17_;
			if (_tmp14_ == _tmp18_) {
				Account* _tmp19_ = NULL;
				GeeArrayList* _tmp20_ = NULL;
				Filter* _tmp21_ = NULL;
				Account* _tmp22_ = NULL;
				SqlDatabase* _tmp23_ = NULL;
				SqlDatabase* _tmp24_ = NULL;
				Filter* _tmp25_ = NULL;
				gint _tmp26_ = 0;
				gint _tmp27_ = 0;
				gchar* _tmp28_ = NULL;
				gchar* _tmp29_ = NULL;
				GtkRevealer* _tmp30_ = NULL;
				MainWindow* _tmp31_ = NULL;
				_tmp19_ = self->priv->account;
				_tmp20_ = _tmp19_->filters;
				_tmp21_ = f;
				gee_abstract_collection_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp21_);
				_tmp22_ = self->priv->account;
				_tmp23_ = account_get_db (_tmp22_);
				_tmp24_ = _tmp23_;
				_tmp25_ = f;
				_tmp26_ = filter_get_id (_tmp25_);
				_tmp27_ = _tmp26_;
				_tmp28_ = g_strdup_printf ("DELETE FROM `filters` WHERE `id`='%d'", _tmp27_);
				_tmp29_ = _tmp28_;
				sql_database_exec (_tmp24_, _tmp29_, NULL, NULL);
				_g_free0 (_tmp29_);
				_tmp30_ = self->priv->revealer;
				gtk_revealer_set_reveal_child (_tmp30_, FALSE);
				_tmp31_ = self->priv->main_window;
				main_window_rerun_filters (_tmp31_);
				_g_object_unref0 (f);
				_g_object_unref0 (_f_list);
				return;
			}
			_g_object_unref0 (f);
		}
		_g_object_unref0 (_f_list);
	}
}


static void _filter_list_entry_delete_button_clicked_cb_gtk_button_clicked (GtkButton* _sender, gpointer self) {
	filter_list_entry_delete_button_clicked_cb ((FilterListEntry*) self);
}


Filter* filter_list_entry_get_filter (FilterListEntry* self) {
	Filter* result;
	Filter* _tmp0_ = NULL;
	g_return_val_if_fail (IS_FILTER_LIST_ENTRY (self), NULL);
	_tmp0_ = self->priv->_filter;
	result = _tmp0_;
	return result;
}


void filter_list_entry_set_filter (FilterListEntry* self, Filter* value) {
	GtkLabel* _tmp0_ = NULL;
	Filter* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	Filter* _tmp4_ = NULL;
	g_return_if_fail (IS_FILTER_LIST_ENTRY (self));
	_tmp0_ = self->priv->content_label;
	_tmp1_ = value;
	_tmp2_ = filter_get_content (_tmp1_);
	_tmp3_ = _tmp2_;
	gtk_label_set_label (_tmp0_, _tmp3_);
	_tmp4_ = value;
	self->priv->_filter = _tmp4_;
	g_object_notify ((GObject *) self, "filter");
}


const gchar* filter_list_entry_get_content (FilterListEntry* self) {
	const gchar* result;
	GtkLabel* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	g_return_val_if_fail (IS_FILTER_LIST_ENTRY (self), NULL);
	_tmp0_ = self->priv->content_label;
	_tmp1_ = gtk_label_get_label (_tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}


void filter_list_entry_set_content (FilterListEntry* self, const gchar* value) {
	GtkLabel* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	g_return_if_fail (IS_FILTER_LIST_ENTRY (self));
	_tmp0_ = self->priv->content_label;
	_tmp1_ = value;
	gtk_label_set_label (_tmp0_, _tmp1_);
	g_object_notify ((GObject *) self, "content");
}


static void _filter_list_entry___lambda146_ (FilterListEntry* self) {
	GtkRevealer* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	_tmp0_ = self->priv->revealer;
	_tmp1_ = gtk_revealer_get_child_revealed (_tmp0_);
	_tmp2_ = _tmp1_;
	if (!_tmp2_) {
		GtkContainer* _tmp3_ = NULL;
		_tmp3_ = (GtkContainer*) gtk_widget_get_parent (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
		gtk_container_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	}
}


static void __filter_list_entry___lambda146__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	_filter_list_entry___lambda146_ ((FilterListEntry*) self);
}


static GObject * filter_list_entry_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	FilterListEntry * self;
	GtkRevealer* _tmp0_ = NULL;
	parent_class = G_OBJECT_CLASS (filter_list_entry_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_FILTER_LIST_ENTRY, FilterListEntry);
	_tmp0_ = self->priv->revealer;
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, G_TYPE_OBJECT, GObject), "notify::child-revealed", (GCallback) __filter_list_entry___lambda146__g_object_notify, self, 0);
	return obj;
}


static void filter_list_entry_class_init (FilterListEntryClass * klass) {
	gint FilterListEntry_private_offset;
	filter_list_entry_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (FilterListEntryPrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_filter_list_entry_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_filter_list_entry_set_property;
	G_OBJECT_CLASS (klass)->constructor = filter_list_entry_constructor;
	G_OBJECT_CLASS (klass)->finalize = filter_list_entry_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), FILTER_LIST_ENTRY_FILTER, g_param_spec_object ("filter", "filter", "filter", TYPE_FILTER, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FILTER_LIST_ENTRY_CONTENT, g_param_spec_string ("content", "content", "content", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	FilterListEntry_private_offset = g_type_class_get_instance_private_offset (klass);
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/baedert/corebird/ui/filter-list-entry.ui");
	g_signal_new ("removed", TYPE_FILTER_LIST_ENTRY, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, TYPE_FILTER);
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "content_label", FALSE, FilterListEntry_private_offset + G_STRUCT_OFFSET (FilterListEntryPrivate, content_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "revealer", FALSE, FilterListEntry_private_offset + G_STRUCT_OFFSET (FilterListEntryPrivate, revealer));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "stack", FALSE, FilterListEntry_private_offset + G_STRUCT_OFFSET (FilterListEntryPrivate, stack));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "normal_box", FALSE, FilterListEntry_private_offset + G_STRUCT_OFFSET (FilterListEntryPrivate, normal_box));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "delete_box", FALSE, FilterListEntry_private_offset + G_STRUCT_OFFSET (FilterListEntryPrivate, delete_box));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "menu_button_clicked_cb", G_CALLBACK(_filter_list_entry_menu_button_clicked_cb_gtk_button_clicked));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "cancel_button_clicked_cb", G_CALLBACK(_filter_list_entry_cancel_button_clicked_cb_gtk_button_clicked));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "delete_button_clicked_cb", G_CALLBACK(_filter_list_entry_delete_button_clicked_cb_gtk_button_clicked));
}


static void filter_list_entry_instance_init (FilterListEntry * self) {
	self->priv = FILTER_LIST_ENTRY_GET_PRIVATE (self);
	gtk_widget_init_template (GTK_WIDGET (self));
}


static void filter_list_entry_finalize (GObject* obj) {
	FilterListEntry * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_FILTER_LIST_ENTRY, FilterListEntry);
	_g_object_unref0 (self->priv->content_label);
	_g_object_unref0 (self->priv->revealer);
	_g_object_unref0 (self->priv->stack);
	_g_object_unref0 (self->priv->normal_box);
	_g_object_unref0 (self->priv->delete_box);
	G_OBJECT_CLASS (filter_list_entry_parent_class)->finalize (obj);
}


GType filter_list_entry_get_type (void) {
	static volatile gsize filter_list_entry_type_id__volatile = 0;
	if (g_once_init_enter (&filter_list_entry_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (FilterListEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) filter_list_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FilterListEntry), 0, (GInstanceInitFunc) filter_list_entry_instance_init, NULL };
		GType filter_list_entry_type_id;
		filter_list_entry_type_id = g_type_register_static (gtk_list_box_row_get_type (), "FilterListEntry", &g_define_type_info, 0);
		g_once_init_leave (&filter_list_entry_type_id__volatile, filter_list_entry_type_id);
	}
	return filter_list_entry_type_id__volatile;
}


static void _vala_filter_list_entry_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	FilterListEntry * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_FILTER_LIST_ENTRY, FilterListEntry);
	switch (property_id) {
		case FILTER_LIST_ENTRY_FILTER:
		g_value_set_object (value, filter_list_entry_get_filter (self));
		break;
		case FILTER_LIST_ENTRY_CONTENT:
		g_value_set_string (value, filter_list_entry_get_content (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_filter_list_entry_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	FilterListEntry * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_FILTER_LIST_ENTRY, FilterListEntry);
	switch (property_id) {
		case FILTER_LIST_ENTRY_FILTER:
		filter_list_entry_set_filter (self, g_value_get_object (value));
		break;
		case FILTER_LIST_ENTRY_CONTENT:
		filter_list_entry_set_content (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}



