/* tracker-search-tool.c generated by valac, the Vala compiler
 * generated from tracker-search-tool.gs, do not modify */


#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <dbus/dbus-glib-lowlevel.h>
#include <dbus/dbus-glib.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gi18n-lib.h>
#include <dbus/dbus.h>


#define TYPE_TRACKER_SEARCH_TOOL_SERVER (tracker_search_tool_server_get_type ())
#define TRACKER_SEARCH_TOOL_SERVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TRACKER_SEARCH_TOOL_SERVER, TrackerSearchToolServer))
#define TRACKER_SEARCH_TOOL_SERVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TRACKER_SEARCH_TOOL_SERVER, TrackerSearchToolServerClass))
#define IS_TRACKER_SEARCH_TOOL_SERVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TRACKER_SEARCH_TOOL_SERVER))
#define IS_TRACKER_SEARCH_TOOL_SERVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TRACKER_SEARCH_TOOL_SERVER))
#define TRACKER_SEARCH_TOOL_SERVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TRACKER_SEARCH_TOOL_SERVER, TrackerSearchToolServerClass))

typedef struct _TrackerSearchToolServer TrackerSearchToolServer;
typedef struct _TrackerSearchToolServerClass TrackerSearchToolServerClass;
typedef struct _TrackerSearchToolServerPrivate TrackerSearchToolServerPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _dbus_g_connection_unref0(var) ((var == NULL) ? NULL : (var = (dbus_g_connection_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

#define TYPE_TRACKER_QUERY (tracker_query_get_type ())
#define TRACKER_QUERY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TRACKER_QUERY, TrackerQuery))
#define TRACKER_QUERY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TRACKER_QUERY, TrackerQueryClass))
#define IS_TRACKER_QUERY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TRACKER_QUERY))
#define IS_TRACKER_QUERY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TRACKER_QUERY))
#define TRACKER_QUERY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TRACKER_QUERY, TrackerQueryClass))

typedef struct _TrackerQuery TrackerQuery;
typedef struct _TrackerQueryClass TrackerQueryClass;

#define TYPE_TRACKER_SEARCH_ENTRY (tracker_search_entry_get_type ())
#define TRACKER_SEARCH_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TRACKER_SEARCH_ENTRY, TrackerSearchEntry))
#define TRACKER_SEARCH_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TRACKER_SEARCH_ENTRY, TrackerSearchEntryClass))
#define IS_TRACKER_SEARCH_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TRACKER_SEARCH_ENTRY))
#define IS_TRACKER_SEARCH_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TRACKER_SEARCH_ENTRY))
#define TRACKER_SEARCH_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TRACKER_SEARCH_ENTRY, TrackerSearchEntryClass))

typedef struct _TrackerSearchEntry TrackerSearchEntry;
typedef struct _TrackerSearchEntryClass TrackerSearchEntryClass;

#define TYPE_TRACKER_RESULT_GRID (tracker_result_grid_get_type ())
#define TRACKER_RESULT_GRID(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TRACKER_RESULT_GRID, TrackerResultGrid))
#define TRACKER_RESULT_GRID_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TRACKER_RESULT_GRID, TrackerResultGridClass))
#define IS_TRACKER_RESULT_GRID(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TRACKER_RESULT_GRID))
#define IS_TRACKER_RESULT_GRID_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TRACKER_RESULT_GRID))
#define TRACKER_RESULT_GRID_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TRACKER_RESULT_GRID, TrackerResultGridClass))

typedef struct _TrackerResultGrid TrackerResultGrid;
typedef struct _TrackerResultGridClass TrackerResultGridClass;

#define TYPE_TRACKER_CATEGORY_VIEW (tracker_category_view_get_type ())
#define TRACKER_CATEGORY_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TRACKER_CATEGORY_VIEW, TrackerCategoryView))
#define TRACKER_CATEGORY_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TRACKER_CATEGORY_VIEW, TrackerCategoryViewClass))
#define IS_TRACKER_CATEGORY_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TRACKER_CATEGORY_VIEW))
#define IS_TRACKER_CATEGORY_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TRACKER_CATEGORY_VIEW))
#define TRACKER_CATEGORY_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TRACKER_CATEGORY_VIEW, TrackerCategoryViewClass))

typedef struct _TrackerCategoryView TrackerCategoryView;
typedef struct _TrackerCategoryViewClass TrackerCategoryViewClass;

#define TYPE_TRACKER_METADATA_TILE (tracker_metadata_tile_get_type ())
#define TRACKER_METADATA_TILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TRACKER_METADATA_TILE, TrackerMetadataTile))
#define TRACKER_METADATA_TILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TRACKER_METADATA_TILE, TrackerMetadataTileClass))
#define IS_TRACKER_METADATA_TILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TRACKER_METADATA_TILE))
#define IS_TRACKER_METADATA_TILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TRACKER_METADATA_TILE))
#define TRACKER_METADATA_TILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TRACKER_METADATA_TILE, TrackerMetadataTileClass))

typedef struct _TrackerMetadataTile TrackerMetadataTile;
typedef struct _TrackerMetadataTileClass TrackerMetadataTileClass;
typedef struct _DBusObjectVTable _DBusObjectVTable;

struct _TrackerSearchToolServer {
	GObject parent_instance;
	TrackerSearchToolServerPrivate * priv;
};

struct _TrackerSearchToolServerClass {
	GObjectClass parent_class;
};

struct _DBusObjectVTable {
	void (*register_object) (DBusConnection*, const char*, void*);
};


extern GtkWindow* window;
GtkWindow* window = NULL;
static gpointer tracker_search_tool_server_parent_class = NULL;

GType tracker_search_tool_server_get_type (void);
enum  {
	TRACKER_SEARCH_TOOL_SERVER_DUMMY_PROPERTY
};
void tracker_search_tool_server_Show (TrackerSearchToolServer* self);
TrackerSearchToolServer* tracker_search_tool_server_new (void);
TrackerSearchToolServer* tracker_search_tool_server_construct (GType object_type);
void tracker_search_tool_server_dbus_register_object (DBusConnection* connection, const char* path, void* object);
void _tracker_search_tool_server_dbus_unregister (DBusConnection* connection, void* _user_data_);
DBusHandlerResult tracker_search_tool_server_dbus_message (DBusConnection* connection, DBusMessage* message, void* object);
static DBusHandlerResult _dbus_tracker_search_tool_server_introspect (TrackerSearchToolServer* self, DBusConnection* connection, DBusMessage* message);
static DBusHandlerResult _dbus_tracker_search_tool_server_property_get_all (TrackerSearchToolServer* self, DBusConnection* connection, DBusMessage* message);
static DBusHandlerResult _dbus_tracker_search_tool_server_Show (TrackerSearchToolServer* self, DBusConnection* connection, DBusMessage* message);
static guint _dynamic_request_name0 (DBusGProxy* self, const char* param1, guint param2, GError** error);
static void _dynamic_show1 (DBusGProxy* self, GError** error);
static void _gtk_main_quit_gtk_object_destroy (GtkWindow* _sender, gpointer self);
TrackerQuery* tracker_query_new (void);
TrackerQuery* tracker_query_construct (GType object_type);
GType tracker_query_get_type (void);
TrackerSearchEntry* tracker_search_entry_new (void);
TrackerSearchEntry* tracker_search_entry_construct (GType object_type);
GType tracker_search_entry_get_type (void);
TrackerResultGrid* tracker_result_grid_new (void);
TrackerResultGrid* tracker_result_grid_construct (GType object_type);
GType tracker_result_grid_get_type (void);
TrackerCategoryView* tracker_category_view_new (void);
TrackerCategoryView* tracker_category_view_construct (GType object_type);
GType tracker_category_view_get_type (void);
TrackerMetadataTile* tracker_metadata_tile_new (void);
TrackerMetadataTile* tracker_metadata_tile_construct (GType object_type);
GType tracker_metadata_tile_get_type (void);
gboolean tracker_query_Connect (TrackerQuery* self);
void tracker_search_entry_set_Query (TrackerSearchEntry* self, TrackerQuery* value);
void tracker_result_grid_set_Query (TrackerResultGrid* self, TrackerQuery* value);
void tracker_category_view_set_Query (TrackerCategoryView* self, TrackerQuery* value);
void tracker_metadata_tile_set_ResultGrid (TrackerMetadataTile* self, TrackerResultGrid* value);
void tracker_metadata_tile_set_Query (TrackerMetadataTile* self, TrackerQuery* value);
void _main (char** args, int args_length1);
static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object);
static void _vala_dbus_unregister_object (gpointer connection, GObject* object);

static const DBusObjectPathVTable _tracker_search_tool_server_dbus_path_vtable = {_tracker_search_tool_server_dbus_unregister, tracker_search_tool_server_dbus_message};
static const _DBusObjectVTable _tracker_search_tool_server_dbus_vtable = {tracker_search_tool_server_dbus_register_object};


#line 29 "tracker-search-tool.gs"
void tracker_search_tool_server_Show (TrackerSearchToolServer* self) {
#line 29 "tracker-search-tool.gs"
	g_return_if_fail (self != NULL);
#line 30 "tracker-search-tool.gs"
	gtk_window_present (window);
#line 151 "tracker-search-tool.c"
}


#line 28 "tracker-search-tool.gs"
TrackerSearchToolServer* tracker_search_tool_server_construct (GType object_type) {
#line 157 "tracker-search-tool.c"
	TrackerSearchToolServer * self;
#line 28 "tracker-search-tool.gs"
	self = (TrackerSearchToolServer*) g_object_new (object_type, NULL);
#line 161 "tracker-search-tool.c"
	return self;
}


#line 28 "tracker-search-tool.gs"
TrackerSearchToolServer* tracker_search_tool_server_new (void) {
#line 28 "tracker-search-tool.gs"
	return tracker_search_tool_server_construct (TYPE_TRACKER_SEARCH_TOOL_SERVER);
#line 170 "tracker-search-tool.c"
}


void _tracker_search_tool_server_dbus_unregister (DBusConnection* connection, void* _user_data_) {
}


static DBusHandlerResult _dbus_tracker_search_tool_server_introspect (TrackerSearchToolServer* self, DBusConnection* connection, DBusMessage* message) {
	DBusMessage* reply;
	DBusMessageIter iter;
	GString* xml_data;
	char** children;
	int i;
	reply = dbus_message_new_method_return (message);
	dbus_message_iter_init_append (reply, &iter);
	xml_data = g_string_new ("<!DOCTYPE node PUBLIC \"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN\" \"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd\">\n");
	g_string_append (xml_data, "<node>\n<interface name=\"org.freedesktop.DBus.Introspectable\">\n  <method name=\"Introspect\">\n    <arg name=\"data\" direction=\"out\" type=\"s\"/>\n  </method>\n</interface>\n<interface name=\"org.freedesktop.DBus.Properties\">\n  <method name=\"Get\">\n    <arg name=\"interface\" direction=\"in\" type=\"s\"/>\n    <arg name=\"propname\" direction=\"in\" type=\"s\"/>\n    <arg name=\"value\" direction=\"out\" type=\"v\"/>\n  </method>\n  <method name=\"Set\">\n    <arg name=\"interface\" direction=\"in\" type=\"s\"/>\n    <arg name=\"propname\" direction=\"in\" type=\"s\"/>\n    <arg name=\"value\" direction=\"in\" type=\"v\"/>\n  </method>\n  <method name=\"GetAll\">\n    <arg name=\"interface\" direction=\"in\" type=\"s\"/>\n    <arg name=\"props\" direction=\"out\" type=\"a{sv}\"/>\n  </method>\n</interface>\n<interface name=\"org.freedesktop.Tracker1.SearchTool\">\n  <method name=\"Show\">\n  </method>\n</interface>\n");
	dbus_connection_list_registered (connection, g_object_get_data ((GObject *) self, "dbus_object_path"), &children);
	for (i = 0; children[i]; i++) {
		g_string_append_printf (xml_data, "<node name=\"%s\"/>\n", children[i]);
	}
	dbus_free_string_array (children);
	g_string_append (xml_data, "</node>\n");
	dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &xml_data->str);
	g_string_free (xml_data, TRUE);
	if (reply) {
		dbus_connection_send (connection, reply, NULL);
		dbus_message_unref (reply);
		return DBUS_HANDLER_RESULT_HANDLED;
	} else {
		return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
	}
}


static DBusHandlerResult _dbus_tracker_search_tool_server_property_get_all (TrackerSearchToolServer* self, DBusConnection* connection, DBusMessage* message) {
	DBusMessage* reply;
	DBusMessageIter iter, reply_iter, subiter;
	char* interface_name;
	const char* _tmp0_;
	if (strcmp (dbus_message_get_signature (message), "s")) {
		return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
	}
	dbus_message_iter_init (message, &iter);
	reply = dbus_message_new_method_return (message);
	dbus_message_iter_init_append (reply, &reply_iter);
	dbus_message_iter_get_basic (&iter, &_tmp0_);
	dbus_message_iter_next (&iter);
	interface_name = g_strdup (_tmp0_);
	if (strcmp (interface_name, "org.freedesktop.Tracker1.SearchTool") == 0) {
		dbus_message_iter_open_container (&reply_iter, DBUS_TYPE_ARRAY, "{sv}", &subiter);
		dbus_message_iter_close_container (&reply_iter, &subiter);
	} else {
		dbus_message_unref (reply);
		reply = NULL;
	}
	g_free (interface_name);
	if (reply) {
		dbus_connection_send (connection, reply, NULL);
		dbus_message_unref (reply);
		return DBUS_HANDLER_RESULT_HANDLED;
	} else {
		return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
	}
}


static DBusHandlerResult _dbus_tracker_search_tool_server_Show (TrackerSearchToolServer* self, DBusConnection* connection, DBusMessage* message) {
	DBusMessageIter iter;
	GError* error;
	DBusMessage* reply;
	error = NULL;
	if (strcmp (dbus_message_get_signature (message), "")) {
		return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
	}
	dbus_message_iter_init (message, &iter);
	tracker_search_tool_server_Show (self);
	reply = dbus_message_new_method_return (message);
	dbus_message_iter_init_append (reply, &iter);
	if (reply) {
		dbus_connection_send (connection, reply, NULL);
		dbus_message_unref (reply);
		return DBUS_HANDLER_RESULT_HANDLED;
	} else {
		return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
	}
}


DBusHandlerResult tracker_search_tool_server_dbus_message (DBusConnection* connection, DBusMessage* message, void* object) {
	DBusHandlerResult result;
	result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
	if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Introspectable", "Introspect")) {
		result = _dbus_tracker_search_tool_server_introspect (object, connection, message);
	} else if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Properties", "GetAll")) {
		result = _dbus_tracker_search_tool_server_property_get_all (object, connection, message);
	} else if (dbus_message_is_method_call (message, "org.freedesktop.Tracker1.SearchTool", "Show")) {
		result = _dbus_tracker_search_tool_server_Show (object, connection, message);
	}
	if (result == DBUS_HANDLER_RESULT_HANDLED) {
		return result;
	} else {
		return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
	}
}


