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

/*
 Copyright (C) 2013 Christian Dywan <christian@twotoasts.de>

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

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

#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>


#define MIDORI_TYPE_CONTEXT_ACTION (midori_context_action_get_type ())
#define MIDORI_CONTEXT_ACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MIDORI_TYPE_CONTEXT_ACTION, MidoriContextAction))
#define MIDORI_CONTEXT_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MIDORI_TYPE_CONTEXT_ACTION, MidoriContextActionClass))
#define MIDORI_IS_CONTEXT_ACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MIDORI_TYPE_CONTEXT_ACTION))
#define MIDORI_IS_CONTEXT_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MIDORI_TYPE_CONTEXT_ACTION))
#define MIDORI_CONTEXT_ACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MIDORI_TYPE_CONTEXT_ACTION, MidoriContextActionClass))

typedef struct _MidoriContextAction MidoriContextAction;
typedef struct _MidoriContextActionClass MidoriContextActionClass;
typedef struct _MidoriContextActionPrivate MidoriContextActionPrivate;
#define __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _Block2Data Block2Data;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define MIDORI_TYPE_SEPARATOR_CONTEXT_ACTION (midori_separator_context_action_get_type ())
#define MIDORI_SEPARATOR_CONTEXT_ACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MIDORI_TYPE_SEPARATOR_CONTEXT_ACTION, MidoriSeparatorContextAction))
#define MIDORI_SEPARATOR_CONTEXT_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MIDORI_TYPE_SEPARATOR_CONTEXT_ACTION, MidoriSeparatorContextActionClass))
#define MIDORI_IS_SEPARATOR_CONTEXT_ACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MIDORI_TYPE_SEPARATOR_CONTEXT_ACTION))
#define MIDORI_IS_SEPARATOR_CONTEXT_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MIDORI_TYPE_SEPARATOR_CONTEXT_ACTION))
#define MIDORI_SEPARATOR_CONTEXT_ACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MIDORI_TYPE_SEPARATOR_CONTEXT_ACTION, MidoriSeparatorContextActionClass))

typedef struct _MidoriSeparatorContextAction MidoriSeparatorContextAction;
typedef struct _MidoriSeparatorContextActionClass MidoriSeparatorContextActionClass;
typedef struct _MidoriSeparatorContextActionPrivate MidoriSeparatorContextActionPrivate;

struct _MidoriContextAction {
	GtkAction parent_instance;
	MidoriContextActionPrivate * priv;
};

struct _MidoriContextActionClass {
	GtkActionClass parent_class;
};

struct _MidoriContextActionPrivate {
	GList* action_groups;
	GList* children;
};

typedef void (*MidoriContextActionActionActivateCallback) (GtkAction* action, void* user_data);
struct _Block2Data {
	int _ref_count_;
	MidoriContextAction* self;
	MidoriContextAction* action;
	MidoriContextActionActionActivateCallback callback;
	gpointer callback_target;
};

struct _MidoriSeparatorContextAction {
	MidoriContextAction parent_instance;
	MidoriSeparatorContextActionPrivate * priv;
};

struct _MidoriSeparatorContextActionClass {
	MidoriContextActionClass parent_class;
};


static gpointer midori_context_action_parent_class = NULL;
static gpointer midori_separator_context_action_parent_class = NULL;

GType midori_context_action_get_type (void) G_GNUC_CONST;
#define MIDORI_CONTEXT_ACTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MIDORI_TYPE_CONTEXT_ACTION, MidoriContextActionPrivate))
enum  {
	MIDORI_CONTEXT_ACTION_DUMMY_PROPERTY
};
static void _g_object_unref0_ (gpointer var);
static void _g_list_free__g_object_unref0_ (GList* self);
MidoriContextAction* midori_context_action_new (const gchar* name, const gchar* label, const gchar* tooltip, const gchar* stock_id);
MidoriContextAction* midori_context_action_construct (GType object_type, const gchar* name, const gchar* label, const gchar* tooltip, const gchar* stock_id);
MidoriContextAction* midori_context_action_new_escaped (const gchar* name, const gchar* label, const gchar* tooltip, const gchar* stock_id);
MidoriContextAction* midori_context_action_construct_escaped (GType object_type, const gchar* name, const gchar* label, const gchar* tooltip, const gchar* stock_id);
void midori_context_action_add_simple (MidoriContextAction* self, const gchar* name, const gchar* label, const gchar* tooltip, const gchar* stock_id, MidoriContextActionActionActivateCallback callback, void* callback_target);
static Block2Data* block2_data_ref (Block2Data* _data2_);
static void block2_data_unref (void * _userdata_);
static void __lambda8_ (Block2Data* _data2_);
static void ___lambda8__gtk_action_activate (GtkAction* _sender, gpointer self);
void midori_context_action_add (MidoriContextAction* self, GtkAction* action);
MidoriSeparatorContextAction* midori_separator_context_action_new (void);
MidoriSeparatorContextAction* midori_separator_context_action_construct (GType object_type);
GType midori_separator_context_action_get_type (void) G_GNUC_CONST;
void midori_context_action_add_action_group (MidoriContextAction* self, GtkActionGroup* action_group);
void midori_context_action_add_by_name (MidoriContextAction* self, const gchar* name);
GtkMenu* midori_context_action_create_menu (MidoriContextAction* self, GtkMenu* default_menu, gboolean accels);
GtkAction* midori_context_action_get_by_name (MidoriContextAction* self, const gchar* name);
static void midori_context_action_finalize (GObject* obj);
enum  {
	MIDORI_SEPARATOR_CONTEXT_ACTION_DUMMY_PROPERTY
};


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


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


MidoriContextAction* midori_context_action_construct (GType object_type, const gchar* name, const gchar* label, const gchar* tooltip, const gchar* stock_id) {
	MidoriContextAction * self = NULL;
	const gchar* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
#line 19 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 20 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	_tmp0_ = name;
#line 20 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	_tmp1_ = label;
#line 20 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	_tmp2_ = tooltip;
#line 20 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	_tmp3_ = stock_id;
#line 20 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	self = (MidoriContextAction*) g_object_new (object_type, "name", _tmp0_, "label", _tmp1_, "tooltip", _tmp2_, "stock-id", _tmp3_, NULL);
#line 21 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	__g_list_free__g_object_unref0_0 (self->priv->action_groups);
#line 21 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	self->priv->action_groups = NULL;
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	__g_list_free__g_object_unref0_0 (self->priv->children);
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	self->priv->children = NULL;
#line 19 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	return self;
#line 161 "midori-contextaction.c"
}


MidoriContextAction* midori_context_action_new (const gchar* name, const gchar* label, const gchar* tooltip, const gchar* stock_id) {
#line 19 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	return midori_context_action_construct (MIDORI_TYPE_CONTEXT_ACTION, name, label, tooltip, stock_id);
#line 168 "midori-contextaction.c"
}


static gchar* string_replace (const gchar* self, const gchar* old, const gchar* replacement) {
	gchar* result = NULL;
	GError * _inner_error_ = NULL;
#line 1282 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, NULL);
#line 1282 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	g_return_val_if_fail (old != NULL, NULL);
#line 1282 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	g_return_val_if_fail (replacement != NULL, NULL);
#line 181 "midori-contextaction.c"
	{
		GRegex* regex = NULL;
		const gchar* _tmp0_ = NULL;
		gchar* _tmp1_ = NULL;
		gchar* _tmp2_ = NULL;
		GRegex* _tmp3_ = NULL;
		GRegex* _tmp4_ = NULL;
		gchar* _tmp5_ = NULL;
		GRegex* _tmp6_ = NULL;
		const gchar* _tmp7_ = NULL;
		gchar* _tmp8_ = NULL;
		gchar* _tmp9_ = NULL;
#line 1284 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_tmp0_ = old;
#line 1284 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_tmp1_ = g_regex_escape_string (_tmp0_, -1);
#line 1284 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_tmp2_ = _tmp1_;
#line 1284 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_tmp3_ = g_regex_new (_tmp2_, 0, 0, &_inner_error_);
#line 1284 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_tmp4_ = _tmp3_;
#line 1284 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_g_free0 (_tmp2_);
#line 1284 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		regex = _tmp4_;
#line 1284 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1284 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
			if (_inner_error_->domain == G_REGEX_ERROR) {
#line 212 "midori-contextaction.c"
				goto __catch12_g_regex_error;
			}
#line 1284 "/usr/share/vala-0.26/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 1284 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
			g_clear_error (&_inner_error_);
#line 1284 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
			return NULL;
#line 221 "midori-contextaction.c"
		}
#line 1285 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_tmp6_ = regex;
#line 1285 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_tmp7_ = replacement;
#line 1285 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_tmp8_ = g_regex_replace_literal (_tmp6_, self, (gssize) (-1), 0, _tmp7_, 0, &_inner_error_);
#line 1285 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_tmp5_ = _tmp8_;
#line 1285 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1285 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
			_g_regex_unref0 (regex);
#line 1285 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
			if (_inner_error_->domain == G_REGEX_ERROR) {
#line 237 "midori-contextaction.c"
				goto __catch12_g_regex_error;
			}
#line 1285 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
			_g_regex_unref0 (regex);
#line 1285 "/usr/share/vala-0.26/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 1285 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
			g_clear_error (&_inner_error_);
#line 1285 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
			return NULL;
#line 248 "midori-contextaction.c"
		}
#line 1285 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_tmp9_ = _tmp5_;
#line 1285 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_tmp5_ = NULL;
#line 1285 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		result = _tmp9_;
#line 1285 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_g_free0 (_tmp5_);
#line 1285 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_g_regex_unref0 (regex);
#line 1285 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		return result;
#line 262 "midori-contextaction.c"
	}
	goto __finally12;
	__catch12_g_regex_error:
	{
		GError* e = NULL;
#line 1283 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		e = _inner_error_;
#line 1283 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_inner_error_ = NULL;
#line 1287 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		g_assert_not_reached ();
#line 1283 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_g_error_free0 (e);
#line 276 "midori-contextaction.c"
	}
	__finally12:
#line 1283 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1283 "/usr/share/vala-0.26/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 1283 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		g_clear_error (&_inner_error_);
#line 1283 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		return NULL;
#line 287 "midori-contextaction.c"
	}
}


MidoriContextAction* midori_context_action_construct_escaped (GType object_type, const gchar* name, const gchar* label, const gchar* tooltip, const gchar* stock_id) {
	MidoriContextAction * self = NULL;
	gchar* escaped_label = NULL;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
#line 31 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 31 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	g_return_val_if_fail (label != NULL, NULL);
#line 32 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	_tmp0_ = label;
#line 32 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	_tmp1_ = string_replace (_tmp0_, "_", "__");
#line 32 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	escaped_label = _tmp1_;
#line 33 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	_tmp2_ = name;
#line 33 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	_tmp3_ = tooltip;
#line 33 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	_tmp4_ = stock_id;
#line 33 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	self = (MidoriContextAction*) g_object_new (object_type, "name", _tmp2_, "label", escaped_label, "tooltip", _tmp3_, "stock-id", _tmp4_, NULL);
#line 34 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	__g_list_free__g_object_unref0_0 (self->priv->action_groups);
#line 34 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	self->priv->action_groups = NULL;
#line 35 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	__g_list_free__g_object_unref0_0 (self->priv->children);
#line 35 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	self->priv->children = NULL;
#line 31 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	_g_free0 (escaped_label);
#line 31 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	return self;
#line 330 "midori-contextaction.c"
}


MidoriContextAction* midori_context_action_new_escaped (const gchar* name, const gchar* label, const gchar* tooltip, const gchar* stock_id) {
#line 31 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	return midori_context_action_construct_escaped (MIDORI_TYPE_CONTEXT_ACTION, name, label, tooltip, stock_id);
#line 337 "midori-contextaction.c"
}


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


static void block2_data_unref (void * _userdata_) {
	Block2Data* _data2_;
	_data2_ = (Block2Data*) _userdata_;
#line 39 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) {
#line 355 "midori-contextaction.c"
		MidoriContextAction* self;
#line 39 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
		self = _data2_->self;
#line 39 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
		_g_object_unref0 (_data2_->action);
#line 39 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
		_g_object_unref0 (self);
#line 39 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
		g_slice_free (Block2Data, _data2_);
#line 365 "midori-contextaction.c"
	}
}


static void __lambda8_ (Block2Data* _data2_) {
	MidoriContextAction* self;
	MidoriContextActionActionActivateCallback _tmp0_ = NULL;
	void* _tmp0__target = NULL;
#line 41 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	self = _data2_->self;
#line 41 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	_tmp0_ = _data2_->callback;
#line 41 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	_tmp0__target = _data2_->callback_target;
#line 41 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	_tmp0_ ((GtkAction*) _data2_->action, _tmp0__target);
#line 382 "midori-contextaction.c"
}


static void ___lambda8__gtk_action_activate (GtkAction* _sender, gpointer self) {
#line 41 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	__lambda8_ (self);
#line 389 "midori-contextaction.c"
}


void midori_context_action_add_simple (MidoriContextAction* self, const gchar* name, const gchar* label, const gchar* tooltip, const gchar* stock_id, MidoriContextActionActionActivateCallback callback, void* callback_target) {
	Block2Data* _data2_;
	MidoriContextActionActionActivateCallback _tmp0_ = NULL;
	void* _tmp0__target = NULL;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	MidoriContextAction* _tmp5_ = NULL;
#line 39 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	g_return_if_fail (self != NULL);
#line 39 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	g_return_if_fail (name != NULL);
#line 39 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	_data2_ = g_slice_new0 (Block2Data);
#line 39 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	_data2_->_ref_count_ = 1;
#line 39 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	_data2_->self = g_object_ref (self);
#line 39 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	_tmp0_ = callback;
#line 39 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	_tmp0__target = callback_target;
#line 39 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	_data2_->callback = _tmp0_;
#line 39 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	_data2_->callback_target = _tmp0__target;
#line 40 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	_tmp1_ = name;
#line 40 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	_tmp2_ = label;
#line 40 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	_tmp3_ = tooltip;
#line 40 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	_tmp4_ = stock_id;
#line 40 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	_tmp5_ = midori_context_action_new (_tmp1_, _tmp2_, _tmp3_, _tmp4_);
#line 40 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	_data2_->action = _tmp5_;
#line 41 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	g_signal_connect_data ((GtkAction*) _data2_->action, "activate", (GCallback) ___lambda8__gtk_action_activate, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
#line 42 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	midori_context_action_add (self, (GtkAction*) _data2_->action);
#line 39 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	block2_data_unref (_data2_);
#line 39 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	_data2_ = NULL;
#line 440 "midori-contextaction.c"
}


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


void midori_context_action_add (MidoriContextAction* self, GtkAction* action) {
	GtkAction* _tmp0_ = NULL;
	GtkAction* _tmp3_ = NULL;
	GtkAction* _tmp4_ = NULL;
	GtkAction* _tmp5_ = NULL;
#line 45 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	g_return_if_fail (self != NULL);
#line 46 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	_tmp0_ = action;
#line 46 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	if (_tmp0_ == NULL) {
#line 462 "midori-contextaction.c"
		MidoriSeparatorContextAction* _tmp1_ = NULL;
		MidoriSeparatorContextAction* _tmp2_ = NULL;
#line 47 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
		_tmp1_ = midori_separator_context_action_new ();
#line 47 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
		_tmp2_ = _tmp1_;
#line 47 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
		midori_context_action_add (self, (GtkAction*) _tmp2_);
#line 47 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
		_g_object_unref0 (_tmp2_);
#line 48 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
		return;
#line 475 "midori-contextaction.c"
	}
#line 51 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	_tmp3_ = action;
#line 51 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	_tmp4_ = _g_object_ref0 (_tmp3_);
#line 51 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	self->priv->children = g_list_append (self->priv->children, _tmp4_);
#line 52 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	_tmp5_ = action;
#line 52 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp5_, MIDORI_TYPE_CONTEXT_ACTION)) {
#line 487 "midori-contextaction.c"
		GList* _tmp6_ = NULL;
#line 53 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
		_tmp6_ = self->priv->action_groups;
#line 491 "midori-contextaction.c"
		{
			GList* action_group_collection = NULL;
			GList* action_group_it = NULL;
#line 53 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
			action_group_collection = _tmp6_;
#line 53 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
			for (action_group_it = action_group_collection; action_group_it != NULL; action_group_it = action_group_it->next) {
#line 499 "midori-contextaction.c"
				GtkActionGroup* _tmp7_ = NULL;
				GtkActionGroup* action_group = NULL;
#line 53 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
				_tmp7_ = _g_object_ref0 ((GtkActionGroup*) action_group_it->data);
#line 53 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
				action_group = _tmp7_;
#line 506 "midori-contextaction.c"
				{
					GtkAction* _tmp8_ = NULL;
					GtkActionGroup* _tmp9_ = NULL;
#line 54 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
					_tmp8_ = action;
#line 54 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
					_tmp9_ = action_group;
#line 54 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
					midori_context_action_add_action_group (G_TYPE_CHECK_INSTANCE_TYPE (_tmp8_, MIDORI_TYPE_CONTEXT_ACTION) ? ((MidoriContextAction*) _tmp8_) : NULL, _tmp9_);
#line 53 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
					_g_object_unref0 (action_group);
#line 518 "midori-contextaction.c"
				}
			}
		}
	}
}


void midori_context_action_add_action_group (MidoriContextAction* self, GtkActionGroup* action_group) {
	GtkActionGroup* _tmp0_ = NULL;
	GtkActionGroup* _tmp1_ = NULL;
#line 58 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	g_return_if_fail (self != NULL);
#line 58 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	g_return_if_fail (action_group != NULL);
#line 59 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	_tmp0_ = action_group;
#line 59 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 59 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	self->priv->action_groups = g_list_append (self->priv->action_groups, _tmp1_);
#line 539 "midori-contextaction.c"
}


void midori_context_action_add_by_name (MidoriContextAction* self, const gchar* name) {
	GList* _tmp0_ = NULL;
	const gchar* _tmp8_ = NULL;
#line 62 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	g_return_if_fail (self != NULL);
#line 62 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	g_return_if_fail (name != NULL);
#line 63 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	_tmp0_ = self->priv->action_groups;
#line 552 "midori-contextaction.c"
	{
		GList* action_group_collection = NULL;
		GList* action_group_it = NULL;
#line 63 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
		action_group_collection = _tmp0_;
#line 63 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
		for (action_group_it = action_group_collection; action_group_it != NULL; action_group_it = action_group_it->next) {
#line 560 "midori-contextaction.c"
			GtkActionGroup* _tmp1_ = NULL;
			GtkActionGroup* action_group = NULL;
#line 63 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
			_tmp1_ = _g_object_ref0 ((GtkActionGroup*) action_group_it->data);
#line 63 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
			action_group = _tmp1_;
#line 567 "midori-contextaction.c"
			{
				GtkAction* action = NULL;
				GtkActionGroup* _tmp2_ = NULL;
				const gchar* _tmp3_ = NULL;
				GtkAction* _tmp4_ = NULL;
				GtkAction* _tmp5_ = NULL;
				GtkAction* _tmp6_ = NULL;
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
				_tmp2_ = action_group;
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
				_tmp3_ = name;
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
				_tmp4_ = gtk_action_group_get_action (_tmp2_, _tmp3_);
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
				_tmp5_ = _g_object_ref0 (_tmp4_);
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
				action = _tmp5_;
#line 65 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
				_tmp6_ = action;
#line 65 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
				if (_tmp6_ != NULL) {
#line 589 "midori-contextaction.c"
					GtkAction* _tmp7_ = NULL;
#line 66 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
					_tmp7_ = action;
#line 66 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
					midori_context_action_add (self, _tmp7_);
#line 67 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
					_g_object_unref0 (action);
#line 67 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
					_g_object_unref0 (action_group);
#line 67 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
					return;
#line 601 "midori-contextaction.c"
				}
#line 63 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
				_g_object_unref0 (action);
#line 63 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
				_g_object_unref0 (action_group);
#line 607 "midori-contextaction.c"
			}
		}
	}
#line 70 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	_tmp8_ = name;
#line 70 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	g_warning ("midori-contextaction.vala:70: Action %s not known to ContextAction", _tmp8_);
#line 615 "midori-contextaction.c"
}


GtkMenu* midori_context_action_create_menu (MidoriContextAction* self, GtkMenu* default_menu, gboolean accels) {
	GtkMenu* result = NULL;
	GtkMenu* _tmp0_ = NULL;
	GtkMenu* _tmp1_ = NULL;
	GtkMenu* _tmp2_ = NULL;
	GtkMenu* menu = NULL;
	GtkMenu* _tmp4_ = NULL;
	GList* _tmp5_ = NULL;
#line 95 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 96 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	_tmp1_ = default_menu;
#line 96 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 96 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	_tmp0_ = _tmp2_;
#line 96 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	if (_tmp0_ == NULL) {
#line 637 "midori-contextaction.c"
		GtkMenu* _tmp3_ = NULL;
#line 96 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
		_tmp3_ = (GtkMenu*) gtk_menu_new ();
#line 96 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
		g_object_ref_sink (_tmp3_);
#line 96 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
		_g_object_unref0 (_tmp0_);
#line 96 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
		_tmp0_ = _tmp3_;
#line 647 "midori-contextaction.c"
	}
#line 96 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	_tmp4_ = _tmp0_;
#line 96 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	_tmp0_ = NULL;
#line 96 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	menu = _tmp4_;
#line 97 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	_tmp5_ = self->priv->children;
#line 657 "midori-contextaction.c"
	{
		GList* action_collection = NULL;
		GList* action_it = NULL;
#line 97 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
		action_collection = _tmp5_;
#line 97 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
		for (action_it = action_collection; action_it != NULL; action_it = action_it->next) {
#line 665 "midori-contextaction.c"
			GtkAction* _tmp6_ = NULL;
			GtkAction* action = NULL;
#line 97 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
			_tmp6_ = _g_object_ref0 ((GtkAction*) action_it->data);
#line 97 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
			action = _tmp6_;
#line 672 "midori-contextaction.c"
			{
				GtkMenuItem* menuitem = NULL;
				GtkAction* _tmp7_ = NULL;
				gboolean _tmp26_ = FALSE;
				GtkMenu* _tmp32_ = NULL;
				GtkMenuItem* _tmp33_ = NULL;
#line 99 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
				_tmp7_ = action;
#line 99 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
				if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp7_, MIDORI_TYPE_SEPARATOR_CONTEXT_ACTION)) {
#line 683 "midori-contextaction.c"
					GtkSeparatorMenuItem* _tmp8_ = NULL;
					GtkMenuItem* _tmp9_ = NULL;
#line 100 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
					_tmp8_ = (GtkSeparatorMenuItem*) gtk_separator_menu_item_new ();
#line 100 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
					g_object_ref_sink (_tmp8_);
#line 100 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
					_g_object_unref0 (menuitem);
#line 100 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
					menuitem = (GtkMenuItem*) _tmp8_;
#line 101 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
					_tmp9_ = menuitem;
#line 101 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
					gtk_widget_show ((GtkWidget*) _tmp9_);
#line 698 "midori-contextaction.c"
				} else {
					gboolean _tmp10_ = FALSE;
					GtkAction* _tmp11_ = NULL;
#line 103 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
					_tmp11_ = action;
#line 103 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
					if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp11_, MIDORI_TYPE_CONTEXT_ACTION)) {
#line 706 "midori-contextaction.c"
						GtkAction* _tmp12_ = NULL;
						GList* _tmp13_ = NULL;
						gconstpointer _tmp14_ = NULL;
#line 104 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
						_tmp12_ = action;
#line 104 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
						_tmp13_ = (G_TYPE_CHECK_INSTANCE_TYPE (_tmp12_, MIDORI_TYPE_CONTEXT_ACTION) ? ((MidoriContextAction*) _tmp12_) : NULL)->priv->children;
#line 104 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
						_tmp14_ = g_list_nth_data (_tmp13_, (guint) 0);
#line 104 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
						_tmp10_ = ((GtkAction*) _tmp14_) != NULL;
#line 718 "midori-contextaction.c"
					} else {
#line 103 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
						_tmp10_ = FALSE;
#line 722 "midori-contextaction.c"
					}
#line 103 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
					if (_tmp10_) {
#line 726 "midori-contextaction.c"
						GtkAction* _tmp15_ = NULL;
						GtkWidget* _tmp16_ = NULL;
						GtkMenuItem* _tmp17_ = NULL;
						GtkMenuItem* _tmp18_ = NULL;
						GtkAction* _tmp19_ = NULL;
						gboolean _tmp20_ = FALSE;
						GtkMenu* _tmp21_ = NULL;
						GtkMenu* _tmp22_ = NULL;
#line 105 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
						_tmp15_ = action;
#line 105 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
						_tmp16_ = gtk_action_create_menu_item (_tmp15_);
#line 105 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
						_tmp17_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp16_, GTK_TYPE_MENU_ITEM) ? ((GtkMenuItem*) _tmp16_) : NULL);
#line 105 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
						_g_object_unref0 (menuitem);
#line 105 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
						menuitem = _tmp17_;
#line 106 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
						_tmp18_ = menuitem;
#line 106 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
						_tmp19_ = action;
#line 106 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
						_tmp20_ = accels;
#line 106 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
						_tmp21_ = midori_context_action_create_menu (G_TYPE_CHECK_INSTANCE_TYPE (_tmp19_, MIDORI_TYPE_CONTEXT_ACTION) ? ((MidoriContextAction*) _tmp19_) : NULL, NULL, _tmp20_);
#line 106 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
						_tmp22_ = _tmp21_;
#line 106 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
						gtk_menu_item_set_submenu (_tmp18_, _tmp22_);
#line 106 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
						_g_object_unref0 (_tmp22_);
#line 759 "midori-contextaction.c"
					} else {
						GtkAction* _tmp23_ = NULL;
						GtkWidget* _tmp24_ = NULL;
						GtkMenuItem* _tmp25_ = NULL;
#line 109 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
						_tmp23_ = action;
#line 109 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
						_tmp24_ = gtk_action_create_menu_item (_tmp23_);
#line 109 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
						_tmp25_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp24_, GTK_TYPE_MENU_ITEM) ? ((GtkMenuItem*) _tmp24_) : NULL);
#line 109 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
						_g_object_unref0 (menuitem);
#line 109 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
						menuitem = _tmp25_;
#line 774 "midori-contextaction.c"
					}
				}
#line 111 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
				_tmp26_ = accels;
#line 111 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
				if (!_tmp26_) {
#line 781 "midori-contextaction.c"
					GtkAccelLabel* accel_label = NULL;
					GtkMenuItem* _tmp27_ = NULL;
					GtkWidget* _tmp28_ = NULL;
					GtkAccelLabel* _tmp29_ = NULL;
					GtkAccelLabel* _tmp30_ = NULL;
#line 112 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
					_tmp27_ = menuitem;
#line 112 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
					_tmp28_ = gtk_bin_get_child ((GtkBin*) _tmp27_);
#line 112 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
					_tmp29_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp28_, GTK_TYPE_ACCEL_LABEL) ? ((GtkAccelLabel*) _tmp28_) : NULL);
#line 112 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
					accel_label = _tmp29_;
#line 113 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
					_tmp30_ = accel_label;
#line 113 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
					if (_tmp30_ != NULL) {
#line 799 "midori-contextaction.c"
						GtkAccelLabel* _tmp31_ = NULL;
#line 114 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
						_tmp31_ = accel_label;
#line 114 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
						g_object_set (_tmp31_, "accel-closure", NULL, NULL);
#line 805 "midori-contextaction.c"
					}
#line 111 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
					_g_object_unref0 (accel_label);
#line 809 "midori-contextaction.c"
				}
#line 116 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
				_tmp32_ = menu;
#line 116 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
				_tmp33_ = menuitem;
#line 116 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
				gtk_menu_shell_append ((GtkMenuShell*) _tmp32_, (GtkWidget*) _tmp33_);
#line 97 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
				_g_object_unref0 (menuitem);
#line 97 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
				_g_object_unref0 (action);
#line 821 "midori-contextaction.c"
			}
		}
	}
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	result = menu;
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	_g_object_unref0 (_tmp0_);
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	return result;
#line 831 "midori-contextaction.c"
}


GtkAction* midori_context_action_get_by_name (MidoriContextAction* self, const gchar* name) {
	GtkAction* result = NULL;
	GList* _tmp0_ = NULL;
#line 121 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 121 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 122 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	_tmp0_ = self->priv->children;
#line 844 "midori-contextaction.c"
	{
		GList* action_collection = NULL;
		GList* action_it = NULL;
#line 122 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
		action_collection = _tmp0_;
#line 122 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
		for (action_it = action_collection; action_it != NULL; action_it = action_it->next) {
#line 852 "midori-contextaction.c"
			GtkAction* _tmp1_ = NULL;
			GtkAction* action = NULL;
#line 122 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
			_tmp1_ = _g_object_ref0 ((GtkAction*) action_it->data);
#line 122 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
			action = _tmp1_;
#line 859 "midori-contextaction.c"
			{
				GtkAction* _tmp2_ = NULL;
				const gchar* _tmp3_ = NULL;
				const gchar* _tmp4_ = NULL;
				const gchar* _tmp5_ = NULL;
#line 123 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
				_tmp2_ = action;
#line 123 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
				_tmp3_ = gtk_action_get_name (_tmp2_);
#line 123 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
				_tmp4_ = _tmp3_;
#line 123 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
				_tmp5_ = name;
#line 123 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
				if (g_strcmp0 (_tmp4_, _tmp5_) == 0) {
#line 124 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
					result = action;
#line 124 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
					return result;
#line 879 "midori-contextaction.c"
				}
#line 122 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
				_g_object_unref0 (action);
#line 883 "midori-contextaction.c"
			}
		}
	}
#line 125 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	result = NULL;
#line 125 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	return result;
#line 891 "midori-contextaction.c"
}


static void midori_context_action_class_init (MidoriContextActionClass * klass) {
#line 16 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	midori_context_action_parent_class = g_type_class_peek_parent (klass);
#line 16 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	g_type_class_add_private (klass, sizeof (MidoriContextActionPrivate));
#line 16 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	G_OBJECT_CLASS (klass)->finalize = midori_context_action_finalize;
#line 902 "midori-contextaction.c"
}


static void midori_context_action_instance_init (MidoriContextAction * self) {
#line 16 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	self->priv = MIDORI_CONTEXT_ACTION_GET_PRIVATE (self);
#line 909 "midori-contextaction.c"
}


static void midori_context_action_finalize (GObject* obj) {
	MidoriContextAction * self;
#line 16 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, MIDORI_TYPE_CONTEXT_ACTION, MidoriContextAction);
#line 17 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	__g_list_free__g_object_unref0_0 (self->priv->action_groups);
#line 18 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	__g_list_free__g_object_unref0_0 (self->priv->children);
#line 16 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	G_OBJECT_CLASS (midori_context_action_parent_class)->finalize (obj);
#line 923 "midori-contextaction.c"
}


GType midori_context_action_get_type (void) {
	static volatile gsize midori_context_action_type_id__volatile = 0;
	if (g_once_init_enter (&midori_context_action_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (MidoriContextActionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) midori_context_action_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (MidoriContextAction), 0, (GInstanceInitFunc) midori_context_action_instance_init, NULL };
		GType midori_context_action_type_id;
		midori_context_action_type_id = g_type_register_static (GTK_TYPE_ACTION, "MidoriContextAction", &g_define_type_info, 0);
		g_once_init_leave (&midori_context_action_type_id__volatile, midori_context_action_type_id);
	}
	return midori_context_action_type_id__volatile;
}


MidoriSeparatorContextAction* midori_separator_context_action_construct (GType object_type) {
	MidoriSeparatorContextAction * self = NULL;
#line 131 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	self = (MidoriSeparatorContextAction*) g_object_new (object_type, "name", "SeparatorContextAction", "label", NULL, "tooltip", NULL, "stock-id", NULL, NULL);
#line 130 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	return self;
#line 945 "midori-contextaction.c"
}


MidoriSeparatorContextAction* midori_separator_context_action_new (void) {
#line 130 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	return midori_separator_context_action_construct (MIDORI_TYPE_SEPARATOR_CONTEXT_ACTION);
#line 952 "midori-contextaction.c"
}


static void midori_separator_context_action_class_init (MidoriSeparatorContextActionClass * klass) {
#line 129 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-contextaction.vala"
	midori_separator_context_action_parent_class = g_type_class_peek_parent (klass);
#line 959 "midori-contextaction.c"
}


static void midori_separator_context_action_instance_init (MidoriSeparatorContextAction * self) {
}


GType midori_separator_context_action_get_type (void) {
	static volatile gsize midori_separator_context_action_type_id__volatile = 0;
	if (g_once_init_enter (&midori_separator_context_action_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (MidoriSeparatorContextActionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) midori_separator_context_action_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (MidoriSeparatorContextAction), 0, (GInstanceInitFunc) midori_separator_context_action_instance_init, NULL };
		GType midori_separator_context_action_type_id;
		midori_separator_context_action_type_id = g_type_register_static (MIDORI_TYPE_CONTEXT_ACTION, "MidoriSeparatorContextAction", &g_define_type_info, 0);
		g_once_init_leave (&midori_separator_context_action_type_id__volatile, midori_separator_context_action_type_id);
	}
	return midori_separator_context_action_type_id__volatile;
}



