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

/*
   Copyright (C) 2013 André Stösel <andre@stoesel.de>

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

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

#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
#include "midori/midori-extension.h"
#include "midori/midori-app.h"
#include <glib/gi18n-lib.h>
#include "devpet.h"


#define DEV_PET_TYPE_TREE_CELLS (dev_pet_tree_cells_get_type ())

#define DEV_PET_TYPE_DATA_WINDOW (dev_pet_data_window_get_type ())
#define DEV_PET_DATA_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DEV_PET_TYPE_DATA_WINDOW, DevPetDataWindow))
#define DEV_PET_DATA_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DEV_PET_TYPE_DATA_WINDOW, DevPetDataWindowClass))
#define DEV_PET_IS_DATA_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DEV_PET_TYPE_DATA_WINDOW))
#define DEV_PET_IS_DATA_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DEV_PET_TYPE_DATA_WINDOW))
#define DEV_PET_DATA_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DEV_PET_TYPE_DATA_WINDOW, DevPetDataWindowClass))

typedef struct _DevPetDataWindow DevPetDataWindow;
typedef struct _DevPetDataWindowClass DevPetDataWindowClass;
typedef struct _DevPetDataWindowPrivate DevPetDataWindowPrivate;
enum  {
	DEV_PET_DATA_WINDOW_0_PROPERTY,
	DEV_PET_DATA_WINDOW_MESSAGE_PROPERTY,
	DEV_PET_DATA_WINDOW_BACKTRACE_PROPERTY,
	DEV_PET_DATA_WINDOW_NUM_PROPERTIES
};
static GParamSpec* dev_pet_data_window_properties[DEV_PET_DATA_WINDOW_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 DEV_PET_TYPE_LOG_WINDOW (dev_pet_log_window_get_type ())
#define DEV_PET_LOG_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DEV_PET_TYPE_LOG_WINDOW, DevPetLogWindow))
#define DEV_PET_LOG_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DEV_PET_TYPE_LOG_WINDOW, DevPetLogWindowClass))
#define DEV_PET_IS_LOG_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DEV_PET_TYPE_LOG_WINDOW))
#define DEV_PET_IS_LOG_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DEV_PET_TYPE_LOG_WINDOW))
#define DEV_PET_LOG_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DEV_PET_TYPE_LOG_WINDOW, DevPetLogWindowClass))

typedef struct _DevPetLogWindow DevPetLogWindow;
typedef struct _DevPetLogWindowClass DevPetLogWindowClass;
typedef struct _DevPetLogWindowPrivate DevPetLogWindowPrivate;

#define DEV_PET_TYPE_MANAGER (dev_pet_manager_get_type ())
#define DEV_PET_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DEV_PET_TYPE_MANAGER, DevPetManager))
#define DEV_PET_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DEV_PET_TYPE_MANAGER, DevPetManagerClass))
#define DEV_PET_IS_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DEV_PET_TYPE_MANAGER))
#define DEV_PET_IS_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DEV_PET_TYPE_MANAGER))
#define DEV_PET_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DEV_PET_TYPE_MANAGER, DevPetManagerClass))

typedef struct _DevPetManager DevPetManager;
typedef struct _DevPetManagerClass DevPetManagerClass;
enum  {
	DEV_PET_LOG_WINDOW_0_PROPERTY,
	DEV_PET_LOG_WINDOW_NUM_PROPERTIES
};
static GParamSpec* dev_pet_log_window_properties[DEV_PET_LOG_WINDOW_NUM_PROPERTIES];
typedef struct _DevPetManagerPrivate DevPetManagerPrivate;
enum  {
	DEV_PET_MANAGER_0_PROPERTY,
	DEV_PET_MANAGER_NUM_PROPERTIES
};
static GParamSpec* dev_pet_manager_properties[DEV_PET_MANAGER_NUM_PROPERTIES];
typedef struct _Block1Data Block1Data;

typedef enum  {
	DEV_PET_TREE_CELLS_MESSAGE,
	DEV_PET_TREE_CELLS_BACKTRACE,
	DEV_PET_TREE_CELLS_STOCK,
	DEV_PET_TREE_CELLS_COUNT
} DevPetTreeCells;

struct _DevPetDataWindow {
	GtkWindow parent_instance;
	DevPetDataWindowPrivate * priv;
};

struct _DevPetDataWindowClass {
	GtkWindowClass parent_class;
};

struct _DevPetDataWindowPrivate {
	gchar* _message;
	gchar* _backtrace;
};

struct _DevPetLogWindow {
	GtkWindow parent_instance;
	DevPetLogWindowPrivate * priv;
};

struct _DevPetLogWindowClass {
	GtkWindowClass parent_class;
};

struct _DevPetLogWindowPrivate {
	DevPetManager* manager;
};

struct _DevPetManager {
	MidoriExtension parent_instance;
	DevPetManagerPrivate * priv;
	GtkListStore* list_store;
};

struct _DevPetManagerClass {
	MidoriExtensionClass parent_class;
};

struct _DevPetManagerPrivate {
	GtkStatusIcon* trayicon;
	DevPetLogWindow* log_window;
	GLogFunc default_log_func;
	gpointer default_log_func_target;
	GDestroyNotify default_log_func_target_destroy_notify;
	GLogLevelFlags icon_flag;
};

struct _Block1Data {
	int _ref_count_;
	DevPetManager* self;
	gint length;
};


extern GtkIconTheme* theme;
GtkIconTheme* theme = NULL;
static gpointer dev_pet_data_window_parent_class = NULL;
static gpointer dev_pet_log_window_parent_class = NULL;
static gpointer dev_pet_manager_parent_class = NULL;

GType dev_pet_tree_cells_get_type (void) G_GNUC_CONST;
GType dev_pet_data_window_get_type (void) G_GNUC_CONST;
#define DEV_PET_DATA_WINDOW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DEV_PET_TYPE_DATA_WINDOW, DevPetDataWindowPrivate))
static void dev_pet_data_window_create_content (DevPetDataWindow* self);
const gchar* dev_pet_data_window_get_message (DevPetDataWindow* self);
const gchar* dev_pet_data_window_get_backtrace (DevPetDataWindow* self);
DevPetDataWindow* dev_pet_data_window_new (const gchar* message, const gchar* backtrace);
DevPetDataWindow* dev_pet_data_window_construct (GType object_type, const gchar* message, const gchar* backtrace);
static void dev_pet_data_window_set_message (DevPetDataWindow* self, const gchar* value);
static void dev_pet_data_window_set_backtrace (DevPetDataWindow* self, const gchar* value);
static void dev_pet_data_window_finalize (GObject * obj);
static void _vala_dev_pet_data_window_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_dev_pet_data_window_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
GType dev_pet_log_window_get_type (void) G_GNUC_CONST;
GType dev_pet_manager_get_type (void) G_GNUC_CONST;
#define DEV_PET_LOG_WINDOW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DEV_PET_TYPE_LOG_WINDOW, DevPetLogWindowPrivate))
static void dev_pet_log_window_clear_list (DevPetLogWindow* self);
void dev_pet_manager_clear_list (DevPetManager* self);
static void dev_pet_log_window_create_content (DevPetLogWindow* self);
void dev_pet_manager_log_window_closed (DevPetManager* self);
static void _dev_pet_manager_log_window_closed_gtk_object_destroy (GtkObject* _sender, gpointer self);
static void _dev_pet_log_window_clear_list_gtk_button_clicked (GtkButton* _sender, gpointer self);
DevPetLogWindow* dev_pet_log_window_new (DevPetManager* manager);
DevPetLogWindow* dev_pet_log_window_construct (GType object_type, DevPetManager* manager);
static void dev_pet_log_window_finalize (GObject * obj);
#define DEV_PET_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DEV_PET_TYPE_MANAGER, DevPetManagerPrivate))
static const gchar* dev_pet_manager_get_stock_from_log_level (DevPetManager* self, GLogLevelFlags flags);
static void dev_pet_manager_ensure_trayicon (DevPetManager* self);
static void dev_pet_manager_show_error_log (DevPetManager* self);
static void _dev_pet_manager_show_error_log_gtk_status_icon_activate (GtkStatusIcon* _sender, gpointer self);
static void dev_pet_manager_log_handler (DevPetManager* self, const gchar* domain, GLogLevelFlags flags, const gchar* message);
static void dev_pet_manager_activated (DevPetManager* self, MidoriApp* app);
static void _dev_pet_manager_log_handler_glog_func (const gchar* log_domain, GLogLevelFlags log_levels, const gchar* message, gpointer self);
static Block1Data* block1_data_ref (Block1Data* _data1_);
static void block1_data_unref (void * _userdata_);
static gboolean ___lambda4_ (Block1Data* _data1_, GtkTreeModel* model, GtkTreePath* path, GtkTreeIter* iter);
static gboolean ____lambda4__gtk_tree_model_foreach_func (GtkTreeModel* model, GtkTreePath* path, GtkTreeIter* iter, gpointer self);
static void dev_pet_manager_deactivated (DevPetManager* self);
DevPetManager* dev_pet_manager_new (void);
DevPetManager* dev_pet_manager_construct (GType object_type);
static void _dev_pet_manager_activated_midori_extension_activate (MidoriExtension* _sender, MidoriApp* app, gpointer self);
static void _dev_pet_manager_deactivated_midori_extension_deactivate (MidoriExtension* _sender, gpointer self);
static void dev_pet_manager_finalize (GObject * obj);


GType dev_pet_tree_cells_get_type (void) {
	static volatile gsize dev_pet_tree_cells_type_id__volatile = 0;
	if (g_once_init_enter (&dev_pet_tree_cells_type_id__volatile)) {
		static const GEnumValue values[] = {{DEV_PET_TREE_CELLS_MESSAGE, "DEV_PET_TREE_CELLS_MESSAGE", "message"}, {DEV_PET_TREE_CELLS_BACKTRACE, "DEV_PET_TREE_CELLS_BACKTRACE", "backtrace"}, {DEV_PET_TREE_CELLS_STOCK, "DEV_PET_TREE_CELLS_STOCK", "stock"}, {DEV_PET_TREE_CELLS_COUNT, "DEV_PET_TREE_CELLS_COUNT", "count"}, {0, NULL, NULL}};
		GType dev_pet_tree_cells_type_id;
		dev_pet_tree_cells_type_id = g_enum_register_static ("DevPetTreeCells", values);
		g_once_init_leave (&dev_pet_tree_cells_type_id__volatile, dev_pet_tree_cells_type_id);
	}
	return dev_pet_tree_cells_type_id__volatile;
}


static void dev_pet_data_window_create_content (DevPetDataWindow* self) {
	const gchar* _tmp0_;
	GtkVBox* vbox = NULL;
	GtkVBox* _tmp1_;
	GtkTextBuffer* message_buffer = NULL;
	GtkTextBuffer* _tmp2_;
	const gchar* _tmp3_;
	GtkTextView* message_text_view = NULL;
	GtkTextView* _tmp4_;
	GtkTextBuffer* backtrace_buffer = NULL;
	GtkTextBuffer* _tmp5_;
	const gchar* _tmp6_;
	GtkTextView* backtrace_text_view = NULL;
	GtkTextView* _tmp7_;
	GtkScrolledWindow* message_scroll = NULL;
	GtkScrolledWindow* _tmp8_;
	GtkScrolledWindow* backtrace_scroll = NULL;
	GtkScrolledWindow* _tmp9_;
#line 26 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_return_if_fail (self != NULL);
#line 27 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp0_ = self->priv->_message;
#line 27 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	gtk_window_set_title ((GtkWindow*) self, _tmp0_);
#line 28 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	gtk_window_set_default_size ((GtkWindow*) self, 500, 500);
#line 30 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp1_ = (GtkVBox*) gtk_vbox_new (FALSE, 1);
#line 30 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_object_ref_sink (_tmp1_);
#line 30 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	vbox = _tmp1_;
#line 31 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	gtk_container_add ((GtkContainer*) self, (GtkWidget*) vbox);
#line 33 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp2_ = gtk_text_buffer_new (NULL);
#line 33 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	message_buffer = _tmp2_;
#line 34 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp3_ = self->priv->_message;
#line 34 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	gtk_text_buffer_set_text (message_buffer, _tmp3_, -1);
#line 36 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp4_ = (GtkTextView*) gtk_text_view_new_with_buffer (message_buffer);
#line 36 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_object_ref_sink (_tmp4_);
#line 36 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	message_text_view = _tmp4_;
#line 37 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	gtk_text_view_set_editable (message_text_view, FALSE);
#line 39 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp5_ = gtk_text_buffer_new (NULL);
#line 39 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	backtrace_buffer = _tmp5_;
#line 40 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp6_ = self->priv->_backtrace;
#line 40 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	gtk_text_buffer_set_text (backtrace_buffer, _tmp6_, -1);
#line 42 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp7_ = (GtkTextView*) gtk_text_view_new_with_buffer (backtrace_buffer);
#line 42 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_object_ref_sink (_tmp7_);
#line 42 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	backtrace_text_view = _tmp7_;
#line 43 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	gtk_text_view_set_editable (backtrace_text_view, FALSE);
#line 45 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp8_ = (GtkScrolledWindow*) gtk_scrolled_window_new (NULL, NULL);
#line 45 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_object_ref_sink (_tmp8_);
#line 45 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	message_scroll = _tmp8_;
#line 46 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	gtk_scrolled_window_set_policy (message_scroll, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
#line 47 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	gtk_container_add ((GtkContainer*) message_scroll, (GtkWidget*) message_text_view);
#line 49 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp9_ = (GtkScrolledWindow*) gtk_scrolled_window_new (NULL, NULL);
#line 49 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_object_ref_sink (_tmp9_);
#line 49 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	backtrace_scroll = _tmp9_;
#line 50 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	gtk_scrolled_window_set_policy (backtrace_scroll, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
#line 51 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	gtk_container_add ((GtkContainer*) backtrace_scroll, (GtkWidget*) backtrace_text_view);
#line 53 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	gtk_box_pack_start ((GtkBox*) vbox, (GtkWidget*) message_scroll, FALSE, FALSE, (guint) 0);
#line 54 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	gtk_box_pack_end ((GtkBox*) vbox, (GtkWidget*) backtrace_scroll, TRUE, TRUE, (guint) 0);
#line 56 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	gtk_widget_show_all ((GtkWidget*) self);
#line 26 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_g_object_unref0 (backtrace_scroll);
#line 26 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_g_object_unref0 (message_scroll);
#line 26 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_g_object_unref0 (backtrace_text_view);
#line 26 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_g_object_unref0 (backtrace_buffer);
#line 26 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_g_object_unref0 (message_text_view);
#line 26 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_g_object_unref0 (message_buffer);
#line 26 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_g_object_unref0 (vbox);
#line 311 "devpet.c"
}


DevPetDataWindow* dev_pet_data_window_construct (GType object_type, const gchar* message, const gchar* backtrace) {
	DevPetDataWindow * self = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
#line 59 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_return_val_if_fail (message != NULL, NULL);
#line 59 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_return_val_if_fail (backtrace != NULL, NULL);
#line 60 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp0_ = message;
#line 60 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp1_ = backtrace;
#line 60 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	self = (DevPetDataWindow*) g_object_new (object_type, "type", GTK_WINDOW_TOPLEVEL, "window-position", GTK_WIN_POS_CENTER, "message", _tmp0_, "backtrace", _tmp1_, NULL);
#line 65 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	dev_pet_data_window_create_content (self);
#line 59 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	return self;
#line 333 "devpet.c"
}


DevPetDataWindow* dev_pet_data_window_new (const gchar* message, const gchar* backtrace) {
#line 59 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	return dev_pet_data_window_construct (DEV_PET_TYPE_DATA_WINDOW, message, backtrace);
#line 340 "devpet.c"
}


const gchar* dev_pet_data_window_get_message (DevPetDataWindow* self) {
	const gchar* result;
	const gchar* _tmp0_;
#line 23 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 23 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp0_ = self->priv->_message;
#line 23 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	result = _tmp0_;
#line 23 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	return result;
#line 355 "devpet.c"
}


static void dev_pet_data_window_set_message (DevPetDataWindow* self, const gchar* value) {
#line 23 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_return_if_fail (self != NULL);
#line 23 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	if (g_strcmp0 (value, dev_pet_data_window_get_message (self)) != 0) {
#line 364 "devpet.c"
		const gchar* _tmp0_;
		gchar* _tmp1_;
#line 23 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		_tmp0_ = value;
#line 23 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		_tmp1_ = g_strdup (_tmp0_);
#line 23 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		_g_free0 (self->priv->_message);
#line 23 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		self->priv->_message = _tmp1_;
#line 23 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		g_object_notify_by_pspec ((GObject *) self, dev_pet_data_window_properties[DEV_PET_DATA_WINDOW_MESSAGE_PROPERTY]);
#line 377 "devpet.c"
	}
}


const gchar* dev_pet_data_window_get_backtrace (DevPetDataWindow* self) {
	const gchar* result;
	const gchar* _tmp0_;
#line 24 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 24 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp0_ = self->priv->_backtrace;
#line 24 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	result = _tmp0_;
#line 24 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	return result;
#line 393 "devpet.c"
}


static void dev_pet_data_window_set_backtrace (DevPetDataWindow* self, const gchar* value) {
#line 24 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_return_if_fail (self != NULL);
#line 24 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	if (g_strcmp0 (value, dev_pet_data_window_get_backtrace (self)) != 0) {
#line 402 "devpet.c"
		const gchar* _tmp0_;
		gchar* _tmp1_;
#line 24 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		_tmp0_ = value;
#line 24 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		_tmp1_ = g_strdup (_tmp0_);
#line 24 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		_g_free0 (self->priv->_backtrace);
#line 24 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		self->priv->_backtrace = _tmp1_;
#line 24 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		g_object_notify_by_pspec ((GObject *) self, dev_pet_data_window_properties[DEV_PET_DATA_WINDOW_BACKTRACE_PROPERTY]);
#line 415 "devpet.c"
	}
}


static void dev_pet_data_window_class_init (DevPetDataWindowClass * klass) {
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	dev_pet_data_window_parent_class = g_type_class_peek_parent (klass);
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_type_class_add_private (klass, sizeof (DevPetDataWindowPrivate));
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_dev_pet_data_window_get_property;
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_dev_pet_data_window_set_property;
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	G_OBJECT_CLASS (klass)->finalize = dev_pet_data_window_finalize;
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), DEV_PET_DATA_WINDOW_MESSAGE_PROPERTY, dev_pet_data_window_properties[DEV_PET_DATA_WINDOW_MESSAGE_PROPERTY] = g_param_spec_string ("message", "message", "message", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), DEV_PET_DATA_WINDOW_BACKTRACE_PROPERTY, dev_pet_data_window_properties[DEV_PET_DATA_WINDOW_BACKTRACE_PROPERTY] = g_param_spec_string ("backtrace", "backtrace", "backtrace", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
#line 435 "devpet.c"
}


static void dev_pet_data_window_instance_init (DevPetDataWindow * self) {
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	self->priv = DEV_PET_DATA_WINDOW_GET_PRIVATE (self);
#line 442 "devpet.c"
}


static void dev_pet_data_window_finalize (GObject * obj) {
	DevPetDataWindow * self;
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DEV_PET_TYPE_DATA_WINDOW, DevPetDataWindow);
#line 23 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_g_free0 (self->priv->_message);
#line 24 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_g_free0 (self->priv->_backtrace);
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	G_OBJECT_CLASS (dev_pet_data_window_parent_class)->finalize (obj);
#line 456 "devpet.c"
}


GType dev_pet_data_window_get_type (void) {
	static volatile gsize dev_pet_data_window_type_id__volatile = 0;
	if (g_once_init_enter (&dev_pet_data_window_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (DevPetDataWindowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dev_pet_data_window_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DevPetDataWindow), 0, (GInstanceInitFunc) dev_pet_data_window_instance_init, NULL };
		GType dev_pet_data_window_type_id;
		dev_pet_data_window_type_id = g_type_register_static (GTK_TYPE_WINDOW, "DevPetDataWindow", &g_define_type_info, 0);
		g_once_init_leave (&dev_pet_data_window_type_id__volatile, dev_pet_data_window_type_id);
	}
	return dev_pet_data_window_type_id__volatile;
}


static void _vala_dev_pet_data_window_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	DevPetDataWindow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DEV_PET_TYPE_DATA_WINDOW, DevPetDataWindow);
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	switch (property_id) {
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		case DEV_PET_DATA_WINDOW_MESSAGE_PROPERTY:
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		g_value_set_string (value, dev_pet_data_window_get_message (self));
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		break;
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		case DEV_PET_DATA_WINDOW_BACKTRACE_PROPERTY:
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		g_value_set_string (value, dev_pet_data_window_get_backtrace (self));
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		break;
#line 489 "devpet.c"
		default:
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		break;
#line 495 "devpet.c"
	}
}


static void _vala_dev_pet_data_window_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	DevPetDataWindow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DEV_PET_TYPE_DATA_WINDOW, DevPetDataWindow);
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	switch (property_id) {
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		case DEV_PET_DATA_WINDOW_MESSAGE_PROPERTY:
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		dev_pet_data_window_set_message (self, g_value_get_string (value));
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		break;
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		case DEV_PET_DATA_WINDOW_BACKTRACE_PROPERTY:
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		dev_pet_data_window_set_backtrace (self, g_value_get_string (value));
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		break;
#line 517 "devpet.c"
		default:
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 22 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		break;
#line 523 "devpet.c"
	}
}


static void dev_pet_log_window_clear_list (DevPetLogWindow* self) {
	DevPetManager* _tmp0_;
#line 72 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_return_if_fail (self != NULL);
#line 73 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp0_ = self->priv->manager;
#line 73 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	dev_pet_manager_clear_list (_tmp0_);
#line 74 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	gtk_object_destroy ((GtkObject*) self);
#line 538 "devpet.c"
}


static void _dev_pet_manager_log_window_closed_gtk_object_destroy (GtkObject* _sender, gpointer self) {
#line 96 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	dev_pet_manager_log_window_closed ((DevPetManager*) self);
#line 545 "devpet.c"
}


static void _dev_pet_log_window_clear_list_gtk_button_clicked (GtkButton* _sender, gpointer self) {
#line 112 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	dev_pet_log_window_clear_list ((DevPetLogWindow*) self);
#line 552 "devpet.c"
}


static void dev_pet_log_window_create_content (DevPetLogWindow* self) {
	DevPetManager* _tmp0_;
	GtkVBox* vbox = NULL;
	GtkVBox* _tmp1_;
	GtkScrolledWindow* scroll_windows = NULL;
	GtkScrolledWindow* _tmp2_;
	GtkButton* clear = NULL;
	GtkButton* _tmp3_;
	GtkTreeView* treeview = NULL;
	DevPetManager* _tmp4_;
	GtkListStore* _tmp5_;
	GtkTreeView* _tmp6_;
	GtkCellRendererPixbuf* _tmp7_;
	GtkCellRendererPixbuf* _tmp8_;
	GtkCellRendererText* _tmp9_;
	GtkCellRendererText* _tmp10_;
#line 93 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_return_if_fail (self != NULL);
#line 94 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	gtk_window_set_title ((GtkWindow*) self, "Midori - DevPet");
#line 95 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	gtk_window_set_default_size ((GtkWindow*) self, 500, 250);
#line 96 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp0_ = self->priv->manager;
#line 96 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_signal_connect_object ((GtkObject*) self, "destroy", (GCallback) _dev_pet_manager_log_window_closed_gtk_object_destroy, _tmp0_, 0);
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp1_ = (GtkVBox*) gtk_vbox_new (FALSE, 1);
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_object_ref_sink (_tmp1_);
#line 98 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	vbox = _tmp1_;
#line 99 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	gtk_container_add ((GtkContainer*) self, (GtkWidget*) vbox);
#line 106 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp2_ = (GtkScrolledWindow*) gtk_scrolled_window_new (NULL, NULL);
#line 106 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_object_ref_sink (_tmp2_);
#line 106 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	scroll_windows = _tmp2_;
#line 107 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	gtk_scrolled_window_set_policy (scroll_windows, GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
#line 108 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	gtk_scrolled_window_set_shadow_type (scroll_windows, GTK_SHADOW_ETCHED_IN);
#line 111 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp3_ = (GtkButton*) gtk_button_new_from_stock ("gtk-clear");
#line 111 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_object_ref_sink (_tmp3_);
#line 111 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	clear = _tmp3_;
#line 112 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_signal_connect_object (clear, "clicked", (GCallback) _dev_pet_log_window_clear_list_gtk_button_clicked, self, 0);
#line 114 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	gtk_box_pack_start ((GtkBox*) vbox, (GtkWidget*) scroll_windows, TRUE, TRUE, (guint) 0);
#line 115 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	gtk_box_pack_start ((GtkBox*) vbox, (GtkWidget*) clear, FALSE, FALSE, (guint) 0);
#line 118 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp4_ = self->priv->manager;
#line 118 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp5_ = _tmp4_->list_store;
#line 118 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp6_ = (GtkTreeView*) gtk_tree_view_new_with_model ((GtkTreeModel*) _tmp5_);
#line 118 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_object_ref_sink (_tmp6_);
#line 118 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	treeview = _tmp6_;
#line 119 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	gtk_container_add ((GtkContainer*) scroll_windows, (GtkWidget*) treeview);
#line 121 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp7_ = (GtkCellRendererPixbuf*) gtk_cell_renderer_pixbuf_new ();
#line 121 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_object_ref_sink (_tmp7_);
#line 121 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp8_ = _tmp7_;
#line 121 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	gtk_tree_view_insert_column_with_attributes (treeview, -1, "Type", (GtkCellRenderer*) _tmp8_, "stock-id", DEV_PET_TREE_CELLS_STOCK, NULL);
#line 121 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_g_object_unref0 (_tmp8_);
#line 124 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp9_ = (GtkCellRendererText*) gtk_cell_renderer_text_new ();
#line 124 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_object_ref_sink (_tmp9_);
#line 124 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp10_ = _tmp9_;
#line 124 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	gtk_tree_view_insert_column_with_attributes (treeview, -1, "Message", (GtkCellRenderer*) _tmp10_, "text", DEV_PET_TREE_CELLS_MESSAGE, NULL);
#line 124 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_g_object_unref0 (_tmp10_);
#line 132 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	gtk_widget_show_all ((GtkWidget*) self);
#line 93 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_g_object_unref0 (treeview);
#line 93 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_g_object_unref0 (clear);
#line 93 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_g_object_unref0 (scroll_windows);
#line 93 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_g_object_unref0 (vbox);
#line 654 "devpet.c"
}


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


DevPetLogWindow* dev_pet_log_window_construct (GType object_type, DevPetManager* manager) {
	DevPetLogWindow * self = NULL;
	DevPetManager* _tmp0_;
	DevPetManager* _tmp1_;
#line 135 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_return_val_if_fail (manager != NULL, NULL);
#line 136 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	self = (DevPetLogWindow*) g_object_new (object_type, "type", GTK_WINDOW_TOPLEVEL, "window-position", GTK_WIN_POS_CENTER, NULL);
#line 139 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp0_ = manager;
#line 139 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 139 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_g_object_unref0 (self->priv->manager);
#line 139 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	self->priv->manager = _tmp1_;
#line 140 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	dev_pet_log_window_create_content (self);
#line 135 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	return self;
#line 685 "devpet.c"
}


DevPetLogWindow* dev_pet_log_window_new (DevPetManager* manager) {
#line 135 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	return dev_pet_log_window_construct (DEV_PET_TYPE_LOG_WINDOW, manager);
#line 692 "devpet.c"
}


static void dev_pet_log_window_class_init (DevPetLogWindowClass * klass) {
#line 69 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	dev_pet_log_window_parent_class = g_type_class_peek_parent (klass);
#line 69 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_type_class_add_private (klass, sizeof (DevPetLogWindowPrivate));
#line 69 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	G_OBJECT_CLASS (klass)->finalize = dev_pet_log_window_finalize;
#line 703 "devpet.c"
}


static void dev_pet_log_window_instance_init (DevPetLogWindow * self) {
#line 69 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	self->priv = DEV_PET_LOG_WINDOW_GET_PRIVATE (self);
#line 710 "devpet.c"
}


static void dev_pet_log_window_finalize (GObject * obj) {
	DevPetLogWindow * self;
#line 69 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DEV_PET_TYPE_LOG_WINDOW, DevPetLogWindow);
#line 70 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_g_object_unref0 (self->priv->manager);
#line 69 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	G_OBJECT_CLASS (dev_pet_log_window_parent_class)->finalize (obj);
#line 722 "devpet.c"
}


GType dev_pet_log_window_get_type (void) {
	static volatile gsize dev_pet_log_window_type_id__volatile = 0;
	if (g_once_init_enter (&dev_pet_log_window_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (DevPetLogWindowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dev_pet_log_window_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DevPetLogWindow), 0, (GInstanceInitFunc) dev_pet_log_window_instance_init, NULL };
		GType dev_pet_log_window_type_id;
		dev_pet_log_window_type_id = g_type_register_static (GTK_TYPE_WINDOW, "DevPetLogWindow", &g_define_type_info, 0);
		g_once_init_leave (&dev_pet_log_window_type_id__volatile, dev_pet_log_window_type_id);
	}
	return dev_pet_log_window_type_id__volatile;
}


void dev_pet_manager_clear_list (DevPetManager* self) {
	GtkStatusIcon* _tmp0_;
	GtkListStore* _tmp2_;
#line 151 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_return_if_fail (self != NULL);
#line 152 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	self->priv->icon_flag = G_LOG_LEVEL_DEBUG;
#line 153 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp0_ = self->priv->trayicon;
#line 153 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	if (_tmp0_ != NULL) {
#line 749 "devpet.c"
		GtkStatusIcon* _tmp1_;
#line 154 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		_tmp1_ = self->priv->trayicon;
#line 154 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		gtk_status_icon_set_visible (_tmp1_, FALSE);
#line 755 "devpet.c"
	}
#line 155 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp2_ = self->list_store;
#line 155 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	gtk_list_store_clear (_tmp2_);
#line 761 "devpet.c"
}


void dev_pet_manager_log_window_closed (DevPetManager* self) {
#line 158 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_return_if_fail (self != NULL);
#line 159 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_g_object_unref0 (self->priv->log_window);
#line 159 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	self->priv->log_window = NULL;
#line 772 "devpet.c"
}


static const gchar* dev_pet_manager_get_stock_from_log_level (DevPetManager* self, GLogLevelFlags flags) {
	const gchar* result = NULL;
	gboolean _tmp0_ = FALSE;
	GLogLevelFlags _tmp1_;
	GLogLevelFlags _tmp2_;
#line 162 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 163 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp1_ = flags;
#line 163 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp2_ = flags;
#line 163 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	if ((_tmp1_ & G_LOG_LEVEL_CRITICAL) == _tmp2_) {
#line 163 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		_tmp0_ = TRUE;
#line 791 "devpet.c"
	} else {
		GLogLevelFlags _tmp3_;
		GLogLevelFlags _tmp4_;
#line 163 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		_tmp3_ = flags;
#line 163 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		_tmp4_ = flags;
#line 163 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		_tmp0_ = (_tmp3_ & G_LOG_LEVEL_ERROR) == _tmp4_;
#line 801 "devpet.c"
	}
#line 163 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	if (_tmp0_) {
#line 164 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		result = GTK_STOCK_DIALOG_ERROR;
#line 164 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		return result;
#line 809 "devpet.c"
	} else {
		GLogLevelFlags _tmp5_;
		GLogLevelFlags _tmp6_;
#line 165 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		_tmp5_ = flags;
#line 165 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		_tmp6_ = flags;
#line 165 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		if ((_tmp5_ & G_LOG_LEVEL_WARNING) == _tmp6_) {
#line 166 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
			result = GTK_STOCK_DIALOG_WARNING;
#line 166 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
			return result;
#line 823 "devpet.c"
		}
	}
#line 168 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	result = GTK_STOCK_DIALOG_INFO;
#line 168 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	return result;
#line 830 "devpet.c"
}


static void _dev_pet_manager_show_error_log_gtk_status_icon_activate (GtkStatusIcon* _sender, gpointer self) {
#line 177 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	dev_pet_manager_show_error_log ((DevPetManager*) self);
#line 837 "devpet.c"
}


static void dev_pet_manager_ensure_trayicon (DevPetManager* self) {
	GtkStatusIcon* _tmp0_;
	GtkStatusIcon* _tmp1_;
	GtkStatusIcon* _tmp2_;
	GtkStatusIcon* _tmp3_;
#line 171 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_return_if_fail (self != NULL);
#line 172 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp0_ = self->priv->trayicon;
#line 172 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	if (_tmp0_ != NULL) {
#line 173 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		return;
#line 854 "devpet.c"
	}
#line 175 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp1_ = gtk_status_icon_new ();
#line 175 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_g_object_unref0 (self->priv->trayicon);
#line 175 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	self->priv->trayicon = _tmp1_;
#line 176 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp2_ = self->priv->trayicon;
#line 176 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	gtk_status_icon_set_tooltip_text (_tmp2_, "Midori - DevPet");
#line 177 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp3_ = self->priv->trayicon;
#line 177 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_signal_connect_object (_tmp3_, "activate", (GCallback) _dev_pet_manager_show_error_log_gtk_status_icon_activate, self, 0);
#line 870 "devpet.c"
}


static void dev_pet_manager_log_handler (DevPetManager* self, const gchar* domain, GLogLevelFlags flags, const gchar* message) {
	GtkTreeIter iter = {0};
	const gchar* stock = NULL;
	GLogLevelFlags _tmp0_;
	const gchar* _tmp1_;
	GLogLevelFlags _tmp2_;
	GLogLevelFlags _tmp3_;
	GtkListStore* _tmp7_;
	GtkTreeIter _tmp8_ = {0};
	GtkListStore* _tmp9_;
	GtkTreeIter _tmp10_;
	const gchar* _tmp11_;
	const gchar* _tmp12_;
	GtkStatusIcon* _tmp13_;
#line 180 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_return_if_fail (self != NULL);
#line 180 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_return_if_fail (message != NULL);
#line 182 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp0_ = flags;
#line 182 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp1_ = dev_pet_manager_get_stock_from_log_level (self, _tmp0_);
#line 182 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	stock = _tmp1_;
#line 184 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	dev_pet_manager_ensure_trayicon (self);
#line 186 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp2_ = flags;
#line 186 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp3_ = self->priv->icon_flag;
#line 186 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	if (_tmp2_ < _tmp3_) {
#line 906 "devpet.c"
		GLogLevelFlags _tmp4_;
		GtkStatusIcon* _tmp5_;
		const gchar* _tmp6_;
#line 187 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		_tmp4_ = flags;
#line 187 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		self->priv->icon_flag = _tmp4_;
#line 188 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		_tmp5_ = self->priv->trayicon;
#line 188 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		_tmp6_ = stock;
#line 188 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		gtk_status_icon_set_from_stock (_tmp5_, _tmp6_);
#line 920 "devpet.c"
	}
#line 205 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp7_ = self->list_store;
#line 205 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	gtk_list_store_append (_tmp7_, &_tmp8_);
#line 205 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	iter = _tmp8_;
#line 206 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp9_ = self->list_store;
#line 206 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp10_ = iter;
#line 206 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp11_ = message;
#line 206 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp12_ = stock;
#line 206 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	gtk_list_store_set (_tmp9_, &_tmp10_, DEV_PET_TREE_CELLS_MESSAGE, _tmp11_, DEV_PET_TREE_CELLS_STOCK, _tmp12_, -1);
#line 213 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp13_ = self->priv->trayicon;
#line 213 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	gtk_status_icon_set_visible (_tmp13_, TRUE);
#line 942 "devpet.c"
}


static void dev_pet_manager_show_error_log (DevPetManager* self) {
	DevPetLogWindow* _tmp0_;
#line 216 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_return_if_fail (self != NULL);
#line 217 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp0_ = self->priv->log_window;
#line 217 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	if (_tmp0_ == NULL) {
#line 954 "devpet.c"
		DevPetLogWindow* _tmp1_;
		DevPetLogWindow* _tmp2_;
#line 218 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		_tmp1_ = dev_pet_log_window_new (self);
#line 218 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		g_object_ref_sink (_tmp1_);
#line 218 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		_g_object_unref0 (self->priv->log_window);
#line 218 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		self->priv->log_window = _tmp1_;
#line 219 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		_tmp2_ = self->priv->log_window;
#line 219 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		gtk_widget_show ((GtkWidget*) _tmp2_);
#line 969 "devpet.c"
	} else {
		DevPetLogWindow* _tmp3_;
		gboolean _tmp4_;
		gboolean _tmp5_;
#line 221 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		_tmp3_ = self->priv->log_window;
#line 221 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		g_object_get ((GtkWindow*) _tmp3_, "is-active", &_tmp4_, NULL);
#line 221 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		_tmp5_ = _tmp4_;
#line 221 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		if (_tmp5_) {
#line 982 "devpet.c"
			DevPetLogWindow* _tmp6_;
#line 222 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
			_tmp6_ = self->priv->log_window;
#line 222 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
			gtk_widget_hide ((GtkWidget*) _tmp6_);
#line 988 "devpet.c"
		} else {
			DevPetLogWindow* _tmp7_;
#line 224 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
			_tmp7_ = self->priv->log_window;
#line 224 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
			gtk_window_present ((GtkWindow*) _tmp7_);
#line 995 "devpet.c"
		}
	}
}


static void _dev_pet_manager_log_handler_glog_func (const gchar* log_domain, GLogLevelFlags log_levels, const gchar* message, gpointer self) {
#line 231 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	dev_pet_manager_log_handler ((DevPetManager*) self, log_domain, log_levels, message);
#line 1004 "devpet.c"
}


static Block1Data* block1_data_ref (Block1Data* _data1_) {
#line 232 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_atomic_int_inc (&_data1_->_ref_count_);
#line 232 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	return _data1_;
#line 1013 "devpet.c"
}


static void block1_data_unref (void * _userdata_) {
	Block1Data* _data1_;
	_data1_ = (Block1Data*) _userdata_;
#line 232 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
#line 1022 "devpet.c"
		DevPetManager* self;
#line 232 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		self = _data1_->self;
#line 232 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		_g_object_unref0 (self);
#line 232 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		g_slice_free (Block1Data, _data1_);
#line 1030 "devpet.c"
	}
}


static gboolean ___lambda4_ (Block1Data* _data1_, GtkTreeModel* model, GtkTreePath* path, GtkTreeIter* iter) {
	DevPetManager* self;
	gboolean result = FALSE;
	gint _tmp0_;
#line 234 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	self = _data1_->self;
#line 234 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_return_val_if_fail (model != NULL, FALSE);
#line 234 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_return_val_if_fail (path != NULL, FALSE);
#line 234 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_return_val_if_fail (iter != NULL, FALSE);
#line 235 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp0_ = _data1_->length;
#line 235 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_data1_->length = _tmp0_ + 1;
#line 236 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	result = FALSE;
#line 236 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	return result;
#line 1055 "devpet.c"
}


static gboolean ____lambda4__gtk_tree_model_foreach_func (GtkTreeModel* model, GtkTreePath* path, GtkTreeIter* iter, gpointer self) {
	gboolean result;
	result = ___lambda4_ (self, model, path, iter);
#line 234 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	return result;
#line 1064 "devpet.c"
}


static void dev_pet_manager_activated (DevPetManager* self, MidoriApp* app) {
	GLogFunc _tmp0_;
	void* _tmp0__target;
	GtkStatusIcon* _tmp1_;
#line 229 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_return_if_fail (self != NULL);
#line 229 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_return_if_fail (app != NULL);
#line 230 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp0_ = g_log_default_handler;
#line 230 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp0__target = NULL;
#line 230 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	(self->priv->default_log_func_target_destroy_notify == NULL) ? NULL : (self->priv->default_log_func_target_destroy_notify (self->priv->default_log_func_target), NULL);
#line 230 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	self->priv->default_log_func = NULL;
#line 230 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	self->priv->default_log_func_target = NULL;
#line 230 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	self->priv->default_log_func_target_destroy_notify = NULL;
#line 230 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	self->priv->default_log_func = _tmp0_;
#line 230 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	self->priv->default_log_func_target = _tmp0__target;
#line 230 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	self->priv->default_log_func_target_destroy_notify = NULL;
#line 231 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_log_set_default_handler (_dev_pet_manager_log_handler_glog_func, self);
#line 232 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp1_ = self->priv->trayicon;
#line 232 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	if (_tmp1_ != NULL) {
#line 1100 "devpet.c"
		Block1Data* _data1_;
		GtkListStore* _tmp2_;
		gint _tmp3_;
#line 232 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		_data1_ = g_slice_new0 (Block1Data);
#line 232 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		_data1_->_ref_count_ = 1;
#line 232 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		_data1_->self = g_object_ref (self);
#line 233 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		_data1_->length = 0;
#line 234 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		_tmp2_ = self->list_store;
#line 234 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		gtk_tree_model_foreach ((GtkTreeModel*) _tmp2_, ____lambda4__gtk_tree_model_foreach_func, _data1_);
#line 239 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		_tmp3_ = _data1_->length;
#line 239 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		if (_tmp3_ > 0) {
#line 1120 "devpet.c"
			GtkStatusIcon* _tmp4_;
#line 240 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
			_tmp4_ = self->priv->trayicon;
#line 240 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
			gtk_status_icon_set_visible (_tmp4_, TRUE);
#line 1126 "devpet.c"
		}
#line 232 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		block1_data_unref (_data1_);
#line 232 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		_data1_ = NULL;
#line 1132 "devpet.c"
	}
}


static void dev_pet_manager_deactivated (DevPetManager* self) {
	GtkStatusIcon* _tmp0_;
	GLogFunc _tmp2_;
	void* _tmp2__target;
#line 245 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_return_if_fail (self != NULL);
#line 246 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp0_ = self->priv->trayicon;
#line 246 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	if (_tmp0_ != NULL) {
#line 1147 "devpet.c"
		GtkStatusIcon* _tmp1_;
#line 247 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		_tmp1_ = self->priv->trayicon;
#line 247 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
		gtk_status_icon_set_visible (_tmp1_, FALSE);
#line 1153 "devpet.c"
	}
#line 249 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp2_ = self->priv->default_log_func;
#line 249 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp2__target = self->priv->default_log_func_target;
#line 249 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_log_set_default_handler (_tmp2_, _tmp2__target);
#line 1161 "devpet.c"
}


static void _dev_pet_manager_activated_midori_extension_activate (MidoriExtension* _sender, MidoriApp* app, gpointer self) {
#line 260 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	dev_pet_manager_activated ((DevPetManager*) self, app);
#line 1168 "devpet.c"
}


static void _dev_pet_manager_deactivated_midori_extension_deactivate (MidoriExtension* _sender, gpointer self) {
#line 261 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	dev_pet_manager_deactivated ((DevPetManager*) self);
#line 1175 "devpet.c"
}


DevPetManager* dev_pet_manager_construct (GType object_type) {
	DevPetManager * self = NULL;
	GtkListStore* _tmp0_;
#line 253 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	self = (DevPetManager*) g_object_new (object_type, "name", _ ("DevPet"), "description", _ ("This extension shows glib error messages in systray."), "version", "0.1", "authors", "André Stösel <andre@stoesel.de>", NULL);
#line 258 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp0_ = gtk_list_store_new ((gint) DEV_PET_TREE_CELLS_COUNT, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
#line 258 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_g_object_unref0 (self->list_store);
#line 258 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	self->list_store = _tmp0_;
#line 260 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_signal_connect_object ((MidoriExtension*) self, "activate", (GCallback) _dev_pet_manager_activated_midori_extension_activate, self, 0);
#line 261 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_signal_connect_object ((MidoriExtension*) self, "deactivate", (GCallback) _dev_pet_manager_deactivated_midori_extension_deactivate, self, 0);
#line 252 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	return self;
#line 1196 "devpet.c"
}


DevPetManager* dev_pet_manager_new (void) {
#line 252 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	return dev_pet_manager_construct (DEV_PET_TYPE_MANAGER);
#line 1203 "devpet.c"
}


static void dev_pet_manager_class_init (DevPetManagerClass * klass) {
#line 144 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	dev_pet_manager_parent_class = g_type_class_peek_parent (klass);
#line 144 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	g_type_class_add_private (klass, sizeof (DevPetManagerPrivate));
#line 144 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	G_OBJECT_CLASS (klass)->finalize = dev_pet_manager_finalize;
#line 1214 "devpet.c"
}


static void dev_pet_manager_instance_init (DevPetManager * self) {
#line 144 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	self->priv = DEV_PET_MANAGER_GET_PRIVATE (self);
#line 146 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	self->priv->trayicon = NULL;
#line 149 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	self->priv->icon_flag = G_LOG_LEVEL_DEBUG;
#line 1225 "devpet.c"
}


static void dev_pet_manager_finalize (GObject * obj) {
	DevPetManager * self;
#line 144 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DEV_PET_TYPE_MANAGER, DevPetManager);
#line 145 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_g_object_unref0 (self->list_store);
#line 146 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_g_object_unref0 (self->priv->trayicon);
#line 147 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_g_object_unref0 (self->priv->log_window);
#line 148 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	(self->priv->default_log_func_target_destroy_notify == NULL) ? NULL : (self->priv->default_log_func_target_destroy_notify (self->priv->default_log_func_target), NULL);
#line 148 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	self->priv->default_log_func = NULL;
#line 148 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	self->priv->default_log_func_target = NULL;
#line 148 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	self->priv->default_log_func_target_destroy_notify = NULL;
#line 144 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	G_OBJECT_CLASS (dev_pet_manager_parent_class)->finalize (obj);
#line 1249 "devpet.c"
}


GType dev_pet_manager_get_type (void) {
	static volatile gsize dev_pet_manager_type_id__volatile = 0;
	if (g_once_init_enter (&dev_pet_manager_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (DevPetManagerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dev_pet_manager_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DevPetManager), 0, (GInstanceInitFunc) dev_pet_manager_instance_init, NULL };
		GType dev_pet_manager_type_id;
		dev_pet_manager_type_id = g_type_register_static (MIDORI_TYPE_EXTENSION, "DevPetManager", &g_define_type_info, 0);
		g_once_init_leave (&dev_pet_manager_type_id__volatile, dev_pet_manager_type_id);
	}
	return dev_pet_manager_type_id__volatile;
}


MidoriExtension* extension_init (void) {
	MidoriExtension* result = NULL;
	GtkIconTheme* _tmp0_;
	GtkIconTheme* _tmp1_;
	DevPetManager* _tmp2_;
#line 267 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp0_ = gtk_icon_theme_get_default ();
#line 267 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 267 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_g_object_unref0 (theme);
#line 267 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	theme = _tmp1_;
#line 268 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	_tmp2_ = dev_pet_manager_new ();
#line 268 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	result = (MidoriExtension*) _tmp2_;
#line 268 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/devpet.vala"
	return result;
#line 1284 "devpet.c"
}



