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

#include <gtk/gtk.h>
#include <glib-object.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <handy.h>
#include <gio/gio.h>
#include <glib/gi18n-lib.h>
#include <cairo-gobject.h>

#define TOOTLE_VIEWS_TYPE_BASE (tootle_views_base_get_type ())
#define TOOTLE_VIEWS_BASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_VIEWS_TYPE_BASE, TootleViewsBase))
#define TOOTLE_VIEWS_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_VIEWS_TYPE_BASE, TootleViewsBaseClass))
#define TOOTLE_VIEWS_IS_BASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_VIEWS_TYPE_BASE))
#define TOOTLE_VIEWS_IS_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_VIEWS_TYPE_BASE))
#define TOOTLE_VIEWS_BASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_VIEWS_TYPE_BASE, TootleViewsBaseClass))

typedef struct _TootleViewsBase TootleViewsBase;
typedef struct _TootleViewsBaseClass TootleViewsBaseClass;
typedef struct _TootleViewsBasePrivate TootleViewsBasePrivate;
enum  {
	TOOTLE_VIEWS_BASE_0_PROPERTY,
	TOOTLE_VIEWS_BASE_ICON_PROPERTY,
	TOOTLE_VIEWS_BASE_LABEL_PROPERTY,
	TOOTLE_VIEWS_BASE_NEEDS_ATTENTION_PROPERTY,
	TOOTLE_VIEWS_BASE_CURRENT_PROPERTY,
	TOOTLE_VIEWS_BASE_ACTIONS_PROPERTY,
	TOOTLE_VIEWS_BASE_CONTENT_PROPERTY,
	TOOTLE_VIEWS_BASE_STATE_PROPERTY,
	TOOTLE_VIEWS_BASE_STATUS_MESSAGE_PROPERTY,
	TOOTLE_VIEWS_BASE_EMPTY_PROPERTY,
	TOOTLE_VIEWS_BASE_NUM_PROPERTIES
};
static GParamSpec* tootle_views_base_properties[TOOTLE_VIEWS_BASE_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define TOOTLE_DIALOGS_TYPE_MAIN_WINDOW (tootle_dialogs_main_window_get_type ())
#define TOOTLE_DIALOGS_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_DIALOGS_TYPE_MAIN_WINDOW, TootleDialogsMainWindow))
#define TOOTLE_DIALOGS_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_DIALOGS_TYPE_MAIN_WINDOW, TootleDialogsMainWindowClass))
#define TOOTLE_DIALOGS_IS_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_DIALOGS_TYPE_MAIN_WINDOW))
#define TOOTLE_DIALOGS_IS_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_DIALOGS_TYPE_MAIN_WINDOW))
#define TOOTLE_DIALOGS_MAIN_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_DIALOGS_TYPE_MAIN_WINDOW, TootleDialogsMainWindowClass))

typedef struct _TootleDialogsMainWindow TootleDialogsMainWindow;
typedef struct _TootleDialogsMainWindowClass TootleDialogsMainWindowClass;

struct _TootleViewsBase {
	GtkBox parent_instance;
	TootleViewsBasePrivate * priv;
	HdyHeaderBar* header;
	GtkButton* back_button;
	GtkScrolledWindow* scrolled;
	GtkBox* view;
	HdyClamp* clamp;
	GtkBox* column_view;
	GtkStack* states;
	GtkBox* content_box;
	GtkListBox* content_list;
	GtkButton* status_button;
};

struct _TootleViewsBaseClass {
	GtkBoxClass parent_class;
	void (*build_header) (TootleViewsBase* self);
	void (*clear) (TootleViewsBase* self);
	void (*on_bottom_reached) (TootleViewsBase* self);
	void (*on_shown) (TootleViewsBase* self);
	void (*on_hidden) (TootleViewsBase* self);
	void (*on_content_changed) (TootleViewsBase* self);
	void (*on_error) (TootleViewsBase* self, gint32 code, const gchar* reason);
	void (*on_content_item_activated) (TootleViewsBase* self, GtkListBoxRow* row);
};

struct _TootleViewsBasePrivate {
	gchar* _icon;
	gchar* _label;
	gboolean _needs_attention;
	gboolean _current;
	GSimpleActionGroup* _actions;
	GtkContainer* _content;
	GtkStack* status_stack;
	GtkLabel* status_message_label;
	gchar* _state;
	gchar* _status_message;
};

static gint TootleViewsBase_private_offset;
static gpointer tootle_views_base_parent_class = NULL;
extern gchar* tootle_views_base_STATUS_EMPTY;
gchar* tootle_views_base_STATUS_EMPTY = NULL;
extern gchar* tootle_views_base_STATUS_LOADING;
gchar* tootle_views_base_STATUS_LOADING = NULL;
extern TootleDialogsMainWindow* tootle_window;

GType tootle_views_base_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleViewsBase, g_object_unref)
void tootle_views_base_build_header (TootleViewsBase* self);
void tootle_views_base_clear (TootleViewsBase* self);
void tootle_views_base_on_bottom_reached (TootleViewsBase* self);
void tootle_views_base_on_shown (TootleViewsBase* self);
void tootle_views_base_on_hidden (TootleViewsBase* self);
void tootle_views_base_on_content_changed (TootleViewsBase* self);
void tootle_views_base_on_error (TootleViewsBase* self,
                                 gint32 code,
                                 const gchar* reason);