void tracker_search_tool_server_dbus_register_object (DBusConnection* connection, const char* path, void* object) {
	if (!g_object_get_data (object, "dbus_object_path")) {
		g_object_set_data (object, "dbus_object_path", g_strdup (path));
		dbus_connection_register_object_path (connection, path, &_tracker_search_tool_server_dbus_path_vtable, object);
		g_object_weak_ref (object, _vala_dbus_unregister_object, connection);
	}
}


static void tracker_search_tool_server_class_init (TrackerSearchToolServerClass * klass) {
	tracker_search_tool_server_parent_class = g_type_class_peek_parent (klass);
	g_type_set_qdata (TYPE_TRACKER_SEARCH_TOOL_SERVER, g_quark_from_static_string ("DBusObjectVTable"), (void*) (&_tracker_search_tool_server_dbus_vtable));
}


static void tracker_search_tool_server_instance_init (TrackerSearchToolServer * self) {
}


GType tracker_search_tool_server_get_type (void) {
	static GType tracker_search_tool_server_type_id = 0;
	if (tracker_search_tool_server_type_id == 0) {
		static const GTypeInfo g_define_type_info = { sizeof (TrackerSearchToolServerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tracker_search_tool_server_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TrackerSearchToolServer), 0, (GInstanceInitFunc) tracker_search_tool_server_instance_init, NULL };
		tracker_search_tool_server_type_id = g_type_register_static (G_TYPE_OBJECT, "TrackerSearchToolServer", &g_define_type_info, 0);
	}
	return tracker_search_tool_server_type_id;
}


