/* midori-searchcompletion.c generated by valac 0.38.8, the Vala compiler
 * generated from midori-searchcompletion.vala, do not modify */

/*
 Copyright (C) 2012-2013 Christian Dywan <christian@twotoasts.de>

 This library is free software; you can redistribute it and/or
 modify it under the terms of the GNU Lesser General Public
 License as published by the Free Software Foundation; either
 version 2.1 of the License, or (at your option) any later version.

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

#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <gio/gio.h>
#include <glib/gi18n-lib.h>


#define MIDORI_TYPE_COMPLETION (midori_completion_get_type ())
#define MIDORI_COMPLETION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MIDORI_TYPE_COMPLETION, MidoriCompletion))
#define MIDORI_COMPLETION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MIDORI_TYPE_COMPLETION, MidoriCompletionClass))
#define MIDORI_IS_COMPLETION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MIDORI_TYPE_COMPLETION))
#define MIDORI_IS_COMPLETION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MIDORI_TYPE_COMPLETION))
#define MIDORI_COMPLETION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MIDORI_TYPE_COMPLETION, MidoriCompletionClass))

typedef struct _MidoriCompletion MidoriCompletion;
typedef struct _MidoriCompletionClass MidoriCompletionClass;
typedef struct _MidoriCompletionPrivate MidoriCompletionPrivate;

#define MIDORI_TYPE_SUGGESTION (midori_suggestion_get_type ())
#define MIDORI_SUGGESTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MIDORI_TYPE_SUGGESTION, MidoriSuggestion))
#define MIDORI_SUGGESTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MIDORI_TYPE_SUGGESTION, MidoriSuggestionClass))
#define MIDORI_IS_SUGGESTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MIDORI_TYPE_SUGGESTION))
#define MIDORI_IS_SUGGESTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MIDORI_TYPE_SUGGESTION))
#define MIDORI_SUGGESTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MIDORI_TYPE_SUGGESTION, MidoriSuggestionClass))

typedef struct _MidoriSuggestion MidoriSuggestion;
typedef struct _MidoriSuggestionClass MidoriSuggestionClass;

#define MIDORI_TYPE_SEARCH_COMPLETION (midori_search_completion_get_type ())
#define MIDORI_SEARCH_COMPLETION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MIDORI_TYPE_SEARCH_COMPLETION, MidoriSearchCompletion))
#define MIDORI_SEARCH_COMPLETION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MIDORI_TYPE_SEARCH_COMPLETION, MidoriSearchCompletionClass))
#define MIDORI_IS_SEARCH_COMPLETION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MIDORI_TYPE_SEARCH_COMPLETION))
#define MIDORI_IS_SEARCH_COMPLETION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MIDORI_TYPE_SEARCH_COMPLETION))
#define MIDORI_SEARCH_COMPLETION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MIDORI_TYPE_SEARCH_COMPLETION, MidoriSearchCompletionClass))

typedef struct _MidoriSearchCompletion MidoriSearchCompletion;
typedef struct _MidoriSearchCompletionClass MidoriSearchCompletionClass;
typedef struct _MidoriSearchCompletionPrivate MidoriSearchCompletionPrivate;
enum  {
	MIDORI_SEARCH_COMPLETION_0_PROPERTY,
	MIDORI_SEARCH_COMPLETION_NUM_PROPERTIES
};
static GParamSpec* midori_search_completion_properties[MIDORI_SEARCH_COMPLETION_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))
typedef struct _MidoriSearchCompletionCompleteData MidoriSearchCompletionCompleteData;

struct _MidoriCompletion {
	GObject parent_instance;
	MidoriCompletionPrivate * priv;
};

struct _MidoriCompletionClass {
	GObjectClass parent_class;
	void (*prepare) (MidoriCompletion* self, GObject* app);
	gboolean (*can_complete) (MidoriCompletion* self, const gchar* prefix);
	gboolean (*can_action) (MidoriCompletion* self, const gchar* action);
	void (*complete) (MidoriCompletion* self, const gchar* text, const gchar* action, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	GList* (*complete_finish) (MidoriCompletion* self, GAsyncResult* _res_);
};

struct _MidoriSearchCompletion {
	MidoriCompletion parent_instance;
	MidoriSearchCompletionPrivate * priv;
};

struct _MidoriSearchCompletionClass {
	MidoriCompletionClass parent_class;
};

struct _MidoriSearchCompletionPrivate {
	GObject* search_engines;
};

struct _MidoriSearchCompletionCompleteData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	GAsyncReadyCallback _callback_;
	gboolean _task_complete_;
	MidoriSearchCompletion* self;
	gchar* text;
	gchar* action;
	GCancellable* cancellable;
	GList* result;
	GObject* _tmp0_;
	GList* items;
	GObject* _tmp1_;
	GList* _tmp2_;
	GList* suggestions;
	guint n;
	GList* _tmp3_;
	GList* item_collection;
	GList* item_it;
	GObject* _tmp4_;
	GObject* item;
	gchar* uri;
	gchar* title;
	gchar* desc;
	GObject* _tmp5_;
	GObject* _tmp6_;
	GObject* _tmp7_;
	gchar* search_uri;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* search_title;
	const gchar* _tmp11_;
	gchar* _tmp12_;
	GIcon* icon;
	const gchar* _tmp13_;
	GCancellable* _tmp14_;
	GIcon* _tmp15_;
	gchar* _tmp16_;
	const gchar* _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	const gchar* _tmp20_;
	gchar* _tmp21_;
	gchar* _tmp22_;
	const gchar* _tmp23_;
	gchar* _tmp24_;
	gchar* search_desc;
	gchar* _tmp25_;
	gchar* background;
	gchar* _tmp26_;
	MidoriSuggestion* suggestion;
	const gchar* _tmp27_;
	const gchar* _tmp28_;
	const gchar* _tmp29_;
	GIcon* _tmp30_;
	gint _tmp31_;
	MidoriSuggestion* _tmp32_;
	MidoriSuggestion* _tmp33_;
	MidoriSuggestion* _tmp34_;
	guint _tmp35_;
	gboolean _tmp36_;
	guint _tmp37_;
	const gchar* _tmp38_;
	const gchar* _tmp39_;
	gint _tmp40_;
	MidoriSuggestion* _tmp41_;
	MidoriSuggestion* _tmp42_;
	MidoriSuggestion* _tmp43_;
	gint _tmp44_;
	gint _tmp45_;
	MidoriSuggestion* _tmp46_;
	MidoriSuggestion* _tmp47_;
	guint src;
	guint _tmp48_;
	guint _tmp49_;
	GCancellable* _tmp50_;
	gboolean _tmp51_;
};


static gpointer midori_search_completion_parent_class = NULL;

GList* katze_array_peek_items (GObject* array);
GType midori_completion_get_type (void) G_GNUC_CONST;
GType midori_suggestion_get_type (void) G_GNUC_CONST;
GType midori_search_completion_get_type (void) G_GNUC_CONST;
#define MIDORI_SEARCH_COMPLETION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MIDORI_TYPE_SEARCH_COMPLETION, MidoriSearchCompletionPrivate))
MidoriSearchCompletion* midori_search_completion_new (void);
MidoriSearchCompletion* midori_search_completion_construct (GType object_type);
static void midori_search_completion_real_prepare (MidoriCompletion* base, GObject* app);
static gboolean midori_search_completion_real_can_complete (MidoriCompletion* base, const gchar* text);
static gboolean midori_search_completion_real_can_action (MidoriCompletion* base, const gchar* action);
static void _g_object_unref0_ (gpointer var);
static inline void _g_list_free__g_object_unref0_ (GList* self);
static void midori_search_completion_real_complete_data_free (gpointer _data);
static void midori_search_completion_real_complete_async_ready_wrapper (GObject *source_object, GAsyncResult *res, void *user_data);
static void midori_search_completion_real_complete (MidoriCompletion* base, const gchar* text, const gchar* action, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean midori_search_completion_real_complete_co (MidoriSearchCompletionCompleteData* _data_);
gchar* midori_uri_for_search (const gchar* uri, const gchar* keywords);
void midori_uri_get_icon_fallback (const gchar* uri, GIcon* fallback, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
GIcon* midori_uri_get_icon_fallback_finish (GAsyncResult* _res_);
static void midori_search_completion_complete_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
MidoriSuggestion* midori_suggestion_new (const gchar* uri, const gchar* markup, gboolean use_markup, const gchar* background, GIcon* icon, gint* priority);
MidoriSuggestion* midori_suggestion_construct (GType object_type, const gchar* uri, const gchar* markup, gboolean use_markup, const gchar* background, GIcon* icon, gint* priority);
void midori_suggestion_set_action (MidoriSuggestion* self, gboolean value);
gint midori_completion_get_position (MidoriCompletion* self);
void midori_suggestion_set_priority (MidoriSuggestion* self, gint value);
void midori_completion_complete (MidoriCompletion* self, const gchar* text, const gchar* action, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
GList* midori_completion_complete_finish (MidoriCompletion* self, GAsyncResult* _res_);
static gboolean _midori_search_completion_real_complete_co_gsource_func (gpointer self);
static void midori_search_completion_finalize (GObject * obj);


MidoriSearchCompletion* midori_search_completion_construct (GType object_type) {
	MidoriSearchCompletion * self = NULL;
#line 20 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	self = (MidoriSearchCompletion*) g_object_new (object_type, "description", _ ("Search with…"), NULL);
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	return self;
#line 214 "midori-searchcompletion.c"
}


MidoriSearchCompletion* midori_search_completion_new (void) {
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	return midori_search_completion_construct (MIDORI_TYPE_SEARCH_COMPLETION);
#line 221 "midori-searchcompletion.c"
}


static void midori_search_completion_real_prepare (MidoriCompletion* base, GObject* app) {
	MidoriSearchCompletion * self;
	GObject* _tmp0_;
#line 23 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	self = (MidoriSearchCompletion*) base;
#line 23 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	g_return_if_fail (app != NULL);
#line 24 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	_tmp0_ = app;
#line 24 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	g_object_get (_tmp0_, "search-engines", &self->priv->search_engines, NULL);
#line 236 "midori-searchcompletion.c"
}


static gboolean midori_search_completion_real_can_complete (MidoriCompletion* base, const gchar* text) {
	MidoriSearchCompletion * self;
	gboolean result = FALSE;
	GObject* _tmp0_;
#line 27 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	self = (MidoriSearchCompletion*) base;
#line 27 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	g_return_val_if_fail (text != NULL, FALSE);
#line 28 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	_tmp0_ = self->priv->search_engines;
#line 28 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	result = _tmp0_ != NULL;
#line 28 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	return result;
#line 254 "midori-searchcompletion.c"
}


static gboolean midori_search_completion_real_can_action (MidoriCompletion* base, const gchar* action) {
	MidoriSearchCompletion * self;
	gboolean result = FALSE;
	const gchar* _tmp0_;
#line 31 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	self = (MidoriSearchCompletion*) base;
#line 31 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	g_return_val_if_fail (action != NULL, FALSE);
#line 32 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	_tmp0_ = action;
#line 32 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	result = g_strcmp0 (_tmp0_, "complete:more/search") == 0;
#line 32 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	return result;
#line 272 "midori-searchcompletion.c"
}


static void _g_object_unref0_ (gpointer var) {
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
#line 279 "midori-searchcompletion.c"
}


static inline void _g_list_free__g_object_unref0_ (GList* self) {
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	g_list_free_full (self, (GDestroyNotify) _g_object_unref0_);
#line 286 "midori-searchcompletion.c"
}


static void midori_search_completion_real_complete_data_free (gpointer _data) {
	MidoriSearchCompletionCompleteData* _data_;
	_data_ = _data;
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	_g_free0 (_data_->text);
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	_g_free0 (_data_->action);
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	_g_object_unref0 (_data_->cancellable);
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	__g_list_free__g_object_unref0_0 (_data_->result);
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	_g_object_unref0 (_data_->self);
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	g_slice_free (MidoriSearchCompletionCompleteData, _data_);
#line 305 "midori-searchcompletion.c"
}


static void midori_search_completion_real_complete_async_ready_wrapper (GObject *source_object, GAsyncResult *res, void *user_data) {
	MidoriSearchCompletionCompleteData* _task_data_;
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	_task_data_ = g_task_get_task_data (G_TASK (res));
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	if (_task_data_->_callback_ != NULL) {
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
		_task_data_->_callback_ (source_object, res, user_data);
#line 317 "midori-searchcompletion.c"
	}
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	_task_data_->_task_complete_ = TRUE;
#line 321 "midori-searchcompletion.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	return self ? g_object_ref (self) : NULL;
#line 328 "midori-searchcompletion.c"
}


static void midori_search_completion_real_complete (MidoriCompletion* base, const gchar* text, const gchar* action, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	MidoriSearchCompletion * self;
	MidoriSearchCompletionCompleteData* _data_;
	MidoriSearchCompletion* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	GCancellable* _tmp5_;
	GCancellable* _tmp6_;
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	self = (MidoriSearchCompletion*) base;
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	_data_ = g_slice_new0 (MidoriSearchCompletionCompleteData);
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	_data_->_callback_ = _callback_;
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, midori_search_completion_real_complete_async_ready_wrapper, _user_data_);
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	if (_callback_ == NULL) {
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
		_data_->_task_complete_ = TRUE;
#line 354 "midori-searchcompletion.c"
	}
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	g_task_set_task_data (_data_->_async_result, _data_, midori_search_completion_real_complete_data_free);
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	_data_->self = _tmp0_;
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	_tmp1_ = text;
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	_g_free0 (_data_->text);
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	_data_->text = _tmp2_;
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	_tmp3_ = action;
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	_tmp4_ = g_strdup (_tmp3_);
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	_g_free0 (_data_->action);
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	_data_->action = _tmp4_;
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	_tmp5_ = cancellable;
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	_tmp6_ = _g_object_ref0 (_tmp5_);
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	_g_object_unref0 (_data_->cancellable);
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	_data_->cancellable = _tmp6_;
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	midori_search_completion_real_complete_co (_data_);
#line 388 "midori-searchcompletion.c"
}


static GList* midori_search_completion_real_complete_finish (MidoriCompletion* base, GAsyncResult* _res_) {
	GList* result;
	MidoriSearchCompletionCompleteData* _data_;
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	if (NULL == _data_) {
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
		return NULL;
#line 401 "midori-searchcompletion.c"
	}
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	result = _data_->result;
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	_data_->result = NULL;
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	return result;
#line 409 "midori-searchcompletion.c"
}


static void midori_search_completion_complete_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	MidoriSearchCompletionCompleteData* _data_;
#line 48 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	_data_ = _user_data_;
#line 48 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	_data_->_source_object_ = source_object;
#line 48 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	_data_->_res_ = _res_;
#line 48 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	_data_->_task_complete_ = TRUE;
#line 48 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	midori_search_completion_real_complete_co (_data_);
#line 425 "midori-searchcompletion.c"
}


static gboolean _midori_search_completion_real_complete_co_gsource_func (gpointer self) {
	gboolean result;
	result = midori_search_completion_real_complete_co (self);
#line 64 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	return result;
#line 434 "midori-searchcompletion.c"
}


static gboolean midori_search_completion_real_complete_co (MidoriSearchCompletionCompleteData* _data_) {
#line 35 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	switch (_data_->_state_) {
#line 35 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
		case 0:
#line 443 "midori-searchcompletion.c"
		goto _state_0;
#line 35 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
		case 1:
#line 447 "midori-searchcompletion.c"
		goto _state_1;
#line 35 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
		case 2:
#line 451 "midori-searchcompletion.c"
		goto _state_2;
		default:
#line 35 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
		g_assert_not_reached ();
#line 456 "midori-searchcompletion.c"
	}
	_state_0:
#line 36 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	_data_->_tmp0_ = _data_->self->priv->search_engines;
#line 36 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	g_return_val_if_fail (_data_->_tmp0_ != NULL, NULL);
#line 38 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	_data_->_tmp1_ = _data_->self->priv->search_engines;
#line 38 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	_data_->_tmp2_ = katze_array_peek_items (_data_->_tmp1_);
#line 38 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	_data_->items = _data_->_tmp2_;
#line 39 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	_data_->suggestions = NULL;
#line 40 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	_data_->n = (guint) 0;
#line 41 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	_data_->_tmp3_ = _data_->items;
#line 475 "midori-searchcompletion.c"
	{
#line 41 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
		_data_->item_collection = _data_->_tmp3_;
#line 41 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
		for (_data_->item_it = _data_->item_collection; _data_->item_it != NULL; _data_->item_it = _data_->item_it->next) {
#line 41 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
			_data_->_tmp4_ = _g_object_ref0 ((GObject*) _data_->item_it->data);
#line 41 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
			_data_->item = _data_->_tmp4_;
#line 485 "midori-searchcompletion.c"
			{
#line 43 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_data_->_tmp5_ = _data_->item;
#line 43 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				g_object_get (_data_->_tmp5_, "uri", &_data_->uri, NULL);
#line 44 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_data_->_tmp6_ = _data_->item;
#line 44 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				g_object_get (_data_->_tmp6_, "name", &_data_->title, NULL);
#line 45 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_data_->_tmp7_ = _data_->item;
#line 45 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				g_object_get (_data_->_tmp7_, "text", &_data_->desc, NULL);
#line 46 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_data_->_tmp8_ = _data_->uri;
#line 46 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_data_->_tmp9_ = _data_->text;
#line 46 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_data_->_tmp10_ = midori_uri_for_search (_data_->_tmp8_, _data_->_tmp9_);
#line 46 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_data_->search_uri = _data_->_tmp10_;
#line 47 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_data_->_tmp11_ = _data_->title;
#line 47 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_data_->_tmp12_ = g_strdup_printf (_ ("Search with %s"), _data_->_tmp11_);
#line 47 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_data_->search_title = _data_->_tmp12_;
#line 48 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_data_->_tmp13_ = _data_->uri;
#line 48 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_data_->_tmp14_ = _data_->cancellable;
#line 48 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_data_->_state_ = 1;
#line 48 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				midori_uri_get_icon_fallback (_data_->_tmp13_, NULL, _data_->_tmp14_, midori_search_completion_complete_ready, _data_);
#line 48 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				return FALSE;
#line 523 "midori-searchcompletion.c"
				_state_1:
#line 48 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_data_->_tmp15_ = midori_uri_get_icon_fallback_finish (_data_->_res_);
#line 48 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_data_->icon = _data_->_tmp15_;
#line 49 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_data_->_tmp17_ = _data_->search_title;
#line 49 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_data_->_tmp18_ = g_strconcat (_data_->_tmp17_, "\n", NULL);
#line 49 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_data_->_tmp19_ = _data_->_tmp18_;
#line 49 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_data_->_tmp20_ = _data_->desc;
#line 49 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_data_->_tmp21_ = g_strconcat (_data_->_tmp19_, _data_->_tmp20_, NULL);
#line 49 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_data_->_tmp22_ = _data_->_tmp21_;
#line 49 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_g_free0 (_data_->_tmp19_);
#line 49 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_data_->_tmp16_ = _data_->_tmp22_;
#line 49 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				if (_data_->_tmp16_ == NULL) {
#line 49 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
					_data_->_tmp23_ = _data_->uri;
#line 49 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
					_data_->_tmp24_ = g_strdup (_data_->_tmp23_);
#line 49 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
					_g_free0 (_data_->_tmp16_);
#line 49 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
					_data_->_tmp16_ = _data_->_tmp24_;
#line 555 "midori-searchcompletion.c"
				}
#line 49 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_data_->_tmp25_ = _data_->_tmp16_;
#line 49 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_data_->_tmp16_ = NULL;
#line 49 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_data_->search_desc = _data_->_tmp25_;
#line 51 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_data_->_tmp26_ = g_strdup ("gray");
#line 51 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_data_->background = _data_->_tmp26_;
#line 52 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_data_->_tmp27_ = _data_->search_uri;
#line 52 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_data_->_tmp28_ = _data_->search_desc;
#line 52 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_data_->_tmp29_ = _data_->background;
#line 52 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_data_->_tmp30_ = _data_->icon;
#line 52 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_data_->_tmp31_ = 0;
#line 52 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_data_->_tmp32_ = midori_suggestion_new (_data_->_tmp27_, _data_->_tmp28_, FALSE, _data_->_tmp29_, _data_->_tmp30_, &_data_->_tmp31_);
#line 52 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_data_->suggestion = _data_->_tmp32_;
#line 53 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_data_->_tmp33_ = _data_->suggestion;
#line 53 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_data_->_tmp34_ = _g_object_ref0 (_data_->_tmp33_);
#line 53 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_data_->suggestions = g_list_append (_data_->suggestions, _data_->_tmp34_);
#line 55 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_data_->_tmp35_ = _data_->n;
#line 55 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_data_->n = _data_->_tmp35_ + 1;
#line 56 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_data_->_tmp37_ = _data_->n;
#line 56 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				if (_data_->_tmp37_ == ((guint) 3)) {
#line 56 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
					_data_->_tmp38_ = _data_->action;
#line 56 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
					_data_->_tmp36_ = _data_->_tmp38_ == NULL;
#line 599 "midori-searchcompletion.c"
				} else {
#line 56 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
					_data_->_tmp36_ = FALSE;
#line 603 "midori-searchcompletion.c"
				}
#line 56 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				if (_data_->_tmp36_) {
#line 57 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
					_data_->_tmp39_ = _data_->background;
#line 57 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
					_data_->_tmp40_ = 0;
#line 57 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
					_data_->_tmp41_ = midori_suggestion_new ("complete:more/search", _ ("Search with…"), FALSE, _data_->_tmp39_, NULL, &_data_->_tmp40_);
#line 57 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
					_g_object_unref0 (_data_->suggestion);
#line 57 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
					_data_->suggestion = _data_->_tmp41_;
#line 58 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
					_data_->_tmp42_ = _data_->suggestion;
#line 58 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
					midori_suggestion_set_action (_data_->_tmp42_, TRUE);
#line 59 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
					_data_->_tmp43_ = _data_->suggestion;
#line 59 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
					_data_->_tmp44_ = midori_completion_get_position ((MidoriCompletion*) _data_->self);
#line 59 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
					_data_->_tmp45_ = _data_->_tmp44_;
#line 59 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
					midori_suggestion_set_priority (_data_->_tmp43_, _data_->_tmp45_);
#line 60 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
					_data_->_tmp46_ = _data_->suggestion;
#line 60 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
					_data_->_tmp47_ = _g_object_ref0 (_data_->_tmp46_);
#line 60 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
					_data_->suggestions = g_list_append (_data_->suggestions, _data_->_tmp47_);
#line 61 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
					_g_object_unref0 (_data_->suggestion);
#line 61 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
					_g_free0 (_data_->background);
#line 61 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
					_g_free0 (_data_->search_desc);
#line 61 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
					_g_free0 (_data_->_tmp16_);
#line 61 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
					_g_object_unref0 (_data_->icon);
#line 61 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
					_g_free0 (_data_->search_title);
#line 61 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
					_g_free0 (_data_->search_uri);
#line 61 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
					_g_free0 (_data_->desc);
#line 61 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
					_g_free0 (_data_->title);
#line 61 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
					_g_free0 (_data_->uri);
#line 61 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
					_g_object_unref0 (_data_->item);
#line 61 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
					break;
#line 659 "midori-searchcompletion.c"
				}
#line 64 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_data_->_tmp48_ = g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _midori_search_completion_real_complete_co_gsource_func, _data_, NULL);
#line 64 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_data_->src = _data_->_tmp48_;
#line 65 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_data_->_state_ = 2;
#line 65 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				return FALSE;
#line 669 "midori-searchcompletion.c"
				_state_2:
				;
#line 66 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_data_->_tmp49_ = _data_->src;
#line 66 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				g_source_remove (_data_->_tmp49_);
#line 41 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_g_object_unref0 (_data_->suggestion);
#line 41 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_g_free0 (_data_->background);
#line 41 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_g_free0 (_data_->search_desc);
#line 41 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_g_free0 (_data_->_tmp16_);
#line 41 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_g_object_unref0 (_data_->icon);
#line 41 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_g_free0 (_data_->search_title);
#line 41 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_g_free0 (_data_->search_uri);
#line 41 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_g_free0 (_data_->desc);
#line 41 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_g_free0 (_data_->title);
#line 41 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_g_free0 (_data_->uri);
#line 41 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				_g_object_unref0 (_data_->item);
#line 698 "midori-searchcompletion.c"
			}
		}
	}
#line 69 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	_data_->_tmp50_ = _data_->cancellable;
#line 69 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	_data_->_tmp51_ = g_cancellable_is_cancelled (_data_->_tmp50_);
#line 69 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	if (_data_->_tmp51_) {
#line 70 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
		_data_->result = NULL;
#line 70 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
		__g_list_free__g_object_unref0_0 (_data_->suggestions);
#line 70 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 70 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
		if (_data_->_state_ != 0) {
#line 70 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
			while (_data_->_task_complete_ != TRUE) {
#line 70 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 720 "midori-searchcompletion.c"
			}
		}
#line 70 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
		g_object_unref (_data_->_async_result);
#line 70 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
		return FALSE;
#line 727 "midori-searchcompletion.c"
	}
#line 72 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	_data_->result = _data_->suggestions;
#line 72 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 72 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	if (_data_->_state_ != 0) {
#line 72 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
		while (_data_->_task_complete_ != TRUE) {
#line 72 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 739 "midori-searchcompletion.c"
		}
	}
#line 72 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	g_object_unref (_data_->_async_result);
#line 72 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	return FALSE;
#line 746 "midori-searchcompletion.c"
}


static void midori_search_completion_class_init (MidoriSearchCompletionClass * klass) {
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	midori_search_completion_parent_class = g_type_class_peek_parent (klass);
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	g_type_class_add_private (klass, sizeof (MidoriSearchCompletionPrivate));
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	((MidoriCompletionClass *) klass)->prepare = (void (*) (MidoriCompletion *, GObject*)) midori_search_completion_real_prepare;
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	((MidoriCompletionClass *) klass)->can_complete = (gboolean (*) (MidoriCompletion *, const gchar*)) midori_search_completion_real_can_complete;
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	((MidoriCompletionClass *) klass)->can_action = (gboolean (*) (MidoriCompletion *, const gchar*)) midori_search_completion_real_can_action;
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	((MidoriCompletionClass *) klass)->complete = (void (*) (MidoriCompletion *, const gchar*, const gchar*, GCancellable*, GAsyncReadyCallback, gpointer)) midori_search_completion_real_complete;
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	((MidoriCompletionClass *) klass)->complete_finish = (GList* (*) (MidoriCompletion *, GAsyncResult*)) midori_search_completion_real_complete_finish;
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	G_OBJECT_CLASS (klass)->finalize = midori_search_completion_finalize;
#line 767 "midori-searchcompletion.c"
}


static void midori_search_completion_instance_init (MidoriSearchCompletion * self) {
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	self->priv = MIDORI_SEARCH_COMPLETION_GET_PRIVATE (self);
#line 774 "midori-searchcompletion.c"
}


static void midori_search_completion_finalize (GObject * obj) {
	MidoriSearchCompletion * self;
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, MIDORI_TYPE_SEARCH_COMPLETION, MidoriSearchCompletion);
#line 17 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	_g_object_unref0 (self->priv->search_engines);
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/midori/midori-searchcompletion.vala"
	G_OBJECT_CLASS (midori_search_completion_parent_class)->finalize (obj);
#line 786 "midori-searchcompletion.c"
}


GType midori_search_completion_get_type (void) {
	static volatile gsize midori_search_completion_type_id__volatile = 0;
	if (g_once_init_enter (&midori_search_completion_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (MidoriSearchCompletionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) midori_search_completion_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (MidoriSearchCompletion), 0, (GInstanceInitFunc) midori_search_completion_instance_init, NULL };
		GType midori_search_completion_type_id;
		midori_search_completion_type_id = g_type_register_static (MIDORI_TYPE_COMPLETION, "MidoriSearchCompletion", &g_define_type_info, 0);
		g_once_init_leave (&midori_search_completion_type_id__volatile, midori_search_completion_type_id);
	}
	return midori_search_completion_type_id__volatile;
}



