/* searchbar.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from searchbar.vala, do not modify */

/* This file is part of GNOME Boxes. License: LGPLv2+*/

#include <gtk/gtk.h>
#include <glib-object.h>
#include <handy.h>
#include <glib.h>
#include <gdk/gdk.h>
#include "common.h"
#include <stdlib.h>
#include <string.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define BOXES_TYPE_SEARCHBAR (boxes_searchbar_get_type ())
#define BOXES_SEARCHBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_SEARCHBAR, BoxesSearchbar))
#define BOXES_SEARCHBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_SEARCHBAR, BoxesSearchbarClass))
#define BOXES_IS_SEARCHBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_SEARCHBAR))
#define BOXES_IS_SEARCHBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_SEARCHBAR))
#define BOXES_SEARCHBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_SEARCHBAR, BoxesSearchbarClass))

typedef struct _BoxesSearchbar BoxesSearchbar;
typedef struct _BoxesSearchbarClass BoxesSearchbarClass;
typedef struct _BoxesSearchbarPrivate BoxesSearchbarPrivate;

#define BOXES_TYPE_APP_WINDOW (boxes_app_window_get_type ())
#define BOXES_APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_APP_WINDOW, BoxesAppWindow))
#define BOXES_APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_APP_WINDOW, BoxesAppWindowClass))
#define BOXES_IS_APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_APP_WINDOW))
#define BOXES_IS_APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_APP_WINDOW))
#define BOXES_APP_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_APP_WINDOW, BoxesAppWindowClass))

typedef struct _BoxesAppWindow BoxesAppWindow;
typedef struct _BoxesAppWindowClass BoxesAppWindowClass;
enum  {
	BOXES_SEARCHBAR_0_PROPERTY,
	BOXES_SEARCHBAR_ENABLE_KEY_HANDLER_PROPERTY,
	BOXES_SEARCHBAR_TEXT_PROPERTY,
	BOXES_SEARCHBAR_NUM_PROPERTIES
};
static GParamSpec* boxes_searchbar_properties[BOXES_SEARCHBAR_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define BOXES_TYPE_APP (boxes_app_get_type ())
#define BOXES_APP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_APP, BoxesApp))
#define BOXES_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_APP, BoxesAppClass))
#define BOXES_IS_APP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_APP))
#define BOXES_IS_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_APP))
#define BOXES_APP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_APP, BoxesAppClass))

typedef struct _BoxesApp BoxesApp;
typedef struct _BoxesAppClass BoxesAppClass;
typedef struct _BoxesAppPrivate BoxesAppPrivate;

#define BOXES_TYPE_COLLECTION (boxes_collection_get_type ())
#define BOXES_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_COLLECTION, BoxesCollection))
#define BOXES_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_COLLECTION, BoxesCollectionClass))
#define BOXES_IS_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_COLLECTION))
#define BOXES_IS_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_COLLECTION))
#define BOXES_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_COLLECTION, BoxesCollectionClass))

typedef struct _BoxesCollection BoxesCollection;
typedef struct _BoxesCollectionClass BoxesCollectionClass;

#define BOXES_TYPE_SHARED_FOLDERS_MANAGER (boxes_shared_folders_manager_get_type ())
#define BOXES_SHARED_FOLDERS_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_SHARED_FOLDERS_MANAGER, BoxesSharedFoldersManager))
#define BOXES_SHARED_FOLDERS_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_SHARED_FOLDERS_MANAGER, BoxesSharedFoldersManagerClass))
#define BOXES_IS_SHARED_FOLDERS_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_SHARED_FOLDERS_MANAGER))
#define BOXES_IS_SHARED_FOLDERS_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_SHARED_FOLDERS_MANAGER))
#define BOXES_SHARED_FOLDERS_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_SHARED_FOLDERS_MANAGER, BoxesSharedFoldersManagerClass))

typedef struct _BoxesSharedFoldersManager BoxesSharedFoldersManager;
typedef struct _BoxesSharedFoldersManagerClass BoxesSharedFoldersManagerClass;

#define BOXES_TYPE_UI (boxes_ui_get_type ())
#define BOXES_UI(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_UI, BoxesUI))
#define BOXES_IS_UI(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_UI))
#define BOXES_UI_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), BOXES_TYPE_UI, BoxesUIIface))

typedef struct _BoxesUI BoxesUI;
typedef struct _BoxesUIIface BoxesUIIface;
typedef enum  {
	BOXES_UI_STATE_NONE,
	BOXES_UI_STATE_COLLECTION,
	BOXES_UI_STATE_CREDS,
	BOXES_UI_STATE_DISPLAY,
	BOXES_UI_STATE_WIZARD,
	BOXES_UI_STATE_PROPERTIES,
	BOXES_UI_STATE_TROUBLESHOOT
} BoxesUIState;

#define BOXES_TYPE_UI_STATE (boxes_ui_state_get_type ())

struct _BoxesSearchbar {
	GtkSearchBar parent_instance;
	BoxesSearchbarPrivate * priv;
};

struct _BoxesSearchbarClass {
	GtkSearchBarClass parent_class;
};

struct _BoxesSearchbarPrivate {
	GtkSearchEntry* entry;
	BoxesAppWindow* window;
	gulong key_handler_id;
};

struct _BoxesApp {
	GtkApplication parent_instance;
	BoxesAppPrivate * priv;
	BoxesCollection* collection;
	BoxesAsyncLauncher* async_launcher;
	BoxesSharedFoldersManager* shared_folders_manager;
};

struct _BoxesAppClass {
	GtkApplicationClass parent_class;
};

struct _BoxesUIIface {
	GTypeInterface parent_iface;
	BoxesUIState (*get_previous_ui_state) (BoxesUI* self);
	void (*set_previous_ui_state) (BoxesUI* self, BoxesUIState value);
	BoxesUIState (*get_ui_state) (BoxesUI* self);
	void (*set_ui_state) (BoxesUI* self, BoxesUIState value);
};

static gint BoxesSearchbar_private_offset;
static gpointer boxes_searchbar_parent_class = NULL;
VALA_EXTERN BoxesApp* boxes_app_app;

VALA_EXTERN GType boxes_searchbar_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesSearchbar, g_object_unref)
VALA_EXTERN GType boxes_app_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesAppWindow, g_object_unref)
VALA_EXTERN void boxes_searchbar_setup_ui (BoxesSearchbar* self,
                               BoxesAppWindow* window);