static guint _dynamic_request_name0 (DBusGProxy* self, const char* param1, guint param2, GError** error) {
	guint result;
	dbus_g_proxy_call (self, "RequestName", error, G_TYPE_STRING, param1, G_TYPE_UINT, param2, G_TYPE_INVALID, G_TYPE_UINT, &result, G_TYPE_INVALID);
	if (*error) {
		return 0U;
	}
	return result;
}


static void _dynamic_show1 (DBusGProxy* self, GError** error) {
	dbus_g_proxy_call (self, "Show", error, G_TYPE_INVALID, G_TYPE_INVALID);
	if (*error) {
		return;
	}
}


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


#line 7578 "gtk+-2.0.vapi"
static void _gtk_main_quit_gtk_object_destroy (GtkWindow* _sender, gpointer self) {
#line 332 "tracker-search-tool.c"
	gtk_main_quit ();
}


#line 32 "tracker-search-tool.gs"
void _main (char** args, int args_length1) {
#line 339 "tracker-search-tool.c"
	GError * _inner_error_;
	TrackerSearchToolServer* server;
	GtkBuilder* builder;
	GtkWindow* _tmp4_;
	GObject* _tmp3_;
	TrackerQuery* query;
	TrackerSearchEntry* entry;
	TrackerResultGrid* grid;
	TrackerCategoryView* categories;
	TrackerMetadataTile* tile;
	GObject* _tmp5_;
	GtkContainer* entry_box;
	GObject* _tmp6_;
	GtkContainer* grid_box;
	GObject* _tmp7_;
	GtkContainer* category_box;
	GObject* _tmp8_;
	GtkContainer* detail_box;
	_inner_error_ = NULL;
#line 33 "tracker-search-tool.gs"
	gtk_init (&args_length1, &args);
#line 35 "tracker-search-tool.gs"
	server = tracker_search_tool_server_new ();
#line 363 "tracker-search-tool.c"
	{
		DBusGProxy* bus;
		guint _result_ = 0U;
		DBusGConnection* conn;
		DBusGProxy* _tmp0_;
		guint _tmp1_;
		bus = NULL;
#line 41 "tracker-search-tool.gs"
		conn = dbus_g_bus_get (DBUS_BUS_SESSION, &_inner_error_);
#line 373 "tracker-search-tool.c"
		if (_inner_error_ != NULL) {
			_g_object_unref0 (bus);
			if (_inner_error_->domain == DBUS_GERROR) {
				goto __catch3_dbus_gerror;
			}
			goto __finally3;
		}
#line 43 "tracker-search-tool.gs"
		bus = (_tmp0_ = dbus_g_proxy_new_for_name (conn, "org.freedesktop.DBus", "/org/freedesktop/DBus", "org.freedesktop.DBus"), _g_object_unref0 (bus), _tmp0_);
#line 47 "tracker-search-tool.gs"
		_tmp1_ = _dynamic_request_name0 (bus, "org.freedesktop.Tracker1.SearchTool", (guint) 0, &_inner_error_);
#line 385 "tracker-search-tool.c"
		if (_inner_error_ != NULL) {
			_g_object_unref0 (bus);
			_dbus_g_connection_unref0 (conn);
			if (_inner_error_->domain == DBUS_GERROR) {
				goto __catch3_dbus_gerror;
			}
			goto __finally3;
		}
#line 47 "tracker-search-tool.gs"
		_result_ = _tmp1_;
#line 49 "tracker-search-tool.gs"
		if (_result_ == DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) {
#line 50 "tracker-search-tool.gs"
			_vala_dbus_register_object (dbus_g_connection_get_connection (conn), "/org/freedesktop/Tracker1/SearchTool", (GObject*) server);
#line 400 "tracker-search-tool.c"
		} else {
			DBusGProxy* remote;
			DBusGProxy* _tmp2_;
			remote = NULL;
#line 54 "tracker-search-tool.gs"
			remote = (_tmp2_ = dbus_g_proxy_new_for_name (conn, "org.freedesktop.Tracker1.SearchTool", "/org/freedesktop/Tracker1/SearchTool", "org.freedesktop.Tracker1.SearchTool"), _g_object_unref0 (remote), _tmp2_);
#line 58 "tracker-search-tool.gs"
			_dynamic_show1 (remote, &_inner_error_);
#line 409 "tracker-search-tool.c"
			if (_inner_error_ != NULL) {
				_g_object_unref0 (remote);
				_g_object_unref0 (bus);
				_dbus_g_connection_unref0 (conn);
				if (_inner_error_->domain == DBUS_GERROR) {
					goto __catch3_dbus_gerror;
				}
				goto __finally3;
			}
			_g_object_unref0 (remote);
			_g_object_unref0 (bus);
			_dbus_g_connection_unref0 (conn);
			_g_object_unref0 (server);
#line 59 "tracker-search-tool.gs"
			return;
#line 425 "tracker-search-tool.c"
		}
		_g_object_unref0 (bus);
		_dbus_g_connection_unref0 (conn);
	}
	goto __finally3;
	__catch3_dbus_gerror:
	{
		GError * e;
		e = _inner_error_;
		_inner_error_ = NULL;
		{
#line 61 "tracker-search-tool.gs"
			g_warning ("tracker-search-tool.gs:61: %s", e->message);
#line 439 "tracker-search-tool.c"
			_g_error_free0 (e);
		}
	}
	__finally3:
	if (_inner_error_ != NULL) {
		_g_object_unref0 (server);
		g_critical ("file %s: line %d: uncaught error: %s", __FILE__, __LINE__, _inner_error_->message);
		g_clear_error (&_inner_error_);
		return;
	}
#line 63 "tracker-search-tool.gs"
	builder = gtk_builder_new ();
#line 452 "tracker-search-tool.c"
	{
#line 66 "tracker-search-tool.gs"
		gtk_builder_add_from_file (builder, SRCDIR "tst.ui", &_inner_error_);
#line 456 "tracker-search-tool.c"
		if (_inner_error_ != NULL) {
			goto __catch4_g_error;
			goto __finally4;
		}
	}
	goto __finally4;
	__catch4_g_error:
	{
		GError * e;
		e = _inner_error_;
		_inner_error_ = NULL;
		{
			{
#line 71 "tracker-search-tool.gs"
				gtk_builder_add_from_file (builder, TRACKER_UI_DIR "tst.ui", &_inner_error_);
#line 472 "tracker-search-tool.c"
				if (_inner_error_ != NULL) {
					goto __catch5_g_error;
					goto __finally5;
				}
			}
			goto __finally5;
			__catch5_g_error:
			{
				GError * e;
				e = _inner_error_;
				_inner_error_ = NULL;
				{
					GtkMessageDialog* msg;
#line 75 "tracker-search-tool.gs"
					msg = g_object_ref_sink ((GtkMessageDialog*) gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, N_ ("Failed to load UI\n%s"), e->message));
#line 78 "tracker-search-tool.gs"
					gtk_dialog_run ((GtkDialog*) msg);
#line 79 "tracker-search-tool.gs"
					gtk_main_quit ();
#line 492 "tracker-search-tool.c"
					_g_error_free0 (e);
					_g_object_unref0 (msg);
				}
			}
			__finally5:
			if (_inner_error_ != NULL) {
				_g_error_free0 (e);
				_g_object_unref0 (server);
				_g_object_unref0 (builder);
				goto __finally4;
			}
			_g_error_free0 (e);
		}
	}
	__finally4:
	if (_inner_error_ != NULL) {
		_g_object_unref0 (server);
		_g_object_unref0 (builder);
		g_critical ("file %s: line %d: uncaught error: %s", __FILE__, __LINE__, _inner_error_->message);
		g_clear_error (&_inner_error_);
		return;
	}