void tootle_views_base_on_content_item_activated (TootleViewsBase* self,
                                                  GtkListBoxRow* row);
static void tootle_views_base_real_build_header (TootleViewsBase* self);
static void tootle_views_base_real_clear (TootleViewsBase* self);
GtkContainer* tootle_views_base_get_content (TootleViewsBase* self);
static void __lambda5_ (TootleViewsBase* self,
                 GtkWidget* w);
static void ___lambda5__gtk_callback (GtkWidget* widget,
                               gpointer self);
void tootle_views_base_set_state (TootleViewsBase* self,
                                  const gchar* value);
static void tootle_views_base_real_on_bottom_reached (TootleViewsBase* self);
static void tootle_views_base_real_on_shown (TootleViewsBase* self);
GSimpleActionGroup* tootle_views_base_get_actions (TootleViewsBase* self);
GType tootle_dialogs_main_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleDialogsMainWindow, g_object_unref)
static void tootle_views_base_real_on_hidden (TootleViewsBase* self);
static void tootle_views_base_real_on_content_changed (TootleViewsBase* self);
gboolean tootle_views_base_get_empty (TootleViewsBase* self);
void tootle_views_base_set_status_message (TootleViewsBase* self,
                                           const gchar* value);
static void tootle_views_base_real_on_error (TootleViewsBase* self,
                                      gint32 code,
                                      const gchar* reason);
void tootle_views_base_on_resized (TootleViewsBase* self);
static void _tootle_views_base_on_resized_gtk_widget_size_allocate (GtkWidget* _sender,
                                                             GtkAllocation* allocation,
                                                             gpointer self);
static void tootle_views_base_real_on_content_item_activated (TootleViewsBase* self,
                                                       GtkListBoxRow* row);
static void tootle_views_base_on_close (TootleViewsBase* self);
gboolean tootle_dialogs_main_window_back (TootleDialogsMainWindow* self);
static void _tootle_views_base_on_close_gtk_button_clicked (GtkButton* _sender,
                                                     gpointer self);
TootleViewsBase* tootle_views_base_new (void);
TootleViewsBase* tootle_views_base_construct (GType object_type);
const gchar* tootle_views_base_get_icon (TootleViewsBase* self);
void tootle_views_base_set_icon (TootleViewsBase* self,
                                 const gchar* value);
const gchar* tootle_views_base_get_label (TootleViewsBase* self);
void tootle_views_base_set_label (TootleViewsBase* self,
                                  const gchar* value);
gboolean tootle_views_base_get_needs_attention (TootleViewsBase* self);
void tootle_views_base_set_needs_attention (TootleViewsBase* self,
                                            gboolean value);
gboolean tootle_views_base_get_current (TootleViewsBase* self);
void tootle_views_base_set_current (TootleViewsBase* self,
                                    gboolean value);
void tootle_views_base_set_actions (TootleViewsBase* self,
                                    GSimpleActionGroup* value);
void tootle_views_base_set_content (TootleViewsBase* self,
                                    GtkContainer* value);
const gchar* tootle_views_base_get_state (TootleViewsBase* self);
const gchar* tootle_views_base_get_status_message (TootleViewsBase* self);
static GObject * tootle_views_base_constructor (GType type,
                                         guint n_construct_properties,
                                         GObjectConstructParam * construct_properties);
static void _tootle_views_base___lambda6_ (TootleViewsBase* self,
                                    GtkPositionType pos);
static void __tootle_views_base___lambda6__gtk_scrolled_window_edge_reached (GtkScrolledWindow* _sender,
                                                                      GtkPositionType pos,
                                                                      gpointer self);
static void _tootle_views_base___lambda7_ (TootleViewsBase* self);
static void __tootle_views_base___lambda7__gtk_container_remove (GtkContainer* _sender,
                                                          GtkWidget* widget,
                                                          gpointer self);
static void _tootle_views_base___lambda8_ (TootleViewsBase* self);
static void __tootle_views_base___lambda8__gtk_container_remove (GtkContainer* _sender,
                                                          GtkWidget* widget,
                                                          gpointer self);
static void _tootle_views_base_on_content_item_activated_gtk_list_box_row_activated (GtkListBox* _sender,
                                                                              GtkListBoxRow* row,
                                                                              gpointer self);
static void _tootle_views_base___lambda9_ (TootleViewsBase* self);
static void __tootle_views_base___lambda9__g_object_notify (GObject* _sender,
                                                     GParamSpec* pspec,
                                                     gpointer self);
static void _tootle_views_base___lambda10_ (TootleViewsBase* self);
static void __tootle_views_base___lambda10__g_object_notify (GObject* _sender,
                                                      GParamSpec* pspec,
                                                      gpointer self);