static gboolean boxes_searchbar_on_app_key_pressed (BoxesSearchbar* self,
                                             GtkWidget* widget,
                                             GdkEventKey* event);
static gboolean _boxes_searchbar_on_app_key_pressed_gtk_widget_key_press_event (GtkWidget* _sender,
                                                                         GdkEventKey* event,
                                                                         gpointer self);
static void boxes_searchbar_on_search_changed (BoxesSearchbar* self);
VALA_EXTERN GType boxes_app_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesApp, g_object_unref)
VALA_EXTERN GType boxes_collection_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesCollection, g_object_unref)
VALA_EXTERN GType boxes_shared_folders_manager_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesSharedFoldersManager, g_object_unref)
VALA_EXTERN void boxes_collection_filter (BoxesCollection* self,
                              const gchar* search_term);
static void _boxes_searchbar_on_search_changed_gtk_search_entry_search_changed (GtkSearchEntry* _sender,
                                                                         gpointer self);
static void boxes_searchbar_on_search_mode_notify (BoxesSearchbar* self);
VALA_EXTERN void boxes_searchbar_set_text (BoxesSearchbar* self,
                               const gchar* value);
static void _boxes_searchbar_on_search_mode_notify_g_object_notify (GObject* _sender,
                                                             GParamSpec* pspec,
                                                             gpointer self);
VALA_EXTERN GType boxes_ui_state_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType boxes_ui_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesUI, g_object_unref)
VALA_EXTERN BoxesUIState boxes_ui_get_ui_state (BoxesUI* self);
VALA_EXTERN BoxesSearchbar* boxes_searchbar_new (void);
VALA_EXTERN BoxesSearchbar* boxes_searchbar_construct (GType object_type);
VALA_EXTERN void boxes_searchbar_set_enable_key_handler (BoxesSearchbar* self,
                                             gboolean value);
VALA_EXTERN const gchar* boxes_searchbar_get_text (BoxesSearchbar* self);
static GObject * boxes_searchbar_constructor (GType type,
                                       guint n_construct_properties,
                                       GObjectConstructParam * construct_properties);
static void boxes_searchbar_finalize (GObject * obj);
static GType boxes_searchbar_get_type_once (void);
static void _vala_boxes_searchbar_get_property (GObject * object,
                                         guint property_id,
                                         GValue * value,
                                         GParamSpec * pspec);
static void _vala_boxes_searchbar_set_property (GObject * object,
                                         guint property_id,
                                         const GValue * value,
                                         GParamSpec * pspec);

static inline gpointer
boxes_searchbar_get_instance_private (BoxesSearchbar* self)
{
	return G_STRUCT_MEMBER_P (self, BoxesSearchbar_private_offset);
}

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

