/* midori-viewcompletion.c generated by valac 0.26.2, the Vala compiler
 * generated from midori-viewcompletion.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>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gtk/gtk.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_VIEW_COMPLETION (midori_view_completion_get_type ())
#define MIDORI_VIEW_COMPLETION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MIDORI_TYPE_VIEW_COMPLETION, MidoriViewCompletion))
#define MIDORI_VIEW_COMPLETION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MIDORI_TYPE_VIEW_COMPLETION, MidoriViewCompletionClass))
#define MIDORI_IS_VIEW_COMPLETION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MIDORI_TYPE_VIEW_COMPLETION))
#define MIDORI_IS_VIEW_COMPLETION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MIDORI_TYPE_VIEW_COMPLETION))
#define MIDORI_VIEW_COMPLETION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MIDORI_TYPE_VIEW_COMPLETION, MidoriViewCompletionClass))

typedef struct _MidoriViewCompletion MidoriViewCompletion;
typedef struct _MidoriViewCompletionClass MidoriViewCompletionClass;
typedef struct _MidoriViewCompletionPrivate MidoriViewCompletionPrivate;
#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 _MidoriViewCompletionCompleteData MidoriViewCompletionCompleteData;

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 _MidoriViewCompletion {
	MidoriCompletion parent_instance;
	MidoriViewCompletionPrivate * priv;
};

struct _MidoriViewCompletionClass {
	MidoriCompletionClass parent_class;
};

struct _MidoriViewCompletionPrivate {
	GObject* app;
	GObject* browsers;
};

struct _MidoriViewCompletionCompleteData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	MidoriViewCompletion* self;
	gchar* text;
	gchar* action;
	GCancellable* cancellable;
	GList* result;
	GObject* _tmp0_;
	GList* browsers_list;
	GObject* _tmp1_;
	GList* _tmp2_;
	GList* suggestions;
	guint n;
	gchar* key;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	GList* _tmp5_;
	GList* browser_collection;
	GList* browser_it;
	GObject* _tmp6_;
	GObject* browser;
	GObject* current_browser;
	GObject* _tmp7_;
	GObject* _tmp8_;
	GObject* _tmp9_;
	GObject* items;
	GObject* _tmp10_;
	GList* items_list;
	GObject* _tmp11_;
	GList* _tmp12_;
	GList* _tmp13_;
	GList* item_collection;
	GList* item_it;
	GObject* _tmp14_;
	GObject* item;
	gchar* uri;
	gchar* title;
	GObject* _tmp15_;
	GObject* _tmp16_;
	gboolean _tmp17_;
	const gchar* _tmp18_;
	const gchar* _tmp19_;
	const gchar* _tmp20_;
	const gchar* _tmp21_;
	gboolean _tmp22_;
	const gchar* _tmp23_;
	gchar* _tmp24_;
	gchar* _tmp25_;
	const gchar* _tmp26_;
	gboolean _tmp27_;
	gboolean _tmp28_;
	const gchar* _tmp29_;
	gchar* _tmp30_;
	gchar* _tmp31_;
	const gchar* _tmp32_;
	gboolean _tmp33_;
	GdkPixbuf* icon;
	const gchar* _tmp34_;
	GdkPixbuf* _tmp35_;
	gchar* background;
	gchar* _tmp36_;
	MidoriSuggestion* suggestion;
	const gchar* _tmp37_;
	const gchar* _tmp38_;
	const gchar* _tmp39_;
	GdkPixbuf* _tmp40_;
	gint _tmp41_;
	gint _tmp42_;
	MidoriSuggestion* _tmp43_;
	MidoriSuggestion* _tmp44_;
	MidoriSuggestion* _tmp45_;
	guint _tmp46_;
	gboolean _tmp47_;
	guint _tmp48_;
	const gchar* _tmp49_;
	const gchar* _tmp50_;
	const gchar* _tmp51_;
	gint _tmp52_;
	MidoriSuggestion* _tmp53_;
	MidoriSuggestion* _tmp54_;
	MidoriSuggestion* _tmp55_;
	MidoriSuggestion* _tmp56_;
	guint src;
	guint _tmp57_;
	guint _tmp58_;
	GCancellable* _tmp59_;
	gboolean _tmp60_;
};


static gpointer midori_view_completion_parent_class = NULL;

GType midori_completion_get_type (void) G_GNUC_CONST;
GType midori_suggestion_get_type (void) G_GNUC_CONST;
GType midori_view_completion_get_type (void) G_GNUC_CONST;
#define MIDORI_VIEW_COMPLETION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MIDORI_TYPE_VIEW_COMPLETION, MidoriViewCompletionPrivate))
enum  {
	MIDORI_VIEW_COMPLETION_DUMMY_PROPERTY
};
MidoriViewCompletion* midori_view_completion_new (void);
MidoriViewCompletion* midori_view_completion_construct (GType object_type);
static void midori_view_completion_real_prepare (MidoriCompletion* base, GObject* app);
static gboolean midori_view_completion_real_can_complete (MidoriCompletion* base, const gchar* text);
static gboolean midori_view_completion_real_can_action (MidoriCompletion* base, const gchar* action);
static void _g_object_unref0_ (gpointer var);
static void _g_list_free__g_object_unref0_ (GList* self);
static void midori_view_completion_real_complete_data_free (gpointer _data);
static void midori_view_completion_real_complete (MidoriCompletion* base, const gchar* text, const gchar* action, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean midori_view_completion_real_complete_co (MidoriViewCompletionCompleteData* _data_);
GList* katze_array_peek_items (GObject* array);
GdkPixbuf* midori_paths_get_icon (const gchar* uri, GtkWidget* widget);
gint midori_completion_get_position (MidoriCompletion* self);
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);
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_view_completion_real_complete_co_gsource_func (gpointer self);
static void midori_view_completion_finalize (GObject* obj);


MidoriViewCompletion* midori_view_completion_construct (GType object_type) {
	MidoriViewCompletion * self = NULL;
	const gchar* _tmp0_ = NULL;
#line 18 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_tmp0_ = _ ("Open tabs");
#line 18 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	self = (MidoriViewCompletion*) g_object_new (object_type, "description", _tmp0_, NULL);
#line 17 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	return self;
#line 223 "midori-viewcompletion.c"
}


MidoriViewCompletion* midori_view_completion_new (void) {
#line 17 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	return midori_view_completion_construct (MIDORI_TYPE_VIEW_COMPLETION);
#line 230 "midori-viewcompletion.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	return self ? g_object_ref (self) : NULL;
#line 237 "midori-viewcompletion.c"
}


static void midori_view_completion_real_prepare (MidoriCompletion* base, GObject* app) {
	MidoriViewCompletion * self;
	GObject* _tmp0_ = NULL;
	GObject* _tmp1_ = NULL;
	GObject* _tmp2_ = NULL;
#line 21 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	self = (MidoriViewCompletion*) base;
#line 21 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	g_return_if_fail (app != NULL);
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_tmp0_ = app;
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_g_object_unref0 (self->priv->app);
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	self->priv->app = _tmp1_;
#line 23 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_tmp2_ = app;
#line 23 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	g_object_get (_tmp2_, "browsers", &self->priv->browsers, NULL);
#line 262 "midori-viewcompletion.c"
}


static gboolean midori_view_completion_real_can_complete (MidoriCompletion* base, const gchar* text) {
	MidoriViewCompletion * self;
	gboolean result = FALSE;
	GObject* _tmp0_ = NULL;
#line 26 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	self = (MidoriViewCompletion*) base;
#line 26 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	g_return_val_if_fail (text != NULL, FALSE);
#line 27 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_tmp0_ = self->priv->browsers;
#line 27 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	result = _tmp0_ != NULL;
#line 27 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	return result;
#line 280 "midori-viewcompletion.c"
}


static gboolean midori_view_completion_real_can_action (MidoriCompletion* base, const gchar* action) {
	MidoriViewCompletion * self;
	gboolean result = FALSE;
	const gchar* _tmp0_ = NULL;
#line 30 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	self = (MidoriViewCompletion*) base;
#line 30 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	g_return_val_if_fail (action != NULL, FALSE);
#line 31 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_tmp0_ = action;
#line 31 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	result = g_strcmp0 (_tmp0_, "complete:more/views") == 0;
#line 31 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	return result;
#line 298 "midori-viewcompletion.c"
}


static void _g_object_unref0_ (gpointer var) {
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
#line 305 "midori-viewcompletion.c"
}


static void _g_list_free__g_object_unref0_ (GList* self) {
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	g_list_foreach (self, (GFunc) _g_object_unref0_, NULL);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	g_list_free (self);
#line 314 "midori-viewcompletion.c"
}


static void midori_view_completion_real_complete_data_free (gpointer _data) {
	MidoriViewCompletionCompleteData* _data_;
	_data_ = _data;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_g_free0 (_data_->text);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_g_free0 (_data_->action);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_g_object_unref0 (_data_->cancellable);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	__g_list_free__g_object_unref0_0 (_data_->result);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_g_object_unref0 (_data_->self);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	g_slice_free (MidoriViewCompletionCompleteData, _data_);
#line 333 "midori-viewcompletion.c"
}


static void midori_view_completion_real_complete (MidoriCompletion* base, const gchar* text, const gchar* action, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	MidoriViewCompletion * self;
	MidoriViewCompletionCompleteData* _data_;
	MidoriViewCompletion* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	GCancellable* _tmp5_ = NULL;
	GCancellable* _tmp6_ = NULL;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	self = (MidoriViewCompletion*) base;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_data_ = g_slice_new0 (MidoriViewCompletionCompleteData);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, midori_view_completion_real_complete);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, midori_view_completion_real_complete_data_free);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_data_->self = _tmp0_;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_tmp1_ = text;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_g_free0 (_data_->text);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_data_->text = _tmp2_;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_tmp3_ = action;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_tmp4_ = g_strdup (_tmp3_);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_g_free0 (_data_->action);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_data_->action = _tmp4_;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_tmp5_ = cancellable;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_tmp6_ = _g_object_ref0 (_tmp5_);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_g_object_unref0 (_data_->cancellable);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_data_->cancellable = _tmp6_;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	midori_view_completion_real_complete_co (_data_);
#line 385 "midori-viewcompletion.c"
}


static GList* midori_view_completion_real_complete_finish (MidoriCompletion* base, GAsyncResult* _res_) {
	GList* result;
	MidoriViewCompletionCompleteData* _data_;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	result = _data_->result;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_data_->result = NULL;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	return result;
#line 400 "midori-viewcompletion.c"
}


static gboolean string_contains (const gchar* self, const gchar* needle) {
	gboolean result = FALSE;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 1278 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, FALSE);
#line 1278 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	g_return_val_if_fail (needle != NULL, FALSE);
#line 1279 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp0_ = needle;
#line 1279 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp1_ = strstr ((gchar*) self, (gchar*) _tmp0_);
#line 1279 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	result = _tmp1_ != NULL;
#line 1279 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	return result;
#line 420 "midori-viewcompletion.c"
}


static gboolean _midori_view_completion_real_complete_co_gsource_func (gpointer self) {
	gboolean result;
	result = midori_view_completion_real_complete_co (self);
#line 86 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	return result;
#line 429 "midori-viewcompletion.c"
}


static gboolean midori_view_completion_real_complete_co (MidoriViewCompletionCompleteData* _data_) {
#line 34 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	switch (_data_->_state_) {
#line 34 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
		case 0:
#line 438 "midori-viewcompletion.c"
		goto _state_0;
#line 34 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
		case 1:
#line 442 "midori-viewcompletion.c"
		goto _state_1;
		default:
#line 34 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
		g_assert_not_reached ();
#line 447 "midori-viewcompletion.c"
	}
	_state_0:
#line 35 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_data_->_tmp0_ = NULL;
#line 35 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_data_->_tmp0_ = _data_->self->priv->browsers;
#line 35 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	g_return_val_if_fail (_data_->_tmp0_ != NULL, NULL);
#line 37 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_data_->_tmp1_ = NULL;
#line 37 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_data_->_tmp1_ = _data_->self->priv->browsers;
#line 37 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_data_->_tmp2_ = NULL;
#line 37 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_data_->_tmp2_ = katze_array_peek_items (_data_->_tmp1_);
#line 37 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_data_->browsers_list = _data_->_tmp2_;
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_data_->suggestions = NULL;
#line 39 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_data_->n = (guint) 0;
#line 40 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_data_->_tmp3_ = NULL;
#line 40 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_data_->_tmp3_ = _data_->text;
#line 40 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_data_->_tmp4_ = NULL;
#line 40 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_data_->_tmp4_ = g_utf8_casefold (_data_->_tmp3_, (gssize) (-1));
#line 40 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_data_->key = _data_->_tmp4_;
#line 41 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_data_->_tmp5_ = NULL;
#line 41 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_data_->_tmp5_ = _data_->browsers_list;
#line 484 "midori-viewcompletion.c"
	{
#line 41 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
		_data_->browser_collection = _data_->_tmp5_;
#line 41 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
		for (_data_->browser_it = _data_->browser_collection; _data_->browser_it != NULL; _data_->browser_it = _data_->browser_it->next) {
#line 41 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
			_data_->_tmp6_ = NULL;
#line 41 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
			_data_->_tmp6_ = _g_object_ref0 ((GObject*) _data_->browser_it->data);
#line 41 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
			_data_->browser = _data_->_tmp6_;
#line 496 "midori-viewcompletion.c"
			{
#line 44 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
				_data_->_tmp7_ = NULL;
#line 44 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
				_data_->_tmp7_ = _data_->self->priv->app;
#line 44 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
				g_object_get (_data_->_tmp7_, "browser", &_data_->current_browser, NULL);
#line 45 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
				_data_->_tmp8_ = NULL;
#line 45 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
				_data_->_tmp8_ = _data_->browser;
#line 45 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
				_data_->_tmp9_ = NULL;
#line 45 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
				_data_->_tmp9_ = _data_->current_browser;
#line 45 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
				if (_data_->_tmp8_ != _data_->_tmp9_) {
#line 46 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
					_g_object_unref0 (_data_->current_browser);
#line 46 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
					_g_object_unref0 (_data_->browser);
#line 46 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
					continue;
#line 520 "midori-viewcompletion.c"
				}
#line 49 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
				_data_->_tmp10_ = NULL;
#line 49 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
				_data_->_tmp10_ = _data_->browser;
#line 49 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
				g_object_get (_data_->_tmp10_, "proxy-items", &_data_->items, NULL);
#line 50 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
				_data_->_tmp11_ = NULL;
#line 50 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
				_data_->_tmp11_ = _data_->items;
#line 50 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
				_data_->_tmp12_ = NULL;
#line 50 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
				_data_->_tmp12_ = katze_array_peek_items (_data_->_tmp11_);
#line 50 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
				_data_->items_list = _data_->_tmp12_;
#line 52 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
				_data_->_tmp13_ = NULL;
#line 52 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
				_data_->_tmp13_ = _data_->items_list;
#line 542 "midori-viewcompletion.c"
				{
#line 52 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
					_data_->item_collection = _data_->_tmp13_;
#line 52 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
					for (_data_->item_it = _data_->item_collection; _data_->item_it != NULL; _data_->item_it = _data_->item_it->next) {
#line 52 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
						_data_->_tmp14_ = NULL;
#line 52 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
						_data_->_tmp14_ = _g_object_ref0 ((GObject*) _data_->item_it->data);
#line 52 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
						_data_->item = _data_->_tmp14_;
#line 554 "midori-viewcompletion.c"
						{
#line 54 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp15_ = NULL;
#line 54 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp15_ = _data_->item;
#line 54 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							g_object_get (_data_->_tmp15_, "uri", &_data_->uri, NULL);
#line 55 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp16_ = NULL;
#line 55 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp16_ = _data_->item;
#line 55 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							g_object_get (_data_->_tmp16_, "name", &_data_->title, NULL);
#line 58 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp18_ = NULL;
#line 58 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp18_ = _data_->uri;
#line 58 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							if (g_strcmp0 (_data_->_tmp18_, "about:dial") == 0) {
#line 58 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_data_->_tmp17_ = TRUE;
#line 576 "midori-viewcompletion.c"
							} else {
#line 58 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_data_->_tmp19_ = NULL;
#line 58 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_data_->_tmp19_ = _data_->uri;
#line 58 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_data_->_tmp17_ = g_strcmp0 (_data_->_tmp19_, "about:blank") == 0;
#line 584 "midori-viewcompletion.c"
							}
#line 58 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							if (_data_->_tmp17_) {
#line 59 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_g_free0 (_data_->title);
#line 59 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_g_free0 (_data_->uri);
#line 59 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_g_object_unref0 (_data_->item);
#line 59 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								continue;
#line 596 "midori-viewcompletion.c"
							}
#line 61 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp20_ = NULL;
#line 61 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp20_ = _data_->uri;
#line 61 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							if (_data_->_tmp20_ == NULL) {
#line 62 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								g_warning ("midori-viewcompletion.vala:62: item.uri != null");
#line 63 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_g_free0 (_data_->title);
#line 63 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_g_free0 (_data_->uri);
#line 63 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_g_object_unref0 (_data_->item);
#line 63 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								continue;
#line 614 "midori-viewcompletion.c"
							}
#line 65 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp21_ = NULL;
#line 65 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp21_ = _data_->title;
#line 65 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							if (_data_->_tmp21_ == NULL) {
#line 66 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								g_warning ("midori-viewcompletion.vala:66: item.name != null");
#line 67 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_g_free0 (_data_->title);
#line 67 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_g_free0 (_data_->uri);
#line 67 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_g_object_unref0 (_data_->item);
#line 67 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								continue;
#line 632 "midori-viewcompletion.c"
							}
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp23_ = NULL;
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp23_ = _data_->uri;
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp24_ = NULL;
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp24_ = g_utf8_casefold (_data_->_tmp23_, (gssize) (-1));
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp25_ = NULL;
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp25_ = _data_->_tmp24_;
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp26_ = NULL;
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp26_ = _data_->key;
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp27_ = FALSE;
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp27_ = string_contains (_data_->_tmp25_, _data_->_tmp26_);
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp28_ = FALSE;
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp28_ = _data_->_tmp27_;
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_g_free0 (_data_->_tmp25_);
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							if (_data_->_tmp28_) {
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_data_->_tmp22_ = TRUE;
#line 664 "midori-viewcompletion.c"
							} else {
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_data_->_tmp29_ = NULL;
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_data_->_tmp29_ = _data_->title;
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_data_->_tmp30_ = NULL;
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_data_->_tmp30_ = g_utf8_casefold (_data_->_tmp29_, (gssize) (-1));
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_data_->_tmp31_ = NULL;
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_data_->_tmp31_ = _data_->_tmp30_;
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_data_->_tmp32_ = NULL;
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_data_->_tmp32_ = _data_->key;
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_data_->_tmp33_ = FALSE;
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_data_->_tmp33_ = string_contains (_data_->_tmp31_, _data_->_tmp32_);
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_data_->_tmp22_ = _data_->_tmp33_;
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_g_free0 (_data_->_tmp31_);
#line 690 "midori-viewcompletion.c"
							}
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							if (!_data_->_tmp22_) {
#line 70 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_g_free0 (_data_->title);
#line 70 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_g_free0 (_data_->uri);
#line 70 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_g_object_unref0 (_data_->item);
#line 70 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								continue;
#line 702 "midori-viewcompletion.c"
							}
#line 72 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp34_ = NULL;
#line 72 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp34_ = _data_->uri;
#line 72 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp35_ = NULL;
#line 72 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp35_ = midori_paths_get_icon (_data_->_tmp34_, NULL);
#line 72 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->icon = _data_->_tmp35_;
#line 74 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp36_ = NULL;
#line 74 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp36_ = g_strdup ("gray");
#line 74 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->background = _data_->_tmp36_;
#line 75 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp37_ = NULL;
#line 75 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp37_ = _data_->uri;
#line 75 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp38_ = NULL;
#line 75 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp38_ = _data_->title;
#line 75 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp39_ = NULL;
#line 75 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp39_ = _data_->background;
#line 75 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp40_ = NULL;
#line 75 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp40_ = _data_->icon;
#line 75 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp41_ = 0;
#line 75 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp41_ = midori_completion_get_position ((MidoriCompletion*) _data_->self);
#line 75 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp42_ = 0;
#line 75 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp42_ = _data_->_tmp41_;
#line 75 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp43_ = NULL;
#line 75 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp43_ = midori_suggestion_new (_data_->_tmp37_, _data_->_tmp38_, TRUE, _data_->_tmp39_, (GIcon*) _data_->_tmp40_, &_data_->_tmp42_);
#line 75 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->suggestion = _data_->_tmp43_;
#line 76 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp44_ = NULL;
#line 76 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp44_ = _data_->suggestion;
#line 76 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp45_ = NULL;
#line 76 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp45_ = _g_object_ref0 (_data_->_tmp44_);
#line 76 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->suggestions = g_list_append (_data_->suggestions, _data_->_tmp45_);
#line 78 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp46_ = 0U;
#line 78 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp46_ = _data_->n;
#line 78 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->n = _data_->_tmp46_ + 1;
#line 79 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp48_ = 0U;
#line 79 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp48_ = _data_->n;
#line 79 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							if (_data_->_tmp48_ == ((guint) 3)) {
#line 79 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_data_->_tmp49_ = NULL;
#line 79 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_data_->_tmp49_ = _data_->action;
#line 79 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_data_->_tmp47_ = _data_->_tmp49_ == NULL;
#line 778 "midori-viewcompletion.c"
							} else {
#line 79 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_data_->_tmp47_ = FALSE;
#line 782 "midori-viewcompletion.c"
							}
#line 79 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							if (_data_->_tmp47_) {
#line 80 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_data_->_tmp50_ = NULL;
#line 80 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_data_->_tmp50_ = _ ("More open tabs…");
#line 80 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_data_->_tmp51_ = NULL;
#line 80 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_data_->_tmp51_ = _data_->background;
#line 80 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_data_->_tmp52_ = 0;
#line 80 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_data_->_tmp52_ = 0;
#line 80 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_data_->_tmp53_ = NULL;
#line 80 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_data_->_tmp53_ = midori_suggestion_new ("complete:more/views", _data_->_tmp50_, FALSE, _data_->_tmp51_, NULL, &_data_->_tmp52_);
#line 80 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_g_object_unref0 (_data_->suggestion);
#line 80 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_data_->suggestion = _data_->_tmp53_;
#line 81 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_data_->_tmp54_ = NULL;
#line 81 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_data_->_tmp54_ = _data_->suggestion;
#line 81 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								midori_suggestion_set_action (_data_->_tmp54_, TRUE);
#line 82 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_data_->_tmp55_ = NULL;
#line 82 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_data_->_tmp55_ = _data_->suggestion;
#line 82 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_data_->_tmp56_ = NULL;
#line 82 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_data_->_tmp56_ = _g_object_ref0 (_data_->_tmp55_);
#line 82 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_data_->suggestions = g_list_append (_data_->suggestions, _data_->_tmp56_);
#line 83 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_g_object_unref0 (_data_->suggestion);
#line 83 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_g_free0 (_data_->background);
#line 83 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_g_object_unref0 (_data_->icon);
#line 83 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_g_free0 (_data_->title);
#line 83 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_g_free0 (_data_->uri);
#line 83 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								_g_object_unref0 (_data_->item);
#line 83 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
								break;
#line 836 "midori-viewcompletion.c"
							}
#line 86 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp57_ = 0U;
#line 86 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp57_ = g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _midori_view_completion_real_complete_co_gsource_func, _data_, NULL);
#line 86 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->src = _data_->_tmp57_;
#line 87 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_state_ = 1;
#line 87 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							return FALSE;
#line 848 "midori-viewcompletion.c"
							_state_1:
							;
#line 88 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp58_ = 0U;
#line 88 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_data_->_tmp58_ = _data_->src;
#line 88 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							g_source_remove (_data_->_tmp58_);
#line 52 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_g_object_unref0 (_data_->suggestion);
#line 52 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_g_free0 (_data_->background);
#line 52 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_g_object_unref0 (_data_->icon);
#line 52 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_g_free0 (_data_->title);
#line 52 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_g_free0 (_data_->uri);
#line 52 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
							_g_object_unref0 (_data_->item);
#line 869 "midori-viewcompletion.c"
						}
					}
				}
#line 41 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
				_g_object_unref0 (_data_->items);
#line 41 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
				_g_object_unref0 (_data_->current_browser);
#line 41 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
				_g_object_unref0 (_data_->browser);
#line 879 "midori-viewcompletion.c"
			}
		}
	}
#line 92 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_data_->_tmp59_ = NULL;
#line 92 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_data_->_tmp59_ = _data_->cancellable;
#line 92 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_data_->_tmp60_ = FALSE;
#line 92 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_data_->_tmp60_ = g_cancellable_is_cancelled (_data_->_tmp59_);
#line 92 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	if (_data_->_tmp60_) {
#line 93 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
		_data_->result = NULL;
#line 93 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
		_g_free0 (_data_->key);
#line 93 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
		__g_list_free__g_object_unref0_0 (_data_->suggestions);
#line 93 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
		if (_data_->_state_ == 0) {
#line 93 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 903 "midori-viewcompletion.c"
		} else {
#line 93 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 907 "midori-viewcompletion.c"
		}
#line 93 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
		g_object_unref (_data_->_async_result);
#line 93 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
		return FALSE;
#line 913 "midori-viewcompletion.c"
	}
#line 95 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_data_->result = _data_->suggestions;
#line 95 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_g_free0 (_data_->key);
#line 95 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	if (_data_->_state_ == 0) {
#line 95 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 923 "midori-viewcompletion.c"
	} else {
#line 95 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 927 "midori-viewcompletion.c"
	}
#line 95 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	g_object_unref (_data_->_async_result);
#line 95 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	return FALSE;
#line 34 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_g_free0 (_data_->key);
#line 34 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	__g_list_free__g_object_unref0_0 (_data_->suggestions);
#line 34 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	if (_data_->_state_ == 0) {
#line 34 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 941 "midori-viewcompletion.c"
	} else {
#line 34 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 945 "midori-viewcompletion.c"
	}
#line 34 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	g_object_unref (_data_->_async_result);
#line 34 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	return FALSE;
#line 951 "midori-viewcompletion.c"
}


static void midori_view_completion_class_init (MidoriViewCompletionClass * klass) {
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	midori_view_completion_parent_class = g_type_class_peek_parent (klass);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	g_type_class_add_private (klass, sizeof (MidoriViewCompletionPrivate));
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	((MidoriCompletionClass *) klass)->prepare = midori_view_completion_real_prepare;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	((MidoriCompletionClass *) klass)->can_complete = midori_view_completion_real_can_complete;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	((MidoriCompletionClass *) klass)->can_action = midori_view_completion_real_can_action;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	((MidoriCompletionClass *) klass)->complete = midori_view_completion_real_complete;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	((MidoriCompletionClass *) klass)->complete_finish = midori_view_completion_real_complete_finish;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	G_OBJECT_CLASS (klass)->finalize = midori_view_completion_finalize;
#line 972 "midori-viewcompletion.c"
}


static void midori_view_completion_instance_init (MidoriViewCompletion * self) {
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	self->priv = MIDORI_VIEW_COMPLETION_GET_PRIVATE (self);
#line 979 "midori-viewcompletion.c"
}


static void midori_view_completion_finalize (GObject* obj) {
	MidoriViewCompletion * self;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, MIDORI_TYPE_VIEW_COMPLETION, MidoriViewCompletion);
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_g_object_unref0 (self->priv->app);
#line 15 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	_g_object_unref0 (self->priv->browsers);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-viewcompletion.vala"
	G_OBJECT_CLASS (midori_view_completion_parent_class)->finalize (obj);
#line 993 "midori-viewcompletion.c"
}


GType midori_view_completion_get_type (void) {
	static volatile gsize midori_view_completion_type_id__volatile = 0;
	if (g_once_init_enter (&midori_view_completion_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (MidoriViewCompletionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) midori_view_completion_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (MidoriViewCompletion), 0, (GInstanceInitFunc) midori_view_completion_instance_init, NULL };
		GType midori_view_completion_type_id;
		midori_view_completion_type_id = g_type_register_static (MIDORI_TYPE_COMPLETION, "MidoriViewCompletion", &g_define_type_info, 0);
		g_once_init_leave (&midori_view_completion_type_id__volatile, midori_view_completion_type_id);
	}
	return midori_view_completion_type_id__volatile;
}