#define TOOTLE_DIALOGS_MAIN_WINDOW_ZOOM_CLASS "ttl-scalable"
static void tootle_views_base_finalize (GObject * obj);
static GType tootle_views_base_get_type_once (void);
static void _vala_tootle_views_base_get_property (GObject * object,
                                           guint property_id,
                                           GValue * value,
                                           GParamSpec * pspec);
static void _vala_tootle_views_base_set_property (GObject * object,
                                           guint property_id,
                                           const GValue * value,
                                           GParamSpec * pspec);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
tootle_views_base_get_instance_private (TootleViewsBase* self)
{
	return G_STRUCT_MEMBER_P (self, TootleViewsBase_private_offset);
}

static void
tootle_views_base_real_build_header (TootleViewsBase* self)
{
}

void
tootle_views_base_build_header (TootleViewsBase* self)
{
	TootleViewsBaseClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = TOOTLE_VIEWS_BASE_GET_CLASS (self);
	if (_klass_->build_header) {
		_klass_->build_header (self);
	}
}

static void
__lambda5_ (TootleViewsBase* self,
            GtkWidget* w)
{
	g_return_if_fail (w != NULL);
	gtk_widget_destroy (w);
}

static void
___lambda5__gtk_callback (GtkWidget* widget,
                          gpointer self)
{
	__lambda5_ ((TootleViewsBase*) self, widget);
}

static void
tootle_views_base_real_clear (TootleViewsBase* self)
{
	GtkContainer* _tmp0_;
	_tmp0_ = self->priv->_content;
	gtk_container_forall (_tmp0_, ___lambda5__gtk_callback, self);
	tootle_views_base_set_state (self, "status");
}

void
tootle_views_base_clear (TootleViewsBase* self)
{
	TootleViewsBaseClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = TOOTLE_VIEWS_BASE_GET_CLASS (self);
	if (_klass_->clear) {
		_klass_->clear (self);
	}
}

static void
tootle_views_base_real_on_bottom_reached (TootleViewsBase* self)
{
}

void
tootle_views_base_on_bottom_reached (TootleViewsBase* self)
{
	TootleViewsBaseClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = TOOTLE_VIEWS_BASE_GET_CLASS (self);
	if (_klass_->on_bottom_reached) {
		_klass_->on_bottom_reached (self);
	}
}

static void
tootle_views_base_real_on_shown (TootleViewsBase* self)
{
	GSimpleActionGroup* _tmp0_;
	_tmp0_ = self->priv->_actions;
	if (_tmp0_ != NULL) {
		TootleDialogsMainWindow* _tmp1_;
		GSimpleActionGroup* _tmp2_;
		_tmp1_ = tootle_window;
		_tmp2_ = self->priv->_actions;
		gtk_widget_insert_action_group ((GtkWidget*) _tmp1_, "view", (GActionGroup*) _tmp2_);
	}
}

void
tootle_views_base_on_shown (TootleViewsBase* self)
{
	TootleViewsBaseClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = TOOTLE_VIEWS_BASE_GET_CLASS (self);
	if (_klass_->on_shown) {
		_klass_->on_shown (self);
	}
}

static void
tootle_views_base_real_on_hidden (TootleViewsBase* self)
{
	GSimpleActionGroup* _tmp0_;
	_tmp0_ = self->priv->_actions;
	if (_tmp0_ != NULL) {
		TootleDialogsMainWindow* _tmp1_;
		_tmp1_ = tootle_window;
		gtk_widget_insert_action_group ((GtkWidget*) _tmp1_, "view", NULL);
	}
}

void
tootle_views_base_on_hidden (TootleViewsBase* self)
{
	TootleViewsBaseClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = TOOTLE_VIEWS_BASE_GET_CLASS (self);
	if (_klass_->on_hidden) {
		_klass_->on_hidden (self);
	}
}

static void
tootle_views_base_real_on_content_changed (TootleViewsBase* self)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	_tmp0_ = tootle_views_base_get_empty (self);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		const gchar* _tmp2_;
		_tmp2_ = tootle_views_base_STATUS_EMPTY;
		tootle_views_base_set_status_message (self, _tmp2_);
		tootle_views_base_set_state (self, "status");
	} else {
		tootle_views_base_set_state (self, "content");
	}
	gtk_container_check_resize ((GtkContainer*) self);
}

void
tootle_views_base_on_content_changed (TootleViewsBase* self)
{
	TootleViewsBaseClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = TOOTLE_VIEWS_BASE_GET_CLASS (self);
	if (_klass_->on_content_changed) {
		_klass_->on_content_changed (self);
	}
}

static void
tootle_views_base_real_on_error (TootleViewsBase* self,
                                 gint32 code,
                                 const gchar* reason)
{
	GtkButton* _tmp0_;
	GtkButton* _tmp1_;
	g_return_if_fail (reason != NULL);
	tootle_views_base_set_status_message (self, reason);
	_tmp0_ = self->status_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp0_, TRUE);
	_tmp1_ = self->status_button;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp1_, TRUE);
	tootle_views_base_set_state (self, "status");
}