static gboolean
_boxes_searchbar_on_app_key_pressed_gtk_widget_key_press_event (GtkWidget* _sender,
                                                                GdkEventKey* event,
                                                                gpointer self)
{
	gboolean result;
	result = boxes_searchbar_on_app_key_pressed ((BoxesSearchbar*) self, _sender, event);
	return result;
}

void
boxes_searchbar_setup_ui (BoxesSearchbar* self,
                          BoxesAppWindow* window)
{
	BoxesAppWindow* _tmp0_;
	gulong _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (window != NULL);
	_tmp0_ = _g_object_ref0 (window);
	_g_object_unref0 (self->priv->window);
	self->priv->window = _tmp0_;
	_tmp1_ = g_signal_connect_object ((GtkWidget*) window, "key-press-event", (GCallback) _boxes_searchbar_on_app_key_pressed_gtk_widget_key_press_event, self, 0);
	self->priv->key_handler_id = _tmp1_;
}

static void
boxes_searchbar_on_search_changed (BoxesSearchbar* self)
{
	BoxesApp* _tmp0_;
	BoxesCollection* _tmp1_;
	GtkSearchEntry* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = boxes_app_app;
	_tmp1_ = _tmp0_->collection;
	_tmp2_ = self->priv->entry;
	_tmp3_ = gtk_entry_get_text ((GtkEntry*) _tmp2_);
	_tmp4_ = _tmp3_;
	boxes_collection_filter (_tmp1_, _tmp4_);
}

static void
_boxes_searchbar_on_search_changed_gtk_search_entry_search_changed (GtkSearchEntry* _sender,
                                                                    gpointer self)
{
	boxes_searchbar_on_search_changed ((BoxesSearchbar*) self);
}

static void
boxes_searchbar_on_search_mode_notify (BoxesSearchbar* self)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	g_return_if_fail (self != NULL);
	g_object_get ((GtkSearchBar*) self, "search-mode-enabled", &_tmp0_, NULL);
	_tmp1_ = _tmp0_;
	if (!_tmp1_) {
		boxes_searchbar_set_text (self, "");
	}
}

static void
_boxes_searchbar_on_search_mode_notify_g_object_notify (GObject* _sender,
                                                        GParamSpec* pspec,
                                                        gpointer self)
{
	boxes_searchbar_on_search_mode_notify ((BoxesSearchbar*) self);
}

static gboolean
boxes_searchbar_on_app_key_pressed (BoxesSearchbar* self,
                                    GtkWidget* widget,
                                    GdkEventKey* event)
{
	BoxesAppWindow* _tmp0_;
	BoxesUIState _tmp1_;
	BoxesUIState _tmp2_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (widget != NULL, FALSE);
	g_return_val_if_fail (event != NULL, FALSE);
	_tmp0_ = self->priv->window;
	_tmp1_ = boxes_ui_get_ui_state ((BoxesUI*) _tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_ != BOXES_UI_STATE_COLLECTION) {
		result = FALSE;
		return result;
	}
	result = gtk_search_bar_handle_event ((GtkSearchBar*) self, (GdkEvent*) event);
	return result;
}

BoxesSearchbar*
boxes_searchbar_construct (GType object_type)
{
	BoxesSearchbar * self = NULL;
	self = (BoxesSearchbar*) g_object_new (object_type, NULL);
	return self;
}

BoxesSearchbar*
boxes_searchbar_new (void)
{
	return boxes_searchbar_construct (BOXES_TYPE_SEARCHBAR);
}

void
boxes_searchbar_set_enable_key_handler (BoxesSearchbar* self,
                                        gboolean value)
{
	g_return_if_fail (self != NULL);
	if (value) {
		BoxesAppWindow* _tmp0_;
		_tmp0_ = self->priv->window;
		g_signal_handler_unblock (_tmp0_, self->priv->key_handler_id);
	} else {
		BoxesAppWindow* _tmp1_;
		_tmp1_ = self->priv->window;
		g_signal_handler_block (_tmp1_, self->priv->key_handler_id);
	}
	g_object_notify_by_pspec ((GObject *) self, boxes_searchbar_properties[BOXES_SEARCHBAR_ENABLE_KEY_HANDLER_PROPERTY]);
}