#line 82 "tracker-search-tool.gs"
	window = (_tmp4_ = _g_object_ref0 ((_tmp3_ = gtk_builder_get_object (builder, "window"), GTK_IS_WINDOW (_tmp3_) ? ((GtkWindow*) _tmp3_) : NULL)), _g_object_unref0 (window), _tmp4_);
#line 83 "tracker-search-tool.gs"
	g_signal_connect ((GtkObject*) window, "destroy", (GCallback) _gtk_main_quit_gtk_object_destroy, NULL);
#line 88 "tracker-search-tool.gs"
	query = tracker_query_new ();
#line 89 "tracker-search-tool.gs"
	entry = g_object_ref_sink (tracker_search_entry_new ());
#line 90 "tracker-search-tool.gs"
	grid = g_object_ref_sink (tracker_result_grid_new ());
#line 91 "tracker-search-tool.gs"
	categories = g_object_ref_sink (tracker_category_view_new ());
#line 92 "tracker-search-tool.gs"
	tile = g_object_ref_sink (tracker_metadata_tile_new ());
#line 94 "tracker-search-tool.gs"
	entry_box = _g_object_ref0 ((_tmp5_ = gtk_builder_get_object (builder, "EntryBox"), GTK_IS_CONTAINER (_tmp5_) ? ((GtkContainer*) _tmp5_) : NULL));