void
tootle_views_base_on_error (TootleViewsBase* self,
                            gint32 code,
                            const gchar* reason)
{
	TootleViewsBaseClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = TOOTLE_VIEWS_BASE_GET_CLASS (self);
	if (_klass_->on_error) {
		_klass_->on_error (self, code, reason);
	}
}

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

void
tootle_views_base_on_resized (TootleViewsBase* self)
{
	GtkAllocation alloc = {0};
	GtkAllocation _tmp0_ = {0};
	gint target_w = 0;
	HdyClamp* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	gint view_w = 0;
	GtkAllocation _tmp4_;
	GtkStyleContext* ctx = NULL;
	GtkBox* _tmp5_;
	GtkStyleContext* _tmp6_;
	GtkStyleContext* _tmp7_;
	gboolean _tmp8_ = FALSE;
	gboolean _tmp11_ = FALSE;
	g_return_if_fail (self != NULL);
	gtk_widget_get_allocation ((GtkWidget*) self, &_tmp0_);
	alloc = _tmp0_;
	_tmp1_ = self->clamp;
	_tmp2_ = hdy_clamp_get_maximum_size (_tmp1_);
	_tmp3_ = _tmp2_;
	target_w = _tmp3_;
	_tmp4_ = alloc;
	view_w = _tmp4_.width;
	_tmp5_ = self->view;
	_tmp6_ = gtk_widget_get_style_context ((GtkWidget*) _tmp5_);
	_tmp7_ = _g_object_ref0 (_tmp6_);
	ctx = _tmp7_;
	if (view_w <= target_w) {
		GtkStyleContext* _tmp9_;
		_tmp9_ = ctx;
		_tmp8_ = gtk_style_context_has_class (_tmp9_, "padded");
	} else {
		_tmp8_ = FALSE;
	}
	if (_tmp8_) {
		GtkStyleContext* _tmp10_;
		_tmp10_ = ctx;
		gtk_style_context_remove_class (_tmp10_, "padded");
	}
	if (view_w > target_w) {
		GtkStyleContext* _tmp12_;
		_tmp12_ = ctx;
		_tmp11_ = !gtk_style_context_has_class (_tmp12_, "padded");
	} else {
		_tmp11_ = FALSE;
	}
	if (_tmp11_) {
		GtkStyleContext* _tmp13_;
		_tmp13_ = ctx;
		gtk_style_context_add_class (_tmp13_, "padded");
	}
	_g_object_unref0 (ctx);
}

static void
_tootle_views_base_on_resized_gtk_widget_size_allocate (GtkWidget* _sender,
                                                        GtkAllocation* allocation,
                                                        gpointer self)
{
	tootle_views_base_on_resized ((TootleViewsBase*) self);
}

static void
tootle_views_base_real_on_content_item_activated (TootleViewsBase* self,
                                                  GtkListBoxRow* row)
{
	g_return_if_fail (row != NULL);
	g_signal_emit_by_name (row, "open", NULL);
}

void
tootle_views_base_on_content_item_activated (TootleViewsBase* self,
                                             GtkListBoxRow* row)
{
	TootleViewsBaseClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = TOOTLE_VIEWS_BASE_GET_CLASS (self);
	if (_klass_->on_content_item_activated) {
		_klass_->on_content_item_activated (self, row);
	}
}

static void
tootle_views_base_on_close (TootleViewsBase* self)
{
	TootleDialogsMainWindow* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = tootle_window;
	tootle_dialogs_main_window_back (_tmp0_);
}

static void
_tootle_views_base_on_close_gtk_button_clicked (GtkButton* _sender,
                                                gpointer self)
{
	tootle_views_base_on_close ((TootleViewsBase*) self);
}

TootleViewsBase*
tootle_views_base_construct (GType object_type)
{
	TootleViewsBase * self = NULL;
	self = (TootleViewsBase*) g_object_new (object_type, NULL);
	return self;
}

TootleViewsBase*
tootle_views_base_new (void)
{
	return tootle_views_base_construct (TOOTLE_VIEWS_TYPE_BASE);
}

const gchar*
tootle_views_base_get_icon (TootleViewsBase* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_icon;
	result = _tmp0_;
	return result;
}

void
tootle_views_base_set_icon (TootleViewsBase* self,
                            const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_views_base_get_icon (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_icon);
		self->priv->_icon = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tootle_views_base_properties[TOOTLE_VIEWS_BASE_ICON_PROPERTY]);
	}
}

const gchar*
tootle_views_base_get_label (TootleViewsBase* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_label;
	result = _tmp0_;
	return result;
}

void
tootle_views_base_set_label (TootleViewsBase* self,
                             const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_views_base_get_label (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_label);
		self->priv->_label = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tootle_views_base_properties[TOOTLE_VIEWS_BASE_LABEL_PROPERTY]);
	}
}

gboolean
tootle_views_base_get_needs_attention (TootleViewsBase* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_needs_attention;
	return result;
}

void
tootle_views_base_set_needs_attention (TootleViewsBase* self,
                                       gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_views_base_get_needs_attention (self);
	if (old_value != value) {
		self->priv->_needs_attention = value;
		g_object_notify_by_pspec ((GObject *) self, tootle_views_base_properties[TOOTLE_VIEWS_BASE_NEEDS_ATTENTION_PROPERTY]);
	}
}