const gchar*
boxes_searchbar_get_text (BoxesSearchbar* self)
{
	const gchar* result;
	GtkSearchEntry* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->entry;
	_tmp1_ = gtk_entry_get_text ((GtkEntry*) _tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}

void
boxes_searchbar_set_text (BoxesSearchbar* self,
                          const gchar* value)
{
	GtkSearchEntry* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->entry;
	gtk_entry_set_text ((GtkEntry*) _tmp0_, value);
	g_object_notify_by_pspec ((GObject *) self, boxes_searchbar_properties[BOXES_SEARCHBAR_TEXT_PROPERTY]);
}

static GObject *
boxes_searchbar_constructor (GType type,
                             guint n_construct_properties,
                             GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	BoxesSearchbar * self;
	parent_class = G_OBJECT_CLASS (boxes_searchbar_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_SEARCHBAR, BoxesSearchbar);
	g_object_set ((GtkSearchBar*) self, "search-mode-enabled", FALSE, NULL);
	return obj;
}

static void
boxes_searchbar_class_init (BoxesSearchbarClass * klass,
                            gpointer klass_data)
{
	boxes_searchbar_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &BoxesSearchbar_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_boxes_searchbar_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_boxes_searchbar_set_property;
	G_OBJECT_CLASS (klass)->constructor = boxes_searchbar_constructor;
	G_OBJECT_CLASS (klass)->finalize = boxes_searchbar_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_SEARCHBAR_ENABLE_KEY_HANDLER_PROPERTY, boxes_searchbar_properties[BOXES_SEARCHBAR_ENABLE_KEY_HANDLER_PROPERTY] = g_param_spec_boolean ("enable-key-handler", "enable-key-handler", "enable-key-handler", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_SEARCHBAR_TEXT_PROPERTY, boxes_searchbar_properties[BOXES_SEARCHBAR_TEXT_PROPERTY] = g_param_spec_string ("text", "text", "text", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/Boxes/ui/searchbar.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "entry", FALSE, BoxesSearchbar_private_offset + G_STRUCT_OFFSET (BoxesSearchbarPrivate, entry));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_search_changed", G_CALLBACK(_boxes_searchbar_on_search_changed_gtk_search_entry_search_changed));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_search_mode_notify", G_CALLBACK(_boxes_searchbar_on_search_mode_notify_g_object_notify));
}

static void
boxes_searchbar_instance_init (BoxesSearchbar * self,
                               gpointer klass)
{
	self->priv = boxes_searchbar_get_instance_private (self);
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
boxes_searchbar_finalize (GObject * obj)
{
	BoxesSearchbar * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_SEARCHBAR, BoxesSearchbar);
	_g_object_unref0 (self->priv->window);
	G_OBJECT_CLASS (boxes_searchbar_parent_class)->finalize (obj);
}

static GType
boxes_searchbar_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (BoxesSearchbarClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_searchbar_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesSearchbar), 0, (GInstanceInitFunc) boxes_searchbar_instance_init, NULL };
	GType boxes_searchbar_type_id;
	boxes_searchbar_type_id = g_type_register_static (gtk_search_bar_get_type (), "BoxesSearchbar", &g_define_type_info, 0);
	BoxesSearchbar_private_offset = g_type_add_instance_private (boxes_searchbar_type_id, sizeof (BoxesSearchbarPrivate));
	return boxes_searchbar_type_id;
}

GType
boxes_searchbar_get_type (void)
{
	static volatile gsize boxes_searchbar_type_id__once = 0;
	if (g_once_init_enter (&boxes_searchbar_type_id__once)) {
		GType boxes_searchbar_type_id;
		boxes_searchbar_type_id = boxes_searchbar_get_type_once ();
		g_once_init_leave (&boxes_searchbar_type_id__once, boxes_searchbar_type_id);
	}
	return boxes_searchbar_type_id__once;
}

static void
_vala_boxes_searchbar_get_property (GObject * object,
                                    guint property_id,
                                    GValue * value,
                                    GParamSpec * pspec)
{
	BoxesSearchbar * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_SEARCHBAR, BoxesSearchbar);
	switch (property_id) {
		case BOXES_SEARCHBAR_TEXT_PROPERTY:
		g_value_set_string (value, boxes_searchbar_get_text (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_boxes_searchbar_set_property (GObject * object,
                                    guint property_id,
                                    const GValue * value,
                                    GParamSpec * pspec)
{
	BoxesSearchbar * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_SEARCHBAR, BoxesSearchbar);
	switch (property_id) {
		case BOXES_SEARCHBAR_ENABLE_KEY_HANDLER_PROPERTY:
		boxes_searchbar_set_enable_key_handler (self, g_value_get_boolean (value));
		break;
		case BOXES_SEARCHBAR_TEXT_PROPERTY:
		boxes_searchbar_set_text (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

