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

/*
   Copyright (C) 2013 André Stösel <andre@stoesel.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 "midori/midori-app.h"
#include "tabby.h"
#include "katze/katze.h"
#include "midori/midori-browser.h"
#include <gtk/gtk.h>
#include <float.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "midori/midori-view.h"
#include <gdk/gdk.h>
#include "midori/midori-websettings.h"
#include "midori-core.h"
#include "webkit/webkit.h"
#include <glib/gi18n-lib.h>
#include "midori/midori-array.h"
#include "midori/midori-extension.h"
#include "midori/sokoke.h"

#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define __g_slist_free__g_free0_0(var) ((var == NULL) ? NULL : (var = (_g_slist_free__g_free0_ (var), NULL)))
typedef struct _Block1Data Block1Data;
#define _g_ptr_array_unref0(var) ((var == NULL) ? NULL : (var = (g_ptr_array_unref (var), NULL)))
typedef struct _Block2Data Block2Data;

#define TABBY_LOCAL_TYPE_SESSION (tabby_local_session_get_type ())
#define TABBY_LOCAL_SESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TABBY_LOCAL_TYPE_SESSION, TabbyLocalSession))
#define TABBY_LOCAL_SESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TABBY_LOCAL_TYPE_SESSION, TabbyLocalSessionClass))
#define TABBY_LOCAL_IS_SESSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TABBY_LOCAL_TYPE_SESSION))
#define TABBY_LOCAL_IS_SESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TABBY_LOCAL_TYPE_SESSION))
#define TABBY_LOCAL_SESSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TABBY_LOCAL_TYPE_SESSION, TabbyLocalSessionClass))

typedef struct _TabbyLocalSession TabbyLocalSession;
typedef struct _TabbyLocalSessionClass TabbyLocalSessionClass;
typedef struct _TabbyLocalSessionPrivate TabbyLocalSessionPrivate;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL)))

#define TABBY_LOCAL_TYPE_STORAGE (tabby_local_storage_get_type ())
#define TABBY_LOCAL_STORAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TABBY_LOCAL_TYPE_STORAGE, TabbyLocalStorage))
#define TABBY_LOCAL_STORAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TABBY_LOCAL_TYPE_STORAGE, TabbyLocalStorageClass))
#define TABBY_LOCAL_IS_STORAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TABBY_LOCAL_TYPE_STORAGE))
#define TABBY_LOCAL_IS_STORAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TABBY_LOCAL_TYPE_STORAGE))
#define TABBY_LOCAL_STORAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TABBY_LOCAL_TYPE_STORAGE, TabbyLocalStorageClass))

typedef struct _TabbyLocalStorage TabbyLocalStorage;
typedef struct _TabbyLocalStorageClass TabbyLocalStorageClass;
typedef struct _TabbyLocalStoragePrivate TabbyLocalStoragePrivate;
typedef struct _Block3Data Block3Data;

#define TABBY_TYPE_MANAGER (tabby_manager_get_type ())
#define TABBY_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TABBY_TYPE_MANAGER, TabbyManager))
#define TABBY_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TABBY_TYPE_MANAGER, TabbyManagerClass))
#define TABBY_IS_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TABBY_TYPE_MANAGER))
#define TABBY_IS_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TABBY_TYPE_MANAGER))
#define TABBY_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TABBY_TYPE_MANAGER, TabbyManagerClass))

typedef struct _TabbyManager TabbyManager;
typedef struct _TabbyManagerClass TabbyManagerClass;
typedef struct _TabbyManagerPrivate TabbyManagerPrivate;
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _TabbyBaseStoragePrivate {
	MidoriApp* _app;
};

struct _TabbyBaseSessionPrivate {
	MidoriBrowser* _browser;
	TabbySessionState _state;
};

struct _Block1Data {
	int _ref_count_;
	TabbyBaseSession* self;
	GList* items;
	GList* u_items;
	gboolean delay;
	gboolean should_delay;
	MidoriBrowser* browser;
};

struct _Block2Data {
	int _ref_count_;
	TabbyBaseSession* self;
	MidoriView* view;
};

struct _TabbyLocalSession {
	TabbyBaseSession parent_instance;
	TabbyLocalSessionPrivate * priv;
};

struct _TabbyLocalSessionClass {
	TabbyBaseSessionClass parent_class;
};

struct _TabbyLocalSessionPrivate {
	gint64 _id;
	MidoriDatabase* database;
};

struct _TabbyLocalStorage {
	TabbyBaseStorage parent_instance;
	TabbyLocalStoragePrivate * priv;
};

struct _TabbyLocalStorageClass {
	TabbyBaseStorageClass parent_class;
};

struct _TabbyLocalStoragePrivate {
	MidoriDatabase* database;
};

struct _Block3Data {
	int _ref_count_;
	TabbyLocalStorage* self;
	KatzeArray* tabs;
};

struct _TabbyManager {
	MidoriExtension parent_instance;
	TabbyManagerPrivate * priv;
};

struct _TabbyManagerClass {
	MidoriExtensionClass parent_class;
};

struct _TabbyManagerPrivate {
	TabbyBaseStorage* storage;
};


extern gint tabby_IDLE_RESTORE_COUNT;
gint tabby_IDLE_RESTORE_COUNT = 13;
extern MidoriApp* tabby_APP;
MidoriApp* tabby_APP = NULL;
static gpointer tabby_base_storage_parent_class = NULL;
static TabbyIStorageIface* tabby_base_storage_tabby_istorage_parent_iface = NULL;
static gpointer tabby_base_session_parent_class = NULL;
static TabbyISessionIface* tabby_base_session_tabby_isession_parent_iface = NULL;
static gpointer tabby_local_session_parent_class = NULL;
static gpointer tabby_local_storage_parent_class = NULL;
static gpointer tabby_manager_parent_class = NULL;

#define TABBY_BASE_STORAGE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TABBY_BASE_TYPE_STORAGE, TabbyBaseStoragePrivate))
enum  {
	TABBY_BASE_STORAGE_DUMMY_PROPERTY,
	TABBY_BASE_STORAGE_APP
};
static KatzeArray* tabby_base_storage_real_get_saved_sessions (TabbyBaseStorage* self);
static TabbyBaseSession* tabby_base_storage_real_get_new_session (TabbyBaseStorage* self);
static void tabby_base_storage_init_sessions (TabbyBaseStorage* self, KatzeArray* sessions);
static void tabby_base_storage_real_restore_last_sessions (TabbyIStorage* base);
static void tabby_base_storage_real_import_session (TabbyBaseStorage* self, KatzeArray* tabs);
static void tabby_base_storage_finalize (GObject* obj);
static void _vala_tabby_base_storage_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_tabby_base_storage_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
#define TABBY_BASE_SESSION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TABBY_BASE_TYPE_SESSION, TabbyBaseSessionPrivate))
enum  {
	TABBY_BASE_SESSION_DUMMY_PROPERTY,
	TABBY_BASE_SESSION_BROWSER,
	TABBY_BASE_SESSION_STATE
};
static void _g_free0_ (gpointer var);
static void _g_slist_free__g_free0_ (GSList* self);
static void tabby_base_session_real_add_item (TabbyBaseSession* self, KatzeItem* item);
static void tabby_base_session_real_uri_changed (TabbyBaseSession* self, MidoriView* view, const gchar* uri);
static void tabby_base_session_real_data_changed (TabbyBaseSession* self, MidoriView* view);
static void tabby_base_session_real_tab_added (TabbyBaseSession* self, MidoriBrowser* browser, MidoriView* view);
static void tabby_base_session_real_tab_removed (TabbyBaseSession* self, MidoriBrowser* browser, MidoriView* view);
static void tabby_base_session_real_tab_switched (TabbyBaseSession* self, MidoriView* old_view, MidoriView* new_view);
static void tabby_base_session_real_tab_reordered (TabbyBaseSession* self, GtkWidget* tab, guint pos);
static void tabby_base_session_real_remove (TabbyBaseSession* self);
static KatzeArray* tabby_base_session_real_get_tabs (TabbyBaseSession* self);
static gdouble tabby_base_session_real_get_max_sorting (TabbyBaseSession* self);
static void tabby_base_session_real_attach (TabbyISession* base, MidoriBrowser* browser);
static void _tabby_base_session_tab_added_midori_browser_add_tab (MidoriBrowser* _sender, MidoriView* tab, gpointer self);
static void tabby_base_session_helper_data_changed (TabbyBaseSession* self, MidoriBrowser* browser, MidoriView* view);
static void _tabby_base_session_helper_data_changed_midori_browser_add_tab (MidoriBrowser* _sender, MidoriView* tab, gpointer self);
static void _tabby_base_session_tab_removed_midori_browser_remove_tab (MidoriBrowser* _sender, MidoriView* tab, gpointer self);
static void _tabby_base_session_tab_switched_midori_browser_switch_tab (MidoriBrowser* _sender, MidoriView* old_view, MidoriView* new_view, gpointer self);
static gboolean _tabby_base_session_delete_event_gtk_widget_delete_event (GtkWidget* _sender, GdkEvent* event, gpointer self);
static void _tabby_base_session_tab_reordered_gtk_notebook_page_reordered (GtkNotebook* _sender, GtkWidget* p0, guint p1, gpointer self);
static void tabby_base_session_real_restore (TabbyISession* base, MidoriBrowser* browser);
static Block1Data* block1_data_ref (Block1Data* _data1_);
static void block1_data_unref (void * _userdata_);
static gboolean __lambda6_ (Block1Data* _data1_);
static void tabby_base_session_helper_reorder_tabs (TabbyBaseSession* self, GPtrArray* new_tabs);
static gboolean ___lambda6__gsource_func (gpointer self);
static void tabby_base_session_real_close (TabbyBaseSession* self);
static void tabby_base_session_load_status (TabbyBaseSession* self, GObject* _view, GParamSpec* pspec);
static Block2Data* block2_data_ref (Block2Data* _data2_);
static void block2_data_unref (void * _userdata_);
static void ____lambda4_ (Block2Data* _data2_);
static void _____lambda4__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void ____lambda5_ (Block2Data* _data2_);
static void _____lambda5__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void _tabby_base_session_load_status_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void tabby_base_session_helper_duplicate_tab (TabbyBaseSession* self, MidoriView* view, MidoriView* new_view, MidoriNewView where, gboolean user_initiated);
static void _tabby_base_session_helper_duplicate_tab_midori_view_new_view (MidoriView* _sender, MidoriView* new_view, MidoriNewView where, gboolean user_initiated, gpointer self);
static gint __lambda7_ (TabbyBaseSession* self, gdouble* a, gdouble* b);
static gint ___lambda7__gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self);
static gint __lambda8_ (gdouble* a, gdouble* b);
static gboolean _double_equal (const gdouble* s1, const gdouble* s2);
static gint ___lambda8__gcompare_func (gconstpointer a, gconstpointer b);
static gdouble* _double_dup (gdouble* self);
static GObject * tabby_base_session_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void tabby_base_session_finalize (GObject* obj);
static void _vala_tabby_base_session_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_tabby_base_session_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
GType tabby_local_session_get_type (void) G_GNUC_CONST;
#define TABBY_LOCAL_SESSION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TABBY_LOCAL_TYPE_SESSION, TabbyLocalSessionPrivate))
enum  {
	TABBY_LOCAL_SESSION_DUMMY_PROPERTY,
	TABBY_LOCAL_SESSION_ID
};
static void tabby_local_session_real_add_item (TabbyBaseSession* base, KatzeItem* item);
gint64 tabby_local_session_get_id (TabbyLocalSession* self);
static void tabby_local_session_real_uri_changed (TabbyBaseSession* base, MidoriView* view, const gchar* uri);
static void tabby_local_session_real_data_changed (TabbyBaseSession* base, MidoriView* view);
static void tabby_local_session_real_tab_added (TabbyBaseSession* base, MidoriBrowser* browser, MidoriView* view);
static void tabby_local_session_real_tab_removed (TabbyBaseSession* base, MidoriBrowser* browser, MidoriView* view);
static void tabby_local_session_real_tab_switched (TabbyBaseSession* base, MidoriView* old_view, MidoriView* new_view);
static void tabby_local_session_real_tab_reordered (TabbyBaseSession* base, GtkWidget* tab, guint pos);
static void tabby_local_session_real_remove (TabbyBaseSession* base);
static void tabby_local_session_real_close (TabbyBaseSession* base);
static KatzeArray* tabby_local_session_real_get_tabs (TabbyBaseSession* base);
static gdouble tabby_local_session_real_get_max_sorting (TabbyBaseSession* base);
TabbyLocalSession* tabby_local_session_new (MidoriDatabase* database);
TabbyLocalSession* tabby_local_session_construct (GType object_type, MidoriDatabase* database);
static void tabby_local_session_set_id (TabbyLocalSession* self, gint64 value);
TabbyLocalSession* tabby_local_session_new_with_id (MidoriDatabase* database, gint64 id);
TabbyLocalSession* tabby_local_session_construct_with_id (GType object_type, MidoriDatabase* database, gint64 id);
static void tabby_local_session_finalize (GObject* obj);
static void _vala_tabby_local_session_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_tabby_local_session_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
GType tabby_local_storage_get_type (void) G_GNUC_CONST;
#define TABBY_LOCAL_STORAGE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TABBY_LOCAL_TYPE_STORAGE, TabbyLocalStoragePrivate))
enum  {
	TABBY_LOCAL_STORAGE_DUMMY_PROPERTY
};
static KatzeArray* tabby_local_storage_real_get_saved_sessions (TabbyBaseStorage* base);
static void tabby_local_storage_real_import_session (TabbyBaseStorage* base, KatzeArray* tabs);
static Block3Data* block3_data_ref (Block3Data* _data3_);
static void block3_data_unref (void * _userdata_);
static gboolean ___lambda9_ (Block3Data* _data3_, GError** error);
static gboolean ____lambda9__midori_database_callback (gpointer self, GError** error);
static TabbyBaseSession* tabby_local_storage_real_get_new_session (TabbyBaseStorage* base);
TabbyLocalStorage* tabby_local_storage_new (MidoriApp* app);
TabbyLocalStorage* tabby_local_storage_construct (GType object_type, MidoriApp* app);
static void tabby_local_storage_finalize (GObject* obj);
GType tabby_manager_get_type (void) G_GNUC_CONST;
#define TABBY_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TABBY_TYPE_MANAGER, TabbyManagerPrivate))
enum  {
	TABBY_MANAGER_DUMMY_PROPERTY
};
static gboolean tabby_manager_load_session (TabbyManager* self);
static gboolean tabby_manager_execute_commands (TabbyManager* self);
static gboolean _tabby_manager_execute_commands_gsource_func (gpointer self);
static void tabby_manager_set_open_uris (TabbyManager* self, MidoriBrowser* browser);
static void _tabby_manager_set_open_uris_midori_app_add_browser (MidoriApp* _sender, MidoriBrowser* browser, gpointer self);
static void tabby_manager_browser_added (TabbyManager* self, MidoriBrowser* browser);
static void tabby_manager_browser_removed (TabbyManager* self, MidoriBrowser* browser);
static void tabby_manager_activated (TabbyManager* self, MidoriApp* app);
static void _tabby_manager_browser_added_midori_app_add_browser (MidoriApp* _sender, MidoriBrowser* browser, gpointer self);
static void _tabby_manager_browser_removed_midori_app_remove_browser (MidoriApp* _sender, MidoriBrowser* browser, gpointer self);
static gboolean _tabby_manager_load_session_gsource_func (gpointer self);
static void tabby_manager_deactivated (TabbyManager* self);
TabbyManager* tabby_manager_new (void);
TabbyManager* tabby_manager_construct (GType object_type);
static void _tabby_manager_activated_midori_extension_activate (MidoriExtension* _sender, MidoriApp* app, gpointer self);
static void _tabby_manager_deactivated_midori_extension_deactivate (MidoriExtension* _sender, gpointer self);
static void tabby_manager_finalize (GObject* obj);


KatzeArray* tabby_istorage_get_saved_sessions (TabbyIStorage* self) {
#line 19 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 19 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return TABBY_ISTORAGE_GET_INTERFACE (self)->get_saved_sessions (self);
#line 302 "tabby.c"
}


TabbyBaseSession* tabby_istorage_get_new_session (TabbyIStorage* self) {
#line 20 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 20 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return TABBY_ISTORAGE_GET_INTERFACE (self)->get_new_session (self);
#line 311 "tabby.c"
}


void tabby_istorage_restore_last_sessions (TabbyIStorage* self) {
#line 21 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 21 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	TABBY_ISTORAGE_GET_INTERFACE (self)->restore_last_sessions (self);
#line 320 "tabby.c"
}


void tabby_istorage_import_session (TabbyIStorage* self, KatzeArray* tabs) {
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	TABBY_ISTORAGE_GET_INTERFACE (self)->import_session (self, tabs);
#line 329 "tabby.c"
}


static void tabby_istorage_base_init (TabbyIStorageIface * iface) {
#line 18 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	static gboolean initialized = FALSE;
#line 18 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (!initialized) {
#line 18 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		initialized = TRUE;
#line 340 "tabby.c"
	}
}


GType tabby_istorage_get_type (void) {
	static volatile gsize tabby_istorage_type_id__volatile = 0;
	if (g_once_init_enter (&tabby_istorage_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (TabbyIStorageIface), (GBaseInitFunc) tabby_istorage_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
		GType tabby_istorage_type_id;
		tabby_istorage_type_id = g_type_register_static (G_TYPE_INTERFACE, "TabbyIStorage", &g_define_type_info, 0);
		g_type_interface_add_prerequisite (tabby_istorage_type_id, G_TYPE_OBJECT);
		g_once_init_leave (&tabby_istorage_type_id__volatile, tabby_istorage_type_id);
	}
	return tabby_istorage_type_id__volatile;
}


KatzeArray* tabby_isession_get_tabs (TabbyISession* self) {
#line 26 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 26 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return TABBY_ISESSION_GET_INTERFACE (self)->get_tabs (self);
#line 363 "tabby.c"
}


void tabby_isession_add_item (TabbyISession* self, KatzeItem* item) {
#line 28 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 28 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	TABBY_ISESSION_GET_INTERFACE (self)->add_item (self, item);
#line 372 "tabby.c"
}


void tabby_isession_attach (TabbyISession* self, MidoriBrowser* browser) {
#line 30 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 30 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	TABBY_ISESSION_GET_INTERFACE (self)->attach (self, browser);
#line 381 "tabby.c"
}


void tabby_isession_restore (TabbyISession* self, MidoriBrowser* browser) {
#line 32 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 32 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	TABBY_ISESSION_GET_INTERFACE (self)->restore (self, browser);
#line 390 "tabby.c"
}


void tabby_isession_remove (TabbyISession* self) {
#line 34 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 34 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	TABBY_ISESSION_GET_INTERFACE (self)->remove (self);
#line 399 "tabby.c"
}


void tabby_isession_close (TabbyISession* self) {
#line 36 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 36 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	TABBY_ISESSION_GET_INTERFACE (self)->close (self);
#line 408 "tabby.c"
}


static void tabby_isession_base_init (TabbyISessionIface * iface) {
#line 25 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	static gboolean initialized = FALSE;
#line 25 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (!initialized) {
#line 25 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		initialized = TRUE;
#line 419 "tabby.c"
	}
}


GType tabby_isession_get_type (void) {
	static volatile gsize tabby_isession_type_id__volatile = 0;
	if (g_once_init_enter (&tabby_isession_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (TabbyISessionIface), (GBaseInitFunc) tabby_isession_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
		GType tabby_isession_type_id;
		tabby_isession_type_id = g_type_register_static (G_TYPE_INTERFACE, "TabbyISession", &g_define_type_info, 0);
		g_type_interface_add_prerequisite (tabby_isession_type_id, G_TYPE_OBJECT);
		g_once_init_leave (&tabby_isession_type_id__volatile, tabby_isession_type_id);
	}
	return tabby_isession_type_id__volatile;
}


GType tabby_session_state_get_type (void) {
	static volatile gsize tabby_session_state_type_id__volatile = 0;
	if (g_once_init_enter (&tabby_session_state_type_id__volatile)) {
		static const GEnumValue values[] = {{TABBY_SESSION_STATE_OPEN, "TABBY_SESSION_STATE_OPEN", "open"}, {TABBY_SESSION_STATE_CLOSED, "TABBY_SESSION_STATE_CLOSED", "closed"}, {TABBY_SESSION_STATE_RESTORING, "TABBY_SESSION_STATE_RESTORING", "restoring"}, {0, NULL, NULL}};
		GType tabby_session_state_type_id;
		tabby_session_state_type_id = g_enum_register_static ("TabbySessionState", values);
		g_once_init_leave (&tabby_session_state_type_id__volatile, tabby_session_state_type_id);
	}
	return tabby_session_state_type_id__volatile;
}


static KatzeArray* tabby_base_storage_real_get_saved_sessions (TabbyBaseStorage* self) {
#line 51 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_critical ("Type `%s' does not implement abstract method `tabby_base_storage_get_saved_sessions'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 51 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return NULL;
#line 454 "tabby.c"
}


KatzeArray* tabby_base_storage_get_saved_sessions (TabbyBaseStorage* self) {
#line 51 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 51 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return TABBY_BASE_STORAGE_GET_CLASS (self)->get_saved_sessions (self);
#line 463 "tabby.c"
}


static TabbyBaseSession* tabby_base_storage_real_get_new_session (TabbyBaseStorage* self) {
#line 52 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_critical ("Type `%s' does not implement abstract method `tabby_base_storage_get_new_session'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 52 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return NULL;
#line 472 "tabby.c"
}


TabbyBaseSession* tabby_base_storage_get_new_session (TabbyBaseStorage* self) {
#line 52 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 52 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return TABBY_BASE_STORAGE_GET_CLASS (self)->get_new_session (self);
#line 481 "tabby.c"
}


void tabby_base_storage_start_new_session (TabbyBaseStorage* self) {
	KatzeArray* sessions = NULL;
	KatzeArray* _tmp0_ = NULL;
#line 54 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 55 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = katze_array_new (TABBY_BASE_TYPE_SESSION);
#line 55 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	sessions = _tmp0_;
#line 56 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	tabby_base_storage_init_sessions (self, sessions);
#line 54 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_object_unref0 (sessions);
#line 498 "tabby.c"
}


static void tabby_base_storage_real_restore_last_sessions (TabbyIStorage* base) {
	TabbyBaseStorage * self;
	KatzeArray* sessions = NULL;
	KatzeArray* _tmp0_ = NULL;
#line 59 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self = (TabbyBaseStorage*) base;
#line 60 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = tabby_base_storage_get_saved_sessions (self);
#line 60 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	sessions = _tmp0_;
#line 61 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	tabby_base_storage_init_sessions (self, sessions);
#line 59 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_object_unref0 (sessions);
#line 516 "tabby.c"
}


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


static void tabby_base_storage_init_sessions (TabbyBaseStorage* self, KatzeArray* sessions) {
	KatzeArray* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	GList* items = NULL;
	KatzeArray* _tmp5_ = NULL;
	GList* _tmp6_ = NULL;
	GList* _tmp7_ = NULL;
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (sessions != NULL);
#line 65 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = sessions;
#line 65 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp1_ = katze_array_is_empty (_tmp0_);
#line 65 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (_tmp1_) {
#line 544 "tabby.c"
		KatzeArray* _tmp2_ = NULL;
		TabbyBaseSession* _tmp3_ = NULL;
		TabbyBaseSession* _tmp4_ = NULL;
#line 66 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp2_ = sessions;
#line 66 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp3_ = tabby_base_storage_get_new_session (self);
#line 66 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp4_ = _tmp3_;
#line 66 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_signal_emit_by_name (_tmp2_, "add-item", (GObject*) _tmp4_);
#line 66 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_object_unref0 (_tmp4_);
#line 558 "tabby.c"
	}
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp5_ = sessions;
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp6_ = katze_array_get_items (_tmp5_);
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	items = _tmp6_;
#line 70 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp7_ = items;
#line 568 "tabby.c"
	{
		GList* item_collection = NULL;
		GList* item_it = NULL;
#line 70 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		item_collection = _tmp7_;
#line 70 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		for (item_it = item_collection; item_it != NULL; item_it = item_it->next) {
#line 576 "tabby.c"
			KatzeItem* _tmp8_ = NULL;
			KatzeItem* item = NULL;
#line 70 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp8_ = _g_object_ref0 ((KatzeItem*) item_it->data);
#line 70 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			item = _tmp8_;
#line 583 "tabby.c"
			{
				TabbyBaseSession* session = NULL;
				KatzeItem* _tmp9_ = NULL;
				TabbyBaseSession* _tmp10_ = NULL;
				MidoriBrowser* browser = NULL;
				MidoriApp* _tmp11_ = NULL;
				MidoriBrowser* _tmp12_ = NULL;
				MidoriBrowser* _tmp13_ = NULL;
				TabbyBaseSession* _tmp14_ = NULL;
				TabbyBaseSession* _tmp15_ = NULL;
				MidoriApp* _tmp16_ = NULL;
				MidoriBrowser* _tmp17_ = NULL;
				MidoriBrowser* _tmp18_ = NULL;
				TabbyBaseSession* _tmp19_ = NULL;
				MidoriBrowser* _tmp20_ = NULL;
#line 71 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp9_ = item;
#line 71 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp10_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp9_, TABBY_BASE_TYPE_SESSION) ? ((TabbyBaseSession*) _tmp9_) : NULL);
#line 71 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				session = _tmp10_;
#line 72 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp11_ = self->priv->_app;
#line 72 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp12_ = midori_app_create_browser (_tmp11_);
#line 72 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				browser = _tmp12_;
#line 75 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp13_ = browser;
#line 75 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp14_ = session;
#line 75 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp15_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp14_, TABBY_BASE_TYPE_SESSION) ? ((TabbyBaseSession*) _tmp14_) : NULL);
#line 75 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				g_object_set_data_full ((GObject*) _tmp13_, "tabby-session", _tmp15_, g_object_unref);
#line 77 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp16_ = self->priv->_app;
#line 77 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp17_ = browser;
#line 77 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				midori_app_add_browser (_tmp16_, _tmp17_);
#line 78 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp18_ = browser;
#line 78 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				gtk_widget_show ((GtkWidget*) _tmp18_);
#line 80 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp19_ = session;
#line 80 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp20_ = browser;
#line 80 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				tabby_isession_restore ((TabbyISession*) _tmp19_, _tmp20_);
#line 70 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_g_object_unref0 (browser);
#line 70 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_g_object_unref0 (session);
#line 70 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_g_object_unref0 (item);
#line 641 "tabby.c"
			}
		}
	}
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_list_free0 (items);
#line 647 "tabby.c"
}


static gchar* double_to_string (gdouble self) {
	gchar* result = NULL;
	gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	gint _tmp1__length1 = 0;
	const gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
#line 783 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp0_ = g_new0 (gchar, G_ASCII_DTOSTR_BUF_SIZE);
#line 783 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp1_ = _tmp0_;
#line 783 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp1__length1 = G_ASCII_DTOSTR_BUF_SIZE;
#line 783 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp2_ = g_ascii_dtostr (_tmp1_, G_ASCII_DTOSTR_BUF_SIZE, self);
#line 783 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp3_ = g_strdup (_tmp2_);
#line 783 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp4_ = _tmp3_;
#line 783 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp1_ = (g_free (_tmp1_), NULL);
#line 783 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	result = _tmp4_;
#line 783 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	return result;
#line 677 "tabby.c"
}


static void tabby_base_storage_real_import_session (TabbyBaseStorage* self, KatzeArray* tabs) {
	TabbyBaseSession* session = NULL;
	TabbyBaseSession* _tmp0_ = NULL;
	GList* items = NULL;
	KatzeArray* _tmp1_ = NULL;
	GList* _tmp2_ = NULL;
	gdouble i = 0.0;
	GList* _tmp3_ = NULL;
#line 84 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (tabs != NULL);
#line 85 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = tabby_base_storage_get_new_session (self);
#line 85 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	session = _tmp0_;
#line 86 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp1_ = tabs;
#line 86 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp2_ = katze_array_get_items (_tmp1_);
#line 86 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	items = _tmp2_;
#line 87 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	i = (gdouble) 0;
#line 88 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp3_ = items;
#line 705 "tabby.c"
	{
		GList* item_collection = NULL;
		GList* item_it = NULL;
#line 88 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		item_collection = _tmp3_;
#line 88 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		for (item_it = item_collection; item_it != NULL; item_it = item_it->next) {
#line 713 "tabby.c"
			KatzeItem* _tmp4_ = NULL;
			KatzeItem* item = NULL;
#line 88 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp4_ = _g_object_ref0 ((KatzeItem*) item_it->data);
#line 88 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			item = _tmp4_;
#line 720 "tabby.c"
			{
				KatzeItem* _tmp5_ = NULL;
				gdouble _tmp6_ = 0.0;
				gchar* _tmp7_ = NULL;
				gchar* _tmp8_ = NULL;
				KatzeItem* _tmp9_ = NULL;
				gdouble _tmp10_ = 0.0;
				TabbyBaseSession* _tmp11_ = NULL;
				KatzeItem* _tmp12_ = NULL;
#line 89 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp5_ = item;
#line 89 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp6_ = i;
#line 89 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp7_ = double_to_string (_tmp6_);
#line 89 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp8_ = _tmp7_;
#line 89 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				katze_item_set_meta_string (_tmp5_, "sorting", _tmp8_);
#line 89 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_g_free0 (_tmp8_);
#line 91 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp9_ = item;
#line 91 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				katze_item_set_meta_string (_tmp9_, "history-step", "ignore");
#line 92 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp10_ = i;
#line 92 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				i = _tmp10_ + 1024;
#line 93 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp11_ = session;
#line 93 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp12_ = item;
#line 93 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				tabby_base_session_add_item (_tmp11_, _tmp12_);
#line 88 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_g_object_unref0 (item);
#line 758 "tabby.c"
			}
		}
	}
#line 84 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_list_free0 (items);
#line 84 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_object_unref0 (session);
#line 766 "tabby.c"
}


void tabby_base_storage_import_session (TabbyBaseStorage* self, KatzeArray* tabs) {
#line 84 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 84 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	TABBY_BASE_STORAGE_GET_CLASS (self)->import_session (self, tabs);
#line 775 "tabby.c"
}


TabbyBaseStorage* tabby_base_storage_construct (GType object_type) {
	TabbyBaseStorage * self = NULL;
#line 48 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self = (TabbyBaseStorage*) g_object_new (object_type, NULL);
#line 48 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return self;
#line 785 "tabby.c"
}


MidoriApp* tabby_base_storage_get_app (TabbyBaseStorage* self) {
	MidoriApp* result;
	MidoriApp* _tmp0_ = NULL;
#line 49 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 49 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = self->priv->_app;
#line 49 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	result = _tmp0_;
#line 49 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return result;
#line 800 "tabby.c"
}


static void tabby_base_storage_set_app (TabbyBaseStorage* self, MidoriApp* value) {
	MidoriApp* _tmp0_ = NULL;
	MidoriApp* _tmp1_ = NULL;
#line 49 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 49 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = value;
#line 49 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 49 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_object_unref0 (self->priv->_app);
#line 49 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self->priv->_app = _tmp1_;
#line 49 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_object_notify ((GObject *) self, "app");
#line 819 "tabby.c"
}


static void tabby_base_storage_class_init (TabbyBaseStorageClass * klass) {
#line 48 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	tabby_base_storage_parent_class = g_type_class_peek_parent (klass);
#line 48 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_type_class_add_private (klass, sizeof (TabbyBaseStoragePrivate));
#line 48 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	((TabbyBaseStorageClass *) klass)->get_saved_sessions = tabby_base_storage_real_get_saved_sessions;
#line 48 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	((TabbyBaseStorageClass *) klass)->get_new_session = tabby_base_storage_real_get_new_session;
#line 48 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	((TabbyBaseStorageClass *) klass)->import_session = tabby_base_storage_real_import_session;
#line 48 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_tabby_base_storage_get_property;
#line 48 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_tabby_base_storage_set_property;
#line 48 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	G_OBJECT_CLASS (klass)->finalize = tabby_base_storage_finalize;
#line 48 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), TABBY_BASE_STORAGE_APP, g_param_spec_object ("app", "app", "app", MIDORI_TYPE_APP, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
#line 842 "tabby.c"
}


static void tabby_base_storage_tabby_istorage_interface_init (TabbyIStorageIface * iface) {
#line 48 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	tabby_base_storage_tabby_istorage_parent_iface = g_type_interface_peek_parent (iface);
#line 48 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	iface->get_saved_sessions = (KatzeArray* (*)(TabbyIStorage*)) tabby_base_storage_get_saved_sessions;
#line 48 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	iface->get_new_session = (TabbyBaseSession* (*)(TabbyIStorage*)) tabby_base_storage_get_new_session;
#line 48 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	iface->restore_last_sessions = (void (*)(TabbyIStorage*)) tabby_base_storage_real_restore_last_sessions;
#line 48 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	iface->import_session = (void (*)(TabbyIStorage*, KatzeArray*)) tabby_base_storage_import_session;
#line 857 "tabby.c"
}


static void tabby_base_storage_instance_init (TabbyBaseStorage * self) {
#line 48 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self->priv = TABBY_BASE_STORAGE_GET_PRIVATE (self);
#line 864 "tabby.c"
}


static void tabby_base_storage_finalize (GObject* obj) {
	TabbyBaseStorage * self;
#line 48 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TABBY_BASE_TYPE_STORAGE, TabbyBaseStorage);
#line 49 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_object_unref0 (self->priv->_app);
#line 48 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	G_OBJECT_CLASS (tabby_base_storage_parent_class)->finalize (obj);
#line 876 "tabby.c"
}


GType tabby_base_storage_get_type (void) {
	static volatile gsize tabby_base_storage_type_id__volatile = 0;
	if (g_once_init_enter (&tabby_base_storage_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (TabbyBaseStorageClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tabby_base_storage_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TabbyBaseStorage), 0, (GInstanceInitFunc) tabby_base_storage_instance_init, NULL };
		static const GInterfaceInfo tabby_istorage_info = { (GInterfaceInitFunc) tabby_base_storage_tabby_istorage_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType tabby_base_storage_type_id;
		tabby_base_storage_type_id = g_type_register_static (G_TYPE_OBJECT, "TabbyBaseStorage", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		g_type_add_interface_static (tabby_base_storage_type_id, TABBY_TYPE_ISTORAGE, &tabby_istorage_info);
		g_once_init_leave (&tabby_base_storage_type_id__volatile, tabby_base_storage_type_id);
	}
	return tabby_base_storage_type_id__volatile;
}


static void _vala_tabby_base_storage_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	TabbyBaseStorage * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TABBY_BASE_TYPE_STORAGE, TabbyBaseStorage);
#line 48 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	switch (property_id) {
#line 48 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		case TABBY_BASE_STORAGE_APP:
#line 48 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_value_set_object (value, tabby_base_storage_get_app (self));
#line 48 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		break;
#line 905 "tabby.c"
		default:
#line 48 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 48 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		break;
#line 911 "tabby.c"
	}
}


static void _vala_tabby_base_storage_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	TabbyBaseStorage * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TABBY_BASE_TYPE_STORAGE, TabbyBaseStorage);
#line 48 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	switch (property_id) {
#line 48 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		case TABBY_BASE_STORAGE_APP:
#line 48 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		tabby_base_storage_set_app (self, g_value_get_object (value));
#line 48 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		break;
#line 927 "tabby.c"
		default:
#line 48 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 48 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		break;
#line 933 "tabby.c"
	}
}


static void _g_free0_ (gpointer var) {
#line 99 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	(var == NULL) ? NULL : (var = (g_free (var), NULL));
#line 941 "tabby.c"
}


static void _g_slist_free__g_free0_ (GSList* self) {
#line 99 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_slist_foreach (self, (GFunc) _g_free0_, NULL);
#line 99 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_slist_free (self);
#line 950 "tabby.c"
}


static void tabby_base_session_real_add_item (TabbyBaseSession* self, KatzeItem* item) {
#line 104 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_critical ("Type `%s' does not implement abstract method `tabby_base_session_add_item'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 104 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return;
#line 959 "tabby.c"
}


void tabby_base_session_add_item (TabbyBaseSession* self, KatzeItem* item) {
#line 104 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 104 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	TABBY_BASE_SESSION_GET_CLASS (self)->add_item (self, item);
#line 968 "tabby.c"
}


static void tabby_base_session_real_uri_changed (TabbyBaseSession* self, MidoriView* view, const gchar* uri) {
#line 105 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_critical ("Type `%s' does not implement abstract method `tabby_base_session_uri_changed'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 105 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return;
#line 977 "tabby.c"
}


void tabby_base_session_uri_changed (TabbyBaseSession* self, MidoriView* view, const gchar* uri) {
#line 105 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 105 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	TABBY_BASE_SESSION_GET_CLASS (self)->uri_changed (self, view, uri);
#line 986 "tabby.c"
}


static void tabby_base_session_real_data_changed (TabbyBaseSession* self, MidoriView* view) {
#line 106 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_critical ("Type `%s' does not implement abstract method `tabby_base_session_data_changed'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 106 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return;
#line 995 "tabby.c"
}


void tabby_base_session_data_changed (TabbyBaseSession* self, MidoriView* view) {
#line 106 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 106 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	TABBY_BASE_SESSION_GET_CLASS (self)->data_changed (self, view);
#line 1004 "tabby.c"
}


static void tabby_base_session_real_tab_added (TabbyBaseSession* self, MidoriBrowser* browser, MidoriView* view) {
#line 107 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_critical ("Type `%s' does not implement abstract method `tabby_base_session_tab_added'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 107 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return;
#line 1013 "tabby.c"
}


void tabby_base_session_tab_added (TabbyBaseSession* self, MidoriBrowser* browser, MidoriView* view) {
#line 107 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 107 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	TABBY_BASE_SESSION_GET_CLASS (self)->tab_added (self, browser, view);
#line 1022 "tabby.c"
}


static void tabby_base_session_real_tab_removed (TabbyBaseSession* self, MidoriBrowser* browser, MidoriView* view) {
#line 108 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_critical ("Type `%s' does not implement abstract method `tabby_base_session_tab_removed'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 108 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return;
#line 1031 "tabby.c"
}


void tabby_base_session_tab_removed (TabbyBaseSession* self, MidoriBrowser* browser, MidoriView* view) {
#line 108 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 108 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	TABBY_BASE_SESSION_GET_CLASS (self)->tab_removed (self, browser, view);
#line 1040 "tabby.c"
}


static void tabby_base_session_real_tab_switched (TabbyBaseSession* self, MidoriView* old_view, MidoriView* new_view) {
#line 109 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_critical ("Type `%s' does not implement abstract method `tabby_base_session_tab_switched'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 109 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return;
#line 1049 "tabby.c"
}


void tabby_base_session_tab_switched (TabbyBaseSession* self, MidoriView* old_view, MidoriView* new_view) {
#line 109 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 109 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	TABBY_BASE_SESSION_GET_CLASS (self)->tab_switched (self, old_view, new_view);
#line 1058 "tabby.c"
}


static void tabby_base_session_real_tab_reordered (TabbyBaseSession* self, GtkWidget* tab, guint pos) {
#line 110 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_critical ("Type `%s' does not implement abstract method `tabby_base_session_tab_reordered'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 110 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return;
#line 1067 "tabby.c"
}


void tabby_base_session_tab_reordered (TabbyBaseSession* self, GtkWidget* tab, guint pos) {
#line 110 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 110 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	TABBY_BASE_SESSION_GET_CLASS (self)->tab_reordered (self, tab, pos);
#line 1076 "tabby.c"
}


static void tabby_base_session_real_remove (TabbyBaseSession* self) {
#line 112 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_critical ("Type `%s' does not implement abstract method `tabby_base_session_remove'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 112 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return;
#line 1085 "tabby.c"
}


void tabby_base_session_remove (TabbyBaseSession* self) {
#line 112 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 112 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	TABBY_BASE_SESSION_GET_CLASS (self)->remove (self);
#line 1094 "tabby.c"
}


static KatzeArray* tabby_base_session_real_get_tabs (TabbyBaseSession* self) {
#line 114 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_critical ("Type `%s' does not implement abstract method `tabby_base_session_get_tabs'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 114 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return NULL;
#line 1103 "tabby.c"
}


KatzeArray* tabby_base_session_get_tabs (TabbyBaseSession* self) {
#line 114 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 114 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return TABBY_BASE_SESSION_GET_CLASS (self)->get_tabs (self);
#line 1112 "tabby.c"
}


static gdouble tabby_base_session_real_get_max_sorting (TabbyBaseSession* self) {
#line 115 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_critical ("Type `%s' does not implement abstract method `tabby_base_session_get_max_sorting'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 115 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return 0.0;
#line 1121 "tabby.c"
}


gdouble tabby_base_session_get_max_sorting (TabbyBaseSession* self) {
#line 115 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_val_if_fail (self != NULL, 0.0);
#line 115 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return TABBY_BASE_SESSION_GET_CLASS (self)->get_max_sorting (self);
#line 1130 "tabby.c"
}


static void _tabby_base_session_tab_added_midori_browser_add_tab (MidoriBrowser* _sender, MidoriView* tab, gpointer self) {
#line 120 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	tabby_base_session_tab_added ((TabbyBaseSession*) self, _sender, tab);
#line 1137 "tabby.c"
}


static void _tabby_base_session_helper_data_changed_midori_browser_add_tab (MidoriBrowser* _sender, MidoriView* tab, gpointer self) {
#line 121 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	tabby_base_session_helper_data_changed ((TabbyBaseSession*) self, _sender, tab);
#line 1144 "tabby.c"
}


static void _tabby_base_session_tab_removed_midori_browser_remove_tab (MidoriBrowser* _sender, MidoriView* tab, gpointer self) {
#line 123 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	tabby_base_session_tab_removed ((TabbyBaseSession*) self, _sender, tab);
#line 1151 "tabby.c"
}


static void _tabby_base_session_tab_switched_midori_browser_switch_tab (MidoriBrowser* _sender, MidoriView* old_view, MidoriView* new_view, gpointer self) {
#line 124 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	tabby_base_session_tab_switched ((TabbyBaseSession*) self, old_view, new_view);
#line 1158 "tabby.c"
}


static gboolean _tabby_base_session_delete_event_gtk_widget_delete_event (GtkWidget* _sender, GdkEvent* event, gpointer self) {
	gboolean result;
	result = tabby_base_session_delete_event ((TabbyBaseSession*) self, _sender, event);
#line 125 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return result;
#line 1167 "tabby.c"
}


static void _tabby_base_session_tab_reordered_gtk_notebook_page_reordered (GtkNotebook* _sender, GtkWidget* p0, guint p1, gpointer self) {
#line 126 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	tabby_base_session_tab_reordered ((TabbyBaseSession*) self, p0, p1);
#line 1174 "tabby.c"
}


static void tabby_base_session_real_attach (TabbyISession* base, MidoriBrowser* browser) {
	TabbyBaseSession * self;
	MidoriBrowser* _tmp0_ = NULL;
	MidoriBrowser* _tmp1_ = NULL;
	MidoriBrowser* _tmp2_ = NULL;
	MidoriBrowser* _tmp3_ = NULL;
	MidoriBrowser* _tmp4_ = NULL;
	MidoriBrowser* _tmp5_ = NULL;
	MidoriBrowser* _tmp6_ = NULL;
	GtkNotebook* _tmp7_ = NULL;
	GtkNotebook* _tmp8_ = NULL;
	GtkNotebook* _tmp9_ = NULL;
	MidoriBrowser* _tmp10_ = NULL;
	GList* _tmp11_ = NULL;
#line 117 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self = (TabbyBaseSession*) base;
#line 117 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (browser != NULL);
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = browser;
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	tabby_base_session_set_browser (self, _tmp0_);
#line 120 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp1_ = browser;
#line 120 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_signal_connect_object (_tmp1_, "add-tab", (GCallback) _tabby_base_session_tab_added_midori_browser_add_tab, self, G_CONNECT_AFTER);
#line 121 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp2_ = browser;
#line 121 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_signal_connect_object (_tmp2_, "add-tab", (GCallback) _tabby_base_session_helper_data_changed_midori_browser_add_tab, self, 0);
#line 123 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp3_ = browser;
#line 123 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_signal_connect_object (_tmp3_, "remove-tab", (GCallback) _tabby_base_session_tab_removed_midori_browser_remove_tab, self, 0);
#line 124 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp4_ = browser;
#line 124 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_signal_connect_object (_tmp4_, "switch-tab", (GCallback) _tabby_base_session_tab_switched_midori_browser_switch_tab, self, 0);
#line 125 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp5_ = browser;
#line 125 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_signal_connect_object ((GtkWidget*) _tmp5_, "delete-event", (GCallback) _tabby_base_session_delete_event_gtk_widget_delete_event, self, G_CONNECT_AFTER);
#line 126 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp6_ = browser;
#line 126 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_object_get (_tmp6_, "notebook", &_tmp7_, NULL);
#line 126 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp8_ = _tmp7_;
#line 126 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp9_ = _tmp8_;
#line 126 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_signal_connect_object (_tmp9_, "page-reordered", (GCallback) _tabby_base_session_tab_reordered_gtk_notebook_page_reordered, self, G_CONNECT_AFTER);
#line 126 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_object_unref0 (_tmp9_);
#line 128 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	tabby_base_session_set_state (self, TABBY_SESSION_STATE_OPEN);
#line 130 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp10_ = browser;
#line 130 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp11_ = midori_browser_get_tabs (_tmp10_);
#line 1238 "tabby.c"
	{
		GList* view_collection = NULL;
		GList* view_it = NULL;
#line 130 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		view_collection = _tmp11_;
#line 130 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		for (view_it = view_collection; view_it != NULL; view_it = view_it->next) {
#line 1246 "tabby.c"
			MidoriView* _tmp12_ = NULL;
			MidoriView* view = NULL;
#line 130 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp12_ = _g_object_ref0 ((MidoriView*) view_it->data);
#line 130 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			view = _tmp12_;
#line 1253 "tabby.c"
			{
				MidoriBrowser* _tmp13_ = NULL;
				MidoriView* _tmp14_ = NULL;
				MidoriBrowser* _tmp15_ = NULL;
				MidoriView* _tmp16_ = NULL;
#line 131 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp13_ = browser;
#line 131 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp14_ = view;
#line 131 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				tabby_base_session_tab_added (self, _tmp13_, _tmp14_);
#line 132 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp15_ = browser;
#line 132 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp16_ = view;
#line 132 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				tabby_base_session_helper_data_changed (self, _tmp15_, _tmp16_);
#line 130 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_g_object_unref0 (view);
#line 1273 "tabby.c"
			}
		}
#line 130 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_list_free0 (view_collection);
#line 1278 "tabby.c"
	}
}


static Block1Data* block1_data_ref (Block1Data* _data1_) {
#line 136 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_atomic_int_inc (&_data1_->_ref_count_);
#line 136 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return _data1_;
#line 1288 "tabby.c"
}


static void block1_data_unref (void * _userdata_) {
	Block1Data* _data1_;
	_data1_ = (Block1Data*) _userdata_;
#line 136 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
#line 1297 "tabby.c"
		TabbyBaseSession* self;
#line 136 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		self = _data1_->self;
#line 136 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_list_free0 (_data1_->items);
#line 136 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_object_unref0 (_data1_->browser);
#line 136 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_object_unref0 (self);
#line 136 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_slice_free (Block1Data, _data1_);
#line 1309 "tabby.c"
	}
}


static gboolean __lambda6_ (Block1Data* _data1_) {
	TabbyBaseSession* self;
	gboolean result = FALSE;
	GPtrArray* new_tabs = NULL;
	GPtrArray* _tmp0_ = NULL;
	GList* _tmp1_ = NULL;
	guint _tmp2_ = 0U;
	GList* _tmp25_ = NULL;
#line 187 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self = _data1_->self;
#line 189 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = g_ptr_array_new ();
#line 189 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	new_tabs = _tmp0_;
#line 190 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp1_ = _data1_->items;
#line 190 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp2_ = g_list_length (_tmp1_);
#line 190 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (_tmp2_ > ((guint) 0)) {
#line 1334 "tabby.c"
		GPtrArray* _tmp24_ = NULL;
		{
			gint i = 0;
#line 191 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			i = 0;
#line 1340 "tabby.c"
			{
				gboolean _tmp3_ = FALSE;
#line 191 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp3_ = TRUE;
#line 191 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				while (TRUE) {
#line 1347 "tabby.c"
					gint _tmp5_ = 0;
					gint _tmp6_ = 0;
					GList* _tmp7_ = NULL;
					KatzeItem* t_item = NULL;
					GList* _tmp9_ = NULL;
					gconstpointer _tmp10_ = NULL;
					KatzeItem* _tmp11_ = NULL;
					KatzeItem* _tmp12_ = NULL;
					gboolean _tmp13_ = FALSE;
					gboolean _tmp14_ = FALSE;
					GtkWidget* tab = NULL;
					MidoriBrowser* _tmp17_ = NULL;
					KatzeItem* _tmp18_ = NULL;
					GtkWidget* _tmp19_ = NULL;
					GPtrArray* _tmp20_ = NULL;
					GtkWidget* _tmp21_ = NULL;
					GList* _tmp22_ = NULL;
					GList* _tmp23_ = NULL;
#line 191 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					if (!_tmp3_) {
#line 1368 "tabby.c"
						gint _tmp4_ = 0;
#line 191 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						_tmp4_ = i;
#line 191 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						i = _tmp4_ + 1;
#line 1374 "tabby.c"
					}
#line 191 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_tmp3_ = FALSE;
#line 191 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_tmp5_ = i;
#line 191 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_tmp6_ = tabby_IDLE_RESTORE_COUNT;
#line 191 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					if (!(_tmp5_ < _tmp6_)) {
#line 191 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						break;
#line 1386 "tabby.c"
					}
#line 192 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_tmp7_ = _data1_->u_items;
#line 192 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					if (_tmp7_ == NULL) {
#line 1392 "tabby.c"
						GPtrArray* _tmp8_ = NULL;
#line 193 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						_tmp8_ = new_tabs;
#line 193 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						tabby_base_session_helper_reorder_tabs (self, _tmp8_);
#line 194 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						tabby_base_session_set_state (self, TABBY_SESSION_STATE_OPEN);
#line 195 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						result = FALSE;
#line 195 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						_g_ptr_array_unref0 (new_tabs);
#line 195 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						return result;
#line 1406 "tabby.c"
					}
#line 198 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_tmp9_ = _data1_->u_items;
#line 198 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_tmp10_ = _tmp9_->data;
#line 198 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_tmp11_ = _g_object_ref0 ((KatzeItem*) _tmp10_);
#line 198 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					t_item = _tmp11_;
#line 200 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_tmp12_ = t_item;
#line 200 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					katze_item_set_meta_integer (_tmp12_, "append", (gint64) 1);
#line 202 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_tmp14_ = _data1_->delay;
#line 202 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					if (_tmp14_) {
#line 1424 "tabby.c"
						gboolean _tmp15_ = FALSE;
#line 202 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						_tmp15_ = _data1_->should_delay;
#line 202 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						_tmp13_ = _tmp15_;
#line 1430 "tabby.c"
					} else {
#line 202 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						_tmp13_ = FALSE;
#line 1434 "tabby.c"
					}
#line 202 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					if (_tmp13_) {
#line 1438 "tabby.c"
						KatzeItem* _tmp16_ = NULL;
#line 203 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						_tmp16_ = t_item;
#line 203 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						katze_item_set_meta_integer (_tmp16_, "delay", (gint64) MIDORI_DELAY_DELAYED);
#line 1444 "tabby.c"
					} else {
#line 205 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						_data1_->delay = TRUE;
#line 1448 "tabby.c"
					}
#line 207 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_tmp17_ = _data1_->browser;
#line 207 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_tmp18_ = t_item;
#line 207 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_tmp19_ = midori_browser_add_item (_tmp17_, _tmp18_);
#line 207 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					tab = _tmp19_;
#line 208 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_tmp20_ = new_tabs;
#line 208 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_tmp21_ = tab;
#line 208 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					g_ptr_array_add (_tmp20_, _tmp21_);
#line 210 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_tmp22_ = _data1_->u_items;
#line 210 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_tmp23_ = _tmp22_->next;
#line 210 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_data1_->u_items = _tmp23_;
#line 191 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_g_object_unref0 (t_item);
#line 1472 "tabby.c"
				}
			}
		}
#line 212 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp24_ = new_tabs;
#line 212 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		tabby_base_session_helper_reorder_tabs (self, _tmp24_);
#line 1480 "tabby.c"
	}
#line 214 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp25_ = _data1_->u_items;
#line 214 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (_tmp25_ == NULL) {
#line 215 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		tabby_base_session_set_state (self, TABBY_SESSION_STATE_OPEN);
#line 216 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		result = FALSE;
#line 216 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_ptr_array_unref0 (new_tabs);
#line 216 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		return result;
#line 1494 "tabby.c"
	}
#line 218 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	result = TRUE;
#line 218 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_ptr_array_unref0 (new_tabs);
#line 218 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return result;
#line 1502 "tabby.c"
}


static gboolean ___lambda6__gsource_func (gpointer self) {
	gboolean result;
	result = __lambda6_ (self);
#line 187 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return result;
#line 1511 "tabby.c"
}


static void tabby_base_session_real_restore (TabbyISession* base, MidoriBrowser* browser) {
	TabbyBaseSession * self;
	Block1Data* _data1_;
	MidoriBrowser* _tmp0_ = NULL;
	MidoriBrowser* _tmp1_ = NULL;
	MidoriBrowser* _tmp2_ = NULL;
	KatzeArray* tabs = NULL;
	KatzeArray* _tmp3_ = NULL;
	KatzeArray* open_uris = NULL;
	MidoriBrowser* _tmp4_ = NULL;
	gconstpointer _tmp5_ = NULL;
	gboolean _tmp6_ = FALSE;
	KatzeArray* _tmp7_ = NULL;
	gboolean _tmp8_ = FALSE;
	MidoriBrowser* _tmp20_ = NULL;
	MidoriBrowser* _tmp21_ = NULL;
	MidoriBrowser* _tmp22_ = NULL;
	MidoriBrowser* _tmp23_ = NULL;
	MidoriBrowser* _tmp24_ = NULL;
	MidoriBrowser* _tmp25_ = NULL;
	GtkNotebook* _tmp26_ = NULL;
	GtkNotebook* _tmp27_ = NULL;
	GtkNotebook* _tmp28_ = NULL;
	KatzeArray* _tmp29_ = NULL;
	KatzeArray* _tmp32_ = NULL;
	GList* _tmp33_ = NULL;
	GList* _tmp34_ = NULL;
	gint load_on_startup = 0;
	MidoriApp* _tmp35_ = NULL;
	MidoriWebSettings* _tmp36_ = NULL;
	MidoriWebSettings* _tmp37_ = NULL;
	MidoriWebSettings* _tmp38_ = NULL;
	gint _tmp39_ = 0;
	MidoriApp* _tmp40_ = NULL;
	gboolean _tmp41_ = FALSE;
	gboolean _tmp42_ = FALSE;
#line 136 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self = (TabbyBaseSession*) base;
#line 136 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (browser != NULL);
#line 136 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_data1_ = g_slice_new0 (Block1Data);
#line 136 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_data1_->_ref_count_ = 1;
#line 136 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_data1_->self = g_object_ref (self);
#line 136 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = browser;
#line 136 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 136 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_object_unref0 (_data1_->browser);
#line 136 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_data1_->browser = _tmp1_;
#line 137 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp2_ = _data1_->browser;
#line 137 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	tabby_base_session_set_browser (self, _tmp2_);
#line 139 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp3_ = tabby_base_session_get_tabs (self);
#line 139 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	tabs = _tmp3_;
#line 140 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp4_ = _data1_->browser;
#line 140 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp5_ = g_object_get_data ((GObject*) _tmp4_, "tabby-open-uris");
#line 140 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	open_uris = (KatzeArray*) _tmp5_;
#line 142 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp7_ = tabs;
#line 142 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp8_ = katze_array_is_empty (_tmp7_);
#line 142 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (_tmp8_) {
#line 1589 "tabby.c"
		KatzeArray* _tmp9_ = NULL;
#line 142 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp9_ = open_uris;
#line 142 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp6_ = _tmp9_ == NULL;
#line 1595 "tabby.c"
	} else {
#line 142 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp6_ = FALSE;
#line 1599 "tabby.c"
	}
#line 142 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (_tmp6_) {
#line 1603 "tabby.c"
		gint load_on_startup = 0;
		MidoriApp* _tmp10_ = NULL;
		MidoriWebSettings* _tmp11_ = NULL;
		MidoriWebSettings* _tmp12_ = NULL;
		MidoriWebSettings* _tmp13_ = NULL;
		KatzeItem* item = NULL;
		KatzeItem* _tmp14_ = NULL;
		gint _tmp15_ = 0;
		KatzeArray* _tmp18_ = NULL;
		KatzeItem* _tmp19_ = NULL;
#line 145 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp10_ = tabby_APP;
#line 145 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_object_get (_tmp10_, "settings", &_tmp11_, NULL);
#line 145 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp12_ = _tmp11_;
#line 145 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp13_ = _tmp12_;
#line 145 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_object_get ((GObject*) _tmp13_, "load-on-startup", &load_on_startup, NULL);
#line 145 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_object_unref0 (_tmp13_);
#line 147 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp14_ = katze_item_new ();
#line 147 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		item = _tmp14_;
#line 149 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp15_ = load_on_startup;
#line 149 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		if (_tmp15_ == ((gint) MIDORI_STARTUP_BLANK_PAGE)) {
#line 1634 "tabby.c"
			KatzeItem* _tmp16_ = NULL;
#line 150 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp16_ = item;
#line 150 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			katze_item_set_uri (_tmp16_, "about:dial");
#line 1640 "tabby.c"
		} else {
			KatzeItem* _tmp17_ = NULL;
#line 152 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp17_ = item;
#line 152 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			katze_item_set_uri (_tmp17_, "about:home");
#line 1647 "tabby.c"
		}
#line 155 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp18_ = tabs;
#line 155 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp19_ = item;
#line 155 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_signal_emit_by_name (_tmp18_, "add-item", (GObject*) _tmp19_);
#line 142 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_object_unref0 (item);
#line 1657 "tabby.c"
	}
#line 158 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp20_ = _data1_->browser;
#line 158 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_signal_connect_object (_tmp20_, "add-tab", (GCallback) _tabby_base_session_tab_added_midori_browser_add_tab, self, G_CONNECT_AFTER);
#line 159 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp21_ = _data1_->browser;
#line 159 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_signal_connect_object (_tmp21_, "add-tab", (GCallback) _tabby_base_session_helper_data_changed_midori_browser_add_tab, self, 0);
#line 161 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp22_ = _data1_->browser;
#line 161 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_signal_connect_object (_tmp22_, "remove-tab", (GCallback) _tabby_base_session_tab_removed_midori_browser_remove_tab, self, 0);
#line 162 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp23_ = _data1_->browser;
#line 162 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_signal_connect_object (_tmp23_, "switch-tab", (GCallback) _tabby_base_session_tab_switched_midori_browser_switch_tab, self, 0);
#line 163 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp24_ = _data1_->browser;
#line 163 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_signal_connect_object ((GtkWidget*) _tmp24_, "delete-event", (GCallback) _tabby_base_session_delete_event_gtk_widget_delete_event, self, G_CONNECT_AFTER);
#line 164 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp25_ = _data1_->browser;
#line 164 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_object_get (_tmp25_, "notebook", &_tmp26_, NULL);
#line 164 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp27_ = _tmp26_;
#line 164 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp28_ = _tmp27_;
#line 164 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_signal_connect_object (_tmp28_, "page-reordered", (GCallback) _tabby_base_session_tab_reordered_gtk_notebook_page_reordered, self, G_CONNECT_AFTER);
#line 164 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_object_unref0 (_tmp28_);
#line 166 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_data1_->items = NULL;
#line 167 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp29_ = open_uris;
#line 167 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (_tmp29_ != NULL) {
#line 1697 "tabby.c"
		KatzeArray* _tmp30_ = NULL;
		GList* _tmp31_ = NULL;
#line 168 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp30_ = open_uris;
#line 168 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp31_ = katze_array_get_items (_tmp30_);
#line 168 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_data1_->items = g_list_concat (_data1_->items, _tmp31_);
#line 1706 "tabby.c"
	}
#line 170 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp32_ = tabs;
#line 170 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp33_ = katze_array_get_items (_tmp32_);
#line 170 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_data1_->items = g_list_concat (_data1_->items, _tmp33_);
#line 171 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp34_ = _data1_->items;
#line 171 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_data1_->u_items = _tmp34_;
#line 173 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_data1_->delay = FALSE;
#line 174 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_data1_->should_delay = FALSE;
#line 177 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp35_ = tabby_APP;
#line 177 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_object_get (_tmp35_, "settings", &_tmp36_, NULL);
#line 177 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp37_ = _tmp36_;
#line 177 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp38_ = _tmp37_;
#line 177 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_object_get ((GObject*) _tmp38_, "load-on-startup", &load_on_startup, NULL);
#line 177 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_object_unref0 (_tmp38_);
#line 178 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp39_ = load_on_startup;
#line 178 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_data1_->should_delay = _tmp39_ == ((gint) MIDORI_STARTUP_DELAYED_PAGES);
#line 180 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp40_ = tabby_APP;
#line 180 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp41_ = midori_app_get_crashed (_tmp40_);
#line 180 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp42_ = _tmp41_;
#line 180 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (_tmp42_ == TRUE) {
#line 181 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_data1_->delay = TRUE;
#line 182 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_data1_->should_delay = TRUE;
#line 1750 "tabby.c"
	}
#line 185 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	tabby_base_session_set_state (self, TABBY_SESSION_STATE_RESTORING);
#line 187 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda6__gsource_func, block1_data_ref (_data1_), block1_data_unref);
#line 136 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_object_unref0 (tabs);
#line 136 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	block1_data_unref (_data1_);
#line 136 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_data1_ = NULL;
#line 1762 "tabby.c"
}


static void tabby_base_session_real_close (TabbyBaseSession* self) {
	TabbySessionState _tmp0_ = 0;
#line 223 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = self->priv->_state;
#line 223 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (_tmp0_ == TABBY_SESSION_STATE_CLOSED) {
#line 1772 "tabby.c"
		MidoriBrowser* _tmp1_ = NULL;
#line 224 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp1_ = self->priv->_browser;
#line 224 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_vala_assert (_tmp1_ == NULL, "this.browser == null");
#line 1778 "tabby.c"
	} else {
		MidoriBrowser* _tmp2_ = NULL;
		guint _tmp3_ = 0U;
		MidoriBrowser* _tmp4_ = NULL;
		guint _tmp5_ = 0U;
		MidoriBrowser* _tmp6_ = NULL;
		guint _tmp7_ = 0U;
		MidoriBrowser* _tmp8_ = NULL;
		guint _tmp9_ = 0U;
		MidoriBrowser* _tmp10_ = NULL;
		guint _tmp11_ = 0U;
		MidoriBrowser* _tmp12_ = NULL;
		GtkNotebook* _tmp13_ = NULL;
		GtkNotebook* _tmp14_ = NULL;
		GtkNotebook* _tmp15_ = NULL;
		guint _tmp16_ = 0U;
#line 226 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		tabby_base_session_set_state (self, TABBY_SESSION_STATE_CLOSED);
#line 228 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp2_ = self->priv->_browser;
#line 228 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_signal_parse_name ("add-tab", MIDORI_TYPE_BROWSER, &_tmp3_, NULL, FALSE);
#line 228 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _tabby_base_session_tab_added_midori_browser_add_tab, self);
#line 229 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp4_ = self->priv->_browser;
#line 229 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_signal_parse_name ("add-tab", MIDORI_TYPE_BROWSER, &_tmp5_, NULL, FALSE);
#line 229 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_signal_handlers_disconnect_matched (_tmp4_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp5_, 0, NULL, (GCallback) _tabby_base_session_helper_data_changed_midori_browser_add_tab, self);
#line 230 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp6_ = self->priv->_browser;
#line 230 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_signal_parse_name ("remove-tab", MIDORI_TYPE_BROWSER, &_tmp7_, NULL, FALSE);
#line 230 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_signal_handlers_disconnect_matched (_tmp6_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp7_, 0, NULL, (GCallback) _tabby_base_session_tab_removed_midori_browser_remove_tab, self);
#line 231 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp8_ = self->priv->_browser;
#line 231 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_signal_parse_name ("switch-tab", MIDORI_TYPE_BROWSER, &_tmp9_, NULL, FALSE);
#line 231 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_signal_handlers_disconnect_matched (_tmp8_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp9_, 0, NULL, (GCallback) _tabby_base_session_tab_switched_midori_browser_switch_tab, self);
#line 232 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp10_ = self->priv->_browser;
#line 232 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_signal_parse_name ("delete-event", GTK_TYPE_WIDGET, &_tmp11_, NULL, FALSE);
#line 232 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_signal_handlers_disconnect_matched ((GtkWidget*) _tmp10_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp11_, 0, NULL, (GCallback) _tabby_base_session_delete_event_gtk_widget_delete_event, self);
#line 233 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp12_ = self->priv->_browser;
#line 233 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_object_get (_tmp12_, "notebook", &_tmp13_, NULL);
#line 233 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp14_ = _tmp13_;
#line 233 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp15_ = _tmp14_;
#line 233 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_signal_parse_name ("page-reordered", GTK_TYPE_NOTEBOOK, &_tmp16_, NULL, FALSE);
#line 233 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_signal_handlers_disconnect_matched (_tmp15_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp16_, 0, NULL, (GCallback) _tabby_base_session_tab_reordered_gtk_notebook_page_reordered, self);
#line 233 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_object_unref0 (_tmp15_);
#line 235 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		tabby_base_session_set_browser (self, NULL);
#line 1843 "tabby.c"
	}
}


void tabby_base_session_close (TabbyBaseSession* self) {
#line 222 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 222 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	TABBY_BASE_SESSION_GET_CLASS (self)->close (self);
#line 1853 "tabby.c"
}


gboolean tabby_base_session_delete_event (TabbyBaseSession* self, GtkWidget* widget, GdkEvent* event) {
	gboolean result = FALSE;
#line 242 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 242 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_val_if_fail (widget != NULL, FALSE);
#line 242 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_val_if_fail (event != NULL, FALSE);
#line 245 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	tabby_base_session_close (self);
#line 246 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	result = FALSE;
#line 246 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return result;
#line 1871 "tabby.c"
}


static gdouble double_parse (const gchar* str) {
	gdouble result = 0.0;
	const gchar* _tmp0_ = NULL;
	gdouble _tmp1_ = 0.0;
#line 789 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	g_return_val_if_fail (str != NULL, 0.0);
#line 790 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp0_ = str;
#line 790 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp1_ = g_ascii_strtod (_tmp0_, NULL);
#line 790 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	result = _tmp1_;
#line 790 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	return result;
#line 1889 "tabby.c"
}


gdouble tabby_base_session_get_tab_sorting (TabbyBaseSession* self, MidoriView* view) {
	gdouble result = 0.0;
	gint this_pos = 0;
	MidoriBrowser* _tmp0_ = NULL;
	GtkNotebook* _tmp1_ = NULL;
	GtkNotebook* _tmp2_ = NULL;
	GtkNotebook* _tmp3_ = NULL;
	MidoriView* _tmp4_ = NULL;
	gint _tmp5_ = 0;
	gint _tmp6_ = 0;
	MidoriView* prev_view = NULL;
	MidoriBrowser* _tmp7_ = NULL;
	GtkNotebook* _tmp8_ = NULL;
	GtkNotebook* _tmp9_ = NULL;
	GtkNotebook* _tmp10_ = NULL;
	gint _tmp11_ = 0;
	GtkWidget* _tmp12_ = NULL;
	MidoriView* _tmp13_ = NULL;
	MidoriView* _tmp14_ = NULL;
	MidoriView* next_view = NULL;
	MidoriBrowser* _tmp15_ = NULL;
	GtkNotebook* _tmp16_ = NULL;
	GtkNotebook* _tmp17_ = NULL;
	GtkNotebook* _tmp18_ = NULL;
	gint _tmp19_ = 0;
	GtkWidget* _tmp20_ = NULL;
	MidoriView* _tmp21_ = NULL;
	MidoriView* _tmp22_ = NULL;
	gchar* prev_meta_sorting = NULL;
	gchar* next_meta_sorting = NULL;
	gdouble prev_sorting = 0.0;
	gdouble next_sorting = 0.0;
	gdouble this_sorting = 0.0;
	MidoriView* _tmp23_ = NULL;
	const gchar* _tmp29_ = NULL;
	MidoriView* _tmp35_ = NULL;
	const gchar* _tmp41_ = NULL;
	gdouble _tmp45_ = 0.0;
	gdouble _tmp46_ = 0.0;
	gdouble _tmp47_ = 0.0;
#line 250 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_val_if_fail (self != NULL, 0.0);
#line 250 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_val_if_fail (view != NULL, 0.0);
#line 251 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = self->priv->_browser;
#line 251 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_object_get (_tmp0_, "notebook", &_tmp1_, NULL);
#line 251 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp2_ = _tmp1_;
#line 251 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp3_ = _tmp2_;
#line 251 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp4_ = view;
#line 251 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp5_ = gtk_notebook_page_num (_tmp3_, (GtkWidget*) _tmp4_);
#line 251 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp6_ = _tmp5_;
#line 251 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_object_unref0 (_tmp3_);
#line 251 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	this_pos = _tmp6_;
#line 252 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp7_ = self->priv->_browser;
#line 252 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_object_get (_tmp7_, "notebook", &_tmp8_, NULL);
#line 252 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp9_ = _tmp8_;
#line 252 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp10_ = _tmp9_;
#line 252 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp11_ = this_pos;
#line 252 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp12_ = gtk_notebook_get_nth_page (_tmp10_, _tmp11_ - 1);
#line 252 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp13_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp12_, MIDORI_TYPE_VIEW) ? ((MidoriView*) _tmp12_) : NULL);
#line 252 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp14_ = _tmp13_;
#line 252 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_object_unref0 (_tmp10_);
#line 252 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	prev_view = _tmp14_;
#line 253 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp15_ = self->priv->_browser;
#line 253 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_object_get (_tmp15_, "notebook", &_tmp16_, NULL);
#line 253 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp17_ = _tmp16_;
#line 253 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp18_ = _tmp17_;
#line 253 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp19_ = this_pos;
#line 253 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp20_ = gtk_notebook_get_nth_page (_tmp18_, _tmp19_ + 1);
#line 253 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp21_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp20_, MIDORI_TYPE_VIEW) ? ((MidoriView*) _tmp20_) : NULL);
#line 253 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp22_ = _tmp21_;
#line 253 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_object_unref0 (_tmp18_);
#line 253 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	next_view = _tmp22_;
#line 255 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	prev_meta_sorting = NULL;
#line 256 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	next_meta_sorting = NULL;
#line 259 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp23_ = prev_view;
#line 259 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (_tmp23_ != NULL) {
#line 2003 "tabby.c"
		KatzeItem* prev_item = NULL;
		MidoriView* _tmp24_ = NULL;
		KatzeItem* _tmp25_ = NULL;
		KatzeItem* _tmp26_ = NULL;
		const gchar* _tmp27_ = NULL;
		gchar* _tmp28_ = NULL;
#line 260 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp24_ = prev_view;
#line 260 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp25_ = midori_view_get_proxy_item (_tmp24_);
#line 260 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		prev_item = _tmp25_;
#line 261 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp26_ = prev_item;
#line 261 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp27_ = katze_item_get_meta_string (_tmp26_, "sorting");
#line 261 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp28_ = g_strdup (_tmp27_);
#line 261 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_free0 (prev_meta_sorting);
#line 261 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		prev_meta_sorting = _tmp28_;
#line 2026 "tabby.c"
	}
#line 264 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp29_ = prev_meta_sorting;
#line 264 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (_tmp29_ == NULL) {
#line 2032 "tabby.c"
		TabbySessionState _tmp30_ = 0;
#line 265 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp30_ = self->priv->_state;
#line 265 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		if (_tmp30_ == TABBY_SESSION_STATE_RESTORING) {
#line 2038 "tabby.c"
			gdouble _tmp31_ = 0.0;
#line 266 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp31_ = tabby_base_session_get_max_sorting (self);
#line 266 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			prev_sorting = _tmp31_;
#line 2044 "tabby.c"
		} else {
			gdouble _tmp32_ = 0.0;
#line 268 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp32_ = double_parse ("0");
#line 268 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			prev_sorting = _tmp32_;
#line 2051 "tabby.c"
		}
	} else {
		const gchar* _tmp33_ = NULL;
		gdouble _tmp34_ = 0.0;
#line 270 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp33_ = prev_meta_sorting;
#line 270 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp34_ = double_parse (_tmp33_);
#line 270 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		prev_sorting = _tmp34_;
#line 2062 "tabby.c"
	}
#line 272 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp35_ = next_view;
#line 272 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (_tmp35_ != NULL) {
#line 2068 "tabby.c"
		KatzeItem* next_item = NULL;
		MidoriView* _tmp36_ = NULL;
		KatzeItem* _tmp37_ = NULL;
		KatzeItem* _tmp38_ = NULL;
		const gchar* _tmp39_ = NULL;
		gchar* _tmp40_ = NULL;
#line 273 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp36_ = next_view;
#line 273 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp37_ = midori_view_get_proxy_item (_tmp36_);
#line 273 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		next_item = _tmp37_;
#line 274 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp38_ = next_item;
#line 274 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp39_ = katze_item_get_meta_string (_tmp38_, "sorting");
#line 274 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp40_ = g_strdup (_tmp39_);
#line 274 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_free0 (next_meta_sorting);
#line 274 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		next_meta_sorting = _tmp40_;
#line 2091 "tabby.c"
	}
#line 277 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp41_ = next_meta_sorting;
#line 277 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (_tmp41_ == NULL) {
#line 2097 "tabby.c"
		gdouble _tmp42_ = 0.0;
#line 278 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp42_ = prev_sorting;
#line 278 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		next_sorting = _tmp42_ + 2048;
#line 2103 "tabby.c"
	} else {
		const gchar* _tmp43_ = NULL;
		gdouble _tmp44_ = 0.0;
#line 280 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp43_ = next_meta_sorting;
#line 280 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp44_ = double_parse (_tmp43_);
#line 280 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		next_sorting = _tmp44_;
#line 2113 "tabby.c"
	}
#line 282 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp45_ = prev_sorting;
#line 282 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp46_ = next_sorting;
#line 282 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp47_ = prev_sorting;
#line 282 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	this_sorting = _tmp45_ + ((_tmp46_ - _tmp47_) / 2);
#line 284 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	result = this_sorting;
#line 284 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_free0 (next_meta_sorting);
#line 284 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_free0 (prev_meta_sorting);
#line 284 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_object_unref0 (next_view);
#line 284 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_object_unref0 (prev_view);
#line 284 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return result;
#line 2135 "tabby.c"
}


static Block2Data* block2_data_ref (Block2Data* _data2_) {
#line 287 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_atomic_int_inc (&_data2_->_ref_count_);
#line 287 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return _data2_;
#line 2144 "tabby.c"
}


static void block2_data_unref (void * _userdata_) {
	Block2Data* _data2_;
	_data2_ = (Block2Data*) _userdata_;
#line 287 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) {
#line 2153 "tabby.c"
		TabbyBaseSession* self;
#line 287 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		self = _data2_->self;
#line 287 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_object_unref0 (_data2_->view);
#line 287 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_object_unref0 (self);
#line 287 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_slice_free (Block2Data, _data2_);
#line 2163 "tabby.c"
	}
}


static void ____lambda4_ (Block2Data* _data2_) {
	TabbyBaseSession* self;
	MidoriView* _tmp0_ = NULL;
	MidoriView* _tmp1_ = NULL;
	WebKitWebView* _tmp2_ = NULL;
	WebKitWebView* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
#line 295 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self = _data2_->self;
#line 296 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = _data2_->view;
#line 296 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp1_ = _data2_->view;
#line 296 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp2_ = midori_tab_get_web_view ((MidoriTab*) _tmp1_);
#line 296 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp3_ = _tmp2_;
#line 296 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp4_ = webkit_web_view_get_uri (_tmp3_);
#line 296 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp5_ = _tmp4_;
#line 296 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	tabby_base_session_uri_changed (self, _tmp0_, _tmp5_);
#line 2192 "tabby.c"
}


static void _____lambda4__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 295 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	____lambda4_ (self);
#line 2199 "tabby.c"
}


static void ____lambda5_ (Block2Data* _data2_) {
	TabbyBaseSession* self;
	MidoriView* _tmp0_ = NULL;
#line 298 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self = _data2_->self;
#line 299 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = _data2_->view;
#line 299 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	tabby_base_session_data_changed (self, _tmp0_);
#line 2212 "tabby.c"
}


static void _____lambda5__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 298 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	____lambda5_ (self);
#line 2219 "tabby.c"
}


static void _tabby_base_session_load_status_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 304 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	tabby_base_session_load_status ((TabbyBaseSession*) self, _sender, pspec);
#line 2226 "tabby.c"
}


static void tabby_base_session_load_status (TabbyBaseSession* self, GObject* _view, GParamSpec* pspec) {
	Block2Data* _data2_;
	GObject* _tmp0_ = NULL;
	MidoriView* _tmp1_ = NULL;
	MidoriView* _tmp2_ = NULL;
	MidoriLoadStatus _tmp3_ = 0;
	MidoriLoadStatus _tmp4_ = 0;
#line 287 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 287 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (_view != NULL);
#line 287 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (pspec != NULL);
#line 287 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_data2_ = g_slice_new0 (Block2Data);
#line 287 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_data2_->_ref_count_ = 1;
#line 287 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_data2_->self = g_object_ref (self);
#line 288 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = _view;
#line 288 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, MIDORI_TYPE_VIEW, MidoriView));
#line 288 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_data2_->view = _tmp1_;
#line 290 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp2_ = _data2_->view;
#line 290 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp3_ = midori_tab_get_load_status ((MidoriTab*) _tmp2_);
#line 290 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp4_ = _tmp3_;
#line 290 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (_tmp4_ == MIDORI_LOAD_PROVISIONAL) {
#line 2263 "tabby.c"
		KatzeItem* item = NULL;
		MidoriView* _tmp5_ = NULL;
		KatzeItem* _tmp6_ = NULL;
		gint64 delay = 0LL;
		KatzeItem* _tmp7_ = NULL;
		gint64 _tmp8_ = 0LL;
		gint64 _tmp9_ = 0LL;
		MidoriView* _tmp16_ = NULL;
		guint _tmp17_ = 0U;
		GQuark _tmp18_ = 0U;
#line 291 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp5_ = _data2_->view;
#line 291 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp6_ = midori_view_get_proxy_item (_tmp5_);
#line 291 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		item = _tmp6_;
#line 293 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp7_ = item;
#line 293 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp8_ = katze_item_get_meta_integer (_tmp7_, "delay");
#line 293 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		delay = _tmp8_;
#line 294 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp9_ = delay;
#line 294 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		if (_tmp9_ == ((gint64) MIDORI_DELAY_UNDELAYED)) {
#line 2290 "tabby.c"
			MidoriView* _tmp10_ = NULL;
			WebKitWebView* _tmp11_ = NULL;
			WebKitWebView* _tmp12_ = NULL;
			MidoriView* _tmp13_ = NULL;
			WebKitWebView* _tmp14_ = NULL;
			WebKitWebView* _tmp15_ = NULL;
#line 295 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp10_ = _data2_->view;
#line 295 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp11_ = midori_tab_get_web_view ((MidoriTab*) _tmp10_);
#line 295 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp12_ = _tmp11_;
#line 295 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			g_signal_connect_data ((GObject*) _tmp12_, "notify::uri", (GCallback) _____lambda4__g_object_notify, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
#line 298 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp13_ = _data2_->view;
#line 298 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp14_ = midori_tab_get_web_view ((MidoriTab*) _tmp13_);
#line 298 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp15_ = _tmp14_;
#line 298 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			g_signal_connect_data ((GObject*) _tmp15_, "notify::title", (GCallback) _____lambda5__g_object_notify, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
#line 2313 "tabby.c"
		}
#line 304 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp16_ = _data2_->view;
#line 304 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_signal_parse_name ("notify::load-status", G_TYPE_OBJECT, &_tmp17_, &_tmp18_, TRUE);
#line 304 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_signal_handlers_disconnect_matched ((GObject*) _tmp16_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp17_, _tmp18_, NULL, (GCallback) _tabby_base_session_load_status_g_object_notify, self);
#line 2321 "tabby.c"
	}
#line 287 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	block2_data_unref (_data2_);
#line 287 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_data2_ = NULL;
#line 2327 "tabby.c"
}


static void _tabby_base_session_helper_duplicate_tab_midori_view_new_view (MidoriView* _sender, MidoriView* new_view, MidoriNewView where, gboolean user_initiated, gpointer self) {
#line 311 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	tabby_base_session_helper_duplicate_tab ((TabbyBaseSession*) self, _sender, new_view, where, user_initiated);
#line 2334 "tabby.c"
}


static void tabby_base_session_helper_data_changed (TabbyBaseSession* self, MidoriBrowser* browser, MidoriView* view) {
	MidoriView* _tmp0_ = NULL;
	MidoriView* _tmp1_ = NULL;
#line 308 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 308 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (browser != NULL);
#line 308 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (view != NULL);
#line 309 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = view;
#line 309 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_signal_connect_object ((GObject*) _tmp0_, "notify::load-status", (GCallback) _tabby_base_session_load_status_g_object_notify, self, 0);
#line 311 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp1_ = view;
#line 311 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_signal_connect_object (_tmp1_, "new-view", (GCallback) _tabby_base_session_helper_duplicate_tab_midori_view_new_view, self, 0);
#line 2355 "tabby.c"
}


static gint __lambda7_ (TabbyBaseSession* self, gdouble* a, gdouble* b) {
	gint result = 0;
	gdouble* _tmp0_ = NULL;
	gdouble* _tmp1_ = NULL;
#line 316 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = a;
#line 316 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp1_ = b;
#line 316 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if ((*_tmp0_) > (*_tmp1_)) {
#line 317 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		result = 1;
#line 317 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		return result;
#line 2373 "tabby.c"
	} else {
		gdouble* _tmp2_ = NULL;
		gdouble* _tmp3_ = NULL;
#line 318 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp2_ = a;
#line 318 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp3_ = b;
#line 318 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		if ((*_tmp2_) < (*_tmp3_)) {
#line 319 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			result = -1;
#line 319 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			return result;
#line 2387 "tabby.c"
		}
	}
#line 320 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	result = 0;
#line 320 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return result;
#line 2394 "tabby.c"
}


static gint ___lambda7__gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self) {
	gint result;
	result = __lambda7_ ((TabbyBaseSession*) self, (gdouble*) a, (gdouble*) b);
#line 315 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return result;
#line 2403 "tabby.c"
}


static gboolean _double_equal (const gdouble* s1, const gdouble* s2) {
#line 324 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (s1 == s2) {
#line 324 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		return TRUE;
#line 2412 "tabby.c"
	}
#line 324 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (s1 == NULL) {
#line 324 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		return FALSE;
#line 2418 "tabby.c"
	}
#line 324 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (s2 == NULL) {
#line 324 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		return FALSE;
#line 2424 "tabby.c"
	}
#line 324 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return (*s1) == (*s2);
#line 2428 "tabby.c"
}


static gint __lambda8_ (gdouble* a, gdouble* b) {
	gint result = 0;
	gint _tmp0_ = 0;
	gdouble* _tmp1_ = NULL;
	gdouble* _tmp2_ = NULL;
#line 324 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp1_ = a;
#line 324 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp2_ = b;
#line 324 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (_double_equal (_tmp1_, _tmp2_) == TRUE) {
#line 324 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp0_ = 0;
#line 2445 "tabby.c"
	} else {
#line 324 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp0_ = -1;
#line 2449 "tabby.c"
	}
#line 324 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	result = _tmp0_;
#line 324 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return result;
#line 2455 "tabby.c"
}


static gint ___lambda8__gcompare_func (gconstpointer a, gconstpointer b) {
	gint result;
	result = __lambda8_ ((gdouble*) a, (gdouble*) b);
#line 323 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return result;
#line 2464 "tabby.c"
}


static gboolean double_try_parse (const gchar* str, gdouble* _result_) {
	gdouble _vala_result = 0.0;
	gboolean result = FALSE;
	gchar* endptr = NULL;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	gdouble _tmp2_ = 0.0;
	gchar* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
	gint _tmp6_ = 0;
	gint _tmp7_ = 0;
#line 792 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	g_return_val_if_fail (str != NULL, FALSE);
#line 794 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp0_ = str;
#line 794 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp2_ = g_ascii_strtod (_tmp0_, &_tmp1_);
#line 794 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	endptr = _tmp1_;
#line 794 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_vala_result = _tmp2_;
#line 795 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp3_ = endptr;
#line 795 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp4_ = str;
#line 795 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp5_ = str;
#line 795 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp6_ = strlen (_tmp5_);
#line 795 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp7_ = _tmp6_;
#line 795 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	if (_tmp3_ == (((gchar*) _tmp4_) + _tmp7_)) {
#line 796 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		result = TRUE;
#line 796 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		if (_result_) {
#line 796 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
			*_result_ = _vala_result;
#line 2508 "tabby.c"
		}
#line 796 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		return result;
#line 2512 "tabby.c"
	} else {
#line 798 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		result = FALSE;
#line 798 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		if (_result_) {
#line 798 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
			*_result_ = _vala_result;
#line 2520 "tabby.c"
		}
#line 798 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		return result;
#line 2524 "tabby.c"
	}
#line 792 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	if (_result_) {
#line 792 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		*_result_ = _vala_result;
#line 2530 "tabby.c"
	}
}


static gdouble* _double_dup (gdouble* self) {
	gdouble* dup;
#line 337 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	dup = g_new0 (gdouble, 1);
#line 337 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	memcpy (dup, self, sizeof (gdouble));
#line 337 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return dup;
#line 2543 "tabby.c"
}


static gpointer __double_dup0 (gpointer self) {
#line 337 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return self ? _double_dup (self) : NULL;
#line 2550 "tabby.c"
}


static void tabby_base_session_helper_reorder_tabs (TabbyBaseSession* self, GPtrArray* new_tabs) {
	GCompareDataFunc helper_compare_data = NULL;
	void* helper_compare_data_target = NULL;
	GDestroyNotify helper_compare_data_target_destroy_notify = NULL;
	GCompareFunc helper_compare_func = NULL;
	MidoriBrowser* _tmp0_ = NULL;
	GtkNotebook* _tmp1_ = NULL;
	GtkNotebook* _tmp2_ = NULL;
	GtkNotebook* _tmp3_ = NULL;
	guint _tmp4_ = 0U;
	MidoriBrowser* _tmp39_ = NULL;
	GtkNotebook* _tmp40_ = NULL;
	GtkNotebook* _tmp41_ = NULL;
	GtkNotebook* _tmp42_ = NULL;
#line 314 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 314 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (new_tabs != NULL);
#line 315 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	helper_compare_data = ___lambda7__gcompare_data_func;
#line 315 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	helper_compare_data_target = g_object_ref (self);
#line 315 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	helper_compare_data_target_destroy_notify = g_object_unref;
#line 323 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	helper_compare_func = ___lambda8__gcompare_func;
#line 327 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = self->priv->_browser;
#line 327 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_object_get (_tmp0_, "notebook", &_tmp1_, NULL);
#line 327 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp2_ = _tmp1_;
#line 327 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp3_ = _tmp2_;
#line 327 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_signal_parse_name ("page-reordered", GTK_TYPE_NOTEBOOK, &_tmp4_, NULL, FALSE);
#line 327 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_signal_handlers_disconnect_matched (_tmp3_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp4_, 0, NULL, (GCallback) _tabby_base_session_tab_reordered_gtk_notebook_page_reordered, self);
#line 327 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_object_unref0 (_tmp3_);
#line 2594 "tabby.c"
	{
		gint i = 0;
#line 328 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		i = 0;
#line 2599 "tabby.c"
		{
			gboolean _tmp5_ = FALSE;
#line 328 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp5_ = TRUE;
#line 328 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			while (TRUE) {
#line 2606 "tabby.c"
				gint _tmp7_ = 0;
				GPtrArray* _tmp8_ = NULL;
				guint _tmp9_ = 0U;
				MidoriView* tab = NULL;
				GPtrArray* _tmp10_ = NULL;
				gint _tmp11_ = 0;
				void* _tmp12_ = NULL;
				MidoriView* _tmp13_ = NULL;
				KatzeItem* item = NULL;
				MidoriView* _tmp14_ = NULL;
				KatzeItem* _tmp15_ = NULL;
				gdouble sorting = 0.0;
				gchar* sorting_string = NULL;
				KatzeItem* _tmp16_ = NULL;
				const gchar* _tmp17_ = NULL;
				gchar* _tmp18_ = NULL;
				const gchar* _tmp19_ = NULL;
#line 328 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				if (!_tmp5_) {
#line 2626 "tabby.c"
					gint _tmp6_ = 0;
#line 328 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_tmp6_ = i;
#line 328 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					i = _tmp6_ + 1;
#line 2632 "tabby.c"
				}
#line 328 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp5_ = FALSE;
#line 328 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp7_ = i;
#line 328 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp8_ = new_tabs;
#line 328 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp9_ = _tmp8_->len;
#line 328 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				if (!(((guint) _tmp7_) < _tmp9_)) {
#line 328 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					break;
#line 2646 "tabby.c"
				}
#line 329 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp10_ = new_tabs;
#line 329 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp11_ = i;
#line 329 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp12_ = g_ptr_array_index (_tmp10_, (guint) _tmp11_);
#line 329 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp13_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp12_, MIDORI_TYPE_VIEW) ? ((MidoriView*) _tmp12_) : NULL);
#line 329 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				tab = _tmp13_;
#line 331 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp14_ = tab;
#line 331 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp15_ = midori_view_get_proxy_item (_tmp14_);
#line 331 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				item = _tmp15_;
#line 334 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp16_ = item;
#line 334 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp17_ = katze_item_get_meta_string (_tmp16_, "sorting");
#line 334 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp18_ = g_strdup (_tmp17_);
#line 334 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				sorting_string = _tmp18_;
#line 335 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp19_ = sorting_string;
#line 335 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				if (_tmp19_ != NULL) {
#line 2676 "tabby.c"
					KatzeItem* _tmp20_ = NULL;
					const gchar* _tmp21_ = NULL;
					gdouble _tmp22_ = 0.0;
					gboolean _tmp23_ = FALSE;
#line 336 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_tmp20_ = item;
#line 336 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_tmp21_ = katze_item_get_meta_string (_tmp20_, "sorting");
#line 336 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_tmp23_ = double_try_parse (_tmp21_, &_tmp22_);
#line 336 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					sorting = _tmp22_;
#line 336 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					if (_tmp23_) {
#line 2691 "tabby.c"
						gdouble _tmp24_ = 0.0;
						gdouble* _tmp25_ = NULL;
						GCompareDataFunc _tmp26_ = NULL;
						void* _tmp26__target = NULL;
						gint index = 0;
						GSList* _tmp27_ = NULL;
						GSList* _tmp28_ = NULL;
						gdouble _tmp29_ = 0.0;
						GCompareFunc _tmp30_ = NULL;
						GSList* _tmp31_ = NULL;
						gint _tmp32_ = 0;
						MidoriBrowser* _tmp33_ = NULL;
						GtkNotebook* _tmp34_ = NULL;
						GtkNotebook* _tmp35_ = NULL;
						GtkNotebook* _tmp36_ = NULL;
						MidoriView* _tmp37_ = NULL;
						gint _tmp38_ = 0;
#line 337 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						_tmp24_ = sorting;
#line 337 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						_tmp25_ = __double_dup0 (&_tmp24_);
#line 337 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						_tmp26_ = helper_compare_data;
#line 337 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						_tmp26__target = helper_compare_data_target;
#line 337 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						self->tab_sorting = g_slist_insert_sorted_with_data (self->tab_sorting, _tmp25_, _tmp26_, _tmp26__target);
#line 339 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						_tmp27_ = self->tab_sorting;
#line 339 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						_tmp28_ = self->tab_sorting;
#line 339 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						_tmp29_ = sorting;
#line 339 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						_tmp30_ = helper_compare_func;
#line 339 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						_tmp31_ = g_slist_find_custom (_tmp28_, &_tmp29_, _tmp30_);
#line 339 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						_tmp32_ = g_slist_position (_tmp27_, _tmp31_);
#line 339 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						index = _tmp32_;
#line 341 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						_tmp33_ = self->priv->_browser;
#line 341 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						g_object_get (_tmp33_, "notebook", &_tmp34_, NULL);
#line 341 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						_tmp35_ = _tmp34_;
#line 341 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						_tmp36_ = _tmp35_;
#line 341 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						_tmp37_ = tab;
#line 341 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						_tmp38_ = index;
#line 341 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						gtk_notebook_reorder_child (_tmp36_, (GtkWidget*) _tmp37_, _tmp38_);
#line 341 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						_g_object_unref0 (_tmp36_);
#line 2749 "tabby.c"
					}
				}
#line 328 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_g_free0 (sorting_string);
#line 328 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_g_object_unref0 (tab);
#line 2756 "tabby.c"
			}
		}
	}
#line 345 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp39_ = self->priv->_browser;
#line 345 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_object_get (_tmp39_, "notebook", &_tmp40_, NULL);
#line 345 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp41_ = _tmp40_;
#line 345 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp42_ = _tmp41_;
#line 345 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_signal_connect_object (_tmp42_, "page-reordered", (GCallback) _tabby_base_session_tab_reordered_gtk_notebook_page_reordered, self, G_CONNECT_AFTER);
#line 345 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_object_unref0 (_tmp42_);
#line 314 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	(helper_compare_data_target_destroy_notify == NULL) ? NULL : (helper_compare_data_target_destroy_notify (helper_compare_data_target), NULL);
#line 314 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	helper_compare_data = NULL;
#line 314 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	helper_compare_data_target = NULL;
#line 314 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	helper_compare_data_target_destroy_notify = NULL;
#line 2780 "tabby.c"
}


static void tabby_base_session_helper_duplicate_tab (TabbyBaseSession* self, MidoriView* view, MidoriView* new_view, MidoriNewView where, gboolean user_initiated) {
	KatzeItem* item = NULL;
	MidoriView* _tmp0_ = NULL;
	KatzeItem* _tmp1_ = NULL;
	KatzeItem* new_item = NULL;
	MidoriView* _tmp2_ = NULL;
	KatzeItem* _tmp3_ = NULL;
	gint64 tab_id = 0LL;
	KatzeItem* _tmp4_ = NULL;
	gint64 _tmp5_ = 0LL;
	gint64 new_tab_id = 0LL;
	KatzeItem* _tmp6_ = NULL;
	gint64 _tmp7_ = 0LL;
	gboolean _tmp8_ = FALSE;
	gint64 _tmp9_ = 0LL;
#line 348 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 348 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (view != NULL);
#line 348 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (new_view != NULL);
#line 349 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = view;
#line 349 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp1_ = midori_view_get_proxy_item (_tmp0_);
#line 349 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	item = _tmp1_;
#line 350 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp2_ = new_view;
#line 350 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp3_ = midori_view_get_proxy_item (_tmp2_);
#line 350 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	new_item = _tmp3_;
#line 351 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp4_ = item;
#line 351 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp5_ = katze_item_get_meta_integer (_tmp4_, "tabby-id");
#line 351 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	tab_id = _tmp5_;
#line 352 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp6_ = new_item;
#line 352 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp7_ = katze_item_get_meta_integer (_tmp6_, "tabby-id");
#line 352 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	new_tab_id = _tmp7_;
#line 354 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp9_ = tab_id;
#line 354 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (_tmp9_ > ((gint64) 0)) {
#line 2833 "tabby.c"
		gint64 _tmp10_ = 0LL;
		gint64 _tmp11_ = 0LL;
#line 354 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp10_ = tab_id;
#line 354 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp11_ = new_tab_id;
#line 354 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp8_ = _tmp10_ == _tmp11_;
#line 2842 "tabby.c"
	} else {
#line 354 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp8_ = FALSE;
#line 2846 "tabby.c"
	}
#line 354 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (_tmp8_) {
#line 2850 "tabby.c"
		KatzeItem* _tmp12_ = NULL;
#line 355 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp12_ = new_item;
#line 355 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		katze_item_set_meta_integer (_tmp12_, "tabby-id", (gint64) 0);
#line 2856 "tabby.c"
	}
}


TabbyBaseSession* tabby_base_session_construct (GType object_type) {
	TabbyBaseSession * self = NULL;
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self = (TabbyBaseSession*) g_object_new (object_type, NULL);
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return self;
#line 2867 "tabby.c"
}


MidoriBrowser* tabby_base_session_get_browser (TabbyBaseSession* self) {
	MidoriBrowser* result;
	MidoriBrowser* _tmp0_ = NULL;
#line 101 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 101 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = self->priv->_browser;
#line 101 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	result = _tmp0_;
#line 101 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return result;
#line 2882 "tabby.c"
}


void tabby_base_session_set_browser (TabbyBaseSession* self, MidoriBrowser* value) {
	MidoriBrowser* _tmp0_ = NULL;
	MidoriBrowser* _tmp1_ = NULL;
#line 101 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 101 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = value;
#line 101 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 101 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_object_unref0 (self->priv->_browser);
#line 101 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self->priv->_browser = _tmp1_;
#line 101 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_object_notify ((GObject *) self, "browser");
#line 2901 "tabby.c"
}


TabbySessionState tabby_base_session_get_state (TabbyBaseSession* self) {
	TabbySessionState result;
	TabbySessionState _tmp0_ = 0;
#line 102 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_val_if_fail (self != NULL, 0);
#line 102 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = self->priv->_state;
#line 102 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	result = _tmp0_;
#line 102 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return result;
#line 2916 "tabby.c"
}


void tabby_base_session_set_state (TabbyBaseSession* self, TabbySessionState value) {
	TabbySessionState _tmp0_ = 0;
#line 102 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 102 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = value;
#line 102 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self->priv->_state = _tmp0_;
#line 102 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_object_notify ((GObject *) self, "state");
#line 2930 "tabby.c"
}


static GObject * tabby_base_session_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	TabbyBaseSession * self;
#line 359 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	parent_class = G_OBJECT_CLASS (tabby_base_session_parent_class);
#line 359 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
#line 359 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TABBY_BASE_TYPE_SESSION, TabbyBaseSession);
#line 360 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	__g_slist_free__g_free0_0 (self->tab_sorting);
#line 360 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self->tab_sorting = NULL;
#line 359 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return obj;
#line 2950 "tabby.c"
}


static void tabby_base_session_class_init (TabbyBaseSessionClass * klass) {
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	tabby_base_session_parent_class = g_type_class_peek_parent (klass);
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_type_class_add_private (klass, sizeof (TabbyBaseSessionPrivate));
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	((TabbyBaseSessionClass *) klass)->add_item = tabby_base_session_real_add_item;
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	((TabbyBaseSessionClass *) klass)->uri_changed = tabby_base_session_real_uri_changed;
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	((TabbyBaseSessionClass *) klass)->data_changed = tabby_base_session_real_data_changed;
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	((TabbyBaseSessionClass *) klass)->tab_added = tabby_base_session_real_tab_added;
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	((TabbyBaseSessionClass *) klass)->tab_removed = tabby_base_session_real_tab_removed;
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	((TabbyBaseSessionClass *) klass)->tab_switched = tabby_base_session_real_tab_switched;
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	((TabbyBaseSessionClass *) klass)->tab_reordered = tabby_base_session_real_tab_reordered;
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	((TabbyBaseSessionClass *) klass)->remove = tabby_base_session_real_remove;
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	((TabbyBaseSessionClass *) klass)->get_tabs = tabby_base_session_real_get_tabs;
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	((TabbyBaseSessionClass *) klass)->get_max_sorting = tabby_base_session_real_get_max_sorting;
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	((TabbyBaseSessionClass *) klass)->close = tabby_base_session_real_close;
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_tabby_base_session_get_property;
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_tabby_base_session_set_property;
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	G_OBJECT_CLASS (klass)->constructor = tabby_base_session_constructor;
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	G_OBJECT_CLASS (klass)->finalize = tabby_base_session_finalize;
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), TABBY_BASE_SESSION_BROWSER, g_param_spec_object ("browser", "browser", "browser", MIDORI_TYPE_BROWSER, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), TABBY_BASE_SESSION_STATE, g_param_spec_enum ("state", "state", "state", TABBY_TYPE_SESSION_STATE, TABBY_SESSION_STATE_CLOSED, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 2993 "tabby.c"
}


static void tabby_base_session_tabby_isession_interface_init (TabbyISessionIface * iface) {
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	tabby_base_session_tabby_isession_parent_iface = g_type_interface_peek_parent (iface);
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	iface->add_item = (void (*)(TabbyISession*, KatzeItem*)) tabby_base_session_add_item;
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	iface->remove = (void (*)(TabbyISession*)) tabby_base_session_remove;
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	iface->get_tabs = (KatzeArray* (*)(TabbyISession*)) tabby_base_session_get_tabs;
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	iface->attach = (void (*)(TabbyISession*, MidoriBrowser*)) tabby_base_session_real_attach;
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	iface->restore = (void (*)(TabbyISession*, MidoriBrowser*)) tabby_base_session_real_restore;
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	iface->close = (void (*)(TabbyISession*)) tabby_base_session_close;
#line 3012 "tabby.c"
}


static void tabby_base_session_instance_init (TabbyBaseSession * self) {
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self->priv = TABBY_BASE_SESSION_GET_PRIVATE (self);
#line 101 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self->priv->_browser = NULL;
#line 102 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self->priv->_state = TABBY_SESSION_STATE_CLOSED;
#line 3023 "tabby.c"
}


static void tabby_base_session_finalize (GObject* obj) {
	TabbyBaseSession * self;
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TABBY_BASE_TYPE_SESSION, TabbyBaseSession);
#line 99 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	__g_slist_free__g_free0_0 (self->tab_sorting);
#line 101 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_object_unref0 (self->priv->_browser);
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	G_OBJECT_CLASS (tabby_base_session_parent_class)->finalize (obj);
#line 3037 "tabby.c"
}


GType tabby_base_session_get_type (void) {
	static volatile gsize tabby_base_session_type_id__volatile = 0;
	if (g_once_init_enter (&tabby_base_session_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (TabbyBaseSessionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tabby_base_session_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TabbyBaseSession), 0, (GInstanceInitFunc) tabby_base_session_instance_init, NULL };
		static const GInterfaceInfo tabby_isession_info = { (GInterfaceInitFunc) tabby_base_session_tabby_isession_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType tabby_base_session_type_id;
		tabby_base_session_type_id = g_type_register_static (G_TYPE_OBJECT, "TabbyBaseSession", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		g_type_add_interface_static (tabby_base_session_type_id, TABBY_TYPE_ISESSION, &tabby_isession_info);
		g_once_init_leave (&tabby_base_session_type_id__volatile, tabby_base_session_type_id);
	}
	return tabby_base_session_type_id__volatile;
}


static void _vala_tabby_base_session_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	TabbyBaseSession * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TABBY_BASE_TYPE_SESSION, TabbyBaseSession);
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	switch (property_id) {
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		case TABBY_BASE_SESSION_BROWSER:
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_value_set_object (value, tabby_base_session_get_browser (self));
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		break;
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		case TABBY_BASE_SESSION_STATE:
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_value_set_enum (value, tabby_base_session_get_state (self));
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		break;
#line 3072 "tabby.c"
		default:
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		break;
#line 3078 "tabby.c"
	}
}


static void _vala_tabby_base_session_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	TabbyBaseSession * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TABBY_BASE_TYPE_SESSION, TabbyBaseSession);
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	switch (property_id) {
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		case TABBY_BASE_SESSION_BROWSER:
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		tabby_base_session_set_browser (self, g_value_get_object (value));
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		break;
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		case TABBY_BASE_SESSION_STATE:
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		tabby_base_session_set_state (self, g_value_get_enum (value));
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		break;
#line 3100 "tabby.c"
		default:
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 98 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		break;
#line 3106 "tabby.c"
	}
}


static void tabby_local_session_real_add_item (TabbyBaseSession* base, KatzeItem* item) {
	TabbyLocalSession * self;
	GDateTime* time = NULL;
	GDateTime* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	KatzeItem* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	gchar* sorting = NULL;
	gchar* _tmp4_ = NULL;
	gchar* sqlcmd = NULL;
	gchar* _tmp5_ = NULL;
	gint64 tstamp = 0LL;
	KatzeItem* _tmp6_ = NULL;
	gint64 _tmp7_ = 0LL;
	gint64 _tmp8_ = 0LL;
	GError * _inner_error_ = NULL;
#line 370 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self = (TabbyLocalSession*) base;
#line 370 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (item != NULL);
#line 371 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = g_date_time_new_now_local ();
#line 371 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	time = _tmp0_;
#line 372 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp2_ = item;
#line 372 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp3_ = katze_item_get_meta_string (_tmp2_, "sorting");
#line 372 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp1_ = _tmp3_;
#line 372 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (_tmp1_ == NULL) {
#line 372 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp1_ = "1";
#line 3145 "tabby.c"
	}
#line 372 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp4_ = g_strdup (_tmp1_);
#line 372 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	sorting = _tmp4_;
#line 373 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp5_ = g_strdup ("INSERT INTO `tabs` (`crdate`, `tstamp`, `session_id`, `uri`, `title`, " \
"`sorting`) VALUES (:crdate, :tstamp, :session_id, :uri, :title, :sorti" \
"ng);");
#line 373 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	sqlcmd = _tmp5_;
#line 375 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp6_ = item;
#line 375 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp7_ = katze_item_get_meta_integer (_tmp6_, "tabby-tstamp");
#line 375 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	tstamp = _tmp7_;
#line 376 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp8_ = tstamp;
#line 376 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (_tmp8_ < ((gint64) 0)) {
#line 377 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		tstamp = (gint64) 0;
#line 3167 "tabby.c"
	}
	{
		MidoriDatabaseStatement* statement = NULL;
		MidoriDatabase* _tmp9_ = NULL;
		const gchar* _tmp10_ = NULL;
		GDateTime* _tmp11_ = NULL;
		gint64 _tmp12_ = 0LL;
		gint64 _tmp13_ = 0LL;
		gint64 _tmp14_ = 0LL;
		KatzeItem* _tmp15_ = NULL;
		const gchar* _tmp16_ = NULL;
		const gchar* _tmp17_ = NULL;
		KatzeItem* _tmp18_ = NULL;
		const gchar* _tmp19_ = NULL;
		const gchar* _tmp20_ = NULL;
		const gchar* _tmp21_ = NULL;
		gdouble _tmp22_ = 0.0;
		MidoriDatabaseStatement* _tmp23_ = NULL;
		MidoriDatabaseStatement* _tmp24_ = NULL;
		gint64 tab_id = 0LL;
		MidoriDatabaseStatement* _tmp25_ = NULL;
		gint64 _tmp26_ = 0LL;
		KatzeItem* _tmp27_ = NULL;
		gint64 _tmp28_ = 0LL;
#line 381 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp9_ = self->priv->database;
#line 381 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp10_ = sqlcmd;
#line 381 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp11_ = time;
#line 381 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp12_ = g_date_time_to_unix (_tmp11_);
#line 381 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp13_ = tstamp;
#line 381 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp14_ = self->priv->_id;
#line 381 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp15_ = item;
#line 381 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp16_ = katze_item_get_uri (_tmp15_);
#line 381 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp17_ = _tmp16_;
#line 381 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp18_ = item;
#line 381 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp19_ = katze_item_get_name (_tmp18_);
#line 381 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp20_ = _tmp19_;
#line 381 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp21_ = sorting;
#line 381 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp22_ = double_parse (_tmp21_);
#line 381 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp23_ = midori_database_prepare (_tmp9_, _tmp10_, &_inner_error_, ":crdate", G_TYPE_INT64, _tmp12_, ":tstamp", G_TYPE_INT64, _tmp13_, ":session_id", G_TYPE_INT64, _tmp14_, ":uri", G_TYPE_STRING, _tmp17_, ":title", G_TYPE_STRING, _tmp20_, ":sorting", G_TYPE_DOUBLE, _tmp22_, NULL);
#line 381 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		statement = _tmp23_;
#line 381 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 3226 "tabby.c"
			goto __catch0_g_error;
		}
#line 388 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp24_ = statement;
#line 388 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		midori_database_statement_exec (_tmp24_, &_inner_error_);
#line 388 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 388 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_g_object_unref0 (statement);
#line 3237 "tabby.c"
			goto __catch0_g_error;
		}
#line 389 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp25_ = statement;
#line 389 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp26_ = midori_database_statement_row_id (_tmp25_, &_inner_error_);
#line 389 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		tab_id = _tmp26_;
#line 389 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 389 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_g_object_unref0 (statement);
#line 3250 "tabby.c"
			goto __catch0_g_error;
		}
#line 390 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp27_ = item;
#line 390 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp28_ = tab_id;
#line 390 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		katze_item_set_meta_integer (_tmp27_, "tabby-id", _tmp28_);
#line 380 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_object_unref0 (statement);
#line 3261 "tabby.c"
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* _error_ = NULL;
		const gchar* _tmp29_ = NULL;
		GError* _tmp30_ = NULL;
		const gchar* _tmp31_ = NULL;
#line 380 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_error_ = _inner_error_;
#line 380 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_inner_error_ = NULL;
#line 392 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp29_ = _ ("Failed to update database: %s");
#line 392 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp30_ = _error_;
#line 392 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp31_ = _tmp30_->message;
#line 392 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_critical (_tmp29_, _tmp31_);
#line 380 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_error_free0 (_error_);
#line 3284 "tabby.c"
	}
	__finally0:
#line 380 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 380 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_free0 (sqlcmd);
#line 380 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_free0 (sorting);
#line 380 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_date_time_unref0 (time);
#line 380 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 380 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_clear_error (&_inner_error_);
#line 380 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		return;
#line 3301 "tabby.c"
	}
#line 370 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_free0 (sqlcmd);
#line 370 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_free0 (sorting);
#line 370 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_date_time_unref0 (time);
#line 3309 "tabby.c"
}


static void tabby_local_session_real_uri_changed (TabbyBaseSession* base, MidoriView* view, const gchar* uri) {
	TabbyLocalSession * self;
	KatzeItem* item = NULL;
	MidoriView* _tmp0_ = NULL;
	KatzeItem* _tmp1_ = NULL;
	gint64 tab_id = 0LL;
	KatzeItem* _tmp2_ = NULL;
	gint64 _tmp3_ = 0LL;
	gchar* sqlcmd = NULL;
	gchar* _tmp4_ = NULL;
	GError * _inner_error_ = NULL;
#line 396 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self = (TabbyLocalSession*) base;
#line 396 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (view != NULL);
#line 396 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (uri != NULL);
#line 397 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = view;
#line 397 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp1_ = midori_view_get_proxy_item (_tmp0_);
#line 397 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	item = _tmp1_;
#line 398 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp2_ = item;
#line 398 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp3_ = katze_item_get_meta_integer (_tmp2_, "tabby-id");
#line 398 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	tab_id = _tmp3_;
#line 399 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp4_ = g_strdup ("UPDATE `tabs` SET uri = :uri WHERE session_id = :session_id AND id = :" \
"tab_id;");
#line 399 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	sqlcmd = _tmp4_;
#line 3346 "tabby.c"
	{
		MidoriDatabaseStatement* _tmp5_ = NULL;
		MidoriDatabase* _tmp6_ = NULL;
		const gchar* _tmp7_ = NULL;
		const gchar* _tmp8_ = NULL;
		gint64 _tmp9_ = 0LL;
		gint64 _tmp10_ = 0LL;
		MidoriDatabaseStatement* _tmp11_ = NULL;
		MidoriDatabaseStatement* _tmp12_ = NULL;
		MidoriDatabaseStatement* _tmp13_ = NULL;
#line 401 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp6_ = self->priv->database;
#line 401 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp7_ = sqlcmd;
#line 401 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp8_ = uri;
#line 401 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp9_ = self->priv->_id;
#line 401 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp10_ = tab_id;
#line 401 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp11_ = midori_database_prepare (_tmp6_, _tmp7_, &_inner_error_, ":uri", G_TYPE_STRING, _tmp8_, ":session_id", G_TYPE_INT64, _tmp9_, ":tab_id", G_TYPE_INT64, _tmp10_, NULL);
#line 401 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp5_ = _tmp11_;
#line 401 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 3373 "tabby.c"
			goto __catch1_g_error;
		}
#line 401 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp12_ = _tmp5_;
#line 401 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp5_ = NULL;
#line 401 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp13_ = _tmp12_;
#line 401 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		midori_database_statement_exec (_tmp13_, &_inner_error_);
#line 401 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_object_unref0 (_tmp13_);
#line 401 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 401 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_g_object_unref0 (_tmp5_);
#line 3390 "tabby.c"
			goto __catch1_g_error;
		}
#line 400 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_object_unref0 (_tmp5_);
#line 3395 "tabby.c"
	}
	goto __finally1;
	__catch1_g_error:
	{
		GError* _error_ = NULL;
		const gchar* _tmp14_ = NULL;
		GError* _tmp15_ = NULL;
		const gchar* _tmp16_ = NULL;
#line 400 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_error_ = _inner_error_;
#line 400 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_inner_error_ = NULL;
#line 406 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp14_ = _ ("Failed to update database: %s");
#line 406 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp15_ = _error_;
#line 406 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp16_ = _tmp15_->message;
#line 406 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_critical (_tmp14_, _tmp16_);
#line 400 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_error_free0 (_error_);
#line 3418 "tabby.c"
	}
	__finally1:
#line 400 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 400 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_free0 (sqlcmd);
#line 400 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 400 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_clear_error (&_inner_error_);
#line 400 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		return;
#line 3431 "tabby.c"
	}
#line 396 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_free0 (sqlcmd);
#line 3435 "tabby.c"
}


static void tabby_local_session_real_data_changed (TabbyBaseSession* base, MidoriView* view) {
	TabbyLocalSession * self;
	KatzeItem* item = NULL;
	MidoriView* _tmp0_ = NULL;
	KatzeItem* _tmp1_ = NULL;
	gint64 tab_id = 0LL;
	KatzeItem* _tmp2_ = NULL;
	gint64 _tmp3_ = 0LL;
	gchar* sqlcmd = NULL;
	gchar* _tmp4_ = NULL;
	GError * _inner_error_ = NULL;
#line 410 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self = (TabbyLocalSession*) base;
#line 410 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (view != NULL);
#line 411 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = view;
#line 411 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp1_ = midori_view_get_proxy_item (_tmp0_);
#line 411 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	item = _tmp1_;
#line 412 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp2_ = item;
#line 412 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp3_ = katze_item_get_meta_integer (_tmp2_, "tabby-id");
#line 412 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	tab_id = _tmp3_;
#line 413 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp4_ = g_strdup ("UPDATE `tabs` SET title = :title WHERE session_id = :session_id AND id" \
" = :tab_id;");
#line 413 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	sqlcmd = _tmp4_;
#line 3470 "tabby.c"
	{
		MidoriDatabaseStatement* _tmp5_ = NULL;
		MidoriDatabase* _tmp6_ = NULL;
		const gchar* _tmp7_ = NULL;
		MidoriView* _tmp8_ = NULL;
		const gchar* _tmp9_ = NULL;
		gint64 _tmp10_ = 0LL;
		gint64 _tmp11_ = 0LL;
		MidoriDatabaseStatement* _tmp12_ = NULL;
		MidoriDatabaseStatement* _tmp13_ = NULL;
		MidoriDatabaseStatement* _tmp14_ = NULL;
#line 415 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp6_ = self->priv->database;
#line 415 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp7_ = sqlcmd;
#line 415 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp8_ = view;
#line 415 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp9_ = midori_view_get_display_title (_tmp8_);
#line 415 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp10_ = self->priv->_id;
#line 415 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp11_ = tab_id;
#line 415 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp12_ = midori_database_prepare (_tmp6_, _tmp7_, &_inner_error_, ":title", G_TYPE_STRING, _tmp9_, ":session_id", G_TYPE_INT64, _tmp10_, ":tab_id", G_TYPE_INT64, _tmp11_, NULL);
#line 415 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp5_ = _tmp12_;
#line 415 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 3500 "tabby.c"
			goto __catch2_g_error;
		}
#line 415 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp13_ = _tmp5_;
#line 415 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp5_ = NULL;
#line 415 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp14_ = _tmp13_;
#line 415 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		midori_database_statement_exec (_tmp14_, &_inner_error_);
#line 415 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_object_unref0 (_tmp14_);
#line 415 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 415 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_g_object_unref0 (_tmp5_);
#line 3517 "tabby.c"
			goto __catch2_g_error;
		}
#line 414 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_object_unref0 (_tmp5_);
#line 3522 "tabby.c"
	}
	goto __finally2;
	__catch2_g_error:
	{
		GError* _error_ = NULL;
		const gchar* _tmp15_ = NULL;
		GError* _tmp16_ = NULL;
		const gchar* _tmp17_ = NULL;
#line 414 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_error_ = _inner_error_;
#line 414 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_inner_error_ = NULL;
#line 420 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp15_ = _ ("Failed to update database: %s");
#line 420 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp16_ = _error_;
#line 420 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp17_ = _tmp16_->message;
#line 420 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_critical (_tmp15_, _tmp17_);
#line 414 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_error_free0 (_error_);
#line 3545 "tabby.c"
	}
	__finally2:
#line 414 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 414 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_free0 (sqlcmd);
#line 414 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 414 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_clear_error (&_inner_error_);
#line 414 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		return;
#line 3558 "tabby.c"
	}
#line 410 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_free0 (sqlcmd);
#line 3562 "tabby.c"
}


static void tabby_local_session_real_tab_added (TabbyBaseSession* base, MidoriBrowser* browser, MidoriView* view) {
	TabbyLocalSession * self;
	KatzeItem* item = NULL;
	MidoriView* _tmp0_ = NULL;
	KatzeItem* _tmp1_ = NULL;
	gint64 tab_id = 0LL;
	KatzeItem* _tmp2_ = NULL;
	gint64 _tmp3_ = 0LL;
	gint64 _tmp4_ = 0LL;
#line 424 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self = (TabbyLocalSession*) base;
#line 424 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (browser != NULL);
#line 424 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (view != NULL);
#line 425 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = view;
#line 425 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp1_ = midori_view_get_proxy_item (_tmp0_);
#line 425 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	item = _tmp1_;
#line 426 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp2_ = item;
#line 426 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp3_ = katze_item_get_meta_integer (_tmp2_, "tabby-id");
#line 426 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	tab_id = _tmp3_;
#line 427 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp4_ = tab_id;
#line 427 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (_tmp4_ < ((gint64) 1)) {
#line 3597 "tabby.c"
		gdouble sorting = 0.0;
		MidoriView* _tmp5_ = NULL;
		gdouble _tmp6_ = 0.0;
		KatzeItem* _tmp7_ = NULL;
		gdouble _tmp8_ = 0.0;
		gchar* _tmp9_ = NULL;
		gchar* _tmp10_ = NULL;
		KatzeItem* _tmp11_ = NULL;
#line 428 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp5_ = view;
#line 428 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp6_ = tabby_base_session_get_tab_sorting ((TabbyBaseSession*) self, _tmp5_);
#line 428 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		sorting = _tmp6_;
#line 429 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp7_ = item;
#line 429 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp8_ = sorting;
#line 429 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp9_ = double_to_string (_tmp8_);
#line 429 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp10_ = _tmp9_;
#line 429 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		katze_item_set_meta_string (_tmp7_, "sorting", _tmp10_);
#line 429 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_free0 (_tmp10_);
#line 430 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp11_ = item;
#line 430 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		tabby_base_session_add_item ((TabbyBaseSession*) self, _tmp11_);
#line 3628 "tabby.c"
	}
}


static void tabby_local_session_real_tab_removed (TabbyBaseSession* base, MidoriBrowser* browser, MidoriView* view) {
	TabbyLocalSession * self;
	KatzeItem* item = NULL;
	MidoriView* _tmp0_ = NULL;
	KatzeItem* _tmp1_ = NULL;
	gint64 tab_id = 0LL;
	KatzeItem* _tmp2_ = NULL;
	gint64 _tmp3_ = 0LL;
	gchar* sqlcmd = NULL;
	gchar* _tmp4_ = NULL;
	GError * _inner_error_ = NULL;
#line 434 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self = (TabbyLocalSession*) base;
#line 434 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (browser != NULL);
#line 434 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (view != NULL);
#line 435 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = view;
#line 435 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp1_ = midori_view_get_proxy_item (_tmp0_);
#line 435 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	item = _tmp1_;
#line 436 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp2_ = item;
#line 436 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp3_ = katze_item_get_meta_integer (_tmp2_, "tabby-id");
#line 436 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	tab_id = _tmp3_;
#line 438 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp4_ = g_strdup ("DELETE FROM `tabs` WHERE session_id = :session_id AND id = :tab_id;");
#line 438 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	sqlcmd = _tmp4_;
#line 3666 "tabby.c"
	{
		MidoriDatabaseStatement* _tmp5_ = NULL;
		MidoriDatabase* _tmp6_ = NULL;
		const gchar* _tmp7_ = NULL;
		gint64 _tmp8_ = 0LL;
		gint64 _tmp9_ = 0LL;
		MidoriDatabaseStatement* _tmp10_ = NULL;
		MidoriDatabaseStatement* _tmp11_ = NULL;
		MidoriDatabaseStatement* _tmp12_ = NULL;
#line 440 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp6_ = self->priv->database;
#line 440 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp7_ = sqlcmd;
#line 440 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp8_ = self->priv->_id;
#line 440 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp9_ = tab_id;
#line 440 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp10_ = midori_database_prepare (_tmp6_, _tmp7_, &_inner_error_, ":session_id", G_TYPE_INT64, _tmp8_, ":tab_id", G_TYPE_INT64, _tmp9_, NULL);
#line 440 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp5_ = _tmp10_;
#line 440 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 3690 "tabby.c"
			goto __catch3_g_error;
		}
#line 440 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp11_ = _tmp5_;
#line 440 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp5_ = NULL;
#line 440 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp12_ = _tmp11_;
#line 440 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		midori_database_statement_exec (_tmp12_, &_inner_error_);
#line 440 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_object_unref0 (_tmp12_);
#line 440 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 440 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_g_object_unref0 (_tmp5_);
#line 3707 "tabby.c"
			goto __catch3_g_error;
		}
#line 439 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_object_unref0 (_tmp5_);
#line 3712 "tabby.c"
	}
	goto __finally3;
	__catch3_g_error:
	{
		GError* _error_ = NULL;
		const gchar* _tmp13_ = NULL;
		GError* _tmp14_ = NULL;
		const gchar* _tmp15_ = NULL;
#line 439 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_error_ = _inner_error_;
#line 439 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_inner_error_ = NULL;
#line 444 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp13_ = _ ("Failed to update database: %s");
#line 444 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp14_ = _error_;
#line 444 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp15_ = _tmp14_->message;
#line 444 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_critical (_tmp13_, _tmp15_);
#line 439 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_error_free0 (_error_);
#line 3735 "tabby.c"
	}
	__finally3:
#line 439 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 439 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_free0 (sqlcmd);
#line 439 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 439 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_clear_error (&_inner_error_);
#line 439 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		return;
#line 3748 "tabby.c"
	}
#line 434 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_free0 (sqlcmd);
#line 3752 "tabby.c"
}


static void tabby_local_session_real_tab_switched (TabbyBaseSession* base, MidoriView* old_view, MidoriView* new_view) {
	TabbyLocalSession * self;
	GDateTime* time = NULL;
	GDateTime* _tmp0_ = NULL;
	KatzeItem* item = NULL;
	MidoriView* _tmp1_ = NULL;
	KatzeItem* _tmp2_ = NULL;
	gint64 tab_id = 0LL;
	KatzeItem* _tmp3_ = NULL;
	gint64 _tmp4_ = 0LL;
	gint64 tstamp = 0LL;
	GDateTime* _tmp5_ = NULL;
	gint64 _tmp6_ = 0LL;
	KatzeItem* _tmp7_ = NULL;
	gint64 _tmp8_ = 0LL;
	gchar* sqlcmd = NULL;
	gchar* _tmp9_ = NULL;
	GError * _inner_error_ = NULL;
#line 448 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self = (TabbyLocalSession*) base;
#line 449 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = g_date_time_new_now_local ();
#line 449 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	time = _tmp0_;
#line 450 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp1_ = new_view;
#line 450 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp2_ = midori_view_get_proxy_item (_tmp1_);
#line 450 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	item = _tmp2_;
#line 451 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp3_ = item;
#line 451 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp4_ = katze_item_get_meta_integer (_tmp3_, "tabby-id");
#line 451 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	tab_id = _tmp4_;
#line 452 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp5_ = time;
#line 452 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp6_ = g_date_time_to_unix (_tmp5_);
#line 452 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	tstamp = _tmp6_;
#line 453 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp7_ = item;
#line 453 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp8_ = tstamp;
#line 453 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	katze_item_set_meta_integer (_tmp7_, "tabby-tstamp", _tmp8_);
#line 454 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp9_ = g_strdup ("UPDATE `tabs` SET tstamp = :tstamp WHERE session_id = :session_id AND " \
"id = :tab_id;");
#line 454 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	sqlcmd = _tmp9_;
#line 3808 "tabby.c"
	{
		MidoriDatabaseStatement* _tmp10_ = NULL;
		MidoriDatabase* _tmp11_ = NULL;
		const gchar* _tmp12_ = NULL;
		gint64 _tmp13_ = 0LL;
		gint64 _tmp14_ = 0LL;
		gint64 _tmp15_ = 0LL;
		MidoriDatabaseStatement* _tmp16_ = NULL;
		MidoriDatabaseStatement* _tmp17_ = NULL;
		MidoriDatabaseStatement* _tmp18_ = NULL;
#line 456 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp11_ = self->priv->database;
#line 456 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp12_ = sqlcmd;
#line 456 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp13_ = self->priv->_id;
#line 456 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp14_ = tab_id;
#line 456 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp15_ = tstamp;
#line 456 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp16_ = midori_database_prepare (_tmp11_, _tmp12_, &_inner_error_, ":session_id", G_TYPE_INT64, _tmp13_, ":tab_id", G_TYPE_INT64, _tmp14_, ":tstamp", G_TYPE_INT64, _tmp15_, NULL);
#line 456 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp10_ = _tmp16_;
#line 456 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 3835 "tabby.c"
			goto __catch4_g_error;
		}
#line 456 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp17_ = _tmp10_;
#line 456 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp10_ = NULL;
#line 456 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp18_ = _tmp17_;
#line 456 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		midori_database_statement_exec (_tmp18_, &_inner_error_);
#line 456 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_object_unref0 (_tmp18_);
#line 456 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 456 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_g_object_unref0 (_tmp10_);
#line 3852 "tabby.c"
			goto __catch4_g_error;
		}
#line 455 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_object_unref0 (_tmp10_);
#line 3857 "tabby.c"
	}
	goto __finally4;
	__catch4_g_error:
	{
		GError* _error_ = NULL;
		const gchar* _tmp19_ = NULL;
		GError* _tmp20_ = NULL;
		const gchar* _tmp21_ = NULL;
#line 455 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_error_ = _inner_error_;
#line 455 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_inner_error_ = NULL;
#line 461 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp19_ = _ ("Failed to update database: %s");
#line 461 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp20_ = _error_;
#line 461 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp21_ = _tmp20_->message;
#line 461 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_critical (_tmp19_, _tmp21_);
#line 455 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_error_free0 (_error_);
#line 3880 "tabby.c"
	}
	__finally4:
#line 455 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 455 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_free0 (sqlcmd);
#line 455 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_date_time_unref0 (time);
#line 455 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 455 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_clear_error (&_inner_error_);
#line 455 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		return;
#line 3895 "tabby.c"
	}
#line 448 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_free0 (sqlcmd);
#line 448 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_date_time_unref0 (time);
#line 3901 "tabby.c"
}


static void tabby_local_session_real_tab_reordered (TabbyBaseSession* base, GtkWidget* tab, guint pos) {
	TabbyLocalSession * self;
	MidoriView* view = NULL;
	GtkWidget* _tmp0_ = NULL;
	MidoriView* _tmp1_ = NULL;
	gdouble sorting = 0.0;
	MidoriView* _tmp2_ = NULL;
	gdouble _tmp3_ = 0.0;
	KatzeItem* item = NULL;
	MidoriView* _tmp4_ = NULL;
	KatzeItem* _tmp5_ = NULL;
	gint64 tab_id = 0LL;
	KatzeItem* _tmp6_ = NULL;
	gint64 _tmp7_ = 0LL;
	gchar* sqlcmd = NULL;
	gchar* _tmp8_ = NULL;
	KatzeItem* _tmp21_ = NULL;
	gdouble _tmp22_ = 0.0;
	gchar* _tmp23_ = NULL;
	gchar* _tmp24_ = NULL;
	GError * _inner_error_ = NULL;
#line 465 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self = (TabbyLocalSession*) base;
#line 465 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (tab != NULL);
#line 466 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = tab;
#line 466 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, MIDORI_TYPE_VIEW) ? ((MidoriView*) _tmp0_) : NULL);
#line 466 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	view = _tmp1_;
#line 468 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp2_ = view;
#line 468 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp3_ = tabby_base_session_get_tab_sorting ((TabbyBaseSession*) self, _tmp2_);
#line 468 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	sorting = _tmp3_;
#line 469 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp4_ = view;
#line 469 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp5_ = midori_view_get_proxy_item (_tmp4_);
#line 469 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	item = _tmp5_;
#line 470 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp6_ = item;
#line 470 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp7_ = katze_item_get_meta_integer (_tmp6_, "tabby-id");
#line 470 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	tab_id = _tmp7_;
#line 471 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp8_ = g_strdup ("UPDATE `tabs` SET sorting = :sorting WHERE session_id = :session_id AN" \
"D id = :tab_id;");
#line 471 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	sqlcmd = _tmp8_;
#line 3958 "tabby.c"
	{
		MidoriDatabaseStatement* _tmp9_ = NULL;
		MidoriDatabase* _tmp10_ = NULL;
		const gchar* _tmp11_ = NULL;
		gint64 _tmp12_ = 0LL;
		gint64 _tmp13_ = 0LL;
		gdouble _tmp14_ = 0.0;
		MidoriDatabaseStatement* _tmp15_ = NULL;
		MidoriDatabaseStatement* _tmp16_ = NULL;
		MidoriDatabaseStatement* _tmp17_ = NULL;
#line 473 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp10_ = self->priv->database;
#line 473 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp11_ = sqlcmd;
#line 473 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp12_ = self->priv->_id;
#line 473 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp13_ = tab_id;
#line 473 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp14_ = sorting;
#line 473 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp15_ = midori_database_prepare (_tmp10_, _tmp11_, &_inner_error_, ":session_id", G_TYPE_INT64, _tmp12_, ":tab_id", G_TYPE_INT64, _tmp13_, ":sorting", G_TYPE_DOUBLE, _tmp14_, NULL);
#line 473 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp9_ = _tmp15_;
#line 473 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 3985 "tabby.c"
			goto __catch5_g_error;
		}
#line 473 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp16_ = _tmp9_;
#line 473 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp9_ = NULL;
#line 473 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp17_ = _tmp16_;
#line 473 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		midori_database_statement_exec (_tmp17_, &_inner_error_);
#line 473 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_object_unref0 (_tmp17_);
#line 473 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 473 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_g_object_unref0 (_tmp9_);
#line 4002 "tabby.c"
			goto __catch5_g_error;
		}
#line 472 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_object_unref0 (_tmp9_);
#line 4007 "tabby.c"
	}
	goto __finally5;
	__catch5_g_error:
	{
		GError* _error_ = NULL;
		const gchar* _tmp18_ = NULL;
		GError* _tmp19_ = NULL;
		const gchar* _tmp20_ = NULL;
#line 472 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_error_ = _inner_error_;
#line 472 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_inner_error_ = NULL;
#line 478 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp18_ = _ ("Failed to update database: %s");
#line 478 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp19_ = _error_;
#line 478 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp20_ = _tmp19_->message;
#line 478 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_critical (_tmp18_, _tmp20_);
#line 472 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_error_free0 (_error_);
#line 4030 "tabby.c"
	}
	__finally5:
#line 472 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 472 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_free0 (sqlcmd);
#line 472 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_object_unref0 (view);
#line 472 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 472 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_clear_error (&_inner_error_);
#line 472 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		return;
#line 4045 "tabby.c"
	}
#line 481 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp21_ = item;
#line 481 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp22_ = sorting;
#line 481 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp23_ = double_to_string (_tmp22_);
#line 481 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp24_ = _tmp23_;
#line 481 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	katze_item_set_meta_string (_tmp21_, "sorting", _tmp24_);
#line 481 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_free0 (_tmp24_);
#line 465 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_free0 (sqlcmd);
#line 465 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_object_unref0 (view);
#line 4063 "tabby.c"
}


static void tabby_local_session_real_remove (TabbyBaseSession* base) {
	TabbyLocalSession * self;
	gchar* sqlcmd = NULL;
	gchar* _tmp0_ = NULL;
	GError * _inner_error_ = NULL;
#line 484 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self = (TabbyLocalSession*) base;
#line 485 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = g_strdup ("\n" \
"                    DELETE FROM `tabs` WHERE session_id = :session_id;" \
"\n" \
"                    DELETE FROM `sessions` WHERE id = :session_id;\n" \
"                    ");
#line 485 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	sqlcmd = _tmp0_;
#line 4078 "tabby.c"
	{
		MidoriDatabaseStatement* _tmp1_ = NULL;
		MidoriDatabase* _tmp2_ = NULL;
		const gchar* _tmp3_ = NULL;
		gint64 _tmp4_ = 0LL;
		MidoriDatabaseStatement* _tmp5_ = NULL;
		MidoriDatabaseStatement* _tmp6_ = NULL;
		MidoriDatabaseStatement* _tmp7_ = NULL;
#line 490 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp2_ = self->priv->database;
#line 490 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp3_ = sqlcmd;
#line 490 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp4_ = self->priv->_id;
#line 490 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp5_ = midori_database_prepare (_tmp2_, _tmp3_, &_inner_error_, ":session_id", G_TYPE_INT64, _tmp4_, NULL);
#line 490 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp1_ = _tmp5_;
#line 490 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 4099 "tabby.c"
			goto __catch6_g_error;
		}
#line 490 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp6_ = _tmp1_;
#line 490 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp1_ = NULL;
#line 490 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp7_ = _tmp6_;
#line 490 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		midori_database_statement_exec (_tmp7_, &_inner_error_);
#line 490 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_object_unref0 (_tmp7_);
#line 490 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 490 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_g_object_unref0 (_tmp1_);
#line 4116 "tabby.c"
			goto __catch6_g_error;
		}
#line 489 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_object_unref0 (_tmp1_);
#line 4121 "tabby.c"
	}
	goto __finally6;
	__catch6_g_error:
	{
		GError* _error_ = NULL;
		const gchar* _tmp8_ = NULL;
		GError* _tmp9_ = NULL;
		const gchar* _tmp10_ = NULL;
#line 489 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_error_ = _inner_error_;
#line 489 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_inner_error_ = NULL;
#line 493 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp8_ = _ ("Failed to update database: %s");
#line 493 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp9_ = _error_;
#line 493 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp10_ = _tmp9_->message;
#line 493 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_critical (_tmp8_, _tmp10_);
#line 489 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_error_free0 (_error_);
#line 4144 "tabby.c"
	}
	__finally6:
#line 489 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 489 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_free0 (sqlcmd);
#line 489 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 489 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_clear_error (&_inner_error_);
#line 489 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		return;
#line 4157 "tabby.c"
	}
#line 484 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_free0 (sqlcmd);
#line 4161 "tabby.c"
}


static void tabby_local_session_real_close (TabbyBaseSession* base) {
	TabbyLocalSession * self;
	MidoriBrowser* my_browser = NULL;
	MidoriBrowser* _tmp0_ = NULL;
	MidoriBrowser* _tmp1_ = NULL;
	MidoriBrowser* _tmp2_ = NULL;
	gboolean should_break = FALSE;
	gboolean _tmp3_ = FALSE;
	MidoriBrowser* _tmp4_ = NULL;
	GDateTime* time = NULL;
	GDateTime* _tmp18_ = NULL;
	gchar* sqlcmd = NULL;
	gchar* _tmp19_ = NULL;
	GError * _inner_error_ = NULL;
#line 497 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self = (TabbyLocalSession*) base;
#line 499 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = tabby_base_session_get_browser ((TabbyBaseSession*) self);
#line 499 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp1_ = _tmp0_;
#line 499 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 499 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	my_browser = _tmp2_;
#line 500 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	TABBY_BASE_SESSION_CLASS (tabby_local_session_parent_class)->close (G_TYPE_CHECK_INSTANCE_CAST (self, TABBY_BASE_TYPE_SESSION, TabbyBaseSession));
#line 502 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	should_break = TRUE;
#line 503 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp4_ = my_browser;
#line 503 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (_tmp4_ != NULL) {
#line 4197 "tabby.c"
		MidoriBrowser* _tmp5_ = NULL;
		gboolean _tmp6_ = FALSE;
		gboolean _tmp7_ = FALSE;
#line 503 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp5_ = my_browser;
#line 503 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp6_ = gtk_window_get_destroy_with_parent ((GtkWindow*) _tmp5_);
#line 503 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp7_ = _tmp6_;
#line 503 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp3_ = !_tmp7_;
#line 4209 "tabby.c"
	} else {
#line 503 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp3_ = FALSE;
#line 4213 "tabby.c"
	}
#line 503 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (_tmp3_) {
#line 4217 "tabby.c"
		MidoriApp* _tmp8_ = NULL;
		GList* _tmp9_ = NULL;
		gboolean _tmp17_ = FALSE;
#line 504 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp8_ = tabby_APP;
#line 504 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp9_ = midori_app_get_browsers (_tmp8_);
#line 4225 "tabby.c"
		{
			GList* browser_collection = NULL;
			GList* browser_it = NULL;
#line 504 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			browser_collection = _tmp9_;
#line 504 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			for (browser_it = browser_collection; browser_it != NULL; browser_it = browser_it->next) {
#line 4233 "tabby.c"
				MidoriBrowser* _tmp10_ = NULL;
				MidoriBrowser* browser = NULL;
#line 504 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp10_ = _g_object_ref0 ((MidoriBrowser*) browser_it->data);
#line 504 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				browser = _tmp10_;
#line 4240 "tabby.c"
				{
					gboolean _tmp11_ = FALSE;
					MidoriBrowser* _tmp12_ = NULL;
					MidoriBrowser* _tmp13_ = NULL;
#line 505 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_tmp12_ = browser;
#line 505 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_tmp13_ = my_browser;
#line 505 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					if (_tmp12_ != _tmp13_) {
#line 4251 "tabby.c"
						MidoriBrowser* _tmp14_ = NULL;
						gboolean _tmp15_ = FALSE;
						gboolean _tmp16_ = FALSE;
#line 505 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						_tmp14_ = browser;
#line 505 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						_tmp15_ = gtk_window_get_destroy_with_parent ((GtkWindow*) _tmp14_);
#line 505 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						_tmp16_ = _tmp15_;
#line 505 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						_tmp11_ = !_tmp16_;
#line 4263 "tabby.c"
					} else {
#line 505 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						_tmp11_ = FALSE;
#line 4267 "tabby.c"
					}
#line 505 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					if (_tmp11_) {
#line 506 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						should_break = FALSE;
#line 507 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						_g_object_unref0 (browser);
#line 507 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						break;
#line 4277 "tabby.c"
					}
#line 504 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_g_object_unref0 (browser);
#line 4281 "tabby.c"
				}
			}
#line 504 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_g_list_free0 (browser_collection);
#line 4286 "tabby.c"
		}
#line 511 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp17_ = should_break;
#line 511 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		if (_tmp17_) {
#line 512 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_g_object_unref0 (my_browser);
#line 512 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			return;
#line 4296 "tabby.c"
		}
	}
#line 516 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp18_ = g_date_time_new_now_local ();
#line 516 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	time = _tmp18_;
#line 517 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp19_ = g_strdup ("UPDATE `sessions` SET closed = 1, tstamp = :tstamp WHERE id = :session" \
"_id;");
#line 517 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	sqlcmd = _tmp19_;
#line 4307 "tabby.c"
	{
		MidoriDatabaseStatement* _tmp20_ = NULL;
		MidoriDatabase* _tmp21_ = NULL;
		const gchar* _tmp22_ = NULL;
		gint64 _tmp23_ = 0LL;
		GDateTime* _tmp24_ = NULL;
		gint64 _tmp25_ = 0LL;
		MidoriDatabaseStatement* _tmp26_ = NULL;
		MidoriDatabaseStatement* _tmp27_ = NULL;
		MidoriDatabaseStatement* _tmp28_ = NULL;
#line 519 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp21_ = self->priv->database;
#line 519 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp22_ = sqlcmd;
#line 519 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp23_ = self->priv->_id;
#line 519 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp24_ = time;
#line 519 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp25_ = g_date_time_to_unix (_tmp24_);
#line 519 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp26_ = midori_database_prepare (_tmp21_, _tmp22_, &_inner_error_, ":session_id", G_TYPE_INT64, _tmp23_, ":tstamp", G_TYPE_INT64, _tmp25_, NULL);
#line 519 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp20_ = _tmp26_;
#line 519 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 4334 "tabby.c"
			goto __catch7_g_error;
		}
#line 519 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp27_ = _tmp20_;
#line 519 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp20_ = NULL;
#line 519 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp28_ = _tmp27_;
#line 519 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		midori_database_statement_exec (_tmp28_, &_inner_error_);
#line 519 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_object_unref0 (_tmp28_);
#line 519 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 519 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_g_object_unref0 (_tmp20_);
#line 4351 "tabby.c"
			goto __catch7_g_error;
		}
#line 518 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_object_unref0 (_tmp20_);
#line 4356 "tabby.c"
	}
	goto __finally7;
	__catch7_g_error:
	{
		GError* _error_ = NULL;
		const gchar* _tmp29_ = NULL;
		GError* _tmp30_ = NULL;
		const gchar* _tmp31_ = NULL;
#line 518 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_error_ = _inner_error_;
#line 518 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_inner_error_ = NULL;
#line 523 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp29_ = _ ("Failed to update database: %s");
#line 523 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp30_ = _error_;
#line 523 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp31_ = _tmp30_->message;
#line 523 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_critical (_tmp29_, _tmp31_);
#line 518 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_error_free0 (_error_);
#line 4379 "tabby.c"
	}
	__finally7:
#line 518 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 518 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_free0 (sqlcmd);
#line 518 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_date_time_unref0 (time);
#line 518 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_object_unref0 (my_browser);
#line 518 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 518 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_clear_error (&_inner_error_);
#line 518 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		return;
#line 4396 "tabby.c"
	}
#line 497 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_free0 (sqlcmd);
#line 497 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_date_time_unref0 (time);
#line 497 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_object_unref0 (my_browser);
#line 4404 "tabby.c"
}


static KatzeArray* tabby_local_session_real_get_tabs (TabbyBaseSession* base) {
	TabbyLocalSession * self;
	KatzeArray* result = NULL;
	KatzeArray* tabs = NULL;
	KatzeArray* _tmp0_ = NULL;
	gchar* sqlcmd = NULL;
	gchar* _tmp1_ = NULL;
	GError * _inner_error_ = NULL;
#line 527 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self = (TabbyLocalSession*) base;
#line 528 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = katze_array_new (KATZE_TYPE_ITEM);
#line 528 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	tabs = _tmp0_;
#line 530 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp1_ = g_strdup ("SELECT id, uri, title, sorting FROM tabs WHERE session_id = :session_i" \
"d ORDER BY tstamp DESC");
#line 530 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	sqlcmd = _tmp1_;
#line 4426 "tabby.c"
	{
		MidoriDatabaseStatement* statement = NULL;
		MidoriDatabase* _tmp2_ = NULL;
		const gchar* _tmp3_ = NULL;
		gint64 _tmp4_ = 0LL;
		MidoriDatabaseStatement* _tmp5_ = NULL;
#line 532 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp2_ = self->priv->database;
#line 532 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp3_ = sqlcmd;
#line 532 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp4_ = self->priv->_id;
#line 532 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp5_ = midori_database_prepare (_tmp2_, _tmp3_, &_inner_error_, ":session_id", G_TYPE_INT64, _tmp4_, NULL);
#line 532 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		statement = _tmp5_;
#line 532 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 4445 "tabby.c"
			goto __catch8_g_error;
		}
#line 534 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		while (TRUE) {
#line 4450 "tabby.c"
			gboolean _tmp6_ = FALSE;
			MidoriDatabaseStatement* _tmp7_ = NULL;
			gboolean _tmp8_ = FALSE;
			KatzeItem* item = NULL;
			KatzeItem* _tmp9_ = NULL;
			gint64 id = 0LL;
			MidoriDatabaseStatement* _tmp10_ = NULL;
			gint64 _tmp11_ = 0LL;
			gchar* uri = NULL;
			MidoriDatabaseStatement* _tmp12_ = NULL;
			gchar* _tmp13_ = NULL;
			gchar* title = NULL;
			MidoriDatabaseStatement* _tmp14_ = NULL;
			gchar* _tmp15_ = NULL;
			gdouble sorting = 0.0;
			MidoriDatabaseStatement* _tmp16_ = NULL;
			gdouble _tmp17_ = 0.0;
			KatzeItem* _tmp18_ = NULL;
			const gchar* _tmp19_ = NULL;
			KatzeItem* _tmp20_ = NULL;
			const gchar* _tmp21_ = NULL;
			KatzeItem* _tmp22_ = NULL;
			gint64 _tmp23_ = 0LL;
			KatzeItem* _tmp24_ = NULL;
			gdouble _tmp25_ = 0.0;
			gchar* _tmp26_ = NULL;
			gchar* _tmp27_ = NULL;
			KatzeItem* _tmp28_ = NULL;
			KatzeArray* _tmp29_ = NULL;
			KatzeItem* _tmp30_ = NULL;
#line 534 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp7_ = statement;
#line 534 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp8_ = midori_database_statement_step (_tmp7_, &_inner_error_);
#line 534 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp6_ = _tmp8_;
#line 534 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 534 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_g_object_unref0 (statement);
#line 4491 "tabby.c"
				goto __catch8_g_error;
			}
#line 534 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			if (!_tmp6_) {
#line 534 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				break;
#line 4498 "tabby.c"
			}
#line 535 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp9_ = katze_item_new ();
#line 535 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			item = _tmp9_;
#line 536 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp10_ = statement;
#line 536 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp11_ = midori_database_statement_get_int64 (_tmp10_, "id", &_inner_error_);
#line 536 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			id = _tmp11_;
#line 536 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 536 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_g_object_unref0 (item);
#line 536 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_g_object_unref0 (statement);
#line 4516 "tabby.c"
				goto __catch8_g_error;
			}
#line 537 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp12_ = statement;
#line 537 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp13_ = midori_database_statement_get_string (_tmp12_, "uri", &_inner_error_);
#line 537 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			uri = _tmp13_;
#line 537 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 537 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_g_object_unref0 (item);
#line 537 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_g_object_unref0 (statement);
#line 4531 "tabby.c"
				goto __catch8_g_error;
			}
#line 538 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp14_ = statement;
#line 538 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp15_ = midori_database_statement_get_string (_tmp14_, "title", &_inner_error_);
#line 538 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			title = _tmp15_;
#line 538 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 538 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_g_free0 (uri);
#line 538 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_g_object_unref0 (item);
#line 538 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_g_object_unref0 (statement);
#line 4548 "tabby.c"
				goto __catch8_g_error;
			}
#line 539 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp16_ = statement;
#line 539 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp17_ = midori_database_statement_get_double (_tmp16_, "sorting", &_inner_error_);
#line 539 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			sorting = _tmp17_;
#line 539 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 539 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_g_free0 (title);
#line 539 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_g_free0 (uri);
#line 539 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_g_object_unref0 (item);
#line 539 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_g_object_unref0 (statement);
#line 4567 "tabby.c"
				goto __catch8_g_error;
			}
#line 540 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp18_ = item;
#line 540 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp19_ = uri;
#line 540 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			katze_item_set_uri (_tmp18_, _tmp19_);
#line 541 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp20_ = item;
#line 541 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp21_ = title;
#line 541 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			katze_item_set_name (_tmp20_, _tmp21_);
#line 542 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp22_ = item;
#line 542 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp23_ = id;
#line 542 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			katze_item_set_meta_integer (_tmp22_, "tabby-id", _tmp23_);
#line 543 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp24_ = item;
#line 543 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp25_ = sorting;
#line 543 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp26_ = double_to_string (_tmp25_);
#line 543 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp27_ = _tmp26_;
#line 543 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			katze_item_set_meta_string (_tmp24_, "sorting", _tmp27_);
#line 543 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_g_free0 (_tmp27_);
#line 545 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp28_ = item;
#line 545 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			katze_item_set_meta_string (_tmp28_, "history-step", "ignore");
#line 546 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp29_ = tabs;
#line 546 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp30_ = item;
#line 546 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			g_signal_emit_by_name (_tmp29_, "add-item", (GObject*) _tmp30_);
#line 534 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_g_free0 (title);
#line 534 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_g_free0 (uri);
#line 534 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_g_object_unref0 (item);
#line 4616 "tabby.c"
		}
#line 531 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_object_unref0 (statement);
#line 4620 "tabby.c"
	}
	goto __finally8;
	__catch8_g_error:
	{
		GError* _error_ = NULL;
		const gchar* _tmp31_ = NULL;
		GError* _tmp32_ = NULL;
		const gchar* _tmp33_ = NULL;
#line 531 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_error_ = _inner_error_;
#line 531 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_inner_error_ = NULL;
#line 549 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp31_ = _ ("Failed to select from database: %s");
#line 549 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp32_ = _error_;
#line 549 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp33_ = _tmp32_->message;
#line 549 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_critical (_tmp31_, _tmp33_);
#line 531 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_error_free0 (_error_);
#line 4643 "tabby.c"
	}
	__finally8:
#line 531 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 531 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_free0 (sqlcmd);
#line 531 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_object_unref0 (tabs);
#line 531 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 531 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_clear_error (&_inner_error_);
#line 531 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		return NULL;
#line 4658 "tabby.c"
	}
#line 551 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	result = tabs;
#line 551 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_free0 (sqlcmd);
#line 551 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return result;
#line 4666 "tabby.c"
}


static gdouble tabby_local_session_real_get_max_sorting (TabbyBaseSession* base) {
	TabbyLocalSession * self;
	gdouble result = 0.0;
	gchar* sqlcmd = NULL;
	gchar* _tmp0_ = NULL;
	gdouble _tmp17_ = 0.0;
	GError * _inner_error_ = NULL;
#line 554 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self = (TabbyLocalSession*) base;
#line 555 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = g_strdup ("SELECT MAX(sorting) FROM tabs WHERE session_id = :session_id");
#line 555 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	sqlcmd = _tmp0_;
#line 4683 "tabby.c"
	{
		MidoriDatabaseStatement* statement = NULL;
		MidoriDatabase* _tmp1_ = NULL;
		const gchar* _tmp2_ = NULL;
		gint64 _tmp3_ = 0LL;
		MidoriDatabaseStatement* _tmp4_ = NULL;
		MidoriDatabaseStatement* _tmp5_ = NULL;
		gdouble sorting = 0.0;
		gint64 _tmp6_ = 0LL;
		MidoriDatabaseStatement* _tmp7_ = NULL;
		gint64 _tmp8_ = 0LL;
		gchar* sorting_string = NULL;
		gchar* _tmp9_ = NULL;
		const gchar* _tmp10_ = NULL;
#line 557 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp1_ = self->priv->database;
#line 557 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp2_ = sqlcmd;
#line 557 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp3_ = self->priv->_id;
#line 557 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp4_ = midori_database_prepare (_tmp1_, _tmp2_, &_inner_error_, ":session_id", G_TYPE_INT64, _tmp3_, NULL);
#line 557 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		statement = _tmp4_;
#line 557 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 4710 "tabby.c"
			goto __catch9_g_error;
		}
#line 559 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp5_ = statement;
#line 559 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		midori_database_statement_step (_tmp5_, &_inner_error_);
#line 559 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 559 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_g_object_unref0 (statement);
#line 4721 "tabby.c"
			goto __catch9_g_error;
		}
#line 561 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp7_ = statement;
#line 561 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp8_ = midori_database_statement_get_int64 (_tmp7_, "MAX(sorting)", &_inner_error_);
#line 561 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp6_ = _tmp8_;
#line 561 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 561 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_g_object_unref0 (statement);
#line 4734 "tabby.c"
			goto __catch9_g_error;
		}
#line 561 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp9_ = g_strdup_printf ("%" G_GINT64_FORMAT, _tmp6_);
#line 561 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		sorting_string = _tmp9_;
#line 562 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp10_ = sorting_string;
#line 562 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		if (_tmp10_ != NULL) {
#line 4745 "tabby.c"
			const gchar* _tmp11_ = NULL;
			gdouble _tmp12_ = 0.0;
			gboolean _tmp13_ = FALSE;
#line 565 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp11_ = sorting_string;
#line 565 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp13_ = double_try_parse (_tmp11_, &_tmp12_);
#line 565 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			sorting = _tmp12_;
#line 565 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			if (_tmp13_) {
#line 566 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				result = sorting;
#line 566 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_g_free0 (sorting_string);
#line 566 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_g_object_unref0 (statement);
#line 566 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_g_free0 (sqlcmd);
#line 566 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				return result;
#line 4767 "tabby.c"
			}
		}
#line 556 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_free0 (sorting_string);
#line 556 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_object_unref0 (statement);
#line 4774 "tabby.c"
	}
	goto __finally9;
	__catch9_g_error:
	{
		GError* _error_ = NULL;
		const gchar* _tmp14_ = NULL;
		GError* _tmp15_ = NULL;
		const gchar* _tmp16_ = NULL;
#line 556 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_error_ = _inner_error_;
#line 556 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_inner_error_ = NULL;
#line 570 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp14_ = _ ("Failed to select from database: %s");
#line 570 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp15_ = _error_;
#line 570 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp16_ = _tmp15_->message;
#line 570 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_critical (_tmp14_, _tmp16_);
#line 556 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_error_free0 (_error_);
#line 4797 "tabby.c"
	}
	__finally9:
#line 556 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 556 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_free0 (sqlcmd);
#line 556 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 556 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_clear_error (&_inner_error_);
#line 556 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		return 0.0;
#line 4810 "tabby.c"
	}
#line 573 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp17_ = double_parse ("0");
#line 573 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	result = _tmp17_;
#line 573 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_free0 (sqlcmd);
#line 573 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return result;
#line 4820 "tabby.c"
}


TabbyLocalSession* tabby_local_session_construct (GType object_type, MidoriDatabase* database) {
	TabbyLocalSession * self = NULL;
	MidoriDatabase* _tmp0_ = NULL;
	MidoriDatabase* _tmp1_ = NULL;
	GDateTime* time = NULL;
	GDateTime* _tmp2_ = NULL;
	gchar* sqlcmd = NULL;
	gchar* _tmp3_ = NULL;
	GError * _inner_error_ = NULL;
#line 576 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_val_if_fail (database != NULL, NULL);
#line 576 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self = (TabbyLocalSession*) tabby_base_session_construct (object_type);
#line 577 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = database;
#line 577 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 577 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_object_unref0 (self->priv->database);
#line 577 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self->priv->database = _tmp1_;
#line 579 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp2_ = g_date_time_new_now_local ();
#line 579 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	time = _tmp2_;
#line 581 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp3_ = g_strdup ("INSERT INTO `sessions` (`tstamp`) VALUES (:tstamp);");
#line 581 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	sqlcmd = _tmp3_;
#line 4853 "tabby.c"
	{
		MidoriDatabaseStatement* statement = NULL;
		MidoriDatabase* _tmp4_ = NULL;
		const gchar* _tmp5_ = NULL;
		GDateTime* _tmp6_ = NULL;
		gint64 _tmp7_ = 0LL;
		MidoriDatabaseStatement* _tmp8_ = NULL;
		MidoriDatabaseStatement* _tmp9_ = NULL;
		gint64 _tmp10_ = 0LL;
		MidoriDatabaseStatement* _tmp11_ = NULL;
		gint64 _tmp12_ = 0LL;
#line 584 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp4_ = database;
#line 584 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp5_ = sqlcmd;
#line 584 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp6_ = time;
#line 584 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp7_ = g_date_time_to_unix (_tmp6_);
#line 584 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp8_ = midori_database_prepare (_tmp4_, _tmp5_, &_inner_error_, ":tstamp", G_TYPE_INT64, _tmp7_, NULL);
#line 584 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		statement = _tmp8_;
#line 584 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 4879 "tabby.c"
			goto __catch10_g_error;
		}
#line 586 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp9_ = statement;
#line 586 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		midori_database_statement_exec (_tmp9_, &_inner_error_);
#line 586 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 586 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_g_object_unref0 (statement);
#line 4890 "tabby.c"
			goto __catch10_g_error;
		}
#line 587 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp11_ = statement;
#line 587 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp12_ = midori_database_statement_row_id (_tmp11_, &_inner_error_);
#line 587 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp10_ = _tmp12_;
#line 587 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 587 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_g_object_unref0 (statement);
#line 4903 "tabby.c"
			goto __catch10_g_error;
		}
#line 587 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		tabby_local_session_set_id (self, _tmp10_);
#line 583 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_object_unref0 (statement);
#line 4910 "tabby.c"
	}
	goto __finally10;
	__catch10_g_error:
	{
		GError* _error_ = NULL;
		const gchar* _tmp13_ = NULL;
		GError* _tmp14_ = NULL;
		const gchar* _tmp15_ = NULL;
#line 583 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_error_ = _inner_error_;
#line 583 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_inner_error_ = NULL;
#line 589 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp13_ = _ ("Failed to update database: %s");
#line 589 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp14_ = _error_;
#line 589 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp15_ = _tmp14_->message;
#line 589 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_critical (_tmp13_, _tmp15_);
#line 583 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_error_free0 (_error_);
#line 4933 "tabby.c"
	}
	__finally10:
#line 583 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 583 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_free0 (sqlcmd);
#line 583 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_date_time_unref0 (time);
#line 583 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 583 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_clear_error (&_inner_error_);
#line 583 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		return NULL;
#line 4948 "tabby.c"
	}
#line 576 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_free0 (sqlcmd);
#line 576 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_date_time_unref0 (time);
#line 576 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return self;
#line 4956 "tabby.c"
}


TabbyLocalSession* tabby_local_session_new (MidoriDatabase* database) {
#line 576 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return tabby_local_session_construct (TABBY_LOCAL_TYPE_SESSION, database);
#line 4963 "tabby.c"
}


TabbyLocalSession* tabby_local_session_construct_with_id (GType object_type, MidoriDatabase* database, gint64 id) {
	TabbyLocalSession * self = NULL;
	MidoriDatabase* _tmp0_ = NULL;
	MidoriDatabase* _tmp1_ = NULL;
	gint64 _tmp2_ = 0LL;
	GDateTime* time = NULL;
	GDateTime* _tmp3_ = NULL;
	gchar* sqlcmd = NULL;
	gchar* _tmp4_ = NULL;
	GError * _inner_error_ = NULL;
#line 593 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_val_if_fail (database != NULL, NULL);
#line 593 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self = (TabbyLocalSession*) tabby_base_session_construct (object_type);
#line 594 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = database;
#line 594 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 594 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_object_unref0 (self->priv->database);
#line 594 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self->priv->database = _tmp1_;
#line 595 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp2_ = id;
#line 595 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	tabby_local_session_set_id (self, _tmp2_);
#line 597 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp3_ = g_date_time_new_now_local ();
#line 597 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	time = _tmp3_;
#line 598 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp4_ = g_strdup ("UPDATE `sessions` SET closed = 0, tstamp = :tstamp WHERE id = :session" \
"_id;");
#line 598 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	sqlcmd = _tmp4_;
#line 5001 "tabby.c"
	{
		MidoriDatabaseStatement* _tmp5_ = NULL;
		MidoriDatabase* _tmp6_ = NULL;
		const gchar* _tmp7_ = NULL;
		gint64 _tmp8_ = 0LL;
		GDateTime* _tmp9_ = NULL;
		gint64 _tmp10_ = 0LL;
		MidoriDatabaseStatement* _tmp11_ = NULL;
		MidoriDatabaseStatement* _tmp12_ = NULL;
		MidoriDatabaseStatement* _tmp13_ = NULL;
#line 601 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp6_ = database;
#line 601 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp7_ = sqlcmd;
#line 601 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp8_ = self->priv->_id;
#line 601 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp9_ = time;
#line 601 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp10_ = g_date_time_to_unix (_tmp9_);
#line 601 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp11_ = midori_database_prepare (_tmp6_, _tmp7_, &_inner_error_, ":session_id", G_TYPE_INT64, _tmp8_, ":tstamp", G_TYPE_INT64, _tmp10_, NULL);
#line 601 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp5_ = _tmp11_;
#line 601 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 5028 "tabby.c"
			goto __catch11_g_error;
		}
#line 601 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp12_ = _tmp5_;
#line 601 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp5_ = NULL;
#line 601 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp13_ = _tmp12_;
#line 601 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		midori_database_statement_exec (_tmp13_, &_inner_error_);
#line 601 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_object_unref0 (_tmp13_);
#line 601 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 601 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_g_object_unref0 (_tmp5_);
#line 5045 "tabby.c"
			goto __catch11_g_error;
		}
#line 600 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_object_unref0 (_tmp5_);
#line 5050 "tabby.c"
	}
	goto __finally11;
	__catch11_g_error:
	{
		GError* _error_ = NULL;
		const gchar* _tmp14_ = NULL;
		GError* _tmp15_ = NULL;
		const gchar* _tmp16_ = NULL;
#line 600 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_error_ = _inner_error_;
#line 600 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_inner_error_ = NULL;
#line 605 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp14_ = _ ("Failed to update database: %s");
#line 605 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp15_ = _error_;
#line 605 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp16_ = _tmp15_->message;
#line 605 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_critical (_tmp14_, _tmp16_);
#line 600 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_error_free0 (_error_);
#line 5073 "tabby.c"
	}
	__finally11:
#line 600 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 600 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_free0 (sqlcmd);
#line 600 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_date_time_unref0 (time);
#line 600 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 600 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_clear_error (&_inner_error_);
#line 600 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		return NULL;
#line 5088 "tabby.c"
	}
#line 593 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_free0 (sqlcmd);
#line 593 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_date_time_unref0 (time);
#line 593 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return self;
#line 5096 "tabby.c"
}


TabbyLocalSession* tabby_local_session_new_with_id (MidoriDatabase* database, gint64 id) {
#line 593 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return tabby_local_session_construct_with_id (TABBY_LOCAL_TYPE_SESSION, database, id);
#line 5103 "tabby.c"
}


gint64 tabby_local_session_get_id (TabbyLocalSession* self) {
	gint64 result;
	gint64 _tmp0_ = 0LL;
#line 367 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_val_if_fail (self != NULL, 0LL);
#line 367 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = self->priv->_id;
#line 367 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	result = _tmp0_;
#line 367 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return result;
#line 5118 "tabby.c"
}


static void tabby_local_session_set_id (TabbyLocalSession* self, gint64 value) {
	gint64 _tmp0_ = 0LL;
#line 367 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 367 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = value;
#line 367 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self->priv->_id = _tmp0_;
#line 367 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_object_notify ((GObject *) self, "id");
#line 5132 "tabby.c"
}


static void tabby_local_session_class_init (TabbyLocalSessionClass * klass) {
#line 366 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	tabby_local_session_parent_class = g_type_class_peek_parent (klass);
#line 366 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_type_class_add_private (klass, sizeof (TabbyLocalSessionPrivate));
#line 366 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	((TabbyBaseSessionClass *) klass)->add_item = tabby_local_session_real_add_item;
#line 366 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	((TabbyBaseSessionClass *) klass)->uri_changed = tabby_local_session_real_uri_changed;
#line 366 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	((TabbyBaseSessionClass *) klass)->data_changed = tabby_local_session_real_data_changed;
#line 366 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	((TabbyBaseSessionClass *) klass)->tab_added = tabby_local_session_real_tab_added;
#line 366 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	((TabbyBaseSessionClass *) klass)->tab_removed = tabby_local_session_real_tab_removed;
#line 366 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	((TabbyBaseSessionClass *) klass)->tab_switched = tabby_local_session_real_tab_switched;
#line 366 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	((TabbyBaseSessionClass *) klass)->tab_reordered = tabby_local_session_real_tab_reordered;
#line 366 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	((TabbyBaseSessionClass *) klass)->remove = tabby_local_session_real_remove;
#line 366 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	((TabbyBaseSessionClass *) klass)->close = tabby_local_session_real_close;
#line 366 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	((TabbyBaseSessionClass *) klass)->get_tabs = tabby_local_session_real_get_tabs;
#line 366 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	((TabbyBaseSessionClass *) klass)->get_max_sorting = tabby_local_session_real_get_max_sorting;
#line 366 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_tabby_local_session_get_property;
#line 366 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_tabby_local_session_set_property;
#line 366 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	G_OBJECT_CLASS (klass)->finalize = tabby_local_session_finalize;
#line 366 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), TABBY_LOCAL_SESSION_ID, g_param_spec_int64 ("id", "id", "id", G_MININT64, G_MAXINT64, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 5171 "tabby.c"
}


static void tabby_local_session_instance_init (TabbyLocalSession * self) {
#line 366 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self->priv = TABBY_LOCAL_SESSION_GET_PRIVATE (self);
#line 5178 "tabby.c"
}


static void tabby_local_session_finalize (GObject* obj) {
	TabbyLocalSession * self;
#line 366 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TABBY_LOCAL_TYPE_SESSION, TabbyLocalSession);
#line 368 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_object_unref0 (self->priv->database);
#line 366 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	G_OBJECT_CLASS (tabby_local_session_parent_class)->finalize (obj);
#line 5190 "tabby.c"
}


GType tabby_local_session_get_type (void) {
	static volatile gsize tabby_local_session_type_id__volatile = 0;
	if (g_once_init_enter (&tabby_local_session_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (TabbyLocalSessionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tabby_local_session_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TabbyLocalSession), 0, (GInstanceInitFunc) tabby_local_session_instance_init, NULL };
		GType tabby_local_session_type_id;
		tabby_local_session_type_id = g_type_register_static (TABBY_BASE_TYPE_SESSION, "TabbyLocalSession", &g_define_type_info, 0);
		g_once_init_leave (&tabby_local_session_type_id__volatile, tabby_local_session_type_id);
	}
	return tabby_local_session_type_id__volatile;
}


static void _vala_tabby_local_session_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	TabbyLocalSession * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TABBY_LOCAL_TYPE_SESSION, TabbyLocalSession);
#line 366 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	switch (property_id) {
#line 366 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		case TABBY_LOCAL_SESSION_ID:
#line 366 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_value_set_int64 (value, tabby_local_session_get_id (self));
#line 366 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		break;
#line 5217 "tabby.c"
		default:
#line 366 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 366 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		break;
#line 5223 "tabby.c"
	}
}


static void _vala_tabby_local_session_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	TabbyLocalSession * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TABBY_LOCAL_TYPE_SESSION, TabbyLocalSession);
#line 366 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	switch (property_id) {
#line 366 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		case TABBY_LOCAL_SESSION_ID:
#line 366 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		tabby_local_session_set_id (self, g_value_get_int64 (value));
#line 366 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		break;
#line 5239 "tabby.c"
		default:
#line 366 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 366 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		break;
#line 5245 "tabby.c"
	}
}


static KatzeArray* tabby_local_storage_real_get_saved_sessions (TabbyBaseStorage* base) {
	TabbyLocalStorage * self;
	KatzeArray* result = NULL;
	KatzeArray* sessions = NULL;
	KatzeArray* _tmp0_ = NULL;
	gchar* sqlcmd = NULL;
	gchar* _tmp1_ = NULL;
	KatzeArray* _tmp24_ = NULL;
	gboolean _tmp25_ = FALSE;
	GError * _inner_error_ = NULL;
#line 613 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self = (TabbyLocalStorage*) base;
#line 614 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = katze_array_new (TABBY_LOCAL_TYPE_SESSION);
#line 614 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	sessions = _tmp0_;
#line 616 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp1_ = g_strdup ("\n" \
"                    SELECT id, closed FROM sessions WHERE closed = 0\n" \
"                    UNION\n" \
"                    SELECT * FROM (SELECT id, closed FROM sessions WHE" \
"RE closed = 1 ORDER BY tstamp DESC LIMIT 1)\n" \
"                    ORDER BY closed;\n" \
"                ");
#line 616 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	sqlcmd = _tmp1_;
#line 5270 "tabby.c"
	{
		MidoriDatabaseStatement* statement = NULL;
		MidoriDatabase* _tmp2_ = NULL;
		const gchar* _tmp3_ = NULL;
		MidoriDatabaseStatement* _tmp4_ = NULL;
#line 623 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp2_ = self->priv->database;
#line 623 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp3_ = sqlcmd;
#line 623 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp4_ = midori_database_prepare (_tmp2_, _tmp3_, &_inner_error_, NULL);
#line 623 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		statement = _tmp4_;
#line 623 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 5286 "tabby.c"
			goto __catch12_g_error;
		}
#line 624 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		while (TRUE) {
#line 5291 "tabby.c"
			gboolean _tmp5_ = FALSE;
			MidoriDatabaseStatement* _tmp6_ = NULL;
			gboolean _tmp7_ = FALSE;
			gint64 id = 0LL;
			MidoriDatabaseStatement* _tmp8_ = NULL;
			gint64 _tmp9_ = 0LL;
			gint64 closed = 0LL;
			MidoriDatabaseStatement* _tmp10_ = NULL;
			gint64 _tmp11_ = 0LL;
			gboolean _tmp12_ = FALSE;
			gint64 _tmp13_ = 0LL;
#line 624 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp6_ = statement;
#line 624 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp7_ = midori_database_statement_step (_tmp6_, &_inner_error_);
#line 624 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp5_ = _tmp7_;
#line 624 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 624 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_g_object_unref0 (statement);
#line 5313 "tabby.c"
				goto __catch12_g_error;
			}
#line 624 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			if (!_tmp5_) {
#line 624 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				break;
#line 5320 "tabby.c"
			}
#line 625 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp8_ = statement;
#line 625 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp9_ = midori_database_statement_get_int64 (_tmp8_, "id", &_inner_error_);
#line 625 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			id = _tmp9_;
#line 625 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 625 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_g_object_unref0 (statement);
#line 5332 "tabby.c"
				goto __catch12_g_error;
			}
#line 626 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp10_ = statement;
#line 626 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp11_ = midori_database_statement_get_int64 (_tmp10_, "closed", &_inner_error_);
#line 626 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			closed = _tmp11_;
#line 626 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 626 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_g_object_unref0 (statement);
#line 5345 "tabby.c"
				goto __catch12_g_error;
			}
#line 627 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp13_ = closed;
#line 627 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			if (_tmp13_ == ((gint64) 0)) {
#line 627 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp12_ = TRUE;
#line 5354 "tabby.c"
			} else {
				KatzeArray* _tmp14_ = NULL;
				gboolean _tmp15_ = FALSE;
#line 627 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp14_ = sessions;
#line 627 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp15_ = katze_array_is_empty (_tmp14_);
#line 627 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp12_ = _tmp15_;
#line 5364 "tabby.c"
			}
#line 627 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			if (_tmp12_) {
#line 5368 "tabby.c"
				KatzeArray* _tmp16_ = NULL;
				MidoriDatabase* _tmp17_ = NULL;
				gint64 _tmp18_ = 0LL;
				TabbyLocalSession* _tmp19_ = NULL;
				TabbyLocalSession* _tmp20_ = NULL;
#line 628 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp16_ = sessions;
#line 628 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp17_ = self->priv->database;
#line 628 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp18_ = id;
#line 628 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp19_ = tabby_local_session_new_with_id (_tmp17_, _tmp18_);
#line 628 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp20_ = _tmp19_;
#line 628 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				g_signal_emit_by_name (_tmp16_, "add-item", (GObject*) _tmp20_);
#line 628 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_g_object_unref0 (_tmp20_);
#line 5388 "tabby.c"
			}
		}
#line 622 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_object_unref0 (statement);
#line 5393 "tabby.c"
	}
	goto __finally12;
	__catch12_g_error:
	{
		GError* _error_ = NULL;
		const gchar* _tmp21_ = NULL;
		GError* _tmp22_ = NULL;
		const gchar* _tmp23_ = NULL;
#line 622 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_error_ = _inner_error_;
#line 622 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_inner_error_ = NULL;
#line 632 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp21_ = _ ("Failed to select from database: %s");
#line 632 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp22_ = _error_;
#line 632 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp23_ = _tmp22_->message;
#line 632 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_critical (_tmp21_, _tmp23_);
#line 622 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_error_free0 (_error_);
#line 5416 "tabby.c"
	}
	__finally12:
#line 622 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 622 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_free0 (sqlcmd);
#line 622 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_object_unref0 (sessions);
#line 622 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 622 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_clear_error (&_inner_error_);
#line 622 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		return NULL;
#line 5431 "tabby.c"
	}
#line 635 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp24_ = sessions;
#line 635 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp25_ = katze_array_is_empty (_tmp24_);
#line 635 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (_tmp25_) {
#line 5439 "tabby.c"
		KatzeArray* _tmp26_ = NULL;
		MidoriDatabase* _tmp27_ = NULL;
		TabbyLocalSession* _tmp28_ = NULL;
		TabbyLocalSession* _tmp29_ = NULL;
#line 636 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp26_ = sessions;
#line 636 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp27_ = self->priv->database;
#line 636 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp28_ = tabby_local_session_new (_tmp27_);
#line 636 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp29_ = _tmp28_;
#line 636 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_signal_emit_by_name (_tmp26_, "add-item", (GObject*) _tmp29_);
#line 636 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_object_unref0 (_tmp29_);
#line 5456 "tabby.c"
	}
#line 639 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	result = sessions;
#line 639 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_free0 (sqlcmd);
#line 639 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return result;
#line 5464 "tabby.c"
}


static Block3Data* block3_data_ref (Block3Data* _data3_) {
#line 642 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_atomic_int_inc (&_data3_->_ref_count_);
#line 642 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return _data3_;
#line 5473 "tabby.c"
}


static void block3_data_unref (void * _userdata_) {
	Block3Data* _data3_;
	_data3_ = (Block3Data*) _userdata_;
#line 642 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (g_atomic_int_dec_and_test (&_data3_->_ref_count_)) {
#line 5482 "tabby.c"
		TabbyLocalStorage* self;
#line 642 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		self = _data3_->self;
#line 642 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_object_unref0 (_data3_->tabs);
#line 642 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_object_unref0 (self);
#line 642 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_slice_free (Block3Data, _data3_);
#line 5492 "tabby.c"
	}
}


static gboolean ___lambda9_ (Block3Data* _data3_, GError** error) {
	TabbyLocalStorage* self;
	gboolean result = FALSE;
	KatzeArray* _tmp0_ = NULL;
#line 644 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self = _data3_->self;
#line 645 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = _data3_->tabs;
#line 645 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	TABBY_BASE_STORAGE_CLASS (tabby_local_storage_parent_class)->import_session (G_TYPE_CHECK_INSTANCE_CAST (self, TABBY_BASE_TYPE_STORAGE, TabbyBaseStorage), _tmp0_);
#line 645 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	result = TRUE;
#line 645 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return result;
#line 5511 "tabby.c"
}


static gboolean ____lambda9__midori_database_callback (gpointer self, GError** error) {
	gboolean result;
	result = ___lambda9_ (self, error);
#line 644 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return result;
#line 5520 "tabby.c"
}


static void tabby_local_storage_real_import_session (TabbyBaseStorage* base, KatzeArray* tabs) {
	TabbyLocalStorage * self;
	Block3Data* _data3_;
	KatzeArray* _tmp0_ = NULL;
	KatzeArray* _tmp1_ = NULL;
	GError * _inner_error_ = NULL;
#line 642 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self = (TabbyLocalStorage*) base;
#line 642 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (tabs != NULL);
#line 642 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_data3_ = g_slice_new0 (Block3Data);
#line 642 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_data3_->_ref_count_ = 1;
#line 642 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_data3_->self = g_object_ref (self);
#line 642 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = tabs;
#line 642 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 642 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_object_unref0 (_data3_->tabs);
#line 642 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_data3_->tabs = _tmp1_;
#line 5548 "tabby.c"
	{
		MidoriDatabase* _tmp2_ = NULL;
#line 644 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp2_ = self->priv->database;
#line 644 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		midori_database_transaction (_tmp2_, ____lambda9__midori_database_callback, _data3_, &_inner_error_);
#line 644 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 5557 "tabby.c"
			goto __catch13_g_error;
		}
	}
	goto __finally13;
	__catch13_g_error:
	{
		GError* _error_ = NULL;
		const gchar* _tmp3_ = NULL;
		GError* _tmp4_ = NULL;
		const gchar* _tmp5_ = NULL;
#line 643 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_error_ = _inner_error_;
#line 643 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_inner_error_ = NULL;
#line 648 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp3_ = _ ("Failed to select from database: %s");
#line 648 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp4_ = _error_;
#line 648 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp5_ = _tmp4_->message;
#line 648 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_critical (_tmp3_, _tmp5_);
#line 643 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_error_free0 (_error_);
#line 5582 "tabby.c"
	}
	__finally13:
#line 643 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 643 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		block3_data_unref (_data3_);
#line 643 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_data3_ = NULL;
#line 643 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 643 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_clear_error (&_inner_error_);
#line 643 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		return;
#line 5597 "tabby.c"
	}
#line 642 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	block3_data_unref (_data3_);
#line 642 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_data3_ = NULL;
#line 5603 "tabby.c"
}


static TabbyBaseSession* tabby_local_storage_real_get_new_session (TabbyBaseStorage* base) {
	TabbyLocalStorage * self;
	TabbyBaseSession* result = NULL;
	MidoriDatabase* _tmp0_ = NULL;
	TabbyLocalSession* _tmp1_ = NULL;
	TabbyBaseSession* _tmp2_ = NULL;
#line 652 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self = (TabbyLocalStorage*) base;
#line 653 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = self->priv->database;
#line 653 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp1_ = tabby_local_session_new (_tmp0_);
#line 653 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp2_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, TABBY_BASE_TYPE_SESSION) ? ((TabbyBaseSession*) _tmp1_) : NULL;
#line 653 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (_tmp2_ == NULL) {
#line 653 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_object_unref0 (_tmp1_);
#line 5625 "tabby.c"
	}
#line 653 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	result = _tmp2_;
#line 653 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return result;
#line 5631 "tabby.c"
}


TabbyLocalStorage* tabby_local_storage_construct (GType object_type, MidoriApp* app) {
	TabbyLocalStorage * self = NULL;
	MidoriApp* _tmp0_ = NULL;
	MidoriDatabase* _tmp5_ = NULL;
	gboolean _tmp6_ = FALSE;
	gboolean _tmp7_ = FALSE;
	GError * _inner_error_ = NULL;
#line 656 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_val_if_fail (app != NULL, NULL);
#line 657 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = app;
#line 657 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self = (TabbyLocalStorage*) g_object_new (object_type, "app", _tmp0_, NULL);
#line 5648 "tabby.c"
	{
		MidoriDatabase* _tmp1_ = NULL;
		MidoriDatabase* _tmp2_ = NULL;
		MidoriDatabase* _tmp3_ = NULL;
#line 660 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp2_ = midori_database_new ("tabby.db", &_inner_error_);
#line 660 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp1_ = _tmp2_;
#line 660 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 660 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			if (_inner_error_->domain == MIDORI_DATABASE_ERROR) {
#line 5661 "tabby.c"
				goto __catch14_midori_database_error;
			}
#line 660 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 660 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			g_clear_error (&_inner_error_);
#line 660 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			return NULL;
#line 5670 "tabby.c"
		}
#line 660 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp3_ = _tmp1_;
#line 660 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp1_ = NULL;
#line 660 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_object_unref0 (self->priv->database);
#line 660 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		self->priv->database = _tmp3_;
#line 659 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_object_unref0 (_tmp1_);
#line 5682 "tabby.c"
	}
	goto __finally14;
	__catch14_midori_database_error:
	{
		GError* schema_error = NULL;
		const gchar* _tmp4_ = NULL;
#line 659 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		schema_error = _inner_error_;
#line 659 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_inner_error_ = NULL;
#line 662 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp4_ = schema_error->message;
#line 662 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_error ("tabby.vala:662: %s", _tmp4_);
#line 659 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_error_free0 (schema_error);
#line 5699 "tabby.c"
	}
	__finally14:
#line 659 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 659 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 659 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_clear_error (&_inner_error_);
#line 659 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		return NULL;
#line 5710 "tabby.c"
	}
#line 665 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp5_ = self->priv->database;
#line 665 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp6_ = midori_database_get_first_use (_tmp5_);
#line 665 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp7_ = _tmp6_;
#line 665 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (_tmp7_) {
#line 5720 "tabby.c"
		gchar* config_file = NULL;
		gchar* _tmp8_ = NULL;
#line 666 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp8_ = midori_paths_get_config_filename_for_reading ("session.xbel");
#line 666 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		config_file = _tmp8_;
#line 5727 "tabby.c"
		{
			KatzeArray* old_session = NULL;
			KatzeArray* _tmp9_ = NULL;
			KatzeArray* _tmp10_ = NULL;
			const gchar* _tmp11_ = NULL;
			KatzeArray* _tmp12_ = NULL;
#line 668 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp9_ = katze_array_new (KATZE_TYPE_ITEM);
#line 668 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			old_session = _tmp9_;
#line 669 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp10_ = old_session;
#line 669 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp11_ = config_file;
#line 669 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			midori_array_from_file (_tmp10_, _tmp11_, "xbel-tiny", &_inner_error_);
#line 669 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 669 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_g_object_unref0 (old_session);
#line 669 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				if (_inner_error_->domain == G_FILE_ERROR) {
#line 5750 "tabby.c"
					goto __catch15_g_file_error;
				}
				goto __catch15_g_error;
			}
#line 670 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp12_ = old_session;
#line 670 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			tabby_base_storage_import_session ((TabbyBaseStorage*) self, _tmp12_);
#line 667 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_g_object_unref0 (old_session);
#line 5761 "tabby.c"
		}
		goto __finally15;
		__catch15_g_file_error:
		{
			GError* file_error = NULL;
#line 667 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			file_error = _inner_error_;
#line 667 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_inner_error_ = NULL;
#line 667 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_g_error_free0 (file_error);
#line 5773 "tabby.c"
		}
		goto __finally15;
		__catch15_g_error:
		{
			GError* _error_ = NULL;
			const gchar* _tmp13_ = NULL;
			GError* _tmp14_ = NULL;
			const gchar* _tmp15_ = NULL;
#line 667 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_error_ = _inner_error_;
#line 667 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_inner_error_ = NULL;
#line 674 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp13_ = _ ("Failed to import legacy session: %s");
#line 674 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp14_ = _error_;
#line 674 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp15_ = _tmp14_->message;
#line 674 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			g_critical (_tmp13_, _tmp15_);
#line 667 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_g_error_free0 (_error_);
#line 5796 "tabby.c"
		}
		__finally15:
#line 667 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 667 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_g_free0 (config_file);
#line 667 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 667 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			g_clear_error (&_inner_error_);
#line 667 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			return NULL;
#line 5809 "tabby.c"
		}
#line 665 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_free0 (config_file);
#line 5813 "tabby.c"
	}
#line 656 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return self;
#line 5817 "tabby.c"
}


TabbyLocalStorage* tabby_local_storage_new (MidoriApp* app) {
#line 656 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return tabby_local_storage_construct (TABBY_LOCAL_TYPE_STORAGE, app);
#line 5824 "tabby.c"
}


static void tabby_local_storage_class_init (TabbyLocalStorageClass * klass) {
#line 610 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	tabby_local_storage_parent_class = g_type_class_peek_parent (klass);
#line 610 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_type_class_add_private (klass, sizeof (TabbyLocalStoragePrivate));
#line 610 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	((TabbyBaseStorageClass *) klass)->get_saved_sessions = tabby_local_storage_real_get_saved_sessions;
#line 610 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	((TabbyBaseStorageClass *) klass)->import_session = tabby_local_storage_real_import_session;
#line 610 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	((TabbyBaseStorageClass *) klass)->get_new_session = tabby_local_storage_real_get_new_session;
#line 610 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	G_OBJECT_CLASS (klass)->finalize = tabby_local_storage_finalize;
#line 5841 "tabby.c"
}


static void tabby_local_storage_instance_init (TabbyLocalStorage * self) {
#line 610 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self->priv = TABBY_LOCAL_STORAGE_GET_PRIVATE (self);
#line 5848 "tabby.c"
}


static void tabby_local_storage_finalize (GObject* obj) {
	TabbyLocalStorage * self;
#line 610 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TABBY_LOCAL_TYPE_STORAGE, TabbyLocalStorage);
#line 611 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_object_unref0 (self->priv->database);
#line 610 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	G_OBJECT_CLASS (tabby_local_storage_parent_class)->finalize (obj);
#line 5860 "tabby.c"
}


GType tabby_local_storage_get_type (void) {
	static volatile gsize tabby_local_storage_type_id__volatile = 0;
	if (g_once_init_enter (&tabby_local_storage_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (TabbyLocalStorageClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tabby_local_storage_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TabbyLocalStorage), 0, (GInstanceInitFunc) tabby_local_storage_instance_init, NULL };
		GType tabby_local_storage_type_id;
		tabby_local_storage_type_id = g_type_register_static (TABBY_BASE_TYPE_STORAGE, "TabbyLocalStorage", &g_define_type_info, 0);
		g_once_init_leave (&tabby_local_storage_type_id__volatile, tabby_local_storage_type_id);
	}
	return tabby_local_storage_type_id__volatile;
}


static gboolean _tabby_manager_execute_commands_gsource_func (gpointer self) {
	gboolean result;
	result = tabby_manager_execute_commands ((TabbyManager*) self);
#line 695 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return result;
#line 5881 "tabby.c"
}


static gboolean tabby_manager_load_session (TabbyManager* self) {
	gboolean result = FALSE;
	gint load_on_startup = 0;
	MidoriApp* _tmp0_ = NULL;
	MidoriWebSettings* _tmp1_ = NULL;
	MidoriWebSettings* _tmp2_ = NULL;
	MidoriWebSettings* _tmp3_ = NULL;
	gboolean _tmp4_ = FALSE;
	gint _tmp5_ = 0;
#line 683 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 686 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = tabby_APP;
#line 686 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_object_get (_tmp0_, "settings", &_tmp1_, NULL);
#line 686 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp2_ = _tmp1_;
#line 686 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp3_ = _tmp2_;
#line 686 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_object_get ((GObject*) _tmp3_, "load-on-startup", &load_on_startup, NULL);
#line 686 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_object_unref0 (_tmp3_);
#line 687 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp5_ = load_on_startup;
#line 687 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (_tmp5_ == ((gint) MIDORI_STARTUP_BLANK_PAGE)) {
#line 687 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp4_ = TRUE;
#line 5914 "tabby.c"
	} else {
		gint _tmp6_ = 0;
#line 688 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp6_ = load_on_startup;
#line 688 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp4_ = _tmp6_ == ((gint) MIDORI_STARTUP_HOMEPAGE);
#line 5921 "tabby.c"
	}
#line 687 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (_tmp4_) {
#line 5925 "tabby.c"
		TabbyBaseStorage* _tmp7_ = NULL;
#line 689 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp7_ = self->priv->storage;
#line 689 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		tabby_base_storage_start_new_session (_tmp7_);
#line 5931 "tabby.c"
	} else {
		TabbyBaseStorage* _tmp8_ = NULL;
#line 691 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp8_ = self->priv->storage;
#line 691 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		tabby_istorage_restore_last_sessions ((TabbyIStorage*) _tmp8_);
#line 5938 "tabby.c"
	}
#line 695 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _tabby_manager_execute_commands_gsource_func, g_object_ref (self), g_object_unref);
#line 697 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	result = FALSE;
#line 697 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return result;
#line 5946 "tabby.c"
}


static gboolean tabby_manager_execute_commands (TabbyManager* self) {
	gboolean result = FALSE;
	MidoriApp* app = NULL;
	MidoriApp* _tmp0_ = NULL;
	MidoriApp* _tmp1_ = NULL;
	gchar** commands = NULL;
	MidoriApp* _tmp2_ = NULL;
	gconstpointer _tmp3_ = NULL;
	gint commands_length1 = 0;
	gint _commands_size_ = 0;
	gchar** _tmp4_ = NULL;
	gint _tmp4__length1 = 0;
#line 700 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 701 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = midori_extension_get_app ((MidoriExtension*) self);
#line 701 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 701 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	app = _tmp1_;
#line 702 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp2_ = app;
#line 702 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp3_ = g_object_get_data ((GObject*) _tmp2_, "execute-commands");
#line 702 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	commands = _tmp3_;
#line 702 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	commands_length1 = -1;
#line 702 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_commands_size_ = commands_length1;
#line 704 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp4_ = commands;
#line 704 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp4__length1 = commands_length1;
#line 704 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (_tmp4_ != NULL) {
#line 5986 "tabby.c"
		MidoriApp* _tmp5_ = NULL;
		gchar** _tmp6_ = NULL;
		gint _tmp6__length1 = 0;
#line 705 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp5_ = app;
#line 705 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp6_ = commands;
#line 705 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp6__length1 = commands_length1;
#line 705 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		midori_app_send_command (_tmp5_, _tmp6_);
#line 5998 "tabby.c"
	}
#line 708 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	result = FALSE;
#line 708 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_object_unref0 (app);
#line 708 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return result;
#line 6006 "tabby.c"
}


static void _tabby_manager_set_open_uris_midori_app_add_browser (MidoriApp* _sender, MidoriBrowser* browser, gpointer self) {
#line 731 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	tabby_manager_set_open_uris ((TabbyManager*) self, browser);
#line 6013 "tabby.c"
}


static void tabby_manager_set_open_uris (TabbyManager* self, MidoriBrowser* browser) {
	MidoriApp* app = NULL;
	MidoriApp* _tmp0_ = NULL;
	MidoriApp* _tmp1_ = NULL;
	gchar** uris = NULL;
	MidoriApp* _tmp2_ = NULL;
	gconstpointer _tmp3_ = NULL;
	gint uris_length1 = 0;
	gint _uris_size_ = 0;
	gchar** _tmp4_ = NULL;
	gint _tmp4__length1 = 0;
	MidoriApp* _tmp32_ = NULL;
	guint _tmp33_ = 0U;
#line 711 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 711 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (browser != NULL);
#line 712 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = midori_extension_get_app ((MidoriExtension*) self);
#line 712 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 712 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	app = _tmp1_;
#line 713 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp2_ = app;
#line 713 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp3_ = g_object_get_data ((GObject*) _tmp2_, "open-uris");
#line 713 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	uris = _tmp3_;
#line 713 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	uris_length1 = -1;
#line 713 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_uris_size_ = uris_length1;
#line 715 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp4_ = uris;
#line 715 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp4__length1 = uris_length1;
#line 715 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (_tmp4_ != NULL) {
#line 6056 "tabby.c"
		KatzeArray* tabs = NULL;
		KatzeArray* _tmp5_ = NULL;
		KatzeArray* _tmp27_ = NULL;
		gboolean _tmp28_ = FALSE;
#line 716 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp5_ = katze_array_new (KATZE_TYPE_ITEM);
#line 716 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		tabs = _tmp5_;
#line 6065 "tabby.c"
		{
			gint i = 0;
#line 718 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			i = 0;
#line 6070 "tabby.c"
			{
				gboolean _tmp6_ = FALSE;
#line 718 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				_tmp6_ = TRUE;
#line 718 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
				while (TRUE) {
#line 6077 "tabby.c"
					gchar** _tmp8_ = NULL;
					gint _tmp8__length1 = 0;
					gint _tmp9_ = 0;
					const gchar* _tmp10_ = NULL;
					KatzeItem* item = NULL;
					KatzeItem* _tmp11_ = NULL;
					KatzeItem* _tmp12_ = NULL;
					gchar** _tmp13_ = NULL;
					gint _tmp13__length1 = 0;
					gint _tmp14_ = 0;
					const gchar* _tmp15_ = NULL;
					KatzeItem* _tmp16_ = NULL;
					gchar** _tmp17_ = NULL;
					gint _tmp17__length1 = 0;
					gint _tmp18_ = 0;
					const gchar* _tmp19_ = NULL;
					gchar* _tmp20_ = NULL;
					gchar* _tmp21_ = NULL;
					KatzeItem* _tmp22_ = NULL;
					const gchar* _tmp23_ = NULL;
					const gchar* _tmp24_ = NULL;
#line 718 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					if (!_tmp6_) {
#line 6101 "tabby.c"
						gint _tmp7_ = 0;
#line 718 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						_tmp7_ = i;
#line 718 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						i = _tmp7_ + 1;
#line 6107 "tabby.c"
					}
#line 718 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_tmp6_ = FALSE;
#line 718 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_tmp8_ = uris;
#line 718 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_tmp8__length1 = uris_length1;
#line 718 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_tmp9_ = i;
#line 718 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_tmp10_ = _tmp8_[_tmp9_];
#line 718 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					if (!(_tmp10_ != NULL)) {
#line 718 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						break;
#line 6123 "tabby.c"
					}
#line 719 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_tmp11_ = katze_item_new ();
#line 719 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					item = _tmp11_;
#line 720 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_tmp12_ = item;
#line 720 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_tmp13_ = uris;
#line 720 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_tmp13__length1 = uris_length1;
#line 720 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_tmp14_ = i;
#line 720 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_tmp15_ = _tmp13_[_tmp14_];
#line 720 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					katze_item_set_name (_tmp12_, _tmp15_);
#line 721 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_tmp16_ = item;
#line 721 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_tmp17_ = uris;
#line 721 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_tmp17__length1 = uris_length1;
#line 721 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_tmp18_ = i;
#line 721 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_tmp19_ = _tmp17_[_tmp18_];
#line 721 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_tmp20_ = sokoke_magic_uri (_tmp19_, TRUE, TRUE);
#line 721 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_tmp21_ = _tmp20_;
#line 721 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					katze_item_set_uri (_tmp16_, _tmp21_);
#line 721 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_g_free0 (_tmp21_);
#line 722 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_tmp22_ = item;
#line 722 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_tmp23_ = katze_item_get_uri (_tmp22_);
#line 722 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_tmp24_ = _tmp23_;
#line 722 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					if (_tmp24_ != NULL) {
#line 6167 "tabby.c"
						KatzeArray* _tmp25_ = NULL;
						KatzeItem* _tmp26_ = NULL;
#line 723 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						_tmp25_ = tabs;
#line 723 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						_tmp26_ = item;
#line 723 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
						g_signal_emit_by_name (_tmp25_, "add-item", (GObject*) _tmp26_);
#line 6176 "tabby.c"
					}
#line 718 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
					_g_object_unref0 (item);
#line 6180 "tabby.c"
				}
			}
		}
#line 726 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp27_ = tabs;
#line 726 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp28_ = katze_array_is_empty (_tmp27_);
#line 726 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		if (!_tmp28_) {
#line 6190 "tabby.c"
			MidoriBrowser* _tmp29_ = NULL;
			KatzeArray* _tmp30_ = NULL;
			KatzeArray* _tmp31_ = NULL;
#line 727 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp29_ = browser;
#line 727 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp30_ = tabs;
#line 727 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp31_ = _g_object_ref0 (_tmp30_);
#line 727 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			g_object_set_data_full ((GObject*) _tmp29_, "tabby-open-uris", _tmp31_, g_object_unref);
#line 6202 "tabby.c"
		}
#line 715 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_object_unref0 (tabs);
#line 6206 "tabby.c"
	}
#line 731 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp32_ = app;
#line 731 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_signal_parse_name ("add-browser", MIDORI_TYPE_APP, &_tmp33_, NULL, FALSE);
#line 731 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_signal_handlers_disconnect_matched (_tmp32_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp33_, 0, NULL, (GCallback) _tabby_manager_set_open_uris_midori_app_add_browser, self);
#line 711 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_object_unref0 (app);
#line 6216 "tabby.c"
}


static void tabby_manager_browser_added (TabbyManager* self, MidoriBrowser* browser) {
	TabbyBaseSession* session = NULL;
	MidoriBrowser* _tmp0_ = NULL;
	gconstpointer _tmp1_ = NULL;
	TabbyBaseSession* _tmp2_ = NULL;
	TabbyBaseSession* _tmp3_ = NULL;
#line 734 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 734 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (browser != NULL);
#line 735 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = browser;
#line 735 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp1_ = g_object_get_data ((GObject*) _tmp0_, "tabby-session");
#line 735 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp2_ = _g_object_ref0 ((TabbyBaseSession*) _tmp1_);
#line 735 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	session = _tmp2_;
#line 736 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp3_ = session;
#line 736 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (_tmp3_ == NULL) {
#line 6242 "tabby.c"
		TabbyBaseStorage* _tmp4_ = NULL;
		TabbyBaseSession* _tmp5_ = NULL;
		TabbyBaseSession* _tmp6_ = NULL;
		MidoriBrowser* _tmp7_ = NULL;
		TabbyBaseSession* _tmp8_ = NULL;
		TabbyBaseSession* _tmp9_ = NULL;
		TabbyBaseSession* _tmp10_ = NULL;
		MidoriBrowser* _tmp11_ = NULL;
#line 737 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp4_ = self->priv->storage;
#line 737 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp5_ = tabby_base_storage_get_new_session (_tmp4_);
#line 737 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp6_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp5_, TABBY_BASE_TYPE_SESSION) ? ((TabbyBaseSession*) _tmp5_) : NULL;
#line 737 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		if (_tmp6_ == NULL) {
#line 737 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_g_object_unref0 (_tmp5_);
#line 6261 "tabby.c"
		}
#line 737 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_object_unref0 (session);
#line 737 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		session = _tmp6_;
#line 738 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp7_ = browser;
#line 738 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp8_ = session;
#line 738 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp9_ = _g_object_ref0 (_tmp8_);
#line 738 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_object_set_data_full ((GObject*) _tmp7_, "tabby-session", _tmp9_, g_object_unref);
#line 739 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp10_ = session;
#line 739 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp11_ = browser;
#line 739 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		tabby_isession_attach ((TabbyISession*) _tmp10_, _tmp11_);
#line 6281 "tabby.c"
	}
#line 734 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_object_unref0 (session);
#line 6285 "tabby.c"
}


static void tabby_manager_browser_removed (TabbyManager* self, MidoriBrowser* browser) {
	TabbyBaseSession* session = NULL;
	MidoriBrowser* _tmp0_ = NULL;
	gconstpointer _tmp1_ = NULL;
	TabbyBaseSession* _tmp2_ = NULL;
	TabbyBaseSession* _tmp3_ = NULL;
#line 743 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 743 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (browser != NULL);
#line 744 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = browser;
#line 744 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp1_ = g_object_get_data ((GObject*) _tmp0_, "tabby-session");
#line 744 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp2_ = _g_object_ref0 ((TabbyBaseSession*) _tmp1_);
#line 744 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	session = _tmp2_;
#line 745 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp3_ = session;
#line 745 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (_tmp3_ == NULL) {
#line 746 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_warning ("tabby.vala:746: missing session");
#line 6313 "tabby.c"
	} else {
		TabbyBaseSession* _tmp4_ = NULL;
		gint load_on_startup = 0;
		MidoriApp* _tmp5_ = NULL;
		MidoriWebSettings* _tmp6_ = NULL;
		MidoriWebSettings* _tmp7_ = NULL;
		MidoriWebSettings* _tmp8_ = NULL;
		gboolean _tmp9_ = FALSE;
		MidoriBrowser* _tmp10_ = NULL;
		gboolean _tmp11_ = FALSE;
		gboolean _tmp12_ = FALSE;
#line 748 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp4_ = session;
#line 748 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		tabby_base_session_close (_tmp4_);
#line 752 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp5_ = tabby_APP;
#line 752 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_object_get (_tmp5_, "settings", &_tmp6_, NULL);
#line 752 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp7_ = _tmp6_;
#line 752 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp8_ = _tmp7_;
#line 752 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		g_object_get ((GObject*) _tmp8_, "load-on-startup", &load_on_startup, NULL);
#line 752 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_object_unref0 (_tmp8_);
#line 754 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp10_ = browser;
#line 754 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp11_ = gtk_window_get_destroy_with_parent ((GtkWindow*) _tmp10_);
#line 754 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp12_ = _tmp11_;
#line 754 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		if (_tmp12_) {
#line 754 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp9_ = TRUE;
#line 6351 "tabby.c"
		} else {
			gint _tmp13_ = 0;
#line 755 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp13_ = load_on_startup;
#line 755 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp9_ = _tmp13_ < ((gint) MIDORI_STARTUP_LAST_OPEN_PAGES);
#line 6358 "tabby.c"
		}
#line 754 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		if (_tmp9_) {
#line 6362 "tabby.c"
			TabbyBaseSession* _tmp14_ = NULL;
#line 757 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp14_ = session;
#line 757 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			tabby_base_session_remove (_tmp14_);
#line 6368 "tabby.c"
		}
	}
#line 743 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_object_unref0 (session);
#line 6373 "tabby.c"
}


static void _tabby_manager_browser_added_midori_app_add_browser (MidoriApp* _sender, MidoriBrowser* browser, gpointer self) {
#line 776 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	tabby_manager_browser_added ((TabbyManager*) self, browser);
#line 6380 "tabby.c"
}


static void _tabby_manager_browser_removed_midori_app_remove_browser (MidoriApp* _sender, MidoriBrowser* browser, gpointer self) {
#line 777 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	tabby_manager_browser_removed ((TabbyManager*) self, browser);
#line 6387 "tabby.c"
}


static gboolean _tabby_manager_load_session_gsource_func (gpointer self) {
	gboolean result;
	result = tabby_manager_load_session ((TabbyManager*) self);
#line 779 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return result;
#line 6396 "tabby.c"
}


static void tabby_manager_activated (TabbyManager* self, MidoriApp* app) {
	MidoriApp* _tmp0_ = NULL;
	MidoriApp* _tmp1_ = NULL;
	const gchar* restore_count = NULL;
	const gchar* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	MidoriApp* _tmp8_ = NULL;
	TabbyLocalStorage* _tmp9_ = NULL;
	TabbyBaseStorage* _tmp10_ = NULL;
	MidoriApp* _tmp11_ = NULL;
	MidoriApp* _tmp12_ = NULL;
	MidoriApp* _tmp13_ = NULL;
#line 762 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 762 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (app != NULL);
#line 763 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = app;
#line 763 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 763 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_object_unref0 (tabby_APP);
#line 763 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	tabby_APP = _tmp1_;
#line 764 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp2_ = g_getenv ("TABBY_RESTORE_COUNT");
#line 764 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	restore_count = _tmp2_;
#line 765 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp3_ = restore_count;
#line 765 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (_tmp3_ != NULL) {
#line 6432 "tabby.c"
		gint count = 0;
		const gchar* _tmp4_ = NULL;
		gint _tmp5_ = 0;
		gint _tmp6_ = 0;
#line 766 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp4_ = restore_count;
#line 766 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp5_ = atoi (_tmp4_);
#line 766 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		count = _tmp5_;
#line 767 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_tmp6_ = count;
#line 767 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		if (_tmp6_ >= 1) {
#line 6447 "tabby.c"
			gint _tmp7_ = 0;
#line 768 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			_tmp7_ = count;
#line 768 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
			tabby_IDLE_RESTORE_COUNT = _tmp7_;
#line 6453 "tabby.c"
		}
	}
#line 773 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp8_ = midori_extension_get_app ((MidoriExtension*) self);
#line 773 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp9_ = tabby_local_storage_new (_tmp8_);
#line 773 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp10_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp9_, TABBY_BASE_TYPE_STORAGE) ? ((TabbyBaseStorage*) _tmp9_) : NULL;
#line 773 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	if (_tmp10_ == NULL) {
#line 773 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
		_g_object_unref0 (_tmp9_);
#line 6466 "tabby.c"
	}
#line 773 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_object_unref0 (self->priv->storage);
#line 773 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self->priv->storage = _tmp10_;
#line 775 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp11_ = app;
#line 775 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_signal_connect_object (_tmp11_, "add-browser", (GCallback) _tabby_manager_set_open_uris_midori_app_add_browser, self, 0);
#line 776 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp12_ = app;
#line 776 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_signal_connect_object (_tmp12_, "add-browser", (GCallback) _tabby_manager_browser_added_midori_app_add_browser, self, 0);
#line 777 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp13_ = app;
#line 777 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_signal_connect_object (_tmp13_, "remove-browser", (GCallback) _tabby_manager_browser_removed_midori_app_remove_browser, self, 0);
#line 779 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _tabby_manager_load_session_gsource_func, g_object_ref (self), g_object_unref);
#line 6486 "tabby.c"
}


static void tabby_manager_deactivated (TabbyManager* self) {
	MidoriApp* _tmp0_ = NULL;
	guint _tmp1_ = 0U;
	MidoriApp* _tmp2_ = NULL;
	guint _tmp3_ = 0U;
	MidoriApp* _tmp4_ = NULL;
	guint _tmp5_ = 0U;
#line 782 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 785 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = tabby_APP;
#line 785 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_signal_parse_name ("add-browser", MIDORI_TYPE_APP, &_tmp1_, NULL, FALSE);
#line 785 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _tabby_manager_set_open_uris_midori_app_add_browser, self);
#line 786 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp2_ = tabby_APP;
#line 786 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_signal_parse_name ("add-browser", MIDORI_TYPE_APP, &_tmp3_, NULL, FALSE);
#line 786 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _tabby_manager_browser_added_midori_app_add_browser, self);
#line 787 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp4_ = tabby_APP;
#line 787 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_signal_parse_name ("remove-browser", MIDORI_TYPE_APP, &_tmp5_, NULL, FALSE);
#line 787 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_signal_handlers_disconnect_matched (_tmp4_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp5_, 0, NULL, (GCallback) _tabby_manager_browser_removed_midori_app_remove_browser, self);
#line 788 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_object_unref0 (tabby_APP);
#line 788 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	tabby_APP = NULL;
#line 790 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_object_unref0 (self->priv->storage);
#line 790 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self->priv->storage = NULL;
#line 6525 "tabby.c"
}


static void _tabby_manager_activated_midori_extension_activate (MidoriExtension* _sender, MidoriApp* app, gpointer self) {
#line 799 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	tabby_manager_activated ((TabbyManager*) self, app);
#line 6532 "tabby.c"
}


static void _tabby_manager_deactivated_midori_extension_deactivate (MidoriExtension* _sender, gpointer self) {
#line 800 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	tabby_manager_deactivated ((TabbyManager*) self);
#line 6539 "tabby.c"
}


TabbyManager* tabby_manager_construct (GType object_type) {
	TabbyManager * self = NULL;
	const gchar* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
#line 794 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = _ ("Tabby");
#line 794 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp1_ = _ ("Tab and session management.");
#line 794 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self = (TabbyManager*) g_object_new (object_type, "name", _tmp0_, "description", _tmp1_, "version", "0.1", "authors", "André Stösel <andre@stoesel.de>", NULL);
#line 799 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_signal_connect_object ((MidoriExtension*) self, "activate", (GCallback) _tabby_manager_activated_midori_extension_activate, self, 0);
#line 800 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_signal_connect_object ((MidoriExtension*) self, "deactivate", (GCallback) _tabby_manager_deactivated_midori_extension_deactivate, self, 0);
#line 793 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return self;
#line 6559 "tabby.c"
}


TabbyManager* tabby_manager_new (void) {
#line 793 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return tabby_manager_construct (TABBY_TYPE_MANAGER);
#line 6566 "tabby.c"
}


static void tabby_manager_class_init (TabbyManagerClass * klass) {
#line 681 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	tabby_manager_parent_class = g_type_class_peek_parent (klass);
#line 681 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	g_type_class_add_private (klass, sizeof (TabbyManagerPrivate));
#line 681 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	G_OBJECT_CLASS (klass)->finalize = tabby_manager_finalize;
#line 6577 "tabby.c"
}


static void tabby_manager_instance_init (TabbyManager * self) {
#line 681 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self->priv = TABBY_MANAGER_GET_PRIVATE (self);
#line 6584 "tabby.c"
}


static void tabby_manager_finalize (GObject* obj) {
	TabbyManager * self;
#line 681 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TABBY_TYPE_MANAGER, TabbyManager);
#line 682 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_g_object_unref0 (self->priv->storage);
#line 681 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	G_OBJECT_CLASS (tabby_manager_parent_class)->finalize (obj);
#line 6596 "tabby.c"
}


GType tabby_manager_get_type (void) {
	static volatile gsize tabby_manager_type_id__volatile = 0;
	if (g_once_init_enter (&tabby_manager_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (TabbyManagerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tabby_manager_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TabbyManager), 0, (GInstanceInitFunc) tabby_manager_instance_init, NULL };
		GType tabby_manager_type_id;
		tabby_manager_type_id = g_type_register_static (MIDORI_TYPE_EXTENSION, "TabbyManager", &g_define_type_info, 0);
		g_once_init_leave (&tabby_manager_type_id__volatile, tabby_manager_type_id);
	}
	return tabby_manager_type_id__volatile;
}


MidoriExtension* extension_init (void) {
	MidoriExtension* result = NULL;
	TabbyManager* _tmp0_ = NULL;
#line 806 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	_tmp0_ = tabby_manager_new ();
#line 806 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	result = (MidoriExtension*) _tmp0_;
#line 806 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/tabby.vala"
	return result;
#line 6621 "tabby.c"
}