gboolean
tootle_views_base_get_current (TootleViewsBase* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_current;
	return result;
}

void
tootle_views_base_set_current (TootleViewsBase* self,
                               gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_views_base_get_current (self);
	if (old_value != value) {
		self->priv->_current = value;
		g_object_notify_by_pspec ((GObject *) self, tootle_views_base_properties[TOOTLE_VIEWS_BASE_CURRENT_PROPERTY]);
	}
}

GSimpleActionGroup*
tootle_views_base_get_actions (TootleViewsBase* self)
{
	GSimpleActionGroup* result;
	GSimpleActionGroup* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_actions;
	result = _tmp0_;
	return result;
}

void
tootle_views_base_set_actions (TootleViewsBase* self,
                               GSimpleActionGroup* value)
{
	GSimpleActionGroup* old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_views_base_get_actions (self);
	if (old_value != value) {
		GSimpleActionGroup* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_actions);
		self->priv->_actions = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tootle_views_base_properties[TOOTLE_VIEWS_BASE_ACTIONS_PROPERTY]);
	}
}

GtkContainer*
tootle_views_base_get_content (TootleViewsBase* self)
{
	GtkContainer* result;
	GtkContainer* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_content;
	result = _tmp0_;
	return result;
}

void
tootle_views_base_set_content (TootleViewsBase* self,
                               GtkContainer* value)
{
	GtkContainer* old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_views_base_get_content (self);
	if (old_value != value) {
		GtkContainer* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_content);
		self->priv->_content = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tootle_views_base_properties[TOOTLE_VIEWS_BASE_CONTENT_PROPERTY]);
	}
}

const gchar*
tootle_views_base_get_state (TootleViewsBase* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_state;
	result = _tmp0_;
	return result;
}

void
tootle_views_base_set_state (TootleViewsBase* self,
                             const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_views_base_get_state (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_state);
		self->priv->_state = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tootle_views_base_properties[TOOTLE_VIEWS_BASE_STATE_PROPERTY]);
	}
}

const gchar*
tootle_views_base_get_status_message (TootleViewsBase* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_status_message;
	result = _tmp0_;
	return result;
}

void
tootle_views_base_set_status_message (TootleViewsBase* self,
                                      const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_views_base_get_status_message (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_status_message);
		self->priv->_status_message = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tootle_views_base_properties[TOOTLE_VIEWS_BASE_STATUS_MESSAGE_PROPERTY]);
	}
}

