/* tabby.c generated by valac 0.38.8, 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"

enum  {
	TABBY_BASE_STORAGE_0_PROPERTY,
	TABBY_BASE_STORAGE_APP_PROPERTY,
	TABBY_BASE_STORAGE_NUM_PROPERTIES
};
static GParamSpec* tabby_base_storage_properties[TABBY_BASE_STORAGE_NUM_PROPERTIES];
#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))
enum  {
	TABBY_BASE_SESSION_0_PROPERTY,
	TABBY_BASE_SESSION_BROWSER_PROPERTY,
	TABBY_BASE_SESSION_STATE_PROPERTY,
	TABBY_BASE_SESSION_NUM_PROPERTIES
};
static GParamSpec* tabby_base_session_properties[TABBY_BASE_SESSION_NUM_PROPERTIES];
#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;
enum  {
	TABBY_LOCAL_SESSION_0_PROPERTY,
	TABBY_LOCAL_SESSION_ID_PROPERTY,
	TABBY_LOCAL_SESSION_NUM_PROPERTIES
};
static GParamSpec* tabby_local_session_properties[TABBY_LOCAL_SESSION_NUM_PROPERTIES];
#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;
enum  {
	TABBY_LOCAL_STORAGE_0_PROPERTY,
	TABBY_LOCAL_STORAGE_NUM_PROPERTIES
};
static GParamSpec* tabby_local_storage_properties[TABBY_LOCAL_STORAGE_NUM_PROPERTIES];
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;
enum  {
	TABBY_MANAGER_0_PROPERTY,
	TABBY_MANAGER_NUM_PROPERTIES
};
static GParamSpec* tabby_manager_properties[TABBY_MANAGER_NUM_PROPERTIES];
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (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))
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))
static void _g_free0_ (gpointer var);
static inline 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))
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))
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))
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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	return TABBY_ISTORAGE_GET_INTERFACE (self)->get_saved_sessions (self);
#line 315 "tabby.c"
}


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


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


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


static void tabby_istorage_base_init (TabbyIStorageIface * iface) {
#line 18 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	static gboolean initialized = FALSE;
#line 18 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (!initialized) {
#line 18 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		initialized = TRUE;
#line 353 "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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 26 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	return TABBY_ISESSION_GET_INTERFACE (self)->get_tabs (self);
#line 376 "tabby.c"
}


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


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


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


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


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


static void tabby_isession_base_init (TabbyISessionIface * iface) {
#line 25 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	static gboolean initialized = FALSE;
#line 25 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (!initialized) {
#line 25 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		initialized = TRUE;
#line 432 "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.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	return NULL;
#line 467 "tabby.c"
}


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


static TabbyBaseSession* tabby_base_storage_real_get_new_session (TabbyBaseStorage* self) {
#line 52 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	return NULL;
#line 485 "tabby.c"
}


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


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


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


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


static void tabby_base_storage_init_sessions (TabbyBaseStorage* self, KatzeArray* sessions) {
	KatzeArray* _tmp0_;
	gboolean _tmp1_;
	GList* items = NULL;
	KatzeArray* _tmp5_;
	GList* _tmp6_;
	GList* _tmp7_;
#line 64 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 64 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_if_fail (sessions != NULL);
#line 65 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp0_ = sessions;
#line 65 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp1_ = katze_array_is_empty (_tmp0_);
#line 65 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (_tmp1_) {
#line 557 "tabby.c"
		KatzeArray* _tmp2_;
		TabbyBaseSession* _tmp3_;
		TabbyBaseSession* _tmp4_;
#line 66 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp2_ = sessions;
#line 66 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp3_ = tabby_base_storage_get_new_session (self);
#line 66 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp4_ = _tmp3_;
#line 66 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_signal_emit_by_name (_tmp2_, "add-item", (GObject*) _tmp4_);
#line 66 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_object_unref0 (_tmp4_);
#line 571 "tabby.c"
	}
#line 69 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp5_ = sessions;
#line 69 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp6_ = katze_array_get_items (_tmp5_);
#line 69 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	items = _tmp6_;
#line 70 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp7_ = items;
#line 581 "tabby.c"
	{
		GList* item_collection = NULL;
		GList* item_it = NULL;
#line 70 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		item_collection = _tmp7_;
#line 70 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		for (item_it = item_collection; item_it != NULL; item_it = item_it->next) {
#line 589 "tabby.c"
			KatzeItem* _tmp8_;
			KatzeItem* item = NULL;
#line 70 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp8_ = _g_object_ref0 ((KatzeItem*) item_it->data);
#line 70 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			item = _tmp8_;
#line 596 "tabby.c"
			{
				TabbyBaseSession* session = NULL;
				KatzeItem* _tmp9_;
				TabbyBaseSession* _tmp10_;
				MidoriBrowser* browser = NULL;
				MidoriApp* _tmp11_;
				MidoriBrowser* _tmp12_;
				MidoriBrowser* _tmp13_;
				TabbyBaseSession* _tmp14_;
				TabbyBaseSession* _tmp15_;
				MidoriApp* _tmp16_;
				MidoriBrowser* _tmp17_;
				MidoriBrowser* _tmp18_;
				TabbyBaseSession* _tmp19_;
				MidoriBrowser* _tmp20_;
#line 71 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_tmp9_ = item;
#line 71 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				session = _tmp10_;
#line 72 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_tmp11_ = self->priv->_app;
#line 72 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_tmp12_ = midori_app_create_browser (_tmp11_);
#line 72 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				browser = _tmp12_;
#line 75 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_tmp13_ = browser;
#line 75 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_tmp14_ = session;
#line 75 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_tmp16_ = self->priv->_app;
#line 77 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_tmp17_ = browser;
#line 77 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				midori_app_add_browser (_tmp16_, _tmp17_);
#line 78 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_tmp18_ = browser;
#line 78 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				gtk_widget_show ((GtkWidget*) _tmp18_);
#line 80 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_tmp19_ = session;
#line 80 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_tmp20_ = browser;
#line 80 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				tabby_isession_restore ((TabbyISession*) _tmp19_, _tmp20_);
#line 70 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_g_object_unref0 (browser);
#line 70 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_g_object_unref0 (session);
#line 70 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_g_object_unref0 (item);
#line 654 "tabby.c"
			}
		}
	}
#line 64 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_list_free0 (items);
#line 660 "tabby.c"
}


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


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


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


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


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


static void tabby_base_storage_set_app (TabbyBaseStorage* self, MidoriApp* value) {
#line 49 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 49 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (tabby_base_storage_get_app (self) != value) {
#line 822 "tabby.c"
		MidoriApp* _tmp0_;
		MidoriApp* _tmp1_;
#line 49 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp0_ = value;
#line 49 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp1_ = _g_object_ref0 (_tmp0_);
#line 49 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_object_unref0 (self->priv->_app);
#line 49 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		self->priv->_app = _tmp1_;
#line 49 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_object_notify_by_pspec ((GObject *) self, tabby_base_storage_properties[TABBY_BASE_STORAGE_APP_PROPERTY]);
#line 835 "tabby.c"
	}
}


static void tabby_base_storage_class_init (TabbyBaseStorageClass * klass) {
#line 48 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	tabby_base_storage_parent_class = g_type_class_peek_parent (klass);
#line 48 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_type_class_add_private (klass, sizeof (TabbyBaseStoragePrivate));
#line 48 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	((TabbyBaseStorageClass *) klass)->get_saved_sessions = (KatzeArray* (*) (TabbyBaseStorage *)) tabby_base_storage_real_get_saved_sessions;
#line 48 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	((TabbyBaseStorageClass *) klass)->get_new_session = (TabbyBaseSession* (*) (TabbyBaseStorage *)) tabby_base_storage_real_get_new_session;
#line 48 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	((TabbyBaseStorageClass *) klass)->import_session = (void (*) (TabbyBaseStorage *, KatzeArray*)) tabby_base_storage_real_import_session;
#line 48 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_tabby_base_storage_get_property;
#line 48 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_tabby_base_storage_set_property;
#line 48 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	G_OBJECT_CLASS (klass)->finalize = tabby_base_storage_finalize;
#line 48 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), TABBY_BASE_STORAGE_APP_PROPERTY, tabby_base_storage_properties[TABBY_BASE_STORAGE_APP_PROPERTY] = 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 859 "tabby.c"
}


static void tabby_base_storage_tabby_istorage_interface_init (TabbyIStorageIface * iface) {
#line 48 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	iface->get_saved_sessions = (KatzeArray* (*) (TabbyIStorage *)) tabby_base_storage_get_saved_sessions;
#line 48 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	iface->get_new_session = (TabbyBaseSession* (*) (TabbyIStorage *)) tabby_base_storage_get_new_session;
#line 48 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	iface->import_session = (void (*) (TabbyIStorage *, KatzeArray*)) tabby_base_storage_import_session;
#line 874 "tabby.c"
}


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


static void tabby_base_storage_finalize (GObject * obj) {
	TabbyBaseStorage * self;
#line 48 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TABBY_BASE_TYPE_STORAGE, TabbyBaseStorage);
#line 49 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_object_unref0 (self->priv->_app);
#line 48 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	G_OBJECT_CLASS (tabby_base_storage_parent_class)->finalize (obj);
#line 893 "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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	switch (property_id) {
#line 48 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		case TABBY_BASE_STORAGE_APP_PROPERTY:
#line 48 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_value_set_object (value, tabby_base_storage_get_app (self));
#line 48 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		break;
#line 922 "tabby.c"
		default:
#line 48 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 48 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		break;
#line 928 "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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	switch (property_id) {
#line 48 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		case TABBY_BASE_STORAGE_APP_PROPERTY:
#line 48 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		tabby_base_storage_set_app (self, g_value_get_object (value));
#line 48 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		break;
#line 944 "tabby.c"
		default:
#line 48 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 48 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		break;
#line 950 "tabby.c"
	}
}


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


static inline void _g_slist_free__g_free0_ (GSList* self) {
#line 99 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_slist_free_full (self, (GDestroyNotify) _g_free0_);
#line 965 "tabby.c"
}


static void tabby_base_session_real_add_item (TabbyBaseSession* self, KatzeItem* item) {
#line 104 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	return;
#line 974 "tabby.c"
}


void tabby_base_session_add_item (TabbyBaseSession* self, KatzeItem* item) {
#line 104 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 104 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	TABBY_BASE_SESSION_GET_CLASS (self)->add_item (self, item);
#line 983 "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.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	return;
#line 992 "tabby.c"
}


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


static void tabby_base_session_real_data_changed (TabbyBaseSession* self, MidoriView* view) {
#line 106 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	return;
#line 1010 "tabby.c"
}


void tabby_base_session_data_changed (TabbyBaseSession* self, MidoriView* view) {
#line 106 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 106 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	TABBY_BASE_SESSION_GET_CLASS (self)->data_changed (self, view);
#line 1019 "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.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	return;
#line 1028 "tabby.c"
}


void tabby_base_session_tab_added (TabbyBaseSession* self, MidoriBrowser* browser, MidoriView* view) {
#line 107 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 107 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	TABBY_BASE_SESSION_GET_CLASS (self)->tab_added (self, browser, view);
#line 1037 "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.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	return;
#line 1046 "tabby.c"
}


void tabby_base_session_tab_removed (TabbyBaseSession* self, MidoriBrowser* browser, MidoriView* view) {
#line 108 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 108 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	TABBY_BASE_SESSION_GET_CLASS (self)->tab_removed (self, browser, view);
#line 1055 "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.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	return;
#line 1064 "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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 109 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	TABBY_BASE_SESSION_GET_CLASS (self)->tab_switched (self, old_view, new_view);
#line 1073 "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.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	return;
#line 1082 "tabby.c"
}


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


static void tabby_base_session_real_remove (TabbyBaseSession* self) {
#line 112 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	return;
#line 1100 "tabby.c"
}


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


static KatzeArray* tabby_base_session_real_get_tabs (TabbyBaseSession* self) {
#line 114 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	return NULL;
#line 1118 "tabby.c"
}


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


static gdouble tabby_base_session_real_get_max_sorting (TabbyBaseSession* self) {
	gdouble _tmp0_ = 0.0;
#line 115 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	return _tmp0_;
#line 1137 "tabby.c"
}


gdouble tabby_base_session_get_max_sorting (TabbyBaseSession* self) {
#line 115 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_val_if_fail (self != NULL, 0.0);
#line 115 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	return TABBY_BASE_SESSION_GET_CLASS (self)->get_max_sorting (self);
#line 1146 "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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	tabby_base_session_tab_added ((TabbyBaseSession*) self, _sender, tab);
#line 1153 "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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	tabby_base_session_helper_data_changed ((TabbyBaseSession*) self, _sender, tab);
#line 1160 "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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	tabby_base_session_tab_removed ((TabbyBaseSession*) self, _sender, tab);
#line 1167 "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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	tabby_base_session_tab_switched ((TabbyBaseSession*) self, old_view, new_view);
#line 1174 "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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	return result;
#line 1183 "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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	tabby_base_session_tab_reordered ((TabbyBaseSession*) self, p0, p1);
#line 1190 "tabby.c"
}


static void tabby_base_session_real_attach (TabbyISession* base, MidoriBrowser* browser) {
	TabbyBaseSession * self;
	MidoriBrowser* _tmp0_;
	MidoriBrowser* _tmp1_;
	MidoriBrowser* _tmp2_;
	MidoriBrowser* _tmp3_;
	MidoriBrowser* _tmp4_;
	MidoriBrowser* _tmp5_;
	MidoriBrowser* _tmp6_;
	GtkNotebook* _tmp7_;
	GtkNotebook* _tmp8_;
	GtkNotebook* _tmp9_;
	MidoriBrowser* _tmp10_;
	GList* _tmp11_;
#line 117 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	self = (TabbyBaseSession*) base;
#line 117 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_if_fail (browser != NULL);
#line 118 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp0_ = browser;
#line 118 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	tabby_base_session_set_browser (self, _tmp0_);
#line 120 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp1_ = browser;
#line 120 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp2_ = browser;
#line 121 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp3_ = browser;
#line 123 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp4_ = browser;
#line 124 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp5_ = browser;
#line 125 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp6_ = browser;
#line 126 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_object_get (_tmp6_, "notebook", &_tmp7_, NULL);
#line 126 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp8_ = _tmp7_;
#line 126 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp9_ = _tmp8_;
#line 126 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_object_unref0 (_tmp9_);
#line 128 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	tabby_base_session_set_state (self, TABBY_SESSION_STATE_OPEN);
#line 130 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp10_ = browser;
#line 130 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp11_ = midori_browser_get_tabs (_tmp10_);
#line 1254 "tabby.c"
	{
		GList* view_collection = NULL;
		GList* view_it = NULL;
#line 130 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		view_collection = _tmp11_;
#line 130 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		for (view_it = view_collection; view_it != NULL; view_it = view_it->next) {
#line 1262 "tabby.c"
			MidoriView* _tmp12_;
			MidoriView* view = NULL;
#line 130 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp12_ = _g_object_ref0 ((MidoriView*) view_it->data);
#line 130 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			view = _tmp12_;
#line 1269 "tabby.c"
			{
				MidoriBrowser* _tmp13_;
				MidoriView* _tmp14_;
				MidoriBrowser* _tmp15_;
				MidoriView* _tmp16_;
#line 131 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_tmp13_ = browser;
#line 131 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_tmp14_ = view;
#line 131 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				tabby_base_session_tab_added (self, _tmp13_, _tmp14_);
#line 132 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_tmp15_ = browser;
#line 132 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_tmp16_ = view;
#line 132 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				tabby_base_session_helper_data_changed (self, _tmp15_, _tmp16_);
#line 130 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_g_object_unref0 (view);
#line 1289 "tabby.c"
			}
		}
#line 130 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_list_free0 (view_collection);
#line 1294 "tabby.c"
	}
}


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


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


static gboolean __lambda6_ (Block1Data* _data1_) {
	TabbyBaseSession* self;
	gboolean result = FALSE;
	GPtrArray* new_tabs = NULL;
	GPtrArray* _tmp0_;
	GList* _tmp1_;
	guint _tmp2_;
	GList* _tmp25_;
#line 187 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	self = _data1_->self;
#line 189 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp0_ = g_ptr_array_new ();
#line 189 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	new_tabs = _tmp0_;
#line 190 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp1_ = _data1_->items;
#line 190 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp2_ = g_list_length (_tmp1_);
#line 190 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (_tmp2_ > ((guint) 0)) {
#line 1350 "tabby.c"
		GPtrArray* _tmp24_;
		{
			gint i = 0;
#line 191 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			i = 0;
#line 1356 "tabby.c"
			{
				gboolean _tmp3_ = FALSE;
#line 191 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_tmp3_ = TRUE;
#line 191 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				while (TRUE) {
#line 1363 "tabby.c"
					gint _tmp5_;
					gint _tmp6_;
					GList* _tmp7_;
					KatzeItem* t_item = NULL;
					GList* _tmp9_;
					gconstpointer _tmp10_;
					KatzeItem* _tmp11_;
					KatzeItem* _tmp12_;
					gboolean _tmp13_ = FALSE;
					gboolean _tmp14_;
					GtkWidget* tab = NULL;
					MidoriBrowser* _tmp17_;
					KatzeItem* _tmp18_;
					GtkWidget* _tmp19_;
					GPtrArray* _tmp20_;
					GtkWidget* _tmp21_;
					GList* _tmp22_;
					GList* _tmp23_;
#line 191 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					if (!_tmp3_) {
#line 1384 "tabby.c"
						gint _tmp4_;
#line 191 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						_tmp4_ = i;
#line 191 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						i = _tmp4_ + 1;
#line 1390 "tabby.c"
					}
#line 191 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_tmp3_ = FALSE;
#line 191 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_tmp5_ = i;
#line 191 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_tmp6_ = tabby_IDLE_RESTORE_COUNT;
#line 191 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					if (!(_tmp5_ < _tmp6_)) {
#line 191 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						break;
#line 1402 "tabby.c"
					}
#line 192 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_tmp7_ = _data1_->u_items;
#line 192 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					if (_tmp7_ == NULL) {
#line 1408 "tabby.c"
						GPtrArray* _tmp8_;
#line 193 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						_tmp8_ = new_tabs;
#line 193 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						tabby_base_session_helper_reorder_tabs (self, _tmp8_);
#line 194 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						tabby_base_session_set_state (self, TABBY_SESSION_STATE_OPEN);
#line 195 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						result = FALSE;
#line 195 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						_g_ptr_array_unref0 (new_tabs);
#line 195 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						return result;
#line 1422 "tabby.c"
					}
#line 198 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_tmp9_ = _data1_->u_items;
#line 198 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_tmp10_ = _tmp9_->data;
#line 198 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_tmp11_ = _g_object_ref0 ((KatzeItem*) _tmp10_);
#line 198 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					t_item = _tmp11_;
#line 200 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_tmp12_ = t_item;
#line 200 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					katze_item_set_meta_integer (_tmp12_, "append", (gint64) 1);
#line 202 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_tmp14_ = _data1_->delay;
#line 202 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					if (_tmp14_) {
#line 1440 "tabby.c"
						gboolean _tmp15_;
#line 202 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						_tmp15_ = _data1_->should_delay;
#line 202 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						_tmp13_ = _tmp15_;
#line 1446 "tabby.c"
					} else {
#line 202 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						_tmp13_ = FALSE;
#line 1450 "tabby.c"
					}
#line 202 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					if (_tmp13_) {
#line 1454 "tabby.c"
						KatzeItem* _tmp16_;
#line 203 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						_tmp16_ = t_item;
#line 203 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						katze_item_set_meta_integer (_tmp16_, "delay", (gint64) MIDORI_DELAY_DELAYED);
#line 1460 "tabby.c"
					} else {
#line 205 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						_data1_->delay = TRUE;
#line 1464 "tabby.c"
					}
#line 207 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_tmp17_ = _data1_->browser;
#line 207 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_tmp18_ = t_item;
#line 207 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_tmp19_ = midori_browser_add_item (_tmp17_, _tmp18_);
#line 207 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					tab = _tmp19_;
#line 208 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_tmp20_ = new_tabs;
#line 208 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_tmp21_ = tab;
#line 208 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					g_ptr_array_add (_tmp20_, _tmp21_);
#line 210 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_tmp22_ = _data1_->u_items;
#line 210 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_tmp23_ = _tmp22_->next;
#line 210 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_data1_->u_items = _tmp23_;
#line 191 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_g_object_unref0 (t_item);
#line 1488 "tabby.c"
				}
			}
		}
#line 212 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp24_ = new_tabs;
#line 212 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		tabby_base_session_helper_reorder_tabs (self, _tmp24_);
#line 1496 "tabby.c"
	}
#line 214 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp25_ = _data1_->u_items;
#line 214 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (_tmp25_ == NULL) {
#line 215 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		tabby_base_session_set_state (self, TABBY_SESSION_STATE_OPEN);
#line 216 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		result = FALSE;
#line 216 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_ptr_array_unref0 (new_tabs);
#line 216 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		return result;
#line 1510 "tabby.c"
	}
#line 218 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	result = TRUE;
#line 218 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_ptr_array_unref0 (new_tabs);
#line 218 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	return result;
#line 1518 "tabby.c"
}


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


static void tabby_base_session_real_restore (TabbyISession* base, MidoriBrowser* browser) {
	TabbyBaseSession * self;
	Block1Data* _data1_;
	MidoriBrowser* _tmp0_;
	MidoriBrowser* _tmp1_;
	MidoriBrowser* _tmp2_;
	KatzeArray* tabs = NULL;
	KatzeArray* _tmp3_;
	KatzeArray* open_uris = NULL;
	MidoriBrowser* _tmp4_;
	gconstpointer _tmp5_;
	gboolean _tmp6_ = FALSE;
	KatzeArray* _tmp7_;
	gboolean _tmp8_;
	MidoriBrowser* _tmp20_;
	MidoriBrowser* _tmp21_;
	MidoriBrowser* _tmp22_;
	MidoriBrowser* _tmp23_;
	MidoriBrowser* _tmp24_;
	MidoriBrowser* _tmp25_;
	GtkNotebook* _tmp26_;
	GtkNotebook* _tmp27_;
	GtkNotebook* _tmp28_;
	KatzeArray* _tmp29_;
	KatzeArray* _tmp32_;
	GList* _tmp33_;
	GList* _tmp34_;
	gint load_on_startup = 0;
	MidoriApp* _tmp35_;
	MidoriWebSettings* _tmp36_;
	MidoriWebSettings* _tmp37_;
	MidoriWebSettings* _tmp38_;
	gint _tmp39_;
	MidoriApp* _tmp40_;
	gboolean _tmp41_;
	gboolean _tmp42_;
#line 136 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	self = (TabbyBaseSession*) base;
#line 136 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_if_fail (browser != NULL);
#line 136 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_data1_ = g_slice_new0 (Block1Data);
#line 136 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_data1_->_ref_count_ = 1;
#line 136 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_data1_->self = g_object_ref (self);
#line 136 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp0_ = browser;
#line 136 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 136 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_object_unref0 (_data1_->browser);
#line 136 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_data1_->browser = _tmp1_;
#line 137 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp2_ = _data1_->browser;
#line 137 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	tabby_base_session_set_browser (self, _tmp2_);
#line 139 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp3_ = tabby_base_session_get_tabs (self);
#line 139 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	tabs = _tmp3_;
#line 140 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp4_ = _data1_->browser;
#line 140 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp5_ = g_object_get_data ((GObject*) _tmp4_, "tabby-open-uris");
#line 140 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	open_uris = (KatzeArray*) _tmp5_;
#line 142 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp7_ = tabs;
#line 142 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp8_ = katze_array_is_empty (_tmp7_);
#line 142 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (_tmp8_) {
#line 1605 "tabby.c"
		KatzeArray* _tmp9_;
#line 142 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp9_ = open_uris;
#line 142 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp6_ = _tmp9_ == NULL;
#line 1611 "tabby.c"
	} else {
#line 142 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp6_ = FALSE;
#line 1615 "tabby.c"
	}
#line 142 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (_tmp6_) {
#line 1619 "tabby.c"
		gint load_on_startup = 0;
		MidoriApp* _tmp10_;
		MidoriWebSettings* _tmp11_;
		MidoriWebSettings* _tmp12_;
		MidoriWebSettings* _tmp13_;
		KatzeItem* item = NULL;
		KatzeItem* _tmp14_;
		gint _tmp15_;
		KatzeArray* _tmp18_;
		KatzeItem* _tmp19_;
#line 145 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp10_ = tabby_APP;
#line 145 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_object_get (_tmp10_, "settings", &_tmp11_, NULL);
#line 145 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp12_ = _tmp11_;
#line 145 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp13_ = _tmp12_;
#line 145 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_object_get ((GObject*) _tmp13_, "load-on-startup", &load_on_startup, NULL);
#line 145 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_object_unref0 (_tmp13_);
#line 147 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp14_ = katze_item_new ();
#line 147 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		item = _tmp14_;
#line 149 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp15_ = load_on_startup;
#line 149 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		if (_tmp15_ == ((gint) MIDORI_STARTUP_BLANK_PAGE)) {
#line 1650 "tabby.c"
			KatzeItem* _tmp16_;
#line 150 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp16_ = item;
#line 150 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			katze_item_set_uri (_tmp16_, "about:dial");
#line 1656 "tabby.c"
		} else {
			KatzeItem* _tmp17_;
#line 152 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp17_ = item;
#line 152 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			katze_item_set_uri (_tmp17_, "about:home");
#line 1663 "tabby.c"
		}
#line 155 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp18_ = tabs;
#line 155 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp19_ = item;
#line 155 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_signal_emit_by_name (_tmp18_, "add-item", (GObject*) _tmp19_);
#line 142 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_object_unref0 (item);
#line 1673 "tabby.c"
	}
#line 158 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp20_ = _data1_->browser;
#line 158 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp21_ = _data1_->browser;
#line 159 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp22_ = _data1_->browser;
#line 161 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp23_ = _data1_->browser;
#line 162 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp24_ = _data1_->browser;
#line 163 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp25_ = _data1_->browser;
#line 164 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_object_get (_tmp25_, "notebook", &_tmp26_, NULL);
#line 164 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp27_ = _tmp26_;
#line 164 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp28_ = _tmp27_;
#line 164 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_object_unref0 (_tmp28_);
#line 166 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_data1_->items = NULL;
#line 167 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp29_ = open_uris;
#line 167 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (_tmp29_ != NULL) {
#line 1713 "tabby.c"
		KatzeArray* _tmp30_;
		GList* _tmp31_;
#line 168 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp30_ = open_uris;
#line 168 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp31_ = katze_array_get_items (_tmp30_);
#line 168 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_data1_->items = g_list_concat (_data1_->items, _tmp31_);
#line 1722 "tabby.c"
	}
#line 170 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp32_ = tabs;
#line 170 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp33_ = katze_array_get_items (_tmp32_);
#line 170 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_data1_->items = g_list_concat (_data1_->items, _tmp33_);
#line 171 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp34_ = _data1_->items;
#line 171 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_data1_->u_items = _tmp34_;
#line 173 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_data1_->delay = FALSE;
#line 174 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_data1_->should_delay = FALSE;
#line 177 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp35_ = tabby_APP;
#line 177 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_object_get (_tmp35_, "settings", &_tmp36_, NULL);
#line 177 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp37_ = _tmp36_;
#line 177 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp38_ = _tmp37_;
#line 177 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_object_get ((GObject*) _tmp38_, "load-on-startup", &load_on_startup, NULL);
#line 177 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_object_unref0 (_tmp38_);
#line 178 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp39_ = load_on_startup;
#line 178 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_data1_->should_delay = _tmp39_ == ((gint) MIDORI_STARTUP_DELAYED_PAGES);
#line 180 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp40_ = tabby_APP;
#line 180 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp41_ = midori_app_get_crashed (_tmp40_);
#line 180 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp42_ = _tmp41_;
#line 180 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (_tmp42_ == TRUE) {
#line 181 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_data1_->delay = TRUE;
#line 182 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_data1_->should_delay = TRUE;
#line 1766 "tabby.c"
	}
#line 185 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	tabby_base_session_set_state (self, TABBY_SESSION_STATE_RESTORING);
#line 187 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_object_unref0 (tabs);
#line 136 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	block1_data_unref (_data1_);
#line 136 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_data1_ = NULL;
#line 1778 "tabby.c"
}


static void tabby_base_session_real_close (TabbyBaseSession* self) {
	TabbySessionState _tmp0_;
#line 223 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp0_ = self->priv->_state;
#line 223 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (_tmp0_ == TABBY_SESSION_STATE_CLOSED) {
#line 1788 "tabby.c"
		MidoriBrowser* _tmp1_;
#line 224 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp1_ = self->priv->_browser;
#line 224 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_vala_assert (_tmp1_ == NULL, "this.browser == null");
#line 1794 "tabby.c"
	} else {
		MidoriBrowser* _tmp2_;
		guint _tmp3_;
		MidoriBrowser* _tmp4_;
		guint _tmp5_;
		MidoriBrowser* _tmp6_;
		guint _tmp7_;
		MidoriBrowser* _tmp8_;
		guint _tmp9_;
		MidoriBrowser* _tmp10_;
		guint _tmp11_;
		MidoriBrowser* _tmp12_;
		GtkNotebook* _tmp13_;
		GtkNotebook* _tmp14_;
		GtkNotebook* _tmp15_;
		guint _tmp16_;
#line 226 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		tabby_base_session_set_state (self, TABBY_SESSION_STATE_CLOSED);
#line 228 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp2_ = self->priv->_browser;
#line 228 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_signal_parse_name ("add-tab", MIDORI_TYPE_BROWSER, &_tmp3_, NULL, FALSE);
#line 228 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp4_ = self->priv->_browser;
#line 229 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_signal_parse_name ("add-tab", MIDORI_TYPE_BROWSER, &_tmp5_, NULL, FALSE);
#line 229 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp6_ = self->priv->_browser;
#line 230 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_signal_parse_name ("remove-tab", MIDORI_TYPE_BROWSER, &_tmp7_, NULL, FALSE);
#line 230 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp8_ = self->priv->_browser;
#line 231 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_signal_parse_name ("switch-tab", MIDORI_TYPE_BROWSER, &_tmp9_, NULL, FALSE);
#line 231 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp10_ = self->priv->_browser;
#line 232 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_signal_parse_name ("delete-event", GTK_TYPE_WIDGET, &_tmp11_, NULL, FALSE);
#line 232 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp12_ = self->priv->_browser;
#line 233 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_object_get (_tmp12_, "notebook", &_tmp13_, NULL);
#line 233 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp14_ = _tmp13_;
#line 233 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp15_ = _tmp14_;
#line 233 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_signal_parse_name ("page-reordered", GTK_TYPE_NOTEBOOK, &_tmp16_, NULL, FALSE);
#line 233 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_object_unref0 (_tmp15_);
#line 235 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		tabby_base_session_set_browser (self, NULL);
#line 1859 "tabby.c"
	}
}


void tabby_base_session_close (TabbyBaseSession* self) {
#line 222 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 222 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	TABBY_BASE_SESSION_GET_CLASS (self)->close (self);
#line 1869 "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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 242 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_val_if_fail (widget != NULL, FALSE);
#line 242 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_val_if_fail (event != NULL, FALSE);
#line 245 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	tabby_base_session_close (self);
#line 246 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	result = FALSE;
#line 246 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	return result;
#line 1887 "tabby.c"
}


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


gdouble tabby_base_session_get_tab_sorting (TabbyBaseSession* self, MidoriView* view) {
	gdouble result = 0.0;
	gint this_pos = 0;
	MidoriBrowser* _tmp0_;
	GtkNotebook* _tmp1_;
	GtkNotebook* _tmp2_;
	GtkNotebook* _tmp3_;
	MidoriView* _tmp4_;
	gint _tmp5_;
	gint _tmp6_;
	MidoriView* prev_view = NULL;
	MidoriBrowser* _tmp7_;
	GtkNotebook* _tmp8_;
	GtkNotebook* _tmp9_;
	GtkNotebook* _tmp10_;
	gint _tmp11_;
	GtkWidget* _tmp12_;
	MidoriView* _tmp13_;
	MidoriView* _tmp14_;
	MidoriView* next_view = NULL;
	MidoriBrowser* _tmp15_;
	GtkNotebook* _tmp16_;
	GtkNotebook* _tmp17_;
	GtkNotebook* _tmp18_;
	gint _tmp19_;
	GtkWidget* _tmp20_;
	MidoriView* _tmp21_;
	MidoriView* _tmp22_;
	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_;
	const gchar* _tmp29_;
	MidoriView* _tmp35_;
	const gchar* _tmp41_;
	gdouble _tmp45_;
	gdouble _tmp46_;
	gdouble _tmp47_;
#line 250 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_val_if_fail (self != NULL, 0.0);
#line 250 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_val_if_fail (view != NULL, 0.0);
#line 251 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp0_ = self->priv->_browser;
#line 251 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_object_get (_tmp0_, "notebook", &_tmp1_, NULL);
#line 251 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp2_ = _tmp1_;
#line 251 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp3_ = _tmp2_;
#line 251 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp4_ = view;
#line 251 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp5_ = gtk_notebook_page_num (_tmp3_, (GtkWidget*) _tmp4_);
#line 251 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp6_ = _tmp5_;
#line 251 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_object_unref0 (_tmp3_);
#line 251 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	this_pos = _tmp6_;
#line 252 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp7_ = self->priv->_browser;
#line 252 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_object_get (_tmp7_, "notebook", &_tmp8_, NULL);
#line 252 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp9_ = _tmp8_;
#line 252 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp10_ = _tmp9_;
#line 252 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp11_ = this_pos;
#line 252 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp12_ = gtk_notebook_get_nth_page (_tmp10_, _tmp11_ - 1);
#line 252 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp14_ = _tmp13_;
#line 252 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_object_unref0 (_tmp10_);
#line 252 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	prev_view = _tmp14_;
#line 253 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp15_ = self->priv->_browser;
#line 253 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_object_get (_tmp15_, "notebook", &_tmp16_, NULL);
#line 253 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp17_ = _tmp16_;
#line 253 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp18_ = _tmp17_;
#line 253 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp19_ = this_pos;
#line 253 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp20_ = gtk_notebook_get_nth_page (_tmp18_, _tmp19_ + 1);
#line 253 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp22_ = _tmp21_;
#line 253 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_object_unref0 (_tmp18_);
#line 253 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	next_view = _tmp22_;
#line 255 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	prev_meta_sorting = NULL;
#line 256 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	next_meta_sorting = NULL;
#line 259 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp23_ = prev_view;
#line 259 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (_tmp23_ != NULL) {
#line 2019 "tabby.c"
		KatzeItem* prev_item = NULL;
		MidoriView* _tmp24_;
		KatzeItem* _tmp25_;
		KatzeItem* _tmp26_;
		const gchar* _tmp27_;
		gchar* _tmp28_;
#line 260 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp24_ = prev_view;
#line 260 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp25_ = midori_view_get_proxy_item (_tmp24_);
#line 260 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		prev_item = _tmp25_;
#line 261 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp26_ = prev_item;
#line 261 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp27_ = katze_item_get_meta_string (_tmp26_, "sorting");
#line 261 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp28_ = g_strdup (_tmp27_);
#line 261 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_free0 (prev_meta_sorting);
#line 261 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		prev_meta_sorting = _tmp28_;
#line 2042 "tabby.c"
	}
#line 264 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp29_ = prev_meta_sorting;
#line 264 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (_tmp29_ == NULL) {
#line 2048 "tabby.c"
		TabbySessionState _tmp30_;
#line 265 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp30_ = self->priv->_state;
#line 265 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		if (_tmp30_ == TABBY_SESSION_STATE_RESTORING) {
#line 2054 "tabby.c"
			gdouble _tmp31_;
#line 266 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp31_ = tabby_base_session_get_max_sorting (self);
#line 266 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			prev_sorting = _tmp31_;
#line 2060 "tabby.c"
		} else {
			gdouble _tmp32_;
#line 268 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp32_ = double_parse ("0");
#line 268 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			prev_sorting = _tmp32_;
#line 2067 "tabby.c"
		}
	} else {
		const gchar* _tmp33_;
		gdouble _tmp34_;
#line 270 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp33_ = prev_meta_sorting;
#line 270 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp34_ = double_parse (_tmp33_);
#line 270 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		prev_sorting = _tmp34_;
#line 2078 "tabby.c"
	}
#line 272 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp35_ = next_view;
#line 272 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (_tmp35_ != NULL) {
#line 2084 "tabby.c"
		KatzeItem* next_item = NULL;
		MidoriView* _tmp36_;
		KatzeItem* _tmp37_;
		KatzeItem* _tmp38_;
		const gchar* _tmp39_;
		gchar* _tmp40_;
#line 273 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp36_ = next_view;
#line 273 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp37_ = midori_view_get_proxy_item (_tmp36_);
#line 273 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		next_item = _tmp37_;
#line 274 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp38_ = next_item;
#line 274 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp39_ = katze_item_get_meta_string (_tmp38_, "sorting");
#line 274 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp40_ = g_strdup (_tmp39_);
#line 274 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_free0 (next_meta_sorting);
#line 274 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		next_meta_sorting = _tmp40_;
#line 2107 "tabby.c"
	}
#line 277 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp41_ = next_meta_sorting;
#line 277 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (_tmp41_ == NULL) {
#line 2113 "tabby.c"
		gdouble _tmp42_;
#line 278 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp42_ = prev_sorting;
#line 278 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		next_sorting = _tmp42_ + 2048;
#line 2119 "tabby.c"
	} else {
		const gchar* _tmp43_;
		gdouble _tmp44_;
#line 280 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp43_ = next_meta_sorting;
#line 280 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp44_ = double_parse (_tmp43_);
#line 280 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		next_sorting = _tmp44_;
#line 2129 "tabby.c"
	}
#line 282 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp45_ = prev_sorting;
#line 282 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp46_ = next_sorting;
#line 282 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp47_ = prev_sorting;
#line 282 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	this_sorting = _tmp45_ + ((_tmp46_ - _tmp47_) / 2);
#line 284 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	result = this_sorting;
#line 284 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_free0 (next_meta_sorting);
#line 284 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_free0 (prev_meta_sorting);
#line 284 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_object_unref0 (next_view);
#line 284 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_object_unref0 (prev_view);
#line 284 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	return result;
#line 2151 "tabby.c"
}


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


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


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


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


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


static void _____lambda5__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 298 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	____lambda5_ (self);
#line 2235 "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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	tabby_base_session_load_status ((TabbyBaseSession*) self, _sender, pspec);
#line 2242 "tabby.c"
}


static void tabby_base_session_load_status (TabbyBaseSession* self, GObject* _view, GParamSpec* pspec) {
	Block2Data* _data2_;
	GObject* _tmp0_;
	MidoriView* _tmp1_;
	MidoriView* _tmp2_;
	MidoriLoadStatus _tmp3_;
	MidoriLoadStatus _tmp4_;
#line 287 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 287 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_if_fail (_view != NULL);
#line 287 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_if_fail (pspec != NULL);
#line 287 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_data2_ = g_slice_new0 (Block2Data);
#line 287 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_data2_->_ref_count_ = 1;
#line 287 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_data2_->self = g_object_ref (self);
#line 288 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp0_ = _view;
#line 288 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_data2_->view = _tmp1_;
#line 290 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp2_ = _data2_->view;
#line 290 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp3_ = midori_tab_get_load_status ((MidoriTab*) _tmp2_);
#line 290 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp4_ = _tmp3_;
#line 290 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (_tmp4_ == MIDORI_LOAD_PROVISIONAL) {
#line 2279 "tabby.c"
		KatzeItem* item = NULL;
		MidoriView* _tmp5_;
		KatzeItem* _tmp6_;
		gint64 delay = 0LL;
		KatzeItem* _tmp7_;
		gint64 _tmp8_;
		gint64 _tmp9_;
		MidoriView* _tmp16_;
		guint _tmp17_;
		GQuark _tmp18_;
#line 291 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp5_ = _data2_->view;
#line 291 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp6_ = midori_view_get_proxy_item (_tmp5_);
#line 291 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		item = _tmp6_;
#line 293 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp7_ = item;
#line 293 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp8_ = katze_item_get_meta_integer (_tmp7_, "delay");
#line 293 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		delay = _tmp8_;
#line 294 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp9_ = delay;
#line 294 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		if (_tmp9_ == ((gint64) MIDORI_DELAY_UNDELAYED)) {
#line 2306 "tabby.c"
			MidoriView* _tmp10_;
			WebKitWebView* _tmp11_;
			WebKitWebView* _tmp12_;
			MidoriView* _tmp13_;
			WebKitWebView* _tmp14_;
			WebKitWebView* _tmp15_;
#line 295 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp10_ = _data2_->view;
#line 295 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp11_ = midori_tab_get_web_view ((MidoriTab*) _tmp10_);
#line 295 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp12_ = _tmp11_;
#line 295 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp13_ = _data2_->view;
#line 298 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp14_ = midori_tab_get_web_view ((MidoriTab*) _tmp13_);
#line 298 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp15_ = _tmp14_;
#line 298 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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 2329 "tabby.c"
		}
#line 304 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp16_ = _data2_->view;
#line 304 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/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 2337 "tabby.c"
	}
#line 287 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	block2_data_unref (_data2_);
#line 287 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_data2_ = NULL;
#line 2343 "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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	tabby_base_session_helper_duplicate_tab ((TabbyBaseSession*) self, _sender, new_view, where, user_initiated);
#line 2350 "tabby.c"
}


static void tabby_base_session_helper_data_changed (TabbyBaseSession* self, MidoriBrowser* browser, MidoriView* view) {
	MidoriView* _tmp0_;
	MidoriView* _tmp1_;
#line 308 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 308 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_if_fail (browser != NULL);
#line 308 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_if_fail (view != NULL);
#line 309 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp0_ = view;
#line 309 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp1_ = view;
#line 311 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_signal_connect_object (_tmp1_, "new-view", (GCallback) _tabby_base_session_helper_duplicate_tab_midori_view_new_view, self, 0);
#line 2371 "tabby.c"
}


static gint __lambda7_ (TabbyBaseSession* self, gdouble* a, gdouble* b) {
	gint result = 0;
	gdouble* _tmp0_;
	gdouble* _tmp1_;
#line 316 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp0_ = a;
#line 316 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp1_ = b;
#line 316 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if ((*_tmp0_) > (*_tmp1_)) {
#line 317 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		result = 1;
#line 317 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		return result;
#line 2389 "tabby.c"
	} else {
		gdouble* _tmp2_;
		gdouble* _tmp3_;
#line 318 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp2_ = a;
#line 318 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp3_ = b;
#line 318 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		if ((*_tmp2_) < (*_tmp3_)) {
#line 319 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			result = -1;
#line 319 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			return result;
#line 2403 "tabby.c"
		}
	}
#line 320 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	result = 0;
#line 320 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	return result;
#line 2410 "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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	return result;
#line 2419 "tabby.c"
}


static gboolean _double_equal (const gdouble * s1, const gdouble * s2) {
#line 324 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (s1 == s2) {
#line 324 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		return TRUE;
#line 2428 "tabby.c"
	}
#line 324 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (s1 == NULL) {
#line 324 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		return FALSE;
#line 2434 "tabby.c"
	}
#line 324 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (s2 == NULL) {
#line 324 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		return FALSE;
#line 2440 "tabby.c"
	}
#line 324 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	return (*s1) == (*s2);
#line 2444 "tabby.c"
}


static gint __lambda8_ (gdouble* a, gdouble* b) {
	gint result = 0;
	gint _tmp0_ = 0;
	gdouble* _tmp1_;
	gdouble* _tmp2_;
#line 324 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp1_ = a;
#line 324 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp2_ = b;
#line 324 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (_double_equal (_tmp1_, _tmp2_) == TRUE) {
#line 324 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp0_ = 0;
#line 2461 "tabby.c"
	} else {
#line 324 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp0_ = -1;
#line 2465 "tabby.c"
	}
#line 324 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	result = _tmp0_;
#line 324 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	return result;
#line 2471 "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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	return result;
#line 2480 "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_;
	gchar* _tmp1_ = NULL;
	gdouble _tmp2_;
	gchar* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	gint _tmp6_;
	gint _tmp7_;
#line 888 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	g_return_val_if_fail (str != NULL, FALSE);
#line 890 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp0_ = str;
#line 890 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp2_ = g_ascii_strtod (_tmp0_, &_tmp1_);
#line 890 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	endptr = _tmp1_;
#line 890 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	_vala_result = _tmp2_;
#line 891 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp3_ = endptr;
#line 891 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp4_ = str;
#line 891 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp5_ = str;
#line 891 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp6_ = strlen (_tmp5_);
#line 891 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp7_ = _tmp6_;
#line 891 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	if (_tmp3_ == (((gchar*) _tmp4_) + _tmp7_)) {
#line 892 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		result = TRUE;
#line 892 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		if (_result_) {
#line 892 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
			*_result_ = _vala_result;
#line 2524 "tabby.c"
		}
#line 892 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		return result;
#line 2528 "tabby.c"
	} else {
#line 894 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		result = FALSE;
#line 894 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		if (_result_) {
#line 894 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
			*_result_ = _vala_result;
#line 2536 "tabby.c"
		}
#line 894 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		return result;
#line 2540 "tabby.c"
	}
#line 888 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	if (_result_) {
#line 888 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		*_result_ = _vala_result;
#line 2546 "tabby.c"
	}
}


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


static gpointer __double_dup0 (gpointer self) {
#line 337 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	return self ? _double_dup (self) : NULL;
#line 2566 "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;
	GDestroyNotify helper_compare_data_target_destroy_notify;
	GCompareFunc helper_compare_func = NULL;
	MidoriBrowser* _tmp0_;
	GtkNotebook* _tmp1_;
	GtkNotebook* _tmp2_;
	GtkNotebook* _tmp3_;
	guint _tmp4_;
	MidoriBrowser* _tmp39_;
	GtkNotebook* _tmp40_;
	GtkNotebook* _tmp41_;
	GtkNotebook* _tmp42_;
#line 314 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 314 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_if_fail (new_tabs != NULL);
#line 315 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	helper_compare_data = ___lambda7__gcompare_data_func;
#line 315 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	helper_compare_data_target = g_object_ref (self);
#line 315 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	helper_compare_data_target_destroy_notify = g_object_unref;
#line 323 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	helper_compare_func = ___lambda8__gcompare_func;
#line 327 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp0_ = self->priv->_browser;
#line 327 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_object_get (_tmp0_, "notebook", &_tmp1_, NULL);
#line 327 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp2_ = _tmp1_;
#line 327 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp3_ = _tmp2_;
#line 327 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_signal_parse_name ("page-reordered", GTK_TYPE_NOTEBOOK, &_tmp4_, NULL, FALSE);
#line 327 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_object_unref0 (_tmp3_);
#line 2610 "tabby.c"
	{
		gint i = 0;
#line 328 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		i = 0;
#line 2615 "tabby.c"
		{
			gboolean _tmp5_ = FALSE;
#line 328 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp5_ = TRUE;
#line 328 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			while (TRUE) {
#line 2622 "tabby.c"
				gint _tmp7_;
				GPtrArray* _tmp8_;
				guint _tmp9_;
				MidoriView* tab = NULL;
				GPtrArray* _tmp10_;
				gint _tmp11_;
				void* _tmp12_;
				MidoriView* _tmp13_;
				KatzeItem* item = NULL;
				MidoriView* _tmp14_;
				KatzeItem* _tmp15_;
				gdouble sorting = 0.0;
				gchar* sorting_string = NULL;
				KatzeItem* _tmp16_;
				const gchar* _tmp17_;
				gchar* _tmp18_;
				const gchar* _tmp19_;
#line 328 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				if (!_tmp5_) {
#line 2642 "tabby.c"
					gint _tmp6_;
#line 328 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_tmp6_ = i;
#line 328 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					i = _tmp6_ + 1;
#line 2648 "tabby.c"
				}
#line 328 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_tmp5_ = FALSE;
#line 328 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_tmp7_ = i;
#line 328 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_tmp8_ = new_tabs;
#line 328 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_tmp9_ = _tmp8_->len;
#line 328 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				if (!(((guint) _tmp7_) < _tmp9_)) {
#line 328 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					break;
#line 2662 "tabby.c"
				}
#line 329 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_tmp10_ = new_tabs;
#line 329 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_tmp11_ = i;
#line 329 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_tmp12_ = g_ptr_array_index (_tmp10_, (guint) _tmp11_);
#line 329 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				tab = _tmp13_;
#line 331 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_tmp14_ = tab;
#line 331 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_tmp15_ = midori_view_get_proxy_item (_tmp14_);
#line 331 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				item = _tmp15_;
#line 334 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_tmp16_ = item;
#line 334 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_tmp17_ = katze_item_get_meta_string (_tmp16_, "sorting");
#line 334 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_tmp18_ = g_strdup (_tmp17_);
#line 334 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				sorting_string = _tmp18_;
#line 335 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_tmp19_ = sorting_string;
#line 335 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				if (_tmp19_ != NULL) {
#line 2692 "tabby.c"
					KatzeItem* _tmp20_;
					const gchar* _tmp21_;
					gdouble _tmp22_ = 0.0;
					gboolean _tmp23_;
#line 336 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_tmp20_ = item;
#line 336 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_tmp21_ = katze_item_get_meta_string (_tmp20_, "sorting");
#line 336 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_tmp23_ = double_try_parse (_tmp21_, &_tmp22_);
#line 336 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					sorting = _tmp22_;
#line 336 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					if (_tmp23_) {
#line 2707 "tabby.c"
						gdouble _tmp24_;
						gdouble* _tmp25_;
						GCompareDataFunc _tmp26_;
						void* _tmp26__target;
						gint index = 0;
						GSList* _tmp27_;
						GSList* _tmp28_;
						gdouble _tmp29_;
						GCompareFunc _tmp30_;
						GSList* _tmp31_;
						gint _tmp32_;
						MidoriBrowser* _tmp33_;
						GtkNotebook* _tmp34_;
						GtkNotebook* _tmp35_;
						GtkNotebook* _tmp36_;
						MidoriView* _tmp37_;
						gint _tmp38_;
#line 337 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						_tmp24_ = sorting;
#line 337 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						_tmp25_ = __double_dup0 (&_tmp24_);
#line 337 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						_tmp26_ = helper_compare_data;
#line 337 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						_tmp26__target = helper_compare_data_target;
#line 337 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						_tmp27_ = self->tab_sorting;
#line 339 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						_tmp28_ = self->tab_sorting;
#line 339 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						_tmp29_ = sorting;
#line 339 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						_tmp30_ = helper_compare_func;
#line 339 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						_tmp31_ = g_slist_find_custom (_tmp28_, &_tmp29_, _tmp30_);
#line 339 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						_tmp32_ = g_slist_position (_tmp27_, _tmp31_);
#line 339 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						index = _tmp32_;
#line 341 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						_tmp33_ = self->priv->_browser;
#line 341 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						g_object_get (_tmp33_, "notebook", &_tmp34_, NULL);
#line 341 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						_tmp35_ = _tmp34_;
#line 341 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						_tmp36_ = _tmp35_;
#line 341 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						_tmp37_ = tab;
#line 341 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						_tmp38_ = index;
#line 341 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						gtk_notebook_reorder_child (_tmp36_, (GtkWidget*) _tmp37_, _tmp38_);
#line 341 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						_g_object_unref0 (_tmp36_);
#line 2765 "tabby.c"
					}
				}
#line 328 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_g_free0 (sorting_string);
#line 328 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_g_object_unref0 (tab);
#line 2772 "tabby.c"
			}
		}
	}
#line 345 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp39_ = self->priv->_browser;
#line 345 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_object_get (_tmp39_, "notebook", &_tmp40_, NULL);
#line 345 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp41_ = _tmp40_;
#line 345 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp42_ = _tmp41_;
#line 345 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_object_unref0 (_tmp42_);
#line 314 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	helper_compare_data = NULL;
#line 314 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	helper_compare_data_target = NULL;
#line 314 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	helper_compare_data_target_destroy_notify = NULL;
#line 2796 "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_;
	KatzeItem* _tmp1_;
	KatzeItem* new_item = NULL;
	MidoriView* _tmp2_;
	KatzeItem* _tmp3_;
	gint64 tab_id = 0LL;
	KatzeItem* _tmp4_;
	gint64 _tmp5_;
	gint64 new_tab_id = 0LL;
	KatzeItem* _tmp6_;
	gint64 _tmp7_;
	gboolean _tmp8_ = FALSE;
	gint64 _tmp9_;
#line 348 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 348 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_if_fail (view != NULL);
#line 348 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_if_fail (new_view != NULL);
#line 349 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp0_ = view;
#line 349 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp1_ = midori_view_get_proxy_item (_tmp0_);
#line 349 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	item = _tmp1_;
#line 350 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp2_ = new_view;
#line 350 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp3_ = midori_view_get_proxy_item (_tmp2_);
#line 350 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	new_item = _tmp3_;
#line 351 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp4_ = item;
#line 351 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp5_ = katze_item_get_meta_integer (_tmp4_, "tabby-id");
#line 351 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	tab_id = _tmp5_;
#line 352 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp6_ = new_item;
#line 352 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp7_ = katze_item_get_meta_integer (_tmp6_, "tabby-id");
#line 352 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	new_tab_id = _tmp7_;
#line 354 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp9_ = tab_id;
#line 354 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (_tmp9_ > ((gint64) 0)) {
#line 2849 "tabby.c"
		gint64 _tmp10_;
		gint64 _tmp11_;
#line 354 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp10_ = tab_id;
#line 354 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp11_ = new_tab_id;
#line 354 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp8_ = _tmp10_ == _tmp11_;
#line 2858 "tabby.c"
	} else {
#line 354 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp8_ = FALSE;
#line 2862 "tabby.c"
	}
#line 354 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (_tmp8_) {
#line 2866 "tabby.c"
		KatzeItem* _tmp12_;
#line 355 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp12_ = new_item;
#line 355 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		katze_item_set_meta_integer (_tmp12_, "tabby-id", (gint64) 0);
#line 2872 "tabby.c"
	}
}


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


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


void tabby_base_session_set_browser (TabbyBaseSession* self, MidoriBrowser* value) {
#line 101 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 101 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (tabby_base_session_get_browser (self) != value) {
#line 2907 "tabby.c"
		MidoriBrowser* _tmp0_;
		MidoriBrowser* _tmp1_;
#line 101 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp0_ = value;
#line 101 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp1_ = _g_object_ref0 (_tmp0_);
#line 101 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_object_unref0 (self->priv->_browser);
#line 101 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		self->priv->_browser = _tmp1_;
#line 101 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_object_notify_by_pspec ((GObject *) self, tabby_base_session_properties[TABBY_BASE_SESSION_BROWSER_PROPERTY]);
#line 2920 "tabby.c"
	}
}


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


void tabby_base_session_set_state (TabbyBaseSession* self, TabbySessionState value) {
#line 102 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 102 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (tabby_base_session_get_state (self) != value) {
#line 2945 "tabby.c"
		TabbySessionState _tmp0_;
#line 102 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp0_ = value;
#line 102 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		self->priv->_state = _tmp0_;
#line 102 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_object_notify_by_pspec ((GObject *) self, tabby_base_session_properties[TABBY_BASE_SESSION_STATE_PROPERTY]);
#line 2953 "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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	parent_class = G_OBJECT_CLASS (tabby_base_session_parent_class);
#line 359 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
#line 359 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TABBY_BASE_TYPE_SESSION, TabbyBaseSession);
#line 360 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	__g_slist_free__g_free0_0 (self->tab_sorting);
#line 360 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	self->tab_sorting = NULL;
#line 359 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	return obj;
#line 2974 "tabby.c"
}


static void tabby_base_session_class_init (TabbyBaseSessionClass * klass) {
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	tabby_base_session_parent_class = g_type_class_peek_parent (klass);
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_type_class_add_private (klass, sizeof (TabbyBaseSessionPrivate));
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	((TabbyBaseSessionClass *) klass)->add_item = (void (*) (TabbyBaseSession *, KatzeItem*)) tabby_base_session_real_add_item;
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	((TabbyBaseSessionClass *) klass)->uri_changed = (void (*) (TabbyBaseSession *, MidoriView*, const gchar*)) tabby_base_session_real_uri_changed;
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	((TabbyBaseSessionClass *) klass)->data_changed = (void (*) (TabbyBaseSession *, MidoriView*)) tabby_base_session_real_data_changed;
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	((TabbyBaseSessionClass *) klass)->tab_added = (void (*) (TabbyBaseSession *, MidoriBrowser*, MidoriView*)) tabby_base_session_real_tab_added;
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	((TabbyBaseSessionClass *) klass)->tab_removed = (void (*) (TabbyBaseSession *, MidoriBrowser*, MidoriView*)) tabby_base_session_real_tab_removed;
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	((TabbyBaseSessionClass *) klass)->tab_switched = (void (*) (TabbyBaseSession *, MidoriView*, MidoriView*)) tabby_base_session_real_tab_switched;
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	((TabbyBaseSessionClass *) klass)->tab_reordered = (void (*) (TabbyBaseSession *, GtkWidget*, guint)) tabby_base_session_real_tab_reordered;
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	((TabbyBaseSessionClass *) klass)->remove = (void (*) (TabbyBaseSession *)) tabby_base_session_real_remove;
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	((TabbyBaseSessionClass *) klass)->get_tabs = (KatzeArray* (*) (TabbyBaseSession *)) tabby_base_session_real_get_tabs;
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	((TabbyBaseSessionClass *) klass)->get_max_sorting = (gdouble (*) (TabbyBaseSession *)) tabby_base_session_real_get_max_sorting;
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	((TabbyBaseSessionClass *) klass)->close = (void (*) (TabbyBaseSession *)) tabby_base_session_real_close;
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_tabby_base_session_get_property;
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_tabby_base_session_set_property;
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	G_OBJECT_CLASS (klass)->constructor = tabby_base_session_constructor;
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	G_OBJECT_CLASS (klass)->finalize = tabby_base_session_finalize;
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), TABBY_BASE_SESSION_BROWSER_PROPERTY, tabby_base_session_properties[TABBY_BASE_SESSION_BROWSER_PROPERTY] = 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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), TABBY_BASE_SESSION_STATE_PROPERTY, tabby_base_session_properties[TABBY_BASE_SESSION_STATE_PROPERTY] = 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 3017 "tabby.c"
}


static void tabby_base_session_tabby_isession_interface_init (TabbyISessionIface * iface) {
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	iface->add_item = (void (*) (TabbyISession *, KatzeItem*)) tabby_base_session_add_item;
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	iface->remove = (void (*) (TabbyISession *)) tabby_base_session_remove;
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	iface->get_tabs = (KatzeArray* (*) (TabbyISession *)) tabby_base_session_get_tabs;
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	iface->attach = (void (*) (TabbyISession *, MidoriBrowser*)) tabby_base_session_real_attach;
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	iface->restore = (void (*) (TabbyISession *, MidoriBrowser*)) tabby_base_session_real_restore;
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	iface->close = (void (*) (TabbyISession *)) tabby_base_session_close;
#line 3036 "tabby.c"
}


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


static void tabby_base_session_finalize (GObject * obj) {
	TabbyBaseSession * self;
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TABBY_BASE_TYPE_SESSION, TabbyBaseSession);
#line 99 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	__g_slist_free__g_free0_0 (self->tab_sorting);
#line 101 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_object_unref0 (self->priv->_browser);
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	G_OBJECT_CLASS (tabby_base_session_parent_class)->finalize (obj);
#line 3061 "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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	switch (property_id) {
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		case TABBY_BASE_SESSION_BROWSER_PROPERTY:
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_value_set_object (value, tabby_base_session_get_browser (self));
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		break;
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		case TABBY_BASE_SESSION_STATE_PROPERTY:
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_value_set_enum (value, tabby_base_session_get_state (self));
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		break;
#line 3096 "tabby.c"
		default:
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		break;
#line 3102 "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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	switch (property_id) {
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		case TABBY_BASE_SESSION_BROWSER_PROPERTY:
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		tabby_base_session_set_browser (self, g_value_get_object (value));
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		break;
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		case TABBY_BASE_SESSION_STATE_PROPERTY:
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		tabby_base_session_set_state (self, g_value_get_enum (value));
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		break;
#line 3124 "tabby.c"
		default:
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		break;
#line 3130 "tabby.c"
	}
}


static void tabby_local_session_real_add_item (TabbyBaseSession* base, KatzeItem* item) {
	TabbyLocalSession * self;
	GDateTime* time = NULL;
	GDateTime* _tmp0_;
	const gchar* _tmp1_ = NULL;
	KatzeItem* _tmp2_;
	const gchar* _tmp3_;
	gchar* sorting = NULL;
	gchar* _tmp4_;
	gchar* sqlcmd = NULL;
	gchar* _tmp5_;
	gint64 tstamp = 0LL;
	KatzeItem* _tmp6_;
	gint64 _tmp7_;
	gint64 _tmp8_;
	GError * _inner_error_ = NULL;
#line 370 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	self = (TabbyLocalSession*) base;
#line 370 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_if_fail (item != NULL);
#line 371 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp0_ = g_date_time_new_now_local ();
#line 371 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	time = _tmp0_;
#line 372 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp2_ = item;
#line 372 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp3_ = katze_item_get_meta_string (_tmp2_, "sorting");
#line 372 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp1_ = _tmp3_;
#line 372 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (_tmp1_ == NULL) {
#line 372 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp1_ = "1";
#line 3169 "tabby.c"
	}
#line 372 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp4_ = g_strdup (_tmp1_);
#line 372 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	sorting = _tmp4_;
#line 373 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	sqlcmd = _tmp5_;
#line 375 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp6_ = item;
#line 375 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp7_ = katze_item_get_meta_integer (_tmp6_, "tabby-tstamp");
#line 375 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	tstamp = _tmp7_;
#line 376 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp8_ = tstamp;
#line 376 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (_tmp8_ < ((gint64) 0)) {
#line 377 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		tstamp = (gint64) 0;
#line 3191 "tabby.c"
	}
	{
		MidoriDatabaseStatement* statement = NULL;
		MidoriDatabase* _tmp9_;
		const gchar* _tmp10_;
		GDateTime* _tmp11_;
		gint64 _tmp12_;
		gint64 _tmp13_;
		gint64 _tmp14_;
		KatzeItem* _tmp15_;
		const gchar* _tmp16_;
		const gchar* _tmp17_;
		KatzeItem* _tmp18_;
		const gchar* _tmp19_;
		const gchar* _tmp20_;
		const gchar* _tmp21_;
		gdouble _tmp22_;
		MidoriDatabaseStatement* _tmp23_;
		MidoriDatabaseStatement* _tmp24_;
		gint64 tab_id = 0LL;
		MidoriDatabaseStatement* _tmp25_;
		gint64 _tmp26_;
		KatzeItem* _tmp27_;
		gint64 _tmp28_;
#line 381 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp9_ = self->priv->database;
#line 381 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp10_ = sqlcmd;
#line 381 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp11_ = time;
#line 381 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp12_ = g_date_time_to_unix (_tmp11_);
#line 381 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp13_ = tstamp;
#line 381 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp14_ = self->priv->_id;
#line 381 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp15_ = item;
#line 381 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp16_ = katze_item_get_uri (_tmp15_);
#line 381 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp17_ = _tmp16_;
#line 381 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp18_ = item;
#line 381 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp19_ = katze_item_get_name (_tmp18_);
#line 381 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp20_ = _tmp19_;
#line 381 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp21_ = sorting;
#line 381 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp22_ = double_parse (_tmp21_);
#line 381 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		statement = _tmp23_;
#line 381 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 3250 "tabby.c"
			goto __catch0_g_error;
		}
#line 388 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp24_ = statement;
#line 388 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		midori_database_statement_exec (_tmp24_, &_inner_error_);
#line 388 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 388 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_g_object_unref0 (statement);
#line 3261 "tabby.c"
			goto __catch0_g_error;
		}
#line 389 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp25_ = statement;
#line 389 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp26_ = midori_database_statement_row_id (_tmp25_, &_inner_error_);
#line 389 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		tab_id = _tmp26_;
#line 389 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 389 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_g_object_unref0 (statement);
#line 3274 "tabby.c"
			goto __catch0_g_error;
		}
#line 390 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp27_ = item;
#line 390 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp28_ = tab_id;
#line 390 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		katze_item_set_meta_integer (_tmp27_, "tabby-id", _tmp28_);
#line 380 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_object_unref0 (statement);
#line 3285 "tabby.c"
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* _error_ = NULL;
		GError* _tmp29_;
		const gchar* _tmp30_;
#line 380 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_error_ = _inner_error_;
#line 380 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_inner_error_ = NULL;
#line 392 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp29_ = _error_;
#line 392 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp30_ = _tmp29_->message;
#line 392 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_critical (_ ("Failed to update database: %s"), _tmp30_);
#line 380 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_error_free0 (_error_);
#line 3305 "tabby.c"
	}
	__finally0:
#line 380 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 380 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_free0 (sqlcmd);
#line 380 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_free0 (sorting);
#line 380 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_date_time_unref0 (time);
#line 380 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_clear_error (&_inner_error_);
#line 380 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		return;
#line 3322 "tabby.c"
	}
#line 370 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_free0 (sqlcmd);
#line 370 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_free0 (sorting);
#line 370 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_date_time_unref0 (time);
#line 3330 "tabby.c"
}


static void tabby_local_session_real_uri_changed (TabbyBaseSession* base, MidoriView* view, const gchar* uri) {
	TabbyLocalSession * self;
	KatzeItem* item = NULL;
	MidoriView* _tmp0_;
	KatzeItem* _tmp1_;
	gint64 tab_id = 0LL;
	KatzeItem* _tmp2_;
	gint64 _tmp3_;
	gchar* sqlcmd = NULL;
	gchar* _tmp4_;
	GError * _inner_error_ = NULL;
#line 396 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	self = (TabbyLocalSession*) base;
#line 396 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_if_fail (view != NULL);
#line 396 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_if_fail (uri != NULL);
#line 397 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp0_ = view;
#line 397 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp1_ = midori_view_get_proxy_item (_tmp0_);
#line 397 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	item = _tmp1_;
#line 398 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp2_ = item;
#line 398 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp3_ = katze_item_get_meta_integer (_tmp2_, "tabby-id");
#line 398 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	tab_id = _tmp3_;
#line 399 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	sqlcmd = _tmp4_;
#line 3367 "tabby.c"
	{
		MidoriDatabaseStatement* _tmp5_ = NULL;
		MidoriDatabase* _tmp6_;
		const gchar* _tmp7_;
		const gchar* _tmp8_;
		gint64 _tmp9_;
		gint64 _tmp10_;
		MidoriDatabaseStatement* _tmp11_;
#line 401 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp6_ = self->priv->database;
#line 401 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp7_ = sqlcmd;
#line 401 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp8_ = uri;
#line 401 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp9_ = self->priv->_id;
#line 401 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp10_ = tab_id;
#line 401 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp5_ = _tmp11_;
#line 401 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 3392 "tabby.c"
			goto __catch1_g_error;
		}
#line 401 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		midori_database_statement_exec (_tmp5_, &_inner_error_);
#line 401 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 401 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_g_object_unref0 (_tmp5_);
#line 3401 "tabby.c"
			goto __catch1_g_error;
		}
#line 400 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_object_unref0 (_tmp5_);
#line 3406 "tabby.c"
	}
	goto __finally1;
	__catch1_g_error:
	{
		GError* _error_ = NULL;
		GError* _tmp12_;
		const gchar* _tmp13_;
#line 400 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_error_ = _inner_error_;
#line 400 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_inner_error_ = NULL;
#line 406 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp12_ = _error_;
#line 406 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp13_ = _tmp12_->message;
#line 406 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_critical (_ ("Failed to update database: %s"), _tmp13_);
#line 400 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_error_free0 (_error_);
#line 3426 "tabby.c"
	}
	__finally1:
#line 400 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 400 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_free0 (sqlcmd);
#line 400 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_clear_error (&_inner_error_);
#line 400 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		return;
#line 3439 "tabby.c"
	}
#line 396 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_free0 (sqlcmd);
#line 3443 "tabby.c"
}


static void tabby_local_session_real_data_changed (TabbyBaseSession* base, MidoriView* view) {
	TabbyLocalSession * self;
	KatzeItem* item = NULL;
	MidoriView* _tmp0_;
	KatzeItem* _tmp1_;
	gint64 tab_id = 0LL;
	KatzeItem* _tmp2_;
	gint64 _tmp3_;
	gchar* sqlcmd = NULL;
	gchar* _tmp4_;
	GError * _inner_error_ = NULL;
#line 410 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	self = (TabbyLocalSession*) base;
#line 410 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_if_fail (view != NULL);
#line 411 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp0_ = view;
#line 411 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp1_ = midori_view_get_proxy_item (_tmp0_);
#line 411 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	item = _tmp1_;
#line 412 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp2_ = item;
#line 412 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp3_ = katze_item_get_meta_integer (_tmp2_, "tabby-id");
#line 412 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	tab_id = _tmp3_;
#line 413 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	sqlcmd = _tmp4_;
#line 3478 "tabby.c"
	{
		MidoriDatabaseStatement* _tmp5_ = NULL;
		MidoriDatabase* _tmp6_;
		const gchar* _tmp7_;
		MidoriView* _tmp8_;
		const gchar* _tmp9_;
		gint64 _tmp10_;
		gint64 _tmp11_;
		MidoriDatabaseStatement* _tmp12_;
#line 415 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp6_ = self->priv->database;
#line 415 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp7_ = sqlcmd;
#line 415 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp8_ = view;
#line 415 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp9_ = midori_view_get_display_title (_tmp8_);
#line 415 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp10_ = self->priv->_id;
#line 415 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp11_ = tab_id;
#line 415 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp5_ = _tmp12_;
#line 415 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 3506 "tabby.c"
			goto __catch2_g_error;
		}
#line 415 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		midori_database_statement_exec (_tmp5_, &_inner_error_);
#line 415 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 415 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_g_object_unref0 (_tmp5_);
#line 3515 "tabby.c"
			goto __catch2_g_error;
		}
#line 414 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_object_unref0 (_tmp5_);
#line 3520 "tabby.c"
	}
	goto __finally2;
	__catch2_g_error:
	{
		GError* _error_ = NULL;
		GError* _tmp13_;
		const gchar* _tmp14_;
#line 414 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_error_ = _inner_error_;
#line 414 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_inner_error_ = NULL;
#line 420 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp13_ = _error_;
#line 420 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp14_ = _tmp13_->message;
#line 420 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_critical (_ ("Failed to update database: %s"), _tmp14_);
#line 414 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_error_free0 (_error_);
#line 3540 "tabby.c"
	}
	__finally2:
#line 414 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 414 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_free0 (sqlcmd);
#line 414 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_clear_error (&_inner_error_);
#line 414 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		return;
#line 3553 "tabby.c"
	}
#line 410 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_free0 (sqlcmd);
#line 3557 "tabby.c"
}


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


static void tabby_local_session_real_tab_removed (TabbyBaseSession* base, MidoriBrowser* browser, MidoriView* view) {
	TabbyLocalSession * self;
	KatzeItem* item = NULL;
	MidoriView* _tmp0_;
	KatzeItem* _tmp1_;
	gint64 tab_id = 0LL;
	KatzeItem* _tmp2_;
	gint64 _tmp3_;
	gchar* sqlcmd = NULL;
	gchar* _tmp4_;
	GError * _inner_error_ = NULL;
#line 434 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	self = (TabbyLocalSession*) base;
#line 434 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_if_fail (browser != NULL);
#line 434 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_if_fail (view != NULL);
#line 435 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp0_ = view;
#line 435 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp1_ = midori_view_get_proxy_item (_tmp0_);
#line 435 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	item = _tmp1_;
#line 436 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp2_ = item;
#line 436 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp3_ = katze_item_get_meta_integer (_tmp2_, "tabby-id");
#line 436 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	tab_id = _tmp3_;
#line 438 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	sqlcmd = _tmp4_;
#line 3661 "tabby.c"
	{
		MidoriDatabaseStatement* _tmp5_ = NULL;
		MidoriDatabase* _tmp6_;
		const gchar* _tmp7_;
		gint64 _tmp8_;
		gint64 _tmp9_;
		MidoriDatabaseStatement* _tmp10_;
#line 440 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp6_ = self->priv->database;
#line 440 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp7_ = sqlcmd;
#line 440 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp8_ = self->priv->_id;
#line 440 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp9_ = tab_id;
#line 440 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp5_ = _tmp10_;
#line 440 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 3683 "tabby.c"
			goto __catch3_g_error;
		}
#line 440 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		midori_database_statement_exec (_tmp5_, &_inner_error_);
#line 440 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 440 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_g_object_unref0 (_tmp5_);
#line 3692 "tabby.c"
			goto __catch3_g_error;
		}
#line 439 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_object_unref0 (_tmp5_);
#line 3697 "tabby.c"
	}
	goto __finally3;
	__catch3_g_error:
	{
		GError* _error_ = NULL;
		GError* _tmp11_;
		const gchar* _tmp12_;
#line 439 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_error_ = _inner_error_;
#line 439 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_inner_error_ = NULL;
#line 444 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp11_ = _error_;
#line 444 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp12_ = _tmp11_->message;
#line 444 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_critical (_ ("Failed to update database: %s"), _tmp12_);
#line 439 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_error_free0 (_error_);
#line 3717 "tabby.c"
	}
	__finally3:
#line 439 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 439 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_free0 (sqlcmd);
#line 439 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_clear_error (&_inner_error_);
#line 439 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		return;
#line 3730 "tabby.c"
	}
#line 434 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_free0 (sqlcmd);
#line 3734 "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_;
	KatzeItem* item = NULL;
	MidoriView* _tmp1_;
	KatzeItem* _tmp2_;
	gint64 tab_id = 0LL;
	KatzeItem* _tmp3_;
	gint64 _tmp4_;
	gint64 tstamp = 0LL;
	GDateTime* _tmp5_;
	gint64 _tmp6_;
	KatzeItem* _tmp7_;
	gint64 _tmp8_;
	gchar* sqlcmd = NULL;
	gchar* _tmp9_;
	GError * _inner_error_ = NULL;
#line 448 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	self = (TabbyLocalSession*) base;
#line 449 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp0_ = g_date_time_new_now_local ();
#line 449 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	time = _tmp0_;
#line 450 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp1_ = new_view;
#line 450 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp2_ = midori_view_get_proxy_item (_tmp1_);
#line 450 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	item = _tmp2_;
#line 451 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp3_ = item;
#line 451 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp4_ = katze_item_get_meta_integer (_tmp3_, "tabby-id");
#line 451 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	tab_id = _tmp4_;
#line 452 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp5_ = time;
#line 452 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp6_ = g_date_time_to_unix (_tmp5_);
#line 452 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	tstamp = _tmp6_;
#line 453 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp7_ = item;
#line 453 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp8_ = tstamp;
#line 453 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	katze_item_set_meta_integer (_tmp7_, "tabby-tstamp", _tmp8_);
#line 454 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	sqlcmd = _tmp9_;
#line 3790 "tabby.c"
	{
		MidoriDatabaseStatement* _tmp10_ = NULL;
		MidoriDatabase* _tmp11_;
		const gchar* _tmp12_;
		gint64 _tmp13_;
		gint64 _tmp14_;
		gint64 _tmp15_;
		MidoriDatabaseStatement* _tmp16_;
#line 456 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp11_ = self->priv->database;
#line 456 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp12_ = sqlcmd;
#line 456 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp13_ = self->priv->_id;
#line 456 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp14_ = tab_id;
#line 456 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp15_ = tstamp;
#line 456 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp10_ = _tmp16_;
#line 456 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 3815 "tabby.c"
			goto __catch4_g_error;
		}
#line 456 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		midori_database_statement_exec (_tmp10_, &_inner_error_);
#line 456 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 456 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_g_object_unref0 (_tmp10_);
#line 3824 "tabby.c"
			goto __catch4_g_error;
		}
#line 455 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_object_unref0 (_tmp10_);
#line 3829 "tabby.c"
	}
	goto __finally4;
	__catch4_g_error:
	{
		GError* _error_ = NULL;
		GError* _tmp17_;
		const gchar* _tmp18_;
#line 455 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_error_ = _inner_error_;
#line 455 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_inner_error_ = NULL;
#line 461 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp17_ = _error_;
#line 461 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp18_ = _tmp17_->message;
#line 461 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_critical (_ ("Failed to update database: %s"), _tmp18_);
#line 455 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_error_free0 (_error_);
#line 3849 "tabby.c"
	}
	__finally4:
#line 455 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 455 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_free0 (sqlcmd);
#line 455 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_date_time_unref0 (time);
#line 455 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_clear_error (&_inner_error_);
#line 455 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		return;
#line 3864 "tabby.c"
	}
#line 448 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_free0 (sqlcmd);
#line 448 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_date_time_unref0 (time);
#line 3870 "tabby.c"
}


static void tabby_local_session_real_tab_reordered (TabbyBaseSession* base, GtkWidget* tab, guint pos) {
	TabbyLocalSession * self;
	MidoriView* view = NULL;
	GtkWidget* _tmp0_;
	MidoriView* _tmp1_;
	gdouble sorting = 0.0;
	MidoriView* _tmp2_;
	gdouble _tmp3_;
	KatzeItem* item = NULL;
	MidoriView* _tmp4_;
	KatzeItem* _tmp5_;
	gint64 tab_id = 0LL;
	KatzeItem* _tmp6_;
	gint64 _tmp7_;
	gchar* sqlcmd = NULL;
	gchar* _tmp8_;
	KatzeItem* _tmp18_;
	gdouble _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	GError * _inner_error_ = NULL;
#line 465 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	self = (TabbyLocalSession*) base;
#line 465 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_if_fail (tab != NULL);
#line 466 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp0_ = tab;
#line 466 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	view = _tmp1_;
#line 468 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp2_ = view;
#line 468 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp3_ = tabby_base_session_get_tab_sorting ((TabbyBaseSession*) self, _tmp2_);
#line 468 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	sorting = _tmp3_;
#line 469 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp4_ = view;
#line 469 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp5_ = midori_view_get_proxy_item (_tmp4_);
#line 469 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	item = _tmp5_;
#line 470 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp6_ = item;
#line 470 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp7_ = katze_item_get_meta_integer (_tmp6_, "tabby-id");
#line 470 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	tab_id = _tmp7_;
#line 471 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	sqlcmd = _tmp8_;
#line 3927 "tabby.c"
	{
		MidoriDatabaseStatement* _tmp9_ = NULL;
		MidoriDatabase* _tmp10_;
		const gchar* _tmp11_;
		gint64 _tmp12_;
		gint64 _tmp13_;
		gdouble _tmp14_;
		MidoriDatabaseStatement* _tmp15_;
#line 473 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp10_ = self->priv->database;
#line 473 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp11_ = sqlcmd;
#line 473 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp12_ = self->priv->_id;
#line 473 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp13_ = tab_id;
#line 473 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp14_ = sorting;
#line 473 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp9_ = _tmp15_;
#line 473 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 3952 "tabby.c"
			goto __catch5_g_error;
		}
#line 473 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		midori_database_statement_exec (_tmp9_, &_inner_error_);
#line 473 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 473 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_g_object_unref0 (_tmp9_);
#line 3961 "tabby.c"
			goto __catch5_g_error;
		}
#line 472 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_object_unref0 (_tmp9_);
#line 3966 "tabby.c"
	}
	goto __finally5;
	__catch5_g_error:
	{
		GError* _error_ = NULL;
		GError* _tmp16_;
		const gchar* _tmp17_;
#line 472 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_error_ = _inner_error_;
#line 472 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_inner_error_ = NULL;
#line 478 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp16_ = _error_;
#line 478 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp17_ = _tmp16_->message;
#line 478 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_critical (_ ("Failed to update database: %s"), _tmp17_);
#line 472 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_error_free0 (_error_);
#line 3986 "tabby.c"
	}
	__finally5:
#line 472 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 472 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_free0 (sqlcmd);
#line 472 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_object_unref0 (view);
#line 472 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_clear_error (&_inner_error_);
#line 472 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		return;
#line 4001 "tabby.c"
	}
#line 481 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp18_ = item;
#line 481 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp19_ = sorting;
#line 481 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp20_ = double_to_string (_tmp19_);
#line 481 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp21_ = _tmp20_;
#line 481 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	katze_item_set_meta_string (_tmp18_, "sorting", _tmp21_);
#line 481 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_free0 (_tmp21_);
#line 465 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_free0 (sqlcmd);
#line 465 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_object_unref0 (view);
#line 4019 "tabby.c"
}


static void tabby_local_session_real_remove (TabbyBaseSession* base) {
	TabbyLocalSession * self;
	gchar* sqlcmd = NULL;
	gchar* _tmp0_;
	GError * _inner_error_ = NULL;
#line 484 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	self = (TabbyLocalSession*) base;
#line 485 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	sqlcmd = _tmp0_;
#line 4034 "tabby.c"
	{
		MidoriDatabaseStatement* _tmp1_ = NULL;
		MidoriDatabase* _tmp2_;
		const gchar* _tmp3_;
		gint64 _tmp4_;
		MidoriDatabaseStatement* _tmp5_;
#line 490 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp2_ = self->priv->database;
#line 490 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp3_ = sqlcmd;
#line 490 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp4_ = self->priv->_id;
#line 490 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp1_ = _tmp5_;
#line 490 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 4053 "tabby.c"
			goto __catch6_g_error;
		}
#line 490 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		midori_database_statement_exec (_tmp1_, &_inner_error_);
#line 490 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 490 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_g_object_unref0 (_tmp1_);
#line 4062 "tabby.c"
			goto __catch6_g_error;
		}
#line 489 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_object_unref0 (_tmp1_);
#line 4067 "tabby.c"
	}
	goto __finally6;
	__catch6_g_error:
	{
		GError* _error_ = NULL;
		GError* _tmp6_;
		const gchar* _tmp7_;
#line 489 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_error_ = _inner_error_;
#line 489 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_inner_error_ = NULL;
#line 493 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp6_ = _error_;
#line 493 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp7_ = _tmp6_->message;
#line 493 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_critical (_ ("Failed to update database: %s"), _tmp7_);
#line 489 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_error_free0 (_error_);
#line 4087 "tabby.c"
	}
	__finally6:
#line 489 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 489 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_free0 (sqlcmd);
#line 489 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_clear_error (&_inner_error_);
#line 489 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		return;
#line 4100 "tabby.c"
	}
#line 484 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_free0 (sqlcmd);
#line 4104 "tabby.c"
}


static void tabby_local_session_real_close (TabbyBaseSession* base) {
	TabbyLocalSession * self;
	MidoriBrowser* my_browser = NULL;
	MidoriBrowser* _tmp0_;
	MidoriBrowser* _tmp1_;
	MidoriBrowser* _tmp2_;
	gboolean should_break = FALSE;
	gboolean _tmp3_ = FALSE;
	MidoriBrowser* _tmp4_;
	GDateTime* time = NULL;
	GDateTime* _tmp18_;
	gchar* sqlcmd = NULL;
	gchar* _tmp19_;
	GError * _inner_error_ = NULL;
#line 497 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	self = (TabbyLocalSession*) base;
#line 499 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp0_ = tabby_base_session_get_browser ((TabbyBaseSession*) self);
#line 499 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp1_ = _tmp0_;
#line 499 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 499 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	my_browser = _tmp2_;
#line 500 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	should_break = TRUE;
#line 503 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp4_ = my_browser;
#line 503 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (_tmp4_ != NULL) {
#line 4140 "tabby.c"
		MidoriBrowser* _tmp5_;
		gboolean _tmp6_;
		gboolean _tmp7_;
#line 503 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp5_ = my_browser;
#line 503 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp6_ = gtk_window_get_destroy_with_parent ((GtkWindow*) _tmp5_);
#line 503 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp7_ = _tmp6_;
#line 503 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp3_ = !_tmp7_;
#line 4152 "tabby.c"
	} else {
#line 503 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp3_ = FALSE;
#line 4156 "tabby.c"
	}
#line 503 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (_tmp3_) {
#line 4160 "tabby.c"
		MidoriApp* _tmp8_;
		GList* _tmp9_;
		gboolean _tmp17_;
#line 504 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp8_ = tabby_APP;
#line 504 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp9_ = midori_app_get_browsers (_tmp8_);
#line 4168 "tabby.c"
		{
			GList* browser_collection = NULL;
			GList* browser_it = NULL;
#line 504 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			browser_collection = _tmp9_;
#line 504 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			for (browser_it = browser_collection; browser_it != NULL; browser_it = browser_it->next) {
#line 4176 "tabby.c"
				MidoriBrowser* _tmp10_;
				MidoriBrowser* browser = NULL;
#line 504 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_tmp10_ = _g_object_ref0 ((MidoriBrowser*) browser_it->data);
#line 504 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				browser = _tmp10_;
#line 4183 "tabby.c"
				{
					gboolean _tmp11_ = FALSE;
					MidoriBrowser* _tmp12_;
					MidoriBrowser* _tmp13_;
#line 505 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_tmp12_ = browser;
#line 505 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_tmp13_ = my_browser;
#line 505 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					if (_tmp12_ != _tmp13_) {
#line 4194 "tabby.c"
						MidoriBrowser* _tmp14_;
						gboolean _tmp15_;
						gboolean _tmp16_;
#line 505 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						_tmp14_ = browser;
#line 505 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						_tmp15_ = gtk_window_get_destroy_with_parent ((GtkWindow*) _tmp14_);
#line 505 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						_tmp16_ = _tmp15_;
#line 505 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						_tmp11_ = !_tmp16_;
#line 4206 "tabby.c"
					} else {
#line 505 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						_tmp11_ = FALSE;
#line 4210 "tabby.c"
					}
#line 505 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					if (_tmp11_) {
#line 506 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						should_break = FALSE;
#line 507 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						_g_object_unref0 (browser);
#line 507 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						break;
#line 4220 "tabby.c"
					}
#line 504 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_g_object_unref0 (browser);
#line 4224 "tabby.c"
				}
			}
#line 504 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_g_list_free0 (browser_collection);
#line 4229 "tabby.c"
		}
#line 511 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp17_ = should_break;
#line 511 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		if (_tmp17_) {
#line 512 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_g_object_unref0 (my_browser);
#line 512 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			return;
#line 4239 "tabby.c"
		}
	}
#line 516 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp18_ = g_date_time_new_now_local ();
#line 516 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	time = _tmp18_;
#line 517 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	sqlcmd = _tmp19_;
#line 4250 "tabby.c"
	{
		MidoriDatabaseStatement* _tmp20_ = NULL;
		MidoriDatabase* _tmp21_;
		const gchar* _tmp22_;
		gint64 _tmp23_;
		GDateTime* _tmp24_;
		gint64 _tmp25_;
		MidoriDatabaseStatement* _tmp26_;
#line 519 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp21_ = self->priv->database;
#line 519 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp22_ = sqlcmd;
#line 519 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp23_ = self->priv->_id;
#line 519 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp24_ = time;
#line 519 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp25_ = g_date_time_to_unix (_tmp24_);
#line 519 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp20_ = _tmp26_;
#line 519 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 4275 "tabby.c"
			goto __catch7_g_error;
		}
#line 519 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		midori_database_statement_exec (_tmp20_, &_inner_error_);
#line 519 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 519 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_g_object_unref0 (_tmp20_);
#line 4284 "tabby.c"
			goto __catch7_g_error;
		}
#line 518 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_object_unref0 (_tmp20_);
#line 4289 "tabby.c"
	}
	goto __finally7;
	__catch7_g_error:
	{
		GError* _error_ = NULL;
		GError* _tmp27_;
		const gchar* _tmp28_;
#line 518 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_error_ = _inner_error_;
#line 518 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_inner_error_ = NULL;
#line 523 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp27_ = _error_;
#line 523 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp28_ = _tmp27_->message;
#line 523 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_critical (_ ("Failed to update database: %s"), _tmp28_);
#line 518 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_error_free0 (_error_);
#line 4309 "tabby.c"
	}
	__finally7:
#line 518 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 518 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_free0 (sqlcmd);
#line 518 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_date_time_unref0 (time);
#line 518 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_object_unref0 (my_browser);
#line 518 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_clear_error (&_inner_error_);
#line 518 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		return;
#line 4326 "tabby.c"
	}
#line 497 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_free0 (sqlcmd);
#line 497 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_date_time_unref0 (time);
#line 497 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_object_unref0 (my_browser);
#line 4334 "tabby.c"
}


static KatzeArray* tabby_local_session_real_get_tabs (TabbyBaseSession* base) {
	TabbyLocalSession * self;
	KatzeArray* result = NULL;
	KatzeArray* tabs = NULL;
	KatzeArray* _tmp0_;
	gchar* sqlcmd = NULL;
	gchar* _tmp1_;
	GError * _inner_error_ = NULL;
#line 527 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	self = (TabbyLocalSession*) base;
#line 528 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp0_ = katze_array_new (KATZE_TYPE_ITEM);
#line 528 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	tabs = _tmp0_;
#line 530 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	sqlcmd = _tmp1_;
#line 4356 "tabby.c"
	{
		MidoriDatabaseStatement* statement = NULL;
		MidoriDatabase* _tmp2_;
		const gchar* _tmp3_;
		gint64 _tmp4_;
		MidoriDatabaseStatement* _tmp5_;
#line 532 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp2_ = self->priv->database;
#line 532 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp3_ = sqlcmd;
#line 532 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp4_ = self->priv->_id;
#line 532 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		statement = _tmp5_;
#line 532 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 4375 "tabby.c"
			goto __catch8_g_error;
		}
#line 534 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		while (TRUE) {
#line 4380 "tabby.c"
			gboolean _tmp6_ = FALSE;
			MidoriDatabaseStatement* _tmp7_;
			gboolean _tmp8_;
			KatzeItem* item = NULL;
			KatzeItem* _tmp9_;
			gint64 id = 0LL;
			MidoriDatabaseStatement* _tmp10_;
			gint64 _tmp11_;
			gchar* uri = NULL;
			MidoriDatabaseStatement* _tmp12_;
			gchar* _tmp13_;
			gchar* title = NULL;
			MidoriDatabaseStatement* _tmp14_;
			gchar* _tmp15_;
			gdouble sorting = 0.0;
			MidoriDatabaseStatement* _tmp16_;
			gdouble _tmp17_;
			KatzeItem* _tmp18_;
			const gchar* _tmp19_;
			KatzeItem* _tmp20_;
			const gchar* _tmp21_;
			KatzeItem* _tmp22_;
			gint64 _tmp23_;
			KatzeItem* _tmp24_;
			gdouble _tmp25_;
			gchar* _tmp26_;
			gchar* _tmp27_;
			KatzeItem* _tmp28_;
			KatzeArray* _tmp29_;
			KatzeItem* _tmp30_;
#line 534 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp7_ = statement;
#line 534 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp8_ = midori_database_statement_step (_tmp7_, &_inner_error_);
#line 534 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp6_ = _tmp8_;
#line 534 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 534 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_g_object_unref0 (statement);
#line 4421 "tabby.c"
				goto __catch8_g_error;
			}
#line 534 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			if (!_tmp6_) {
#line 534 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				break;
#line 4428 "tabby.c"
			}
#line 535 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp9_ = katze_item_new ();
#line 535 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			item = _tmp9_;
#line 536 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp10_ = statement;
#line 536 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp11_ = midori_database_statement_get_int64 (_tmp10_, "id", &_inner_error_);
#line 536 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			id = _tmp11_;
#line 536 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 536 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_g_object_unref0 (item);
#line 536 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_g_object_unref0 (statement);
#line 4446 "tabby.c"
				goto __catch8_g_error;
			}
#line 537 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp12_ = statement;
#line 537 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp13_ = midori_database_statement_get_string (_tmp12_, "uri", &_inner_error_);
#line 537 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			uri = _tmp13_;
#line 537 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 537 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_g_object_unref0 (item);
#line 537 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_g_object_unref0 (statement);
#line 4461 "tabby.c"
				goto __catch8_g_error;
			}
#line 538 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp14_ = statement;
#line 538 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp15_ = midori_database_statement_get_string (_tmp14_, "title", &_inner_error_);
#line 538 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			title = _tmp15_;
#line 538 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 538 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_g_free0 (uri);
#line 538 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_g_object_unref0 (item);
#line 538 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_g_object_unref0 (statement);
#line 4478 "tabby.c"
				goto __catch8_g_error;
			}
#line 539 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp16_ = statement;
#line 539 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp17_ = midori_database_statement_get_double (_tmp16_, "sorting", &_inner_error_);
#line 539 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			sorting = _tmp17_;
#line 539 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 539 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_g_free0 (title);
#line 539 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_g_free0 (uri);
#line 539 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_g_object_unref0 (item);
#line 539 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_g_object_unref0 (statement);
#line 4497 "tabby.c"
				goto __catch8_g_error;
			}
#line 540 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp18_ = item;
#line 540 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp19_ = uri;
#line 540 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			katze_item_set_uri (_tmp18_, _tmp19_);
#line 541 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp20_ = item;
#line 541 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp21_ = title;
#line 541 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			katze_item_set_name (_tmp20_, _tmp21_);
#line 542 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp22_ = item;
#line 542 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp23_ = id;
#line 542 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			katze_item_set_meta_integer (_tmp22_, "tabby-id", _tmp23_);
#line 543 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp24_ = item;
#line 543 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp25_ = sorting;
#line 543 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp26_ = double_to_string (_tmp25_);
#line 543 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp27_ = _tmp26_;
#line 543 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			katze_item_set_meta_string (_tmp24_, "sorting", _tmp27_);
#line 543 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_g_free0 (_tmp27_);
#line 545 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp28_ = item;
#line 545 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			katze_item_set_meta_string (_tmp28_, "history-step", "ignore");
#line 546 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp29_ = tabs;
#line 546 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp30_ = item;
#line 546 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			g_signal_emit_by_name (_tmp29_, "add-item", (GObject*) _tmp30_);
#line 534 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_g_free0 (title);
#line 534 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_g_free0 (uri);
#line 534 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_g_object_unref0 (item);
#line 4546 "tabby.c"
		}
#line 531 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_object_unref0 (statement);
#line 4550 "tabby.c"
	}
	goto __finally8;
	__catch8_g_error:
	{
		GError* _error_ = NULL;
		GError* _tmp31_;
		const gchar* _tmp32_;
#line 531 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_error_ = _inner_error_;
#line 531 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_inner_error_ = NULL;
#line 549 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp31_ = _error_;
#line 549 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp32_ = _tmp31_->message;
#line 549 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_critical (_ ("Failed to select from database: %s"), _tmp32_);
#line 531 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_error_free0 (_error_);
#line 4570 "tabby.c"
	}
	__finally8:
#line 531 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 531 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_free0 (sqlcmd);
#line 531 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_object_unref0 (tabs);
#line 531 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_clear_error (&_inner_error_);
#line 531 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		return NULL;
#line 4585 "tabby.c"
	}
#line 551 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	result = tabs;
#line 551 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_free0 (sqlcmd);
#line 551 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	return result;
#line 4593 "tabby.c"
}


static gdouble tabby_local_session_real_get_max_sorting (TabbyBaseSession* base) {
	TabbyLocalSession * self;
	gdouble result = 0.0;
	gchar* sqlcmd = NULL;
	gchar* _tmp0_;
	GError * _inner_error_ = NULL;
#line 554 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	self = (TabbyLocalSession*) base;
#line 555 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	sqlcmd = _tmp0_;
#line 4609 "tabby.c"
	{
		MidoriDatabaseStatement* statement = NULL;
		MidoriDatabase* _tmp1_;
		const gchar* _tmp2_;
		gint64 _tmp3_;
		MidoriDatabaseStatement* _tmp4_;
		MidoriDatabaseStatement* _tmp5_;
		gdouble sorting = 0.0;
		MidoriDatabaseStatement* _tmp6_;
		gdouble _tmp7_;
		gdouble _tmp8_;
		gboolean _tmp9_;
#line 557 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp1_ = self->priv->database;
#line 557 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp2_ = sqlcmd;
#line 557 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp3_ = self->priv->_id;
#line 557 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		statement = _tmp4_;
#line 557 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 4634 "tabby.c"
			goto __catch9_g_error;
		}
#line 559 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp5_ = statement;
#line 559 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		midori_database_statement_step (_tmp5_, &_inner_error_);
#line 559 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 559 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_g_object_unref0 (statement);
#line 4645 "tabby.c"
			goto __catch9_g_error;
		}
#line 560 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp6_ = statement;
#line 560 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp7_ = midori_database_statement_get_double (_tmp6_, "MAX(sorting)", &_inner_error_);
#line 560 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		sorting = _tmp7_;
#line 560 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 560 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_g_object_unref0 (statement);
#line 4658 "tabby.c"
			goto __catch9_g_error;
		}
#line 561 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp8_ = sorting;
#line 561 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp9_ = isnan (_tmp8_);
#line 561 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		if (!_tmp9_) {
#line 562 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			result = sorting;
#line 562 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_g_object_unref0 (statement);
#line 562 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_g_free0 (sqlcmd);
#line 562 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			return result;
#line 4675 "tabby.c"
		}
#line 556 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_object_unref0 (statement);
#line 4679 "tabby.c"
	}
	goto __finally9;
	__catch9_g_error:
	{
		GError* _error_ = NULL;
		GError* _tmp10_;
		const gchar* _tmp11_;
#line 556 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_error_ = _inner_error_;
#line 556 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_inner_error_ = NULL;
#line 565 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp10_ = _error_;
#line 565 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp11_ = _tmp10_->message;
#line 565 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_critical (_ ("Failed to select from database: %s"), _tmp11_);
#line 556 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_error_free0 (_error_);
#line 4699 "tabby.c"
	}
	__finally9:
#line 556 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 4704 "tabby.c"
		gdouble _tmp12_ = 0.0;
#line 556 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_free0 (sqlcmd);
#line 556 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_clear_error (&_inner_error_);
#line 556 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		return _tmp12_;
#line 4714 "tabby.c"
	}
#line 568 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	result = 0.0;
#line 568 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_free0 (sqlcmd);
#line 568 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	return result;
#line 4722 "tabby.c"
}


TabbyLocalSession* tabby_local_session_construct (GType object_type, MidoriDatabase* database) {
	TabbyLocalSession * self = NULL;
	MidoriDatabase* _tmp0_;
	MidoriDatabase* _tmp1_;
	GDateTime* time = NULL;
	GDateTime* _tmp2_;
	gchar* sqlcmd = NULL;
	gchar* _tmp3_;
	GError * _inner_error_ = NULL;
#line 571 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_val_if_fail (database != NULL, NULL);
#line 571 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	self = (TabbyLocalSession*) tabby_base_session_construct (object_type);
#line 572 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp0_ = database;
#line 572 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 572 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_object_unref0 (self->priv->database);
#line 572 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	self->priv->database = _tmp1_;
#line 574 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp2_ = g_date_time_new_now_local ();
#line 574 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	time = _tmp2_;
#line 576 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp3_ = g_strdup ("INSERT INTO `sessions` (`tstamp`) VALUES (:tstamp);");
#line 576 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	sqlcmd = _tmp3_;
#line 4755 "tabby.c"
	{
		MidoriDatabaseStatement* statement = NULL;
		MidoriDatabase* _tmp4_;
		const gchar* _tmp5_;
		GDateTime* _tmp6_;
		gint64 _tmp7_;
		MidoriDatabaseStatement* _tmp8_;
		MidoriDatabaseStatement* _tmp9_;
		gint64 _tmp10_ = 0LL;
		MidoriDatabaseStatement* _tmp11_;
		gint64 _tmp12_;
#line 579 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp4_ = database;
#line 579 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp5_ = sqlcmd;
#line 579 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp6_ = time;
#line 579 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp7_ = g_date_time_to_unix (_tmp6_);
#line 579 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp8_ = midori_database_prepare (_tmp4_, _tmp5_, &_inner_error_, ":tstamp", G_TYPE_INT64, _tmp7_, NULL);
#line 579 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		statement = _tmp8_;
#line 579 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 4781 "tabby.c"
			goto __catch10_g_error;
		}
#line 581 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp9_ = statement;
#line 581 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		midori_database_statement_exec (_tmp9_, &_inner_error_);
#line 581 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 581 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_g_object_unref0 (statement);
#line 4792 "tabby.c"
			goto __catch10_g_error;
		}
#line 582 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp11_ = statement;
#line 582 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp12_ = midori_database_statement_row_id (_tmp11_, &_inner_error_);
#line 582 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp10_ = _tmp12_;
#line 582 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 582 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_g_object_unref0 (statement);
#line 4805 "tabby.c"
			goto __catch10_g_error;
		}
#line 582 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		tabby_local_session_set_id (self, _tmp10_);
#line 578 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_object_unref0 (statement);
#line 4812 "tabby.c"
	}
	goto __finally10;
	__catch10_g_error:
	{
		GError* _error_ = NULL;
		GError* _tmp13_;
		const gchar* _tmp14_;
#line 578 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_error_ = _inner_error_;
#line 578 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_inner_error_ = NULL;
#line 584 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp13_ = _error_;
#line 584 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp14_ = _tmp13_->message;
#line 584 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_critical (_ ("Failed to update database: %s"), _tmp14_);
#line 578 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_error_free0 (_error_);
#line 4832 "tabby.c"
	}
	__finally10:
#line 578 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 578 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_free0 (sqlcmd);
#line 578 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_date_time_unref0 (time);
#line 578 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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 578 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_clear_error (&_inner_error_);
#line 578 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		return NULL;
#line 4847 "tabby.c"
	}
#line 571 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_free0 (sqlcmd);
#line 571 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_date_time_unref0 (time);
#line 571 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	return self;
#line 4855 "tabby.c"
}


TabbyLocalSession* tabby_local_session_new (MidoriDatabase* database) {
#line 571 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	return tabby_local_session_construct (TABBY_LOCAL_TYPE_SESSION, database);
#line 4862 "tabby.c"
}


TabbyLocalSession* tabby_local_session_construct_with_id (GType object_type, MidoriDatabase* database, gint64 id) {
	TabbyLocalSession * self = NULL;
	MidoriDatabase* _tmp0_;
	MidoriDatabase* _tmp1_;
	gint64 _tmp2_;
	GDateTime* time = NULL;
	GDateTime* _tmp3_;
	gchar* sqlcmd = NULL;
	gchar* _tmp4_;
	GError * _inner_error_ = NULL;
#line 588 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_val_if_fail (database != NULL, NULL);
#line 588 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	self = (TabbyLocalSession*) tabby_base_session_construct (object_type);
#line 589 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp0_ = database;
#line 589 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 589 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_object_unref0 (self->priv->database);
#line 589 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	self->priv->database = _tmp1_;
#line 590 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp2_ = id;
#line 590 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	tabby_local_session_set_id (self, _tmp2_);
#line 592 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp3_ = g_date_time_new_now_local ();
#line 592 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	time = _tmp3_;
#line 593 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp4_ = g_strdup ("UPDATE `sessions` SET closed = 0, tstamp = :tstamp WHERE id = :session" \
"_id;");
#line 593 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	sqlcmd = _tmp4_;
#line 4900 "tabby.c"
	{
		MidoriDatabaseStatement* _tmp5_ = NULL;
		MidoriDatabase* _tmp6_;
		const gchar* _tmp7_;
		gint64 _tmp8_;
		GDateTime* _tmp9_;
		gint64 _tmp10_;
		MidoriDatabaseStatement* _tmp11_;
#line 596 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp6_ = database;
#line 596 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp7_ = sqlcmd;
#line 596 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp8_ = self->priv->_id;
#line 596 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp9_ = time;
#line 596 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp10_ = g_date_time_to_unix (_tmp9_);
#line 596 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp11_ = midori_database_prepare (_tmp6_, _tmp7_, &_inner_error_, ":session_id", G_TYPE_INT64, _tmp8_, ":tstamp", G_TYPE_INT64, _tmp10_, NULL);
#line 596 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp5_ = _tmp11_;
#line 596 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 4925 "tabby.c"
			goto __catch11_g_error;
		}
#line 596 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		midori_database_statement_exec (_tmp5_, &_inner_error_);
#line 596 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 596 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_g_object_unref0 (_tmp5_);
#line 4934 "tabby.c"
			goto __catch11_g_error;
		}
#line 595 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_object_unref0 (_tmp5_);
#line 4939 "tabby.c"
	}
	goto __finally11;
	__catch11_g_error:
	{
		GError* _error_ = NULL;
		GError* _tmp12_;
		const gchar* _tmp13_;
#line 595 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_error_ = _inner_error_;
#line 595 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_inner_error_ = NULL;
#line 600 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp12_ = _error_;
#line 600 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp13_ = _tmp12_->message;
#line 600 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_critical (_ ("Failed to update database: %s"), _tmp13_);
#line 595 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_error_free0 (_error_);
#line 4959 "tabby.c"
	}
	__finally11:
#line 595 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 595 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_free0 (sqlcmd);
#line 595 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_date_time_unref0 (time);
#line 595 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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 595 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_clear_error (&_inner_error_);
#line 595 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		return NULL;
#line 4974 "tabby.c"
	}
#line 588 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_free0 (sqlcmd);
#line 588 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_date_time_unref0 (time);
#line 588 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	return self;
#line 4982 "tabby.c"
}


TabbyLocalSession* tabby_local_session_new_with_id (MidoriDatabase* database, gint64 id) {
#line 588 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	return tabby_local_session_construct_with_id (TABBY_LOCAL_TYPE_SESSION, database, id);
#line 4989 "tabby.c"
}


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


static void tabby_local_session_set_id (TabbyLocalSession* self, gint64 value) {
#line 367 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 367 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (tabby_local_session_get_id (self) != value) {
#line 5013 "tabby.c"
		gint64 _tmp0_;
#line 367 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp0_ = value;
#line 367 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		self->priv->_id = _tmp0_;
#line 367 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_object_notify_by_pspec ((GObject *) self, tabby_local_session_properties[TABBY_LOCAL_SESSION_ID_PROPERTY]);
#line 5021 "tabby.c"
	}
}


static void tabby_local_session_class_init (TabbyLocalSessionClass * klass) {
#line 366 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	tabby_local_session_parent_class = g_type_class_peek_parent (klass);
#line 366 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_type_class_add_private (klass, sizeof (TabbyLocalSessionPrivate));
#line 366 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	((TabbyBaseSessionClass *) klass)->add_item = (void (*) (TabbyBaseSession *, KatzeItem*)) tabby_local_session_real_add_item;
#line 366 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	((TabbyBaseSessionClass *) klass)->uri_changed = (void (*) (TabbyBaseSession *, MidoriView*, const gchar*)) tabby_local_session_real_uri_changed;
#line 366 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	((TabbyBaseSessionClass *) klass)->data_changed = (void (*) (TabbyBaseSession *, MidoriView*)) tabby_local_session_real_data_changed;
#line 366 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	((TabbyBaseSessionClass *) klass)->tab_added = (void (*) (TabbyBaseSession *, MidoriBrowser*, MidoriView*)) tabby_local_session_real_tab_added;
#line 366 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	((TabbyBaseSessionClass *) klass)->tab_removed = (void (*) (TabbyBaseSession *, MidoriBrowser*, MidoriView*)) tabby_local_session_real_tab_removed;
#line 366 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	((TabbyBaseSessionClass *) klass)->tab_switched = (void (*) (TabbyBaseSession *, MidoriView*, MidoriView*)) tabby_local_session_real_tab_switched;
#line 366 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	((TabbyBaseSessionClass *) klass)->tab_reordered = (void (*) (TabbyBaseSession *, GtkWidget*, guint)) tabby_local_session_real_tab_reordered;
#line 366 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	((TabbyBaseSessionClass *) klass)->remove = (void (*) (TabbyBaseSession *)) tabby_local_session_real_remove;
#line 366 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	((TabbyBaseSessionClass *) klass)->close = (void (*) (TabbyBaseSession *)) tabby_local_session_real_close;
#line 366 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	((TabbyBaseSessionClass *) klass)->get_tabs = (KatzeArray* (*) (TabbyBaseSession *)) tabby_local_session_real_get_tabs;
#line 366 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	((TabbyBaseSessionClass *) klass)->get_max_sorting = (gdouble (*) (TabbyBaseSession *)) tabby_local_session_real_get_max_sorting;
#line 366 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_tabby_local_session_get_property;
#line 366 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_tabby_local_session_set_property;
#line 366 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	G_OBJECT_CLASS (klass)->finalize = tabby_local_session_finalize;
#line 366 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), TABBY_LOCAL_SESSION_ID_PROPERTY, tabby_local_session_properties[TABBY_LOCAL_SESSION_ID_PROPERTY] = 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 5061 "tabby.c"
}


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


static void tabby_local_session_finalize (GObject * obj) {
	TabbyLocalSession * self;
#line 366 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TABBY_LOCAL_TYPE_SESSION, TabbyLocalSession);
#line 368 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_object_unref0 (self->priv->database);
#line 366 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	G_OBJECT_CLASS (tabby_local_session_parent_class)->finalize (obj);
#line 5080 "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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	switch (property_id) {
#line 366 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		case TABBY_LOCAL_SESSION_ID_PROPERTY:
#line 366 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_value_set_int64 (value, tabby_local_session_get_id (self));
#line 366 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		break;
#line 5107 "tabby.c"
		default:
#line 366 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 366 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		break;
#line 5113 "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.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	switch (property_id) {
#line 366 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		case TABBY_LOCAL_SESSION_ID_PROPERTY:
#line 366 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		tabby_local_session_set_id (self, g_value_get_int64 (value));
#line 366 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		break;
#line 5129 "tabby.c"
		default:
#line 366 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 366 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		break;
#line 5135 "tabby.c"
	}
}


static KatzeArray* tabby_local_storage_real_get_saved_sessions (TabbyBaseStorage* base) {
	TabbyLocalStorage * self;
	KatzeArray* result = NULL;
	KatzeArray* sessions = NULL;
	KatzeArray* _tmp0_;
	gchar* sqlcmd = NULL;
	gchar* _tmp1_;
	KatzeArray* _tmp23_;
	gboolean _tmp24_;
	GError * _inner_error_ = NULL;
#line 608 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	self = (TabbyLocalStorage*) base;
#line 609 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp0_ = katze_array_new (TABBY_LOCAL_TYPE_SESSION);
#line 609 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	sessions = _tmp0_;
#line 611 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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 611 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	sqlcmd = _tmp1_;
#line 5160 "tabby.c"
	{
		MidoriDatabaseStatement* statement = NULL;
		MidoriDatabase* _tmp2_;
		const gchar* _tmp3_;
		MidoriDatabaseStatement* _tmp4_;
#line 618 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp2_ = self->priv->database;
#line 618 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp3_ = sqlcmd;
#line 618 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp4_ = midori_database_prepare (_tmp2_, _tmp3_, &_inner_error_, NULL);
#line 618 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		statement = _tmp4_;
#line 618 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 5176 "tabby.c"
			goto __catch12_g_error;
		}
#line 619 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		while (TRUE) {
#line 5181 "tabby.c"
			gboolean _tmp5_ = FALSE;
			MidoriDatabaseStatement* _tmp6_;
			gboolean _tmp7_;
			gint64 id = 0LL;
			MidoriDatabaseStatement* _tmp8_;
			gint64 _tmp9_;
			gint64 closed = 0LL;
			MidoriDatabaseStatement* _tmp10_;
			gint64 _tmp11_;
			gboolean _tmp12_ = FALSE;
			gint64 _tmp13_;
#line 619 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp6_ = statement;
#line 619 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp7_ = midori_database_statement_step (_tmp6_, &_inner_error_);
#line 619 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp5_ = _tmp7_;
#line 619 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 619 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_g_object_unref0 (statement);
#line 5203 "tabby.c"
				goto __catch12_g_error;
			}
#line 619 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			if (!_tmp5_) {
#line 619 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				break;
#line 5210 "tabby.c"
			}
#line 620 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp8_ = statement;
#line 620 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp9_ = midori_database_statement_get_int64 (_tmp8_, "id", &_inner_error_);
#line 620 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			id = _tmp9_;
#line 620 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 620 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_g_object_unref0 (statement);
#line 5222 "tabby.c"
				goto __catch12_g_error;
			}
#line 621 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp10_ = statement;
#line 621 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp11_ = midori_database_statement_get_int64 (_tmp10_, "closed", &_inner_error_);
#line 621 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			closed = _tmp11_;
#line 621 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 621 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_g_object_unref0 (statement);
#line 5235 "tabby.c"
				goto __catch12_g_error;
			}
#line 622 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp13_ = closed;
#line 622 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			if (_tmp13_ == ((gint64) 0)) {
#line 622 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_tmp12_ = TRUE;
#line 5244 "tabby.c"
			} else {
				KatzeArray* _tmp14_;
				gboolean _tmp15_;
#line 622 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_tmp14_ = sessions;
#line 622 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_tmp15_ = katze_array_is_empty (_tmp14_);
#line 622 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_tmp12_ = _tmp15_;
#line 5254 "tabby.c"
			}
#line 622 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			if (_tmp12_) {
#line 5258 "tabby.c"
				KatzeArray* _tmp16_;
				MidoriDatabase* _tmp17_;
				gint64 _tmp18_;
				TabbyLocalSession* _tmp19_;
				TabbyLocalSession* _tmp20_;
#line 623 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_tmp16_ = sessions;
#line 623 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_tmp17_ = self->priv->database;
#line 623 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_tmp18_ = id;
#line 623 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_tmp19_ = tabby_local_session_new_with_id (_tmp17_, _tmp18_);
#line 623 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_tmp20_ = _tmp19_;
#line 623 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				g_signal_emit_by_name (_tmp16_, "add-item", (GObject*) _tmp20_);
#line 623 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_g_object_unref0 (_tmp20_);
#line 5278 "tabby.c"
			}
		}
#line 617 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_object_unref0 (statement);
#line 5283 "tabby.c"
	}
	goto __finally12;
	__catch12_g_error:
	{
		GError* _error_ = NULL;
		GError* _tmp21_;
		const gchar* _tmp22_;
#line 617 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_error_ = _inner_error_;
#line 617 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_inner_error_ = NULL;
#line 627 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp21_ = _error_;
#line 627 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp22_ = _tmp21_->message;
#line 627 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_critical (_ ("Failed to select from database: %s"), _tmp22_);
#line 617 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_error_free0 (_error_);
#line 5303 "tabby.c"
	}
	__finally12:
#line 617 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 617 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_free0 (sqlcmd);
#line 617 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_object_unref0 (sessions);
#line 617 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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 617 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_clear_error (&_inner_error_);
#line 617 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		return NULL;
#line 5318 "tabby.c"
	}
#line 630 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp23_ = sessions;
#line 630 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp24_ = katze_array_is_empty (_tmp23_);
#line 630 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (_tmp24_) {
#line 5326 "tabby.c"
		KatzeArray* _tmp25_;
		MidoriDatabase* _tmp26_;
		TabbyLocalSession* _tmp27_;
		TabbyLocalSession* _tmp28_;
#line 631 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp25_ = sessions;
#line 631 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp26_ = self->priv->database;
#line 631 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp27_ = tabby_local_session_new (_tmp26_);
#line 631 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp28_ = _tmp27_;
#line 631 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_signal_emit_by_name (_tmp25_, "add-item", (GObject*) _tmp28_);
#line 631 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_object_unref0 (_tmp28_);
#line 5343 "tabby.c"
	}
#line 634 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	result = sessions;
#line 634 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_free0 (sqlcmd);
#line 634 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	return result;
#line 5351 "tabby.c"
}


static Block3Data* block3_data_ref (Block3Data* _data3_) {
#line 637 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_atomic_int_inc (&_data3_->_ref_count_);
#line 637 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	return _data3_;
#line 5360 "tabby.c"
}


static void block3_data_unref (void * _userdata_) {
	Block3Data* _data3_;
	_data3_ = (Block3Data*) _userdata_;
#line 637 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (g_atomic_int_dec_and_test (&_data3_->_ref_count_)) {
#line 5369 "tabby.c"
		TabbyLocalStorage* self;
#line 637 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		self = _data3_->self;
#line 637 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_object_unref0 (_data3_->tabs);
#line 637 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_object_unref0 (self);
#line 637 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_slice_free (Block3Data, _data3_);
#line 5379 "tabby.c"
	}
}


static gboolean ___lambda9_ (Block3Data* _data3_, GError** error) {
	TabbyLocalStorage* self;
	gboolean result = FALSE;
	KatzeArray* _tmp0_;
#line 639 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	self = _data3_->self;
#line 640 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp0_ = _data3_->tabs;
#line 640 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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 640 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	result = TRUE;
#line 640 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	return result;
#line 5398 "tabby.c"
}


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


static void tabby_local_storage_real_import_session (TabbyBaseStorage* base, KatzeArray* tabs) {
	TabbyLocalStorage * self;
	Block3Data* _data3_;
	KatzeArray* _tmp0_;
	KatzeArray* _tmp1_;
	GError * _inner_error_ = NULL;
#line 637 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	self = (TabbyLocalStorage*) base;
#line 637 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_if_fail (tabs != NULL);
#line 637 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_data3_ = g_slice_new0 (Block3Data);
#line 637 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_data3_->_ref_count_ = 1;
#line 637 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_data3_->self = g_object_ref (self);
#line 637 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp0_ = tabs;
#line 637 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 637 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_object_unref0 (_data3_->tabs);
#line 637 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_data3_->tabs = _tmp1_;
#line 5435 "tabby.c"
	{
		MidoriDatabase* _tmp2_;
#line 639 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp2_ = self->priv->database;
#line 639 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		midori_database_transaction (_tmp2_, ____lambda9__midori_database_callback, _data3_, &_inner_error_);
#line 639 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 5444 "tabby.c"
			goto __catch13_g_error;
		}
	}
	goto __finally13;
	__catch13_g_error:
	{
		GError* _error_ = NULL;
		GError* _tmp3_;
		const gchar* _tmp4_;
#line 638 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_error_ = _inner_error_;
#line 638 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_inner_error_ = NULL;
#line 643 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp3_ = _error_;
#line 643 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp4_ = _tmp3_->message;
#line 643 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_critical (_ ("Failed to select from database: %s"), _tmp4_);
#line 638 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_error_free0 (_error_);
#line 5466 "tabby.c"
	}
	__finally13:
#line 638 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 638 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		block3_data_unref (_data3_);
#line 638 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_data3_ = NULL;
#line 638 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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 638 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_clear_error (&_inner_error_);
#line 638 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		return;
#line 5481 "tabby.c"
	}
#line 637 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	block3_data_unref (_data3_);
#line 637 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_data3_ = NULL;
#line 5487 "tabby.c"
}


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


TabbyLocalStorage* tabby_local_storage_construct (GType object_type, MidoriApp* app) {
	TabbyLocalStorage * self = NULL;
	MidoriApp* _tmp0_;
	MidoriDatabase* _tmp5_;
	gboolean _tmp6_;
	gboolean _tmp7_;
	GError * _inner_error_ = NULL;
#line 651 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_val_if_fail (app != NULL, NULL);
#line 652 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp0_ = app;
#line 652 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	self = (TabbyLocalStorage*) g_object_new (object_type, "app", _tmp0_, NULL);
#line 5532 "tabby.c"
	{
		MidoriDatabase* _tmp1_ = NULL;
		MidoriDatabase* _tmp2_;
		MidoriDatabase* _tmp3_;
#line 655 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp2_ = midori_database_new ("tabby.db", &_inner_error_);
#line 655 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp1_ = _tmp2_;
#line 655 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 655 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			if (_inner_error_->domain == MIDORI_DATABASE_ERROR) {
#line 5545 "tabby.c"
				goto __catch14_midori_database_error;
			}
#line 655 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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 655 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			g_clear_error (&_inner_error_);
#line 655 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			return NULL;
#line 5554 "tabby.c"
		}
#line 655 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp3_ = _tmp1_;
#line 655 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp1_ = NULL;
#line 655 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_object_unref0 (self->priv->database);
#line 655 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		self->priv->database = _tmp3_;
#line 654 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_object_unref0 (_tmp1_);
#line 5566 "tabby.c"
	}
	goto __finally14;
	__catch14_midori_database_error:
	{
		GError* schema_error = NULL;
		const gchar* _tmp4_;
#line 654 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		schema_error = _inner_error_;
#line 654 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_inner_error_ = NULL;
#line 657 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp4_ = schema_error->message;
#line 657 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_error ("tabby.vala:657: %s", _tmp4_);
#line 654 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_error_free0 (schema_error);
#line 5583 "tabby.c"
	}
	__finally14:
#line 654 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 654 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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 654 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_clear_error (&_inner_error_);
#line 654 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		return NULL;
#line 5594 "tabby.c"
	}
#line 660 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp5_ = self->priv->database;
#line 660 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp6_ = midori_database_get_first_use (_tmp5_);
#line 660 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp7_ = _tmp6_;
#line 660 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (_tmp7_) {
#line 5604 "tabby.c"
		gchar* config_file = NULL;
		gchar* _tmp8_;
#line 661 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp8_ = midori_paths_get_config_filename_for_reading ("session.xbel");
#line 661 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		config_file = _tmp8_;
#line 5611 "tabby.c"
		{
			KatzeArray* old_session = NULL;
			KatzeArray* _tmp9_;
			KatzeArray* _tmp10_;
			const gchar* _tmp11_;
			KatzeArray* _tmp12_;
#line 663 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp9_ = katze_array_new (KATZE_TYPE_ITEM);
#line 663 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			old_session = _tmp9_;
#line 664 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp10_ = old_session;
#line 664 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp11_ = config_file;
#line 664 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			midori_array_from_file (_tmp10_, _tmp11_, "xbel-tiny", &_inner_error_);
#line 664 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 664 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_g_object_unref0 (old_session);
#line 664 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				if (_inner_error_->domain == G_FILE_ERROR) {
#line 5634 "tabby.c"
					goto __catch15_g_file_error;
				}
				goto __catch15_g_error;
			}
#line 665 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp12_ = old_session;
#line 665 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			tabby_base_storage_import_session ((TabbyBaseStorage*) self, _tmp12_);
#line 662 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_g_object_unref0 (old_session);
#line 5645 "tabby.c"
		}
		goto __finally15;
		__catch15_g_file_error:
		{
			GError* file_error = NULL;
#line 662 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			file_error = _inner_error_;
#line 662 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_inner_error_ = NULL;
#line 662 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_g_error_free0 (file_error);
#line 5657 "tabby.c"
		}
		goto __finally15;
		__catch15_g_error:
		{
			GError* _error_ = NULL;
			GError* _tmp13_;
			const gchar* _tmp14_;
#line 662 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_error_ = _inner_error_;
#line 662 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_inner_error_ = NULL;
#line 669 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp13_ = _error_;
#line 669 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp14_ = _tmp13_->message;
#line 669 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			g_critical (_ ("Failed to import legacy session: %s"), _tmp14_);
#line 662 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_g_error_free0 (_error_);
#line 5677 "tabby.c"
		}
		__finally15:
#line 662 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 662 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_g_free0 (config_file);
#line 662 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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 662 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			g_clear_error (&_inner_error_);
#line 662 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			return NULL;
#line 5690 "tabby.c"
		}
#line 660 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_free0 (config_file);
#line 5694 "tabby.c"
	}
#line 651 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	return self;
#line 5698 "tabby.c"
}


TabbyLocalStorage* tabby_local_storage_new (MidoriApp* app) {
#line 651 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	return tabby_local_storage_construct (TABBY_LOCAL_TYPE_STORAGE, app);
#line 5705 "tabby.c"
}


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


static void tabby_local_storage_instance_init (TabbyLocalStorage * self) {
#line 605 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	self->priv = TABBY_LOCAL_STORAGE_GET_PRIVATE (self);
#line 5729 "tabby.c"
}


static void tabby_local_storage_finalize (GObject * obj) {
	TabbyLocalStorage * self;
#line 605 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TABBY_LOCAL_TYPE_STORAGE, TabbyLocalStorage);
#line 606 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_object_unref0 (self->priv->database);
#line 605 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	G_OBJECT_CLASS (tabby_local_storage_parent_class)->finalize (obj);
#line 5741 "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 690 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	return result;
#line 5762 "tabby.c"
}


static gboolean tabby_manager_load_session (TabbyManager* self) {
	gboolean result = FALSE;
	gint load_on_startup = 0;
	MidoriApp* _tmp0_;
	MidoriWebSettings* _tmp1_;
	MidoriWebSettings* _tmp2_;
	MidoriWebSettings* _tmp3_;
	gboolean _tmp4_ = FALSE;
	gint _tmp5_;
#line 678 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 681 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp0_ = tabby_APP;
#line 681 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_object_get (_tmp0_, "settings", &_tmp1_, NULL);
#line 681 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp2_ = _tmp1_;
#line 681 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp3_ = _tmp2_;
#line 681 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_object_get ((GObject*) _tmp3_, "load-on-startup", &load_on_startup, NULL);
#line 681 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_object_unref0 (_tmp3_);
#line 682 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp5_ = load_on_startup;
#line 682 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (_tmp5_ == ((gint) MIDORI_STARTUP_BLANK_PAGE)) {
#line 682 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp4_ = TRUE;
#line 5795 "tabby.c"
	} else {
		gint _tmp6_;
#line 683 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp6_ = load_on_startup;
#line 683 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp4_ = _tmp6_ == ((gint) MIDORI_STARTUP_HOMEPAGE);
#line 5802 "tabby.c"
	}
#line 682 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (_tmp4_) {
#line 5806 "tabby.c"
		TabbyBaseStorage* _tmp7_;
#line 684 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp7_ = self->priv->storage;
#line 684 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		tabby_base_storage_start_new_session (_tmp7_);
#line 5812 "tabby.c"
	} else {
		TabbyBaseStorage* _tmp8_;
#line 686 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp8_ = self->priv->storage;
#line 686 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		tabby_istorage_restore_last_sessions ((TabbyIStorage*) _tmp8_);
#line 5819 "tabby.c"
	}
#line 690 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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 692 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	result = FALSE;
#line 692 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	return result;
#line 5827 "tabby.c"
}


static gboolean tabby_manager_execute_commands (TabbyManager* self) {
	gboolean result = FALSE;
	MidoriApp* app = NULL;
	MidoriApp* _tmp0_;
	MidoriApp* _tmp1_;
	gchar** commands = NULL;
	MidoriApp* _tmp2_;
	gconstpointer _tmp3_;
	gint commands_length1;
	gint _commands_size_;
	gchar** _tmp4_;
	gint _tmp4__length1;
#line 695 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 696 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp0_ = midori_extension_get_app ((MidoriExtension*) self);
#line 696 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 696 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	app = _tmp1_;
#line 697 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp2_ = app;
#line 697 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp3_ = g_object_get_data ((GObject*) _tmp2_, "execute-commands");
#line 697 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	commands = _tmp3_;
#line 697 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	commands_length1 = -1;
#line 697 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_commands_size_ = commands_length1;
#line 699 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp4_ = commands;
#line 699 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp4__length1 = commands_length1;
#line 699 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (_tmp4_ != NULL) {
#line 5867 "tabby.c"
		MidoriApp* _tmp5_;
		gchar** _tmp6_;
		gint _tmp6__length1;
#line 700 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp5_ = app;
#line 700 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp6_ = commands;
#line 700 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp6__length1 = commands_length1;
#line 700 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		midori_app_send_command (_tmp5_, _tmp6_);
#line 5879 "tabby.c"
	}
#line 703 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	result = FALSE;
#line 703 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_object_unref0 (app);
#line 703 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	return result;
#line 5887 "tabby.c"
}


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


static void tabby_manager_set_open_uris (TabbyManager* self, MidoriBrowser* browser) {
	MidoriApp* app = NULL;
	MidoriApp* _tmp0_;
	MidoriApp* _tmp1_;
	gchar** uris = NULL;
	MidoriApp* _tmp2_;
	gconstpointer _tmp3_;
	gint uris_length1;
	gint _uris_size_;
	gchar** _tmp4_;
	gint _tmp4__length1;
	MidoriApp* _tmp32_;
	guint _tmp33_;
#line 706 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 706 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_if_fail (browser != NULL);
#line 707 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp0_ = midori_extension_get_app ((MidoriExtension*) self);
#line 707 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 707 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	app = _tmp1_;
#line 708 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp2_ = app;
#line 708 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp3_ = g_object_get_data ((GObject*) _tmp2_, "open-uris");
#line 708 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	uris = _tmp3_;
#line 708 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	uris_length1 = -1;
#line 708 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_uris_size_ = uris_length1;
#line 710 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp4_ = uris;
#line 710 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp4__length1 = uris_length1;
#line 710 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (_tmp4_ != NULL) {
#line 5937 "tabby.c"
		KatzeArray* tabs = NULL;
		KatzeArray* _tmp5_;
		KatzeArray* _tmp27_;
		gboolean _tmp28_;
#line 711 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp5_ = katze_array_new (KATZE_TYPE_ITEM);
#line 711 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		tabs = _tmp5_;
#line 5946 "tabby.c"
		{
			gint i = 0;
#line 713 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			i = 0;
#line 5951 "tabby.c"
			{
				gboolean _tmp6_ = FALSE;
#line 713 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				_tmp6_ = TRUE;
#line 713 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
				while (TRUE) {
#line 5958 "tabby.c"
					gchar** _tmp8_;
					gint _tmp8__length1;
					gint _tmp9_;
					const gchar* _tmp10_;
					KatzeItem* item = NULL;
					KatzeItem* _tmp11_;
					KatzeItem* _tmp12_;
					gchar** _tmp13_;
					gint _tmp13__length1;
					gint _tmp14_;
					const gchar* _tmp15_;
					KatzeItem* _tmp16_;
					gchar** _tmp17_;
					gint _tmp17__length1;
					gint _tmp18_;
					const gchar* _tmp19_;
					gchar* _tmp20_;
					gchar* _tmp21_;
					KatzeItem* _tmp22_;
					const gchar* _tmp23_;
					const gchar* _tmp24_;
#line 713 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					if (!_tmp6_) {
#line 5982 "tabby.c"
						gint _tmp7_;
#line 713 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						_tmp7_ = i;
#line 713 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						i = _tmp7_ + 1;
#line 5988 "tabby.c"
					}
#line 713 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_tmp6_ = FALSE;
#line 713 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_tmp8_ = uris;
#line 713 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_tmp8__length1 = uris_length1;
#line 713 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_tmp9_ = i;
#line 713 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_tmp10_ = _tmp8_[_tmp9_];
#line 713 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					if (!(_tmp10_ != NULL)) {
#line 713 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						break;
#line 6004 "tabby.c"
					}
#line 714 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_tmp11_ = katze_item_new ();
#line 714 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					item = _tmp11_;
#line 715 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_tmp12_ = item;
#line 715 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_tmp13_ = uris;
#line 715 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_tmp13__length1 = uris_length1;
#line 715 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_tmp14_ = i;
#line 715 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_tmp15_ = _tmp13_[_tmp14_];
#line 715 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					katze_item_set_name (_tmp12_, _tmp15_);
#line 716 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_tmp16_ = item;
#line 716 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_tmp17_ = uris;
#line 716 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_tmp17__length1 = uris_length1;
#line 716 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_tmp18_ = i;
#line 716 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_tmp19_ = _tmp17_[_tmp18_];
#line 716 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_tmp20_ = sokoke_magic_uri (_tmp19_, TRUE, TRUE);
#line 716 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_tmp21_ = _tmp20_;
#line 716 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					katze_item_set_uri (_tmp16_, _tmp21_);
#line 716 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_g_free0 (_tmp21_);
#line 717 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_tmp22_ = item;
#line 717 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_tmp23_ = katze_item_get_uri (_tmp22_);
#line 717 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_tmp24_ = _tmp23_;
#line 717 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					if (_tmp24_ != NULL) {
#line 6048 "tabby.c"
						KatzeArray* _tmp25_;
						KatzeItem* _tmp26_;
#line 718 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						_tmp25_ = tabs;
#line 718 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						_tmp26_ = item;
#line 718 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
						g_signal_emit_by_name (_tmp25_, "add-item", (GObject*) _tmp26_);
#line 6057 "tabby.c"
					}
#line 713 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
					_g_object_unref0 (item);
#line 6061 "tabby.c"
				}
			}
		}
#line 721 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp27_ = tabs;
#line 721 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp28_ = katze_array_is_empty (_tmp27_);
#line 721 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		if (!_tmp28_) {
#line 6071 "tabby.c"
			MidoriBrowser* _tmp29_;
			KatzeArray* _tmp30_;
			KatzeArray* _tmp31_;
#line 722 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp29_ = browser;
#line 722 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp30_ = tabs;
#line 722 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp31_ = _g_object_ref0 (_tmp30_);
#line 722 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			g_object_set_data_full ((GObject*) _tmp29_, "tabby-open-uris", _tmp31_, g_object_unref);
#line 6083 "tabby.c"
		}
#line 710 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_object_unref0 (tabs);
#line 6087 "tabby.c"
	}
#line 726 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp32_ = app;
#line 726 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_signal_parse_name ("add-browser", MIDORI_TYPE_APP, &_tmp33_, NULL, FALSE);
#line 726 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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 706 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_object_unref0 (app);
#line 6097 "tabby.c"
}


static void tabby_manager_browser_added (TabbyManager* self, MidoriBrowser* browser) {
	TabbyBaseSession* session = NULL;
	MidoriBrowser* _tmp0_;
	gconstpointer _tmp1_;
	TabbyBaseSession* _tmp2_;
	TabbyBaseSession* _tmp3_;
#line 729 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 729 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_if_fail (browser != NULL);
#line 730 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp0_ = browser;
#line 730 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp1_ = g_object_get_data ((GObject*) _tmp0_, "tabby-session");
#line 730 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp2_ = _g_object_ref0 ((TabbyBaseSession*) _tmp1_);
#line 730 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	session = _tmp2_;
#line 731 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp3_ = session;
#line 731 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (_tmp3_ == NULL) {
#line 6123 "tabby.c"
		TabbyBaseStorage* _tmp4_;
		TabbyBaseSession* _tmp5_;
		TabbyBaseSession* _tmp6_;
		MidoriBrowser* _tmp7_;
		TabbyBaseSession* _tmp8_;
		TabbyBaseSession* _tmp9_;
		TabbyBaseSession* _tmp10_;
		MidoriBrowser* _tmp11_;
#line 732 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp4_ = self->priv->storage;
#line 732 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp5_ = tabby_base_storage_get_new_session (_tmp4_);
#line 732 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp6_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp5_, TABBY_BASE_TYPE_SESSION) ? ((TabbyBaseSession*) _tmp5_) : NULL;
#line 732 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		if (_tmp6_ == NULL) {
#line 732 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_g_object_unref0 (_tmp5_);
#line 6142 "tabby.c"
		}
#line 732 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_object_unref0 (session);
#line 732 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		session = _tmp6_;
#line 733 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp7_ = browser;
#line 733 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp8_ = session;
#line 733 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp9_ = _g_object_ref0 (_tmp8_);
#line 733 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_object_set_data_full ((GObject*) _tmp7_, "tabby-session", _tmp9_, g_object_unref);
#line 734 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp10_ = session;
#line 734 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp11_ = browser;
#line 734 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		tabby_isession_attach ((TabbyISession*) _tmp10_, _tmp11_);
#line 6162 "tabby.c"
	}
#line 729 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_object_unref0 (session);
#line 6166 "tabby.c"
}


static void tabby_manager_browser_removed (TabbyManager* self, MidoriBrowser* browser) {
	TabbyBaseSession* session = NULL;
	MidoriBrowser* _tmp0_;
	gconstpointer _tmp1_;
	TabbyBaseSession* _tmp2_;
	TabbyBaseSession* _tmp3_;
#line 738 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 738 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_if_fail (browser != NULL);
#line 739 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp0_ = browser;
#line 739 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp1_ = g_object_get_data ((GObject*) _tmp0_, "tabby-session");
#line 739 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp2_ = _g_object_ref0 ((TabbyBaseSession*) _tmp1_);
#line 739 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	session = _tmp2_;
#line 740 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp3_ = session;
#line 740 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (_tmp3_ == NULL) {
#line 741 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_warning ("tabby.vala:741: missing session");
#line 6194 "tabby.c"
	} else {
		TabbyBaseSession* _tmp4_;
		gint load_on_startup = 0;
		MidoriApp* _tmp5_;
		MidoriWebSettings* _tmp6_;
		MidoriWebSettings* _tmp7_;
		MidoriWebSettings* _tmp8_;
		gboolean _tmp9_ = FALSE;
		MidoriBrowser* _tmp10_;
		gboolean _tmp11_;
		gboolean _tmp12_;
#line 743 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp4_ = session;
#line 743 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		tabby_base_session_close (_tmp4_);
#line 747 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp5_ = tabby_APP;
#line 747 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_object_get (_tmp5_, "settings", &_tmp6_, NULL);
#line 747 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp7_ = _tmp6_;
#line 747 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp8_ = _tmp7_;
#line 747 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		g_object_get ((GObject*) _tmp8_, "load-on-startup", &load_on_startup, NULL);
#line 747 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_object_unref0 (_tmp8_);
#line 749 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp10_ = browser;
#line 749 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp11_ = gtk_window_get_destroy_with_parent ((GtkWindow*) _tmp10_);
#line 749 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp12_ = _tmp11_;
#line 749 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		if (_tmp12_) {
#line 749 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp9_ = TRUE;
#line 6232 "tabby.c"
		} else {
			gint _tmp13_;
#line 750 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp13_ = load_on_startup;
#line 750 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp9_ = _tmp13_ < ((gint) MIDORI_STARTUP_LAST_OPEN_PAGES);
#line 6239 "tabby.c"
		}
#line 749 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		if (_tmp9_) {
#line 6243 "tabby.c"
			TabbyBaseSession* _tmp14_;
#line 752 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp14_ = session;
#line 752 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			tabby_base_session_remove (_tmp14_);
#line 6249 "tabby.c"
		}
	}
#line 738 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_object_unref0 (session);
#line 6254 "tabby.c"
}


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


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


static gboolean _tabby_manager_load_session_gsource_func (gpointer self) {
	gboolean result;
	result = tabby_manager_load_session ((TabbyManager*) self);
#line 774 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	return result;
#line 6277 "tabby.c"
}


static void tabby_manager_activated (TabbyManager* self, MidoriApp* app) {
	MidoriApp* _tmp0_;
	MidoriApp* _tmp1_;
	const gchar* restore_count = NULL;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	MidoriApp* _tmp8_;
	TabbyLocalStorage* _tmp9_;
	TabbyBaseStorage* _tmp10_;
	MidoriApp* _tmp11_;
	MidoriApp* _tmp12_;
	MidoriApp* _tmp13_;
#line 757 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 757 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_if_fail (app != NULL);
#line 758 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp0_ = app;
#line 758 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 758 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_object_unref0 (tabby_APP);
#line 758 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	tabby_APP = _tmp1_;
#line 759 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp2_ = g_getenv ("TABBY_RESTORE_COUNT");
#line 759 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	restore_count = _tmp2_;
#line 760 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp3_ = restore_count;
#line 760 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (_tmp3_ != NULL) {
#line 6313 "tabby.c"
		gint count = 0;
		const gchar* _tmp4_;
		gint _tmp5_;
		gint _tmp6_;
#line 761 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp4_ = restore_count;
#line 761 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp5_ = atoi (_tmp4_);
#line 761 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		count = _tmp5_;
#line 762 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_tmp6_ = count;
#line 762 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		if (_tmp6_ >= 1) {
#line 6328 "tabby.c"
			gint _tmp7_;
#line 763 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			_tmp7_ = count;
#line 763 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
			tabby_IDLE_RESTORE_COUNT = _tmp7_;
#line 6334 "tabby.c"
		}
	}
#line 768 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp8_ = midori_extension_get_app ((MidoriExtension*) self);
#line 768 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp9_ = tabby_local_storage_new (_tmp8_);
#line 768 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp10_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp9_, TABBY_BASE_TYPE_STORAGE) ? ((TabbyBaseStorage*) _tmp9_) : NULL;
#line 768 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	if (_tmp10_ == NULL) {
#line 768 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
		_g_object_unref0 (_tmp9_);
#line 6347 "tabby.c"
	}
#line 768 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_object_unref0 (self->priv->storage);
#line 768 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	self->priv->storage = _tmp10_;
#line 770 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp11_ = app;
#line 770 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_signal_connect_object (_tmp11_, "add-browser", (GCallback) _tabby_manager_set_open_uris_midori_app_add_browser, self, 0);
#line 771 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp12_ = app;
#line 771 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_signal_connect_object (_tmp12_, "add-browser", (GCallback) _tabby_manager_browser_added_midori_app_add_browser, self, 0);
#line 772 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp13_ = app;
#line 772 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_signal_connect_object (_tmp13_, "remove-browser", (GCallback) _tabby_manager_browser_removed_midori_app_remove_browser, self, 0);
#line 774 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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 6367 "tabby.c"
}


static void tabby_manager_deactivated (TabbyManager* self) {
	MidoriApp* _tmp0_;
	guint _tmp1_;
	MidoriApp* _tmp2_;
	guint _tmp3_;
	MidoriApp* _tmp4_;
	guint _tmp5_;
#line 777 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_return_if_fail (self != NULL);
#line 780 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp0_ = tabby_APP;
#line 780 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_signal_parse_name ("add-browser", MIDORI_TYPE_APP, &_tmp1_, NULL, FALSE);
#line 780 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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 781 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp2_ = tabby_APP;
#line 781 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_signal_parse_name ("add-browser", MIDORI_TYPE_APP, &_tmp3_, NULL, FALSE);
#line 781 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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 782 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp4_ = tabby_APP;
#line 782 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_signal_parse_name ("remove-browser", MIDORI_TYPE_APP, &_tmp5_, NULL, FALSE);
#line 782 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/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 783 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_object_unref0 (tabby_APP);
#line 783 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	tabby_APP = NULL;
#line 785 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_object_unref0 (self->priv->storage);
#line 785 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	self->priv->storage = NULL;
#line 6406 "tabby.c"
}


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


static void _tabby_manager_deactivated_midori_extension_deactivate (MidoriExtension* _sender, gpointer self) {
#line 795 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	tabby_manager_deactivated ((TabbyManager*) self);
#line 6420 "tabby.c"
}


TabbyManager* tabby_manager_construct (GType object_type) {
	TabbyManager * self = NULL;
#line 789 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	self = (TabbyManager*) g_object_new (object_type, "name", _ ("Tabby"), "description", _ ("Tab and session management."), "version", "0.1", "authors", "André Stösel <andre@stoesel.de>", NULL);
#line 794 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_signal_connect_object ((MidoriExtension*) self, "activate", (GCallback) _tabby_manager_activated_midori_extension_activate, self, 0);
#line 795 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	g_signal_connect_object ((MidoriExtension*) self, "deactivate", (GCallback) _tabby_manager_deactivated_midori_extension_deactivate, self, 0);
#line 788 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	return self;
#line 6434 "tabby.c"
}


TabbyManager* tabby_manager_new (void) {
#line 788 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	return tabby_manager_construct (TABBY_TYPE_MANAGER);
#line 6441 "tabby.c"
}


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


static void tabby_manager_instance_init (TabbyManager * self) {
#line 676 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	self->priv = TABBY_MANAGER_GET_PRIVATE (self);
#line 6459 "tabby.c"
}


static void tabby_manager_finalize (GObject * obj) {
	TabbyManager * self;
#line 676 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TABBY_TYPE_MANAGER, TabbyManager);
#line 677 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_g_object_unref0 (self->priv->storage);
#line 676 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	G_OBJECT_CLASS (tabby_manager_parent_class)->finalize (obj);
#line 6471 "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_;
#line 801 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	_tmp0_ = tabby_manager_new ();
#line 801 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	result = (MidoriExtension*) _tmp0_;
#line 801 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/tabby.vala"
	return result;
#line 6496 "tabby.c"
}