#line 95 "tracker-search-tool.gs"
	grid_box = _g_object_ref0 ((_tmp6_ = gtk_builder_get_object (builder, "GridBox"), GTK_IS_CONTAINER (_tmp6_) ? ((GtkContainer*) _tmp6_) : NULL));
#line 96 "tracker-search-tool.gs"
	category_box = _g_object_ref0 ((_tmp7_ = gtk_builder_get_object (builder, "CategoryBox"), GTK_IS_CONTAINER (_tmp7_) ? ((GtkContainer*) _tmp7_) : NULL));
#line 97 "tracker-search-tool.gs"
	detail_box = _g_object_ref0 ((_tmp8_ = gtk_builder_get_object (builder, "DetailBox"), GTK_IS_CONTAINER (_tmp8_) ? ((GtkContainer*) _tmp8_) : NULL));
#line 100 "tracker-search-tool.gs"
	tracker_query_Connect (query);
#line 101 "tracker-search-tool.gs"
	tracker_search_entry_set_Query (entry, query);
#line 102 "tracker-search-tool.gs"
	gtk_container_add (entry_box, (GtkWidget*) entry);
#line 104 "tracker-search-tool.gs"
	tracker_result_grid_set_Query (grid, query);
#line 105 "tracker-search-tool.gs"
	gtk_container_add (grid_box, (GtkWidget*) grid);
