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

/*
   Copyright (C) 2014 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 <gio/gio.h>
#include <stdlib.h>
#include <string.h>
#include "midori-core.h"
#include <gtk/gtk.h>
#include "midori/midori-browser.h"
#include <glib/gi18n-lib.h>
#include <pango/pango.h>
#include <gdk/gdk.h>
#include "katze/katze.h"
#include "midori/midori-extension.h"
#include "webkit/webkit.h"
#include "midori/midori-websettings.h"
#include "midori/midori-app.h"
#include "midori/midori-view.h"
#include "open-with.h"

#define __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

#define EXTERNAL_APPLICATIONS_TYPE_ASSOCIATIONS (external_applications_associations_get_type ())
#define EXTERNAL_APPLICATIONS_ASSOCIATIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EXTERNAL_APPLICATIONS_TYPE_ASSOCIATIONS, ExternalApplicationsAssociations))
#define EXTERNAL_APPLICATIONS_ASSOCIATIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EXTERNAL_APPLICATIONS_TYPE_ASSOCIATIONS, ExternalApplicationsAssociationsClass))
#define EXTERNAL_APPLICATIONS_IS_ASSOCIATIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EXTERNAL_APPLICATIONS_TYPE_ASSOCIATIONS))
#define EXTERNAL_APPLICATIONS_IS_ASSOCIATIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EXTERNAL_APPLICATIONS_TYPE_ASSOCIATIONS))
#define EXTERNAL_APPLICATIONS_ASSOCIATIONS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EXTERNAL_APPLICATIONS_TYPE_ASSOCIATIONS, ExternalApplicationsAssociationsClass))

typedef struct _ExternalApplicationsAssociations ExternalApplicationsAssociations;
typedef struct _ExternalApplicationsAssociationsClass ExternalApplicationsAssociationsClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _ExternalApplicationsAssociationsPrivate ExternalApplicationsAssociationsPrivate;
#define _g_free0(var) (var = (g_free (var), NULL))

#define EXTERNAL_APPLICATIONS_TYPE_CUSTOMIZER_DIALOG (external_applications_customizer_dialog_get_type ())
#define EXTERNAL_APPLICATIONS_CUSTOMIZER_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EXTERNAL_APPLICATIONS_TYPE_CUSTOMIZER_DIALOG, ExternalApplicationsCustomizerDialog))
#define EXTERNAL_APPLICATIONS_CUSTOMIZER_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EXTERNAL_APPLICATIONS_TYPE_CUSTOMIZER_DIALOG, ExternalApplicationsCustomizerDialogClass))
#define EXTERNAL_APPLICATIONS_IS_CUSTOMIZER_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EXTERNAL_APPLICATIONS_TYPE_CUSTOMIZER_DIALOG))
#define EXTERNAL_APPLICATIONS_IS_CUSTOMIZER_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EXTERNAL_APPLICATIONS_TYPE_CUSTOMIZER_DIALOG))
#define EXTERNAL_APPLICATIONS_CUSTOMIZER_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EXTERNAL_APPLICATIONS_TYPE_CUSTOMIZER_DIALOG, ExternalApplicationsCustomizerDialogClass))

typedef struct _ExternalApplicationsCustomizerDialog ExternalApplicationsCustomizerDialog;
typedef struct _ExternalApplicationsCustomizerDialogClass ExternalApplicationsCustomizerDialogClass;
typedef struct _ExternalApplicationsCustomizerDialogPrivate ExternalApplicationsCustomizerDialogPrivate;

#define EXTERNAL_APPLICATIONS_TYPE_CHOOSER (external_applications_chooser_get_type ())
#define EXTERNAL_APPLICATIONS_CHOOSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EXTERNAL_APPLICATIONS_TYPE_CHOOSER, ExternalApplicationsChooser))
#define EXTERNAL_APPLICATIONS_CHOOSER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EXTERNAL_APPLICATIONS_TYPE_CHOOSER, ExternalApplicationsChooserClass))
#define EXTERNAL_APPLICATIONS_IS_CHOOSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EXTERNAL_APPLICATIONS_TYPE_CHOOSER))
#define EXTERNAL_APPLICATIONS_IS_CHOOSER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EXTERNAL_APPLICATIONS_TYPE_CHOOSER))
#define EXTERNAL_APPLICATIONS_CHOOSER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EXTERNAL_APPLICATIONS_TYPE_CHOOSER, ExternalApplicationsChooserClass))

typedef struct _ExternalApplicationsChooser ExternalApplicationsChooser;
typedef struct _ExternalApplicationsChooserClass ExternalApplicationsChooserClass;
typedef struct _ExternalApplicationsChooserPrivate ExternalApplicationsChooserPrivate;
typedef struct _Block1Data Block1Data;

#define EXTERNAL_APPLICATIONS_TYPE_CHOOSER_DIALOG (external_applications_chooser_dialog_get_type ())
#define EXTERNAL_APPLICATIONS_CHOOSER_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EXTERNAL_APPLICATIONS_TYPE_CHOOSER_DIALOG, ExternalApplicationsChooserDialog))
#define EXTERNAL_APPLICATIONS_CHOOSER_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EXTERNAL_APPLICATIONS_TYPE_CHOOSER_DIALOG, ExternalApplicationsChooserDialogClass))
#define EXTERNAL_APPLICATIONS_IS_CHOOSER_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EXTERNAL_APPLICATIONS_TYPE_CHOOSER_DIALOG))
#define EXTERNAL_APPLICATIONS_IS_CHOOSER_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EXTERNAL_APPLICATIONS_TYPE_CHOOSER_DIALOG))
#define EXTERNAL_APPLICATIONS_CHOOSER_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EXTERNAL_APPLICATIONS_TYPE_CHOOSER_DIALOG, ExternalApplicationsChooserDialogClass))

typedef struct _ExternalApplicationsChooserDialog ExternalApplicationsChooserDialog;
typedef struct _ExternalApplicationsChooserDialogClass ExternalApplicationsChooserDialogClass;
typedef struct _ExternalApplicationsChooserDialogPrivate ExternalApplicationsChooserDialogPrivate;

#define EXTERNAL_APPLICATIONS_TYPE_CHOOSER_BUTTON (external_applications_chooser_button_get_type ())
#define EXTERNAL_APPLICATIONS_CHOOSER_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EXTERNAL_APPLICATIONS_TYPE_CHOOSER_BUTTON, ExternalApplicationsChooserButton))
#define EXTERNAL_APPLICATIONS_CHOOSER_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EXTERNAL_APPLICATIONS_TYPE_CHOOSER_BUTTON, ExternalApplicationsChooserButtonClass))
#define EXTERNAL_APPLICATIONS_IS_CHOOSER_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EXTERNAL_APPLICATIONS_TYPE_CHOOSER_BUTTON))
#define EXTERNAL_APPLICATIONS_IS_CHOOSER_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EXTERNAL_APPLICATIONS_TYPE_CHOOSER_BUTTON))
#define EXTERNAL_APPLICATIONS_CHOOSER_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EXTERNAL_APPLICATIONS_TYPE_CHOOSER_BUTTON, ExternalApplicationsChooserButtonClass))

typedef struct _ExternalApplicationsChooserButton ExternalApplicationsChooserButton;
typedef struct _ExternalApplicationsChooserButtonClass ExternalApplicationsChooserButtonClass;
typedef struct _ExternalApplicationsChooserButtonPrivate ExternalApplicationsChooserButtonPrivate;
typedef struct _Block2Data Block2Data;
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))

#define EXTERNAL_APPLICATIONS_TYPE_TYPES (external_applications_types_get_type ())
#define EXTERNAL_APPLICATIONS_TYPES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EXTERNAL_APPLICATIONS_TYPE_TYPES, ExternalApplicationsTypes))
#define EXTERNAL_APPLICATIONS_TYPES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EXTERNAL_APPLICATIONS_TYPE_TYPES, ExternalApplicationsTypesClass))
#define EXTERNAL_APPLICATIONS_IS_TYPES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EXTERNAL_APPLICATIONS_TYPE_TYPES))
#define EXTERNAL_APPLICATIONS_IS_TYPES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EXTERNAL_APPLICATIONS_TYPE_TYPES))
#define EXTERNAL_APPLICATIONS_TYPES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EXTERNAL_APPLICATIONS_TYPE_TYPES, ExternalApplicationsTypesClass))

typedef struct _ExternalApplicationsTypes ExternalApplicationsTypes;
typedef struct _ExternalApplicationsTypesClass ExternalApplicationsTypesClass;
typedef struct _ExternalApplicationsTypesPrivate ExternalApplicationsTypesPrivate;
#define __g_list_free__g_free0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_free0_ (var), NULL)))

#define EXTERNAL_APPLICATIONS_TYPE_MANAGER (external_applications_manager_get_type ())
#define EXTERNAL_APPLICATIONS_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EXTERNAL_APPLICATIONS_TYPE_MANAGER, ExternalApplicationsManager))
#define EXTERNAL_APPLICATIONS_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EXTERNAL_APPLICATIONS_TYPE_MANAGER, ExternalApplicationsManagerClass))
#define EXTERNAL_APPLICATIONS_IS_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EXTERNAL_APPLICATIONS_TYPE_MANAGER))
#define EXTERNAL_APPLICATIONS_IS_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EXTERNAL_APPLICATIONS_TYPE_MANAGER))
#define EXTERNAL_APPLICATIONS_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EXTERNAL_APPLICATIONS_TYPE_MANAGER, ExternalApplicationsManagerClass))

typedef struct _ExternalApplicationsManager ExternalApplicationsManager;
typedef struct _ExternalApplicationsManagerClass ExternalApplicationsManagerClass;
typedef struct _ExternalApplicationsManagerPrivate ExternalApplicationsManagerPrivate;

#define EXTERNAL_APPLICATIONS_MANAGER_TYPE_NEXT_STEP (external_applications_manager_next_step_get_type ())
typedef struct _Block3Data Block3Data;
typedef struct _Block4Data Block4Data;
typedef struct _Block5Data Block5Data;
typedef struct _Block6Data Block6Data;
typedef struct _Block7Data Block7Data;
#define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL)))

struct _ExternalApplicationsAssociations {
	GObject parent_instance;
	ExternalApplicationsAssociationsPrivate * priv;
};

struct _ExternalApplicationsAssociationsClass {
	GObjectClass parent_class;
};

struct _ExternalApplicationsCustomizerDialog {
	GtkDialog parent_instance;
	ExternalApplicationsCustomizerDialogPrivate * priv;
	GtkEntry* name_entry;
	GtkEntry* commandline_entry;
};

struct _ExternalApplicationsCustomizerDialogClass {
	GtkDialogClass parent_class;
};

struct _ExternalApplicationsChooser {
	GtkVBox parent_instance;
	ExternalApplicationsChooserPrivate * priv;
};

struct _ExternalApplicationsChooserClass {
	GtkVBoxClass parent_class;
};

struct _ExternalApplicationsChooserPrivate {
	GtkListStore* store;
	GtkTreeView* treeview;
	GList* available;
	gchar* content_type;
	gchar* uri;
};

struct _Block1Data {
	int _ref_count_;
	ExternalApplicationsChooser* self;
	GAppInfo* app_info;
};

struct _ExternalApplicationsChooserDialog {
	GtkDialog parent_instance;
	ExternalApplicationsChooserDialogPrivate * priv;
};

struct _ExternalApplicationsChooserDialogClass {
	GtkDialogClass parent_class;
};

struct _ExternalApplicationsChooserDialogPrivate {
	ExternalApplicationsChooser* _chooser;
};

struct _ExternalApplicationsChooserButton {
	GtkButton parent_instance;
	ExternalApplicationsChooserButtonPrivate * priv;
};

struct _ExternalApplicationsChooserButtonClass {
	GtkButtonClass parent_class;
};

struct _ExternalApplicationsChooserButtonPrivate {
	GAppInfo* _app_info;
	gchar* _commandline;
	ExternalApplicationsChooserDialog* dialog;
	GtkLabel* app_name;
	GtkImage* icon;
};

struct _Block2Data {
	int _ref_count_;
	ExternalApplicationsChooserButton* self;
	gchar* commandline;
};

struct _ExternalApplicationsTypes {
	GtkVBox parent_instance;
	ExternalApplicationsTypesPrivate * priv;
	GtkListStore* store;
};

struct _ExternalApplicationsTypesClass {
	GtkVBoxClass parent_class;
};

struct _ExternalApplicationsTypesPrivate {
	GtkTreeView* treeview;
};

struct _ExternalApplicationsManager {
	MidoriExtension parent_instance;
	ExternalApplicationsManagerPrivate * priv;
};

struct _ExternalApplicationsManagerClass {
	MidoriExtensionClass parent_class;
};

typedef enum  {
	EXTERNAL_APPLICATIONS_MANAGER_NEXT_STEP_TRY_OPEN,
	EXTERNAL_APPLICATIONS_MANAGER_NEXT_STEP_OPEN_WITH
} ExternalApplicationsManagerNextStep;

struct _Block3Data {
	int _ref_count_;
	ExternalApplicationsManager* self;
	WebKitDownload* download;
	gchar* content_type;
	GtkWidget* widget;
	ExternalApplicationsManagerNextStep next_step;
};

struct _Block4Data {
	int _ref_count_;
	ExternalApplicationsManager* self;
	MidoriTab* tab;
};

struct _Block5Data {
	int _ref_count_;
	Block4Data * _data4_;
	gchar* uri;
};

struct _Block6Data {
	int _ref_count_;
	Block4Data * _data4_;
	gchar* uri;
};

struct _Block7Data {
	int _ref_count_;
	ExternalApplicationsManager* self;
	MidoriWebSettings* settings;
	ExternalApplicationsTypes* types;
	KatzePreferences* preferences;
};


static gpointer external_applications_associations_parent_class = NULL;
static gpointer external_applications_customizer_dialog_parent_class = NULL;
static gpointer external_applications_chooser_parent_class = NULL;
static gpointer external_applications_chooser_dialog_parent_class = NULL;
static gpointer external_applications_chooser_button_parent_class = NULL;
static gpointer external_applications_types_parent_class = NULL;
static gpointer external_applications_manager_parent_class = NULL;

gboolean external_applications_open_app_info (GAppInfo* app_info, const gchar* uri, const gchar* content_type);
static void _g_object_unref0_ (gpointer var);
static void _g_list_free__g_object_unref0_ (GList* self);
ExternalApplicationsAssociations* external_applications_associations_new (void);
ExternalApplicationsAssociations* external_applications_associations_construct (GType object_type);
GType external_applications_associations_get_type (void) G_GNUC_CONST;
void external_applications_associations_remember (ExternalApplicationsAssociations* self, const gchar* content_type, GAppInfo* app_info, GError** error);
enum  {
	EXTERNAL_APPLICATIONS_ASSOCIATIONS_DUMMY_PROPERTY
};
gboolean external_applications_associations_open (ExternalApplicationsAssociations* self, const gchar* content_type, const gchar* uri);
void external_applications_associations_remember_custom_commandline (ExternalApplicationsAssociations* self, const gchar* content_type, const gchar* commandline, const gchar* name, const gchar* uri);
gchar* external_applications_get_commandline (GAppInfo* app_info);
gchar* external_applications_describe_app_info (GAppInfo* app_info);
GIcon* external_applications_app_info_get_icon (GAppInfo* app_info);
GType external_applications_customizer_dialog_get_type (void) G_GNUC_CONST;
enum  {
	EXTERNAL_APPLICATIONS_CUSTOMIZER_DIALOG_DUMMY_PROPERTY
};
ExternalApplicationsCustomizerDialog* external_applications_customizer_dialog_new (GAppInfo* app_info, GtkWidget* widget);
ExternalApplicationsCustomizerDialog* external_applications_customizer_dialog_construct (GType object_type, GAppInfo* app_info, GtkWidget* widget);
static void external_applications_customizer_dialog_finalize (GObject* obj);
GType external_applications_chooser_get_type (void) G_GNUC_CONST;
#define EXTERNAL_APPLICATIONS_CHOOSER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), EXTERNAL_APPLICATIONS_TYPE_CHOOSER, ExternalApplicationsChooserPrivate))
enum  {
	EXTERNAL_APPLICATIONS_CHOOSER_DUMMY_PROPERTY
};
ExternalApplicationsChooser* external_applications_chooser_new (const gchar* uri, const gchar* content_type);
ExternalApplicationsChooser* external_applications_chooser_construct (GType object_type, const gchar* uri, const gchar* content_type);
static gint external_applications_chooser_tree_sort_func (ExternalApplicationsChooser* self, GtkTreeModel* model, GtkTreeIter* a, GtkTreeIter* b);
static gint _external_applications_chooser_tree_sort_func_gtk_tree_iter_compare_func (GtkTreeModel* model, GtkTreeIter* a, GtkTreeIter* b, gpointer self);
static void external_applications_chooser_on_render_icon (ExternalApplicationsChooser* self, GtkCellLayout* column, GtkCellRenderer* renderer, GtkTreeModel* model, GtkTreeIter* iter);
static void _external_applications_chooser_on_render_icon_gtk_cell_layout_data_func (GtkCellLayout* cell_layout, GtkCellRenderer* cell, GtkTreeModel* tree_model, GtkTreeIter* iter, gpointer self);
static void external_applications_chooser_on_render_text (ExternalApplicationsChooser* self, GtkCellLayout* column, GtkCellRenderer* renderer, GtkTreeModel* model, GtkTreeIter* iter);
static void _external_applications_chooser_on_render_text_gtk_cell_layout_data_func (GtkCellLayout* cell_layout, GtkCellRenderer* cell, GtkTreeModel* tree_model, GtkTreeIter* iter, gpointer self);
static void external_applications_chooser_row_activated (ExternalApplicationsChooser* self, GtkTreePath* path, GtkTreeViewColumn* column);
static void _external_applications_chooser_row_activated_gtk_tree_view_row_activated (GtkTreeView* _sender, GtkTreePath* path, GtkTreeViewColumn* column, gpointer self);
static gboolean external_applications_chooser_button_released (ExternalApplicationsChooser* self, GdkEventButton* event);
static gboolean _external_applications_chooser_button_released_gtk_widget_button_release_event (GtkWidget* _sender, GdkEventButton* event, gpointer self);
static void external_applications_chooser_launcher_added (ExternalApplicationsChooser* self, GAppInfo* app_info, const gchar* uri);
static gboolean external_applications_chooser_show_popup_menu (ExternalApplicationsChooser* self, GdkEventButton* event);
static Block1Data* block1_data_ref (Block1Data* _data1_);
static void block1_data_unref (void * _userdata_);
static void ___lambda4_ (Block1Data* _data1_);
static void external_applications_chooser_customize_app_info (ExternalApplicationsChooser* self, GAppInfo* app_info, const gchar* content_type, const gchar* uri);
static void ____lambda4__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self);
GList* external_applications_chooser_get_available (ExternalApplicationsChooser* self);
GAppInfo* external_applications_chooser_get_app_info (ExternalApplicationsChooser* self);
static void g_cclosure_user_marshal_VOID__OBJECT_STRING_STRING (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
static void external_applications_chooser_finalize (GObject* obj);
GType external_applications_chooser_dialog_get_type (void) G_GNUC_CONST;
#define EXTERNAL_APPLICATIONS_CHOOSER_DIALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), EXTERNAL_APPLICATIONS_TYPE_CHOOSER_DIALOG, ExternalApplicationsChooserDialogPrivate))
enum  {
	EXTERNAL_APPLICATIONS_CHOOSER_DIALOG_DUMMY_PROPERTY,
	EXTERNAL_APPLICATIONS_CHOOSER_DIALOG_CHOOSER
};
ExternalApplicationsChooserDialog* external_applications_chooser_dialog_new (const gchar* uri, const gchar* content_type, GtkWidget* widget);
ExternalApplicationsChooserDialog* external_applications_chooser_dialog_construct (GType object_type, const gchar* uri, const gchar* content_type, GtkWidget* widget);
static void external_applications_chooser_dialog_set_chooser (ExternalApplicationsChooserDialog* self, ExternalApplicationsChooser* value);
ExternalApplicationsChooser* external_applications_chooser_dialog_get_chooser (ExternalApplicationsChooserDialog* self);
static void __lambda5_ (ExternalApplicationsChooserDialog* self, GAppInfo* app_info);
static void ___lambda5__external_applications_chooser_selected (ExternalApplicationsChooser* _sender, GAppInfo* app_info, gpointer self);
static void __lambda6_ (ExternalApplicationsChooserDialog* self, GAppInfo* app_info, const gchar* content_type, const gchar* uri);
static void ___lambda6__external_applications_chooser_customized (ExternalApplicationsChooser* _sender, GAppInfo* app_info, const gchar* content_type, const gchar* uri, gpointer self);
GAppInfo* external_applications_chooser_dialog_open_with (ExternalApplicationsChooserDialog* self);
static void external_applications_chooser_dialog_finalize (GObject* obj);
static void _vala_external_applications_chooser_dialog_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_external_applications_chooser_dialog_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
GType external_applications_chooser_button_get_type (void) G_GNUC_CONST;
#define EXTERNAL_APPLICATIONS_CHOOSER_BUTTON_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), EXTERNAL_APPLICATIONS_TYPE_CHOOSER_BUTTON, ExternalApplicationsChooserButtonPrivate))
enum  {
	EXTERNAL_APPLICATIONS_CHOOSER_BUTTON_DUMMY_PROPERTY,
	EXTERNAL_APPLICATIONS_CHOOSER_BUTTON_APP_INFO,
	EXTERNAL_APPLICATIONS_CHOOSER_BUTTON_COMMANDLINE
};
ExternalApplicationsChooserButton* external_applications_chooser_button_new (const gchar* mime_type, const gchar* commandline);
ExternalApplicationsChooserButton* external_applications_chooser_button_construct (GType object_type, const gchar* mime_type, const gchar* commandline);
static Block2Data* block2_data_ref (Block2Data* _data2_);
static void block2_data_unref (void * _userdata_);
void external_applications_chooser_button_set_app_info (ExternalApplicationsChooserButton* self, GAppInfo* value);
static void external_applications_chooser_button_update_label (ExternalApplicationsChooserButton* self);
static void __lambda7_ (Block2Data* _data2_);
GAppInfo* external_applications_chooser_button_get_app_info (ExternalApplicationsChooserButton* self);
static void ___lambda7__gtk_button_clicked (GtkButton* _sender, gpointer self);
const gchar* external_applications_chooser_button_get_commandline (ExternalApplicationsChooserButton* self);
void external_applications_chooser_button_set_commandline (ExternalApplicationsChooserButton* self, const gchar* value);
static void external_applications_chooser_button_finalize (GObject* obj);
static void _vala_external_applications_chooser_button_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_external_applications_chooser_button_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
GType external_applications_types_get_type (void) G_GNUC_CONST;
#define EXTERNAL_APPLICATIONS_TYPES_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), EXTERNAL_APPLICATIONS_TYPE_TYPES, ExternalApplicationsTypesPrivate))
enum  {
	EXTERNAL_APPLICATIONS_TYPES_DUMMY_PROPERTY
};
ExternalApplicationsTypes* external_applications_types_new (void);
ExternalApplicationsTypes* external_applications_types_construct (GType object_type);
static gint external_applications_types_tree_sort_func (ExternalApplicationsTypes* self, GtkTreeModel* model, GtkTreeIter* a, GtkTreeIter* b);
static gint _external_applications_types_tree_sort_func_gtk_tree_iter_compare_func (GtkTreeModel* model, GtkTreeIter* a, GtkTreeIter* b, gpointer self);
static void external_applications_types_on_render_type_icon (ExternalApplicationsTypes* self, GtkCellLayout* column, GtkCellRenderer* renderer, GtkTreeModel* model, GtkTreeIter* iter);
static void _external_applications_types_on_render_type_icon_gtk_cell_layout_data_func (GtkCellLayout* cell_layout, GtkCellRenderer* cell, GtkTreeModel* tree_model, GtkTreeIter* iter, gpointer self);
static void external_applications_types_on_render_type_text (ExternalApplicationsTypes* self, GtkCellLayout* column, GtkCellRenderer* renderer, GtkTreeModel* model, GtkTreeIter* iter);
static void _external_applications_types_on_render_type_text_gtk_cell_layout_data_func (GtkCellLayout* cell_layout, GtkCellRenderer* cell, GtkTreeModel* tree_model, GtkTreeIter* iter, gpointer self);
static void external_applications_types_on_render_icon (ExternalApplicationsTypes* self, GtkCellLayout* column, GtkCellRenderer* renderer, GtkTreeModel* model, GtkTreeIter* iter);
static void _external_applications_types_on_render_icon_gtk_cell_layout_data_func (GtkCellLayout* cell_layout, GtkCellRenderer* cell, GtkTreeModel* tree_model, GtkTreeIter* iter, gpointer self);
static void external_applications_types_on_render_text (ExternalApplicationsTypes* self, GtkCellLayout* column, GtkCellRenderer* renderer, GtkTreeModel* model, GtkTreeIter* iter);
static void _external_applications_types_on_render_text_gtk_cell_layout_data_func (GtkCellLayout* cell_layout, GtkCellRenderer* cell, GtkTreeModel* tree_model, GtkTreeIter* iter, gpointer self);
static void external_applications_types_row_activated (ExternalApplicationsTypes* self, GtkTreePath* path, GtkTreeViewColumn* column);
static void _external_applications_types_row_activated_gtk_tree_view_row_activated (GtkTreeView* _sender, GtkTreePath* path, GtkTreeViewColumn* column, gpointer self);
static void external_applications_types_launcher_added (ExternalApplicationsTypes* self, const gchar* content_type);
static void _g_free0_ (gpointer var);
static void _g_list_free__g_free0_ (GList* self);
static void __lambda8_ (ExternalApplicationsTypes* self, GdkRectangle* allocation);
static void ___lambda8__gtk_widget_size_allocate (GtkWidget* _sender, GdkRectangle* allocation, gpointer self);
static void g_cclosure_user_marshal_VOID__STRING_BOXED (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
static void external_applications_types_finalize (GObject* obj);
GType external_applications_manager_get_type (void) G_GNUC_CONST;
enum  {
	EXTERNAL_APPLICATIONS_MANAGER_DUMMY_PROPERTY
};
static GType external_applications_manager_next_step_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
static gboolean external_applications_manager_open_uri (ExternalApplicationsManager* self, MidoriTab* tab, const gchar* uri);
static gboolean external_applications_manager_open_with_type (ExternalApplicationsManager* self, const gchar* uri, const gchar* content_type, GtkWidget* widget, ExternalApplicationsManagerNextStep next_step);
static gchar* external_applications_manager_get_content_type (ExternalApplicationsManager* self, const gchar* uri, const gchar* mime_type);
static gboolean external_applications_manager_navigation_requested (ExternalApplicationsManager* self, MidoriTab* tab, const gchar* uri);
static Block3Data* block3_data_ref (Block3Data* _data3_);
static void block3_data_unref (void * _userdata_);
static gboolean external_applications_manager_open_now (ExternalApplicationsManager* self, const gchar* uri, const gchar* content_type, GtkWidget* widget, ExternalApplicationsManagerNextStep next_step);
static void __lambda9_ (Block3Data* _data3_, GParamSpec* pspec);
static void ___lambda9__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static GAppInfo* external_applications_manager_open_with (ExternalApplicationsManager* self, const gchar* uri, const gchar* content_type, GtkWidget* widget);
static void external_applications_manager_context_menu (ExternalApplicationsManager* self, MidoriTab* tab, WebKitHitTestResult* hit_test_result, MidoriContextAction* menu);
static Block4Data* block4_data_ref (Block4Data* _data4_);
static void block4_data_unref (void * _userdata_);
static Block5Data* block5_data_ref (Block5Data* _data5_);
static void block5_data_unref (void * _userdata_);
static void ___lambda10_ (Block5Data* _data5_, GtkAction* action);
static void ____lambda10__gtk_action_activate (GtkAction* _sender, gpointer self);
static Block6Data* block6_data_ref (Block6Data* _data6_);
static void block6_data_unref (void * _userdata_);
static void ___lambda11_ (Block6Data* _data6_, GtkAction* action);
static void ____lambda11__gtk_action_activate (GtkAction* _sender, gpointer self);
static void external_applications_manager_show_preferences (ExternalApplicationsManager* self, KatzePreferences* preferences);
static Block7Data* block7_data_ref (Block7Data* _data7_);
static void block7_data_unref (void * _userdata_);
static void __lambda12_ (Block7Data* _data7_, const gchar* commandline);
static void ___lambda12__external_applications_chooser_button_selected (ExternalApplicationsChooserButton* _sender, const gchar* commandline, gpointer self);
static void __lambda13_ (Block7Data* _data7_, const gchar* commandline);
static void ___lambda13__external_applications_chooser_button_selected (ExternalApplicationsChooserButton* _sender, const gchar* commandline, gpointer self);
static void __lambda14_ (Block7Data* _data7_, const gchar* content_type, GtkTreeIter* iter);
static void ___lambda14__external_applications_types_selected (ExternalApplicationsTypes* _sender, const gchar* content_type, GtkTreeIter* iter, gpointer self);
void external_applications_manager_tab_added (ExternalApplicationsManager* self, MidoriBrowser* browser, MidoriView* view);
static gboolean _external_applications_manager_navigation_requested_midori_tab_navigation_requested (MidoriTab* _sender, const gchar* uri, gpointer self);
static gboolean _external_applications_manager_open_uri_midori_tab_open_uri (MidoriTab* _sender, const gchar* uri, gpointer self);
static void _external_applications_manager_context_menu_midori_tab_context_menu (MidoriTab* _sender, WebKitHitTestResult* hit_test_result, MidoriContextAction* menu, gpointer self);
void external_applications_manager_tab_removed (ExternalApplicationsManager* self, MidoriBrowser* browser, MidoriView* view);
static void external_applications_manager_browser_added (ExternalApplicationsManager* self, MidoriBrowser* browser);
static void _external_applications_manager_tab_added_midori_browser_add_tab (MidoriBrowser* _sender, MidoriView* tab, gpointer self);
static void _external_applications_manager_tab_removed_midori_browser_remove_tab (MidoriBrowser* _sender, MidoriView* tab, gpointer self);
static void _external_applications_manager_show_preferences_midori_browser_show_preferences (MidoriBrowser* _sender, KatzePreferences* preferences, gpointer self);
static void external_applications_manager_activated (ExternalApplicationsManager* self, MidoriApp* app);
static void _external_applications_manager_browser_added_midori_app_add_browser (MidoriApp* _sender, MidoriBrowser* browser, gpointer self);
static void external_applications_manager_browser_removed (ExternalApplicationsManager* self, MidoriBrowser* browser);
static void external_applications_manager_deactivated (ExternalApplicationsManager* self);
ExternalApplicationsManager* external_applications_manager_new (void);
ExternalApplicationsManager* external_applications_manager_construct (GType object_type);
static void _external_applications_manager_activated_midori_extension_activate (MidoriExtension* _sender, MidoriApp* app, gpointer self);
static void _external_applications_manager_deactivated_midori_extension_deactivate (MidoriExtension* _sender, gpointer self);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
static gint _vala_array_length (gpointer array);


static void _g_object_unref0_ (gpointer var) {
#line 29 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
#line 455 "open-with.c"
}


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


gboolean external_applications_open_app_info (GAppInfo* app_info, const gchar* uri, const gchar* content_type) {
	gboolean result = FALSE;
	const gchar* _tmp0_ = NULL;
	GError * _inner_error_ = NULL;
#line 23 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (app_info != NULL, FALSE);
#line 23 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (uri != NULL, FALSE);
#line 23 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (content_type != NULL, FALSE);
#line 24 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = uri;
#line 24 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	midori_uri_recursive_fork_protection (_tmp0_, TRUE);
#line 482 "open-with.c"
	{
		GList* uris = NULL;
		const gchar* _tmp1_ = NULL;
		GFile* _tmp2_ = NULL;
		GAppInfo* _tmp3_ = NULL;
		GList* _tmp4_ = NULL;
#line 27 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		uris = NULL;
#line 28 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp1_ = uri;
#line 28 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp2_ = g_file_new_for_uri (_tmp1_);
#line 28 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		uris = g_list_append (uris, _tmp2_);
#line 29 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp3_ = app_info;
#line 29 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp4_ = uris;
#line 29 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		g_app_info_launch (_tmp3_, _tmp4_, NULL, &_inner_error_);
#line 29 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 29 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
			__g_list_free__g_object_unref0_0 (uris);
#line 507 "open-with.c"
			goto __catch0_g_error;
		}
#line 26 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		__g_list_free__g_object_unref0_0 (uris);
#line 512 "open-with.c"
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* _error_ = NULL;
		const gchar* _tmp5_ = NULL;
		GError* _tmp6_ = NULL;
		const gchar* _tmp7_ = NULL;
#line 26 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_error_ = _inner_error_;
#line 26 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_inner_error_ = NULL;
#line 31 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp5_ = uri;
#line 31 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp6_ = _error_;
#line 31 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp7_ = _tmp6_->message;
#line 31 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		g_warning ("open-with.vala:31: Failed to open \"%s\": %s", _tmp5_, _tmp7_);
#line 32 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		result = FALSE;
#line 32 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_error_free0 (_error_);
#line 32 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		return result;
#line 539 "open-with.c"
	}
	__finally0:
#line 26 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 26 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 26 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		g_clear_error (&_inner_error_);
#line 26 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		return FALSE;
#line 550 "open-with.c"
	}
	{
		ExternalApplicationsAssociations* _tmp8_ = NULL;
		ExternalApplicationsAssociations* _tmp9_ = NULL;
		const gchar* _tmp10_ = NULL;
		GAppInfo* _tmp11_ = NULL;
#line 36 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp8_ = external_applications_associations_new ();
#line 36 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp9_ = _tmp8_;
#line 36 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp10_ = content_type;
#line 36 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp11_ = app_info;
#line 36 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		external_applications_associations_remember (_tmp9_, _tmp10_, _tmp11_, &_inner_error_);
#line 36 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_object_unref0 (_tmp9_);
#line 36 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 571 "open-with.c"
			goto __catch1_g_error;
		}
	}
	goto __finally1;
	__catch1_g_error:
	{
		GError* _error_ = NULL;
		const gchar* _tmp12_ = NULL;
		GError* _tmp13_ = NULL;
		const gchar* _tmp14_ = NULL;
#line 35 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_error_ = _inner_error_;
#line 35 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_inner_error_ = NULL;
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp12_ = uri;
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp13_ = _error_;
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp14_ = _tmp13_->message;
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		g_warning ("open-with.vala:38: Failed to save association for \"%s\": %s", _tmp12_, _tmp14_);
#line 35 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_error_free0 (_error_);
#line 596 "open-with.c"
	}
	__finally1:
#line 35 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 35 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 35 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		g_clear_error (&_inner_error_);
#line 35 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		return FALSE;
#line 607 "open-with.c"
	}
#line 40 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	result = TRUE;
#line 40 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	return result;
#line 613 "open-with.c"
}


ExternalApplicationsAssociations* external_applications_associations_construct (GType object_type) {
	ExternalApplicationsAssociations * self = NULL;
#line 101 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	self = (ExternalApplicationsAssociations*) g_object_new (object_type, NULL);
#line 101 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	return self;
#line 623 "open-with.c"
}


ExternalApplicationsAssociations* external_applications_associations_new (void) {
#line 101 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	return external_applications_associations_construct (EXTERNAL_APPLICATIONS_TYPE_ASSOCIATIONS);
#line 630 "open-with.c"
}


gboolean external_applications_associations_open (ExternalApplicationsAssociations* self, const gchar* content_type, const gchar* uri) {
	gboolean result = FALSE;
	GAppInfo* app_info = NULL;
	const gchar* _tmp0_ = NULL;
	GAppInfo* _tmp1_ = NULL;
	GAppInfo* _tmp2_ = NULL;
	GAppInfo* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
	gboolean _tmp6_ = FALSE;
#line 106 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 106 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (content_type != NULL, FALSE);
#line 106 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (uri != NULL, FALSE);
#line 107 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = content_type;
#line 107 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = g_app_info_get_default_for_type (_tmp0_, FALSE);
#line 107 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	app_info = _tmp1_;
#line 108 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp2_ = app_info;
#line 108 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (_tmp2_ == NULL) {
#line 109 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		result = FALSE;
#line 109 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_object_unref0 (app_info);
#line 109 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		return result;
#line 666 "open-with.c"
	}
#line 110 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp3_ = app_info;
#line 110 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp4_ = uri;
#line 110 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp5_ = content_type;
#line 110 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp6_ = external_applications_open_app_info (_tmp3_, _tmp4_, _tmp5_);
#line 110 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	result = _tmp6_;
#line 110 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (app_info);
#line 110 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	return result;
#line 682 "open-with.c"
}


void external_applications_associations_remember (ExternalApplicationsAssociations* self, const gchar* content_type, GAppInfo* app_info, GError** error) {
	GAppInfo* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	GAppInfo* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	GError * _inner_error_ = NULL;
#line 114 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (self != NULL);
#line 114 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (content_type != NULL);
#line 114 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (app_info != NULL);
#line 115 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = app_info;
#line 115 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = content_type;
#line 115 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_app_info_set_as_last_used_for_type (_tmp0_, _tmp1_, &_inner_error_);
#line 115 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 115 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		g_propagate_error (error, _inner_error_);
#line 115 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		return;
#line 710 "open-with.c"
	}
#line 116 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp2_ = app_info;
#line 116 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp3_ = content_type;
#line 116 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_app_info_set_as_default_for_type (_tmp2_, _tmp3_, &_inner_error_);
#line 116 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 116 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		g_propagate_error (error, _inner_error_);
#line 116 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		return;
#line 724 "open-with.c"
	}
}


static gboolean string_contains (const gchar* self, const gchar* needle) {
	gboolean result = FALSE;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 1278 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, FALSE);
#line 1278 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	g_return_val_if_fail (needle != NULL, FALSE);
#line 1279 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp0_ = needle;
#line 1279 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp1_ = strstr ((gchar*) self, (gchar*) _tmp0_);
#line 1279 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	result = _tmp1_ != NULL;
#line 1279 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	return result;
#line 745 "open-with.c"
}


void external_applications_associations_remember_custom_commandline (ExternalApplicationsAssociations* self, const gchar* content_type, const gchar* commandline, const gchar* name, const gchar* uri) {
	GError * _inner_error_ = NULL;
#line 120 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (self != NULL);
#line 120 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (content_type != NULL);
#line 120 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (commandline != NULL);
#line 120 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (name != NULL);
#line 120 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (uri != NULL);
#line 761 "open-with.c"
	{
		GAppInfoCreateFlags _tmp0_ = 0;
		const gchar* _tmp1_ = NULL;
		gboolean _tmp2_ = FALSE;
		GAppInfo* app_info = NULL;
		const gchar* _tmp3_ = NULL;
		const gchar* _tmp4_ = NULL;
		GAppInfo* _tmp5_ = NULL;
		const gchar* _tmp6_ = NULL;
		const gchar* _tmp7_ = NULL;
#line 123 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp1_ = commandline;
#line 123 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp2_ = string_contains (_tmp1_, "%u");
#line 123 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		if (_tmp2_) {
#line 123 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
			_tmp0_ = G_APP_INFO_CREATE_SUPPORTS_URIS;
#line 780 "open-with.c"
		} else {
#line 123 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
			_tmp0_ = G_APP_INFO_CREATE_NONE;
#line 784 "open-with.c"
		}
#line 122 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp3_ = commandline;
#line 122 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp4_ = name;
#line 122 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp5_ = g_app_info_create_from_commandline (_tmp3_, _tmp4_, _tmp0_, &_inner_error_);
#line 122 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		app_info = _tmp5_;
#line 122 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 796 "open-with.c"
			goto __catch2_g_error;
		}
#line 124 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp6_ = uri;
#line 124 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp7_ = content_type;
#line 124 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		external_applications_open_app_info (app_info, _tmp6_, _tmp7_);
#line 121 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_object_unref0 (app_info);
#line 807 "open-with.c"
	}
	goto __finally2;
	__catch2_g_error:
	{
		GError* _error_ = NULL;
		const gchar* _tmp8_ = NULL;
		GError* _tmp9_ = NULL;
		const gchar* _tmp10_ = NULL;
#line 121 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_error_ = _inner_error_;
#line 121 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_inner_error_ = NULL;
#line 126 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp8_ = uri;
#line 126 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp9_ = _error_;
#line 126 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp10_ = _tmp9_->message;
#line 126 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		g_warning ("open-with.vala:126: Failed to remember custom command line for \"%s\":" \
" %s", _tmp8_, _tmp10_);
#line 121 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_error_free0 (_error_);
#line 830 "open-with.c"
	}
	__finally2:
#line 121 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 121 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 121 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		g_clear_error (&_inner_error_);
#line 121 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		return;
#line 841 "open-with.c"
	}
}


static void external_applications_associations_class_init (ExternalApplicationsAssociationsClass * klass) {
#line 43 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	external_applications_associations_parent_class = g_type_class_peek_parent (klass);
#line 849 "open-with.c"
}


static void external_applications_associations_instance_init (ExternalApplicationsAssociations * self) {
}


GType external_applications_associations_get_type (void) {
	static volatile gsize external_applications_associations_type_id__volatile = 0;
	if (g_once_init_enter (&external_applications_associations_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ExternalApplicationsAssociationsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) external_applications_associations_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ExternalApplicationsAssociations), 0, (GInstanceInitFunc) external_applications_associations_instance_init, NULL };
		GType external_applications_associations_type_id;
		external_applications_associations_type_id = g_type_register_static (G_TYPE_OBJECT, "ExternalApplicationsAssociations", &g_define_type_info, 0);
		g_once_init_leave (&external_applications_associations_type_id__volatile, external_applications_associations_type_id);
	}
	return external_applications_associations_type_id__volatile;
}


gchar* external_applications_get_commandline (GAppInfo* app_info) {
	gchar* result = NULL;
	const gchar* _tmp0_ = NULL;
	GAppInfo* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	gchar* _tmp5_ = NULL;
#line 132 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (app_info != NULL, NULL);
#line 133 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = app_info;
#line 133 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp2_ = g_app_info_get_commandline (_tmp1_);
#line 133 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = _tmp2_;
#line 133 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (_tmp0_ == NULL) {
#line 885 "open-with.c"
		GAppInfo* _tmp3_ = NULL;
		const gchar* _tmp4_ = NULL;
#line 133 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp3_ = app_info;
#line 133 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp4_ = g_app_info_get_executable (_tmp3_);
#line 133 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp0_ = _tmp4_;
#line 894 "open-with.c"
	}
#line 133 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp5_ = g_strdup (_tmp0_);
#line 133 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	result = _tmp5_;
#line 133 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	return result;
#line 902 "open-with.c"
}


gchar* external_applications_describe_app_info (GAppInfo* app_info) {
	gchar* result = NULL;
	gchar* _tmp0_ = NULL;
	GAppInfo* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	gchar* name = NULL;
	gchar* _tmp7_ = NULL;
	gchar* _tmp8_ = NULL;
	GAppInfo* _tmp9_ = NULL;
	const gchar* _tmp10_ = NULL;
	gchar* _tmp11_ = NULL;
	gchar* desc = NULL;
	gchar* _tmp14_ = NULL;
	const gchar* _tmp15_ = NULL;
	gchar* _tmp16_ = NULL;
#line 137 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (app_info != NULL, NULL);
#line 138 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = app_info;
#line 138 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp2_ = g_app_info_get_display_name (_tmp1_);
#line 138 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp3_ = g_strdup (_tmp2_);
#line 138 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = _tmp3_;
#line 138 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (_tmp0_ == NULL) {
#line 934 "open-with.c"
		GAppInfo* _tmp4_ = NULL;
		const gchar* _tmp5_ = NULL;
		gchar* _tmp6_ = NULL;
#line 138 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp4_ = app_info;
#line 138 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp5_ = g_app_info_get_executable (_tmp4_);
#line 138 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp6_ = g_path_get_basename (_tmp5_);
#line 138 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_free0 (_tmp0_);
#line 138 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp0_ = _tmp6_;
#line 948 "open-with.c"
	}
#line 138 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp7_ = _tmp0_;
#line 138 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = NULL;
#line 138 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	name = _tmp7_;
#line 139 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp9_ = app_info;
#line 139 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp10_ = g_app_info_get_description (_tmp9_);
#line 139 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp11_ = g_strdup (_tmp10_);
#line 139 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp8_ = _tmp11_;
#line 139 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (_tmp8_ == NULL) {
#line 966 "open-with.c"
		GAppInfo* _tmp12_ = NULL;
		gchar* _tmp13_ = NULL;
#line 139 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp12_ = app_info;
#line 139 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp13_ = external_applications_get_commandline (_tmp12_);
#line 139 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_free0 (_tmp8_);
#line 139 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp8_ = _tmp13_;
#line 977 "open-with.c"
	}
#line 139 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp14_ = _tmp8_;
#line 139 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp8_ = NULL;
#line 139 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	desc = _tmp14_;
#line 140 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp15_ = name;
#line 140 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp16_ = g_markup_printf_escaped ("<b>%s</b>\n%s", _tmp15_, desc);
#line 140 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	result = _tmp16_;
#line 140 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_free0 (desc);
#line 140 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_free0 (_tmp8_);
#line 140 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_free0 (name);
#line 140 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_free0 (_tmp0_);
#line 140 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	return result;
#line 1001 "open-with.c"
}


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


GIcon* external_applications_app_info_get_icon (GAppInfo* app_info) {
	GIcon* result = NULL;
	GAppInfo* _tmp0_ = NULL;
	GIcon* _tmp1_ = NULL;
	GIcon* _tmp2_ = NULL;
#line 143 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (app_info != NULL, NULL);
#line 147 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = app_info;
#line 147 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = g_app_info_get_icon (_tmp0_);
#line 147 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 147 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	result = _tmp2_;
#line 147 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	return result;
#line 1029 "open-with.c"
}


ExternalApplicationsCustomizerDialog* external_applications_customizer_dialog_construct (GType object_type, GAppInfo* app_info, GtkWidget* widget) {
	ExternalApplicationsCustomizerDialog * self = NULL;
	MidoriBrowser* browser = NULL;
	GtkWidget* _tmp0_ = NULL;
	MidoriBrowser* _tmp1_ = NULL;
	MidoriBrowser* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	GtkVBox* vbox = NULL;
	GtkVBox* _tmp4_ = NULL;
	GtkWidget* _tmp5_ = NULL;
	GtkSizeGroup* sizegroup = NULL;
	GtkSizeGroup* _tmp6_ = NULL;
	GtkLabel* label = NULL;
	const gchar* _tmp7_ = NULL;
	GtkLabel* _tmp8_ = NULL;
	GtkLabel* _tmp9_ = NULL;
	GtkLabel* _tmp10_ = NULL;
	GtkLabel* _tmp11_ = NULL;
	GtkEntry* _tmp12_ = NULL;
	GtkEntry* _tmp13_ = NULL;
	GtkEntry* _tmp14_ = NULL;
	GtkEntry* _tmp15_ = NULL;
	const gchar* _tmp16_ = NULL;
	GtkLabel* _tmp17_ = NULL;
	GtkLabel* _tmp18_ = NULL;
	GtkLabel* _tmp19_ = NULL;
	GtkLabel* _tmp20_ = NULL;
	GtkEntry* _tmp21_ = NULL;
	GtkEntry* _tmp22_ = NULL;
	GtkEntry* _tmp23_ = NULL;
	GtkEntry* _tmp24_ = NULL;
	GtkEntry* _tmp25_ = NULL;
	GtkWidget* _tmp26_ = NULL;
	GtkEntry* _tmp27_ = NULL;
	GAppInfo* _tmp28_ = NULL;
	const gchar* _tmp29_ = NULL;
	GtkEntry* _tmp30_ = NULL;
	GAppInfo* _tmp31_ = NULL;
	gchar* _tmp32_ = NULL;
	gchar* _tmp33_ = NULL;
#line 155 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (app_info != NULL, NULL);
#line 155 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (widget != NULL, NULL);
#line 155 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	self = (ExternalApplicationsCustomizerDialog*) g_object_new (object_type, NULL);
#line 156 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = widget;
#line 156 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = midori_browser_get_for_widget (_tmp0_);
#line 156 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 156 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	browser = _tmp2_;
#line 157 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_window_set_transient_for ((GtkWindow*) self, (GtkWindow*) browser);
#line 159 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp3_ = _ ("Custom…");
#line 159 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_window_set_title ((GtkWindow*) self, _tmp3_);
#line 161 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_dialog_set_has_separator ((GtkDialog*) self, FALSE);
#line 163 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_window_set_destroy_with_parent ((GtkWindow*) self, TRUE);
#line 164 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_window_set_icon_name ((GtkWindow*) self, GTK_STOCK_OPEN);
#line 165 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_window_set_resizable ((GtkWindow*) self, FALSE);
#line 166 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_dialog_add_buttons ((GtkDialog*) self, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, NULL);
#line 169 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp4_ = (GtkVBox*) gtk_vbox_new (FALSE, 8);
#line 169 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_ref_sink (_tmp4_);
#line 169 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	vbox = _tmp4_;
#line 170 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_container_set_border_width ((GtkContainer*) vbox, (guint) 8);
#line 171 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp5_ = gtk_dialog_get_content_area ((GtkDialog*) self);
#line 171 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_box_pack_start (G_TYPE_CHECK_INSTANCE_TYPE (_tmp5_, GTK_TYPE_BOX) ? ((GtkBox*) _tmp5_) : NULL, (GtkWidget*) vbox, TRUE, TRUE, (guint) 8);
#line 173 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp6_ = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
#line 173 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	sizegroup = _tmp6_;
#line 174 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp7_ = _ ("Name:");
#line 174 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp8_ = (GtkLabel*) gtk_label_new (_tmp7_);
#line 174 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_ref_sink (_tmp8_);
#line 174 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	label = _tmp8_;
#line 175 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp9_ = label;
#line 175 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_size_group_add_widget (sizegroup, (GtkWidget*) _tmp9_);
#line 176 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp10_ = label;
#line 176 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_misc_set_alignment ((GtkMisc*) _tmp10_, 0.0f, 0.5f);
#line 177 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp11_ = label;
#line 177 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_box_pack_start ((GtkBox*) vbox, (GtkWidget*) _tmp11_, FALSE, FALSE, (guint) 0);
#line 178 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp12_ = (GtkEntry*) gtk_entry_new ();
#line 178 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_ref_sink (_tmp12_);
#line 178 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (self->name_entry);
#line 178 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	self->name_entry = _tmp12_;
#line 179 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp13_ = self->name_entry;
#line 179 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_entry_set_activates_default (_tmp13_, TRUE);
#line 180 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp14_ = self->name_entry;
#line 180 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_size_group_add_widget (sizegroup, (GtkWidget*) _tmp14_);
#line 181 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp15_ = self->name_entry;
#line 181 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_box_pack_start ((GtkBox*) vbox, (GtkWidget*) _tmp15_, TRUE, TRUE, (guint) 0);
#line 183 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp16_ = _ ("Command Line:");
#line 183 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp17_ = (GtkLabel*) gtk_label_new (_tmp16_);
#line 183 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_ref_sink (_tmp17_);
#line 183 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (label);
#line 183 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	label = _tmp17_;
#line 184 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp18_ = label;
#line 184 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_size_group_add_widget (sizegroup, (GtkWidget*) _tmp18_);
#line 185 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp19_ = label;
#line 185 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_misc_set_alignment ((GtkMisc*) _tmp19_, 0.0f, 0.5f);
#line 186 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp20_ = label;
#line 186 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_box_pack_start ((GtkBox*) vbox, (GtkWidget*) _tmp20_, FALSE, FALSE, (guint) 0);
#line 187 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp21_ = (GtkEntry*) gtk_entry_new ();
#line 187 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_ref_sink (_tmp21_);
#line 187 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (self->commandline_entry);
#line 187 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	self->commandline_entry = _tmp21_;
#line 188 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp22_ = self->commandline_entry;
#line 188 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_entry_set_activates_default (_tmp22_, TRUE);
#line 189 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp23_ = self->name_entry;
#line 189 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_size_group_add_widget (sizegroup, (GtkWidget*) _tmp23_);
#line 190 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp24_ = self->commandline_entry;
#line 190 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_size_group_add_widget (sizegroup, (GtkWidget*) _tmp24_);
#line 191 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp25_ = self->commandline_entry;
#line 191 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_box_pack_start ((GtkBox*) vbox, (GtkWidget*) _tmp25_, TRUE, TRUE, (guint) 0);
#line 192 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp26_ = gtk_dialog_get_content_area ((GtkDialog*) self);
#line 192 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_widget_show_all (_tmp26_);
#line 193 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_dialog_set_default_response ((GtkDialog*) self, (gint) GTK_RESPONSE_ACCEPT);
#line 195 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp27_ = self->name_entry;
#line 195 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp28_ = app_info;
#line 195 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp29_ = g_app_info_get_name (_tmp28_);
#line 195 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_entry_set_text (_tmp27_, _tmp29_);
#line 196 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp30_ = self->commandline_entry;
#line 196 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp31_ = app_info;
#line 196 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp32_ = external_applications_get_commandline (_tmp31_);
#line 196 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp33_ = _tmp32_;
#line 196 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_entry_set_text (_tmp30_, _tmp33_);
#line 196 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_free0 (_tmp33_);
#line 155 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (label);
#line 155 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (sizegroup);
#line 155 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (vbox);
#line 155 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (browser);
#line 155 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	return self;
#line 1241 "open-with.c"
}


ExternalApplicationsCustomizerDialog* external_applications_customizer_dialog_new (GAppInfo* app_info, GtkWidget* widget) {
#line 155 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	return external_applications_customizer_dialog_construct (EXTERNAL_APPLICATIONS_TYPE_CUSTOMIZER_DIALOG, app_info, widget);
#line 1248 "open-with.c"
}


static void external_applications_customizer_dialog_class_init (ExternalApplicationsCustomizerDialogClass * klass) {
#line 151 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	external_applications_customizer_dialog_parent_class = g_type_class_peek_parent (klass);
#line 151 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	G_OBJECT_CLASS (klass)->finalize = external_applications_customizer_dialog_finalize;
#line 1257 "open-with.c"
}


static void external_applications_customizer_dialog_instance_init (ExternalApplicationsCustomizerDialog * self) {
}


static void external_applications_customizer_dialog_finalize (GObject* obj) {
	ExternalApplicationsCustomizerDialog * self;
#line 151 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, EXTERNAL_APPLICATIONS_TYPE_CUSTOMIZER_DIALOG, ExternalApplicationsCustomizerDialog);
#line 152 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (self->name_entry);
#line 153 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (self->commandline_entry);
#line 151 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	G_OBJECT_CLASS (external_applications_customizer_dialog_parent_class)->finalize (obj);
#line 1275 "open-with.c"
}


GType external_applications_customizer_dialog_get_type (void) {
	static volatile gsize external_applications_customizer_dialog_type_id__volatile = 0;
	if (g_once_init_enter (&external_applications_customizer_dialog_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ExternalApplicationsCustomizerDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) external_applications_customizer_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ExternalApplicationsCustomizerDialog), 0, (GInstanceInitFunc) external_applications_customizer_dialog_instance_init, NULL };
		GType external_applications_customizer_dialog_type_id;
		external_applications_customizer_dialog_type_id = g_type_register_static (GTK_TYPE_DIALOG, "ExternalApplicationsCustomizerDialog", &g_define_type_info, 0);
		g_once_init_leave (&external_applications_customizer_dialog_type_id__volatile, external_applications_customizer_dialog_type_id);
	}
	return external_applications_customizer_dialog_type_id__volatile;
}


static gint _external_applications_chooser_tree_sort_func_gtk_tree_iter_compare_func (GtkTreeModel* model, GtkTreeIter* a, GtkTreeIter* b, gpointer self) {
	gint result;
	result = external_applications_chooser_tree_sort_func ((ExternalApplicationsChooser*) self, model, a, b);
#line 217 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	return result;
#line 1296 "open-with.c"
}


static void _external_applications_chooser_on_render_icon_gtk_cell_layout_data_func (GtkCellLayout* cell_layout, GtkCellRenderer* cell, GtkTreeModel* tree_model, GtkTreeIter* iter, gpointer self) {
#line 222 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	external_applications_chooser_on_render_icon ((ExternalApplicationsChooser*) self, cell_layout, cell, tree_model, iter);
#line 1303 "open-with.c"
}


static void _external_applications_chooser_on_render_text_gtk_cell_layout_data_func (GtkCellLayout* cell_layout, GtkCellRenderer* cell, GtkTreeModel* tree_model, GtkTreeIter* iter, gpointer self) {
#line 230 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	external_applications_chooser_on_render_text ((ExternalApplicationsChooser*) self, cell_layout, cell, tree_model, iter);
#line 1310 "open-with.c"
}


static void _external_applications_chooser_row_activated_gtk_tree_view_row_activated (GtkTreeView* _sender, GtkTreePath* path, GtkTreeViewColumn* column, gpointer self) {
#line 233 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	external_applications_chooser_row_activated ((ExternalApplicationsChooser*) self, path, column);
#line 1317 "open-with.c"
}


static gboolean _external_applications_chooser_button_released_gtk_widget_button_release_event (GtkWidget* _sender, GdkEventButton* event, gpointer self) {
	gboolean result;
	result = external_applications_chooser_button_released ((ExternalApplicationsChooser*) self, event);
#line 242 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	return result;
#line 1326 "open-with.c"
}


ExternalApplicationsChooser* external_applications_chooser_construct (GType object_type, const gchar* uri, const gchar* content_type) {
	ExternalApplicationsChooser * self = NULL;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	GtkTreeViewColumn* column = NULL;
	GtkListStore* _tmp4_ = NULL;
	GtkTreeView* _tmp5_ = NULL;
	GtkTreeView* _tmp6_ = NULL;
	GtkListStore* _tmp7_ = NULL;
	GtkListStore* _tmp8_ = NULL;
	GtkTreeViewColumn* _tmp9_ = NULL;
	GtkCellRendererPixbuf* renderer_icon = NULL;
	GtkCellRendererPixbuf* _tmp10_ = NULL;
	GtkTreeViewColumn* _tmp11_ = NULL;
	GtkCellRendererPixbuf* _tmp12_ = NULL;
	GtkTreeViewColumn* _tmp13_ = NULL;
	GtkCellRendererPixbuf* _tmp14_ = NULL;
	GtkTreeView* _tmp15_ = NULL;
	GtkTreeViewColumn* _tmp16_ = NULL;
	GtkTreeViewColumn* _tmp17_ = NULL;
	GtkTreeViewColumn* _tmp18_ = NULL;
	GtkCellRendererText* renderer_text = NULL;
	GtkCellRendererText* _tmp19_ = NULL;
	GtkTreeViewColumn* _tmp20_ = NULL;
	GtkCellRendererText* _tmp21_ = NULL;
	GtkTreeViewColumn* _tmp22_ = NULL;
	GtkTreeViewColumn* _tmp23_ = NULL;
	GtkCellRendererText* _tmp24_ = NULL;
	GtkTreeView* _tmp25_ = NULL;
	GtkTreeViewColumn* _tmp26_ = NULL;
	GtkTreeView* _tmp27_ = NULL;
	GtkTreeView* _tmp28_ = NULL;
	GtkScrolledWindow* scrolled = NULL;
	GtkScrolledWindow* _tmp29_ = NULL;
	GtkScrolledWindow* _tmp30_ = NULL;
	GtkScrolledWindow* _tmp31_ = NULL;
	GtkTreeView* _tmp32_ = NULL;
	GtkScrolledWindow* _tmp33_ = NULL;
	gint height = 0;
	GtkTreeView* _tmp34_ = NULL;
	PangoLayout* _tmp35_ = NULL;
	PangoLayout* _tmp36_ = NULL;
	gint _tmp37_ = 0;
	GtkScrolledWindow* _tmp38_ = NULL;
	gint _tmp39_ = 0;
	GtkTreeView* _tmp40_ = NULL;
	GtkTreeView* _tmp41_ = NULL;
	const gchar* _tmp42_ = NULL;
	const gchar* _tmp43_ = NULL;
	GList* _tmp44_ = NULL;
	GtkListStore* _tmp48_ = NULL;
	gint _tmp49_ = 0;
#line 207 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (uri != NULL, NULL);
#line 207 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (content_type != NULL, NULL);
#line 207 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	self = (ExternalApplicationsChooser*) g_object_new (object_type, NULL);
#line 208 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = content_type;
#line 208 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 208 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_free0 (self->priv->content_type);
#line 208 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	self->priv->content_type = _tmp1_;
#line 209 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp2_ = uri;
#line 209 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp3_ = g_strdup (_tmp2_);
#line 209 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_free0 (self->priv->uri);
#line 209 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	self->priv->uri = _tmp3_;
#line 213 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp4_ = self->priv->store;
#line 213 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp5_ = (GtkTreeView*) gtk_tree_view_new_with_model ((GtkTreeModel*) _tmp4_);
#line 213 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_ref_sink (_tmp5_);
#line 213 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (self->priv->treeview);
#line 213 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	self->priv->treeview = _tmp5_;
#line 214 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp6_ = self->priv->treeview;
#line 214 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_tree_view_set_headers_visible (_tmp6_, FALSE);
#line 216 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp7_ = self->priv->store;
#line 216 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_tree_sortable_set_sort_column_id ((GtkTreeSortable*) _tmp7_, 0, GTK_SORT_ASCENDING);
#line 217 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp8_ = self->priv->store;
#line 217 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_tree_sortable_set_sort_func ((GtkTreeSortable*) _tmp8_, 0, _external_applications_chooser_tree_sort_func_gtk_tree_iter_compare_func, g_object_ref (self), g_object_unref);
#line 219 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp9_ = gtk_tree_view_column_new ();
#line 219 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_ref_sink (_tmp9_);
#line 219 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (column);
#line 219 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	column = _tmp9_;
#line 220 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp10_ = (GtkCellRendererPixbuf*) gtk_cell_renderer_pixbuf_new ();
#line 220 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_ref_sink (_tmp10_);
#line 220 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	renderer_icon = _tmp10_;
#line 221 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp11_ = column;
#line 221 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp12_ = renderer_icon;
#line 221 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp11_, (GtkCellRenderer*) _tmp12_, FALSE);
#line 222 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp13_ = column;
#line 222 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp14_ = renderer_icon;
#line 222 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_cell_layout_set_cell_data_func ((GtkCellLayout*) _tmp13_, (GtkCellRenderer*) _tmp14_, _external_applications_chooser_on_render_icon_gtk_cell_layout_data_func, g_object_ref (self), g_object_unref);
#line 223 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp15_ = self->priv->treeview;
#line 223 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp16_ = column;
#line 223 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_tree_view_append_column (_tmp15_, _tmp16_);
#line 225 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp17_ = gtk_tree_view_column_new ();
#line 225 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_ref_sink (_tmp17_);
#line 225 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (column);
#line 225 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	column = _tmp17_;
#line 226 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp18_ = column;
#line 226 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_tree_view_column_set_sizing (_tmp18_, GTK_TREE_VIEW_COLUMN_AUTOSIZE);
#line 227 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp19_ = (GtkCellRendererText*) gtk_cell_renderer_text_new ();
#line 227 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_ref_sink (_tmp19_);
#line 227 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	renderer_text = _tmp19_;
#line 228 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp20_ = column;
#line 228 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp21_ = renderer_text;
#line 228 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp20_, (GtkCellRenderer*) _tmp21_, TRUE);
#line 229 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp22_ = column;
#line 229 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_tree_view_column_set_expand (_tmp22_, TRUE);
#line 230 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp23_ = column;
#line 230 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp24_ = renderer_text;
#line 230 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_cell_layout_set_cell_data_func ((GtkCellLayout*) _tmp23_, (GtkCellRenderer*) _tmp24_, _external_applications_chooser_on_render_text_gtk_cell_layout_data_func, g_object_ref (self), g_object_unref);
#line 231 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp25_ = self->priv->treeview;
#line 231 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp26_ = column;
#line 231 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_tree_view_append_column (_tmp25_, _tmp26_);
#line 233 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp27_ = self->priv->treeview;
#line 233 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_signal_connect_object (_tmp27_, "row-activated", (GCallback) _external_applications_chooser_row_activated_gtk_tree_view_row_activated, self, 0);
#line 234 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp28_ = self->priv->treeview;
#line 234 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_widget_show ((GtkWidget*) _tmp28_);
#line 235 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp29_ = (GtkScrolledWindow*) gtk_scrolled_window_new (NULL, NULL);
#line 235 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_ref_sink (_tmp29_);
#line 235 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	scrolled = _tmp29_;
#line 236 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp30_ = scrolled;
#line 236 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_scrolled_window_set_policy (_tmp30_, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
#line 237 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp31_ = scrolled;
#line 237 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp32_ = self->priv->treeview;
#line 237 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_container_add ((GtkContainer*) _tmp31_, (GtkWidget*) _tmp32_);
#line 238 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp33_ = scrolled;
#line 238 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_box_pack_start ((GtkBox*) self, (GtkWidget*) _tmp33_, TRUE, TRUE, (guint) 0);
#line 240 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp34_ = self->priv->treeview;
#line 240 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp35_ = gtk_widget_create_pango_layout ((GtkWidget*) _tmp34_, "a\nb");
#line 240 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp36_ = _tmp35_;
#line 240 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	pango_layout_get_pixel_size (_tmp36_, NULL, &_tmp37_);
#line 240 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	height = _tmp37_;
#line 240 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (_tmp36_);
#line 241 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp38_ = scrolled;
#line 241 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp39_ = height;
#line 241 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_widget_set_size_request ((GtkWidget*) _tmp38_, -1, _tmp39_ * 5);
#line 242 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp40_ = self->priv->treeview;
#line 242 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_signal_connect_object ((GtkWidget*) _tmp40_, "button-release-event", (GCallback) _external_applications_chooser_button_released_gtk_widget_button_release_event, self, 0);
#line 243 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp41_ = self->priv->treeview;
#line 243 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp42_ = _ ("Right-click a suggestion to customize it");
#line 243 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp41_, _tmp42_);
#line 245 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	__g_list_free__g_object_unref0_0 (self->priv->available);
#line 245 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	self->priv->available = NULL;
#line 246 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp43_ = content_type;
#line 246 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp44_ = g_app_info_get_all_for_type (_tmp43_);
#line 1564 "open-with.c"
	{
		GList* app_info_collection = NULL;
		GList* app_info_it = NULL;
#line 246 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		app_info_collection = _tmp44_;
#line 246 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		for (app_info_it = app_info_collection; app_info_it != NULL; app_info_it = app_info_it->next) {
#line 1572 "open-with.c"
			GAppInfo* _tmp45_ = NULL;
			GAppInfo* app_info = NULL;
#line 246 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
			_tmp45_ = _g_object_ref0 ((GAppInfo*) app_info_it->data);
#line 246 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
			app_info = _tmp45_;
#line 1579 "open-with.c"
			{
				GAppInfo* _tmp46_ = NULL;
				const gchar* _tmp47_ = NULL;
#line 247 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				_tmp46_ = app_info;
#line 247 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				_tmp47_ = uri;
#line 247 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				external_applications_chooser_launcher_added (self, _tmp46_, _tmp47_);
#line 246 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				_g_object_unref0 (app_info);
#line 1591 "open-with.c"
			}
		}
#line 246 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		__g_list_free__g_object_unref0_0 (app_info_collection);
#line 1596 "open-with.c"
	}
#line 249 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp48_ = self->priv->store;
#line 249 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp49_ = gtk_tree_model_iter_n_children ((GtkTreeModel*) _tmp48_, NULL);
#line 249 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (_tmp49_ < 1) {
#line 1604 "open-with.c"
		GList* _tmp50_ = NULL;
#line 250 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp50_ = g_app_info_get_all ();
#line 1608 "open-with.c"
		{
			GList* app_info_collection = NULL;
			GList* app_info_it = NULL;
#line 250 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
			app_info_collection = _tmp50_;
#line 250 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
			for (app_info_it = app_info_collection; app_info_it != NULL; app_info_it = app_info_it->next) {
#line 1616 "open-with.c"
				GAppInfo* _tmp51_ = NULL;
				GAppInfo* app_info = NULL;
#line 250 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				_tmp51_ = _g_object_ref0 ((GAppInfo*) app_info_it->data);
#line 250 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				app_info = _tmp51_;
#line 1623 "open-with.c"
				{
					GAppInfo* _tmp52_ = NULL;
					const gchar* _tmp53_ = NULL;
#line 251 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
					_tmp52_ = app_info;
#line 251 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
					_tmp53_ = uri;
#line 251 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
					external_applications_chooser_launcher_added (self, _tmp52_, _tmp53_);
#line 250 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
					_g_object_unref0 (app_info);
#line 1635 "open-with.c"
				}
			}
#line 250 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
			__g_list_free__g_object_unref0_0 (app_info_collection);
#line 1640 "open-with.c"
		}
	}
#line 207 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (scrolled);
#line 207 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (renderer_text);
#line 207 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (renderer_icon);
#line 207 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (column);
#line 207 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	return self;
#line 1653 "open-with.c"
}


ExternalApplicationsChooser* external_applications_chooser_new (const gchar* uri, const gchar* content_type) {
#line 207 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	return external_applications_chooser_construct (EXTERNAL_APPLICATIONS_TYPE_CHOOSER, uri, content_type);
#line 1660 "open-with.c"
}


static gboolean external_applications_chooser_button_released (ExternalApplicationsChooser* self, GdkEventButton* event) {
	gboolean result = FALSE;
	GdkEventButton _tmp0_ = {0};
	guint _tmp1_ = 0U;
#line 255 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 255 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (event != NULL, FALSE);
#line 256 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = *event;
#line 256 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = _tmp0_.button;
#line 256 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (_tmp1_ == ((guint) 3)) {
#line 1678 "open-with.c"
		GdkEventButton _tmp2_ = {0};
		gboolean _tmp3_ = FALSE;
#line 257 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp2_ = *event;
#line 257 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp3_ = external_applications_chooser_show_popup_menu (self, &_tmp2_);
#line 257 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		result = _tmp3_;
#line 257 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		return result;
#line 1689 "open-with.c"
	}
#line 258 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	result = FALSE;
#line 258 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	return result;
#line 1695 "open-with.c"
}


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


static void block1_data_unref (void * _userdata_) {
	Block1Data* _data1_;
	_data1_ = (Block1Data*) _userdata_;
#line 263 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
#line 1713 "open-with.c"
		ExternalApplicationsChooser* self;
#line 263 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		self = _data1_->self;
#line 263 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_object_unref0 (_data1_->app_info);
#line 263 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_object_unref0 (self);
#line 263 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		g_slice_free (Block1Data, _data1_);
#line 1723 "open-with.c"
	}
}


static void ___lambda4_ (Block1Data* _data1_) {
	ExternalApplicationsChooser* self;
	GAppInfo* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
#line 270 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	self = _data1_->self;
#line 271 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = _data1_->app_info;
#line 271 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = self->priv->content_type;
#line 271 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp2_ = self->priv->uri;
#line 271 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	external_applications_chooser_customize_app_info (self, _tmp0_, _tmp1_, _tmp2_);
#line 1743 "open-with.c"
}


static void ____lambda4__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
#line 270 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	___lambda4_ (self);
#line 1750 "open-with.c"
}


static gboolean external_applications_chooser_show_popup_menu (ExternalApplicationsChooser* self, GdkEventButton* event) {
	gboolean result = FALSE;
	GtkTreeIter iter = {0};
	GtkTreeView* _tmp0_ = NULL;
	GtkTreeSelection* _tmp1_ = NULL;
	GtkTreeIter _tmp2_ = {0};
	gboolean _tmp3_ = FALSE;
#line 261 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 263 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = self->priv->treeview;
#line 263 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = gtk_tree_view_get_selection (_tmp0_);
#line 263 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp3_ = gtk_tree_selection_get_selected (_tmp1_, NULL, &_tmp2_);
#line 263 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	iter = _tmp2_;
#line 263 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (_tmp3_) {
#line 1773 "open-with.c"
		Block1Data* _data1_;
		GtkListStore* _tmp4_ = NULL;
		GtkTreeIter _tmp5_ = {0};
		GtkMenu* menu = NULL;
		GtkMenu* _tmp6_ = NULL;
		GtkImageMenuItem* menuitem = NULL;
		const gchar* _tmp7_ = NULL;
		GtkImageMenuItem* _tmp8_ = NULL;
		GtkImageMenuItem* _tmp9_ = NULL;
		GtkImage* _tmp10_ = NULL;
		GtkImage* _tmp11_ = NULL;
		GtkImageMenuItem* _tmp12_ = NULL;
		GtkMenu* _tmp13_ = NULL;
		GtkImageMenuItem* _tmp14_ = NULL;
		GtkMenu* _tmp15_ = NULL;
		GtkTreeView* _tmp16_ = NULL;
		GtkMenu* _tmp17_ = NULL;
#line 263 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_data1_ = g_slice_new0 (Block1Data);
#line 263 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_data1_->_ref_count_ = 1;
#line 263 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_data1_->self = g_object_ref (self);
#line 265 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp4_ = self->priv->store;
#line 265 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp5_ = iter;
#line 265 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		gtk_tree_model_get ((GtkTreeModel*) _tmp4_, &_tmp5_, 0, &_data1_->app_info, -1);
#line 267 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp6_ = (GtkMenu*) gtk_menu_new ();
#line 267 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		g_object_ref_sink (_tmp6_);
#line 267 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		menu = _tmp6_;
#line 268 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp7_ = _ ("Custom…");
#line 268 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp8_ = (GtkImageMenuItem*) gtk_image_menu_item_new_with_mnemonic (_tmp7_);
#line 268 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		g_object_ref_sink (_tmp8_);
#line 268 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		menuitem = _tmp8_;
#line 269 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp9_ = menuitem;
#line 269 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp10_ = (GtkImage*) gtk_image_new_from_stock (GTK_STOCK_EDIT, GTK_ICON_SIZE_MENU);
#line 269 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		g_object_ref_sink (_tmp10_);
#line 269 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp11_ = _tmp10_;
#line 269 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		gtk_image_menu_item_set_image (_tmp9_, (GtkWidget*) _tmp11_);
#line 269 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_object_unref0 (_tmp11_);
#line 270 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp12_ = menuitem;
#line 270 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		g_signal_connect_data ((GtkMenuItem*) _tmp12_, "activate", (GCallback) ____lambda4__gtk_menu_item_activate, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref, 0);
#line 273 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp13_ = menu;
#line 273 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp14_ = menuitem;
#line 273 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		gtk_menu_shell_append ((GtkMenuShell*) _tmp13_, (GtkWidget*) ((GtkMenuItem*) _tmp14_));
#line 274 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp15_ = menu;
#line 274 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		gtk_widget_show_all ((GtkWidget*) _tmp15_);
#line 275 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp16_ = self->priv->treeview;
#line 275 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp17_ = menu;
#line 275 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		katze_widget_popup ((GtkWidget*) _tmp16_, _tmp17_, NULL, KATZE_MENU_POSITION_CURSOR);
#line 277 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		result = TRUE;
#line 277 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_object_unref0 (menuitem);
#line 277 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_object_unref0 (menu);
#line 277 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		block1_data_unref (_data1_);
#line 277 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_data1_ = NULL;
#line 277 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		return result;
#line 1861 "open-with.c"
	}
#line 279 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	result = FALSE;
#line 279 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	return result;
#line 1867 "open-with.c"
}


static void external_applications_chooser_customize_app_info (ExternalApplicationsChooser* self, GAppInfo* app_info, const gchar* content_type, const gchar* uri) {
	ExternalApplicationsCustomizerDialog* dialog = NULL;
	GAppInfo* _tmp0_ = NULL;
	ExternalApplicationsCustomizerDialog* _tmp1_ = NULL;
	gboolean accept = FALSE;
	ExternalApplicationsCustomizerDialog* _tmp2_ = NULL;
	gint _tmp3_ = 0;
	gboolean _tmp4_ = FALSE;
	ExternalApplicationsCustomizerDialog* _tmp24_ = NULL;
#line 282 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (self != NULL);
#line 282 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (app_info != NULL);
#line 282 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (content_type != NULL);
#line 282 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (uri != NULL);
#line 283 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = app_info;
#line 283 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = external_applications_customizer_dialog_new (_tmp0_, (GtkWidget*) self);
#line 283 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_ref_sink (_tmp1_);
#line 283 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	dialog = _tmp1_;
#line 284 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp2_ = dialog;
#line 284 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp3_ = gtk_dialog_run ((GtkDialog*) _tmp2_);
#line 284 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	accept = _tmp3_ == ((gint) GTK_RESPONSE_ACCEPT);
#line 285 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp4_ = accept;
#line 285 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (_tmp4_) {
#line 1906 "open-with.c"
		gchar* name = NULL;
		ExternalApplicationsCustomizerDialog* _tmp5_ = NULL;
		GtkEntry* _tmp6_ = NULL;
		const gchar* _tmp7_ = NULL;
		const gchar* _tmp8_ = NULL;
		gchar* _tmp9_ = NULL;
		gchar* commandline = NULL;
		ExternalApplicationsCustomizerDialog* _tmp10_ = NULL;
		GtkEntry* _tmp11_ = NULL;
		const gchar* _tmp12_ = NULL;
		const gchar* _tmp13_ = NULL;
		gchar* _tmp14_ = NULL;
		ExternalApplicationsAssociations* _tmp15_ = NULL;
		ExternalApplicationsAssociations* _tmp16_ = NULL;
		const gchar* _tmp17_ = NULL;
		const gchar* _tmp18_ = NULL;
		const gchar* _tmp19_ = NULL;
		const gchar* _tmp20_ = NULL;
		GAppInfo* _tmp21_ = NULL;
		const gchar* _tmp22_ = NULL;
		const gchar* _tmp23_ = NULL;
#line 286 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp5_ = dialog;
#line 286 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp6_ = _tmp5_->name_entry;
#line 286 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp7_ = gtk_entry_get_text (_tmp6_);
#line 286 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp8_ = _tmp7_;
#line 286 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp9_ = g_strdup (_tmp8_);
#line 286 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		name = _tmp9_;
#line 287 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp10_ = dialog;
#line 287 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp11_ = _tmp10_->commandline_entry;
#line 287 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp12_ = gtk_entry_get_text (_tmp11_);
#line 287 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp13_ = _tmp12_;
#line 287 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp14_ = g_strdup (_tmp13_);
#line 287 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		commandline = _tmp14_;
#line 288 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp15_ = external_applications_associations_new ();
#line 288 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp16_ = _tmp15_;
#line 288 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp17_ = content_type;
#line 288 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp18_ = commandline;
#line 288 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp19_ = name;
#line 288 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp20_ = uri;
#line 288 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		external_applications_associations_remember_custom_commandline (_tmp16_, _tmp17_, _tmp18_, _tmp19_, _tmp20_);
#line 288 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_object_unref0 (_tmp16_);
#line 289 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp21_ = app_info;
#line 289 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp22_ = content_type;
#line 289 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp23_ = uri;
#line 289 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		g_signal_emit_by_name (self, "customized", _tmp21_, _tmp22_, _tmp23_);
#line 285 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_free0 (commandline);
#line 285 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_free0 (name);
#line 1980 "open-with.c"
	}
#line 291 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp24_ = dialog;
#line 291 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_object_destroy ((GtkObject*) _tmp24_);
#line 282 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (dialog);
#line 1988 "open-with.c"
}


GList* external_applications_chooser_get_available (ExternalApplicationsChooser* self) {
	GList* result = NULL;
	GList* _tmp0_ = NULL;
	GList* _tmp1_ = NULL;
#line 294 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 295 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = self->priv->available;
#line 295 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = g_list_copy (_tmp0_);
#line 295 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	result = _tmp1_;
#line 295 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	return result;
#line 2006 "open-with.c"
}


GAppInfo* external_applications_chooser_get_app_info (ExternalApplicationsChooser* self) {
	GAppInfo* result = NULL;
	GtkTreeIter iter = {0};
	GtkTreeView* _tmp0_ = NULL;
	GtkTreeSelection* _tmp1_ = NULL;
	GtkTreeIter _tmp2_ = {0};
	gboolean _tmp3_ = FALSE;
#line 298 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 300 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = self->priv->treeview;
#line 300 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = gtk_tree_view_get_selection (_tmp0_);
#line 300 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp3_ = gtk_tree_selection_get_selected (_tmp1_, NULL, &_tmp2_);
#line 300 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	iter = _tmp2_;
#line 300 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (_tmp3_) {
#line 2029 "open-with.c"
		GAppInfo* app_info = NULL;
		GtkListStore* _tmp4_ = NULL;
		GtkTreeIter _tmp5_ = {0};
#line 302 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp4_ = self->priv->store;
#line 302 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp5_ = iter;
#line 302 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		gtk_tree_model_get ((GtkTreeModel*) _tmp4_, &_tmp5_, 0, &app_info, -1);
#line 303 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		result = app_info;
#line 303 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		return result;
#line 2043 "open-with.c"
	}
#line 305 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_assert_not_reached ();
#line 2047 "open-with.c"
}


static void external_applications_chooser_on_render_icon (ExternalApplicationsChooser* self, GtkCellLayout* column, GtkCellRenderer* renderer, GtkTreeModel* model, GtkTreeIter* iter) {
	GAppInfo* app_info = NULL;
	GtkTreeModel* _tmp0_ = NULL;
	GtkTreeIter _tmp1_ = {0};
	GtkCellRenderer* _tmp2_ = NULL;
	GIcon* _tmp3_ = NULL;
	GIcon* _tmp4_ = NULL;
#line 308 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (self != NULL);
#line 308 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (column != NULL);
#line 308 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (renderer != NULL);
#line 308 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (model != NULL);
#line 308 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (iter != NULL);
#line 312 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = model;
#line 312 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = *iter;
#line 312 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_tree_model_get (_tmp0_, &_tmp1_, 0, &app_info, -1);
#line 314 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp2_ = renderer;
#line 314 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp3_ = external_applications_app_info_get_icon (app_info);
#line 314 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp4_ = _tmp3_;
#line 314 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_set ((GObject*) _tmp2_, "gicon", _tmp4_, "stock-size", GTK_ICON_SIZE_DIALOG, "xpad", 4, NULL);
#line 314 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (_tmp4_);
#line 308 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (app_info);
#line 2086 "open-with.c"
}


static void external_applications_chooser_on_render_text (ExternalApplicationsChooser* self, GtkCellLayout* column, GtkCellRenderer* renderer, GtkTreeModel* model, GtkTreeIter* iter) {
	GAppInfo* app_info = NULL;
	GtkTreeModel* _tmp0_ = NULL;
	GtkTreeIter _tmp1_ = {0};
	GtkCellRenderer* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
#line 319 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (self != NULL);
#line 319 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (column != NULL);
#line 319 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (renderer != NULL);
#line 319 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (model != NULL);
#line 319 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (iter != NULL);
#line 323 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = model;
#line 323 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = *iter;
#line 323 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_tree_model_get (_tmp0_, &_tmp1_, 0, &app_info, -1);
#line 324 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp2_ = renderer;
#line 324 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp3_ = external_applications_describe_app_info (app_info);
#line 324 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp4_ = _tmp3_;
#line 324 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_set ((GObject*) _tmp2_, "markup", _tmp4_, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
#line 324 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_free0 (_tmp4_);
#line 319 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (app_info);
#line 2125 "open-with.c"
}


static void external_applications_chooser_launcher_added (ExternalApplicationsChooser* self, GAppInfo* app_info, const gchar* uri) {
	GAppInfo* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	GtkTreeIter iter = {0};
	GtkListStore* _tmp2_ = NULL;
	GtkTreeIter _tmp3_ = {0};
	GtkListStore* _tmp4_ = NULL;
	GtkTreeIter _tmp5_ = {0};
	GAppInfo* _tmp6_ = NULL;
	GAppInfo* _tmp7_ = NULL;
	GAppInfo* _tmp8_ = NULL;
#line 328 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (self != NULL);
#line 328 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (app_info != NULL);
#line 328 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (uri != NULL);
#line 329 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = app_info;
#line 329 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = g_app_info_should_show (_tmp0_);
#line 329 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (!_tmp1_) {
#line 330 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		return;
#line 2154 "open-with.c"
	}
#line 333 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp2_ = self->priv->store;
#line 333 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_list_store_append (_tmp2_, &_tmp3_);
#line 333 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	iter = _tmp3_;
#line 334 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp4_ = self->priv->store;
#line 334 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp5_ = iter;
#line 334 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp6_ = app_info;
#line 334 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_list_store_set (_tmp4_, &_tmp5_, 0, _tmp6_, -1);
#line 336 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp7_ = app_info;
#line 336 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp8_ = _g_object_ref0 (_tmp7_);
#line 336 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	self->priv->available = g_list_append (self->priv->available, _tmp8_);
#line 2176 "open-with.c"
}


static gint external_applications_chooser_tree_sort_func (ExternalApplicationsChooser* self, GtkTreeModel* model, GtkTreeIter* a, GtkTreeIter* b) {
	gint result = 0;
	GAppInfo* app_info1 = NULL;
	GAppInfo* app_info2 = NULL;
	GtkTreeModel* _tmp0_ = NULL;
	GtkTreeIter _tmp1_ = {0};
	GtkTreeModel* _tmp2_ = NULL;
	GtkTreeIter _tmp3_ = {0};
	GCompareFunc _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
	const gchar* _tmp6_ = NULL;
	gint _tmp7_ = 0;
#line 339 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (self != NULL, 0);
#line 339 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (model != NULL, 0);
#line 339 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (a != NULL, 0);
#line 339 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (b != NULL, 0);
#line 341 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = model;
#line 341 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = *a;
#line 341 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_tree_model_get (_tmp0_, &_tmp1_, 0, &app_info1, -1);
#line 342 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp2_ = model;
#line 342 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp3_ = *b;
#line 342 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_tree_model_get (_tmp2_, &_tmp3_, 0, &app_info2, -1);
#line 343 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp4_ = g_strcmp0;
#line 343 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp5_ = g_app_info_get_display_name (app_info1);
#line 343 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp6_ = g_app_info_get_display_name (app_info2);
#line 343 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp7_ = _tmp4_ (_tmp5_, _tmp6_);
#line 343 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	result = _tmp7_;
#line 343 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (app_info2);
#line 343 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (app_info1);
#line 343 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	return result;
#line 2228 "open-with.c"
}


static void external_applications_chooser_row_activated (ExternalApplicationsChooser* self, GtkTreePath* path, GtkTreeViewColumn* column) {
	GtkTreeIter iter = {0};
	GtkListStore* _tmp0_ = NULL;
	GtkTreePath* _tmp1_ = NULL;
	GtkTreeIter _tmp2_ = {0};
	gboolean _tmp3_ = FALSE;
#line 346 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (self != NULL);
#line 346 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (path != NULL);
#line 346 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (column != NULL);
#line 348 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = self->priv->store;
#line 348 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = path;
#line 348 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp3_ = gtk_tree_model_get_iter ((GtkTreeModel*) _tmp0_, &_tmp2_, _tmp1_);
#line 348 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	iter = _tmp2_;
#line 348 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (_tmp3_) {
#line 2254 "open-with.c"
		GAppInfo* app_info = NULL;
		GtkListStore* _tmp4_ = NULL;
		GtkTreeIter _tmp5_ = {0};
		GAppInfo* _tmp6_ = NULL;
#line 350 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp4_ = self->priv->store;
#line 350 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp5_ = iter;
#line 350 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		gtk_tree_model_get ((GtkTreeModel*) _tmp4_, &_tmp5_, 0, &app_info, -1);
#line 351 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp6_ = app_info;
#line 351 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		g_signal_emit_by_name (self, "selected", _tmp6_);
#line 348 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_object_unref0 (app_info);
#line 2271 "open-with.c"
	}
}


static void g_cclosure_user_marshal_VOID__OBJECT_STRING_STRING (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
	typedef void (*GMarshalFunc_VOID__OBJECT_STRING_STRING) (gpointer data1, gpointer arg_1, const char* arg_2, const char* arg_3, gpointer data2);
	register GMarshalFunc_VOID__OBJECT_STRING_STRING callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
#line 200 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (n_param_values == 4);
#line 200 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (G_CCLOSURE_SWAP_DATA (closure)) {
#line 200 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		data1 = closure->data;
#line 200 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		data2 = param_values->data[0].v_pointer;
#line 2291 "open-with.c"
	} else {
#line 200 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		data1 = param_values->data[0].v_pointer;
#line 200 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		data2 = closure->data;
#line 2297 "open-with.c"
	}
#line 200 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	callback = (GMarshalFunc_VOID__OBJECT_STRING_STRING) (marshal_data ? marshal_data : cc->callback);
#line 200 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	callback (data1, g_value_get_object (param_values + 1), g_value_get_string (param_values + 2), g_value_get_string (param_values + 3), data2);
#line 2303 "open-with.c"
}


static void external_applications_chooser_class_init (ExternalApplicationsChooserClass * klass) {
#line 200 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	external_applications_chooser_parent_class = g_type_class_peek_parent (klass);
#line 200 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_type_class_add_private (klass, sizeof (ExternalApplicationsChooserPrivate));
#line 200 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	G_OBJECT_CLASS (klass)->finalize = external_applications_chooser_finalize;
#line 200 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_signal_new ("selected", EXTERNAL_APPLICATIONS_TYPE_CHOOSER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, g_app_info_get_type ());
#line 200 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_signal_new ("customized", EXTERNAL_APPLICATIONS_TYPE_CHOOSER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_STRING_STRING, G_TYPE_NONE, 3, g_app_info_get_type (), G_TYPE_STRING, G_TYPE_STRING);
#line 2318 "open-with.c"
}


static void external_applications_chooser_instance_init (ExternalApplicationsChooser * self) {
	GtkListStore* _tmp0_ = NULL;
#line 200 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	self->priv = EXTERNAL_APPLICATIONS_CHOOSER_GET_PRIVATE (self);
#line 201 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = gtk_list_store_new (1, g_app_info_get_type ());
#line 201 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	self->priv->store = _tmp0_;
#line 2330 "open-with.c"
}


static void external_applications_chooser_finalize (GObject* obj) {
	ExternalApplicationsChooser * self;
#line 200 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, EXTERNAL_APPLICATIONS_TYPE_CHOOSER, ExternalApplicationsChooser);
#line 201 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (self->priv->store);
#line 202 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (self->priv->treeview);
#line 203 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	__g_list_free__g_object_unref0_0 (self->priv->available);
#line 204 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_free0 (self->priv->content_type);
#line 205 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_free0 (self->priv->uri);
#line 200 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	G_OBJECT_CLASS (external_applications_chooser_parent_class)->finalize (obj);
#line 2350 "open-with.c"
}


GType external_applications_chooser_get_type (void) {
	static volatile gsize external_applications_chooser_type_id__volatile = 0;
	if (g_once_init_enter (&external_applications_chooser_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ExternalApplicationsChooserClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) external_applications_chooser_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ExternalApplicationsChooser), 0, (GInstanceInitFunc) external_applications_chooser_instance_init, NULL };
		GType external_applications_chooser_type_id;
		external_applications_chooser_type_id = g_type_register_static (GTK_TYPE_VBOX, "ExternalApplicationsChooser", &g_define_type_info, 0);
		g_once_init_leave (&external_applications_chooser_type_id__volatile, external_applications_chooser_type_id);
	}
	return external_applications_chooser_type_id__volatile;
}


static void __lambda5_ (ExternalApplicationsChooserDialog* self, GAppInfo* app_info) {
#line 404 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (app_info != NULL);
#line 405 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_dialog_response ((GtkDialog*) self, (gint) GTK_RESPONSE_ACCEPT);
#line 2371 "open-with.c"
}


static void ___lambda5__external_applications_chooser_selected (ExternalApplicationsChooser* _sender, GAppInfo* app_info, gpointer self) {
#line 404 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	__lambda5_ ((ExternalApplicationsChooserDialog*) self, app_info);
#line 2378 "open-with.c"
}


static void __lambda6_ (ExternalApplicationsChooserDialog* self, GAppInfo* app_info, const gchar* content_type, const gchar* uri) {
#line 407 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (app_info != NULL);
#line 407 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (content_type != NULL);
#line 407 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (uri != NULL);
#line 408 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_dialog_response ((GtkDialog*) self, (gint) GTK_RESPONSE_CANCEL);
#line 2391 "open-with.c"
}


static void ___lambda6__external_applications_chooser_customized (ExternalApplicationsChooser* _sender, GAppInfo* app_info, const gchar* content_type, const gchar* uri, gpointer self) {
#line 407 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	__lambda6_ ((ExternalApplicationsChooserDialog*) self, app_info, content_type, uri);
#line 2398 "open-with.c"
}


ExternalApplicationsChooserDialog* external_applications_chooser_dialog_construct (GType object_type, const gchar* uri, const gchar* content_type, GtkWidget* widget) {
	ExternalApplicationsChooserDialog * self = NULL;
	gchar* filename = NULL;
	const gchar* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	MidoriBrowser* browser = NULL;
	GtkWidget* _tmp6_ = NULL;
	MidoriBrowser* _tmp7_ = NULL;
	MidoriBrowser* _tmp8_ = NULL;
	MidoriBrowser* _tmp9_ = NULL;
	const gchar* _tmp10_ = NULL;
	GtkVBox* vbox = NULL;
	GtkVBox* _tmp11_ = NULL;
	GtkVBox* _tmp12_ = NULL;
	GtkWidget* _tmp13_ = NULL;
	GtkVBox* _tmp14_ = NULL;
	GtkLabel* label = NULL;
	const gchar* _tmp15_ = NULL;
	gchar* _tmp16_ = NULL;
	gchar* _tmp17_ = NULL;
	const gchar* _tmp18_ = NULL;
	GtkLabel* _tmp19_ = NULL;
	GtkLabel* _tmp20_ = NULL;
	GtkLabel* _tmp21_ = NULL;
	GtkVBox* _tmp22_ = NULL;
	GtkLabel* _tmp23_ = NULL;
	const gchar* _tmp24_ = NULL;
	const gchar* _tmp26_ = NULL;
	const gchar* _tmp27_ = NULL;
	ExternalApplicationsChooser* _tmp28_ = NULL;
	ExternalApplicationsChooser* _tmp29_ = NULL;
	GtkVBox* _tmp30_ = NULL;
	ExternalApplicationsChooser* _tmp31_ = NULL;
	GtkWidget* _tmp32_ = NULL;
	GtkRequisition req = {0};
	GtkWidget* _tmp33_ = NULL;
	GtkRequisition _tmp34_ = {0};
	GtkRequisition _tmp35_ = {0};
	gint _tmp36_ = 0;
	GtkRequisition _tmp37_ = {0};
	gint _tmp38_ = 0;
	ExternalApplicationsChooser* _tmp39_ = NULL;
	ExternalApplicationsChooser* _tmp40_ = NULL;
#line 362 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (uri != NULL, NULL);
#line 362 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (content_type != NULL, NULL);
#line 362 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (widget != NULL, NULL);
#line 362 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	self = (ExternalApplicationsChooserDialog*) g_object_new (object_type, NULL);
#line 364 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = uri;
#line 364 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = g_str_has_prefix (_tmp0_, "file://");
#line 364 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (_tmp1_) {
#line 2459 "open-with.c"
		const gchar* _tmp2_ = NULL;
		gchar* _tmp3_ = NULL;
#line 365 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp2_ = uri;
#line 365 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp3_ = midori_download_get_basename_for_display (_tmp2_);
#line 365 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_free0 (filename);
#line 365 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		filename = _tmp3_;
#line 2470 "open-with.c"
	} else {
		const gchar* _tmp4_ = NULL;
		gchar* _tmp5_ = NULL;
#line 367 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp4_ = uri;
#line 367 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp5_ = g_strdup (_tmp4_);
#line 367 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_free0 (filename);
#line 367 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		filename = _tmp5_;
#line 2482 "open-with.c"
	}
#line 369 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp6_ = widget;
#line 369 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp7_ = midori_browser_get_for_widget (_tmp6_);
#line 369 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp8_ = _g_object_ref0 (_tmp7_);
#line 369 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	browser = _tmp8_;
#line 370 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp9_ = browser;
#line 370 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_window_set_transient_for ((GtkWindow*) self, (GtkWindow*) _tmp9_);
#line 372 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp10_ = _ ("Choose application");
#line 372 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_window_set_title ((GtkWindow*) self, _tmp10_);
#line 374 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_dialog_set_has_separator ((GtkDialog*) self, FALSE);
#line 376 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_window_set_destroy_with_parent ((GtkWindow*) self, TRUE);
#line 377 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_window_set_icon_name ((GtkWindow*) self, GTK_STOCK_OPEN);
#line 378 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_window_set_resizable ((GtkWindow*) self, TRUE);
#line 379 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_dialog_add_buttons ((GtkDialog*) self, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL);
#line 382 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp11_ = (GtkVBox*) gtk_vbox_new (FALSE, 8);
#line 382 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_ref_sink (_tmp11_);
#line 382 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	vbox = _tmp11_;
#line 383 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp12_ = vbox;
#line 383 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_container_set_border_width ((GtkContainer*) _tmp12_, (guint) 8);
#line 384 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp13_ = gtk_dialog_get_content_area ((GtkDialog*) self);
#line 384 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp14_ = vbox;
#line 384 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_box_pack_start (G_TYPE_CHECK_INSTANCE_TYPE (_tmp13_, GTK_TYPE_BOX) ? ((GtkBox*) _tmp13_) : NULL, (GtkWidget*) _tmp14_, TRUE, TRUE, (guint) 8);
#line 385 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp15_ = filename;
#line 385 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp16_ = g_strdup_printf ("Select an application to open \"%s\"", _tmp15_);
#line 385 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp17_ = _tmp16_;
#line 385 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp18_ = _ (_tmp17_);
#line 385 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp19_ = (GtkLabel*) gtk_label_new (_tmp18_);
#line 385 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_ref_sink (_tmp19_);
#line 385 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp20_ = _tmp19_;
#line 385 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_free0 (_tmp17_);
#line 385 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	label = _tmp20_;
#line 386 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp21_ = label;
#line 386 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_label_set_ellipsize (_tmp21_, PANGO_ELLIPSIZE_MIDDLE);
#line 387 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp22_ = vbox;
#line 387 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp23_ = label;
#line 387 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_box_pack_start ((GtkBox*) _tmp22_, (GtkWidget*) _tmp23_, FALSE, FALSE, (guint) 0);
#line 388 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp24_ = uri;
#line 388 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (g_strcmp0 (_tmp24_, "") == 0) {
#line 2558 "open-with.c"
		GtkLabel* _tmp25_ = NULL;
#line 389 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp25_ = label;
#line 389 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		gtk_widget_set_no_show_all ((GtkWidget*) _tmp25_, TRUE);
#line 2564 "open-with.c"
	}
#line 390 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp26_ = uri;
#line 390 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp27_ = content_type;
#line 390 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp28_ = external_applications_chooser_new (_tmp26_, _tmp27_);
#line 390 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_ref_sink (_tmp28_);
#line 390 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp29_ = _tmp28_;
#line 390 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	external_applications_chooser_dialog_set_chooser (self, _tmp29_);
#line 390 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (_tmp29_);
#line 391 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp30_ = vbox;
#line 391 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp31_ = self->priv->_chooser;
#line 391 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_box_pack_start ((GtkBox*) _tmp30_, (GtkWidget*) _tmp31_, TRUE, TRUE, (guint) 0);
#line 393 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp32_ = gtk_dialog_get_content_area ((GtkDialog*) self);
#line 393 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_widget_show_all (_tmp32_);
#line 399 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp33_ = gtk_dialog_get_content_area ((GtkDialog*) self);
#line 399 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_widget_size_request (_tmp33_, &_tmp34_);
#line 399 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	req = _tmp34_;
#line 401 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp35_ = req;
#line 401 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp36_ = _tmp35_.width;
#line 401 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp37_ = req;
#line 401 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp38_ = _tmp37_.height;
#line 401 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_window_set_default_size (G_TYPE_CHECK_INSTANCE_TYPE (self, GTK_TYPE_WINDOW) ? ((GtkWindow*) self) : NULL, _tmp36_ * 2, (_tmp38_ * 3) / 2);
#line 403 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_dialog_set_default_response ((GtkDialog*) self, (gint) GTK_RESPONSE_ACCEPT);
#line 404 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp39_ = self->priv->_chooser;
#line 404 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_signal_connect_object (_tmp39_, "selected", (GCallback) ___lambda5__external_applications_chooser_selected, self, 0);
#line 407 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp40_ = self->priv->_chooser;
#line 407 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_signal_connect_object (_tmp40_, "customized", (GCallback) ___lambda6__external_applications_chooser_customized, self, 0);
#line 362 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (label);
#line 362 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (vbox);
#line 362 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (browser);
#line 362 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_free0 (filename);
#line 362 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	return self;
#line 2626 "open-with.c"
}


ExternalApplicationsChooserDialog* external_applications_chooser_dialog_new (const gchar* uri, const gchar* content_type, GtkWidget* widget) {
#line 362 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	return external_applications_chooser_dialog_construct (EXTERNAL_APPLICATIONS_TYPE_CHOOSER_DIALOG, uri, content_type, widget);
#line 2633 "open-with.c"
}


GAppInfo* external_applications_chooser_dialog_open_with (ExternalApplicationsChooserDialog* self) {
	GAppInfo* result = NULL;
	gboolean accept = FALSE;
	gint _tmp0_ = 0;
	gboolean _tmp1_ = FALSE;
	ExternalApplicationsChooser* _tmp2_ = NULL;
	GAppInfo* _tmp3_ = NULL;
#line 412 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 413 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_widget_show ((GtkWidget*) self);
#line 414 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = gtk_dialog_run ((GtkDialog*) self);
#line 414 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	accept = _tmp0_ == ((gint) GTK_RESPONSE_ACCEPT);
#line 415 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_widget_hide ((GtkWidget*) self);
#line 417 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = accept;
#line 417 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (!_tmp1_) {
#line 418 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		result = NULL;
#line 418 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		return result;
#line 2662 "open-with.c"
	}
#line 419 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp2_ = self->priv->_chooser;
#line 419 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp3_ = external_applications_chooser_get_app_info (_tmp2_);
#line 419 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	result = _tmp3_;
#line 419 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	return result;
#line 2672 "open-with.c"
}


ExternalApplicationsChooser* external_applications_chooser_dialog_get_chooser (ExternalApplicationsChooserDialog* self) {
	ExternalApplicationsChooser* result;
	ExternalApplicationsChooser* _tmp0_ = NULL;
#line 360 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 360 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = self->priv->_chooser;
#line 360 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	result = _tmp0_;
#line 360 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	return result;
#line 2687 "open-with.c"
}


static void external_applications_chooser_dialog_set_chooser (ExternalApplicationsChooserDialog* self, ExternalApplicationsChooser* value) {
	ExternalApplicationsChooser* _tmp0_ = NULL;
	ExternalApplicationsChooser* _tmp1_ = NULL;
#line 360 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (self != NULL);
#line 360 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = value;
#line 360 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 360 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (self->priv->_chooser);
#line 360 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	self->priv->_chooser = _tmp1_;
#line 360 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_notify ((GObject *) self, "chooser");
#line 2706 "open-with.c"
}


static void external_applications_chooser_dialog_class_init (ExternalApplicationsChooserDialogClass * klass) {
#line 359 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	external_applications_chooser_dialog_parent_class = g_type_class_peek_parent (klass);
#line 359 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_type_class_add_private (klass, sizeof (ExternalApplicationsChooserDialogPrivate));
#line 359 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_external_applications_chooser_dialog_get_property;
#line 359 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_external_applications_chooser_dialog_set_property;
#line 359 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	G_OBJECT_CLASS (klass)->finalize = external_applications_chooser_dialog_finalize;
#line 359 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), EXTERNAL_APPLICATIONS_CHOOSER_DIALOG_CHOOSER, g_param_spec_object ("chooser", "chooser", "chooser", EXTERNAL_APPLICATIONS_TYPE_CHOOSER, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 2723 "open-with.c"
}


static void external_applications_chooser_dialog_instance_init (ExternalApplicationsChooserDialog * self) {
#line 359 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	self->priv = EXTERNAL_APPLICATIONS_CHOOSER_DIALOG_GET_PRIVATE (self);
#line 2730 "open-with.c"
}


static void external_applications_chooser_dialog_finalize (GObject* obj) {
	ExternalApplicationsChooserDialog * self;
#line 359 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, EXTERNAL_APPLICATIONS_TYPE_CHOOSER_DIALOG, ExternalApplicationsChooserDialog);
#line 360 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (self->priv->_chooser);
#line 359 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	G_OBJECT_CLASS (external_applications_chooser_dialog_parent_class)->finalize (obj);
#line 2742 "open-with.c"
}


GType external_applications_chooser_dialog_get_type (void) {
	static volatile gsize external_applications_chooser_dialog_type_id__volatile = 0;
	if (g_once_init_enter (&external_applications_chooser_dialog_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ExternalApplicationsChooserDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) external_applications_chooser_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ExternalApplicationsChooserDialog), 0, (GInstanceInitFunc) external_applications_chooser_dialog_instance_init, NULL };
		GType external_applications_chooser_dialog_type_id;
		external_applications_chooser_dialog_type_id = g_type_register_static (GTK_TYPE_DIALOG, "ExternalApplicationsChooserDialog", &g_define_type_info, 0);
		g_once_init_leave (&external_applications_chooser_dialog_type_id__volatile, external_applications_chooser_dialog_type_id);
	}
	return external_applications_chooser_dialog_type_id__volatile;
}


static void _vala_external_applications_chooser_dialog_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	ExternalApplicationsChooserDialog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, EXTERNAL_APPLICATIONS_TYPE_CHOOSER_DIALOG, ExternalApplicationsChooserDialog);
#line 359 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	switch (property_id) {
#line 359 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		case EXTERNAL_APPLICATIONS_CHOOSER_DIALOG_CHOOSER:
#line 359 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		g_value_set_object (value, external_applications_chooser_dialog_get_chooser (self));
#line 359 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		break;
#line 2769 "open-with.c"
		default:
#line 359 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 359 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		break;
#line 2775 "open-with.c"
	}
}


static void _vala_external_applications_chooser_dialog_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	ExternalApplicationsChooserDialog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, EXTERNAL_APPLICATIONS_TYPE_CHOOSER_DIALOG, ExternalApplicationsChooserDialog);
#line 359 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	switch (property_id) {
#line 359 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		case EXTERNAL_APPLICATIONS_CHOOSER_DIALOG_CHOOSER:
#line 359 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		external_applications_chooser_dialog_set_chooser (self, g_value_get_object (value));
#line 359 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		break;
#line 2791 "open-with.c"
		default:
#line 359 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 359 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		break;
#line 2797 "open-with.c"
	}
}


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


static void block2_data_unref (void * _userdata_) {
	Block2Data* _data2_;
	_data2_ = (Block2Data*) _userdata_;
#line 430 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) {
#line 2816 "open-with.c"
		ExternalApplicationsChooserButton* self;
#line 430 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		self = _data2_->self;
#line 430 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_free0 (_data2_->commandline);
#line 430 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_object_unref0 (self);
#line 430 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		g_slice_free (Block2Data, _data2_);
#line 2826 "open-with.c"
	}
}


static void __lambda7_ (Block2Data* _data2_) {
	ExternalApplicationsChooserButton* self;
	ExternalApplicationsChooserDialog* _tmp0_ = NULL;
	GtkWidget* _tmp1_ = NULL;
	ExternalApplicationsChooserDialog* _tmp2_ = NULL;
	GAppInfo* _tmp3_ = NULL;
	GAppInfo* _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
	GAppInfo* _tmp6_ = NULL;
	gchar* new_commandline = NULL;
	gchar* _tmp9_ = NULL;
	gchar* _tmp10_ = NULL;
#line 450 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	self = _data2_->self;
#line 451 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = self->priv->dialog;
#line 451 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = gtk_widget_get_toplevel ((GtkWidget*) self);
#line 451 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_window_set_transient_for ((GtkWindow*) _tmp0_, G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, GTK_TYPE_WINDOW) ? ((GtkWindow*) _tmp1_) : NULL);
#line 452 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp2_ = self->priv->dialog;
#line 452 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp3_ = external_applications_chooser_dialog_open_with (_tmp2_);
#line 452 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp4_ = _tmp3_;
#line 452 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	external_applications_chooser_button_set_app_info (self, _tmp4_);
#line 452 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (_tmp4_);
#line 453 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp6_ = self->priv->_app_info;
#line 453 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (_tmp6_ != NULL) {
#line 2865 "open-with.c"
		GAppInfo* _tmp7_ = NULL;
		gchar* _tmp8_ = NULL;
#line 453 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp7_ = self->priv->_app_info;
#line 453 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp8_ = external_applications_get_commandline (_tmp7_);
#line 453 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_free0 (_tmp5_);
#line 453 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp5_ = _tmp8_;
#line 2876 "open-with.c"
	} else {
#line 453 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_free0 (_tmp5_);
#line 453 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp5_ = NULL;
#line 2882 "open-with.c"
	}
#line 453 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp9_ = g_strdup (_tmp5_);
#line 453 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	new_commandline = _tmp9_;
#line 454 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp10_ = g_strdup (new_commandline);
#line 454 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_free0 (_data2_->commandline);
#line 454 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_data2_->commandline = _tmp10_;
#line 455 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_signal_emit_by_name (self, "selected", new_commandline);
#line 456 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	external_applications_chooser_button_update_label (self);
#line 450 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_free0 (new_commandline);
#line 450 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_free0 (_tmp5_);
#line 2902 "open-with.c"
}


static void ___lambda7__gtk_button_clicked (GtkButton* _sender, gpointer self) {
#line 450 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	__lambda7_ (self);
#line 2909 "open-with.c"
}


ExternalApplicationsChooserButton* external_applications_chooser_button_construct (GType object_type, const gchar* mime_type, const gchar* commandline) {
	ExternalApplicationsChooserButton * self = NULL;
	Block2Data* _data2_;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	gchar* content_type = NULL;
	const gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	ExternalApplicationsChooserDialog* _tmp5_ = NULL;
	ExternalApplicationsChooserDialog* _tmp6_ = NULL;
	ExternalApplicationsChooser* _tmp7_ = NULL;
	ExternalApplicationsChooser* _tmp8_ = NULL;
	GList* _tmp9_ = NULL;
	GtkHBox* hbox = NULL;
	GtkHBox* _tmp17_ = NULL;
	GtkImage* _tmp18_ = NULL;
	GtkImage* _tmp19_ = NULL;
	GtkLabel* _tmp20_ = NULL;
	GtkLabel* _tmp21_ = NULL;
	GtkLabel* _tmp22_ = NULL;
	GtkLabel* _tmp23_ = NULL;
#line 430 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (mime_type != NULL, NULL);
#line 430 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_data2_ = g_slice_new0 (Block2Data);
#line 430 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_data2_->_ref_count_ = 1;
#line 430 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = commandline;
#line 430 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 430 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_free0 (_data2_->commandline);
#line 430 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_data2_->commandline = _tmp1_;
#line 430 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	self = (ExternalApplicationsChooserButton*) g_object_new (object_type, NULL);
#line 430 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_data2_->self = g_object_ref (self);
#line 431 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp2_ = mime_type;
#line 431 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp3_ = g_content_type_from_mime_type (_tmp2_);
#line 431 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	content_type = _tmp3_;
#line 432 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp4_ = content_type;
#line 432 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp5_ = external_applications_chooser_dialog_new ("", _tmp4_, (GtkWidget*) self);
#line 432 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_ref_sink (_tmp5_);
#line 432 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (self->priv->dialog);
#line 432 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	self->priv->dialog = _tmp5_;
#line 433 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	external_applications_chooser_button_set_app_info (self, NULL);
#line 434 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp6_ = self->priv->dialog;
#line 434 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp7_ = external_applications_chooser_dialog_get_chooser (_tmp6_);
#line 434 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp8_ = _tmp7_;
#line 434 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp9_ = external_applications_chooser_get_available (_tmp8_);
#line 2979 "open-with.c"
	{
		GList* candidate_collection = NULL;
		GList* candidate_it = NULL;
#line 434 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		candidate_collection = _tmp9_;
#line 434 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		for (candidate_it = candidate_collection; candidate_it != NULL; candidate_it = candidate_it->next) {
#line 2987 "open-with.c"
			GAppInfo* _tmp10_ = NULL;
			GAppInfo* candidate = NULL;
#line 434 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
			_tmp10_ = _g_object_ref0 ((GAppInfo*) candidate_it->data);
#line 434 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
			candidate = _tmp10_;
#line 2994 "open-with.c"
			{
				GAppInfo* _tmp11_ = NULL;
				gchar* _tmp12_ = NULL;
				gchar* _tmp13_ = NULL;
				const gchar* _tmp14_ = NULL;
				gboolean _tmp15_ = FALSE;
#line 435 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				_tmp11_ = candidate;
#line 435 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				_tmp12_ = external_applications_get_commandline (_tmp11_);
#line 435 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				_tmp13_ = _tmp12_;
#line 435 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				_tmp14_ = _data2_->commandline;
#line 435 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				_tmp15_ = g_strcmp0 (_tmp13_, _tmp14_) == 0;
#line 435 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				_g_free0 (_tmp13_);
#line 435 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				if (_tmp15_) {
#line 3015 "open-with.c"
					GAppInfo* _tmp16_ = NULL;
#line 436 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
					_tmp16_ = candidate;
#line 436 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
					external_applications_chooser_button_set_app_info (self, _tmp16_);
#line 3021 "open-with.c"
				}
#line 434 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				_g_object_unref0 (candidate);
#line 3025 "open-with.c"
			}
		}
#line 434 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		__g_list_free__g_object_unref0_0 (candidate_collection);
#line 3030 "open-with.c"
	}
#line 439 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp17_ = (GtkHBox*) gtk_hbox_new (FALSE, 4);
#line 439 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_ref_sink (_tmp17_);
#line 439 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	hbox = _tmp17_;
#line 440 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp18_ = (GtkImage*) gtk_image_new ();
#line 440 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_ref_sink (_tmp18_);
#line 440 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (self->priv->icon);
#line 440 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	self->priv->icon = _tmp18_;
#line 441 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp19_ = self->priv->icon;
#line 441 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_box_pack_start ((GtkBox*) hbox, (GtkWidget*) _tmp19_, FALSE, FALSE, (guint) 0);
#line 442 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp20_ = (GtkLabel*) gtk_label_new (NULL);
#line 442 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_ref_sink (_tmp20_);
#line 442 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (self->priv->app_name);
#line 442 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	self->priv->app_name = _tmp20_;
#line 443 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp21_ = self->priv->app_name;
#line 443 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_label_set_use_markup (_tmp21_, TRUE);
#line 444 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp22_ = self->priv->app_name;
#line 444 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_label_set_ellipsize (_tmp22_, PANGO_ELLIPSIZE_END);
#line 445 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp23_ = self->priv->app_name;
#line 445 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_box_pack_start ((GtkBox*) hbox, (GtkWidget*) _tmp23_, TRUE, TRUE, (guint) 0);
#line 446 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_container_add ((GtkContainer*) self, (GtkWidget*) hbox);
#line 447 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_widget_show_all ((GtkWidget*) self);
#line 448 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	external_applications_chooser_button_update_label (self);
#line 450 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_signal_connect_data ((GtkButton*) self, "clicked", (GCallback) ___lambda7__gtk_button_clicked, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
#line 430 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (hbox);
#line 430 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_free0 (content_type);
#line 430 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	block2_data_unref (_data2_);
#line 430 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_data2_ = NULL;
#line 430 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	return self;
#line 3088 "open-with.c"
}


ExternalApplicationsChooserButton* external_applications_chooser_button_new (const gchar* mime_type, const gchar* commandline) {
#line 430 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	return external_applications_chooser_button_construct (EXTERNAL_APPLICATIONS_TYPE_CHOOSER_BUTTON, mime_type, commandline);
#line 3095 "open-with.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 3108 "open-with.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 3139 "open-with.c"
				goto __catch3_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 3148 "open-with.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 3164 "open-with.c"
				goto __catch3_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 3175 "open-with.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 3189 "open-with.c"
	}
	goto __finally3;
	__catch3_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 3203 "open-with.c"
	}
	__finally3:
#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 3214 "open-with.c"
	}
}


static void external_applications_chooser_button_update_label (ExternalApplicationsChooserButton* self) {
	gchar* _tmp0_ = NULL;
	GAppInfo* _tmp1_ = NULL;
	GtkLabel* _tmp8_ = NULL;
	GIcon* _tmp9_ = NULL;
	GAppInfo* _tmp10_ = NULL;
	GtkImage* _tmp13_ = NULL;
#line 460 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (self != NULL);
#line 461 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = self->priv->_app_info;
#line 461 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (_tmp1_ != NULL) {
#line 3232 "open-with.c"
		GAppInfo* _tmp2_ = NULL;
		gchar* _tmp3_ = NULL;
		gchar* _tmp4_ = NULL;
		gchar* _tmp5_ = NULL;
#line 461 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp2_ = self->priv->_app_info;
#line 461 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp3_ = external_applications_describe_app_info (_tmp2_);
#line 461 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp4_ = _tmp3_;
#line 461 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp5_ = string_replace (_tmp4_, "\n", " ");
#line 461 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_free0 (_tmp0_);
#line 461 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp0_ = _tmp5_;
#line 461 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_free0 (_tmp4_);
#line 3251 "open-with.c"
	} else {
		const gchar* _tmp6_ = NULL;
		gchar* _tmp7_ = NULL;
#line 461 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp6_ = _ ("None");
#line 461 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp7_ = g_strdup (_tmp6_);
#line 461 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_free0 (_tmp0_);
#line 461 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp0_ = _tmp7_;
#line 3263 "open-with.c"
	}
#line 461 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp8_ = self->priv->app_name;
#line 461 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_label_set_label (_tmp8_, _tmp0_);
#line 462 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp10_ = self->priv->_app_info;
#line 462 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (_tmp10_ != NULL) {
#line 3273 "open-with.c"
		GAppInfo* _tmp11_ = NULL;
		GIcon* _tmp12_ = NULL;
#line 462 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp11_ = self->priv->_app_info;
#line 462 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp12_ = external_applications_app_info_get_icon (_tmp11_);
#line 462 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_object_unref0 (_tmp9_);
#line 462 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp9_ = _tmp12_;
#line 3284 "open-with.c"
	} else {
#line 462 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_object_unref0 (_tmp9_);
#line 462 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp9_ = NULL;
#line 3290 "open-with.c"
	}
#line 462 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp13_ = self->priv->icon;
#line 462 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_image_set_from_gicon (_tmp13_, _tmp9_, GTK_ICON_SIZE_BUTTON);
#line 460 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (_tmp9_);
#line 460 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_free0 (_tmp0_);
#line 3300 "open-with.c"
}


GAppInfo* external_applications_chooser_button_get_app_info (ExternalApplicationsChooserButton* self) {
	GAppInfo* result;
	GAppInfo* _tmp0_ = NULL;
#line 424 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 424 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = self->priv->_app_info;
#line 424 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	result = _tmp0_;
#line 424 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	return result;
#line 3315 "open-with.c"
}


void external_applications_chooser_button_set_app_info (ExternalApplicationsChooserButton* self, GAppInfo* value) {
	GAppInfo* _tmp0_ = NULL;
	GAppInfo* _tmp1_ = NULL;
#line 424 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (self != NULL);
#line 424 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = value;
#line 424 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 424 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (self->priv->_app_info);
#line 424 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	self->priv->_app_info = _tmp1_;
#line 424 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_notify ((GObject *) self, "app-info");
#line 3334 "open-with.c"
}


const gchar* external_applications_chooser_button_get_commandline (ExternalApplicationsChooserButton* self) {
	const gchar* result;
	const gchar* _tmp0_ = NULL;
#line 425 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 425 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = self->priv->_commandline;
#line 425 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	result = _tmp0_;
#line 425 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	return result;
#line 3349 "open-with.c"
}


void external_applications_chooser_button_set_commandline (ExternalApplicationsChooserButton* self, const gchar* value) {
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 425 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (self != NULL);
#line 425 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = value;
#line 425 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 425 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_free0 (self->priv->_commandline);
#line 425 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	self->priv->_commandline = _tmp1_;
#line 425 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_notify ((GObject *) self, "commandline");
#line 3368 "open-with.c"
}


static void external_applications_chooser_button_class_init (ExternalApplicationsChooserButtonClass * klass) {
#line 423 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	external_applications_chooser_button_parent_class = g_type_class_peek_parent (klass);
#line 423 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_type_class_add_private (klass, sizeof (ExternalApplicationsChooserButtonPrivate));
#line 423 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_external_applications_chooser_button_get_property;
#line 423 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_external_applications_chooser_button_set_property;
#line 423 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	G_OBJECT_CLASS (klass)->finalize = external_applications_chooser_button_finalize;
#line 423 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), EXTERNAL_APPLICATIONS_CHOOSER_BUTTON_APP_INFO, g_param_spec_object ("app-info", "app-info", "app-info", g_app_info_get_type (), G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 423 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), EXTERNAL_APPLICATIONS_CHOOSER_BUTTON_COMMANDLINE, g_param_spec_string ("commandline", "commandline", "commandline", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 423 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_signal_new ("selected", EXTERNAL_APPLICATIONS_TYPE_CHOOSER_BUTTON, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
#line 3389 "open-with.c"
}


static void external_applications_chooser_button_instance_init (ExternalApplicationsChooserButton * self) {
#line 423 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	self->priv = EXTERNAL_APPLICATIONS_CHOOSER_BUTTON_GET_PRIVATE (self);
#line 3396 "open-with.c"
}


static void external_applications_chooser_button_finalize (GObject* obj) {
	ExternalApplicationsChooserButton * self;
#line 423 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, EXTERNAL_APPLICATIONS_TYPE_CHOOSER_BUTTON, ExternalApplicationsChooserButton);
#line 424 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (self->priv->_app_info);
#line 425 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_free0 (self->priv->_commandline);
#line 426 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (self->priv->dialog);
#line 427 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (self->priv->app_name);
#line 428 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (self->priv->icon);
#line 423 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	G_OBJECT_CLASS (external_applications_chooser_button_parent_class)->finalize (obj);
#line 3416 "open-with.c"
}


GType external_applications_chooser_button_get_type (void) {
	static volatile gsize external_applications_chooser_button_type_id__volatile = 0;
	if (g_once_init_enter (&external_applications_chooser_button_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ExternalApplicationsChooserButtonClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) external_applications_chooser_button_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ExternalApplicationsChooserButton), 0, (GInstanceInitFunc) external_applications_chooser_button_instance_init, NULL };
		GType external_applications_chooser_button_type_id;
		external_applications_chooser_button_type_id = g_type_register_static (GTK_TYPE_BUTTON, "ExternalApplicationsChooserButton", &g_define_type_info, 0);
		g_once_init_leave (&external_applications_chooser_button_type_id__volatile, external_applications_chooser_button_type_id);
	}
	return external_applications_chooser_button_type_id__volatile;
}


static void _vala_external_applications_chooser_button_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	ExternalApplicationsChooserButton * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, EXTERNAL_APPLICATIONS_TYPE_CHOOSER_BUTTON, ExternalApplicationsChooserButton);
#line 423 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	switch (property_id) {
#line 423 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		case EXTERNAL_APPLICATIONS_CHOOSER_BUTTON_APP_INFO:
#line 423 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		g_value_set_object (value, external_applications_chooser_button_get_app_info (self));
#line 423 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		break;
#line 423 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		case EXTERNAL_APPLICATIONS_CHOOSER_BUTTON_COMMANDLINE:
#line 423 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		g_value_set_string (value, external_applications_chooser_button_get_commandline (self));
#line 423 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		break;
#line 3449 "open-with.c"
		default:
#line 423 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 423 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		break;
#line 3455 "open-with.c"
	}
}


static void _vala_external_applications_chooser_button_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	ExternalApplicationsChooserButton * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, EXTERNAL_APPLICATIONS_TYPE_CHOOSER_BUTTON, ExternalApplicationsChooserButton);
#line 423 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	switch (property_id) {
#line 423 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		case EXTERNAL_APPLICATIONS_CHOOSER_BUTTON_APP_INFO:
#line 423 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		external_applications_chooser_button_set_app_info (self, g_value_get_object (value));
#line 423 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		break;
#line 423 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		case EXTERNAL_APPLICATIONS_CHOOSER_BUTTON_COMMANDLINE:
#line 423 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		external_applications_chooser_button_set_commandline (self, g_value_get_string (value));
#line 423 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		break;
#line 3477 "open-with.c"
		default:
#line 423 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 423 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		break;
#line 3483 "open-with.c"
	}
}


static gint _external_applications_types_tree_sort_func_gtk_tree_iter_compare_func (GtkTreeModel* model, GtkTreeIter* a, GtkTreeIter* b, gpointer self) {
	gint result;
	result = external_applications_types_tree_sort_func ((ExternalApplicationsTypes*) self, model, a, b);
#line 479 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	return result;
#line 3493 "open-with.c"
}


static void _external_applications_types_on_render_type_icon_gtk_cell_layout_data_func (GtkCellLayout* cell_layout, GtkCellRenderer* cell, GtkTreeModel* tree_model, GtkTreeIter* iter, gpointer self) {
#line 485 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	external_applications_types_on_render_type_icon ((ExternalApplicationsTypes*) self, cell_layout, cell, tree_model, iter);
#line 3500 "open-with.c"
}


static void _external_applications_types_on_render_type_text_gtk_cell_layout_data_func (GtkCellLayout* cell_layout, GtkCellRenderer* cell, GtkTreeModel* tree_model, GtkTreeIter* iter, gpointer self) {
#line 492 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	external_applications_types_on_render_type_text ((ExternalApplicationsTypes*) self, cell_layout, cell, tree_model, iter);
#line 3507 "open-with.c"
}


static void _external_applications_types_on_render_icon_gtk_cell_layout_data_func (GtkCellLayout* cell_layout, GtkCellRenderer* cell, GtkTreeModel* tree_model, GtkTreeIter* iter, gpointer self) {
#line 499 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	external_applications_types_on_render_icon ((ExternalApplicationsTypes*) self, cell_layout, cell, tree_model, iter);
#line 3514 "open-with.c"
}


static void _external_applications_types_on_render_text_gtk_cell_layout_data_func (GtkCellLayout* cell_layout, GtkCellRenderer* cell, GtkTreeModel* tree_model, GtkTreeIter* iter, gpointer self) {
#line 507 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	external_applications_types_on_render_text ((ExternalApplicationsTypes*) self, cell_layout, cell, tree_model, iter);
#line 3521 "open-with.c"
}


static void _external_applications_types_row_activated_gtk_tree_view_row_activated (GtkTreeView* _sender, GtkTreePath* path, GtkTreeViewColumn* column, gpointer self) {
#line 510 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	external_applications_types_row_activated ((ExternalApplicationsTypes*) self, path, column);
#line 3528 "open-with.c"
}


static void _g_free0_ (gpointer var) {
#line 520 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	var = (g_free (var), NULL);
#line 3535 "open-with.c"
}


static void _g_list_free__g_free0_ (GList* self) {
#line 520 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_list_foreach (self, (GFunc) _g_free0_, NULL);
#line 520 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_list_free (self);
#line 3544 "open-with.c"
}


static void __lambda8_ (ExternalApplicationsTypes* self, GdkRectangle* allocation) {
	GtkTreeView* _tmp0_ = NULL;
#line 525 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (allocation != NULL);
#line 526 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = self->priv->treeview;
#line 526 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_tree_view_columns_autosize (_tmp0_);
#line 3556 "open-with.c"
}


static void ___lambda8__gtk_widget_size_allocate (GtkWidget* _sender, GdkRectangle* allocation, gpointer self) {
#line 525 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	__lambda8_ ((ExternalApplicationsTypes*) self, allocation);
#line 3563 "open-with.c"
}


ExternalApplicationsTypes* external_applications_types_construct (GType object_type) {
	ExternalApplicationsTypes * self = NULL;
	GtkTreeViewColumn* column = NULL;
	GtkListStore* _tmp0_ = NULL;
	GtkTreeView* _tmp1_ = NULL;
	GtkTreeView* _tmp2_ = NULL;
	GtkListStore* _tmp3_ = NULL;
	GtkListStore* _tmp4_ = NULL;
	GtkTreeViewColumn* _tmp5_ = NULL;
	GtkTreeViewColumn* _tmp6_ = NULL;
	GtkCellRendererPixbuf* renderer_type_icon = NULL;
	GtkCellRendererPixbuf* _tmp7_ = NULL;
	GtkTreeViewColumn* _tmp8_ = NULL;
	GtkCellRendererPixbuf* _tmp9_ = NULL;
	GtkTreeViewColumn* _tmp10_ = NULL;
	GtkCellRendererPixbuf* _tmp11_ = NULL;
	GtkTreeView* _tmp12_ = NULL;
	GtkTreeViewColumn* _tmp13_ = NULL;
	GtkTreeViewColumn* _tmp14_ = NULL;
	GtkTreeViewColumn* _tmp15_ = NULL;
	GtkCellRendererText* renderer_type_text = NULL;
	GtkCellRendererText* _tmp16_ = NULL;
	GtkTreeViewColumn* _tmp17_ = NULL;
	GtkCellRendererText* _tmp18_ = NULL;
	GtkTreeViewColumn* _tmp19_ = NULL;
	GtkCellRendererText* _tmp20_ = NULL;
	GtkTreeView* _tmp21_ = NULL;
	GtkTreeViewColumn* _tmp22_ = NULL;
	GtkTreeViewColumn* _tmp23_ = NULL;
	GtkTreeViewColumn* _tmp24_ = NULL;
	GtkCellRendererPixbuf* renderer_icon = NULL;
	GtkCellRendererPixbuf* _tmp25_ = NULL;
	GtkTreeViewColumn* _tmp26_ = NULL;
	GtkCellRendererPixbuf* _tmp27_ = NULL;
	GtkTreeViewColumn* _tmp28_ = NULL;
	GtkCellRendererPixbuf* _tmp29_ = NULL;
	GtkTreeView* _tmp30_ = NULL;
	GtkTreeViewColumn* _tmp31_ = NULL;
	GtkTreeViewColumn* _tmp32_ = NULL;
	GtkTreeViewColumn* _tmp33_ = NULL;
	GtkCellRendererText* renderer_text = NULL;
	GtkCellRendererText* _tmp34_ = NULL;
	GtkTreeViewColumn* _tmp35_ = NULL;
	GtkCellRendererText* _tmp36_ = NULL;
	GtkTreeViewColumn* _tmp37_ = NULL;
	GtkTreeViewColumn* _tmp38_ = NULL;
	GtkCellRendererText* _tmp39_ = NULL;
	GtkTreeView* _tmp40_ = NULL;
	GtkTreeViewColumn* _tmp41_ = NULL;
	GtkTreeView* _tmp42_ = NULL;
	GtkTreeView* _tmp43_ = NULL;
	GtkScrolledWindow* scrolled = NULL;
	GtkScrolledWindow* _tmp44_ = NULL;
	GtkScrolledWindow* _tmp45_ = NULL;
	GtkScrolledWindow* _tmp46_ = NULL;
	GtkTreeView* _tmp47_ = NULL;
	GtkScrolledWindow* _tmp48_ = NULL;
	gint height = 0;
	GtkTreeView* _tmp49_ = NULL;
	PangoLayout* _tmp50_ = NULL;
	PangoLayout* _tmp51_ = NULL;
	gint _tmp52_ = 0;
	GtkScrolledWindow* _tmp53_ = NULL;
	gint _tmp54_ = 0;
	GList* _tmp55_ = NULL;
	GVfs* _tmp58_ = NULL;
	gchar** _tmp59_ = NULL;
	gchar** _tmp60_ = NULL;
	GtkTreeView* _tmp65_ = NULL;
#line 472 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	self = (ExternalApplicationsTypes*) g_object_new (object_type, NULL);
#line 475 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = self->store;
#line 475 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = (GtkTreeView*) gtk_tree_view_new_with_model ((GtkTreeModel*) _tmp0_);
#line 475 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_ref_sink (_tmp1_);
#line 475 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (self->priv->treeview);
#line 475 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	self->priv->treeview = _tmp1_;
#line 476 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp2_ = self->priv->treeview;
#line 476 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_tree_view_set_headers_visible (_tmp2_, FALSE);
#line 478 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp3_ = self->store;
#line 478 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_tree_sortable_set_sort_column_id ((GtkTreeSortable*) _tmp3_, 0, GTK_SORT_ASCENDING);
#line 479 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp4_ = self->store;
#line 479 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_tree_sortable_set_sort_func ((GtkTreeSortable*) _tmp4_, 0, _external_applications_types_tree_sort_func_gtk_tree_iter_compare_func, g_object_ref (self), g_object_unref);
#line 481 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp5_ = gtk_tree_view_column_new ();
#line 481 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_ref_sink (_tmp5_);
#line 481 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (column);
#line 481 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	column = _tmp5_;
#line 482 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp6_ = column;
#line 482 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_tree_view_column_set_sizing (_tmp6_, GTK_TREE_VIEW_COLUMN_AUTOSIZE);
#line 483 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp7_ = (GtkCellRendererPixbuf*) gtk_cell_renderer_pixbuf_new ();
#line 483 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_ref_sink (_tmp7_);
#line 483 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	renderer_type_icon = _tmp7_;
#line 484 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp8_ = column;
#line 484 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp9_ = renderer_type_icon;
#line 484 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp8_, (GtkCellRenderer*) _tmp9_, FALSE);
#line 485 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp10_ = column;
#line 485 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp11_ = renderer_type_icon;
#line 485 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_cell_layout_set_cell_data_func ((GtkCellLayout*) _tmp10_, (GtkCellRenderer*) _tmp11_, _external_applications_types_on_render_type_icon_gtk_cell_layout_data_func, g_object_ref (self), g_object_unref);
#line 486 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp12_ = self->priv->treeview;
#line 486 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp13_ = column;
#line 486 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_tree_view_append_column (_tmp12_, _tmp13_);
#line 488 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp14_ = gtk_tree_view_column_new ();
#line 488 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_ref_sink (_tmp14_);
#line 488 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (column);
#line 488 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	column = _tmp14_;
#line 489 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp15_ = column;
#line 489 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_tree_view_column_set_sizing (_tmp15_, GTK_TREE_VIEW_COLUMN_AUTOSIZE);
#line 490 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp16_ = (GtkCellRendererText*) gtk_cell_renderer_text_new ();
#line 490 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_ref_sink (_tmp16_);
#line 490 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	renderer_type_text = _tmp16_;
#line 491 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp17_ = column;
#line 491 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp18_ = renderer_type_text;
#line 491 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp17_, (GtkCellRenderer*) _tmp18_, TRUE);
#line 492 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp19_ = column;
#line 492 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp20_ = renderer_type_text;
#line 492 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_cell_layout_set_cell_data_func ((GtkCellLayout*) _tmp19_, (GtkCellRenderer*) _tmp20_, _external_applications_types_on_render_type_text_gtk_cell_layout_data_func, g_object_ref (self), g_object_unref);
#line 493 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp21_ = self->priv->treeview;
#line 493 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp22_ = column;
#line 493 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_tree_view_append_column (_tmp21_, _tmp22_);
#line 495 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp23_ = gtk_tree_view_column_new ();
#line 495 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_ref_sink (_tmp23_);
#line 495 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (column);
#line 495 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	column = _tmp23_;
#line 496 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp24_ = column;
#line 496 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_tree_view_column_set_sizing (_tmp24_, GTK_TREE_VIEW_COLUMN_AUTOSIZE);
#line 497 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp25_ = (GtkCellRendererPixbuf*) gtk_cell_renderer_pixbuf_new ();
#line 497 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_ref_sink (_tmp25_);
#line 497 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	renderer_icon = _tmp25_;
#line 498 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp26_ = column;
#line 498 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp27_ = renderer_icon;
#line 498 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp26_, (GtkCellRenderer*) _tmp27_, FALSE);
#line 499 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp28_ = column;
#line 499 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp29_ = renderer_icon;
#line 499 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_cell_layout_set_cell_data_func ((GtkCellLayout*) _tmp28_, (GtkCellRenderer*) _tmp29_, _external_applications_types_on_render_icon_gtk_cell_layout_data_func, g_object_ref (self), g_object_unref);
#line 500 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp30_ = self->priv->treeview;
#line 500 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp31_ = column;
#line 500 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_tree_view_append_column (_tmp30_, _tmp31_);
#line 502 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp32_ = gtk_tree_view_column_new ();
#line 502 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_ref_sink (_tmp32_);
#line 502 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (column);
#line 502 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	column = _tmp32_;
#line 503 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp33_ = column;
#line 503 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_tree_view_column_set_sizing (_tmp33_, GTK_TREE_VIEW_COLUMN_AUTOSIZE);
#line 504 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp34_ = (GtkCellRendererText*) gtk_cell_renderer_text_new ();
#line 504 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_ref_sink (_tmp34_);
#line 504 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	renderer_text = _tmp34_;
#line 505 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp35_ = column;
#line 505 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp36_ = renderer_text;
#line 505 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp35_, (GtkCellRenderer*) _tmp36_, TRUE);
#line 506 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp37_ = column;
#line 506 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_tree_view_column_set_expand (_tmp37_, TRUE);
#line 507 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp38_ = column;
#line 507 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp39_ = renderer_text;
#line 507 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_cell_layout_set_cell_data_func ((GtkCellLayout*) _tmp38_, (GtkCellRenderer*) _tmp39_, _external_applications_types_on_render_text_gtk_cell_layout_data_func, g_object_ref (self), g_object_unref);
#line 508 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp40_ = self->priv->treeview;
#line 508 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp41_ = column;
#line 508 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_tree_view_append_column (_tmp40_, _tmp41_);
#line 510 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp42_ = self->priv->treeview;
#line 510 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_signal_connect_object (_tmp42_, "row-activated", (GCallback) _external_applications_types_row_activated_gtk_tree_view_row_activated, self, 0);
#line 511 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp43_ = self->priv->treeview;
#line 511 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_widget_show ((GtkWidget*) _tmp43_);
#line 512 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp44_ = (GtkScrolledWindow*) gtk_scrolled_window_new (NULL, NULL);
#line 512 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_ref_sink (_tmp44_);
#line 512 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	scrolled = _tmp44_;
#line 513 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp45_ = scrolled;
#line 513 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_scrolled_window_set_policy (_tmp45_, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
#line 514 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp46_ = scrolled;
#line 514 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp47_ = self->priv->treeview;
#line 514 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_container_add ((GtkContainer*) _tmp46_, (GtkWidget*) _tmp47_);
#line 515 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp48_ = scrolled;
#line 515 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_box_pack_start ((GtkBox*) self, (GtkWidget*) _tmp48_, TRUE, TRUE, (guint) 0);
#line 517 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp49_ = self->priv->treeview;
#line 517 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp50_ = gtk_widget_create_pango_layout ((GtkWidget*) _tmp49_, "a\nb");
#line 517 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp51_ = _tmp50_;
#line 517 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	pango_layout_get_pixel_size (_tmp51_, NULL, &_tmp52_);
#line 517 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	height = _tmp52_;
#line 517 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (_tmp51_);
#line 518 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp53_ = scrolled;
#line 518 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp54_ = height;
#line 518 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_widget_set_size_request ((GtkWidget*) _tmp53_, -1, _tmp54_ * 5);
#line 520 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp55_ = g_content_types_get_registered ();
#line 3856 "open-with.c"
	{
		GList* content_type_collection = NULL;
		GList* content_type_it = NULL;
#line 520 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		content_type_collection = _tmp55_;
#line 520 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		for (content_type_it = content_type_collection; content_type_it != NULL; content_type_it = content_type_it->next) {
#line 3864 "open-with.c"
			gchar* _tmp56_ = NULL;
			gchar* content_type = NULL;
#line 520 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
			_tmp56_ = g_strdup ((const gchar*) content_type_it->data);
#line 520 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
			content_type = _tmp56_;
#line 3871 "open-with.c"
			{
				const gchar* _tmp57_ = NULL;
#line 521 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				_tmp57_ = content_type;
#line 521 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				external_applications_types_launcher_added (self, _tmp57_);
#line 520 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				_g_free0 (content_type);
#line 3880 "open-with.c"
			}
		}
#line 520 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		__g_list_free__g_free0_0 (content_type_collection);
#line 3885 "open-with.c"
	}
#line 522 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp58_ = g_vfs_get_default ();
#line 522 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp60_ = _tmp59_ = g_vfs_get_supported_uri_schemes (_tmp58_);
#line 3891 "open-with.c"
	{
		gchar** scheme_collection = NULL;
		gint scheme_collection_length1 = 0;
		gint _scheme_collection_size_ = 0;
		gint scheme_it = 0;
#line 522 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		scheme_collection = _tmp60_;
#line 522 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		scheme_collection_length1 = _vala_array_length (_tmp59_);
#line 522 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		for (scheme_it = 0; scheme_it < _vala_array_length (_tmp59_); scheme_it = scheme_it + 1) {
#line 3903 "open-with.c"
			gchar* _tmp61_ = NULL;
			gchar* scheme = NULL;
#line 522 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
			_tmp61_ = g_strdup (scheme_collection[scheme_it]);
#line 522 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
			scheme = _tmp61_;
#line 3910 "open-with.c"
			{
				const gchar* _tmp62_ = NULL;
				gchar* _tmp63_ = NULL;
				gchar* _tmp64_ = NULL;
#line 523 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				_tmp62_ = scheme;
#line 523 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				_tmp63_ = g_strconcat ("x-scheme-handler/", _tmp62_, NULL);
#line 523 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				_tmp64_ = _tmp63_;
#line 523 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				external_applications_types_launcher_added (self, _tmp64_);
#line 523 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				_g_free0 (_tmp64_);
#line 522 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				_g_free0 (scheme);
#line 3927 "open-with.c"
			}
		}
	}
#line 525 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp65_ = self->priv->treeview;
#line 525 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_signal_connect_object ((GtkWidget*) _tmp65_, "size-allocate", (GCallback) ___lambda8__gtk_widget_size_allocate, self, G_CONNECT_AFTER);
#line 472 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (scrolled);
#line 472 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (renderer_text);
#line 472 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (renderer_icon);
#line 472 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (renderer_type_text);
#line 472 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (renderer_type_icon);
#line 472 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (column);
#line 472 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	return self;
#line 3949 "open-with.c"
}


ExternalApplicationsTypes* external_applications_types_new (void) {
#line 472 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	return external_applications_types_construct (EXTERNAL_APPLICATIONS_TYPE_TYPES);
#line 3956 "open-with.c"
}


static void external_applications_types_on_render_type_icon (ExternalApplicationsTypes* self, GtkCellLayout* column, GtkCellRenderer* renderer, GtkTreeModel* model, GtkTreeIter* iter) {
	gchar* content_type = NULL;
	GtkListStore* _tmp0_ = NULL;
	GtkTreeIter _tmp1_ = {0};
	GtkCellRenderer* _tmp2_ = NULL;
	GIcon* _tmp3_ = NULL;
	GIcon* _tmp4_ = NULL;
#line 530 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (self != NULL);
#line 530 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (column != NULL);
#line 530 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (renderer != NULL);
#line 530 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (model != NULL);
#line 530 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (iter != NULL);
#line 534 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = self->store;
#line 534 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = *iter;
#line 534 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_tree_model_get ((GtkTreeModel*) _tmp0_, &_tmp1_, 0, &content_type, -1);
#line 536 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp2_ = renderer;
#line 536 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp3_ = g_content_type_get_icon (content_type);
#line 536 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp4_ = _tmp3_;
#line 536 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_set ((GObject*) _tmp2_, "gicon", _tmp4_, "stock-size", GTK_ICON_SIZE_BUTTON, "xpad", 4, NULL);
#line 536 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (_tmp4_);
#line 530 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_free0 (content_type);
#line 3995 "open-with.c"
}


static void external_applications_types_on_render_type_text (ExternalApplicationsTypes* self, GtkCellLayout* column, GtkCellRenderer* renderer, GtkTreeModel* model, GtkTreeIter* iter) {
	gchar* content_type = NULL;
	GAppInfo* app_info = NULL;
	GtkListStore* _tmp0_ = NULL;
	GtkTreeIter _tmp1_ = {0};
	gchar* desc = NULL;
	gchar* mime_type = NULL;
	const gchar* _tmp2_ = NULL;
	gboolean _tmp3_ = FALSE;
	GtkCellRenderer* _tmp15_ = NULL;
	const gchar* _tmp16_ = NULL;
	const gchar* _tmp17_ = NULL;
	gchar* _tmp18_ = NULL;
	gchar* _tmp19_ = NULL;
#line 541 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (self != NULL);
#line 541 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (column != NULL);
#line 541 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (renderer != NULL);
#line 541 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (model != NULL);
#line 541 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (iter != NULL);
#line 546 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = self->store;
#line 546 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = *iter;
#line 546 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_tree_model_get ((GtkTreeModel*) _tmp0_, &_tmp1_, 0, &content_type, 1, &app_info, -1);
#line 549 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp2_ = content_type;
#line 549 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp3_ = g_str_has_prefix (_tmp2_, "x-scheme-handler/");
#line 549 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (_tmp3_) {
#line 4035 "open-with.c"
		const gchar* _tmp4_ = NULL;
		gchar** _tmp5_ = NULL;
		gchar** _tmp6_ = NULL;
		gchar** _tmp7_ = NULL;
		gint _tmp7__length1 = 0;
		const gchar* _tmp8_ = NULL;
		gchar* _tmp9_ = NULL;
		gchar* _tmp10_ = NULL;
#line 550 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp4_ = content_type;
#line 550 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp6_ = _tmp5_ = g_strsplit (_tmp4_, "/", 0);
#line 550 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp7_ = _tmp6_;
#line 550 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp7__length1 = _vala_array_length (_tmp5_);
#line 550 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp8_ = _tmp7_[1];
#line 550 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp9_ = g_strconcat (_tmp8_, "://", NULL);
#line 550 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_free0 (desc);
#line 550 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		desc = _tmp9_;
#line 550 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp7_ = (_vala_array_free (_tmp7_, _tmp7__length1, (GDestroyNotify) g_free), NULL);
#line 551 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp10_ = g_strdup ("");
#line 551 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_free0 (mime_type);
#line 551 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		mime_type = _tmp10_;
#line 4068 "open-with.c"
	} else {
		const gchar* _tmp11_ = NULL;
		gchar* _tmp12_ = NULL;
		const gchar* _tmp13_ = NULL;
		gchar* _tmp14_ = NULL;
#line 553 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp11_ = content_type;
#line 553 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp12_ = g_content_type_get_description (_tmp11_);
#line 553 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_free0 (desc);
#line 553 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		desc = _tmp12_;
#line 554 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp13_ = content_type;
#line 554 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp14_ = g_content_type_get_mime_type (_tmp13_);
#line 554 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_free0 (mime_type);
#line 554 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		mime_type = _tmp14_;
#line 4090 "open-with.c"
	}
#line 557 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp15_ = renderer;
#line 557 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp16_ = desc;
#line 557 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp17_ = mime_type;
#line 557 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp18_ = g_markup_printf_escaped ("<b>%s</b>\n%s", _tmp16_, _tmp17_);
#line 557 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp19_ = _tmp18_;
#line 557 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_set ((GObject*) _tmp15_, "markup", _tmp19_, "width-chars", 30, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
#line 557 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_free0 (_tmp19_);
#line 541 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_free0 (mime_type);
#line 541 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_free0 (desc);
#line 541 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (app_info);
#line 541 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_free0 (content_type);
#line 4114 "open-with.c"
}


static void external_applications_types_on_render_icon (ExternalApplicationsTypes* self, GtkCellLayout* column, GtkCellRenderer* renderer, GtkTreeModel* model, GtkTreeIter* iter) {
	GAppInfo* app_info = NULL;
	GtkTreeModel* _tmp0_ = NULL;
	GtkTreeIter _tmp1_ = {0};
	GtkCellRenderer* _tmp2_ = NULL;
	GIcon* _tmp3_ = NULL;
	GIcon* _tmp4_ = NULL;
#line 568 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (self != NULL);
#line 568 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (column != NULL);
#line 568 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (renderer != NULL);
#line 568 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (model != NULL);
#line 568 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (iter != NULL);
#line 572 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = model;
#line 572 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = *iter;
#line 572 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_tree_model_get (_tmp0_, &_tmp1_, 1, &app_info, -1);
#line 574 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp2_ = renderer;
#line 574 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp3_ = external_applications_app_info_get_icon (app_info);
#line 574 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp4_ = _tmp3_;
#line 574 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_set ((GObject*) _tmp2_, "gicon", _tmp4_, "stock-size", GTK_ICON_SIZE_MENU, "xpad", 4, NULL);
#line 574 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (_tmp4_);
#line 568 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (app_info);
#line 4153 "open-with.c"
}


static void external_applications_types_on_render_text (ExternalApplicationsTypes* self, GtkCellLayout* column, GtkCellRenderer* renderer, GtkTreeModel* model, GtkTreeIter* iter) {
	GAppInfo* app_info = NULL;
	GtkTreeModel* _tmp0_ = NULL;
	GtkTreeIter _tmp1_ = {0};
	GtkCellRenderer* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
#line 579 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (self != NULL);
#line 579 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (column != NULL);
#line 579 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (renderer != NULL);
#line 579 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (model != NULL);
#line 579 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (iter != NULL);
#line 583 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = model;
#line 583 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = *iter;
#line 583 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_tree_model_get (_tmp0_, &_tmp1_, 1, &app_info, -1);
#line 584 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp2_ = renderer;
#line 584 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp3_ = external_applications_describe_app_info (app_info);
#line 584 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp4_ = _tmp3_;
#line 584 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_set ((GObject*) _tmp2_, "markup", _tmp4_, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
#line 584 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_free0 (_tmp4_);
#line 579 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (app_info);
#line 4192 "open-with.c"
}


static void external_applications_types_launcher_added (ExternalApplicationsTypes* self, const gchar* content_type) {
	GAppInfo* app_info = NULL;
	const gchar* _tmp0_ = NULL;
	GAppInfo* _tmp1_ = NULL;
	GAppInfo* _tmp2_ = NULL;
	GtkTreeIter iter = {0};
	GtkListStore* _tmp3_ = NULL;
	GtkTreeIter _tmp4_ = {0};
	GtkListStore* _tmp5_ = NULL;
	GtkTreeIter _tmp6_ = {0};
	const gchar* _tmp7_ = NULL;
	GAppInfo* _tmp8_ = NULL;
#line 588 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (self != NULL);
#line 588 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (content_type != NULL);
#line 589 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = content_type;
#line 589 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = g_app_info_get_default_for_type (_tmp0_, FALSE);
#line 589 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	app_info = _tmp1_;
#line 590 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp2_ = app_info;
#line 590 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (_tmp2_ == NULL) {
#line 591 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_object_unref0 (app_info);
#line 591 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		return;
#line 4226 "open-with.c"
	}
#line 594 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp3_ = self->store;
#line 594 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_list_store_append (_tmp3_, &_tmp4_);
#line 594 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	iter = _tmp4_;
#line 595 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp5_ = self->store;
#line 595 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp6_ = iter;
#line 595 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp7_ = content_type;
#line 595 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp8_ = app_info;
#line 595 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_list_store_set (_tmp5_, &_tmp6_, 0, _tmp7_, 1, _tmp8_, -1);
#line 588 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (app_info);
#line 4246 "open-with.c"
}


static gint external_applications_types_tree_sort_func (ExternalApplicationsTypes* self, GtkTreeModel* model, GtkTreeIter* a, GtkTreeIter* b) {
	gint result = 0;
	gchar* content_type1 = NULL;
	gchar* content_type2 = NULL;
	GtkTreeModel* _tmp0_ = NULL;
	GtkTreeIter _tmp1_ = {0};
	GtkTreeModel* _tmp2_ = NULL;
	GtkTreeIter _tmp3_ = {0};
	GCompareFunc _tmp4_ = NULL;
	gint _tmp5_ = 0;
#line 598 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (self != NULL, 0);
#line 598 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (model != NULL, 0);
#line 598 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (a != NULL, 0);
#line 598 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (b != NULL, 0);
#line 600 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = model;
#line 600 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = *a;
#line 600 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_tree_model_get (_tmp0_, &_tmp1_, 0, &content_type1, -1);
#line 601 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp2_ = model;
#line 601 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp3_ = *b;
#line 601 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_tree_model_get (_tmp2_, &_tmp3_, 0, &content_type2, -1);
#line 602 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp4_ = g_strcmp0;
#line 602 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp5_ = _tmp4_ (content_type1, content_type2);
#line 602 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	result = _tmp5_;
#line 602 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_free0 (content_type2);
#line 602 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_free0 (content_type1);
#line 602 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	return result;
#line 4292 "open-with.c"
}


static void external_applications_types_row_activated (ExternalApplicationsTypes* self, GtkTreePath* path, GtkTreeViewColumn* column) {
	GtkTreeIter iter = {0};
	GtkListStore* _tmp0_ = NULL;
	GtkTreePath* _tmp1_ = NULL;
	GtkTreeIter _tmp2_ = {0};
	gboolean _tmp3_ = FALSE;
#line 605 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (self != NULL);
#line 605 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (path != NULL);
#line 605 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (column != NULL);
#line 607 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = self->store;
#line 607 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = path;
#line 607 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp3_ = gtk_tree_model_get_iter ((GtkTreeModel*) _tmp0_, &_tmp2_, _tmp1_);
#line 607 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	iter = _tmp2_;
#line 607 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (_tmp3_) {
#line 4318 "open-with.c"
		gchar* content_type = NULL;
		GtkListStore* _tmp4_ = NULL;
		GtkTreeIter _tmp5_ = {0};
		const gchar* _tmp6_ = NULL;
		GtkTreeIter _tmp7_ = {0};
#line 609 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp4_ = self->store;
#line 609 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp5_ = iter;
#line 609 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		gtk_tree_model_get ((GtkTreeModel*) _tmp4_, &_tmp5_, 0, &content_type, -1);
#line 610 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp6_ = content_type;
#line 610 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp7_ = iter;
#line 610 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		g_signal_emit_by_name (self, "selected", _tmp6_, &_tmp7_);
#line 607 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_free0 (content_type);
#line 4338 "open-with.c"
	}
}


static void g_cclosure_user_marshal_VOID__STRING_BOXED (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
	typedef void (*GMarshalFunc_VOID__STRING_BOXED) (gpointer data1, const char* arg_1, gpointer arg_2, gpointer data2);
	register GMarshalFunc_VOID__STRING_BOXED callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
#line 468 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (n_param_values == 3);
#line 468 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (G_CCLOSURE_SWAP_DATA (closure)) {
#line 468 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		data1 = closure->data;
#line 468 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		data2 = param_values->data[0].v_pointer;
#line 4358 "open-with.c"
	} else {
#line 468 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		data1 = param_values->data[0].v_pointer;
#line 468 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		data2 = closure->data;
#line 4364 "open-with.c"
	}
#line 468 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	callback = (GMarshalFunc_VOID__STRING_BOXED) (marshal_data ? marshal_data : cc->callback);
#line 468 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	callback (data1, g_value_get_string (param_values + 1), g_value_get_boxed (param_values + 2), data2);
#line 4370 "open-with.c"
}


static void external_applications_types_class_init (ExternalApplicationsTypesClass * klass) {
#line 468 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	external_applications_types_parent_class = g_type_class_peek_parent (klass);
#line 468 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_type_class_add_private (klass, sizeof (ExternalApplicationsTypesPrivate));
#line 468 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	G_OBJECT_CLASS (klass)->finalize = external_applications_types_finalize;
#line 468 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_signal_new ("selected", EXTERNAL_APPLICATIONS_TYPE_TYPES, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_BOXED, G_TYPE_NONE, 2, G_TYPE_STRING, GTK_TYPE_TREE_ITER);
#line 4383 "open-with.c"
}


static void external_applications_types_instance_init (ExternalApplicationsTypes * self) {
	GtkListStore* _tmp0_ = NULL;
#line 468 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	self->priv = EXTERNAL_APPLICATIONS_TYPES_GET_PRIVATE (self);
#line 469 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = gtk_list_store_new (2, G_TYPE_STRING, g_app_info_get_type ());
#line 469 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	self->store = _tmp0_;
#line 4395 "open-with.c"
}


static void external_applications_types_finalize (GObject* obj) {
	ExternalApplicationsTypes * self;
#line 468 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, EXTERNAL_APPLICATIONS_TYPE_TYPES, ExternalApplicationsTypes);
#line 469 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (self->store);
#line 470 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (self->priv->treeview);
#line 468 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	G_OBJECT_CLASS (external_applications_types_parent_class)->finalize (obj);
#line 4409 "open-with.c"
}


GType external_applications_types_get_type (void) {
	static volatile gsize external_applications_types_type_id__volatile = 0;
	if (g_once_init_enter (&external_applications_types_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ExternalApplicationsTypesClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) external_applications_types_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ExternalApplicationsTypes), 0, (GInstanceInitFunc) external_applications_types_instance_init, NULL };
		GType external_applications_types_type_id;
		external_applications_types_type_id = g_type_register_static (GTK_TYPE_VBOX, "ExternalApplicationsTypes", &g_define_type_info, 0);
		g_once_init_leave (&external_applications_types_type_id__volatile, external_applications_types_type_id);
	}
	return external_applications_types_type_id__volatile;
}


static GType external_applications_manager_next_step_get_type (void) {
	static volatile gsize external_applications_manager_next_step_type_id__volatile = 0;
	if (g_once_init_enter (&external_applications_manager_next_step_type_id__volatile)) {
		static const GEnumValue values[] = {{EXTERNAL_APPLICATIONS_MANAGER_NEXT_STEP_TRY_OPEN, "EXTERNAL_APPLICATIONS_MANAGER_NEXT_STEP_TRY_OPEN", "try-open"}, {EXTERNAL_APPLICATIONS_MANAGER_NEXT_STEP_OPEN_WITH, "EXTERNAL_APPLICATIONS_MANAGER_NEXT_STEP_OPEN_WITH", "open-with"}, {0, NULL, NULL}};
		GType external_applications_manager_next_step_type_id;
		external_applications_manager_next_step_type_id = g_enum_register_static ("ExternalApplicationsManagerNextStep", values);
		g_once_init_leave (&external_applications_manager_next_step_type_id__volatile, external_applications_manager_next_step_type_id);
	}
	return external_applications_manager_next_step_type_id__volatile;
}


static gboolean external_applications_manager_open_uri (ExternalApplicationsManager* self, MidoriTab* tab, const gchar* uri) {
	gboolean result = FALSE;
	const gchar* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	MidoriTab* _tmp4_ = NULL;
	gboolean _tmp5_ = FALSE;
	gboolean _tmp6_ = FALSE;
#line 624 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 624 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (tab != NULL, FALSE);
#line 624 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (uri != NULL, FALSE);
#line 625 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = uri;
#line 625 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = uri;
#line 625 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp2_ = external_applications_manager_get_content_type (self, _tmp1_, NULL);
#line 625 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp3_ = _tmp2_;
#line 625 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp4_ = tab;
#line 625 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp5_ = external_applications_manager_open_with_type (self, _tmp0_, _tmp3_, (GtkWidget*) _tmp4_, EXTERNAL_APPLICATIONS_MANAGER_NEXT_STEP_TRY_OPEN);
#line 625 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp6_ = _tmp5_;
#line 625 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_free0 (_tmp3_);
#line 625 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	result = _tmp6_;
#line 625 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	return result;
#line 4472 "open-with.c"
}


static gboolean external_applications_manager_navigation_requested (ExternalApplicationsManager* self, MidoriTab* tab, const gchar* uri) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	const gchar* _tmp2_ = NULL;
	gboolean _tmp3_ = FALSE;
	gchar* content_type = NULL;
	const gchar* _tmp8_ = NULL;
	gchar* _tmp9_ = NULL;
	const gchar* _tmp10_ = NULL;
	const gchar* _tmp11_ = NULL;
	MidoriTab* _tmp12_ = NULL;
#line 628 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 628 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (tab != NULL, FALSE);
#line 628 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (uri != NULL, FALSE);
#line 629 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp2_ = uri;
#line 629 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp3_ = g_str_has_prefix (_tmp2_, "file://");
#line 629 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (_tmp3_) {
#line 629 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp1_ = TRUE;
#line 4502 "open-with.c"
	} else {
		const gchar* _tmp4_ = NULL;
		gboolean _tmp5_ = FALSE;
#line 629 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp4_ = uri;
#line 629 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp5_ = midori_uri_is_http (_tmp4_);
#line 629 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp1_ = _tmp5_;
#line 4512 "open-with.c"
	}
#line 629 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (_tmp1_) {
#line 629 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp0_ = TRUE;
#line 4518 "open-with.c"
	} else {
		const gchar* _tmp6_ = NULL;
		gboolean _tmp7_ = FALSE;
#line 629 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp6_ = uri;
#line 629 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp7_ = midori_uri_is_blank (_tmp6_);
#line 629 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp0_ = _tmp7_;
#line 4528 "open-with.c"
	}
#line 629 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (_tmp0_) {
#line 630 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		result = FALSE;
#line 630 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		return result;
#line 4536 "open-with.c"
	}
#line 632 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp8_ = uri;
#line 632 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp9_ = external_applications_manager_get_content_type (self, _tmp8_, NULL);
#line 632 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	content_type = _tmp9_;
#line 633 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp10_ = uri;
#line 633 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp11_ = content_type;
#line 633 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp12_ = tab;
#line 633 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	external_applications_manager_open_with_type (self, _tmp10_, _tmp11_, (GtkWidget*) _tmp12_, EXTERNAL_APPLICATIONS_MANAGER_NEXT_STEP_TRY_OPEN);
#line 634 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	result = TRUE;
#line 634 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_free0 (content_type);
#line 634 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	return result;
#line 4558 "open-with.c"
}


static gchar* external_applications_manager_get_content_type (ExternalApplicationsManager* self, const gchar* uri, const gchar* mime_type) {
	gchar* result = NULL;
	gboolean _tmp0_ = FALSE;
	const gchar* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	const gchar* _tmp24_ = NULL;
	gchar* _tmp25_ = NULL;
	GError * _inner_error_ = NULL;
#line 637 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 637 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (uri != NULL, NULL);
#line 638 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = uri;
#line 638 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp2_ = g_str_has_prefix (_tmp1_, "file://");
#line 638 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (!_tmp2_) {
#line 4580 "open-with.c"
		const gchar* _tmp3_ = NULL;
		gboolean _tmp4_ = FALSE;
#line 638 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp3_ = uri;
#line 638 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp4_ = midori_uri_is_http (_tmp3_);
#line 638 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp0_ = !_tmp4_;
#line 4589 "open-with.c"
	} else {
#line 638 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp0_ = FALSE;
#line 4593 "open-with.c"
	}
#line 638 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (_tmp0_) {
#line 4597 "open-with.c"
		gchar* protocol = NULL;
		const gchar* _tmp5_ = NULL;
		gchar** _tmp6_ = NULL;
		gchar** _tmp7_ = NULL;
		gchar** _tmp8_ = NULL;
		gint _tmp8__length1 = 0;
		const gchar* _tmp9_ = NULL;
		gchar* _tmp10_ = NULL;
		gchar* _tmp11_ = NULL;
		const gchar* _tmp12_ = NULL;
		gchar* _tmp13_ = NULL;
#line 639 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp5_ = uri;
#line 639 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp7_ = _tmp6_ = g_strsplit (_tmp5_, ":", 2);
#line 639 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp8_ = _tmp7_;
#line 639 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp8__length1 = _vala_array_length (_tmp6_);
#line 639 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp9_ = _tmp8_[0];
#line 639 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp10_ = g_strdup (_tmp9_);
#line 639 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp11_ = _tmp10_;
#line 639 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp8_ = (_vala_array_free (_tmp8_, _tmp8__length1, (GDestroyNotify) g_free), NULL);
#line 639 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		protocol = _tmp11_;
#line 640 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp12_ = protocol;
#line 640 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp13_ = g_strconcat ("x-scheme-handler/", _tmp12_, NULL);
#line 640 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		result = _tmp13_;
#line 640 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_free0 (protocol);
#line 640 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		return result;
#line 4637 "open-with.c"
	} else {
		const gchar* _tmp14_ = NULL;
#line 641 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp14_ = mime_type;
#line 641 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		if (_tmp14_ == NULL) {
#line 4644 "open-with.c"
			gchar* filename = NULL;
			gboolean uncertain = FALSE;
			const gchar* _tmp21_ = NULL;
			gboolean _tmp22_ = FALSE;
			gchar* _tmp23_ = NULL;
			{
				gchar* _tmp15_ = NULL;
				const gchar* _tmp16_ = NULL;
				gchar* _tmp17_ = NULL;
				gchar* _tmp18_ = NULL;
#line 645 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				_tmp16_ = uri;
#line 645 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				_tmp17_ = g_filename_from_uri (_tmp16_, NULL, &_inner_error_);
#line 645 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				_tmp15_ = _tmp17_;
#line 645 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 4663 "open-with.c"
					goto __catch4_g_error;
				}
#line 645 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				_tmp18_ = _tmp15_;
#line 645 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				_tmp15_ = NULL;
#line 645 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				_g_free0 (filename);
#line 645 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				filename = _tmp18_;
#line 644 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				_g_free0 (_tmp15_);
#line 4676 "open-with.c"
			}
			goto __finally4;
			__catch4_g_error:
			{
				GError* _error_ = NULL;
				const gchar* _tmp19_ = NULL;
				gchar* _tmp20_ = NULL;
#line 644 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				_error_ = _inner_error_;
#line 644 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				_inner_error_ = NULL;
#line 647 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				_tmp19_ = uri;
#line 647 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				_tmp20_ = g_strdup (_tmp19_);
#line 647 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				_g_free0 (filename);
#line 647 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				filename = _tmp20_;
#line 644 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				_g_error_free0 (_error_);
#line 4698 "open-with.c"
			}
			__finally4:
#line 644 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 644 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				_g_free0 (filename);
#line 644 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 644 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				g_clear_error (&_inner_error_);
#line 644 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				return NULL;
#line 4711 "open-with.c"
			}
#line 649 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
			_tmp21_ = filename;
#line 649 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
			_tmp23_ = g_content_type_guess (_tmp21_, NULL, (gsize) 0, &_tmp22_);
#line 649 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
			uncertain = _tmp22_;
#line 649 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
			result = _tmp23_;
#line 649 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
			_g_free0 (filename);
#line 649 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
			return result;
#line 4725 "open-with.c"
		}
	}
#line 651 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp24_ = mime_type;
#line 651 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp25_ = g_content_type_from_mime_type (_tmp24_);
#line 651 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	result = _tmp25_;
#line 651 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	return result;
#line 4736 "open-with.c"
}


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


static void block3_data_unref (void * _userdata_) {
	Block3Data* _data3_;
	_data3_ = (Block3Data*) _userdata_;
#line 655 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (g_atomic_int_dec_and_test (&_data3_->_ref_count_)) {
#line 4754 "open-with.c"
		ExternalApplicationsManager* self;
#line 655 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		self = _data3_->self;
#line 655 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_object_unref0 (_data3_->download);
#line 655 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_free0 (_data3_->content_type);
#line 655 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_object_unref0 (_data3_->widget);
#line 655 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_object_unref0 (self);
#line 655 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		g_slice_free (Block3Data, _data3_);
#line 4768 "open-with.c"
	}
}


static void __lambda9_ (Block3Data* _data3_, GParamSpec* pspec) {
	ExternalApplicationsManager* self;
	WebKitDownload* _tmp0_ = NULL;
	WebKitDownloadStatus _tmp1_ = 0;
	WebKitDownloadStatus _tmp2_ = 0;
#line 667 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	self = _data3_->self;
#line 667 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (pspec != NULL);
#line 668 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = _data3_->download;
#line 668 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = webkit_download_get_status (_tmp0_);
#line 668 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp2_ = _tmp1_;
#line 668 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (_tmp2_ == WEBKIT_DOWNLOAD_STATUS_FINISHED) {
#line 4790 "open-with.c"
		WebKitDownload* _tmp3_ = NULL;
		const gchar* _tmp4_ = NULL;
		const gchar* _tmp5_ = NULL;
		const gchar* _tmp6_ = NULL;
		GtkWidget* _tmp7_ = NULL;
		ExternalApplicationsManagerNextStep _tmp8_ = 0;
#line 669 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp3_ = _data3_->download;
#line 669 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp4_ = webkit_download_get_destination_uri (_tmp3_);
#line 669 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp5_ = _tmp4_;
#line 669 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp6_ = _data3_->content_type;
#line 669 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp7_ = _data3_->widget;
#line 669 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp8_ = _data3_->next_step;
#line 669 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		external_applications_manager_open_now (self, _tmp5_, _tmp6_, _tmp7_, _tmp8_);
#line 4811 "open-with.c"
	} else {
		WebKitDownload* _tmp9_ = NULL;
		WebKitDownloadStatus _tmp10_ = 0;
		WebKitDownloadStatus _tmp11_ = 0;
#line 671 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp9_ = _data3_->download;
#line 671 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp10_ = webkit_download_get_status (_tmp9_);
#line 671 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp11_ = _tmp10_;
#line 671 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		if (_tmp11_ == WEBKIT_DOWNLOAD_STATUS_ERROR) {
#line 4824 "open-with.c"
			const gchar* _tmp12_ = NULL;
			const gchar* _tmp13_ = NULL;
			WebKitDownload* _tmp14_ = NULL;
			const gchar* _tmp15_ = NULL;
			const gchar* _tmp16_ = NULL;
			gchar* _tmp17_ = NULL;
			gchar* _tmp18_ = NULL;
#line 672 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
			_tmp12_ = _ ("Download error");
#line 672 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
			_tmp13_ = _ ("Cannot open '%s' because the download failed.");
#line 672 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
			_tmp14_ = _data3_->download;
#line 672 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
			_tmp15_ = webkit_download_get_destination_uri (_tmp14_);
#line 672 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
			_tmp16_ = _tmp15_;
#line 672 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
			_tmp17_ = g_strdup_printf (_tmp13_, _tmp16_);
#line 672 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
			_tmp18_ = _tmp17_;
#line 672 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
			midori_show_message_dialog (GTK_MESSAGE_ERROR, _tmp12_, _tmp18_, FALSE);
#line 672 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
			_g_free0 (_tmp18_);
#line 4850 "open-with.c"
		}
	}
}


static void ___lambda9__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 667 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	__lambda9_ (self, pspec);
#line 4859 "open-with.c"
}


static gboolean external_applications_manager_open_with_type (ExternalApplicationsManager* self, const gchar* uri, const gchar* content_type, GtkWidget* widget, ExternalApplicationsManagerNextStep next_step) {
	gboolean result = FALSE;
	Block3Data* _data3_;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	GtkWidget* _tmp2_ = NULL;
	GtkWidget* _tmp3_ = NULL;
	ExternalApplicationsManagerNextStep _tmp4_ = 0;
	const gchar* _tmp5_ = NULL;
	gboolean _tmp6_ = FALSE;
	const gchar* _tmp12_ = NULL;
	WebKitNetworkRequest* _tmp13_ = NULL;
	WebKitNetworkRequest* _tmp14_ = NULL;
	WebKitDownload* _tmp15_ = NULL;
	WebKitDownload* _tmp16_ = NULL;
	WebKitDownload* _tmp17_ = NULL;
	WebKitDownload* _tmp18_ = NULL;
	gchar* _tmp19_ = NULL;
	gchar* _tmp20_ = NULL;
	WebKitDownload* _tmp21_ = NULL;
	WebKitDownload* _tmp22_ = NULL;
	const gchar* _tmp23_ = NULL;
	const gchar* _tmp24_ = NULL;
	gboolean _tmp25_ = FALSE;
	WebKitDownload* _tmp26_ = NULL;
	WebKitDownload* _tmp27_ = NULL;
#line 655 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 655 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (uri != NULL, FALSE);
#line 655 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (content_type != NULL, FALSE);
#line 655 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (widget != NULL, FALSE);
#line 655 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_data3_ = g_slice_new0 (Block3Data);
#line 655 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_data3_->_ref_count_ = 1;
#line 655 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_data3_->self = g_object_ref (self);
#line 655 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = content_type;
#line 655 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 655 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_free0 (_data3_->content_type);
#line 655 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_data3_->content_type = _tmp1_;
#line 655 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp2_ = widget;
#line 655 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp3_ = _g_object_ref0 (_tmp2_);
#line 655 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (_data3_->widget);
#line 655 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_data3_->widget = _tmp3_;
#line 655 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp4_ = next_step;
#line 655 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_data3_->next_step = _tmp4_;
#line 659 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp5_ = uri;
#line 659 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp6_ = midori_uri_is_http (_tmp5_);
#line 659 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (!_tmp6_) {
#line 4929 "open-with.c"
		const gchar* _tmp7_ = NULL;
		const gchar* _tmp8_ = NULL;
		GtkWidget* _tmp9_ = NULL;
		ExternalApplicationsManagerNextStep _tmp10_ = 0;
		gboolean _tmp11_ = FALSE;
#line 660 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp7_ = uri;
#line 660 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp8_ = _data3_->content_type;
#line 660 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp9_ = _data3_->widget;
#line 660 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp10_ = _data3_->next_step;
#line 660 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp11_ = external_applications_manager_open_now (self, _tmp7_, _tmp8_, _tmp9_, _tmp10_);
#line 660 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		result = _tmp11_;
#line 660 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		block3_data_unref (_data3_);
#line 660 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_data3_ = NULL;
#line 660 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		return result;
#line 4953 "open-with.c"
	}
#line 662 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp12_ = uri;
#line 662 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp13_ = webkit_network_request_new (_tmp12_);
#line 662 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp14_ = _tmp13_;
#line 662 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp15_ = webkit_download_new (_tmp14_);
#line 662 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp16_ = _tmp15_;
#line 662 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (_tmp14_);
#line 662 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_data3_->download = _tmp16_;
#line 663 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp17_ = _data3_->download;
#line 663 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp18_ = _data3_->download;
#line 663 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp19_ = midori_download_prepare_destination_uri (_tmp18_, NULL);
#line 663 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp20_ = _tmp19_;
#line 663 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	webkit_download_set_destination_uri (_tmp17_, _tmp20_);
#line 663 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_free0 (_tmp20_);
#line 664 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp21_ = _data3_->download;
#line 664 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp22_ = _data3_->download;
#line 664 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp23_ = webkit_download_get_destination_uri (_tmp22_);
#line 664 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp24_ = _tmp23_;
#line 664 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp25_ = midori_download_has_enough_space (_tmp21_, _tmp24_, FALSE);
#line 664 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (!_tmp25_) {
#line 665 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		result = FALSE;
#line 665 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		block3_data_unref (_data3_);
#line 665 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_data3_ = NULL;
#line 665 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		return result;
#line 5001 "open-with.c"
	}
#line 667 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp26_ = _data3_->download;
#line 667 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_signal_connect_data ((GObject*) _tmp26_, "notify::status", (GCallback) ___lambda9__g_object_notify, block3_data_ref (_data3_), (GClosureNotify) block3_data_unref, 0);
#line 677 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp27_ = _data3_->download;
#line 677 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	webkit_download_start (_tmp27_);
#line 678 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	result = TRUE;
#line 678 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	block3_data_unref (_data3_);
#line 678 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_data3_ = NULL;
#line 678 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	return result;
#line 5019 "open-with.c"
}


static gboolean external_applications_manager_open_now (ExternalApplicationsManager* self, const gchar* uri, const gchar* content_type, GtkWidget* widget, ExternalApplicationsManagerNextStep next_step) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	ExternalApplicationsManagerNextStep _tmp1_ = 0;
	const gchar* _tmp7_ = NULL;
	const gchar* _tmp8_ = NULL;
	GtkWidget* _tmp9_ = NULL;
	GAppInfo* _tmp10_ = NULL;
	GAppInfo* _tmp11_ = NULL;
	gboolean _tmp12_ = FALSE;
#line 685 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 685 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (uri != NULL, FALSE);
#line 685 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (content_type != NULL, FALSE);
#line 685 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (widget != NULL, FALSE);
#line 686 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = next_step;
#line 686 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (_tmp1_ == EXTERNAL_APPLICATIONS_MANAGER_NEXT_STEP_TRY_OPEN) {
#line 5045 "open-with.c"
		ExternalApplicationsAssociations* _tmp2_ = NULL;
		ExternalApplicationsAssociations* _tmp3_ = NULL;
		const gchar* _tmp4_ = NULL;
		const gchar* _tmp5_ = NULL;
		gboolean _tmp6_ = FALSE;
#line 686 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp2_ = external_applications_associations_new ();
#line 686 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp3_ = _tmp2_;
#line 686 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp4_ = content_type;
#line 686 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp5_ = uri;
#line 686 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp6_ = external_applications_associations_open (_tmp3_, _tmp4_, _tmp5_);
#line 686 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp0_ = _tmp6_;
#line 686 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_object_unref0 (_tmp3_);
#line 5065 "open-with.c"
	} else {
#line 686 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp0_ = FALSE;
#line 5069 "open-with.c"
	}
#line 686 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (_tmp0_) {
#line 687 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		result = TRUE;
#line 687 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		return result;
#line 5077 "open-with.c"
	}
#line 689 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp7_ = uri;
#line 689 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp8_ = content_type;
#line 689 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp9_ = widget;
#line 689 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp10_ = external_applications_manager_open_with (self, _tmp7_, _tmp8_, _tmp9_);
#line 689 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp11_ = _tmp10_;
#line 689 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp12_ = _tmp11_ != NULL;
#line 689 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (_tmp11_);
#line 689 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (_tmp12_) {
#line 690 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		result = TRUE;
#line 690 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		return result;
#line 5099 "open-with.c"
	}
#line 691 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	result = FALSE;
#line 691 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	return result;
#line 5105 "open-with.c"
}


static GAppInfo* external_applications_manager_open_with (ExternalApplicationsManager* self, const gchar* uri, const gchar* content_type, GtkWidget* widget) {
	GAppInfo* result = NULL;
	ExternalApplicationsChooserDialog* dialog = NULL;
	const gchar* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	GtkWidget* _tmp2_ = NULL;
	ExternalApplicationsChooserDialog* _tmp3_ = NULL;
	GAppInfo* app_info = NULL;
	ExternalApplicationsChooserDialog* _tmp4_ = NULL;
	GAppInfo* _tmp5_ = NULL;
	ExternalApplicationsChooserDialog* _tmp6_ = NULL;
	const gchar* _tmp7_ = NULL;
	GAppInfo* _tmp8_ = NULL;
	GAppInfo* _tmp9_ = NULL;
	GAppInfo* _tmp10_ = NULL;
	const gchar* _tmp11_ = NULL;
	const gchar* _tmp12_ = NULL;
	gboolean _tmp13_ = FALSE;
	GAppInfo* _tmp15_ = NULL;
#line 696 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 696 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (uri != NULL, NULL);
#line 696 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (content_type != NULL, NULL);
#line 696 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_val_if_fail (widget != NULL, NULL);
#line 697 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = uri;
#line 697 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = content_type;
#line 697 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp2_ = widget;
#line 697 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp3_ = external_applications_chooser_dialog_new (_tmp0_, _tmp1_, _tmp2_);
#line 697 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_ref_sink (_tmp3_);
#line 697 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	dialog = _tmp3_;
#line 699 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp4_ = dialog;
#line 699 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp5_ = external_applications_chooser_dialog_open_with (_tmp4_);
#line 699 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	app_info = _tmp5_;
#line 700 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp6_ = dialog;
#line 700 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_object_destroy ((GtkObject*) _tmp6_);
#line 702 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp7_ = uri;
#line 702 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (g_strcmp0 (_tmp7_, "") == 0) {
#line 703 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		result = app_info;
#line 703 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_object_unref0 (dialog);
#line 703 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		return result;
#line 5168 "open-with.c"
	}
#line 705 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp8_ = app_info;
#line 705 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (_tmp8_ == NULL) {
#line 706 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		result = app_info;
#line 706 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_object_unref0 (dialog);
#line 706 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		return result;
#line 5180 "open-with.c"
	}
#line 708 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp10_ = app_info;
#line 708 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp11_ = uri;
#line 708 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp12_ = content_type;
#line 708 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp13_ = external_applications_open_app_info (_tmp10_, _tmp11_, _tmp12_);
#line 708 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (_tmp13_) {
#line 5192 "open-with.c"
		GAppInfo* _tmp14_ = NULL;
#line 708 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp14_ = app_info;
#line 708 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp9_ = _tmp14_;
#line 5198 "open-with.c"
	} else {
#line 708 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp9_ = NULL;
#line 5202 "open-with.c"
	}
#line 708 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp15_ = _g_object_ref0 (_tmp9_);
#line 708 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	result = _tmp15_;
#line 708 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (app_info);
#line 708 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (dialog);
#line 708 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	return result;
#line 5214 "open-with.c"
}


static Block4Data* block4_data_ref (Block4Data* _data4_) {
#line 711 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_atomic_int_inc (&_data4_->_ref_count_);
#line 711 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	return _data4_;
#line 5223 "open-with.c"
}


static void block4_data_unref (void * _userdata_) {
	Block4Data* _data4_;
	_data4_ = (Block4Data*) _userdata_;
#line 711 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (g_atomic_int_dec_and_test (&_data4_->_ref_count_)) {
#line 5232 "open-with.c"
		ExternalApplicationsManager* self;
#line 711 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		self = _data4_->self;
#line 711 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_object_unref0 (_data4_->tab);
#line 711 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_object_unref0 (self);
#line 711 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		g_slice_free (Block4Data, _data4_);
#line 5242 "open-with.c"
	}
}


static Block5Data* block5_data_ref (Block5Data* _data5_) {
#line 712 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_atomic_int_inc (&_data5_->_ref_count_);
#line 712 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	return _data5_;
#line 5252 "open-with.c"
}


static void block5_data_unref (void * _userdata_) {
	Block5Data* _data5_;
	_data5_ = (Block5Data*) _userdata_;
#line 712 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (g_atomic_int_dec_and_test (&_data5_->_ref_count_)) {
#line 5261 "open-with.c"
		ExternalApplicationsManager* self;
#line 712 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		self = _data5_->_data4_->self;
#line 712 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_free0 (_data5_->uri);
#line 712 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		block4_data_unref (_data5_->_data4_);
#line 712 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_data5_->_data4_ = NULL;
#line 712 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		g_slice_free (Block5Data, _data5_);
#line 5273 "open-with.c"
	}
}


static void ___lambda10_ (Block5Data* _data5_, GtkAction* action) {
	Block4Data* _data4_;
	ExternalApplicationsManager* self;
	const gchar* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	MidoriTab* _tmp4_ = NULL;
#line 715 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_data4_ = _data5_->_data4_;
#line 715 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	self = _data4_->self;
#line 715 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (action != NULL);
#line 716 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = _data5_->uri;
#line 716 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = _data5_->uri;
#line 716 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp2_ = external_applications_manager_get_content_type (self, _tmp1_, NULL);
#line 716 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp3_ = _tmp2_;
#line 716 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp4_ = _data4_->tab;
#line 716 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	external_applications_manager_open_with_type (self, _tmp0_, _tmp3_, (GtkWidget*) _tmp4_, EXTERNAL_APPLICATIONS_MANAGER_NEXT_STEP_OPEN_WITH);
#line 716 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_free0 (_tmp3_);
#line 5306 "open-with.c"
}


static void ____lambda10__gtk_action_activate (GtkAction* _sender, gpointer self) {
#line 715 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	___lambda10_ (self, _sender);
#line 5313 "open-with.c"
}


static Block6Data* block6_data_ref (Block6Data* _data6_) {
#line 721 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_atomic_int_inc (&_data6_->_ref_count_);
#line 721 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	return _data6_;
#line 5322 "open-with.c"
}


static void block6_data_unref (void * _userdata_) {
	Block6Data* _data6_;
	_data6_ = (Block6Data*) _userdata_;
#line 721 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (g_atomic_int_dec_and_test (&_data6_->_ref_count_)) {
#line 5331 "open-with.c"
		ExternalApplicationsManager* self;
#line 721 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		self = _data6_->_data4_->self;
#line 721 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_free0 (_data6_->uri);
#line 721 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		block4_data_unref (_data6_->_data4_);
#line 721 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_data6_->_data4_ = NULL;
#line 721 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		g_slice_free (Block6Data, _data6_);
#line 5343 "open-with.c"
	}
}


static void ___lambda11_ (Block6Data* _data6_, GtkAction* action) {
	Block4Data* _data4_;
	ExternalApplicationsManager* self;
	const gchar* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	MidoriTab* _tmp4_ = NULL;
#line 724 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_data4_ = _data6_->_data4_;
#line 724 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	self = _data4_->self;
#line 724 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (action != NULL);
#line 725 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = _data6_->uri;
#line 725 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = _data6_->uri;
#line 725 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp2_ = external_applications_manager_get_content_type (self, _tmp1_, NULL);
#line 725 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp3_ = _tmp2_;
#line 725 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp4_ = _data4_->tab;
#line 725 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	external_applications_manager_open_with_type (self, _tmp0_, _tmp3_, (GtkWidget*) _tmp4_, EXTERNAL_APPLICATIONS_MANAGER_NEXT_STEP_TRY_OPEN);
#line 725 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_free0 (_tmp3_);
#line 5376 "open-with.c"
}


static void ____lambda11__gtk_action_activate (GtkAction* _sender, gpointer self) {
#line 724 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	___lambda11_ (self, _sender);
#line 5383 "open-with.c"
}


static void external_applications_manager_context_menu (ExternalApplicationsManager* self, MidoriTab* tab, WebKitHitTestResult* hit_test_result, MidoriContextAction* menu) {
	Block4Data* _data4_;
	MidoriTab* _tmp0_ = NULL;
	MidoriTab* _tmp1_ = NULL;
	WebKitHitTestResult* _tmp2_ = NULL;
	WebKitHitTestResultContext _tmp3_ = 0;
	WebKitHitTestResultContext _tmp4_ = 0;
	WebKitHitTestResult* _tmp13_ = NULL;
	WebKitHitTestResultContext _tmp14_ = 0;
	WebKitHitTestResultContext _tmp15_ = 0;
#line 711 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (self != NULL);
#line 711 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (tab != NULL);
#line 711 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (hit_test_result != NULL);
#line 711 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (menu != NULL);
#line 711 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_data4_ = g_slice_new0 (Block4Data);
#line 711 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_data4_->_ref_count_ = 1;
#line 711 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_data4_->self = g_object_ref (self);
#line 711 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = tab;
#line 711 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 711 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (_data4_->tab);
#line 711 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_data4_->tab = _tmp1_;
#line 712 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp2_ = hit_test_result;
#line 712 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_get (_tmp2_, "context", &_tmp3_, NULL);
#line 712 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp4_ = _tmp3_;
#line 712 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if ((_tmp4_ & WEBKIT_HIT_TEST_RESULT_CONTEXT_LINK) != 0) {
#line 5427 "open-with.c"
		Block5Data* _data5_;
		WebKitHitTestResult* _tmp5_ = NULL;
		gchar* _tmp6_ = NULL;
		gchar* _tmp7_ = NULL;
		GtkAction* action = NULL;
		const gchar* _tmp8_ = NULL;
		GtkAction* _tmp9_ = NULL;
		GtkAction* _tmp10_ = NULL;
		MidoriContextAction* _tmp11_ = NULL;
		GtkAction* _tmp12_ = NULL;
#line 712 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_data5_ = g_slice_new0 (Block5Data);
#line 712 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_data5_->_ref_count_ = 1;
#line 712 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_data5_->_data4_ = block4_data_ref (_data4_);
#line 713 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp5_ = hit_test_result;
#line 713 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		g_object_get (_tmp5_, "link-uri", &_tmp6_, NULL);
#line 713 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp7_ = _tmp6_;
#line 713 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_data5_->uri = _tmp7_;
#line 714 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp8_ = _ ("Open _with…");
#line 714 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp9_ = gtk_action_new ("OpenWith", _tmp8_, NULL, NULL);
#line 714 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		action = _tmp9_;
#line 715 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp10_ = action;
#line 715 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		g_signal_connect_data (_tmp10_, "activate", (GCallback) ____lambda10__gtk_action_activate, block5_data_ref (_data5_), (GClosureNotify) block5_data_unref, 0);
#line 718 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp11_ = menu;
#line 718 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp12_ = action;
#line 718 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		midori_context_action_add (_tmp11_, _tmp12_);
#line 712 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_object_unref0 (action);
#line 712 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		block5_data_unref (_data5_);
#line 712 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_data5_ = NULL;
#line 5474 "open-with.c"
	}
#line 721 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp13_ = hit_test_result;
#line 721 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_get (_tmp13_, "context", &_tmp14_, NULL);
#line 721 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp15_ = _tmp14_;
#line 721 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if ((_tmp15_ & WEBKIT_HIT_TEST_RESULT_CONTEXT_IMAGE) != 0) {
#line 5484 "open-with.c"
		Block6Data* _data6_;
		WebKitHitTestResult* _tmp16_ = NULL;
		gchar* _tmp17_ = NULL;
		gchar* _tmp18_ = NULL;
		GtkAction* action = NULL;
		const gchar* _tmp19_ = NULL;
		GtkAction* _tmp20_ = NULL;
		GtkAction* _tmp21_ = NULL;
		MidoriContextAction* _tmp22_ = NULL;
		GtkAction* _tmp23_ = NULL;
#line 721 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_data6_ = g_slice_new0 (Block6Data);
#line 721 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_data6_->_ref_count_ = 1;
#line 721 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_data6_->_data4_ = block4_data_ref (_data4_);
#line 722 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp16_ = hit_test_result;
#line 722 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		g_object_get (_tmp16_, "image-uri", &_tmp17_, NULL);
#line 722 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp18_ = _tmp17_;
#line 722 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_data6_->uri = _tmp18_;
#line 723 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp19_ = _ ("Open in Image _Viewer");
#line 723 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp20_ = gtk_action_new ("OpenImageInViewer", _tmp19_, NULL, NULL);
#line 723 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		action = _tmp20_;
#line 724 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp21_ = action;
#line 724 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		g_signal_connect_data (_tmp21_, "activate", (GCallback) ____lambda11__gtk_action_activate, block6_data_ref (_data6_), (GClosureNotify) block6_data_unref, 0);
#line 727 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp22_ = menu;
#line 727 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp23_ = action;
#line 727 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		midori_context_action_add (_tmp22_, _tmp23_);
#line 721 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_object_unref0 (action);
#line 721 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		block6_data_unref (_data6_);
#line 721 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_data6_ = NULL;
#line 5531 "open-with.c"
	}
#line 711 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	block4_data_unref (_data4_);
#line 711 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_data4_ = NULL;
#line 5537 "open-with.c"
}


static Block7Data* block7_data_ref (Block7Data* _data7_) {
#line 732 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_atomic_int_inc (&_data7_->_ref_count_);
#line 732 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	return _data7_;
#line 5546 "open-with.c"
}


static void block7_data_unref (void * _userdata_) {
	Block7Data* _data7_;
	_data7_ = (Block7Data*) _userdata_;
#line 732 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (g_atomic_int_dec_and_test (&_data7_->_ref_count_)) {
#line 5555 "open-with.c"
		ExternalApplicationsManager* self;
#line 732 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		self = _data7_->self;
#line 732 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_object_unref0 (_data7_->types);
#line 732 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_object_unref0 (_data7_->settings);
#line 732 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_object_unref0 (_data7_->preferences);
#line 732 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_object_unref0 (self);
#line 732 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		g_slice_free (Block7Data, _data7_);
#line 5569 "open-with.c"
	}
}


static void __lambda12_ (Block7Data* _data7_, const gchar* commandline) {
	ExternalApplicationsManager* self;
	const gchar* _tmp0_ = NULL;
#line 744 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	self = _data7_->self;
#line 745 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = commandline;
#line 745 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	midori_settings_set_text_editor ((MidoriSettings*) _data7_->settings, _tmp0_);
#line 5583 "open-with.c"
}


static void ___lambda12__external_applications_chooser_button_selected (ExternalApplicationsChooserButton* _sender, const gchar* commandline, gpointer self) {
#line 744 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	__lambda12_ (self, commandline);
#line 5590 "open-with.c"
}


static void __lambda13_ (Block7Data* _data7_, const gchar* commandline) {
	ExternalApplicationsManager* self;
	const gchar* _tmp0_ = NULL;
#line 755 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	self = _data7_->self;
#line 756 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = commandline;
#line 756 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	midori_settings_set_news_aggregator ((MidoriSettings*) _data7_->settings, _tmp0_);
#line 5603 "open-with.c"
}


static void ___lambda13__external_applications_chooser_button_selected (ExternalApplicationsChooserButton* _sender, const gchar* commandline, gpointer self) {
#line 755 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	__lambda13_ (self, commandline);
#line 5610 "open-with.c"
}


static void __lambda14_ (Block7Data* _data7_, const gchar* content_type, GtkTreeIter* iter) {
	ExternalApplicationsManager* self;
	GAppInfo* app_info = NULL;
	const gchar* _tmp0_ = NULL;
	KatzePreferences* _tmp1_ = NULL;
	GAppInfo* _tmp2_ = NULL;
	GAppInfo* _tmp3_ = NULL;
	GError * _inner_error_ = NULL;
#line 761 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	self = _data7_->self;
#line 761 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (content_type != NULL);
#line 761 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (iter != NULL);
#line 762 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = content_type;
#line 762 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = _data7_->preferences;
#line 762 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp2_ = external_applications_manager_open_with (self, "", _tmp0_, (GtkWidget*) _tmp1_);
#line 762 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	app_info = _tmp2_;
#line 763 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp3_ = app_info;
#line 763 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (_tmp3_ == NULL) {
#line 764 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_object_unref0 (app_info);
#line 764 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		return;
#line 5644 "open-with.c"
	}
	{
		GAppInfo* _tmp4_ = NULL;
		const gchar* _tmp5_ = NULL;
		GtkListStore* _tmp6_ = NULL;
		GtkTreeIter _tmp7_ = {0};
		GAppInfo* _tmp8_ = NULL;
#line 766 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp4_ = app_info;
#line 766 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp5_ = content_type;
#line 766 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		g_app_info_set_as_default_for_type (_tmp4_, _tmp5_, &_inner_error_);
#line 766 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 5660 "open-with.c"
			goto __catch5_g_error;
		}
#line 767 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp6_ = _data7_->types->store;
#line 767 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp7_ = *iter;
#line 767 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp8_ = app_info;
#line 767 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		gtk_list_store_set (_tmp6_, &_tmp7_, 1, _tmp8_, -1);
#line 5671 "open-with.c"
	}
	goto __finally5;
	__catch5_g_error:
	{
		GError* _error_ = NULL;
		const gchar* _tmp9_ = NULL;
		GError* _tmp10_ = NULL;
		const gchar* _tmp11_ = NULL;
#line 765 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_error_ = _inner_error_;
#line 765 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_inner_error_ = NULL;
#line 769 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp9_ = content_type;
#line 769 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp10_ = _error_;
#line 769 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_tmp11_ = _tmp10_->message;
#line 769 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		g_warning ("open-with.vala:769: Failed to select default for \"%s\": %s", _tmp9_, _tmp11_);
#line 765 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_error_free0 (_error_);
#line 5694 "open-with.c"
	}
	__finally5:
#line 765 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 765 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_object_unref0 (app_info);
#line 765 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 765 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		g_clear_error (&_inner_error_);
#line 765 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		return;
#line 5707 "open-with.c"
	}
#line 761 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (app_info);
#line 5711 "open-with.c"
}


static void ___lambda14__external_applications_types_selected (ExternalApplicationsTypes* _sender, const gchar* content_type, GtkTreeIter* iter, gpointer self) {
#line 761 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	__lambda14_ (self, content_type, iter);
#line 5718 "open-with.c"
}


static void external_applications_manager_show_preferences (ExternalApplicationsManager* self, KatzePreferences* preferences) {
	Block7Data* _data7_;
	KatzePreferences* _tmp0_ = NULL;
	KatzePreferences* _tmp1_ = NULL;
	MidoriApp* _tmp2_ = NULL;
	MidoriWebSettings* _tmp3_ = NULL;
	MidoriWebSettings* _tmp4_ = NULL;
	GtkBox* category = NULL;
	KatzePreferences* _tmp5_ = NULL;
	const gchar* _tmp6_ = NULL;
	GtkBox* _tmp7_ = NULL;
	GtkBox* _tmp8_ = NULL;
	KatzePreferences* _tmp9_ = NULL;
	GtkSizeGroup* sizegroup = NULL;
	GtkSizeGroup* _tmp10_ = NULL;
	GtkLabel* label = NULL;
	const gchar* _tmp11_ = NULL;
	GtkLabel* _tmp12_ = NULL;
	GtkLabel* _tmp13_ = NULL;
	GtkLabel* _tmp14_ = NULL;
	KatzePreferences* _tmp15_ = NULL;
	GtkLabel* _tmp16_ = NULL;
	ExternalApplicationsChooserButton* entry = NULL;
	const gchar* _tmp17_ = NULL;
	const gchar* _tmp18_ = NULL;
	ExternalApplicationsChooserButton* _tmp19_ = NULL;
	ExternalApplicationsChooserButton* _tmp20_ = NULL;
	ExternalApplicationsChooserButton* _tmp21_ = NULL;
	KatzePreferences* _tmp22_ = NULL;
	ExternalApplicationsChooserButton* _tmp23_ = NULL;
	const gchar* _tmp24_ = NULL;
	GtkLabel* _tmp25_ = NULL;
	GtkLabel* _tmp26_ = NULL;
	GtkLabel* _tmp27_ = NULL;
	KatzePreferences* _tmp28_ = NULL;
	GtkLabel* _tmp29_ = NULL;
	const gchar* _tmp30_ = NULL;
	const gchar* _tmp31_ = NULL;
	ExternalApplicationsChooserButton* _tmp32_ = NULL;
	ExternalApplicationsChooserButton* _tmp33_ = NULL;
	ExternalApplicationsChooserButton* _tmp34_ = NULL;
	KatzePreferences* _tmp35_ = NULL;
	ExternalApplicationsChooserButton* _tmp36_ = NULL;
	ExternalApplicationsTypes* _tmp37_ = NULL;
#line 732 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (self != NULL);
#line 732 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (preferences != NULL);
#line 732 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_data7_ = g_slice_new0 (Block7Data);
#line 732 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_data7_->_ref_count_ = 1;
#line 732 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_data7_->self = g_object_ref (self);
#line 732 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = preferences;
#line 732 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 732 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (_data7_->preferences);
#line 732 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_data7_->preferences = _tmp1_;
#line 733 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp2_ = midori_extension_get_app ((MidoriExtension*) self);
#line 733 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_get (_tmp2_, "settings", &_tmp3_, NULL);
#line 733 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp4_ = _tmp3_;
#line 733 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_data7_->settings = _tmp4_;
#line 734 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp5_ = _data7_->preferences;
#line 734 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp6_ = _ ("File Types");
#line 734 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp7_ = katze_preferences_add_category (_tmp5_, _tmp6_, GTK_STOCK_FILE);
#line 734 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp8_ = _g_object_ref0 (_tmp7_);
#line 734 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	category = _tmp8_;
#line 735 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp9_ = _data7_->preferences;
#line 735 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	katze_preferences_add_group (_tmp9_, NULL);
#line 737 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp10_ = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
#line 737 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	sizegroup = _tmp10_;
#line 738 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp11_ = _ ("Text Editor");
#line 738 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp12_ = (GtkLabel*) gtk_label_new (_tmp11_);
#line 738 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_ref_sink (_tmp12_);
#line 738 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	label = _tmp12_;
#line 739 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp13_ = label;
#line 739 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_size_group_add_widget (sizegroup, (GtkWidget*) _tmp13_);
#line 740 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp14_ = label;
#line 740 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_misc_set_alignment ((GtkMisc*) _tmp14_, 0.0f, 0.5f);
#line 741 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp15_ = _data7_->preferences;
#line 741 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp16_ = label;
#line 741 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	katze_preferences_add_widget (_tmp15_, (GtkWidget*) _tmp16_, "indented");
#line 742 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp17_ = midori_settings_get_text_editor ((MidoriSettings*) _data7_->settings);
#line 742 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp18_ = _tmp17_;
#line 742 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp19_ = external_applications_chooser_button_new ("text/plain", _tmp18_);
#line 742 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_ref_sink (_tmp19_);
#line 742 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	entry = _tmp19_;
#line 743 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp20_ = entry;
#line 743 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_size_group_add_widget (sizegroup, (GtkWidget*) _tmp20_);
#line 744 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp21_ = entry;
#line 744 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_signal_connect_data (_tmp21_, "selected", (GCallback) ___lambda12__external_applications_chooser_button_selected, block7_data_ref (_data7_), (GClosureNotify) block7_data_unref, 0);
#line 747 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp22_ = _data7_->preferences;
#line 747 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp23_ = entry;
#line 747 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	katze_preferences_add_widget (_tmp22_, (GtkWidget*) _tmp23_, "spanned");
#line 749 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp24_ = _ ("News Aggregator");
#line 749 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp25_ = (GtkLabel*) gtk_label_new (_tmp24_);
#line 749 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_ref_sink (_tmp25_);
#line 749 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (label);
#line 749 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	label = _tmp25_;
#line 750 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp26_ = label;
#line 750 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_size_group_add_widget (sizegroup, (GtkWidget*) _tmp26_);
#line 751 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp27_ = label;
#line 751 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_misc_set_alignment ((GtkMisc*) _tmp27_, 0.0f, 0.5f);
#line 752 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp28_ = _data7_->preferences;
#line 752 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp29_ = label;
#line 752 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	katze_preferences_add_widget (_tmp28_, (GtkWidget*) _tmp29_, "indented");
#line 753 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp30_ = midori_settings_get_news_aggregator ((MidoriSettings*) _data7_->settings);
#line 753 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp31_ = _tmp30_;
#line 753 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp32_ = external_applications_chooser_button_new ("application/rss+xml", _tmp31_);
#line 753 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_ref_sink (_tmp32_);
#line 753 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (entry);
#line 753 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	entry = _tmp32_;
#line 754 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp33_ = entry;
#line 754 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_size_group_add_widget (sizegroup, (GtkWidget*) _tmp33_);
#line 755 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp34_ = entry;
#line 755 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_signal_connect_data (_tmp34_, "selected", (GCallback) ___lambda13__external_applications_chooser_button_selected, block7_data_ref (_data7_), (GClosureNotify) block7_data_unref, 0);
#line 758 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp35_ = _data7_->preferences;
#line 758 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp36_ = entry;
#line 758 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	katze_preferences_add_widget (_tmp35_, (GtkWidget*) _tmp36_, "spanned");
#line 760 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp37_ = external_applications_types_new ();
#line 760 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_object_ref_sink (_tmp37_);
#line 760 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_data7_->types = _tmp37_;
#line 761 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_signal_connect_data (_data7_->types, "selected", (GCallback) ___lambda14__external_applications_types_selected, block7_data_ref (_data7_), (GClosureNotify) block7_data_unref, 0);
#line 772 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_box_pack_start (category, (GtkWidget*) _data7_->types, TRUE, TRUE, (guint) 0);
#line 773 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	gtk_widget_show_all ((GtkWidget*) _data7_->types);
#line 732 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (entry);
#line 732 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (label);
#line 732 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (sizegroup);
#line 732 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (category);
#line 732 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	block7_data_unref (_data7_);
#line 732 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_data7_ = NULL;
#line 5930 "open-with.c"
}


static gboolean _external_applications_manager_navigation_requested_midori_tab_navigation_requested (MidoriTab* _sender, const gchar* uri, gpointer self) {
	gboolean result;
	result = external_applications_manager_navigation_requested ((ExternalApplicationsManager*) self, _sender, uri);
#line 777 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	return result;
#line 5939 "open-with.c"
}


static gboolean _external_applications_manager_open_uri_midori_tab_open_uri (MidoriTab* _sender, const gchar* uri, gpointer self) {
	gboolean result;
	result = external_applications_manager_open_uri ((ExternalApplicationsManager*) self, _sender, uri);
#line 778 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	return result;
#line 5948 "open-with.c"
}


static void _external_applications_manager_context_menu_midori_tab_context_menu (MidoriTab* _sender, WebKitHitTestResult* hit_test_result, MidoriContextAction* menu, gpointer self) {
#line 779 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	external_applications_manager_context_menu ((ExternalApplicationsManager*) self, _sender, hit_test_result, menu);
#line 5955 "open-with.c"
}


void external_applications_manager_tab_added (ExternalApplicationsManager* self, MidoriBrowser* browser, MidoriView* view) {
	MidoriView* _tmp0_ = NULL;
	MidoriView* _tmp1_ = NULL;
	MidoriView* _tmp2_ = NULL;
#line 776 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (self != NULL);
#line 776 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (browser != NULL);
#line 776 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (view != NULL);
#line 777 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = view;
#line 777 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_signal_connect_object ((MidoriTab*) _tmp0_, "navigation-requested", (GCallback) _external_applications_manager_navigation_requested_midori_tab_navigation_requested, self, G_CONNECT_AFTER);
#line 778 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = view;
#line 778 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_signal_connect_object ((MidoriTab*) _tmp1_, "open-uri", (GCallback) _external_applications_manager_open_uri_midori_tab_open_uri, self, 0);
#line 779 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp2_ = view;
#line 779 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_signal_connect_object ((MidoriTab*) _tmp2_, "context-menu", (GCallback) _external_applications_manager_context_menu_midori_tab_context_menu, self, 0);
#line 5981 "open-with.c"
}


void external_applications_manager_tab_removed (ExternalApplicationsManager* self, MidoriBrowser* browser, MidoriView* view) {
	MidoriView* _tmp0_ = NULL;
	guint _tmp1_ = 0U;
	MidoriView* _tmp2_ = NULL;
	guint _tmp3_ = 0U;
	MidoriView* _tmp4_ = NULL;
	guint _tmp5_ = 0U;
#line 782 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (self != NULL);
#line 782 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (browser != NULL);
#line 782 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (view != NULL);
#line 783 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = view;
#line 783 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_signal_parse_name ("navigation-requested", MIDORI_TYPE_TAB, &_tmp1_, NULL, FALSE);
#line 783 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_signal_handlers_disconnect_matched ((MidoriTab*) _tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _external_applications_manager_navigation_requested_midori_tab_navigation_requested, self);
#line 784 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp2_ = view;
#line 784 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_signal_parse_name ("open-uri", MIDORI_TYPE_TAB, &_tmp3_, NULL, FALSE);
#line 784 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_signal_handlers_disconnect_matched ((MidoriTab*) _tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _external_applications_manager_open_uri_midori_tab_open_uri, self);
#line 785 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp4_ = view;
#line 785 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_signal_parse_name ("context-menu", MIDORI_TYPE_TAB, &_tmp5_, NULL, FALSE);
#line 785 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_signal_handlers_disconnect_matched ((MidoriTab*) _tmp4_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp5_, 0, NULL, (GCallback) _external_applications_manager_context_menu_midori_tab_context_menu, self);
#line 6016 "open-with.c"
}


static void _external_applications_manager_tab_added_midori_browser_add_tab (MidoriBrowser* _sender, MidoriView* tab, gpointer self) {
#line 791 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	external_applications_manager_tab_added ((ExternalApplicationsManager*) self, _sender, tab);
#line 6023 "open-with.c"
}


static void _external_applications_manager_tab_removed_midori_browser_remove_tab (MidoriBrowser* _sender, MidoriView* tab, gpointer self) {
#line 792 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	external_applications_manager_tab_removed ((ExternalApplicationsManager*) self, _sender, tab);
#line 6030 "open-with.c"
}


static void _external_applications_manager_show_preferences_midori_browser_show_preferences (MidoriBrowser* _sender, KatzePreferences* preferences, gpointer self) {
#line 793 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	external_applications_manager_show_preferences ((ExternalApplicationsManager*) self, preferences);
#line 6037 "open-with.c"
}


static void external_applications_manager_browser_added (ExternalApplicationsManager* self, MidoriBrowser* browser) {
	MidoriBrowser* _tmp0_ = NULL;
	GList* _tmp1_ = NULL;
	MidoriBrowser* _tmp4_ = NULL;
	MidoriBrowser* _tmp5_ = NULL;
	MidoriBrowser* _tmp6_ = NULL;
#line 788 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (self != NULL);
#line 788 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (browser != NULL);
#line 789 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = browser;
#line 789 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = midori_browser_get_tabs (_tmp0_);
#line 6055 "open-with.c"
	{
		GList* tab_collection = NULL;
		GList* tab_it = NULL;
#line 789 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		tab_collection = _tmp1_;
#line 789 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		for (tab_it = tab_collection; tab_it != NULL; tab_it = tab_it->next) {
#line 6063 "open-with.c"
			MidoriView* tab = NULL;
#line 789 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
			tab = (MidoriView*) tab_it->data;
#line 6067 "open-with.c"
			{
				MidoriBrowser* _tmp2_ = NULL;
				MidoriView* _tmp3_ = NULL;
#line 790 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				_tmp2_ = browser;
#line 790 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				_tmp3_ = tab;
#line 790 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				external_applications_manager_tab_added (self, _tmp2_, _tmp3_);
#line 6077 "open-with.c"
			}
		}
#line 789 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_list_free0 (tab_collection);
#line 6082 "open-with.c"
	}
#line 791 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp4_ = browser;
#line 791 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_signal_connect_object (_tmp4_, "add-tab", (GCallback) _external_applications_manager_tab_added_midori_browser_add_tab, self, 0);
#line 792 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp5_ = browser;
#line 792 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_signal_connect_object (_tmp5_, "remove-tab", (GCallback) _external_applications_manager_tab_removed_midori_browser_remove_tab, self, 0);
#line 793 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp6_ = browser;
#line 793 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_signal_connect_object (_tmp6_, "show-preferences", (GCallback) _external_applications_manager_show_preferences_midori_browser_show_preferences, self, 0);
#line 6096 "open-with.c"
}


static void _external_applications_manager_browser_added_midori_app_add_browser (MidoriApp* _sender, MidoriBrowser* browser, gpointer self) {
#line 799 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	external_applications_manager_browser_added ((ExternalApplicationsManager*) self, browser);
#line 6103 "open-with.c"
}


static void external_applications_manager_activated (ExternalApplicationsManager* self, MidoriApp* app) {
	MidoriApp* _tmp0_ = NULL;
	GList* _tmp1_ = NULL;
	MidoriApp* _tmp3_ = NULL;
#line 796 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (self != NULL);
#line 796 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (app != NULL);
#line 797 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = app;
#line 797 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = midori_app_get_browsers (_tmp0_);
#line 6119 "open-with.c"
	{
		GList* browser_collection = NULL;
		GList* browser_it = NULL;
#line 797 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		browser_collection = _tmp1_;
#line 797 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		for (browser_it = browser_collection; browser_it != NULL; browser_it = browser_it->next) {
#line 6127 "open-with.c"
			MidoriBrowser* browser = NULL;
#line 797 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
			browser = (MidoriBrowser*) browser_it->data;
#line 6131 "open-with.c"
			{
				MidoriBrowser* _tmp2_ = NULL;
#line 798 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				_tmp2_ = browser;
#line 798 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				external_applications_manager_browser_added (self, _tmp2_);
#line 6138 "open-with.c"
			}
		}
#line 797 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_list_free0 (browser_collection);
#line 6143 "open-with.c"
	}
#line 799 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp3_ = app;
#line 799 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_signal_connect_object (_tmp3_, "add-browser", (GCallback) _external_applications_manager_browser_added_midori_app_add_browser, self, 0);
#line 6149 "open-with.c"
}


static void external_applications_manager_browser_removed (ExternalApplicationsManager* self, MidoriBrowser* browser) {
	MidoriBrowser* _tmp0_ = NULL;
	GList* _tmp1_ = NULL;
	MidoriBrowser* _tmp4_ = NULL;
	guint _tmp5_ = 0U;
	MidoriBrowser* _tmp6_ = NULL;
	guint _tmp7_ = 0U;
	MidoriBrowser* _tmp8_ = NULL;
	guint _tmp9_ = 0U;
#line 802 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (self != NULL);
#line 802 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (browser != NULL);
#line 803 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = browser;
#line 803 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = midori_browser_get_tabs (_tmp0_);
#line 6170 "open-with.c"
	{
		GList* tab_collection = NULL;
		GList* tab_it = NULL;
#line 803 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		tab_collection = _tmp1_;
#line 803 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		for (tab_it = tab_collection; tab_it != NULL; tab_it = tab_it->next) {
#line 6178 "open-with.c"
			MidoriView* tab = NULL;
#line 803 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
			tab = (MidoriView*) tab_it->data;
#line 6182 "open-with.c"
			{
				MidoriBrowser* _tmp2_ = NULL;
				MidoriView* _tmp3_ = NULL;
#line 804 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				_tmp2_ = browser;
#line 804 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				_tmp3_ = tab;
#line 804 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				external_applications_manager_tab_removed (self, _tmp2_, _tmp3_);
#line 6192 "open-with.c"
			}
		}
#line 803 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_list_free0 (tab_collection);
#line 6197 "open-with.c"
	}
#line 805 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp4_ = browser;
#line 805 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_signal_parse_name ("add-tab", MIDORI_TYPE_BROWSER, &_tmp5_, NULL, FALSE);
#line 805 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_signal_handlers_disconnect_matched (_tmp4_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp5_, 0, NULL, (GCallback) _external_applications_manager_tab_added_midori_browser_add_tab, self);
#line 806 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp6_ = browser;
#line 806 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_signal_parse_name ("remove-tab", MIDORI_TYPE_BROWSER, &_tmp7_, NULL, FALSE);
#line 806 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_signal_handlers_disconnect_matched (_tmp6_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp7_, 0, NULL, (GCallback) _external_applications_manager_tab_removed_midori_browser_remove_tab, self);
#line 807 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp8_ = browser;
#line 807 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_signal_parse_name ("show-preferences", MIDORI_TYPE_BROWSER, &_tmp9_, NULL, FALSE);
#line 807 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_signal_handlers_disconnect_matched (_tmp8_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp9_, 0, NULL, (GCallback) _external_applications_manager_show_preferences_midori_browser_show_preferences, self);
#line 6217 "open-with.c"
}


static void external_applications_manager_deactivated (ExternalApplicationsManager* self) {
	MidoriApp* app = NULL;
	MidoriApp* _tmp0_ = NULL;
	MidoriApp* _tmp1_ = NULL;
	MidoriApp* _tmp2_ = NULL;
	GList* _tmp3_ = NULL;
	MidoriApp* _tmp5_ = NULL;
	guint _tmp6_ = 0U;
#line 810 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_return_if_fail (self != NULL);
#line 811 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = midori_extension_get_app ((MidoriExtension*) self);
#line 811 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 811 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	app = _tmp1_;
#line 812 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp2_ = app;
#line 812 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp3_ = midori_app_get_browsers (_tmp2_);
#line 6241 "open-with.c"
	{
		GList* browser_collection = NULL;
		GList* browser_it = NULL;
#line 812 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		browser_collection = _tmp3_;
#line 812 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		for (browser_it = browser_collection; browser_it != NULL; browser_it = browser_it->next) {
#line 6249 "open-with.c"
			MidoriBrowser* browser = NULL;
#line 812 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
			browser = (MidoriBrowser*) browser_it->data;
#line 6253 "open-with.c"
			{
				MidoriBrowser* _tmp4_ = NULL;
#line 813 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				_tmp4_ = browser;
#line 813 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
				external_applications_manager_browser_removed (self, _tmp4_);
#line 6260 "open-with.c"
			}
		}
#line 812 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
		_g_list_free0 (browser_collection);
#line 6265 "open-with.c"
	}
#line 814 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp5_ = app;
#line 814 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_signal_parse_name ("add-browser", MIDORI_TYPE_APP, &_tmp6_, NULL, FALSE);
#line 814 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_signal_handlers_disconnect_matched (_tmp5_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp6_, 0, NULL, (GCallback) _external_applications_manager_browser_added_midori_app_add_browser, self);
#line 810 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_g_object_unref0 (app);
#line 6275 "open-with.c"
}


static void _external_applications_manager_activated_midori_extension_activate (MidoriExtension* _sender, MidoriApp* app, gpointer self) {
#line 824 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	external_applications_manager_activated ((ExternalApplicationsManager*) self, app);
#line 6282 "open-with.c"
}


static void _external_applications_manager_deactivated_midori_extension_deactivate (MidoriExtension* _sender, gpointer self) {
#line 825 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	external_applications_manager_deactivated ((ExternalApplicationsManager*) self);
#line 6289 "open-with.c"
}


ExternalApplicationsManager* external_applications_manager_construct (GType object_type) {
	ExternalApplicationsManager * self = NULL;
#line 819 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	self = (ExternalApplicationsManager*) g_object_new (object_type, "name", "External Applications", "description", "Choose what to open unknown file types with", "version", "0.1" MIDORI_VERSION_SUFFIX, "authors", "Christian Dywan <christian@twotoasts.de>", NULL);
#line 824 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_signal_connect_object ((MidoriExtension*) self, "activate", (GCallback) _external_applications_manager_activated_midori_extension_activate, self, 0);
#line 825 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	g_signal_connect_object ((MidoriExtension*) self, "deactivate", (GCallback) _external_applications_manager_deactivated_midori_extension_deactivate, self, 0);
#line 818 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	return self;
#line 6303 "open-with.c"
}


ExternalApplicationsManager* external_applications_manager_new (void) {
#line 818 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	return external_applications_manager_construct (EXTERNAL_APPLICATIONS_TYPE_MANAGER);
#line 6310 "open-with.c"
}


static void external_applications_manager_class_init (ExternalApplicationsManagerClass * klass) {
#line 618 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	external_applications_manager_parent_class = g_type_class_peek_parent (klass);
#line 6317 "open-with.c"
}


static void external_applications_manager_instance_init (ExternalApplicationsManager * self) {
}


GType external_applications_manager_get_type (void) {
	static volatile gsize external_applications_manager_type_id__volatile = 0;
	if (g_once_init_enter (&external_applications_manager_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ExternalApplicationsManagerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) external_applications_manager_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ExternalApplicationsManager), 0, (GInstanceInitFunc) external_applications_manager_instance_init, NULL };
		GType external_applications_manager_type_id;
		external_applications_manager_type_id = g_type_register_static (MIDORI_TYPE_EXTENSION, "ExternalApplicationsManager", &g_define_type_info, 0);
		g_once_init_leave (&external_applications_manager_type_id__volatile, external_applications_manager_type_id);
	}
	return external_applications_manager_type_id__volatile;
}


MidoriExtension* extension_init (void) {
	MidoriExtension* result = NULL;
	ExternalApplicationsManager* _tmp0_ = NULL;
#line 831 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	_tmp0_ = external_applications_manager_new ();
#line 831 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	result = (MidoriExtension*) _tmp0_;
#line 831 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/extensions/open-with.vala"
	return result;
#line 6346 "open-with.c"
}


static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	if ((array != NULL) && (destroy_func != NULL)) {
		int i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}


static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}


static gint _vala_array_length (gpointer array) {
	int length;
	length = 0;
	if (array) {
		while (((gpointer*) array)[length]) {
			length++;
		}
	}
	return length;
}