gboolean
tootle_views_base_get_empty (TootleViewsBase* self)
{
	gboolean result;
	GtkContainer* _tmp0_;
	GList* _tmp1_;
	GList* _tmp2_;
	gboolean _tmp3_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_content;
	_tmp1_ = gtk_container_get_children (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_list_length (_tmp2_) <= ((guint) 0);
	(_tmp2_ == NULL) ? NULL : (_tmp2_ = (g_list_free (_tmp2_), NULL));
	result = _tmp3_;
	return result;
}

static void
_tootle_views_base___lambda6_ (TootleViewsBase* self,
                               GtkPositionType pos)
{
	if (pos == GTK_POS_BOTTOM) {
		tootle_views_base_on_bottom_reached (self);
	}
}

static void
__tootle_views_base___lambda6__gtk_scrolled_window_edge_reached (GtkScrolledWindow* _sender,
                                                                 GtkPositionType pos,
                                                                 gpointer self)
{
	_tootle_views_base___lambda6_ ((TootleViewsBase*) self, pos);
}

static void
_tootle_views_base___lambda7_ (TootleViewsBase* self)
{
	tootle_views_base_on_content_changed (self);
}

static void
__tootle_views_base___lambda7__gtk_container_remove (GtkContainer* _sender,
                                                     GtkWidget* widget,
                                                     gpointer self)
{
	_tootle_views_base___lambda7_ ((TootleViewsBase*) self);
}

static void
_tootle_views_base___lambda8_ (TootleViewsBase* self)
{
	tootle_views_base_on_content_changed (self);
}

static void
__tootle_views_base___lambda8__gtk_container_remove (GtkContainer* _sender,
                                                     GtkWidget* widget,
                                                     gpointer self)
{
	_tootle_views_base___lambda8_ ((TootleViewsBase*) self);
}

static void
_tootle_views_base_on_content_item_activated_gtk_list_box_row_activated (GtkListBox* _sender,
                                                                         GtkListBoxRow* row,
                                                                         gpointer self)
{
	tootle_views_base_on_content_item_activated ((TootleViewsBase*) self, row);
}

static const gchar*
string_to_string (const gchar* self)
{
	const gchar* result = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	result = self;
	return result;
}

static void
_tootle_views_base___lambda9_ (TootleViewsBase* self)
{
	GtkLabel* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	const gchar* _tmp5_ = NULL;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	GtkStack* _tmp8_;
	_tmp0_ = self->priv->status_message_label;
	_tmp1_ = self->priv->_status_message;
	_tmp2_ = string_to_string (_tmp1_);
	_tmp3_ = g_strconcat ("<span size='large'>", _tmp2_, "</span>", NULL);
	_tmp4_ = _tmp3_;
	gtk_label_set_label (_tmp0_, _tmp4_);
	_g_free0 (_tmp4_);
	_tmp6_ = self->priv->_status_message;
	_tmp7_ = tootle_views_base_STATUS_LOADING;
	if (g_strcmp0 (_tmp6_, _tmp7_) == 0) {
		_tmp5_ = "spinner";
	} else {
		_tmp5_ = "message";
	}
	_tmp8_ = self->priv->status_stack;
	gtk_stack_set_visible_child_name (_tmp8_, _tmp5_);
}

static void
__tootle_views_base___lambda9__g_object_notify (GObject* _sender,
                                                GParamSpec* pspec,
                                                gpointer self)
{
	_tootle_views_base___lambda9_ ((TootleViewsBase*) self);
}

static void
_tootle_views_base___lambda10_ (TootleViewsBase* self)
{
	gboolean _tmp0_;
	_tmp0_ = self->priv->_current;
	if (_tmp0_) {
		tootle_views_base_on_shown (self);
	} else {
		tootle_views_base_on_hidden (self);
	}
}

static void
__tootle_views_base___lambda10__g_object_notify (GObject* _sender,
                                                 GParamSpec* pspec,
                                                 gpointer self)
{
	_tootle_views_base___lambda10_ ((TootleViewsBase*) self);
}

static GObject *
tootle_views_base_constructor (GType type,
                               guint n_construct_properties,
                               GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	TootleViewsBase * self;
	HdyHeaderBar* _tmp0_;
	GtkListBox* _tmp1_;
	GtkButton* _tmp2_;
	GtkStack* _tmp3_;
	GtkScrolledWindow* _tmp4_;
	GtkContainer* _tmp5_;
	GtkListBox* _tmp6_;
	GtkListBox* _tmp7_;
	GtkScrolledWindow* _tmp8_;
	GtkStyleContext* _tmp9_;
	parent_class = G_OBJECT_CLASS (tootle_views_base_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TOOTLE_VIEWS_TYPE_BASE, TootleViewsBase);
	_tmp0_ = self->header;
	g_object_bind_property_with_closures ((GObject*) self, "label", (GObject*) _tmp0_, "title", G_BINDING_SYNC_CREATE, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp1_ = self->content_list;
	tootle_views_base_set_content (self, (GtkContainer*) _tmp1_);
	_tmp2_ = self->status_button;
	gtk_button_set_label (_tmp2_, _ ("Reload"));
	_tmp3_ = self->states;
	g_object_bind_property_with_closures ((GObject*) self, "state", (GObject*) _tmp3_, "visible-child-name", G_BINDING_SYNC_CREATE, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp4_ = self->scrolled;
	g_signal_connect_object (_tmp4_, "edge-reached", (GCallback) __tootle_views_base___lambda6__gtk_scrolled_window_edge_reached, self, 0);
	_tmp5_ = self->priv->_content;
	g_signal_connect_object (_tmp5_, "remove", (GCallback) __tootle_views_base___lambda7__gtk_container_remove, self, 0);
	_tmp6_ = self->content_list;
	g_signal_connect_object ((GtkContainer*) _tmp6_, "remove", (GCallback) __tootle_views_base___lambda8__gtk_container_remove, self, 0);
	_tmp7_ = self->content_list;
	g_signal_connect_object (_tmp7_, "row-activated", (GCallback) _tootle_views_base_on_content_item_activated_gtk_list_box_row_activated, self, 0);
	g_signal_connect_object ((GObject*) self, "notify::status-message", (GCallback) __tootle_views_base___lambda9__g_object_notify, self, 0);
	g_signal_connect_object ((GObject*) self, "notify::current", (GCallback) __tootle_views_base___lambda10__g_object_notify, self, 0);
	_tmp8_ = self->scrolled;
	_tmp9_ = gtk_widget_get_style_context ((GtkWidget*) _tmp8_);
	gtk_style_context_add_class (_tmp9_, TOOTLE_DIALOGS_MAIN_WINDOW_ZOOM_CLASS);
	tootle_views_base_build_header (self);
	return obj;
}

static void
tootle_views_base_class_init (TootleViewsBaseClass * klass,
                              gpointer klass_data)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	tootle_views_base_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TootleViewsBase_private_offset);
	((TootleViewsBaseClass *) klass)->build_header = (void (*) (TootleViewsBase*)) tootle_views_base_real_build_header;
	((TootleViewsBaseClass *) klass)->clear = (void (*) (TootleViewsBase*)) tootle_views_base_real_clear;
	((TootleViewsBaseClass *) klass)->on_bottom_reached = (void (*) (TootleViewsBase*)) tootle_views_base_real_on_bottom_reached;
	((TootleViewsBaseClass *) klass)->on_shown = (void (*) (TootleViewsBase*)) tootle_views_base_real_on_shown;
	((TootleViewsBaseClass *) klass)->on_hidden = (void (*) (TootleViewsBase*)) tootle_views_base_real_on_hidden;
	((TootleViewsBaseClass *) klass)->on_content_changed = (void (*) (TootleViewsBase*)) tootle_views_base_real_on_content_changed;
	((TootleViewsBaseClass *) klass)->on_error = (void (*) (TootleViewsBase*, gint32, const gchar*)) tootle_views_base_real_on_error;
	((TootleViewsBaseClass *) klass)->on_content_item_activated = (void (*) (TootleViewsBase*, GtkListBoxRow*)) tootle_views_base_real_on_content_item_activated;
	G_OBJECT_CLASS (klass)->get_property = _vala_tootle_views_base_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tootle_views_base_set_property;
	G_OBJECT_CLASS (klass)->constructor = tootle_views_base_constructor;
	G_OBJECT_CLASS (klass)->finalize = tootle_views_base_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_VIEWS_BASE_ICON_PROPERTY, tootle_views_base_properties[TOOTLE_VIEWS_BASE_ICON_PROPERTY] = g_param_spec_string ("icon", "icon", "icon", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_VIEWS_BASE_LABEL_PROPERTY, tootle_views_base_properties[TOOTLE_VIEWS_BASE_LABEL_PROPERTY] = g_param_spec_string ("label", "label", "label", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_VIEWS_BASE_NEEDS_ATTENTION_PROPERTY, tootle_views_base_properties[TOOTLE_VIEWS_BASE_NEEDS_ATTENTION_PROPERTY] = g_param_spec_boolean ("needs-attention", "needs-attention", "needs-attention", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_VIEWS_BASE_CURRENT_PROPERTY, tootle_views_base_properties[TOOTLE_VIEWS_BASE_CURRENT_PROPERTY] = g_param_spec_boolean ("current", "current", "current", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_VIEWS_BASE_ACTIONS_PROPERTY, tootle_views_base_properties[TOOTLE_VIEWS_BASE_ACTIONS_PROPERTY] = g_param_spec_object ("actions", "actions", "actions", g_simple_action_group_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_VIEWS_BASE_CONTENT_PROPERTY, tootle_views_base_properties[TOOTLE_VIEWS_BASE_CONTENT_PROPERTY] = g_param_spec_object ("content", "content", "content", gtk_container_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_VIEWS_BASE_STATE_PROPERTY, tootle_views_base_properties[TOOTLE_VIEWS_BASE_STATE_PROPERTY] = g_param_spec_string ("state", "state", "state", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_VIEWS_BASE_STATUS_MESSAGE_PROPERTY, tootle_views_base_properties[TOOTLE_VIEWS_BASE_STATUS_MESSAGE_PROPERTY] = g_param_spec_string ("status-message", "status-message", "status-message", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_VIEWS_BASE_EMPTY_PROPERTY, tootle_views_base_properties[TOOTLE_VIEWS_BASE_EMPTY_PROPERTY] = g_param_spec_boolean ("empty", "empty", "empty", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/com/github/bleakgrey/tootle/ui/views/base.ui");
	_tmp0_ = g_strdup (_ ("Nothing to see here"));
	tootle_views_base_STATUS_EMPTY = _tmp0_;
	_tmp1_ = g_strdup (" ");
	tootle_views_base_STATUS_LOADING = _tmp1_;
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "header", FALSE, G_STRUCT_OFFSET (TootleViewsBase, header));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "back_button", FALSE, G_STRUCT_OFFSET (TootleViewsBase, back_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "scrolled", FALSE, G_STRUCT_OFFSET (TootleViewsBase, scrolled));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "view", FALSE, G_STRUCT_OFFSET (TootleViewsBase, view));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "clamp", FALSE, G_STRUCT_OFFSET (TootleViewsBase, clamp));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "column_view", FALSE, G_STRUCT_OFFSET (TootleViewsBase, column_view));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "states", FALSE, G_STRUCT_OFFSET (TootleViewsBase, states));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "content_box", FALSE, G_STRUCT_OFFSET (TootleViewsBase, content_box));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "content_list", FALSE, G_STRUCT_OFFSET (TootleViewsBase, content_list));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "status_button", FALSE, G_STRUCT_OFFSET (TootleViewsBase, status_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "status_stack", FALSE, TootleViewsBase_private_offset + G_STRUCT_OFFSET (TootleViewsBasePrivate, status_stack));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "status_message_label", FALSE, TootleViewsBase_private_offset + G_STRUCT_OFFSET (TootleViewsBasePrivate, status_message_label));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_resized", G_CALLBACK(_tootle_views_base_on_resized_gtk_widget_size_allocate));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_close", G_CALLBACK(_tootle_views_base_on_close_gtk_button_clicked));
}

static void
tootle_views_base_instance_init (TootleViewsBase * self,
                                 gpointer klass)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	self->priv = tootle_views_base_get_instance_private (self);
	self->priv->_icon = NULL;
	_tmp0_ = g_strdup ("");
	self->priv->_label = _tmp0_;
	self->priv->_needs_attention = FALSE;
	self->priv->_current = FALSE;
	_tmp1_ = g_strdup ("status");
	self->priv->_state = _tmp1_;
	_tmp2_ = tootle_views_base_STATUS_EMPTY;
	_tmp3_ = g_strdup (_tmp2_);
	self->priv->_status_message = _tmp3_;
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
tootle_views_base_finalize (GObject * obj)
{
	TootleViewsBase * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TOOTLE_VIEWS_TYPE_BASE, TootleViewsBase);
	_g_free0 (self->priv->_icon);
	_g_free0 (self->priv->_label);
	_g_object_unref0 (self->priv->_actions);
	_g_object_unref0 (self->priv->_content);
	_g_free0 (self->priv->_state);
	_g_free0 (self->priv->_status_message);
	G_OBJECT_CLASS (tootle_views_base_parent_class)->finalize (obj);
}