#line 107 "tracker-search-tool.gs"
	tracker_category_view_set_Query (categories, query);
#line 108 "tracker-search-tool.gs"
	gtk_container_add (category_box, (GtkWidget*) categories);
#line 110 "tracker-search-tool.gs"
	tracker_metadata_tile_set_ResultGrid (tile, grid);
#line 111 "tracker-search-tool.gs"
	tracker_metadata_tile_set_Query (tile, query);
#line 112 "tracker-search-tool.gs"
	gtk_container_add (detail_box, (GtkWidget*) tile);
#line 114 "tracker-search-tool.gs"
	gtk_widget_show_all ((GtkWidget*) window);
#line 116 "tracker-search-tool.gs"
	gtk_main ();
#line 561 "tracker-search-tool.c"
	_g_object_unref0 (server);
	_g_object_unref0 (builder);
	_g_object_unref0 (query);
	_g_object_unref0 (entry);
	_g_object_unref0 (grid);
	_g_object_unref0 (categories);
	_g_object_unref0 (tile);
	_g_object_unref0 (entry_box);
	_g_object_unref0 (grid_box);
	_g_object_unref0 (category_box);
	_g_object_unref0 (detail_box);
}


#line 32 "tracker-search-tool.gs"
int main (int argc, char ** argv) {
#line 32 "tracker-search-tool.gs"
	g_type_init ();
#line 32 "tracker-search-tool.gs"
	_main (argv, argc);
#line 32 "tracker-search-tool.gs"
	return 0;
#line 584 "tracker-search-tool.c"
}


static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object) {
	const _DBusObjectVTable * vtable;
	vtable = g_type_get_qdata (G_TYPE_FROM_INSTANCE (object), g_quark_from_static_string ("DBusObjectVTable"));
	if (vtable) {
		vtable->register_object (connection, path, object);
	} else {
		g_warning ("Object does not implement any D-Bus interface");
	}
}


static void _vala_dbus_unregister_object (gpointer connection, GObject* object) {
	char* path;
	path = g_object_steal_data ((GObject*) object, "dbus_object_path");
	dbus_connection_unregister_object_path (connection, path);
	g_free (path);
}




