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

/*
   Copyright (C) 2013 Paweł Forysiuk <tuxator@o2.pl>

   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-core.h"
#include <sqlite3.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gi18n-lib.h>
#include <gdk/gdk.h>
#include <pango/pango.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include "midori/midori-browser.h"
#include "midori/midori-view.h"
#include "katze/katze.h"
#include "midori/midori-extension.h"
#include "webkit/webkit.h"
#include "midori/midori-panel.h"
#include "midori/midori-app.h"
#include "notes.h"


#define CLIP_NOTES_TYPE_NOTE (clip_notes_note_get_type ())
#define CLIP_NOTES_NOTE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLIP_NOTES_TYPE_NOTE, ClipNotesNote))
#define CLIP_NOTES_NOTE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLIP_NOTES_TYPE_NOTE, ClipNotesNoteClass))
#define CLIP_NOTES_IS_NOTE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLIP_NOTES_TYPE_NOTE))
#define CLIP_NOTES_IS_NOTE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLIP_NOTES_TYPE_NOTE))
#define CLIP_NOTES_NOTE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLIP_NOTES_TYPE_NOTE, ClipNotesNoteClass))

typedef struct _ClipNotesNote ClipNotesNote;
typedef struct _ClipNotesNoteClass ClipNotesNoteClass;
typedef struct _ClipNotesNotePrivate ClipNotesNotePrivate;
enum  {
	CLIP_NOTES_NOTE_0_PROPERTY,
	CLIP_NOTES_NOTE_ID_PROPERTY,
	CLIP_NOTES_NOTE_TITLE_PROPERTY,
	CLIP_NOTES_NOTE_URI_PROPERTY,
	CLIP_NOTES_NOTE_CONTENT_PROPERTY,
	CLIP_NOTES_NOTE_NUM_PROPERTIES
};
static GParamSpec* clip_notes_note_properties[CLIP_NOTES_NOTE_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#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 _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))

#define CLIP_NOTES_TYPE_SIDEBAR (clip_notes_sidebar_get_type ())
#define CLIP_NOTES_SIDEBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLIP_NOTES_TYPE_SIDEBAR, ClipNotesSidebar))
#define CLIP_NOTES_SIDEBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLIP_NOTES_TYPE_SIDEBAR, ClipNotesSidebarClass))
#define CLIP_NOTES_IS_SIDEBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLIP_NOTES_TYPE_SIDEBAR))
#define CLIP_NOTES_IS_SIDEBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLIP_NOTES_TYPE_SIDEBAR))
#define CLIP_NOTES_SIDEBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLIP_NOTES_TYPE_SIDEBAR, ClipNotesSidebarClass))

typedef struct _ClipNotesSidebar ClipNotesSidebar;
typedef struct _ClipNotesSidebarClass ClipNotesSidebarClass;
typedef struct _ClipNotesSidebarPrivate ClipNotesSidebarPrivate;
enum  {
	CLIP_NOTES_SIDEBAR_0_PROPERTY,
	CLIP_NOTES_SIDEBAR_NUM_PROPERTIES
};
static GParamSpec* clip_notes_sidebar_properties[CLIP_NOTES_SIDEBAR_NUM_PROPERTIES];
#define _gtk_tree_path_free0(var) ((var == NULL) ? NULL : (var = (gtk_tree_path_free (var), NULL)))
typedef struct _Block1Data Block1Data;
typedef struct _Block2Data Block2Data;

#define CLIP_NOTES_TYPE_MANAGER (clip_notes_manager_get_type ())
#define CLIP_NOTES_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLIP_NOTES_TYPE_MANAGER, ClipNotesManager))
#define CLIP_NOTES_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLIP_NOTES_TYPE_MANAGER, ClipNotesManagerClass))
#define CLIP_NOTES_IS_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLIP_NOTES_TYPE_MANAGER))
#define CLIP_NOTES_IS_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLIP_NOTES_TYPE_MANAGER))
#define CLIP_NOTES_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLIP_NOTES_TYPE_MANAGER, ClipNotesManagerClass))

typedef struct _ClipNotesManager ClipNotesManager;
typedef struct _ClipNotesManagerClass ClipNotesManagerClass;
typedef struct _ClipNotesManagerPrivate ClipNotesManagerPrivate;
enum  {
	CLIP_NOTES_MANAGER_0_PROPERTY,
	CLIP_NOTES_MANAGER_NUM_PROPERTIES
};
static GParamSpec* clip_notes_manager_properties[CLIP_NOTES_MANAGER_NUM_PROPERTIES];
#define __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))
typedef struct _Block3Data Block3Data;
#define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL)))

struct _ClipNotesNote {
	GObject parent_instance;
	ClipNotesNotePrivate * priv;
};

struct _ClipNotesNoteClass {
	GObjectClass parent_class;
};

struct _ClipNotesNotePrivate {
	gint64 _id;
	gchar* _title;
	gchar* _uri;
	gchar* _content;
};

struct _ClipNotesSidebar {
	GtkVBox parent_instance;
	ClipNotesSidebarPrivate * priv;
};

struct _ClipNotesSidebarClass {
	GtkVBoxClass parent_class;
};

struct _ClipNotesSidebarPrivate {
	GtkToolbar* toolbar;
	GtkLabel* note_label;
	GtkTreeView* notes_tree_view;
	GtkTextView* note_text_view;
};

struct _Block1Data {
	int _ref_count_;
	ClipNotesSidebar* self;
	GtkTreePath* path;
};

struct _Block2Data {
	int _ref_count_;
	Block1Data * _data1_;
	ClipNotesNote* note;
};

struct _ClipNotesManager {
	MidoriExtension parent_instance;
	ClipNotesManagerPrivate * priv;
	GList* widgets;
};

struct _ClipNotesManagerClass {
	MidoriExtensionClass parent_class;
};

struct _Block3Data {
	int _ref_count_;
	ClipNotesManager* self;
	MidoriView* view;
};


extern MidoriDatabase* clip_notes_database;
MidoriDatabase* clip_notes_database = NULL;
extern sqlite3* clip_notes_db;
sqlite3* clip_notes_db = NULL;
extern GtkListStore* clip_notes_notes_list_store;
GtkListStore* clip_notes_notes_list_store = NULL;
extern ClipNotesNote* clip_notes_current_note;
ClipNotesNote* clip_notes_current_note = NULL;
static gpointer clip_notes_note_parent_class = NULL;
static gpointer clip_notes_sidebar_parent_class = NULL;
static MidoriViewableIface * clip_notes_sidebar_midori_viewable_parent_iface = NULL;
static gpointer clip_notes_manager_parent_class = NULL;

GType clip_notes_note_get_type (void) G_GNUC_CONST;
#define CLIP_NOTES_NOTE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CLIP_NOTES_TYPE_NOTE, ClipNotesNotePrivate))
void clip_notes_note_add (ClipNotesNote* self, const gchar* title, const gchar* uri, const gchar* note_content);
void clip_notes_append_note (ClipNotesNote* note);
void clip_notes_note_set_id (ClipNotesNote* self, gint64 value);
void clip_notes_note_set_uri (ClipNotesNote* self, const gchar* value);
void clip_notes_note_set_title (ClipNotesNote* self, const gchar* value);
void clip_notes_note_set_content (ClipNotesNote* self, const gchar* value);
void clip_notes_note_remove (ClipNotesNote* self);
gint64 clip_notes_note_get_id (ClipNotesNote* self);
void clip_notes_remove_note (gint64 id);
void clip_notes_note_rename (ClipNotesNote* self, const gchar* new_title);
void clip_notes_note_update (ClipNotesNote* self, const gchar* new_content);
ClipNotesNote* clip_notes_note_new (void);
ClipNotesNote* clip_notes_note_construct (GType object_type);
const gchar* clip_notes_note_get_title (ClipNotesNote* self);
const gchar* clip_notes_note_get_uri (ClipNotesNote* self);
const gchar* clip_notes_note_get_content (ClipNotesNote* self);
static void clip_notes_note_finalize (GObject * obj);
static void _vala_clip_notes_note_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_clip_notes_note_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
GType clip_notes_sidebar_get_type (void) G_GNUC_CONST;
#define CLIP_NOTES_SIDEBAR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CLIP_NOTES_TYPE_SIDEBAR, ClipNotesSidebarPrivate))
static const gchar* clip_notes_sidebar_real_get_stock_id (MidoriViewable* base);
static const gchar* clip_notes_sidebar_real_get_label (MidoriViewable* base);
static GtkWidget* clip_notes_sidebar_real_get_toolbar (MidoriViewable* base);
static void ___lambda4_ (ClipNotesSidebar* self);
static void ____lambda4__gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self);
void clip_notes_sidebar_title_edited (ClipNotesSidebar* self, GtkCellRendererText* renderer, const gchar* path_str, const gchar* new_title);
ClipNotesSidebar* clip_notes_sidebar_new (void);
ClipNotesSidebar* clip_notes_sidebar_construct (GType object_type);
static gboolean clip_notes_sidebar_button_pressed (ClipNotesSidebar* self, GdkEventButton* event);
static gboolean _clip_notes_sidebar_button_pressed_gtk_widget_button_press_event (GtkWidget* _sender, GdkEventButton* event, gpointer self);
static void clip_notes_sidebar_selection_changed (ClipNotesSidebar* self, GtkTreeSelection* selection);
static void _clip_notes_sidebar_selection_changed_gtk_tree_selection_changed (GtkTreeSelection* _sender, gpointer self);
static gint clip_notes_sidebar_tree_sort_func (ClipNotesSidebar* self, GtkTreeModel* model, GtkTreeIter* a, GtkTreeIter* b);
static gint _clip_notes_sidebar_tree_sort_func_gtk_tree_iter_compare_func (GtkTreeModel* model, GtkTreeIter* a, GtkTreeIter* b, gpointer self);
static void clip_notes_sidebar_on_render_icon (ClipNotesSidebar* self, GtkCellLayout* column, GtkCellRenderer* renderer, GtkTreeModel* model, GtkTreeIter* iter);
static void _clip_notes_sidebar_on_render_icon_gtk_cell_layout_data_func (GtkCellLayout* cell_layout, GtkCellRenderer* cell, GtkTreeModel* tree_model, GtkTreeIter* iter, gpointer self);
static void _clip_notes_sidebar_title_edited_gtk_cell_renderer_text_edited (GtkCellRendererText* _sender, const gchar* path, const gchar* new_text, gpointer self);
static void clip_notes_sidebar_on_render_note_title (ClipNotesSidebar* self, GtkCellLayout* column, GtkCellRenderer* renderer, GtkTreeModel* model, GtkTreeIter* iter);
static void _clip_notes_sidebar_on_render_note_title_gtk_cell_layout_data_func (GtkCellLayout* cell_layout, GtkCellRenderer* cell, GtkTreeModel* tree_model, GtkTreeIter* iter, gpointer self);
static gboolean clip_notes_sidebar_focus_lost (ClipNotesSidebar* self, GdkEventFocus* event);
static gboolean _clip_notes_sidebar_focus_lost_gtk_widget_focus_out_event (GtkWidget* _sender, GdkEventFocus* event, gpointer self);
static void clip_notes_sidebar_save_current_note (ClipNotesSidebar* self);
static gboolean clip_notes_sidebar_show_note_content (ClipNotesSidebar* self, GtkTreeSelection* selection);
static gboolean clip_notes_sidebar_show_note_webpage_in_new_tab (ClipNotesSidebar* self, GdkEventButton* event, gboolean new_tab);
static gboolean clip_notes_sidebar_show_popup_menu (ClipNotesSidebar* self, GdkEventButton* event);
static Block1Data* block1_data_ref (Block1Data* _data1_);
static void block1_data_unref (void * _userdata_);
static Block2Data* block2_data_ref (Block2Data* _data2_);
static void block2_data_unref (void * _userdata_);
static void ___lambda5_ (Block2Data* _data2_);
static void ____lambda5__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self);
static void ___lambda6_ (Block2Data* _data2_);
static void ____lambda6__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self);
static void ___lambda7_ (Block2Data* _data2_);
static void ____lambda7__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self);
static void clip_notes_sidebar_finalize (GObject * obj);
GType clip_notes_manager_get_type (void) G_GNUC_CONST;
static void _g_object_unref0_ (gpointer var);
static inline void _g_list_free__g_object_unref0_ (GList* self);
static void clip_notes_manager_tab_added (ClipNotesManager* self, MidoriBrowser* browser, MidoriTab* tab);
static void clip_notes_manager_add_menu_items (ClipNotesManager* self, MidoriTab* tab, WebKitHitTestResult* hit_test_result, MidoriContextAction* menu);
static void _clip_notes_manager_add_menu_items_midori_tab_context_menu (MidoriTab* _sender, WebKitHitTestResult* hit_test_result, MidoriContextAction* menu, gpointer self);
static Block3Data* block3_data_ref (Block3Data* _data3_);
static void block3_data_unref (void * _userdata_);
static void __lambda8_ (Block3Data* _data3_, GtkAction* action);
static void ___lambda8__gtk_action_activate (GtkAction* _sender, gpointer self);
static void clip_notes_manager_browser_added (ClipNotesManager* self, MidoriBrowser* browser);
static void _clip_notes_manager_tab_added_midori_browser_add_tab (MidoriBrowser* _sender, MidoriView* tab, gpointer self);
static void clip_notes_manager_activated (ClipNotesManager* self, MidoriApp* app);
static void _clip_notes_manager_browser_added_midori_app_add_browser (MidoriApp* _sender, MidoriBrowser* browser, gpointer self);
static void clip_notes_manager_deactivated (ClipNotesManager* self);
ClipNotesManager* clip_notes_manager_new (void);
ClipNotesManager* clip_notes_manager_construct (GType object_type);
static void _clip_notes_manager_activated_midori_extension_activate (MidoriExtension* _sender, MidoriApp* app, gpointer self);
static void _clip_notes_manager_deactivated_midori_extension_deactivate (MidoriExtension* _sender, gpointer self);
static void clip_notes_manager_finalize (GObject * obj);


void clip_notes_note_add (ClipNotesNote* self, const gchar* title, const gchar* uri, const gchar* note_content) {
	GDateTime* time = NULL;
	GDateTime* _tmp0_;
	gchar* sqlcmd = NULL;
	gchar* _tmp1_;
	MidoriDatabaseStatement* statement = NULL;
	sqlite3* _tmp15_;
	gint64 _tmp16_;
	const gchar* _tmp17_;
	const gchar* _tmp18_;
	const gchar* _tmp19_;
	GError * _inner_error_ = NULL;
#line 25 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_if_fail (self != NULL);
#line 25 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_if_fail (title != NULL);
#line 25 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_if_fail (note_content != NULL);
#line 27 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp0_ = g_date_time_new_now_local ();
#line 27 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	time = _tmp0_;
#line 28 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp1_ = g_strdup ("INSERT INTO `notes` (`uri`, `title`, `note_content`, `tstamp` ) VALUES" \
" (:uri, :title, :note_content, :tstamp);");
#line 28 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	sqlcmd = _tmp1_;
#line 281 "notes.c"
	{
		MidoriDatabaseStatement* _tmp2_ = NULL;
		MidoriDatabase* _tmp3_;
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		GDateTime* _tmp8_;
		gint64 _tmp9_;
		MidoriDatabaseStatement* _tmp10_;
		MidoriDatabaseStatement* _tmp11_;
		MidoriDatabaseStatement* _tmp12_;
#line 31 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp3_ = clip_notes_database;
#line 31 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp4_ = sqlcmd;
#line 31 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp5_ = uri;
#line 31 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp6_ = title;
#line 31 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp7_ = note_content;
#line 31 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp8_ = time;
#line 31 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp9_ = g_date_time_to_unix (_tmp8_);
#line 31 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp10_ = midori_database_prepare (_tmp3_, _tmp4_, &_inner_error_, ":uri", G_TYPE_STRING, _tmp5_, ":title", G_TYPE_STRING, _tmp6_, ":note_content", G_TYPE_STRING, _tmp7_, ":tstamp", G_TYPE_INT64, _tmp9_, NULL);
#line 31 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp2_ = _tmp10_;
#line 31 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 314 "notes.c"
			goto __catch0_g_error;
		}
#line 31 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp11_ = _tmp2_;
#line 31 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp2_ = NULL;
#line 31 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_object_unref0 (statement);
#line 31 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		statement = _tmp11_;
#line 37 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp12_ = statement;
#line 37 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		midori_database_statement_step (_tmp12_, &_inner_error_);
#line 37 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 37 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_g_object_unref0 (_tmp2_);
#line 333 "notes.c"
			goto __catch0_g_error;
		}
#line 39 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		clip_notes_append_note (self);
#line 30 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_object_unref0 (_tmp2_);
#line 340 "notes.c"
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* _error_ = NULL;
		GError* _tmp13_;
		const gchar* _tmp14_;
#line 30 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_error_ = _inner_error_;
#line 30 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_inner_error_ = NULL;
#line 41 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp13_ = _error_;
#line 41 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp14_ = _tmp13_->message;
#line 41 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		g_critical (_ ("Failed to add new note to database: %s\n"), _tmp14_);
#line 30 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_error_free0 (_error_);
#line 360 "notes.c"
	}
	__finally0:
#line 30 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 30 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_object_unref0 (statement);
#line 30 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_free0 (sqlcmd);
#line 30 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_date_time_unref0 (time);
#line 30 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.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 30 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		g_clear_error (&_inner_error_);
#line 30 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		return;
#line 377 "notes.c"
	}
#line 44 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp15_ = clip_notes_db;
#line 44 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp16_ = sqlite3_last_insert_rowid (_tmp15_);
#line 44 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	clip_notes_note_set_id (self, _tmp16_);
#line 45 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp17_ = uri;
#line 45 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	clip_notes_note_set_uri (self, _tmp17_);
#line 46 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp18_ = title;
#line 46 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	clip_notes_note_set_title (self, _tmp18_);
#line 47 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp19_ = note_content;
#line 47 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	clip_notes_note_set_content (self, _tmp19_);
#line 25 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_g_object_unref0 (statement);
#line 25 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_g_free0 (sqlcmd);
#line 25 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_g_date_time_unref0 (time);
#line 403 "notes.c"
}


void clip_notes_note_remove (ClipNotesNote* self) {
	gchar* sqlcmd = NULL;
	gchar* _tmp0_;
	MidoriDatabaseStatement* statement = NULL;
	GError * _inner_error_ = NULL;
#line 50 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_if_fail (self != NULL);
#line 52 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp0_ = g_strdup ("DELETE FROM `notes` WHERE id= :id;");
#line 52 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	sqlcmd = _tmp0_;
#line 418 "notes.c"
	{
		MidoriDatabaseStatement* _tmp1_ = NULL;
		MidoriDatabase* _tmp2_;
		const gchar* _tmp3_;
		gint64 _tmp4_;
		MidoriDatabaseStatement* _tmp5_;
		MidoriDatabaseStatement* _tmp6_;
		MidoriDatabaseStatement* _tmp7_;
		gint64 _tmp8_;
#line 55 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp2_ = clip_notes_database;
#line 55 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp3_ = sqlcmd;
#line 55 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp4_ = self->priv->_id;
#line 55 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp5_ = midori_database_prepare (_tmp2_, _tmp3_, &_inner_error_, ":id", G_TYPE_INT64, _tmp4_, NULL);
#line 55 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp1_ = _tmp5_;
#line 55 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 440 "notes.c"
			goto __catch1_g_error;
		}
#line 55 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp6_ = _tmp1_;
#line 55 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp1_ = NULL;
#line 55 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_object_unref0 (statement);
#line 55 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		statement = _tmp6_;
#line 58 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp7_ = statement;
#line 58 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		midori_database_statement_step (_tmp7_, &_inner_error_);
#line 58 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 58 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_g_object_unref0 (_tmp1_);
#line 459 "notes.c"
			goto __catch1_g_error;
		}
#line 59 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp8_ = self->priv->_id;
#line 59 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		clip_notes_remove_note (_tmp8_);
#line 54 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_object_unref0 (_tmp1_);
#line 468 "notes.c"
	}
	goto __finally1;
	__catch1_g_error:
	{
		GError* _error_ = NULL;
		GError* _tmp9_;
		const gchar* _tmp10_;
#line 54 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_error_ = _inner_error_;
#line 54 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_inner_error_ = NULL;
#line 61 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp9_ = _error_;
#line 61 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp10_ = _tmp9_->message;
#line 61 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		g_critical (_ ("Falied to remove note from database: %s\n"), _tmp10_);
#line 54 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_error_free0 (_error_);
#line 488 "notes.c"
	}
	__finally1:
#line 54 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 54 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_object_unref0 (statement);
#line 54 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_free0 (sqlcmd);
#line 54 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.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 54 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		g_clear_error (&_inner_error_);
#line 54 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		return;
#line 503 "notes.c"
	}
#line 50 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_g_object_unref0 (statement);
#line 50 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_g_free0 (sqlcmd);
#line 509 "notes.c"
}


void clip_notes_note_rename (ClipNotesNote* self, const gchar* new_title) {
	gchar* sqlcmd = NULL;
	gchar* _tmp0_;
	MidoriDatabaseStatement* statement = NULL;
	const gchar* _tmp11_;
	GError * _inner_error_ = NULL;
#line 65 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_if_fail (self != NULL);
#line 65 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_if_fail (new_title != NULL);
#line 67 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp0_ = g_strdup ("UPDATE `notes` SET title= :title WHERE id = :id;");
#line 67 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	sqlcmd = _tmp0_;
#line 527 "notes.c"
	{
		MidoriDatabaseStatement* _tmp1_ = NULL;
		MidoriDatabase* _tmp2_;
		const gchar* _tmp3_;
		gint64 _tmp4_;
		const gchar* _tmp5_;
		MidoriDatabaseStatement* _tmp6_;
		MidoriDatabaseStatement* _tmp7_;
		MidoriDatabaseStatement* _tmp8_;
#line 70 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp2_ = clip_notes_database;
#line 70 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp3_ = sqlcmd;
#line 70 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp4_ = self->priv->_id;
#line 70 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp5_ = new_title;
#line 70 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp6_ = midori_database_prepare (_tmp2_, _tmp3_, &_inner_error_, ":id", G_TYPE_INT64, _tmp4_, ":title", G_TYPE_STRING, _tmp5_, NULL);
#line 70 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp1_ = _tmp6_;
#line 70 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 551 "notes.c"
			goto __catch2_g_error;
		}
#line 70 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp7_ = _tmp1_;
#line 70 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp1_ = NULL;
#line 70 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_object_unref0 (statement);
#line 70 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		statement = _tmp7_;
#line 73 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp8_ = statement;
#line 73 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		midori_database_statement_step (_tmp8_, &_inner_error_);
#line 73 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 73 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_g_object_unref0 (_tmp1_);
#line 570 "notes.c"
			goto __catch2_g_error;
		}
#line 69 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_object_unref0 (_tmp1_);
#line 575 "notes.c"
	}
	goto __finally2;
	__catch2_g_error:
	{
		GError* _error_ = NULL;
		GError* _tmp9_;
		const gchar* _tmp10_;
#line 69 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_error_ = _inner_error_;
#line 69 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_inner_error_ = NULL;
#line 75 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp9_ = _error_;
#line 75 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp10_ = _tmp9_->message;
#line 75 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		g_critical (_ ("Falied to rename note: %s\n"), _tmp10_);
#line 69 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_error_free0 (_error_);
#line 595 "notes.c"
	}
	__finally2:
#line 69 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 69 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_object_unref0 (statement);
#line 69 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_free0 (sqlcmd);
#line 69 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.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 69 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		g_clear_error (&_inner_error_);
#line 69 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		return;
#line 610 "notes.c"
	}
#line 78 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp11_ = new_title;
#line 78 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	clip_notes_note_set_title (self, _tmp11_);
#line 65 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_g_object_unref0 (statement);
#line 65 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_g_free0 (sqlcmd);
#line 620 "notes.c"
}


void clip_notes_note_update (ClipNotesNote* self, const gchar* new_content) {
	gchar* sqlcmd = NULL;
	gchar* _tmp0_;
	MidoriDatabaseStatement* statement = NULL;
	const gchar* _tmp11_;
	GError * _inner_error_ = NULL;
#line 81 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_if_fail (self != NULL);
#line 81 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_if_fail (new_content != NULL);
#line 83 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp0_ = g_strdup ("UPDATE `notes` SET note_content= :content WHERE id = :id;");
#line 83 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	sqlcmd = _tmp0_;
#line 638 "notes.c"
	{
		MidoriDatabaseStatement* _tmp1_ = NULL;
		MidoriDatabase* _tmp2_;
		const gchar* _tmp3_;
		gint64 _tmp4_;
		const gchar* _tmp5_;
		MidoriDatabaseStatement* _tmp6_;
		MidoriDatabaseStatement* _tmp7_;
		MidoriDatabaseStatement* _tmp8_;
#line 86 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp2_ = clip_notes_database;
#line 86 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp3_ = sqlcmd;
#line 86 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp4_ = self->priv->_id;
#line 86 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp5_ = new_content;
#line 86 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp6_ = midori_database_prepare (_tmp2_, _tmp3_, &_inner_error_, ":id", G_TYPE_INT64, _tmp4_, ":content", G_TYPE_STRING, _tmp5_, NULL);
#line 86 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp1_ = _tmp6_;
#line 86 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 662 "notes.c"
			goto __catch3_g_error;
		}
#line 86 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp7_ = _tmp1_;
#line 86 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp1_ = NULL;
#line 86 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_object_unref0 (statement);
#line 86 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		statement = _tmp7_;
#line 89 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp8_ = statement;
#line 89 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		midori_database_statement_step (_tmp8_, &_inner_error_);
#line 89 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 89 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_g_object_unref0 (_tmp1_);
#line 681 "notes.c"
			goto __catch3_g_error;
		}
#line 85 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_object_unref0 (_tmp1_);
#line 686 "notes.c"
	}
	goto __finally3;
	__catch3_g_error:
	{
		GError* _error_ = NULL;
		GError* _tmp9_;
		const gchar* _tmp10_;
#line 85 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_error_ = _inner_error_;
#line 85 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_inner_error_ = NULL;
#line 91 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp9_ = _error_;
#line 91 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp10_ = _tmp9_->message;
#line 91 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		g_critical (_ ("Falied to update note: %s\n"), _tmp10_);
#line 85 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_error_free0 (_error_);
#line 706 "notes.c"
	}
	__finally3:
#line 85 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 85 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_object_unref0 (statement);
#line 85 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_free0 (sqlcmd);
#line 85 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.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 85 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		g_clear_error (&_inner_error_);
#line 85 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		return;
#line 721 "notes.c"
	}
#line 93 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp11_ = new_content;
#line 93 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	clip_notes_note_set_content (self, _tmp11_);
#line 81 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_g_object_unref0 (statement);
#line 81 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_g_free0 (sqlcmd);
#line 731 "notes.c"
}


ClipNotesNote* clip_notes_note_construct (GType object_type) {
	ClipNotesNote * self = NULL;
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	self = (ClipNotesNote*) g_object_new (object_type, NULL);
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	return self;
#line 741 "notes.c"
}


ClipNotesNote* clip_notes_note_new (void) {
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	return clip_notes_note_construct (CLIP_NOTES_TYPE_NOTE);
#line 748 "notes.c"
}


gint64 clip_notes_note_get_id (ClipNotesNote* self) {
	gint64 result;
	gint64 _tmp0_;
#line 20 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_val_if_fail (self != NULL, 0LL);
#line 20 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp0_ = self->priv->_id;
#line 20 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	result = _tmp0_;
#line 20 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	return result;
#line 763 "notes.c"
}


void clip_notes_note_set_id (ClipNotesNote* self, gint64 value) {
#line 20 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_if_fail (self != NULL);
#line 20 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	if (clip_notes_note_get_id (self) != value) {
#line 772 "notes.c"
		gint64 _tmp0_;
#line 20 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp0_ = value;
#line 20 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		self->priv->_id = _tmp0_;
#line 20 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		g_object_notify_by_pspec ((GObject *) self, clip_notes_note_properties[CLIP_NOTES_NOTE_ID_PROPERTY]);
#line 780 "notes.c"
	}
}


const gchar* clip_notes_note_get_title (ClipNotesNote* self) {
	const gchar* result;
	const gchar* _tmp0_;
#line 21 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 21 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp0_ = self->priv->_title;
#line 21 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	result = _tmp0_;
#line 21 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	return result;
#line 796 "notes.c"
}


void clip_notes_note_set_title (ClipNotesNote* self, const gchar* value) {
#line 21 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.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/notes.vala"
	if (g_strcmp0 (value, clip_notes_note_get_title (self)) != 0) {
#line 805 "notes.c"
		const gchar* _tmp0_;
		gchar* _tmp1_;
#line 21 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp0_ = value;
#line 21 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp1_ = g_strdup (_tmp0_);
#line 21 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_free0 (self->priv->_title);
#line 21 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		self->priv->_title = _tmp1_;
#line 21 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		g_object_notify_by_pspec ((GObject *) self, clip_notes_note_properties[CLIP_NOTES_NOTE_TITLE_PROPERTY]);
#line 818 "notes.c"
	}
}


const gchar* clip_notes_note_get_uri (ClipNotesNote* self) {
	const gchar* result;
	const gchar* _tmp0_;
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp0_ = self->priv->_uri;
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	result = _tmp0_;
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	return result;
#line 834 "notes.c"
}


void clip_notes_note_set_uri (ClipNotesNote* self, const gchar* value) {
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.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/notes.vala"
	if (g_strcmp0 (value, clip_notes_note_get_uri (self)) != 0) {
#line 843 "notes.c"
		const gchar* _tmp0_;
		gchar* _tmp1_;
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp0_ = value;
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp1_ = g_strdup (_tmp0_);
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_free0 (self->priv->_uri);
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		self->priv->_uri = _tmp1_;
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		g_object_notify_by_pspec ((GObject *) self, clip_notes_note_properties[CLIP_NOTES_NOTE_URI_PROPERTY]);
#line 856 "notes.c"
	}
}


const gchar* clip_notes_note_get_content (ClipNotesNote* self) {
	const gchar* result;
	const gchar* _tmp0_;
#line 23 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 23 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp0_ = self->priv->_content;
#line 23 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	result = _tmp0_;
#line 23 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	return result;
#line 872 "notes.c"
}


void clip_notes_note_set_content (ClipNotesNote* self, const gchar* value) {
#line 23 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_if_fail (self != NULL);
#line 23 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	if (g_strcmp0 (value, clip_notes_note_get_content (self)) != 0) {
#line 881 "notes.c"
		const gchar* _tmp0_;
		gchar* _tmp1_;
#line 23 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp0_ = value;
#line 23 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp1_ = g_strdup (_tmp0_);
#line 23 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_free0 (self->priv->_content);
#line 23 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		self->priv->_content = _tmp1_;
#line 23 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		g_object_notify_by_pspec ((GObject *) self, clip_notes_note_properties[CLIP_NOTES_NOTE_CONTENT_PROPERTY]);
#line 894 "notes.c"
	}
}


static void clip_notes_note_class_init (ClipNotesNoteClass * klass) {
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	clip_notes_note_parent_class = g_type_class_peek_parent (klass);
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_type_class_add_private (klass, sizeof (ClipNotesNotePrivate));
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_clip_notes_note_get_property;
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_clip_notes_note_set_property;
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	G_OBJECT_CLASS (klass)->finalize = clip_notes_note_finalize;
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), CLIP_NOTES_NOTE_ID_PROPERTY, clip_notes_note_properties[CLIP_NOTES_NOTE_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 | G_PARAM_WRITABLE));
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), CLIP_NOTES_NOTE_TITLE_PROPERTY, clip_notes_note_properties[CLIP_NOTES_NOTE_TITLE_PROPERTY] = g_param_spec_string ("title", "title", "title", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), CLIP_NOTES_NOTE_URI_PROPERTY, clip_notes_note_properties[CLIP_NOTES_NOTE_URI_PROPERTY] = g_param_spec_string ("uri", "uri", "uri", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), CLIP_NOTES_NOTE_CONTENT_PROPERTY, clip_notes_note_properties[CLIP_NOTES_NOTE_CONTENT_PROPERTY] = g_param_spec_string ("content", "content", "content", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 918 "notes.c"
}


static void clip_notes_note_instance_init (ClipNotesNote * self) {
	gchar* _tmp0_;
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	self->priv = CLIP_NOTES_NOTE_GET_PRIVATE (self);
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	self->priv->_uri = NULL;
#line 23 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp0_ = g_strdup ("");
#line 23 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	self->priv->_content = _tmp0_;
#line 932 "notes.c"
}


static void clip_notes_note_finalize (GObject * obj) {
	ClipNotesNote * self;
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, CLIP_NOTES_TYPE_NOTE, ClipNotesNote);
#line 21 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_g_free0 (self->priv->_title);
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_g_free0 (self->priv->_uri);
#line 23 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_g_free0 (self->priv->_content);
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	G_OBJECT_CLASS (clip_notes_note_parent_class)->finalize (obj);
#line 948 "notes.c"
}


GType clip_notes_note_get_type (void) {
	static volatile gsize clip_notes_note_type_id__volatile = 0;
	if (g_once_init_enter (&clip_notes_note_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ClipNotesNoteClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) clip_notes_note_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ClipNotesNote), 0, (GInstanceInitFunc) clip_notes_note_instance_init, NULL };
		GType clip_notes_note_type_id;
		clip_notes_note_type_id = g_type_register_static (G_TYPE_OBJECT, "ClipNotesNote", &g_define_type_info, 0);
		g_once_init_leave (&clip_notes_note_type_id__volatile, clip_notes_note_type_id);
	}
	return clip_notes_note_type_id__volatile;
}


static void _vala_clip_notes_note_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	ClipNotesNote * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, CLIP_NOTES_TYPE_NOTE, ClipNotesNote);
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	switch (property_id) {
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		case CLIP_NOTES_NOTE_ID_PROPERTY:
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		g_value_set_int64 (value, clip_notes_note_get_id (self));
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		break;
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		case CLIP_NOTES_NOTE_TITLE_PROPERTY:
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		g_value_set_string (value, clip_notes_note_get_title (self));
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		break;
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		case CLIP_NOTES_NOTE_URI_PROPERTY:
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		g_value_set_string (value, clip_notes_note_get_uri (self));
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		break;
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		case CLIP_NOTES_NOTE_CONTENT_PROPERTY:
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		g_value_set_string (value, clip_notes_note_get_content (self));
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		break;
#line 993 "notes.c"
		default:
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		break;
#line 999 "notes.c"
	}
}


static void _vala_clip_notes_note_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	ClipNotesNote * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, CLIP_NOTES_TYPE_NOTE, ClipNotesNote);
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	switch (property_id) {
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		case CLIP_NOTES_NOTE_ID_PROPERTY:
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		clip_notes_note_set_id (self, g_value_get_int64 (value));
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		break;
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		case CLIP_NOTES_NOTE_TITLE_PROPERTY:
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		clip_notes_note_set_title (self, g_value_get_string (value));
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		break;
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		case CLIP_NOTES_NOTE_URI_PROPERTY:
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		clip_notes_note_set_uri (self, g_value_get_string (value));
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		break;
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		case CLIP_NOTES_NOTE_CONTENT_PROPERTY:
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		clip_notes_note_set_content (self, g_value_get_string (value));
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		break;
#line 1033 "notes.c"
		default:
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 19 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		break;
#line 1039 "notes.c"
	}
}


static gchar* string_replace (const gchar* self, const gchar* old, const gchar* replacement) {
	gchar* result = NULL;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	GError * _inner_error_ = NULL;
#line 1415 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, NULL);
#line 1415 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	g_return_val_if_fail (old != NULL, NULL);
#line 1415 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	g_return_val_if_fail (replacement != NULL, NULL);
#line 1416 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	if ((*((gchar*) self)) == '\0') {
#line 1416 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		_tmp1_ = TRUE;
#line 1059 "notes.c"
	} else {
		const gchar* _tmp2_;
#line 1416 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		_tmp2_ = old;
#line 1416 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		_tmp1_ = (*((gchar*) _tmp2_)) == '\0';
#line 1066 "notes.c"
	}
#line 1416 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	if (_tmp1_) {
#line 1416 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		_tmp0_ = TRUE;
#line 1072 "notes.c"
	} else {
		const gchar* _tmp3_;
		const gchar* _tmp4_;
#line 1416 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		_tmp3_ = old;
#line 1416 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		_tmp4_ = replacement;
#line 1416 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		_tmp0_ = g_strcmp0 (_tmp3_, _tmp4_) == 0;
#line 1082 "notes.c"
	}
#line 1416 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	if (_tmp0_) {
#line 1086 "notes.c"
		gchar* _tmp5_;
#line 1417 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		_tmp5_ = g_strdup (self);
#line 1417 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		result = _tmp5_;
#line 1417 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		return result;
#line 1094 "notes.c"
	}
	{
		GRegex* regex = NULL;
		const gchar* _tmp6_;
		gchar* _tmp7_;
		gchar* _tmp8_;
		GRegex* _tmp9_;
		GRegex* _tmp10_;
		gchar* _tmp11_ = NULL;
		GRegex* _tmp12_;
		const gchar* _tmp13_;
		gchar* _tmp14_;
		gchar* _tmp15_;
#line 1420 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		_tmp6_ = old;
#line 1420 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		_tmp7_ = g_regex_escape_string (_tmp6_, -1);
#line 1420 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		_tmp8_ = _tmp7_;
#line 1420 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		_tmp9_ = g_regex_new (_tmp8_, 0, 0, &_inner_error_);
#line 1420 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		_tmp10_ = _tmp9_;
#line 1420 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		_g_free0 (_tmp8_);
#line 1420 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		regex = _tmp10_;
#line 1420 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1420 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
			if (_inner_error_->domain == G_REGEX_ERROR) {
#line 1126 "notes.c"
				goto __catch4_g_regex_error;
			}
#line 1420 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
			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 1420 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
			g_clear_error (&_inner_error_);
#line 1420 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
			return NULL;
#line 1135 "notes.c"
		}
#line 1421 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		_tmp12_ = regex;
#line 1421 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		_tmp13_ = replacement;
#line 1421 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		_tmp14_ = g_regex_replace_literal (_tmp12_, self, (gssize) -1, 0, _tmp13_, 0, &_inner_error_);
#line 1421 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		_tmp11_ = _tmp14_;
#line 1421 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1421 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
			_g_regex_unref0 (regex);
#line 1421 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
			if (_inner_error_->domain == G_REGEX_ERROR) {
#line 1151 "notes.c"
				goto __catch4_g_regex_error;
			}
#line 1421 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
			_g_regex_unref0 (regex);
#line 1421 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
			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 1421 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
			g_clear_error (&_inner_error_);
#line 1421 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
			return NULL;
#line 1162 "notes.c"
		}
#line 1421 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		_tmp15_ = _tmp11_;
#line 1421 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		_tmp11_ = NULL;
#line 1421 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		result = _tmp15_;
#line 1421 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		_g_free0 (_tmp11_);
#line 1421 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		_g_regex_unref0 (regex);
#line 1421 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		return result;
#line 1176 "notes.c"
	}
	goto __finally4;
	__catch4_g_regex_error:
	{
		GError* e = NULL;
#line 1419 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		e = _inner_error_;
#line 1419 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		_inner_error_ = NULL;
#line 1423 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		g_assert_not_reached ();
#line 1419 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		_g_error_free0 (e);
#line 1190 "notes.c"
	}
	__finally4:
#line 1419 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1419 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		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 1419 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		g_clear_error (&_inner_error_);
#line 1419 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
		return NULL;
#line 1201 "notes.c"
	}
}


void clip_notes_append_note (ClipNotesNote* note) {
	gboolean _tmp0_ = FALSE;
	ClipNotesNote* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	GtkTreeIter iter = {0};
	GtkListStore* _tmp14_;
	GtkTreeIter _tmp15_ = {0};
	GtkListStore* _tmp16_;
	GtkTreeIter _tmp17_;
	ClipNotesNote* _tmp18_;
#line 97 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_if_fail (note != NULL);
#line 100 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp1_ = note;
#line 100 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp2_ = clip_notes_note_get_title (_tmp1_);
#line 100 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp3_ = _tmp2_;
#line 100 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	if (_tmp3_ != NULL) {
#line 1227 "notes.c"
		ClipNotesNote* _tmp4_;
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		gboolean _tmp7_;
#line 100 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp4_ = note;
#line 100 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp5_ = clip_notes_note_get_title (_tmp4_);
#line 100 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp6_ = _tmp5_;
#line 100 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp7_ = g_str_has_prefix (_tmp6_, "‪");
#line 100 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp0_ = _tmp7_;
#line 1242 "notes.c"
	} else {
#line 100 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp0_ = FALSE;
#line 1246 "notes.c"
	}
#line 100 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	if (_tmp0_) {
#line 1250 "notes.c"
		ClipNotesNote* _tmp8_;
		ClipNotesNote* _tmp9_;
		const gchar* _tmp10_;
		const gchar* _tmp11_;
		gchar* _tmp12_;
		gchar* _tmp13_;
#line 101 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp8_ = note;
#line 101 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp9_ = note;
#line 101 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp10_ = clip_notes_note_get_title (_tmp9_);
#line 101 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp11_ = _tmp10_;
#line 101 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp12_ = string_replace (_tmp11_, "‪", "");
#line 101 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp13_ = _tmp12_;
#line 101 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		clip_notes_note_set_title (_tmp8_, _tmp13_);
#line 101 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_free0 (_tmp13_);
#line 1273 "notes.c"
	}
#line 104 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp14_ = clip_notes_notes_list_store;
#line 104 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	gtk_list_store_append (_tmp14_, &_tmp15_);
#line 104 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	iter = _tmp15_;
#line 105 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp16_ = clip_notes_notes_list_store;
#line 105 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp17_ = iter;
#line 105 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp18_ = note;
#line 105 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	gtk_list_store_set (_tmp16_, &_tmp17_, 0, _tmp18_, -1);
#line 1289 "notes.c"
}


void clip_notes_remove_note (gint64 id) {
	GtkTreeIter iter = {0};
	GtkListStore* _tmp0_;
	GtkTreeIter _tmp1_ = {0};
	gboolean _tmp2_;
#line 111 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp0_ = clip_notes_notes_list_store;
#line 111 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp2_ = gtk_tree_model_iter_children ((GtkTreeModel*) _tmp0_, &_tmp1_, NULL);
#line 111 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	iter = _tmp1_;
#line 111 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	if (_tmp2_) {
#line 1306 "notes.c"
		{
			gboolean _tmp3_ = FALSE;
#line 112 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_tmp3_ = TRUE;
#line 112 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			while (TRUE) {
#line 1313 "notes.c"
				ClipNotesNote* note = NULL;
				GtkListStore* _tmp6_;
				GtkTreeIter _tmp7_;
				gint64 _tmp8_;
				ClipNotesNote* _tmp9_;
				gint64 _tmp10_;
				gint64 _tmp11_;
#line 112 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				if (!_tmp3_) {
#line 1323 "notes.c"
					GtkListStore* _tmp4_;
					gboolean _tmp5_;
#line 122 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
					_tmp4_ = clip_notes_notes_list_store;
#line 122 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
					_tmp5_ = gtk_tree_model_iter_next ((GtkTreeModel*) _tmp4_, &iter);
#line 122 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
					if (!_tmp5_) {
#line 122 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
						break;
#line 1334 "notes.c"
					}
				}
#line 112 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				_tmp3_ = FALSE;
#line 114 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				_tmp6_ = clip_notes_notes_list_store;
#line 114 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				_tmp7_ = iter;
#line 114 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				gtk_tree_model_get ((GtkTreeModel*) _tmp6_, &_tmp7_, 0, &note, -1);
#line 115 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				_tmp8_ = id;
#line 115 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				_tmp9_ = note;
#line 115 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				_tmp10_ = clip_notes_note_get_id (_tmp9_);
#line 115 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				_tmp11_ = _tmp10_;
#line 115 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				if (_tmp8_ == _tmp11_) {
#line 1355 "notes.c"
					ClipNotesNote* _tmp12_;
					ClipNotesNote* _tmp13_;
					GtkListStore* _tmp14_;
#line 116 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
					_tmp12_ = clip_notes_current_note;
#line 116 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
					_tmp13_ = note;
#line 116 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
					if (_tmp12_ == _tmp13_) {
#line 117 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
						_g_object_unref0 (clip_notes_current_note);
#line 117 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
						clip_notes_current_note = NULL;
#line 1369 "notes.c"
					}
#line 119 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
					_tmp14_ = clip_notes_notes_list_store;
#line 119 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
					gtk_list_store_remove (_tmp14_, &iter);
#line 120 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
					_g_object_unref0 (note);
#line 120 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
					break;
#line 1379 "notes.c"
				}
#line 112 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				_g_object_unref0 (note);
#line 1383 "notes.c"
			}
		}
	}
}


static const gchar* clip_notes_sidebar_real_get_stock_id (MidoriViewable* base) {
	ClipNotesSidebar * self;
	const gchar* result = NULL;
#line 133 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	self = (ClipNotesSidebar*) base;
#line 134 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	result = GTK_STOCK_EDIT;
#line 134 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	return result;
#line 1399 "notes.c"
}


static const gchar* clip_notes_sidebar_real_get_label (MidoriViewable* base) {
	ClipNotesSidebar * self;
	const gchar* result = NULL;
#line 137 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	self = (ClipNotesSidebar*) base;
#line 138 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	result = _ ("Notes");
#line 138 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	return result;
#line 1412 "notes.c"
}


static void ___lambda4_ (ClipNotesSidebar* self) {
	ClipNotesNote* note = NULL;
	ClipNotesNote* _tmp0_;
#line 151 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp0_ = clip_notes_note_new ();
#line 151 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	note = _tmp0_;
#line 152 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	clip_notes_note_add (note, _ ("New note"), NULL, "");
#line 150 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_g_object_unref0 (note);
#line 1427 "notes.c"
}


static void ____lambda4__gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self) {
#line 150 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	___lambda4_ ((ClipNotesSidebar*) self);
#line 1434 "notes.c"
}


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


static GtkWidget* clip_notes_sidebar_real_get_toolbar (MidoriViewable* base) {
	ClipNotesSidebar * self;
	GtkWidget* result = NULL;
	GtkToolbar* _tmp0_;
	GtkToolbar* _tmp11_;
	GtkWidget* _tmp12_;
#line 141 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	self = (ClipNotesSidebar*) base;
#line 142 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp0_ = self->priv->toolbar;
#line 142 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	if (_tmp0_ == NULL) {
#line 1457 "notes.c"
		GtkToolbar* _tmp1_;
		GtkToolButton* new_note_button = NULL;
		GtkToolButton* _tmp2_;
		GtkToolButton* _tmp3_;
		GtkToolButton* _tmp4_;
		GtkToolButton* _tmp5_;
		GtkToolButton* _tmp6_;
		GtkToolButton* _tmp7_;
		GtkToolButton* _tmp8_;
		GtkToolbar* _tmp9_;
		GtkToolButton* _tmp10_;
#line 143 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp1_ = (GtkToolbar*) gtk_toolbar_new ();
#line 143 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		g_object_ref_sink (_tmp1_);
#line 143 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_object_unref0 (self->priv->toolbar);
#line 143 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		self->priv->toolbar = _tmp1_;
#line 144 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp2_ = (GtkToolButton*) gtk_tool_button_new_from_stock (GTK_STOCK_EDIT);
#line 144 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		g_object_ref_sink (_tmp2_);
#line 144 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		new_note_button = _tmp2_;
#line 145 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp3_ = new_note_button;
#line 145 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		gtk_tool_button_set_label (_tmp3_, _ ("New Note"));
#line 146 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp4_ = new_note_button;
#line 146 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		gtk_widget_set_tooltip_text ((GtkWidget*) _tmp4_, _ ("Creates a new empty note, unrelated to opened pages"));
#line 147 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp5_ = new_note_button;
#line 147 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		gtk_tool_button_set_use_underline (_tmp5_, TRUE);
#line 148 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp6_ = new_note_button;
#line 148 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		gtk_tool_item_set_is_important ((GtkToolItem*) _tmp6_, TRUE);
#line 149 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp7_ = new_note_button;
#line 149 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		gtk_widget_show ((GtkWidget*) _tmp7_);
#line 150 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp8_ = new_note_button;
#line 150 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		g_signal_connect_object (_tmp8_, "clicked", (GCallback) ____lambda4__gtk_tool_button_clicked, self, 0);
#line 154 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp9_ = self->priv->toolbar;
#line 154 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp10_ = new_note_button;
#line 154 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		gtk_toolbar_insert (_tmp9_, (GtkToolItem*) _tmp10_, -1);
#line 142 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_object_unref0 (new_note_button);
#line 1515 "notes.c"
	}
#line 156 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp11_ = self->priv->toolbar;
#line 156 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp12_ = _g_object_ref0 ((GtkWidget*) _tmp11_);
#line 156 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	result = _tmp12_;
#line 156 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	return result;
#line 1525 "notes.c"
}


void clip_notes_sidebar_title_edited (ClipNotesSidebar* self, GtkCellRendererText* renderer, const gchar* path_str, const gchar* new_title) {
	GtkTreePath* path = NULL;
	const gchar* _tmp0_;
	GtkTreePath* _tmp1_;
	GtkTreeIter iter = {0};
	GtkListStore* _tmp2_;
	GtkTreeIter _tmp3_ = {0};
	ClipNotesNote* note = NULL;
	GtkListStore* _tmp4_;
	GtkTreeIter _tmp5_;
	const gchar* _tmp6_;
	GtkListStore* _tmp7_;
	GtkTreeIter _tmp8_;
#line 159 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_if_fail (self != NULL);
#line 159 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_if_fail (renderer != NULL);
#line 160 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp0_ = path_str;
#line 160 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp1_ = gtk_tree_path_new_from_string (_tmp0_);
#line 160 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	path = _tmp1_;
#line 162 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp2_ = clip_notes_notes_list_store;
#line 162 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	gtk_tree_model_get_iter ((GtkTreeModel*) _tmp2_, &_tmp3_, path);
#line 162 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	iter = _tmp3_;
#line 164 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp4_ = clip_notes_notes_list_store;
#line 164 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp5_ = iter;
#line 164 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	gtk_tree_model_get ((GtkTreeModel*) _tmp4_, &_tmp5_, 0, &note, -1);
#line 165 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp6_ = new_title;
#line 165 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	clip_notes_note_rename (note, _tmp6_);
#line 166 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp7_ = clip_notes_notes_list_store;
#line 166 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp8_ = iter;
#line 166 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	gtk_list_store_set (_tmp7_, &_tmp8_, 0, note, -1);
#line 159 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_g_object_unref0 (note);
#line 159 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_gtk_tree_path_free0 (path);
#line 1578 "notes.c"
}


static gboolean _clip_notes_sidebar_button_pressed_gtk_widget_button_press_event (GtkWidget* _sender, GdkEventButton* event, gpointer self) {
	gboolean result;
	result = clip_notes_sidebar_button_pressed ((ClipNotesSidebar*) self, event);
#line 175 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	return result;
#line 1587 "notes.c"
}


static void _clip_notes_sidebar_selection_changed_gtk_tree_selection_changed (GtkTreeSelection* _sender, gpointer self) {
#line 176 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	clip_notes_sidebar_selection_changed ((ClipNotesSidebar*) self, _sender);
#line 1594 "notes.c"
}


static gint _clip_notes_sidebar_tree_sort_func_gtk_tree_iter_compare_func (GtkTreeModel* model, GtkTreeIter* a, GtkTreeIter* b, gpointer self) {
	gint result;
	result = clip_notes_sidebar_tree_sort_func ((ClipNotesSidebar*) self, model, a, b);
#line 179 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	return result;
#line 1603 "notes.c"
}


static void _clip_notes_sidebar_on_render_icon_gtk_cell_layout_data_func (GtkCellLayout* cell_layout, GtkCellRenderer* cell, GtkTreeModel* tree_model, GtkTreeIter* iter, gpointer self) {
#line 184 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	clip_notes_sidebar_on_render_icon ((ClipNotesSidebar*) self, cell_layout, cell, tree_model, iter);
#line 1610 "notes.c"
}


static void _clip_notes_sidebar_title_edited_gtk_cell_renderer_text_edited (GtkCellRendererText* _sender, const gchar* path, const gchar* new_text, gpointer self) {
#line 190 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	clip_notes_sidebar_title_edited ((ClipNotesSidebar*) self, _sender, path, new_text);
#line 1617 "notes.c"
}


static void _clip_notes_sidebar_on_render_note_title_gtk_cell_layout_data_func (GtkCellLayout* cell_layout, GtkCellRenderer* cell, GtkTreeModel* tree_model, GtkTreeIter* iter, gpointer self) {
#line 193 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	clip_notes_sidebar_on_render_note_title ((ClipNotesSidebar*) self, cell_layout, cell, tree_model, iter);
#line 1624 "notes.c"
}


static gboolean _clip_notes_sidebar_focus_lost_gtk_widget_focus_out_event (GtkWidget* _sender, GdkEventFocus* event, gpointer self) {
	gboolean result;
	result = clip_notes_sidebar_focus_lost ((ClipNotesSidebar*) self, event);
#line 221 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	return result;
#line 1633 "notes.c"
}


ClipNotesSidebar* clip_notes_sidebar_construct (GType object_type) {
	ClipNotesSidebar * self = NULL;
	GtkTreeViewColumn* column = NULL;
	GtkListStore* _tmp0_;
	GtkListStore* _tmp1_;
	GtkTreeView* _tmp2_;
	GtkTreeView* _tmp3_;
	GtkTreeView* _tmp4_;
	GtkTreeView* _tmp5_;
	GtkTreeSelection* _tmp6_;
	GtkListStore* _tmp7_;
	GtkListStore* _tmp8_;
	GtkTreeViewColumn* _tmp9_;
	GtkCellRendererPixbuf* renderer_icon = NULL;
	GtkCellRendererPixbuf* _tmp10_;
	GtkTreeViewColumn* _tmp11_;
	GtkCellRendererPixbuf* _tmp12_;
	GtkTreeViewColumn* _tmp13_;
	GtkCellRendererPixbuf* _tmp14_;
	GtkTreeView* _tmp15_;
	GtkTreeViewColumn* _tmp16_;
	GtkTreeViewColumn* _tmp17_;
	GtkCellRendererText* renderer_title = NULL;
	GtkCellRendererText* _tmp18_;
	GtkCellRendererText* _tmp19_;
	GtkCellRendererText* _tmp20_;
	GtkTreeViewColumn* _tmp21_;
	GtkTreeViewColumn* _tmp22_;
	GtkCellRendererText* _tmp23_;
	GtkTreeViewColumn* _tmp24_;
	GtkCellRendererText* _tmp25_;
	GtkTreeView* _tmp26_;
	GtkTreeViewColumn* _tmp27_;
	GtkTreeView* _tmp55_;
	GtkTreeView* _tmp56_;
	GtkLabel* _tmp57_;
	GtkLabel* _tmp58_;
	GtkLabel* _tmp59_;
	GtkTextView* _tmp60_;
	GtkTextView* _tmp61_;
	GtkTextView* _tmp62_;
	GtkTextView* _tmp63_;
	GError * _inner_error_ = NULL;
#line 169 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	self = (ClipNotesSidebar*) g_object_new (object_type, NULL);
#line 172 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp0_ = gtk_list_store_new (1, CLIP_NOTES_TYPE_NOTE);
#line 172 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_g_object_unref0 (clip_notes_notes_list_store);
#line 172 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	clip_notes_notes_list_store = _tmp0_;
#line 173 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp1_ = clip_notes_notes_list_store;
#line 173 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp2_ = (GtkTreeView*) gtk_tree_view_new_with_model ((GtkTreeModel*) _tmp1_);
#line 173 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_object_ref_sink (_tmp2_);
#line 173 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_g_object_unref0 (self->priv->notes_tree_view);
#line 173 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	self->priv->notes_tree_view = _tmp2_;
#line 174 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp3_ = self->priv->notes_tree_view;
#line 174 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	gtk_tree_view_set_headers_visible (_tmp3_, TRUE);
#line 175 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp4_ = self->priv->notes_tree_view;
#line 175 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_signal_connect_object ((GtkWidget*) _tmp4_, "button-press-event", (GCallback) _clip_notes_sidebar_button_pressed_gtk_widget_button_press_event, self, 0);
#line 176 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp5_ = self->priv->notes_tree_view;
#line 176 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp6_ = gtk_tree_view_get_selection (_tmp5_);
#line 176 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_signal_connect_object (_tmp6_, "changed", (GCallback) _clip_notes_sidebar_selection_changed_gtk_tree_selection_changed, self, 0);
#line 178 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp7_ = clip_notes_notes_list_store;
#line 178 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	gtk_tree_sortable_set_sort_column_id ((GtkTreeSortable*) _tmp7_, 0, GTK_SORT_ASCENDING);
#line 179 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp8_ = clip_notes_notes_list_store;
#line 179 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	gtk_tree_sortable_set_sort_func ((GtkTreeSortable*) _tmp8_, 0, _clip_notes_sidebar_tree_sort_func_gtk_tree_iter_compare_func, g_object_ref (self), g_object_unref);
#line 181 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp9_ = gtk_tree_view_column_new ();
#line 181 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_object_ref_sink (_tmp9_);
#line 181 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_g_object_unref0 (column);
#line 181 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	column = _tmp9_;
#line 182 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp10_ = (GtkCellRendererPixbuf*) gtk_cell_renderer_pixbuf_new ();
#line 182 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_object_ref_sink (_tmp10_);
#line 182 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	renderer_icon = _tmp10_;
#line 183 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp11_ = column;
#line 183 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp12_ = renderer_icon;
#line 183 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp11_, (GtkCellRenderer*) _tmp12_, FALSE);
#line 184 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp13_ = column;
#line 184 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp14_ = renderer_icon;
#line 184 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	gtk_cell_layout_set_cell_data_func ((GtkCellLayout*) _tmp13_, (GtkCellRenderer*) _tmp14_, _clip_notes_sidebar_on_render_icon_gtk_cell_layout_data_func, g_object_ref (self), g_object_unref);
#line 185 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp15_ = self->priv->notes_tree_view;
#line 185 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp16_ = column;
#line 185 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	gtk_tree_view_append_column (_tmp15_, _tmp16_);
#line 187 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp17_ = gtk_tree_view_column_new ();
#line 187 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_object_ref_sink (_tmp17_);
#line 187 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_g_object_unref0 (column);
#line 187 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	column = _tmp17_;
#line 188 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp18_ = (GtkCellRendererText*) gtk_cell_renderer_text_new ();
#line 188 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_object_ref_sink (_tmp18_);
#line 188 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	renderer_title = _tmp18_;
#line 189 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp19_ = renderer_title;
#line 189 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_object_set (_tmp19_, "editable", TRUE, NULL);
#line 190 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp20_ = renderer_title;
#line 190 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_signal_connect_object (_tmp20_, "edited", (GCallback) _clip_notes_sidebar_title_edited_gtk_cell_renderer_text_edited, self, 0);
#line 191 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp21_ = column;
#line 191 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	gtk_tree_view_column_set_title (_tmp21_, _ ("Notes"));
#line 192 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp22_ = column;
#line 192 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp23_ = renderer_title;
#line 192 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp22_, (GtkCellRenderer*) _tmp23_, TRUE);
#line 193 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp24_ = column;
#line 193 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp25_ = renderer_title;
#line 193 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	gtk_cell_layout_set_cell_data_func ((GtkCellLayout*) _tmp24_, (GtkCellRenderer*) _tmp25_, _clip_notes_sidebar_on_render_note_title_gtk_cell_layout_data_func, g_object_ref (self), g_object_unref);
#line 194 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp26_ = self->priv->notes_tree_view;
#line 194 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp27_ = column;
#line 194 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	gtk_tree_view_append_column (_tmp26_, _tmp27_);
#line 1796 "notes.c"
	{
		gchar* sqlcmd = NULL;
		gchar* _tmp28_;
		MidoriDatabaseStatement* statement = NULL;
		MidoriDatabase* _tmp29_;
		const gchar* _tmp30_;
		MidoriDatabaseStatement* _tmp31_;
#line 197 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp28_ = g_strdup ("SELECT id, uri, title, note_content FROM notes");
#line 197 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		sqlcmd = _tmp28_;
#line 198 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp29_ = clip_notes_database;
#line 198 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp30_ = sqlcmd;
#line 198 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp31_ = midori_database_prepare (_tmp29_, _tmp30_, &_inner_error_, NULL);
#line 198 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		statement = _tmp31_;
#line 198 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 198 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_g_free0 (sqlcmd);
#line 1820 "notes.c"
			goto __catch5_g_error;
		}
#line 199 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		while (TRUE) {
#line 1825 "notes.c"
			gboolean _tmp32_ = FALSE;
			MidoriDatabaseStatement* _tmp33_;
			gboolean _tmp34_;
			ClipNotesNote* note = NULL;
			ClipNotesNote* _tmp35_;
			gint64 _tmp36_ = 0LL;
			MidoriDatabaseStatement* _tmp37_;
			gint64 _tmp38_;
			ClipNotesNote* _tmp39_;
			gchar* _tmp40_ = NULL;
			MidoriDatabaseStatement* _tmp41_;
			gchar* _tmp42_;
			ClipNotesNote* _tmp43_;
			gchar* _tmp44_ = NULL;
			MidoriDatabaseStatement* _tmp45_;
			gchar* _tmp46_;
			ClipNotesNote* _tmp47_;
			gchar* _tmp48_ = NULL;
			MidoriDatabaseStatement* _tmp49_;
			gchar* _tmp50_;
			ClipNotesNote* _tmp51_;
			ClipNotesNote* _tmp52_;
#line 199 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_tmp33_ = statement;
#line 199 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_tmp34_ = midori_database_statement_step (_tmp33_, &_inner_error_);
#line 199 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_tmp32_ = _tmp34_;
#line 199 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 199 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				_g_object_unref0 (statement);
#line 199 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				_g_free0 (sqlcmd);
#line 1860 "notes.c"
				goto __catch5_g_error;
			}
#line 199 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			if (!_tmp32_) {
#line 199 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				break;
#line 1867 "notes.c"
			}
#line 200 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_tmp35_ = clip_notes_note_new ();
#line 200 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			note = _tmp35_;
#line 201 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_tmp37_ = statement;
#line 201 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_tmp38_ = midori_database_statement_get_int64 (_tmp37_, "id", &_inner_error_);
#line 201 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_tmp36_ = _tmp38_;
#line 201 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 201 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				_g_object_unref0 (note);
#line 201 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				_g_object_unref0 (statement);
#line 201 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				_g_free0 (sqlcmd);
#line 1887 "notes.c"
				goto __catch5_g_error;
			}
#line 201 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_tmp39_ = note;
#line 201 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			clip_notes_note_set_id (_tmp39_, _tmp36_);
#line 202 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_tmp41_ = statement;
#line 202 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_tmp42_ = midori_database_statement_get_string (_tmp41_, "uri", &_inner_error_);
#line 202 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_tmp40_ = _tmp42_;
#line 202 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 202 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				_g_object_unref0 (note);
#line 202 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				_g_object_unref0 (statement);
#line 202 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				_g_free0 (sqlcmd);
#line 1908 "notes.c"
				goto __catch5_g_error;
			}
#line 202 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_tmp43_ = note;
#line 202 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			clip_notes_note_set_uri (_tmp43_, _tmp40_);
#line 203 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_tmp45_ = statement;
#line 203 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_tmp46_ = midori_database_statement_get_string (_tmp45_, "title", &_inner_error_);
#line 203 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_tmp44_ = _tmp46_;
#line 203 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 203 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				_g_free0 (_tmp40_);
#line 203 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				_g_object_unref0 (note);
#line 203 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				_g_object_unref0 (statement);
#line 203 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				_g_free0 (sqlcmd);
#line 1931 "notes.c"
				goto __catch5_g_error;
			}
#line 203 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_tmp47_ = note;
#line 203 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			clip_notes_note_set_title (_tmp47_, _tmp44_);
#line 204 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_tmp49_ = statement;
#line 204 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_tmp50_ = midori_database_statement_get_string (_tmp49_, "note_content", &_inner_error_);
#line 204 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_tmp48_ = _tmp50_;
#line 204 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 204 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				_g_free0 (_tmp44_);
#line 204 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				_g_free0 (_tmp40_);
#line 204 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				_g_object_unref0 (note);
#line 204 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				_g_object_unref0 (statement);
#line 204 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				_g_free0 (sqlcmd);
#line 1956 "notes.c"
				goto __catch5_g_error;
			}
#line 204 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_tmp51_ = note;
#line 204 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			clip_notes_note_set_content (_tmp51_, _tmp48_);
#line 206 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_tmp52_ = note;
#line 206 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			clip_notes_append_note (_tmp52_);
#line 199 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_g_free0 (_tmp48_);
#line 199 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_g_free0 (_tmp44_);
#line 199 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_g_free0 (_tmp40_);
#line 199 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_g_object_unref0 (note);
#line 1975 "notes.c"
		}
#line 196 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_object_unref0 (statement);
#line 196 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_free0 (sqlcmd);
#line 1981 "notes.c"
	}
	goto __finally5;
	__catch5_g_error:
	{
		GError* _error_ = NULL;
		GError* _tmp53_;
		const gchar* _tmp54_;
#line 196 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_error_ = _inner_error_;
#line 196 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_inner_error_ = NULL;
#line 209 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp53_ = _error_;
#line 209 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp54_ = _tmp53_->message;
#line 209 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		g_critical (_ ("Failed to select from notes database: %s\n"), _tmp54_);
#line 196 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_error_free0 (_error_);
#line 2001 "notes.c"
	}
	__finally5:
#line 196 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 196 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_object_unref0 (renderer_title);
#line 196 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_object_unref0 (renderer_icon);
#line 196 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_object_unref0 (column);
#line 196 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.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 196 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		g_clear_error (&_inner_error_);
#line 196 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		return NULL;
#line 2018 "notes.c"
	}
#line 212 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp55_ = self->priv->notes_tree_view;
#line 212 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	gtk_widget_show ((GtkWidget*) _tmp55_);
#line 213 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp56_ = self->priv->notes_tree_view;
#line 213 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	gtk_box_pack_start ((GtkBox*) self, (GtkWidget*) _tmp56_, FALSE, FALSE, (guint) 0);
#line 215 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp57_ = (GtkLabel*) gtk_label_new (NULL);
#line 215 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_object_ref_sink (_tmp57_);
#line 215 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_g_object_unref0 (self->priv->note_label);
#line 215 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	self->priv->note_label = _tmp57_;
#line 216 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp58_ = self->priv->note_label;
#line 216 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	gtk_widget_show ((GtkWidget*) _tmp58_);
#line 217 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp59_ = self->priv->note_label;
#line 217 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	gtk_box_pack_start ((GtkBox*) self, (GtkWidget*) _tmp59_, FALSE, FALSE, (guint) 0);
#line 219 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp60_ = self->priv->note_text_view;
#line 219 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	gtk_text_view_set_wrap_mode (_tmp60_, GTK_WRAP_WORD);
#line 220 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp61_ = self->priv->note_text_view;
#line 220 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	gtk_widget_show ((GtkWidget*) _tmp61_);
#line 221 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp62_ = self->priv->note_text_view;
#line 221 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_signal_connect_object ((GtkWidget*) _tmp62_, "focus-out-event", (GCallback) _clip_notes_sidebar_focus_lost_gtk_widget_focus_out_event, self, 0);
#line 222 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp63_ = self->priv->note_text_view;
#line 222 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	gtk_box_pack_start ((GtkBox*) self, (GtkWidget*) _tmp63_, TRUE, TRUE, (guint) 0);
#line 169 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_g_object_unref0 (renderer_title);
#line 169 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_g_object_unref0 (renderer_icon);
#line 169 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_g_object_unref0 (column);
#line 169 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	return self;
#line 2068 "notes.c"
}


ClipNotesSidebar* clip_notes_sidebar_new (void) {
#line 169 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	return clip_notes_sidebar_construct (CLIP_NOTES_TYPE_SIDEBAR);
#line 2075 "notes.c"
}


static gint clip_notes_sidebar_tree_sort_func (ClipNotesSidebar* self, GtkTreeModel* model, GtkTreeIter* a, GtkTreeIter* b) {
	gint result = 0;
	ClipNotesNote* note1 = NULL;
	ClipNotesNote* note2 = NULL;
	GtkTreeModel* _tmp0_;
	GtkTreeIter _tmp1_;
	GtkTreeModel* _tmp2_;
	GtkTreeIter _tmp3_;
	GCompareFunc _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	gint _tmp9_;
#line 225 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_val_if_fail (self != NULL, 0);
#line 225 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_val_if_fail (model != NULL, 0);
#line 225 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_val_if_fail (a != NULL, 0);
#line 225 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_val_if_fail (b != NULL, 0);
#line 227 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp0_ = model;
#line 227 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp1_ = *a;
#line 227 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	gtk_tree_model_get (_tmp0_, &_tmp1_, 0, &note1, -1);
#line 228 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp2_ = model;
#line 228 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp3_ = *b;
#line 228 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	gtk_tree_model_get (_tmp2_, &_tmp3_, 0, &note2, -1);
#line 229 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp4_ = g_strcmp0;
#line 229 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp5_ = clip_notes_note_get_title (note1);
#line 229 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp6_ = _tmp5_;
#line 229 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp7_ = clip_notes_note_get_title (note2);
#line 229 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp8_ = _tmp7_;
#line 229 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp9_ = _tmp4_ (_tmp6_, _tmp8_);
#line 229 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	result = _tmp9_;
#line 229 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_g_object_unref0 (note2);
#line 229 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_g_object_unref0 (note1);
#line 229 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	return result;
#line 2133 "notes.c"
}


static void clip_notes_sidebar_save_current_note (ClipNotesSidebar* self) {
	ClipNotesNote* _tmp0_;
#line 232 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_if_fail (self != NULL);
#line 233 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp0_ = clip_notes_current_note;
#line 233 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	if (_tmp0_ != NULL) {
#line 2145 "notes.c"
		gchar* note_content = NULL;
		GtkTextView* _tmp1_;
		GtkTextBuffer* _tmp2_;
		GtkTextBuffer* _tmp3_;
		gchar* _tmp4_;
		gchar* _tmp5_;
		const gchar* _tmp6_;
		ClipNotesNote* _tmp7_;
		const gchar* _tmp8_;
		const gchar* _tmp9_;
#line 234 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp1_ = self->priv->note_text_view;
#line 234 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp2_ = gtk_text_view_get_buffer (_tmp1_);
#line 234 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp3_ = _tmp2_;
#line 234 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		g_object_get (_tmp3_, "text", &_tmp4_, NULL);
#line 234 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp5_ = _tmp4_;
#line 234 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		note_content = _tmp5_;
#line 235 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp6_ = note_content;
#line 235 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp7_ = clip_notes_current_note;
#line 235 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp8_ = clip_notes_note_get_content (_tmp7_);
#line 235 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp9_ = _tmp8_;
#line 235 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		if (g_strcmp0 (_tmp6_, _tmp9_) != 0) {
#line 2178 "notes.c"
			ClipNotesNote* _tmp10_;
			const gchar* _tmp11_;
#line 236 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_tmp10_ = clip_notes_current_note;
#line 236 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_tmp11_ = note_content;
#line 236 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			clip_notes_note_update (_tmp10_, _tmp11_);
#line 2187 "notes.c"
		}
#line 233 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_free0 (note_content);
#line 2191 "notes.c"
	}
}


static gboolean clip_notes_sidebar_focus_lost (ClipNotesSidebar* self, GdkEventFocus* event) {
	gboolean result = FALSE;
#line 240 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 240 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_val_if_fail (event != NULL, FALSE);
#line 241 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	clip_notes_sidebar_save_current_note (self);
#line 242 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	result = FALSE;
#line 242 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	return result;
#line 2208 "notes.c"
}


static void clip_notes_sidebar_on_render_note_title (ClipNotesSidebar* self, GtkCellLayout* column, GtkCellRenderer* renderer, GtkTreeModel* model, GtkTreeIter* iter) {
	ClipNotesNote* note = NULL;
	GtkTreeModel* _tmp0_;
	GtkTreeIter _tmp1_;
	GtkCellRenderer* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
#line 245 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_if_fail (self != NULL);
#line 245 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_if_fail (column != NULL);
#line 245 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_if_fail (renderer != NULL);
#line 245 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_if_fail (model != NULL);
#line 245 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_if_fail (iter != NULL);
#line 249 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp0_ = model;
#line 249 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp1_ = *iter;
#line 249 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	gtk_tree_model_get (_tmp0_, &_tmp1_, 0, &note, -1);
#line 250 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp2_ = renderer;
#line 250 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp3_ = clip_notes_note_get_title (note);
#line 250 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp4_ = _tmp3_;
#line 250 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp5_ = g_markup_printf_escaped ("%s", _tmp4_);
#line 250 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp6_ = _tmp5_;
#line 250 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_object_set ((GObject*) _tmp2_, "markup", _tmp6_, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
#line 250 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_g_free0 (_tmp6_);
#line 245 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_g_object_unref0 (note);
#line 2253 "notes.c"
}


static void clip_notes_sidebar_on_render_icon (ClipNotesSidebar* self, GtkCellLayout* column, GtkCellRenderer* renderer, GtkTreeModel* model, GtkTreeIter* iter) {
	ClipNotesNote* note = NULL;
	GtkTreeModel* _tmp0_;
	GtkTreeIter _tmp1_;
	GdkPixbuf* pixbuf = NULL;
	ClipNotesNote* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	GdkPixbuf* _tmp5_;
	GdkPixbuf* _tmp6_;
	GtkCellRenderer* _tmp14_;
	GdkPixbuf* _tmp15_;
#line 254 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_if_fail (self != NULL);
#line 254 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_if_fail (column != NULL);
#line 254 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_if_fail (renderer != NULL);
#line 254 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_if_fail (model != NULL);
#line 254 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_if_fail (iter != NULL);
#line 258 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp0_ = model;
#line 258 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp1_ = *iter;
#line 258 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	gtk_tree_model_get (_tmp0_, &_tmp1_, 0, &note, -1);
#line 260 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp2_ = note;
#line 260 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp3_ = clip_notes_note_get_uri (_tmp2_);
#line 260 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp4_ = _tmp3_;
#line 260 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp5_ = midori_paths_get_icon (_tmp4_, NULL);
#line 260 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	pixbuf = _tmp5_;
#line 261 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp6_ = pixbuf;
#line 261 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	if (_tmp6_ != NULL) {
#line 2299 "notes.c"
		gint icon_width = 0;
		gint icon_height = 0;
		GtkSettings* _tmp7_;
		gint _tmp8_ = 0;
		gint _tmp9_ = 0;
		GdkPixbuf* _tmp10_;
		gint _tmp11_;
		gint _tmp12_;
		GdkPixbuf* _tmp13_;
#line 262 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		icon_width = 16;
#line 262 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		icon_height = 16;
#line 263 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp7_ = gtk_widget_get_settings ((GtkWidget*) self);
#line 263 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		gtk_icon_size_lookup_for_settings (_tmp7_, GTK_ICON_SIZE_MENU, &_tmp8_, &_tmp9_);
#line 263 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		icon_width = _tmp8_;
#line 263 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		icon_height = _tmp9_;
#line 265 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp10_ = pixbuf;
#line 265 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp11_ = icon_width;
#line 265 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp12_ = icon_height;
#line 265 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp13_ = gdk_pixbuf_scale_simple (_tmp10_, _tmp11_, _tmp12_, GDK_INTERP_TILES);
#line 265 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_object_unref0 (pixbuf);
#line 265 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		pixbuf = _tmp13_;
#line 2333 "notes.c"
	}
#line 267 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp14_ = renderer;
#line 267 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp15_ = pixbuf;
#line 267 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_object_set ((GObject*) _tmp14_, "pixbuf", _tmp15_, NULL);
#line 254 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_g_object_unref0 (pixbuf);
#line 254 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_g_object_unref0 (note);
#line 2345 "notes.c"
}


static void clip_notes_sidebar_selection_changed (ClipNotesSidebar* self, GtkTreeSelection* selection) {
	GtkTreeSelection* _tmp0_;
#line 270 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_if_fail (self != NULL);
#line 270 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_if_fail (selection != NULL);
#line 272 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	clip_notes_sidebar_save_current_note (self);
#line 273 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp0_ = selection;
#line 273 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	clip_notes_sidebar_show_note_content (self, _tmp0_);
#line 2361 "notes.c"
}


static gboolean clip_notes_sidebar_button_pressed (ClipNotesSidebar* self, GdkEventButton* event) {
	gboolean result = FALSE;
	GdkEventButton _tmp0_;
	guint _tmp1_;
	GdkEventButton _tmp6_;
	guint _tmp7_;
	GdkEventButton _tmp10_;
	guint _tmp11_;
#line 276 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 276 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_val_if_fail (event != NULL, FALSE);
#line 277 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp0_ = *event;
#line 277 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp1_ = _tmp0_.button;
#line 277 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	if (_tmp1_ == ((guint) 1)) {
#line 2383 "notes.c"
		GdkEventButton _tmp2_;
		GdkEventType _tmp3_;
#line 278 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp2_ = *event;
#line 278 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp3_ = _tmp2_.type;
#line 278 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		if (_tmp3_ == GDK_2BUTTON_PRESS) {
#line 2392 "notes.c"
			GdkEventButton _tmp4_;
			gboolean _tmp5_;
#line 279 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_tmp4_ = *event;
#line 279 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_tmp5_ = clip_notes_sidebar_show_note_webpage_in_new_tab (self, &_tmp4_, FALSE);
#line 279 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			result = _tmp5_;
#line 279 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			return result;
#line 2403 "notes.c"
		}
	}
#line 282 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp6_ = *event;
#line 282 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp7_ = _tmp6_.button;
#line 282 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	if (_tmp7_ == ((guint) 2)) {
#line 2412 "notes.c"
		GdkEventButton _tmp8_;
		gboolean _tmp9_;
#line 283 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp8_ = *event;
#line 283 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp9_ = clip_notes_sidebar_show_note_webpage_in_new_tab (self, &_tmp8_, TRUE);
#line 283 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		result = _tmp9_;
#line 283 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		return result;
#line 2423 "notes.c"
	}
#line 284 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp10_ = *event;
#line 284 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp11_ = _tmp10_.button;
#line 284 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	if (_tmp11_ == ((guint) 3)) {
#line 2431 "notes.c"
		GdkEventButton _tmp12_;
		gboolean _tmp13_;
#line 285 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp12_ = *event;
#line 285 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp13_ = clip_notes_sidebar_show_popup_menu (self, &_tmp12_);
#line 285 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		result = _tmp13_;
#line 285 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		return result;
#line 2442 "notes.c"
	}
#line 286 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	result = FALSE;
#line 286 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	return result;
#line 2448 "notes.c"
}


static gboolean clip_notes_sidebar_show_note_content (ClipNotesSidebar* self, GtkTreeSelection* selection) {
	gboolean result = FALSE;
	GtkTreeIter iter = {0};
	GtkTreeSelection* _tmp0_;
	GtkTreeIter _tmp1_ = {0};
	gboolean _tmp2_;
#line 289 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 289 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_val_if_fail (selection != NULL, FALSE);
#line 291 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp0_ = selection;
#line 291 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp2_ = gtk_tree_selection_get_selected (_tmp0_, NULL, &_tmp1_);
#line 291 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	iter = _tmp1_;
#line 291 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	if (_tmp2_) {
#line 2470 "notes.c"
		ClipNotesNote* note = NULL;
		GtkListStore* _tmp3_;
		GtkTreeIter _tmp4_;
		ClipNotesNote* _tmp5_;
		ClipNotesNote* _tmp6_;
#line 293 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp3_ = clip_notes_notes_list_store;
#line 293 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp4_ = iter;
#line 293 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		gtk_tree_model_get ((GtkTreeModel*) _tmp3_, &_tmp4_, 0, &note, -1);
#line 295 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp5_ = note;
#line 295 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp6_ = clip_notes_current_note;
#line 295 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		if (_tmp5_ != _tmp6_) {
#line 2488 "notes.c"
			GtkTextView* _tmp7_;
			GtkTextBuffer* _tmp8_;
			GtkTextBuffer* _tmp9_;
			ClipNotesNote* _tmp10_;
			const gchar* _tmp11_;
			const gchar* _tmp12_;
			ClipNotesNote* _tmp13_;
			ClipNotesNote* _tmp14_;
#line 296 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_tmp7_ = self->priv->note_text_view;
#line 296 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_tmp8_ = gtk_text_view_get_buffer (_tmp7_);
#line 296 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_tmp9_ = _tmp8_;
#line 296 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_tmp10_ = note;
#line 296 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_tmp11_ = clip_notes_note_get_content (_tmp10_);
#line 296 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_tmp12_ = _tmp11_;
#line 296 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			g_object_set (_tmp9_, "text", _tmp12_, NULL);
#line 297 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_tmp13_ = note;
#line 297 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_tmp14_ = _g_object_ref0 (_tmp13_);
#line 297 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_g_object_unref0 (clip_notes_current_note);
#line 297 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			clip_notes_current_note = _tmp14_;
#line 2519 "notes.c"
		}
#line 300 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		result = TRUE;
#line 300 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_object_unref0 (note);
#line 300 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		return result;
#line 2527 "notes.c"
	} else {
		GtkTextView* _tmp15_;
		GtkTextBuffer* _tmp16_;
		GtkTextBuffer* _tmp17_;
#line 302 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp15_ = self->priv->note_text_view;
#line 302 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp16_ = gtk_text_view_get_buffer (_tmp15_);
#line 302 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp17_ = _tmp16_;
#line 302 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		g_object_set (_tmp17_, "text", "", NULL);
#line 2540 "notes.c"
	}
#line 304 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	result = FALSE;
#line 304 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	return result;
#line 2546 "notes.c"
}


static gboolean clip_notes_sidebar_show_note_webpage_in_new_tab (ClipNotesSidebar* self, GdkEventButton* event, gboolean new_tab) {
	gboolean result = FALSE;
	GtkTreeIter iter = {0};
	GtkTreeView* _tmp0_;
	GtkTreeSelection* _tmp1_;
	GtkTreeIter _tmp2_ = {0};
	gboolean _tmp3_;
#line 307 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 309 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp0_ = self->priv->notes_tree_view;
#line 309 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp1_ = gtk_tree_view_get_selection (_tmp0_);
#line 309 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp3_ = gtk_tree_selection_get_selected (_tmp1_, NULL, &_tmp2_);
#line 309 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	iter = _tmp2_;
#line 309 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	if (_tmp3_) {
#line 2569 "notes.c"
		ClipNotesNote* note = NULL;
		GtkListStore* _tmp4_;
		GtkTreeIter _tmp5_;
		ClipNotesNote* _tmp6_;
		const gchar* _tmp7_;
		const gchar* _tmp8_;
#line 311 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp4_ = clip_notes_notes_list_store;
#line 311 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp5_ = iter;
#line 311 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		gtk_tree_model_get ((GtkTreeModel*) _tmp4_, &_tmp5_, 0, &note, -1);
#line 312 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp6_ = note;
#line 312 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp7_ = clip_notes_note_get_uri (_tmp6_);
#line 312 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp8_ = _tmp7_;
#line 312 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		if (_tmp8_ != NULL) {
#line 2590 "notes.c"
			MidoriBrowser* browser = NULL;
			GtkTreeView* _tmp9_;
			MidoriBrowser* _tmp10_;
			MidoriBrowser* _tmp11_;
			gboolean _tmp12_;
#line 313 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_tmp9_ = self->priv->notes_tree_view;
#line 313 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_tmp10_ = midori_browser_get_for_widget ((GtkWidget*) _tmp9_);
#line 313 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_tmp11_ = _g_object_ref0 (_tmp10_);
#line 313 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			browser = _tmp11_;
#line 314 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_tmp12_ = new_tab;
#line 314 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			if (_tmp12_) {
#line 2608 "notes.c"
				MidoriBrowser* _tmp13_;
				ClipNotesNote* _tmp14_;
				const gchar* _tmp15_;
				const gchar* _tmp16_;
#line 315 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				_tmp13_ = browser;
#line 315 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				_tmp14_ = note;
#line 315 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				_tmp15_ = clip_notes_note_get_uri (_tmp14_);
#line 315 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				_tmp16_ = _tmp15_;
#line 315 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				midori_browser_add_uri (_tmp13_, _tmp16_);
#line 2623 "notes.c"
			} else {
				MidoriView* tab = NULL;
				MidoriBrowser* _tmp17_;
				GtkWidget* _tmp18_;
				GtkWidget* _tmp19_;
				MidoriView* _tmp20_;
				MidoriView* _tmp21_;
				ClipNotesNote* _tmp22_;
				const gchar* _tmp23_;
				const gchar* _tmp24_;
#line 317 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				_tmp17_ = browser;
#line 317 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				_tmp18_ = midori_browser_get_tab (_tmp17_);
#line 317 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				_tmp19_ = _tmp18_;
#line 317 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				_tmp20_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp19_, MIDORI_TYPE_VIEW) ? ((MidoriView*) _tmp19_) : NULL);
#line 317 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				tab = _tmp20_;
#line 318 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				_tmp21_ = tab;
#line 318 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				_tmp22_ = note;
#line 318 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				_tmp23_ = clip_notes_note_get_uri (_tmp22_);
#line 318 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				_tmp24_ = _tmp23_;
#line 318 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				midori_view_set_uri (_tmp21_, _tmp24_);
#line 314 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				_g_object_unref0 (tab);
#line 2656 "notes.c"
			}
#line 320 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			result = TRUE;
#line 320 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_g_object_unref0 (browser);
#line 320 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_g_object_unref0 (note);
#line 320 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			return result;
#line 2666 "notes.c"
		}
#line 309 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_object_unref0 (note);
#line 2670 "notes.c"
	}
#line 323 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	result = FALSE;
#line 323 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	return result;
#line 2676 "notes.c"
}


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


static void block1_data_unref (void * _userdata_) {
	Block1Data* _data1_;
	_data1_ = (Block1Data*) _userdata_;
#line 326 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
#line 2694 "notes.c"
		ClipNotesSidebar* self;
#line 326 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		self = _data1_->self;
#line 326 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_gtk_tree_path_free0 (_data1_->path);
#line 326 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_object_unref0 (self);
#line 326 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		g_slice_free (Block1Data, _data1_);
#line 2704 "notes.c"
	}
}


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


static void block2_data_unref (void * _userdata_) {
	Block2Data* _data2_;
	_data2_ = (Block2Data*) _userdata_;
#line 331 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) {
#line 2723 "notes.c"
		ClipNotesSidebar* self;
#line 331 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		self = _data2_->_data1_->self;
#line 331 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_object_unref0 (_data2_->note);
#line 331 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		block1_data_unref (_data2_->_data1_);
#line 331 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_data2_->_data1_ = NULL;
#line 331 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		g_slice_free (Block2Data, _data2_);
#line 2735 "notes.c"
	}
}


static void ___lambda5_ (Block2Data* _data2_) {
	Block1Data* _data1_;
	ClipNotesSidebar* self;
	GtkTreeView* _tmp0_;
	GtkTreePath* _tmp1_;
	GtkTreeView* _tmp2_;
	GtkTreeViewColumn* _tmp3_;
#line 343 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_data1_ = _data2_->_data1_;
#line 343 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	self = _data1_->self;
#line 344 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp0_ = self->priv->notes_tree_view;
#line 344 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp1_ = _data1_->path;
#line 344 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp2_ = self->priv->notes_tree_view;
#line 344 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp3_ = gtk_tree_view_get_column (_tmp2_, 1);
#line 344 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	gtk_tree_view_set_cursor (_tmp0_, _tmp1_, _tmp3_, TRUE);
#line 2761 "notes.c"
}


static void ____lambda5__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
#line 343 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	___lambda5_ (self);
#line 2768 "notes.c"
}


static void ___lambda6_ (Block2Data* _data2_) {
	Block1Data* _data1_;
	ClipNotesSidebar* self;
	GtkClipboard* _tmp0_;
	ClipNotesNote* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
#line 354 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_data1_ = _data2_->_data1_;
#line 354 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	self = _data1_->self;
#line 355 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp0_ = gtk_widget_get_clipboard ((GtkWidget*) self, GDK_SELECTION_CLIPBOARD);
#line 355 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp1_ = _data2_->note;
#line 355 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp2_ = clip_notes_note_get_content (_tmp1_);
#line 355 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp3_ = _tmp2_;
#line 355 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	gtk_clipboard_set_text (_tmp0_, _tmp3_, -1);
#line 2793 "notes.c"
}


static void ____lambda6__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
#line 354 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	___lambda6_ (self);
#line 2800 "notes.c"
}


static void ___lambda7_ (Block2Data* _data2_) {
	Block1Data* _data1_;
	ClipNotesSidebar* self;
	ClipNotesNote* _tmp0_;
#line 364 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_data1_ = _data2_->_data1_;
#line 364 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	self = _data1_->self;
#line 365 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp0_ = _data2_->note;
#line 365 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	clip_notes_note_remove (_tmp0_);
#line 2816 "notes.c"
}


static void ____lambda7__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
#line 364 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	___lambda7_ (self);
#line 2823 "notes.c"
}


static gboolean clip_notes_sidebar_show_popup_menu (ClipNotesSidebar* self, GdkEventButton* event) {
	gboolean result = FALSE;
	Block1Data* _data1_;
	GdkEventButton* _tmp0_;
	GdkWindow* _tmp1_;
	GtkTreeView* _tmp2_;
	GdkWindow* _tmp3_;
	GtkTreeView* _tmp4_;
	GdkEventButton* _tmp5_;
	gdouble _tmp6_;
	GdkEventButton* _tmp7_;
	gdouble _tmp8_;
	GtkTreePath* _tmp9_ = NULL;
	GtkTreePath* _tmp10_;
#line 326 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 326 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_data1_ = g_slice_new0 (Block1Data);
#line 326 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_data1_->_ref_count_ = 1;
#line 326 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_data1_->self = g_object_ref (self);
#line 327 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp0_ = event;
#line 327 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp1_ = (*_tmp0_).window;
#line 327 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp2_ = self->priv->notes_tree_view;
#line 327 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp3_ = gtk_tree_view_get_bin_window (_tmp2_);
#line 327 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_val_if_fail (_tmp1_ == _tmp3_, FALSE);
#line 328 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_data1_->path = NULL;
#line 329 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp4_ = self->priv->notes_tree_view;
#line 329 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp5_ = event;
#line 329 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp6_ = (*_tmp5_).x;
#line 329 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp7_ = event;
#line 329 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp8_ = (*_tmp7_).y;
#line 329 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	gtk_tree_view_get_path_at_pos (_tmp4_, (gint) _tmp6_, (gint) _tmp8_, &_tmp9_, NULL, NULL, NULL);
#line 329 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_gtk_tree_path_free0 (_data1_->path);
#line 329 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_data1_->path = _tmp9_;
#line 331 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp10_ = _data1_->path;
#line 331 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	if (_tmp10_ != NULL) {
#line 2881 "notes.c"
		Block2Data* _data2_;
		GtkTreeIter iter = {0};
		GtkListStore* _tmp11_;
		GtkTreePath* _tmp12_;
		GtkTreeIter _tmp13_ = {0};
		GtkListStore* _tmp14_;
		GtkTreeIter _tmp15_;
		GtkMenu* menu = NULL;
		GtkMenu* _tmp16_;
		GtkImageMenuItem* menuitem = NULL;
		GtkImageMenuItem* _tmp17_;
		GtkImage* image = NULL;
		GtkImage* _tmp18_;
		GtkImageMenuItem* _tmp19_;
		GtkImageMenuItem* _tmp20_;
		GtkImage* _tmp21_;
		GtkImageMenuItem* _tmp22_;
		GtkMenu* _tmp23_;
		GtkImageMenuItem* _tmp24_;
		GtkImageMenuItem* _tmp25_;
		GtkImage* _tmp26_;
		GtkImageMenuItem* _tmp27_;
		GtkImageMenuItem* _tmp28_;
		GtkImage* _tmp29_;
		GtkImageMenuItem* _tmp30_;
		GtkMenu* _tmp31_;
		GtkImageMenuItem* _tmp32_;
		GtkImageMenuItem* _tmp33_;
		GtkImage* _tmp34_;
		GtkImageMenuItem* _tmp35_;
		GtkImageMenuItem* _tmp36_;
		GtkImage* _tmp37_;
		GtkImageMenuItem* _tmp38_;
		GtkMenu* _tmp39_;
		GtkImageMenuItem* _tmp40_;
		GtkMenu* _tmp41_;
		GtkTreeView* _tmp42_;
		GtkMenu* _tmp43_;
#line 331 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_data2_ = g_slice_new0 (Block2Data);
#line 331 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_data2_->_ref_count_ = 1;
#line 331 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_data2_->_data1_ = block1_data_ref (_data1_);
#line 333 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp11_ = clip_notes_notes_list_store;
#line 333 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp12_ = _data1_->path;
#line 333 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		gtk_tree_model_get_iter ((GtkTreeModel*) _tmp11_, &_tmp13_, _tmp12_);
#line 333 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		iter = _tmp13_;
#line 335 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp14_ = clip_notes_notes_list_store;
#line 335 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp15_ = iter;
#line 335 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		gtk_tree_model_get ((GtkTreeModel*) _tmp14_, &_tmp15_, 0, &_data2_->note, -1);
#line 337 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp16_ = (GtkMenu*) gtk_menu_new ();
#line 337 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		g_object_ref_sink (_tmp16_);
#line 337 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		menu = _tmp16_;
#line 339 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp17_ = (GtkImageMenuItem*) gtk_image_menu_item_new_with_label (_ ("Rename note"));
#line 339 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		g_object_ref_sink (_tmp17_);
#line 339 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		menuitem = _tmp17_;
#line 340 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp18_ = (GtkImage*) gtk_image_new_from_stock (GTK_STOCK_EDIT, GTK_ICON_SIZE_MENU);
#line 340 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		g_object_ref_sink (_tmp18_);
#line 340 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		image = _tmp18_;
#line 341 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp19_ = menuitem;
#line 341 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		gtk_image_menu_item_set_always_show_image (_tmp19_, TRUE);
#line 342 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp20_ = menuitem;
#line 342 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp21_ = image;
#line 342 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		gtk_image_menu_item_set_image (_tmp20_, (GtkWidget*) _tmp21_);
#line 343 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp22_ = menuitem;
#line 343 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		g_signal_connect_data ((GtkMenuItem*) _tmp22_, "activate", (GCallback) ____lambda5__gtk_menu_item_activate, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
#line 347 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp23_ = menu;
#line 347 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp24_ = menuitem;
#line 347 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		gtk_menu_shell_append ((GtkMenuShell*) _tmp23_, (GtkWidget*) ((GtkMenuItem*) _tmp24_));
#line 350 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp25_ = (GtkImageMenuItem*) gtk_image_menu_item_new_with_label (_ ("Copy note to clipboard"));
#line 350 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		g_object_ref_sink (_tmp25_);
#line 350 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_object_unref0 (menuitem);
#line 350 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		menuitem = _tmp25_;
#line 351 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp26_ = (GtkImage*) gtk_image_new_from_stock (GTK_STOCK_COPY, GTK_ICON_SIZE_MENU);
#line 351 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		g_object_ref_sink (_tmp26_);
#line 351 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_object_unref0 (image);
#line 351 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		image = _tmp26_;
#line 352 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp27_ = menuitem;
#line 352 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		gtk_image_menu_item_set_always_show_image (_tmp27_, TRUE);
#line 353 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp28_ = menuitem;
#line 353 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp29_ = image;
#line 353 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		gtk_image_menu_item_set_image (_tmp28_, (GtkWidget*) _tmp29_);
#line 354 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp30_ = menuitem;
#line 354 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		g_signal_connect_data ((GtkMenuItem*) _tmp30_, "activate", (GCallback) ____lambda6__gtk_menu_item_activate, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
#line 357 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp31_ = menu;
#line 357 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp32_ = menuitem;
#line 357 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		gtk_menu_shell_append ((GtkMenuShell*) _tmp31_, (GtkWidget*) ((GtkMenuItem*) _tmp32_));
#line 360 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp33_ = (GtkImageMenuItem*) gtk_image_menu_item_new_with_label (_ ("Remove note"));
#line 360 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		g_object_ref_sink (_tmp33_);
#line 360 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_object_unref0 (menuitem);
#line 360 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		menuitem = _tmp33_;
#line 361 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp34_ = (GtkImage*) gtk_image_new_from_stock (GTK_STOCK_DELETE, GTK_ICON_SIZE_MENU);
#line 361 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		g_object_ref_sink (_tmp34_);
#line 361 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_object_unref0 (image);
#line 361 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		image = _tmp34_;
#line 362 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp35_ = menuitem;
#line 362 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		gtk_image_menu_item_set_always_show_image (_tmp35_, TRUE);
#line 363 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp36_ = menuitem;
#line 363 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp37_ = image;
#line 363 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		gtk_image_menu_item_set_image (_tmp36_, (GtkWidget*) _tmp37_);
#line 364 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp38_ = menuitem;
#line 364 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		g_signal_connect_data ((GtkMenuItem*) _tmp38_, "activate", (GCallback) ____lambda7__gtk_menu_item_activate, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
#line 367 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp39_ = menu;
#line 367 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp40_ = menuitem;
#line 367 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		gtk_menu_shell_append ((GtkMenuShell*) _tmp39_, (GtkWidget*) ((GtkMenuItem*) _tmp40_));
#line 369 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp41_ = menu;
#line 369 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		gtk_widget_show_all ((GtkWidget*) _tmp41_);
#line 370 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp42_ = self->priv->notes_tree_view;
#line 370 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp43_ = menu;
#line 370 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		katze_widget_popup ((GtkWidget*) _tmp42_, _tmp43_, NULL, KATZE_MENU_POSITION_CURSOR);
#line 371 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		result = TRUE;
#line 371 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_object_unref0 (image);
#line 371 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_object_unref0 (menuitem);
#line 371 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_object_unref0 (menu);
#line 371 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		block2_data_unref (_data2_);
#line 371 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_data2_ = NULL;
#line 371 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		block1_data_unref (_data1_);
#line 371 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_data1_ = NULL;
#line 371 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		return result;
#line 3078 "notes.c"
	}
#line 373 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	result = FALSE;
#line 373 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	block1_data_unref (_data1_);
#line 373 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_data1_ = NULL;
#line 373 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	return result;
#line 3088 "notes.c"
}


static void clip_notes_sidebar_class_init (ClipNotesSidebarClass * klass) {
#line 127 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	clip_notes_sidebar_parent_class = g_type_class_peek_parent (klass);
#line 127 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_type_class_add_private (klass, sizeof (ClipNotesSidebarPrivate));
#line 127 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	G_OBJECT_CLASS (klass)->finalize = clip_notes_sidebar_finalize;
#line 3099 "notes.c"
}


static void clip_notes_sidebar_midori_viewable_interface_init (MidoriViewableIface * iface) {
#line 127 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	clip_notes_sidebar_midori_viewable_parent_iface = g_type_interface_peek_parent (iface);
#line 127 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	iface->get_stock_id = (const gchar* (*) (MidoriViewable *)) clip_notes_sidebar_real_get_stock_id;
#line 127 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	iface->get_label = (const gchar* (*) (MidoriViewable *)) clip_notes_sidebar_real_get_label;
#line 127 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	iface->get_toolbar = (GtkWidget* (*) (MidoriViewable *)) clip_notes_sidebar_real_get_toolbar;
#line 3112 "notes.c"
}


static void clip_notes_sidebar_instance_init (ClipNotesSidebar * self) {
	GtkTextView* _tmp0_;
#line 127 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	self->priv = CLIP_NOTES_SIDEBAR_GET_PRIVATE (self);
#line 128 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	self->priv->toolbar = NULL;
#line 131 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp0_ = (GtkTextView*) gtk_text_view_new ();
#line 131 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_object_ref_sink (_tmp0_);
#line 131 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	self->priv->note_text_view = _tmp0_;
#line 3128 "notes.c"
}


static void clip_notes_sidebar_finalize (GObject * obj) {
	ClipNotesSidebar * self;
#line 127 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, CLIP_NOTES_TYPE_SIDEBAR, ClipNotesSidebar);
#line 128 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_g_object_unref0 (self->priv->toolbar);
#line 129 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_g_object_unref0 (self->priv->note_label);
#line 130 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_g_object_unref0 (self->priv->notes_tree_view);
#line 131 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_g_object_unref0 (self->priv->note_text_view);
#line 127 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	G_OBJECT_CLASS (clip_notes_sidebar_parent_class)->finalize (obj);
#line 3146 "notes.c"
}


GType clip_notes_sidebar_get_type (void) {
	static volatile gsize clip_notes_sidebar_type_id__volatile = 0;
	if (g_once_init_enter (&clip_notes_sidebar_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ClipNotesSidebarClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) clip_notes_sidebar_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ClipNotesSidebar), 0, (GInstanceInitFunc) clip_notes_sidebar_instance_init, NULL };
		static const GInterfaceInfo midori_viewable_info = { (GInterfaceInitFunc) clip_notes_sidebar_midori_viewable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType clip_notes_sidebar_type_id;
		clip_notes_sidebar_type_id = g_type_register_static (GTK_TYPE_VBOX, "ClipNotesSidebar", &g_define_type_info, 0);
		g_type_add_interface_static (clip_notes_sidebar_type_id, MIDORI_TYPE_VIEWABLE, &midori_viewable_info);
		g_once_init_leave (&clip_notes_sidebar_type_id__volatile, clip_notes_sidebar_type_id);
	}
	return clip_notes_sidebar_type_id__volatile;
}


static void _g_object_unref0_ (gpointer var) {
#line 379 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
#line 3167 "notes.c"
}


static inline void _g_list_free__g_object_unref0_ (GList* self) {
#line 379 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_list_free_full (self, (GDestroyNotify) _g_object_unref0_);
#line 3174 "notes.c"
}


static void _clip_notes_manager_add_menu_items_midori_tab_context_menu (MidoriTab* _sender, WebKitHitTestResult* hit_test_result, MidoriContextAction* menu, gpointer self) {
#line 383 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	clip_notes_manager_add_menu_items ((ClipNotesManager*) self, _sender, hit_test_result, menu);
#line 3181 "notes.c"
}


static void clip_notes_manager_tab_added (ClipNotesManager* self, MidoriBrowser* browser, MidoriTab* tab) {
	MidoriTab* _tmp0_;
#line 381 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_if_fail (self != NULL);
#line 381 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_if_fail (browser != NULL);
#line 381 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_if_fail (tab != NULL);
#line 383 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp0_ = tab;
#line 383 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_signal_connect_object (_tmp0_, "context-menu", (GCallback) _clip_notes_manager_add_menu_items_midori_tab_context_menu, self, 0);
#line 3197 "notes.c"
}


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


static void block3_data_unref (void * _userdata_) {
	Block3Data* _data3_;
	_data3_ = (Block3Data*) _userdata_;
#line 387 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	if (g_atomic_int_dec_and_test (&_data3_->_ref_count_)) {
#line 3215 "notes.c"
		ClipNotesManager* self;
#line 387 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		self = _data3_->self;
#line 387 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_object_unref0 (_data3_->view);
#line 387 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_object_unref0 (self);
#line 387 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		g_slice_free (Block3Data, _data3_);
#line 3225 "notes.c"
	}
}


static void __lambda8_ (Block3Data* _data3_, GtkAction* action) {
	ClipNotesManager* self;
	MidoriView* _tmp0_;
	gboolean _tmp1_;
#line 395 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	self = _data3_->self;
#line 395 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_if_fail (action != NULL);
#line 396 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp0_ = _data3_->view;
#line 396 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp1_ = midori_view_has_selection (_tmp0_);
#line 396 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	if (_tmp1_ == TRUE) {
#line 3244 "notes.c"
		gchar* selected_text = NULL;
		MidoriView* _tmp2_;
		const gchar* _tmp3_;
		gchar* _tmp4_;
		gchar* uri = NULL;
		MidoriView* _tmp5_;
		const gchar* _tmp6_;
		gchar* _tmp7_;
		gchar* title = NULL;
		MidoriView* _tmp8_;
		const gchar* _tmp9_;
		gchar* _tmp10_;
		ClipNotesNote* note = NULL;
		ClipNotesNote* _tmp11_;
		ClipNotesNote* _tmp12_;
		const gchar* _tmp13_;
		const gchar* _tmp14_;
		const gchar* _tmp15_;
#line 398 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp2_ = _data3_->view;
#line 398 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp3_ = midori_view_get_selected_text (_tmp2_);
#line 398 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp4_ = g_strdup (_tmp3_);
#line 398 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		selected_text = _tmp4_;
#line 399 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp5_ = _data3_->view;
#line 399 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp6_ = midori_view_get_display_uri (_tmp5_);
#line 399 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp7_ = g_strdup (_tmp6_);
#line 399 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		uri = _tmp7_;
#line 400 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp8_ = _data3_->view;
#line 400 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp9_ = midori_view_get_display_title (_tmp8_);
#line 400 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp10_ = g_strdup (_tmp9_);
#line 400 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		title = _tmp10_;
#line 401 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp11_ = clip_notes_note_new ();
#line 401 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		note = _tmp11_;
#line 402 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp12_ = note;
#line 402 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp13_ = title;
#line 402 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp14_ = uri;
#line 402 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp15_ = selected_text;
#line 402 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		clip_notes_note_add (_tmp12_, _tmp13_, _tmp14_, _tmp15_);
#line 396 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_object_unref0 (note);
#line 396 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_free0 (title);
#line 396 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_free0 (uri);
#line 396 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_free0 (selected_text);
#line 3309 "notes.c"
	}
}


static void ___lambda8__gtk_action_activate (GtkAction* _sender, gpointer self) {
#line 395 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	__lambda8_ (self, _sender);
#line 3317 "notes.c"
}


static void clip_notes_manager_add_menu_items (ClipNotesManager* self, MidoriTab* tab, WebKitHitTestResult* hit_test_result, MidoriContextAction* menu) {
	Block3Data* _data3_;
	WebKitHitTestResult* _tmp0_;
	WebKitHitTestResultContext _tmp1_;
	WebKitHitTestResultContext _tmp2_;
	MidoriTab* _tmp3_;
	MidoriView* _tmp4_;
	GtkAction* action = NULL;
	GtkAction* _tmp5_;
	GtkAction* _tmp6_;
	MidoriContextAction* _tmp7_;
	GtkAction* _tmp8_;
#line 387 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_if_fail (self != NULL);
#line 387 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_if_fail (tab != NULL);
#line 387 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_if_fail (hit_test_result != NULL);
#line 387 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_if_fail (menu != NULL);
#line 387 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_data3_ = g_slice_new0 (Block3Data);
#line 387 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_data3_->_ref_count_ = 1;
#line 387 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_data3_->self = g_object_ref (self);
#line 389 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp0_ = hit_test_result;
#line 389 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_object_get (_tmp0_, "context", &_tmp1_, NULL);
#line 389 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp2_ = _tmp1_;
#line 389 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	if ((_tmp2_ & WEBKIT_HIT_TEST_RESULT_CONTEXT_SELECTION) == 0) {
#line 390 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		block3_data_unref (_data3_);
#line 390 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_data3_ = NULL;
#line 390 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		return;
#line 3361 "notes.c"
	}
#line 393 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp3_ = tab;
#line 393 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp4_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, MIDORI_TYPE_VIEW) ? ((MidoriView*) _tmp3_) : NULL);
#line 393 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_data3_->view = _tmp4_;
#line 394 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp5_ = gtk_action_new ("Notes", _ ("Copy selection as note"), NULL, NULL);
#line 394 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	action = _tmp5_;
#line 395 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp6_ = action;
#line 395 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_signal_connect_data (_tmp6_, "activate", (GCallback) ___lambda8__gtk_action_activate, block3_data_ref (_data3_), (GClosureNotify) block3_data_unref, 0);
#line 406 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp7_ = menu;
#line 406 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp8_ = action;
#line 406 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	midori_context_action_add (_tmp7_, _tmp8_);
#line 387 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_g_object_unref0 (action);
#line 387 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	block3_data_unref (_data3_);
#line 387 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_data3_ = NULL;
#line 3389 "notes.c"
}


static void _clip_notes_manager_tab_added_midori_browser_add_tab (MidoriBrowser* _sender, MidoriView* tab, gpointer self) {
#line 418 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	clip_notes_manager_tab_added ((ClipNotesManager*) self, _sender, tab);
#line 3396 "notes.c"
}


static void clip_notes_manager_browser_added (ClipNotesManager* self, MidoriBrowser* browser) {
	ClipNotesSidebar* viewable = NULL;
	ClipNotesSidebar* _tmp0_;
	ClipNotesSidebar* _tmp1_;
	MidoriBrowser* _tmp2_;
	MidoriPanel* _tmp3_;
	MidoriPanel* _tmp4_;
	MidoriPanel* _tmp5_;
	ClipNotesSidebar* _tmp6_;
	ClipNotesSidebar* _tmp7_;
	GtkWidget* _tmp8_;
	MidoriBrowser* _tmp9_;
	GList* _tmp10_;
	MidoriBrowser* _tmp13_;
#line 409 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_if_fail (self != NULL);
#line 409 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_if_fail (browser != NULL);
#line 410 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp0_ = clip_notes_sidebar_new ();
#line 410 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_object_ref_sink (_tmp0_);
#line 410 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	viewable = _tmp0_;
#line 411 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp1_ = viewable;
#line 411 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	gtk_widget_show ((GtkWidget*) _tmp1_);
#line 412 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp2_ = browser;
#line 412 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_object_get (_tmp2_, "panel", &_tmp3_, NULL);
#line 412 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp4_ = _tmp3_;
#line 412 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp5_ = _tmp4_;
#line 412 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp6_ = viewable;
#line 412 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	midori_panel_append_page (_tmp5_, (MidoriViewable*) _tmp6_);
#line 412 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_g_object_unref0 (_tmp5_);
#line 413 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp7_ = viewable;
#line 413 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp8_ = _g_object_ref0 ((GtkWidget*) _tmp7_);
#line 413 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	self->widgets = g_list_append (self->widgets, _tmp8_);
#line 415 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp9_ = browser;
#line 415 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp10_ = midori_browser_get_tabs (_tmp9_);
#line 3452 "notes.c"
	{
		GList* tab_collection = NULL;
		GList* tab_it = NULL;
#line 415 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		tab_collection = _tmp10_;
#line 415 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		for (tab_it = tab_collection; tab_it != NULL; tab_it = tab_it->next) {
#line 3460 "notes.c"
			MidoriView* tab = NULL;
#line 415 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			tab = (MidoriView*) tab_it->data;
#line 3464 "notes.c"
			{
				MidoriBrowser* _tmp11_;
				MidoriView* _tmp12_;
#line 416 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				_tmp11_ = browser;
#line 416 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				_tmp12_ = tab;
#line 416 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				clip_notes_manager_tab_added (self, _tmp11_, (MidoriTab*) _tmp12_);
#line 3474 "notes.c"
			}
		}
#line 415 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_list_free0 (tab_collection);
#line 3479 "notes.c"
	}
#line 418 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp13_ = browser;
#line 418 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_signal_connect_object (_tmp13_, "add-tab", (GCallback) _clip_notes_manager_tab_added_midori_browser_add_tab, self, 0);
#line 409 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_g_object_unref0 (viewable);
#line 3487 "notes.c"
}


static void _clip_notes_manager_browser_added_midori_app_add_browser (MidoriApp* _sender, MidoriBrowser* browser, gpointer self) {
#line 432 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	clip_notes_manager_browser_added ((ClipNotesManager*) self, browser);
#line 3494 "notes.c"
}


static void clip_notes_manager_activated (ClipNotesManager* self, MidoriApp* app) {
	const gchar* _tmp0_ = NULL;
	const gchar* _tmp1_;
	gchar* config_path = NULL;
	gchar* _tmp2_;
	gchar* db_path = NULL;
	gchar* _tmp3_;
	MidoriDatabase* _tmp8_;
	sqlite3* _tmp9_;
	sqlite3* _tmp10_;
	MidoriApp* _tmp11_;
	MidoriApp* _tmp12_;
	GList* _tmp13_;
	GError * _inner_error_ = NULL;
#line 421 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_if_fail (self != NULL);
#line 421 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_if_fail (app != NULL);
#line 422 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp1_ = midori_extension_get_config_dir ((MidoriExtension*) self);
#line 422 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp0_ = _tmp1_;
#line 422 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	if (_tmp0_ == NULL) {
#line 422 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp0_ = ":memory:";
#line 3524 "notes.c"
	}
#line 422 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp2_ = g_strdup (_tmp0_);
#line 422 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	config_path = _tmp2_;
#line 423 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp3_ = g_build_path (G_DIR_SEPARATOR_S, config_path, "notes.db", NULL);
#line 423 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	db_path = _tmp3_;
#line 3534 "notes.c"
	{
		MidoriDatabase* _tmp4_ = NULL;
		MidoriDatabase* _tmp5_;
		MidoriDatabase* _tmp6_;
#line 425 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp5_ = midori_database_new (db_path, &_inner_error_);
#line 425 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp4_ = _tmp5_;
#line 425 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 425 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			if (_inner_error_->domain == MIDORI_DATABASE_ERROR) {
#line 3547 "notes.c"
				goto __catch6_midori_database_error;
			}
#line 425 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_g_free0 (db_path);
#line 425 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_g_free0 (config_path);
#line 425 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.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 425 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			g_clear_error (&_inner_error_);
#line 425 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			return;
#line 3560 "notes.c"
		}
#line 425 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp6_ = _tmp4_;
#line 425 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp4_ = NULL;
#line 425 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_object_unref0 (clip_notes_database);
#line 425 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		clip_notes_database = _tmp6_;
#line 424 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_object_unref0 (_tmp4_);
#line 3572 "notes.c"
	}
	goto __finally6;
	__catch6_midori_database_error:
	{
		GError* schema_error = NULL;
		const gchar* _tmp7_;
#line 424 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		schema_error = _inner_error_;
#line 424 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_inner_error_ = NULL;
#line 427 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_tmp7_ = schema_error->message;
#line 427 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		g_error ("notes.vala:427: %s", _tmp7_);
#line 424 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_error_free0 (schema_error);
#line 3589 "notes.c"
	}
	__finally6:
#line 424 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 424 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_free0 (db_path);
#line 424 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_free0 (config_path);
#line 424 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.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 424 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		g_clear_error (&_inner_error_);
#line 424 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		return;
#line 3604 "notes.c"
	}
#line 429 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp8_ = clip_notes_database;
#line 429 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp9_ = midori_database_get_db (_tmp8_);
#line 429 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp10_ = _tmp9_;
#line 429 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	clip_notes_db = _tmp10_;
#line 431 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	__g_list_free__g_object_unref0_0 (self->widgets);
#line 431 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	self->widgets = NULL;
#line 432 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp11_ = app;
#line 432 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_signal_connect_object (_tmp11_, "add-browser", (GCallback) _clip_notes_manager_browser_added_midori_app_add_browser, self, 0);
#line 433 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp12_ = app;
#line 433 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp13_ = midori_app_get_browsers (_tmp12_);
#line 3626 "notes.c"
	{
		GList* browser_collection = NULL;
		GList* browser_it = NULL;
#line 433 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		browser_collection = _tmp13_;
#line 433 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		for (browser_it = browser_collection; browser_it != NULL; browser_it = browser_it->next) {
#line 3634 "notes.c"
			MidoriBrowser* browser = NULL;
#line 433 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			browser = (MidoriBrowser*) browser_it->data;
#line 3638 "notes.c"
			{
				MidoriBrowser* _tmp14_;
#line 434 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				_tmp14_ = browser;
#line 434 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				clip_notes_manager_browser_added (self, _tmp14_);
#line 3645 "notes.c"
			}
		}
#line 433 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		_g_list_free0 (browser_collection);
#line 3650 "notes.c"
	}
#line 421 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_g_free0 (db_path);
#line 421 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_g_free0 (config_path);
#line 3656 "notes.c"
}


static void clip_notes_manager_deactivated (ClipNotesManager* self) {
	MidoriApp* app = NULL;
	MidoriApp* _tmp0_;
	MidoriApp* _tmp1_;
	MidoriApp* _tmp2_;
	guint _tmp3_;
	GList* _tmp4_;
#line 437 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_return_if_fail (self != NULL);
#line 438 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp0_ = midori_extension_get_app ((MidoriExtension*) self);
#line 438 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 438 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	app = _tmp1_;
#line 439 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp2_ = app;
#line 439 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_signal_parse_name ("add-browser", MIDORI_TYPE_APP, &_tmp3_, NULL, FALSE);
#line 439 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _clip_notes_manager_browser_added_midori_app_add_browser, self);
#line 440 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp4_ = self->widgets;
#line 3683 "notes.c"
	{
		GList* widget_collection = NULL;
		GList* widget_it = NULL;
#line 440 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		widget_collection = _tmp4_;
#line 440 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
		for (widget_it = widget_collection; widget_it != NULL; widget_it = widget_it->next) {
#line 3691 "notes.c"
			GtkWidget* _tmp5_;
			GtkWidget* widget = NULL;
#line 440 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			_tmp5_ = _g_object_ref0 ((GtkWidget*) widget_it->data);
#line 440 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
			widget = _tmp5_;
#line 3698 "notes.c"
			{
				GtkWidget* _tmp6_;
#line 441 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				_tmp6_ = widget;
#line 441 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				gtk_object_destroy ((GtkObject*) _tmp6_);
#line 440 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
				_g_object_unref0 (widget);
#line 3707 "notes.c"
			}
		}
	}
#line 437 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_g_object_unref0 (app);
#line 3713 "notes.c"
}


static void _clip_notes_manager_activated_midori_extension_activate (MidoriExtension* _sender, MidoriApp* app, gpointer self) {
#line 450 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	clip_notes_manager_activated ((ClipNotesManager*) self, app);
#line 3720 "notes.c"
}


static void _clip_notes_manager_deactivated_midori_extension_deactivate (MidoriExtension* _sender, gpointer self) {
#line 451 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	clip_notes_manager_deactivated ((ClipNotesManager*) self);
#line 3727 "notes.c"
}


ClipNotesManager* clip_notes_manager_construct (GType object_type) {
	ClipNotesManager * self = NULL;
#line 445 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	self = (ClipNotesManager*) g_object_new (object_type, "name", _ ("Notes"), "description", _ ("Save text clips from websites as notes"), "version", "0.1" MIDORI_VERSION_SUFFIX, "authors", "Paweł Forysiuk", NULL);
#line 450 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_signal_connect_object ((MidoriExtension*) self, "activate", (GCallback) _clip_notes_manager_activated_midori_extension_activate, self, 0);
#line 451 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	g_signal_connect_object ((MidoriExtension*) self, "deactivate", (GCallback) _clip_notes_manager_deactivated_midori_extension_deactivate, self, 0);
#line 444 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	return self;
#line 3741 "notes.c"
}


ClipNotesManager* clip_notes_manager_new (void) {
#line 444 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	return clip_notes_manager_construct (CLIP_NOTES_TYPE_MANAGER);
#line 3748 "notes.c"
}


static void clip_notes_manager_class_init (ClipNotesManagerClass * klass) {
#line 378 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	clip_notes_manager_parent_class = g_type_class_peek_parent (klass);
#line 378 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	G_OBJECT_CLASS (klass)->finalize = clip_notes_manager_finalize;
#line 3757 "notes.c"
}


static void clip_notes_manager_instance_init (ClipNotesManager * self) {
}


static void clip_notes_manager_finalize (GObject * obj) {
	ClipNotesManager * self;
#line 378 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, CLIP_NOTES_TYPE_MANAGER, ClipNotesManager);
#line 379 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	__g_list_free__g_object_unref0_0 (self->widgets);
#line 378 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	G_OBJECT_CLASS (clip_notes_manager_parent_class)->finalize (obj);
#line 3773 "notes.c"
}


GType clip_notes_manager_get_type (void) {
	static volatile gsize clip_notes_manager_type_id__volatile = 0;
	if (g_once_init_enter (&clip_notes_manager_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ClipNotesManagerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) clip_notes_manager_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ClipNotesManager), 0, (GInstanceInitFunc) clip_notes_manager_instance_init, NULL };
		GType clip_notes_manager_type_id;
		clip_notes_manager_type_id = g_type_register_static (MIDORI_TYPE_EXTENSION, "ClipNotesManager", &g_define_type_info, 0);
		g_once_init_leave (&clip_notes_manager_type_id__volatile, clip_notes_manager_type_id);
	}
	return clip_notes_manager_type_id__volatile;
}


MidoriExtension* extension_init (void) {
	MidoriExtension* result = NULL;
	ClipNotesManager* _tmp0_;
#line 458 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	_tmp0_ = clip_notes_manager_new ();
#line 458 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	result = (MidoriExtension*) _tmp0_;
#line 458 "/usr/src/ports/midori/midori-0.5.11-2.i686/src/midori-0.5.11/extensions/notes.vala"
	return result;
#line 3798 "notes.c"
}