static GType
tootle_views_base_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TootleViewsBaseClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tootle_views_base_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TootleViewsBase), 0, (GInstanceInitFunc) tootle_views_base_instance_init, NULL };
	GType tootle_views_base_type_id;
	tootle_views_base_type_id = g_type_register_static (gtk_box_get_type (), "TootleViewsBase", &g_define_type_info, 0);
	TootleViewsBase_private_offset = g_type_add_instance_private (tootle_views_base_type_id, sizeof (TootleViewsBasePrivate));
	return tootle_views_base_type_id;
}

GType
tootle_views_base_get_type (void)
{
	static volatile gsize tootle_views_base_type_id__volatile = 0;
	if (g_once_init_enter (&tootle_views_base_type_id__volatile)) {
		GType tootle_views_base_type_id;
		tootle_views_base_type_id = tootle_views_base_get_type_once ();
		g_once_init_leave (&tootle_views_base_type_id__volatile, tootle_views_base_type_id);
	}
	return tootle_views_base_type_id__volatile;
}

static void
_vala_tootle_views_base_get_property (GObject * object,
                                      guint property_id,
                                      GValue * value,
                                      GParamSpec * pspec)
{
	TootleViewsBase * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TOOTLE_VIEWS_TYPE_BASE, TootleViewsBase);
	switch (property_id) {
		case TOOTLE_VIEWS_BASE_ICON_PROPERTY:
		g_value_set_string (value, tootle_views_base_get_icon (self));
		break;
		case TOOTLE_VIEWS_BASE_LABEL_PROPERTY:
		g_value_set_string (value, tootle_views_base_get_label (self));
		break;
		case TOOTLE_VIEWS_BASE_NEEDS_ATTENTION_PROPERTY:
		g_value_set_boolean (value, tootle_views_base_get_needs_attention (self));
		break;
		case TOOTLE_VIEWS_BASE_CURRENT_PROPERTY:
		g_value_set_boolean (value, tootle_views_base_get_current (self));
		break;
		case TOOTLE_VIEWS_BASE_ACTIONS_PROPERTY:
		g_value_set_object (value, tootle_views_base_get_actions (self));
		break;
		case TOOTLE_VIEWS_BASE_CONTENT_PROPERTY:
		g_value_set_object (value, tootle_views_base_get_content (self));
		break;
		case TOOTLE_VIEWS_BASE_STATE_PROPERTY:
		g_value_set_string (value, tootle_views_base_get_state (self));
		break;
		case TOOTLE_VIEWS_BASE_STATUS_MESSAGE_PROPERTY:
		g_value_set_string (value, tootle_views_base_get_status_message (self));
		break;
		case TOOTLE_VIEWS_BASE_EMPTY_PROPERTY:
		g_value_set_boolean (value, tootle_views_base_get_empty (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tootle_views_base_set_property (GObject * object,
                                      guint property_id,
                                      const GValue * value,
                                      GParamSpec * pspec)
{
	TootleViewsBase * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TOOTLE_VIEWS_TYPE_BASE, TootleViewsBase);
	switch (property_id) {
		case TOOTLE_VIEWS_BASE_ICON_PROPERTY:
		tootle_views_base_set_icon (self, g_value_get_string (value));
		break;
		case TOOTLE_VIEWS_BASE_LABEL_PROPERTY:
		tootle_views_base_set_label (self, g_value_get_string (value));
		break;
		case TOOTLE_VIEWS_BASE_NEEDS_ATTENTION_PROPERTY:
		tootle_views_base_set_needs_attention (self, g_value_get_boolean (value));
		break;
		case TOOTLE_VIEWS_BASE_CURRENT_PROPERTY:
		tootle_views_base_set_current (self, g_value_get_boolean (value));
		break;
		case TOOTLE_VIEWS_BASE_ACTIONS_PROPERTY:
		tootle_views_base_set_actions (self, g_value_get_object (value));
		break;
		case TOOTLE_VIEWS_BASE_CONTENT_PROPERTY:
		tootle_views_base_set_content (self, g_value_get_object (value));
		break;
		case TOOTLE_VIEWS_BASE_STATE_PROPERTY:
		tootle_views_base_set_state (self, g_value_get_string (value));
		break;
		case TOOTLE_VIEWS_BASE_STATUS_MESSAGE_PROPERTY:
		tootle_views_base_set_status_message (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

