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

/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*-
 * -*- coding: utf-8 -*-
 *
 * Copyright (C) 2011 ~ 2018 Deepin, Inc.
 *               2011 ~ 2018 Wang Yong
 *
 * Author:     Wang Yong <wangyong@deepin.com>
 * Maintainer: Wang Yong <wangyong@deepin.com>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <gtk/gtk.h>
#include <glib-object.h>
#include <cairo-gobject.h>
#include <gdk/gdk.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gi18n-lib.h>
#include <pango/pango.h>
#include <float.h>
#include <math.h>

#define GETTEXT_PACKAGE "deepin-terminal-gtk"
#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define WIDGETS_TYPE_DIALOG (widgets_dialog_get_type ())
#define WIDGETS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_DIALOG, WidgetsDialog))
#define WIDGETS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_DIALOG, WidgetsDialogClass))
#define WIDGETS_IS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_DIALOG))
#define WIDGETS_IS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_DIALOG))
#define WIDGETS_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_DIALOG, WidgetsDialogClass))

typedef struct _WidgetsDialog WidgetsDialog;
typedef struct _WidgetsDialogClass WidgetsDialogClass;
typedef struct _WidgetsDialogPrivate WidgetsDialogPrivate;

#define WIDGETS_TYPE_CONFIG_WINDOW (widgets_config_window_get_type ())
#define WIDGETS_CONFIG_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_CONFIG_WINDOW, WidgetsConfigWindow))
#define WIDGETS_CONFIG_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_CONFIG_WINDOW, WidgetsConfigWindowClass))
#define WIDGETS_IS_CONFIG_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_CONFIG_WINDOW))
#define WIDGETS_IS_CONFIG_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_CONFIG_WINDOW))
#define WIDGETS_CONFIG_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_CONFIG_WINDOW, WidgetsConfigWindowClass))

typedef struct _WidgetsConfigWindow WidgetsConfigWindow;
typedef struct _WidgetsConfigWindowClass WidgetsConfigWindowClass;

#define WIDGETS_TYPE_COMMAND_DIALOG (widgets_command_dialog_get_type ())
#define WIDGETS_COMMAND_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_COMMAND_DIALOG, WidgetsCommandDialog))
#define WIDGETS_COMMAND_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_COMMAND_DIALOG, WidgetsCommandDialogClass))
#define WIDGETS_IS_COMMAND_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_COMMAND_DIALOG))
#define WIDGETS_IS_COMMAND_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_COMMAND_DIALOG))
#define WIDGETS_COMMAND_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_COMMAND_DIALOG, WidgetsCommandDialogClass))

typedef struct _WidgetsCommandDialog WidgetsCommandDialog;
typedef struct _WidgetsCommandDialogClass WidgetsCommandDialogClass;
typedef struct _WidgetsCommandDialogPrivate WidgetsCommandDialogPrivate;

#define WIDGETS_TYPE_DROPDOWN_TEXT_BUTTON (widgets_dropdown_text_button_get_type ())
#define WIDGETS_DROPDOWN_TEXT_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_DROPDOWN_TEXT_BUTTON, WidgetsDropdownTextButton))
#define WIDGETS_DROPDOWN_TEXT_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_DROPDOWN_TEXT_BUTTON, WidgetsDropdownTextButtonClass))
#define WIDGETS_IS_DROPDOWN_TEXT_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_DROPDOWN_TEXT_BUTTON))
#define WIDGETS_IS_DROPDOWN_TEXT_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_DROPDOWN_TEXT_BUTTON))
#define WIDGETS_DROPDOWN_TEXT_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_DROPDOWN_TEXT_BUTTON, WidgetsDropdownTextButtonClass))

typedef struct _WidgetsDropdownTextButton WidgetsDropdownTextButton;
typedef struct _WidgetsDropdownTextButtonClass WidgetsDropdownTextButtonClass;

#define WIDGETS_TYPE_TERM (widgets_term_get_type ())
#define WIDGETS_TERM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_TERM, WidgetsTerm))
#define WIDGETS_TERM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_TERM, WidgetsTermClass))
#define WIDGETS_IS_TERM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_TERM))
#define WIDGETS_IS_TERM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_TERM))
#define WIDGETS_TERM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_TERM, WidgetsTermClass))

typedef struct _WidgetsTerm WidgetsTerm;
typedef struct _WidgetsTermClass WidgetsTermClass;

#define WIDGETS_TYPE_ENTRY (widgets_entry_get_type ())
#define WIDGETS_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_ENTRY, WidgetsEntry))
#define WIDGETS_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_ENTRY, WidgetsEntryClass))
#define WIDGETS_IS_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_ENTRY))
#define WIDGETS_IS_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_ENTRY))
#define WIDGETS_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_ENTRY, WidgetsEntryClass))

typedef struct _WidgetsEntry WidgetsEntry;
typedef struct _WidgetsEntryClass WidgetsEntryClass;

#define WIDGETS_TYPE_FILE_BUTTON (widgets_file_button_get_type ())
#define WIDGETS_FILE_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_FILE_BUTTON, WidgetsFileButton))
#define WIDGETS_FILE_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_FILE_BUTTON, WidgetsFileButtonClass))
#define WIDGETS_IS_FILE_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_FILE_BUTTON))
#define WIDGETS_IS_FILE_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_FILE_BUTTON))
#define WIDGETS_FILE_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_FILE_BUTTON, WidgetsFileButtonClass))

typedef struct _WidgetsFileButton WidgetsFileButton;
typedef struct _WidgetsFileButtonClass WidgetsFileButtonClass;

#define WIDGETS_TYPE_PASSWORD_BUTTON (widgets_password_button_get_type ())
#define WIDGETS_PASSWORD_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_PASSWORD_BUTTON, WidgetsPasswordButton))
#define WIDGETS_PASSWORD_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_PASSWORD_BUTTON, WidgetsPasswordButtonClass))
#define WIDGETS_IS_PASSWORD_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_PASSWORD_BUTTON))
#define WIDGETS_IS_PASSWORD_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_PASSWORD_BUTTON))
#define WIDGETS_PASSWORD_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_PASSWORD_BUTTON, WidgetsPasswordButtonClass))

typedef struct _WidgetsPasswordButton WidgetsPasswordButton;
typedef struct _WidgetsPasswordButtonClass WidgetsPasswordButtonClass;

#define WIDGETS_TYPE_SHORTCUT_ENTRY (widgets_shortcut_entry_get_type ())
#define WIDGETS_SHORTCUT_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_SHORTCUT_ENTRY, WidgetsShortcutEntry))
#define WIDGETS_SHORTCUT_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_SHORTCUT_ENTRY, WidgetsShortcutEntryClass))
#define WIDGETS_IS_SHORTCUT_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_SHORTCUT_ENTRY))
#define WIDGETS_IS_SHORTCUT_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_SHORTCUT_ENTRY))
#define WIDGETS_SHORTCUT_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_SHORTCUT_ENTRY, WidgetsShortcutEntryClass))

typedef struct _WidgetsShortcutEntry WidgetsShortcutEntry;
typedef struct _WidgetsShortcutEntryClass WidgetsShortcutEntryClass;

#define WIDGETS_TYPE_CLICK_EVENT_BOX (widgets_click_event_box_get_type ())
#define WIDGETS_CLICK_EVENT_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_CLICK_EVENT_BOX, WidgetsClickEventBox))
#define WIDGETS_CLICK_EVENT_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_CLICK_EVENT_BOX, WidgetsClickEventBoxClass))
#define WIDGETS_IS_CLICK_EVENT_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_CLICK_EVENT_BOX))
#define WIDGETS_IS_CLICK_EVENT_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_CLICK_EVENT_BOX))
#define WIDGETS_CLICK_EVENT_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_CLICK_EVENT_BOX, WidgetsClickEventBoxClass))

typedef struct _WidgetsClickEventBox WidgetsClickEventBox;
typedef struct _WidgetsClickEventBoxClass WidgetsClickEventBoxClass;

#define WIDGETS_TYPE_TEXT_BUTTON (widgets_text_button_get_type ())
#define WIDGETS_TEXT_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_TEXT_BUTTON, WidgetsTextButton))
#define WIDGETS_TEXT_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_TEXT_BUTTON, WidgetsTextButtonClass))
#define WIDGETS_IS_TEXT_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_TEXT_BUTTON))
#define WIDGETS_IS_TEXT_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_TEXT_BUTTON))
#define WIDGETS_TEXT_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_TEXT_BUTTON, WidgetsTextButtonClass))

typedef struct _WidgetsTextButton WidgetsTextButton;
typedef struct _WidgetsTextButtonClass WidgetsTextButtonClass;
enum  {
	WIDGETS_COMMAND_DIALOG_0_PROPERTY,
	WIDGETS_COMMAND_DIALOG_NUM_PROPERTIES
};
static GParamSpec* widgets_command_dialog_properties[WIDGETS_COMMAND_DIALOG_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define WIDGETS_TYPE_WINDOW_EVENT_AREA (widgets_window_event_area_get_type ())
#define WIDGETS_WINDOW_EVENT_AREA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_WINDOW_EVENT_AREA, WidgetsWindowEventArea))
#define WIDGETS_WINDOW_EVENT_AREA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_WINDOW_EVENT_AREA, WidgetsWindowEventAreaClass))
#define WIDGETS_IS_WINDOW_EVENT_AREA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_WINDOW_EVENT_AREA))
#define WIDGETS_IS_WINDOW_EVENT_AREA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_WINDOW_EVENT_AREA))
#define WIDGETS_WINDOW_EVENT_AREA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_WINDOW_EVENT_AREA, WidgetsWindowEventAreaClass))

typedef struct _WidgetsWindowEventArea WidgetsWindowEventArea;
typedef struct _WidgetsWindowEventAreaClass WidgetsWindowEventAreaClass;

#define WIDGETS_TYPE_WINDOW_BUTTON (widgets_window_button_get_type ())
#define WIDGETS_WINDOW_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_WINDOW_BUTTON, WidgetsWindowButton))
#define WIDGETS_WINDOW_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_WINDOW_BUTTON, WidgetsWindowButtonClass))
#define WIDGETS_IS_WINDOW_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_WINDOW_BUTTON))
#define WIDGETS_IS_WINDOW_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_WINDOW_BUTTON))
#define WIDGETS_WINDOW_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_WINDOW_BUTTON, WidgetsWindowButtonClass))

typedef struct _WidgetsWindowButton WidgetsWindowButton;
typedef struct _WidgetsWindowButtonClass WidgetsWindowButtonClass;

#define WIDGETS_TYPE_DIALOG_BUTTON (widgets_dialog_button_get_type ())
#define WIDGETS_DIALOG_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_DIALOG_BUTTON, WidgetsDialogButton))
#define WIDGETS_DIALOG_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_DIALOG_BUTTON, WidgetsDialogButtonClass))
#define WIDGETS_IS_DIALOG_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_DIALOG_BUTTON))
#define WIDGETS_IS_DIALOG_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_DIALOG_BUTTON))
#define WIDGETS_DIALOG_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_DIALOG_BUTTON, WidgetsDialogButtonClass))

typedef struct _WidgetsDialogButton WidgetsDialogButton;
typedef struct _WidgetsDialogButtonClass WidgetsDialogButtonClass;
typedef struct _WidgetsConfigWindowPrivate WidgetsConfigWindowPrivate;

#define CONFIG_TYPE_CONFIG (config_config_get_type ())
#define CONFIG_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONFIG_TYPE_CONFIG, ConfigConfig))
#define CONFIG_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONFIG_TYPE_CONFIG, ConfigConfigClass))
#define CONFIG_IS_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONFIG_TYPE_CONFIG))
#define CONFIG_IS_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONFIG_TYPE_CONFIG))
#define CONFIG_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONFIG_TYPE_CONFIG, ConfigConfigClass))

typedef struct _ConfigConfig ConfigConfig;
typedef struct _ConfigConfigClass ConfigConfigClass;

#define WIDGETS_TYPE_WORKSPACE_MANAGER (widgets_workspace_manager_get_type ())
#define WIDGETS_WORKSPACE_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_WORKSPACE_MANAGER, WidgetsWorkspaceManager))
#define WIDGETS_WORKSPACE_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_WORKSPACE_MANAGER, WidgetsWorkspaceManagerClass))
#define WIDGETS_IS_WORKSPACE_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_WORKSPACE_MANAGER))
#define WIDGETS_IS_WORKSPACE_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_WORKSPACE_MANAGER))
#define WIDGETS_WORKSPACE_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_WORKSPACE_MANAGER, WidgetsWorkspaceManagerClass))

typedef struct _WidgetsWorkspaceManager WidgetsWorkspaceManager;
typedef struct _WidgetsWorkspaceManagerClass WidgetsWorkspaceManagerClass;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define __vala_PangoFontDescription_free0(var) ((var == NULL) ? NULL : (var = (_vala_PangoFontDescription_free (var), NULL)))

#define WIDGETS_TYPE_CONFIRM_DIALOG (widgets_confirm_dialog_get_type ())
#define WIDGETS_CONFIRM_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_CONFIRM_DIALOG, WidgetsConfirmDialog))
#define WIDGETS_CONFIRM_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_CONFIRM_DIALOG, WidgetsConfirmDialogClass))
#define WIDGETS_IS_CONFIRM_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_CONFIRM_DIALOG))
#define WIDGETS_IS_CONFIRM_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_CONFIRM_DIALOG))
#define WIDGETS_CONFIRM_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_CONFIRM_DIALOG, WidgetsConfirmDialogClass))

typedef struct _WidgetsConfirmDialog WidgetsConfirmDialog;
typedef struct _WidgetsConfirmDialogClass WidgetsConfirmDialogClass;
enum  {
	WIDGETS_COMMAND_DIALOG_ADD_COMMAND_SIGNAL,
	WIDGETS_COMMAND_DIALOG_EDIT_COMMAND_SIGNAL,
	WIDGETS_COMMAND_DIALOG_DELETE_COMMAND_SIGNAL,
	WIDGETS_COMMAND_DIALOG_NUM_SIGNALS
};
static guint widgets_command_dialog_signals[WIDGETS_COMMAND_DIALOG_NUM_SIGNALS] = {0};

struct _WidgetsDialog {
	GtkWindow parent_instance;
	WidgetsDialogPrivate * priv;
	GdkScreen* screen_monitor;
	GtkBox* window_frame_box;
	GtkBox* window_widget_box;
	WidgetsConfigWindow* transient_window;
	gint option_widget_margin_end;
	gint option_widget_margin_top;
	gint window_frame_margin_bottom;
	gint window_frame_margin_end;
	gint window_frame_margin_start;
	gint window_frame_margin_top;
	gint window_frame_radius;
	gint window_init_height;
	gint window_init_width;
};

struct _WidgetsDialogClass {
	GtkWindowClass parent_class;
	void (*draw_window_above) (WidgetsDialog* self, cairo_t* cr);
};

struct _WidgetsCommandDialog {
	WidgetsDialog parent_instance;
	WidgetsCommandDialogPrivate * priv;
	GtkBox* box;
	GtkBox* command_action_box;
	GtkBox* content_box;
	WidgetsDropdownTextButton* backspace_key_box;
	WidgetsDropdownTextButton* del_key_box;
	WidgetsDropdownTextButton* encode_box;
	GtkGrid* advanced_grid;
	GtkWidget* focus_widget;
	WidgetsTerm* focus_term;
	WidgetsConfigWindow* parent_window;
	WidgetsEntry* command_entry;
	WidgetsEntry* groupname_entry;
	WidgetsEntry* name_entry;
	WidgetsEntry* path_entry;
	WidgetsEntry* port_entry;
	WidgetsEntry* user_entry;
	WidgetsFileButton* file_button;
	WidgetsPasswordButton* password_button;
	WidgetsShortcutEntry* shortcut_entry;
	WidgetsTextButton* delete_command_button;
	WidgetsTextButton* show_advanced_button;
	gint action_button_margin_top;
	gint font_size;
	gint grid_height;
	gint label_margin_left;
	gint max_command_name_length;
	gint preference_margin_end;
	gint preference_margin_start;
	gint preference_margin_top;
	gint preference_name_margin_left;
	gint preference_name_width;
	gint preference_widget_width;
	gint window_expand_height;
	gchar* command_info;
};

struct _WidgetsCommandDialogClass {
	WidgetsDialogClass parent_class;
};

struct _WidgetsConfigWindow {
	GtkWindow parent_instance;
	WidgetsConfigWindowPrivate * priv;
	ConfigConfig* config;
	GdkRGBA title_line_dark_color;
	GdkRGBA title_line_light_color;
	GdkScreen* screen_monitor;
	GtkBox* box;
	GtkBox* top_box;
	GtkBox* window_frame_box;
	GtkBox* window_widget_box;
	WidgetsWorkspaceManager* workspace_manager;
	gboolean quake_mode;
	gboolean show_quake_menu;
	gboolean* config_theme_is_light;
	gint active_tab_underline_width;
	gint active_tab_underline_x;
	gint cache_height;
	gint cache_width;
	gint reset_timeout_delay;
	gint resize_cache_x;
	gint resize_cache_y;
	gint resize_cache_width;
	gint resize_cache_height;
	gint resize_timeout_delay;
	guint* reset_timeout_source_id;
	guint* resize_timeout_source_id;
};

struct _WidgetsConfigWindowClass {
	GtkWindowClass parent_class;
	void (*toggle_fullscreen) (WidgetsConfigWindow* self);
	void (*window_save_before_quit) (WidgetsConfigWindow* self);
	GdkCursorType* (*get_frame_cursor_type) (WidgetsConfigWindow* self, gdouble x, gdouble y);
	void (*update_frame) (WidgetsConfigWindow* self);
	GdkCursorType* (*get_cursor_type) (WidgetsConfigWindow* self, gdouble x, gdouble y);
};

static gpointer widgets_command_dialog_parent_class = NULL;
VALA_EXTERN gint constant_CLOSE_BUTTON_WIDTH;

VALA_EXTERN GType widgets_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsDialog, g_object_unref)
VALA_EXTERN GType widgets_config_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsConfigWindow, g_object_unref)
VALA_EXTERN GType widgets_command_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsCommandDialog, g_object_unref)
VALA_EXTERN GType widgets_dropdown_text_button_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsDropdownTextButton, g_object_unref)
VALA_EXTERN GType widgets_term_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsTerm, g_object_unref)
VALA_EXTERN GType widgets_entry_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsEntry, g_object_unref)
VALA_EXTERN GType widgets_file_button_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsFileButton, g_object_unref)
VALA_EXTERN GType widgets_password_button_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsPasswordButton, g_object_unref)
VALA_EXTERN GType widgets_shortcut_entry_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsShortcutEntry, g_object_unref)
VALA_EXTERN GType widgets_click_event_box_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsClickEventBox, g_object_unref)
VALA_EXTERN GType widgets_text_button_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsTextButton, g_object_unref)
VALA_EXTERN WidgetsCommandDialog* widgets_command_dialog_new (WidgetsConfigWindow* window,
                                                  WidgetsTerm* term,
                                                  GtkWidget* widget,
                                                  const gchar* info,
                                                  GKeyFile* config_file);
VALA_EXTERN WidgetsCommandDialog* widgets_command_dialog_construct (GType object_type,
                                                        WidgetsConfigWindow* window,
                                                        WidgetsTerm* term,
                                                        GtkWidget* widget,
                                                        const gchar* info,
                                                        GKeyFile* config_file);
VALA_EXTERN WidgetsDialog* widgets_dialog_new (void);
VALA_EXTERN WidgetsDialog* widgets_dialog_construct (GType object_type);
VALA_EXTERN void widgets_dialog_set_init_size (WidgetsDialog* self,
                                   gint width,
                                   gint height);
VALA_EXTERN GType widgets_window_event_area_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsWindowEventArea, g_object_unref)
VALA_EXTERN WidgetsWindowEventArea* widgets_window_event_area_new (GtkContainer* area);
VALA_EXTERN WidgetsWindowEventArea* widgets_window_event_area_construct (GType object_type,
                                                             GtkContainer* area);
VALA_EXTERN GType widgets_window_button_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsWindowButton, g_object_unref)
VALA_EXTERN WidgetsWindowButton* widgets_create_close_button (void);
static void ___lambda226_ (WidgetsCommandDialog* self,
                    GdkEventButton* b);
static void ____lambda226__widgets_click_event_box_clicked (WidgetsClickEventBox* _sender,
                                                     GdkEventButton* event,
                                                     gpointer self);
static void ___lambda227_ (WidgetsCommandDialog* self,
                    GtkWidget* w);
static void ____lambda227__gtk_widget_destroy (GtkWidget* _sender,
                                        gpointer self);
VALA_EXTERN WidgetsEntry* widgets_entry_new (void);
VALA_EXTERN WidgetsEntry* widgets_entry_construct (GType object_type);
VALA_EXTERN void widgets_command_dialog_create_key_row (WidgetsCommandDialog* self,
                                            GtkLabel* label,
                                            GtkWidget* widget,
                                            const gchar* name,
                                            GtkGrid* grid,
                                            const gchar* class_name);
VALA_EXTERN gchar* widgets_term_get_selection_text (WidgetsTerm* self);
VALA_EXTERN void widgets_command_dialog_create_follow_key_row (WidgetsCommandDialog* self,
                                                   GtkLabel* label,
                                                   GtkWidget* widget,
                                                   const gchar* name,
                                                   GtkLabel* previous_label,
                                                   GtkGrid* grid,
                                                   const gchar* class_name);
VALA_EXTERN WidgetsShortcutEntry* widgets_shortcut_entry_new (void);
VALA_EXTERN WidgetsShortcutEntry* widgets_shortcut_entry_construct (GType object_type);
VALA_EXTERN void widgets_shortcut_entry_set_text (WidgetsShortcutEntry* self,
                                      const gchar* text);
VALA_EXTERN void widgets_command_dialog_add_delete_button (WidgetsCommandDialog* self);
VALA_EXTERN GType widgets_dialog_button_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsDialogButton, g_object_unref)
VALA_EXTERN GType config_config_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ConfigConfig, g_object_unref)
VALA_EXTERN GType widgets_workspace_manager_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsWorkspaceManager, g_object_unref)
VALA_EXTERN WidgetsDialogButton* widgets_dialog_button_new (const gchar* text,
                                                const gchar* direction,
                                                const gchar* type,
                                                gboolean has_radius);
VALA_EXTERN WidgetsDialogButton* widgets_dialog_button_construct (GType object_type,
                                                      const gchar* text,
                                                      const gchar* direction,
                                                      const gchar* type,
                                                      gboolean has_radius);
static void ___lambda231_ (WidgetsCommandDialog* self,
                    GtkButton* b);
static void ____lambda231__gtk_button_clicked (GtkButton* _sender,
                                        gpointer self);
static void ___lambda232_ (WidgetsCommandDialog* self,
                    GtkButton* b);
VALA_EXTERN gchar* widgets_shortcut_entry_get_text (WidgetsShortcutEntry* self);
static void ____lambda232__gtk_button_clicked (GtkButton* _sender,
                                        gpointer self);
VALA_EXTERN void widgets_dialog_add_widget (WidgetsDialog* self,
                                GtkWidget* widget);
static void _g_object_unref0_ (gpointer var);
static inline void _g_list_free__g_object_unref0_ (GList* self);
static void _vala_PangoFontDescription_free (PangoFontDescription* self);
VALA_EXTERN WidgetsTextButton* widgets_create_delete_button (const gchar* text);
static void __lambda228_ (WidgetsCommandDialog* self,
                   GdkEventButton* w);
VALA_EXTERN GType widgets_confirm_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsConfirmDialog, g_object_unref)
VALA_EXTERN WidgetsConfirmDialog* widgets_confirm_dialog_new (const gchar* title,
                                                  const gchar* content,
                                                  const gchar* cancel_text,
                                                  const gchar* confirm_text);
VALA_EXTERN WidgetsConfirmDialog* widgets_confirm_dialog_construct (GType object_type,
                                                        const gchar* title,
                                                        const gchar* content,
                                                        const gchar* cancel_text,
                                                        const gchar* confirm_text);
VALA_EXTERN void widgets_dialog_transient_for_window (WidgetsDialog* self,
                                          WidgetsConfigWindow* window);
static void __lambda229_ (WidgetsCommandDialog* self,
                   WidgetsConfirmDialog* w);
static void ___lambda229__widgets_confirm_dialog_cancel (WidgetsConfirmDialog* _sender,
                                                  gpointer self);
static void __lambda230_ (WidgetsCommandDialog* self,
                   WidgetsConfirmDialog* w);
static void ___lambda230__widgets_confirm_dialog_confirm (WidgetsConfirmDialog* _sender,
                                                   gpointer self);
static void ___lambda228__widgets_click_event_box_clicked (WidgetsClickEventBox* _sender,
                                                    GdkEventButton* event,
                                                    gpointer self);
VALA_EXTERN GtkLabel* widgets_command_dialog_create_label (WidgetsCommandDialog* self,
                                               const gchar* text);
VALA_EXTERN void widgets_command_dialog_adjust_option_widgets (WidgetsCommandDialog* self,
                                                   GtkLabel* name_widget,
                                                   GtkWidget* value_widget);
VALA_EXTERN void widgets_dialog_grid_attach (WidgetsDialog* self,
                                 GtkGrid* grid,
                                 GtkWidget* child,
                                 gint left,
                                 gint top,
                                 gint width,
                                 gint height);
VALA_EXTERN void widgets_dialog_grid_attach_next_to (WidgetsDialog* self,
                                         GtkGrid* grid,
                                         GtkWidget* child,
                                         GtkWidget* sibling,
                                         GtkPositionType side,
                                         gint width,
                                         gint height);
static void g_cclosure_user_marshal_VOID__STRING_STRING_STRING (GClosure * closure,
                                                         GValue * return_value,
                                                         guint n_param_values,
                                                         const GValue * param_values,
                                                         gpointer invocation_hint,
                                                         gpointer marshal_data);
static void widgets_command_dialog_finalize (GObject * obj);
static GType widgets_command_dialog_get_type_once (void);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static gpointer
_g_object_ref0 (gpointer self)
{
	return self ? g_object_ref (self) : NULL;
}

static void
___lambda226_ (WidgetsCommandDialog* self,
               GdkEventButton* b)
{
	g_return_if_fail (b != NULL);
	gtk_widget_destroy ((GtkWidget*) self);
}

static void
____lambda226__widgets_click_event_box_clicked (WidgetsClickEventBox* _sender,
                                                GdkEventButton* event,
                                                gpointer self)
{
	___lambda226_ ((WidgetsCommandDialog*) self, event);
}

static void
___lambda227_ (WidgetsCommandDialog* self,
               GtkWidget* w)
{
	GtkWidget* _tmp0_;
	g_return_if_fail (w != NULL);
	_tmp0_ = self->focus_widget;
	if (_tmp0_ != NULL) {
		GtkWidget* _tmp1_;
		_tmp1_ = self->focus_widget;
		gtk_widget_grab_focus (_tmp1_);
	}
}

static void
____lambda227__gtk_widget_destroy (GtkWidget* _sender,
                                   gpointer self)
{
	___lambda227_ ((WidgetsCommandDialog*) self, _sender);
}

static void
___lambda231_ (WidgetsCommandDialog* self,
               GtkButton* b)
{
	g_return_if_fail (b != NULL);
	gtk_widget_destroy ((GtkWidget*) self);
}

static void
____lambda231__gtk_button_clicked (GtkButton* _sender,
                                   gpointer self)
{
	___lambda231_ ((WidgetsCommandDialog*) self, _sender);
}

static gchar*
string_strip (const gchar* self)
{
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup (self);
	_result_ = _tmp0_;
	g_strstrip (_result_);
	result = _result_;
	return result;
}

static void
___lambda232_ (WidgetsCommandDialog* self,
               GtkButton* b)
{
	const gchar* _tmp0_;
	g_return_if_fail (b != NULL);
	_tmp0_ = self->command_info;
	if (_tmp0_ != NULL) {
		gboolean _tmp1_ = FALSE;
		WidgetsEntry* _tmp2_;
		const gchar* _tmp3_;
		gchar* _tmp4_;
		gchar* _tmp5_;
		gboolean _tmp6_;
		_tmp2_ = self->name_entry;
		_tmp3_ = gtk_entry_get_text ((GtkEntry*) _tmp2_);
		_tmp4_ = string_strip (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp6_ = g_strcmp0 (_tmp5_, "") != 0;
		_g_free0 (_tmp5_);
		if (_tmp6_) {
			WidgetsEntry* _tmp7_;
			const gchar* _tmp8_;
			gchar* _tmp9_;
			gchar* _tmp10_;
			_tmp7_ = self->command_entry;
			_tmp8_ = gtk_entry_get_text ((GtkEntry*) _tmp7_);
			_tmp9_ = string_strip (_tmp8_);
			_tmp10_ = _tmp9_;
			_tmp1_ = g_strcmp0 (_tmp10_, "") != 0;
			_g_free0 (_tmp10_);
		} else {
			_tmp1_ = FALSE;
		}
		if (_tmp1_) {
			WidgetsEntry* _tmp11_;
			const gchar* _tmp12_;
			WidgetsEntry* _tmp13_;
			const gchar* _tmp14_;
			WidgetsShortcutEntry* _tmp15_;
			gchar* _tmp16_;
			gchar* _tmp17_;
			_tmp11_ = self->name_entry;
			_tmp12_ = gtk_entry_get_text ((GtkEntry*) _tmp11_);
			_tmp13_ = self->command_entry;
			_tmp14_ = gtk_entry_get_text ((GtkEntry*) _tmp13_);
			_tmp15_ = self->shortcut_entry;
			_tmp16_ = widgets_shortcut_entry_get_text (_tmp15_);
			_tmp17_ = _tmp16_;
			g_signal_emit (self, widgets_command_dialog_signals[WIDGETS_COMMAND_DIALOG_EDIT_COMMAND_SIGNAL], 0, _tmp12_, _tmp14_, _tmp17_);
			_g_free0 (_tmp17_);
		}
	} else {
		gboolean _tmp18_ = FALSE;
		WidgetsEntry* _tmp19_;
		const gchar* _tmp20_;
		gchar* _tmp21_;
		gchar* _tmp22_;
		gboolean _tmp23_;
		_tmp19_ = self->name_entry;
		_tmp20_ = gtk_entry_get_text ((GtkEntry*) _tmp19_);
		_tmp21_ = string_strip (_tmp20_);
		_tmp22_ = _tmp21_;
		_tmp23_ = g_strcmp0 (_tmp22_, "") != 0;
		_g_free0 (_tmp22_);
		if (_tmp23_) {
			WidgetsEntry* _tmp24_;
			const gchar* _tmp25_;
			gchar* _tmp26_;
			gchar* _tmp27_;
			_tmp24_ = self->command_entry;
			_tmp25_ = gtk_entry_get_text ((GtkEntry*) _tmp24_);
			_tmp26_ = string_strip (_tmp25_);
			_tmp27_ = _tmp26_;
			_tmp18_ = g_strcmp0 (_tmp27_, "") != 0;
			_g_free0 (_tmp27_);
		} else {
			_tmp18_ = FALSE;
		}
		if (_tmp18_) {
			WidgetsEntry* _tmp28_;
			const gchar* _tmp29_;
			WidgetsEntry* _tmp30_;
			const gchar* _tmp31_;
			WidgetsShortcutEntry* _tmp32_;
			gchar* _tmp33_;
			gchar* _tmp34_;
			_tmp28_ = self->name_entry;
			_tmp29_ = gtk_entry_get_text ((GtkEntry*) _tmp28_);
			_tmp30_ = self->command_entry;
			_tmp31_ = gtk_entry_get_text ((GtkEntry*) _tmp30_);
			_tmp32_ = self->shortcut_entry;
			_tmp33_ = widgets_shortcut_entry_get_text (_tmp32_);
			_tmp34_ = _tmp33_;
			g_signal_emit (self, widgets_command_dialog_signals[WIDGETS_COMMAND_DIALOG_ADD_COMMAND_SIGNAL], 0, _tmp29_, _tmp31_, _tmp34_);
			_g_free0 (_tmp34_);
		}
	}
}

static void
____lambda232__gtk_button_clicked (GtkButton* _sender,
                                   gpointer self)
{
	___lambda232_ ((WidgetsCommandDialog*) self, _sender);
}

static void
_g_object_unref0_ (gpointer var)
{
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
}

static inline void
_g_list_free__g_object_unref0_ (GList* self)
{
	g_list_free_full (self, (GDestroyNotify) _g_object_unref0_);
}

static void
_vala_PangoFontDescription_free (PangoFontDescription* self)
{
	g_boxed_free (pango_font_description_get_type (), self);
}

WidgetsCommandDialog*
widgets_command_dialog_construct (GType object_type,
                                  WidgetsConfigWindow* window,
                                  WidgetsTerm* term,
                                  GtkWidget* widget,
                                  const gchar* info,
                                  GKeyFile* config_file)
{
	WidgetsCommandDialog * self = NULL;
	PangoFontDescription* font_description = NULL;
	PangoFontDescription* _tmp0_;
	PangoFontDescription* _tmp1_;
	gint max_width = 0;
	gchar** label_names = NULL;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar** _tmp5_;
	gint label_names_length1;
	gint _label_names_size_;
	gchar** _tmp6_;
	gint _tmp6__length1;
	GError* _inner_error0_ = NULL;
	g_return_val_if_fail (window != NULL, NULL);
	self = (WidgetsCommandDialog*) widgets_dialog_construct (object_type);
	bindtextdomain (GETTEXT_PACKAGE, "/usr/share/locale");
	widgets_dialog_set_init_size ((WidgetsDialog*) self, 480, 320);
	_tmp0_ = pango_font_description_new ();
	font_description = _tmp0_;
	_tmp1_ = font_description;
	pango_font_description_set_size (_tmp1_, (gint) (self->font_size * PANGO_SCALE));
	max_width = 0;
	_tmp2_ = g_strdup (_ ("Name"));
	_tmp3_ = g_strdup (_ ("Content"));
	_tmp4_ = g_strdup (_ ("Shortcuts"));
	_tmp5_ = g_new0 (gchar*, 3 + 1);
	_tmp5_[0] = _tmp2_;
	_tmp5_[1] = _tmp3_;
	_tmp5_[2] = _tmp4_;
	label_names = _tmp5_;
	label_names_length1 = 3;
	_label_names_size_ = label_names_length1;
	_tmp6_ = label_names;
	_tmp6__length1 = label_names_length1;
	{
		gchar** label_name_collection = NULL;
		gint label_name_collection_length1 = 0;
		gint _label_name_collection_size_ = 0;
		gint label_name_it = 0;
		label_name_collection = _tmp6_;
		label_name_collection_length1 = _tmp6__length1;
		for (label_name_it = 0; label_name_it < label_name_collection_length1; label_name_it = label_name_it + 1) {
			gchar* _tmp7_;
			gchar* label_name = NULL;
			_tmp7_ = g_strdup (label_name_collection[label_name_it]);
			label_name = _tmp7_;
			{
				PangoLayout* layout = NULL;
				const gchar* _tmp8_;
				PangoLayout* _tmp9_;
				PangoLayout* _tmp10_;
				PangoFontDescription* _tmp11_;
				gint name_width = 0;
				gint name_height = 0;
				PangoLayout* _tmp12_;
				gint _tmp13_ = 0;
				gint _tmp14_ = 0;
				_tmp8_ = label_name;
				_tmp9_ = gtk_widget_create_pango_layout ((GtkWidget*) self, _tmp8_);
				layout = _tmp9_;
				_tmp10_ = layout;
				_tmp11_ = font_description;
				pango_layout_set_font_description (_tmp10_, _tmp11_);
				_tmp12_ = layout;
				pango_layout_get_pixel_size (_tmp12_, &_tmp13_, &_tmp14_);
				name_width = _tmp13_;
				name_height = _tmp14_;
				max_width = MAX (max_width, name_width);
				_g_object_unref0 (layout);
				_g_free0 (label_name);
			}
		}
	}
	self->preference_name_width = max_width + self->preference_name_margin_left;
	{
		WidgetsConfigWindow* _tmp15_;
		WidgetsTerm* _tmp16_;
		GtkWidget* _tmp17_;
		gchar* _tmp18_;
		GtkBox* _tmp19_;
		GtkBox* top_box = NULL;
		GtkBox* _tmp20_;
		GtkBox* _tmp21_;
		WidgetsWindowEventArea* event_area = NULL;
		WidgetsWindowEventArea* _tmp22_;
		WidgetsWindowEventArea* _tmp23_;
		GtkOverlay* overlay = NULL;
		GtkOverlay* _tmp24_;
		GtkOverlay* _tmp25_;
		GtkBox* _tmp26_;
		GtkOverlay* _tmp27_;
		WidgetsWindowEventArea* _tmp28_;
		GtkBox* _tmp29_;
		GtkOverlay* _tmp30_;
		GtkBox* spacing_box = NULL;
		GtkBox* _tmp31_;
		GtkBox* _tmp32_;
		GtkBox* _tmp33_;
		GtkBox* _tmp34_;
		GtkLabel* title_label = NULL;
		GtkLabel* _tmp35_;
		GtkLabel* _tmp36_;
		GtkStyleContext* _tmp37_;
		GtkBox* _tmp38_;
		GtkLabel* _tmp39_;
		const gchar* _tmp40_;
		WidgetsWindowButton* close_button = NULL;
		WidgetsWindowButton* _tmp43_;
		WidgetsWindowButton* _tmp44_;
		GtkBox* _tmp45_;
		WidgetsWindowButton* _tmp46_;
		GtkBox* _tmp47_;
		GtkBox* _tmp48_;
		GtkBox* _tmp49_;
		GtkBox* _tmp50_;
		GtkBox* _tmp51_;
		GtkBox* _tmp52_;
		GtkGrid* grid = NULL;
		GtkGrid* _tmp53_;
		GtkGrid* _tmp54_;
		GtkBox* _tmp55_;
		GtkGrid* _tmp56_;
		GtkLabel* name_label = NULL;
		GtkLabel* _tmp57_;
		WidgetsEntry* _tmp58_;
		const gchar* _tmp59_;
		WidgetsEntry* _tmp62_;
		GtkLabel* _tmp63_;
		WidgetsEntry* _tmp64_;
		GtkGrid* _tmp65_;
		GtkLabel* command_label = NULL;
		GtkLabel* _tmp66_;
		WidgetsEntry* _tmp67_;
		const gchar* _tmp68_;
		WidgetsEntry* _tmp78_;
		GtkLabel* _tmp79_;
		WidgetsEntry* _tmp80_;
		GtkLabel* _tmp81_;
		GtkGrid* _tmp82_;
		GtkLabel* shortcut_label = NULL;
		GtkLabel* _tmp83_;
		WidgetsShortcutEntry* _tmp84_;
		const gchar* _tmp85_;
		GtkLabel* _tmp90_;
		WidgetsShortcutEntry* _tmp91_;
		GtkLabel* _tmp92_;
		GtkGrid* _tmp93_;
		GtkBox* _tmp94_;
		GtkBox* _tmp95_;
		GtkBox* _tmp96_;
		GtkBox* _tmp97_;
		const gchar* _tmp98_;
		GtkBox* button_box = NULL;
		GtkBox* _tmp99_;
		GtkBox* _tmp100_;
		WidgetsDialogButton* cancel_button = NULL;
		WidgetsConfigWindow* _tmp101_;
		GdkScreen* _tmp102_;
		WidgetsDialogButton* _tmp103_;
		gchar* button_name = NULL;
		const gchar* _tmp104_;
		WidgetsDialogButton* confirm_button = NULL;
		const gchar* _tmp107_;
		WidgetsConfigWindow* _tmp108_;
		GdkScreen* _tmp109_;
		WidgetsDialogButton* _tmp110_;
		WidgetsDialogButton* _tmp111_;
		GList* tab_order_list = NULL;
		WidgetsDialogButton* _tmp112_;
		GtkWidget* _tmp113_;
		GtkWidget* _tmp114_;
		GtkBox* _tmp115_;
		GtkBox* _tmp116_;
		GtkBox* _tmp117_;
		WidgetsDialogButton* _tmp118_;
		GtkBox* _tmp119_;
		GtkBox* _tmp120_;
		GtkBox* _tmp121_;
		GtkBox* _tmp122_;
		_tmp15_ = _g_object_ref0 (window);
		_g_object_unref0 (self->parent_window);
		self->parent_window = _tmp15_;
		_tmp16_ = _g_object_ref0 (term);
		_g_object_unref0 (self->focus_term);
		self->focus_term = _tmp16_;
		_tmp17_ = _g_object_ref0 (widget);
		_g_object_unref0 (self->focus_widget);
		self->focus_widget = _tmp17_;
		_tmp18_ = g_strdup (info);
		_g_free0 (self->command_info);
		self->command_info = _tmp18_;
		_tmp19_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
		g_object_ref_sink (_tmp19_);
		_g_object_unref0 (self->box);
		self->box = _tmp19_;
		_tmp20_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
		g_object_ref_sink (_tmp20_);
		top_box = _tmp20_;
		_tmp21_ = top_box;
		gtk_widget_set_margin_bottom ((GtkWidget*) _tmp21_, self->preference_margin_top);
		_tmp22_ = widgets_window_event_area_new ((GtkContainer*) self);
		g_object_ref_sink (_tmp22_);
		event_area = _tmp22_;
		_tmp23_ = event_area;
		gtk_widget_set_margin_end ((GtkWidget*) _tmp23_, constant_CLOSE_BUTTON_WIDTH);
		_tmp24_ = (GtkOverlay*) gtk_overlay_new ();
		g_object_ref_sink (_tmp24_);
		overlay = _tmp24_;
		_tmp25_ = overlay;
		_tmp26_ = top_box;
		gtk_container_add ((GtkContainer*) _tmp25_, (GtkWidget*) _tmp26_);
		_tmp27_ = overlay;
		_tmp28_ = event_area;
		gtk_overlay_add_overlay (_tmp27_, (GtkWidget*) _tmp28_);
		_tmp29_ = self->box;
		_tmp30_ = overlay;
		gtk_box_pack_start (_tmp29_, (GtkWidget*) _tmp30_, FALSE, FALSE, (guint) 0);
		_tmp31_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
		g_object_ref_sink (_tmp31_);
		spacing_box = _tmp31_;
		_tmp32_ = spacing_box;
		gtk_widget_set_size_request ((GtkWidget*) _tmp32_, constant_CLOSE_BUTTON_WIDTH, -1);
		_tmp33_ = top_box;
		_tmp34_ = spacing_box;
		gtk_box_pack_start (_tmp33_, (GtkWidget*) _tmp34_, FALSE, FALSE, (guint) 0);
		_tmp35_ = (GtkLabel*) gtk_label_new (NULL);
		g_object_ref_sink (_tmp35_);
		title_label = _tmp35_;
		_tmp36_ = title_label;
		_tmp37_ = gtk_widget_get_style_context ((GtkWidget*) _tmp36_);
		gtk_style_context_add_class (_tmp37_, "remote_server_label");
		_tmp38_ = top_box;
		_tmp39_ = title_label;
		gtk_box_pack_start (_tmp38_, (GtkWidget*) _tmp39_, TRUE, TRUE, (guint) 0);
		_tmp40_ = self->command_info;
		if (_tmp40_ != NULL) {
			GtkLabel* _tmp41_;
			_tmp41_ = title_label;
			gtk_label_set_text (_tmp41_, _ ("Edit Command"));
		} else {
			GtkLabel* _tmp42_;
			_tmp42_ = title_label;
			gtk_label_set_text (_tmp42_, _ ("Add Command"));
		}
		_tmp43_ = widgets_create_close_button ();
		close_button = _tmp43_;
		_tmp44_ = close_button;
		g_signal_connect_object ((WidgetsClickEventBox*) _tmp44_, "clicked", (GCallback) ____lambda226__widgets_click_event_box_clicked, self, 0);
		_tmp45_ = top_box;
		_tmp46_ = close_button;
		gtk_box_pack_start (_tmp45_, (GtkWidget*) _tmp46_, FALSE, FALSE, (guint) 0);
		g_signal_connect_object ((GtkWidget*) self, "destroy", (GCallback) ____lambda227__gtk_widget_destroy, self, 0);
		_tmp47_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
		g_object_ref_sink (_tmp47_);
		_g_object_unref0 (self->content_box);
		self->content_box = _tmp47_;
		_tmp48_ = self->content_box;
		gtk_widget_set_halign ((GtkWidget*) _tmp48_, GTK_ALIGN_CENTER);
		_tmp49_ = self->content_box;
		gtk_widget_set_margin_start ((GtkWidget*) _tmp49_, self->preference_margin_start);
		_tmp50_ = self->content_box;
		gtk_widget_set_margin_end ((GtkWidget*) _tmp50_, self->preference_margin_end);
		_tmp51_ = self->box;
		_tmp52_ = self->content_box;
		gtk_box_pack_start (_tmp51_, (GtkWidget*) _tmp52_, FALSE, FALSE, (guint) 0);
		_tmp53_ = (GtkGrid*) gtk_grid_new ();
		g_object_ref_sink (_tmp53_);
		grid = _tmp53_;
		_tmp54_ = grid;
		gtk_widget_set_margin_end ((GtkWidget*) _tmp54_, self->label_margin_left);
		_tmp55_ = self->content_box;
		_tmp56_ = grid;
		gtk_box_pack_start (_tmp55_, (GtkWidget*) _tmp56_, FALSE, FALSE, (guint) 0);
		_tmp57_ = (GtkLabel*) gtk_label_new (NULL);
		g_object_ref_sink (_tmp57_);
		name_label = _tmp57_;
		_tmp58_ = widgets_entry_new ();
		g_object_ref_sink (_tmp58_);
		_g_object_unref0 (self->name_entry);
		self->name_entry = _tmp58_;
		_tmp59_ = self->command_info;
		if (_tmp59_ != NULL) {
			WidgetsEntry* _tmp60_;
			const gchar* _tmp61_;
			_tmp60_ = self->name_entry;
			_tmp61_ = self->command_info;
			gtk_entry_set_text ((GtkEntry*) _tmp60_, _tmp61_);
		}
		_tmp62_ = self->name_entry;
		gtk_entry_set_placeholder_text ((GtkEntry*) _tmp62_, _ ("Required"));
		_tmp63_ = name_label;
		_tmp64_ = self->name_entry;
		_tmp65_ = grid;
		widgets_command_dialog_create_key_row (self, _tmp63_, (GtkWidget*) _tmp64_, _ ("Name:"), _tmp65_, "preference_entry");
		_tmp66_ = (GtkLabel*) gtk_label_new (NULL);
		g_object_ref_sink (_tmp66_);
		command_label = _tmp66_;
		_tmp67_ = widgets_entry_new ();
		g_object_ref_sink (_tmp67_);
		_g_object_unref0 (self->command_entry);
		self->command_entry = _tmp67_;
		_tmp68_ = self->command_info;
		if (_tmp68_ != NULL) {
			gchar* _tmp69_ = NULL;
			const gchar* _tmp70_;
			gchar* _tmp71_;
			WidgetsEntry* _tmp72_;
			_tmp70_ = self->command_info;
			_tmp71_ = g_key_file_get_value (config_file, _tmp70_, "Command", &_inner_error0_);
			_tmp69_ = _tmp71_;
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				_g_object_unref0 (command_label);
				_g_object_unref0 (name_label);
				_g_object_unref0 (grid);
				_g_object_unref0 (close_button);
				_g_object_unref0 (title_label);
				_g_object_unref0 (spacing_box);
				_g_object_unref0 (overlay);
				_g_object_unref0 (event_area);
				_g_object_unref0 (top_box);
				goto __catch0_g_error;
			}
			_tmp72_ = self->command_entry;
			gtk_entry_set_text ((GtkEntry*) _tmp72_, _tmp69_);
			_g_free0 (_tmp69_);
		} else {
			WidgetsTerm* _tmp73_;
			_tmp73_ = self->focus_term;
			if (_tmp73_ != NULL) {
				WidgetsEntry* _tmp74_;
				WidgetsTerm* _tmp75_;
				gchar* _tmp76_;
				gchar* _tmp77_;
				_tmp74_ = self->command_entry;
				_tmp75_ = self->focus_term;
				_tmp76_ = widgets_term_get_selection_text (_tmp75_);
				_tmp77_ = _tmp76_;
				gtk_entry_set_text ((GtkEntry*) _tmp74_, _tmp77_);
				_g_free0 (_tmp77_);
			}
		}
		_tmp78_ = self->command_entry;
		gtk_entry_set_placeholder_text ((GtkEntry*) _tmp78_, _ ("Required"));
		_tmp79_ = command_label;
		_tmp80_ = self->command_entry;
		_tmp81_ = name_label;
		_tmp82_ = grid;
		widgets_command_dialog_create_follow_key_row (self, _tmp79_, (GtkWidget*) _tmp80_, _ ("Command:"), _tmp81_, _tmp82_, "preference_entry");
		_tmp83_ = (GtkLabel*) gtk_label_new (NULL);
		g_object_ref_sink (_tmp83_);
		shortcut_label = _tmp83_;
		_tmp84_ = widgets_shortcut_entry_new ();
		g_object_ref_sink (_tmp84_);
		_g_object_unref0 (self->shortcut_entry);
		self->shortcut_entry = _tmp84_;
		_tmp85_ = self->command_info;
		if (_tmp85_ != NULL) {
			gchar* _tmp86_ = NULL;
			const gchar* _tmp87_;
			gchar* _tmp88_;
			WidgetsShortcutEntry* _tmp89_;
			_tmp87_ = self->command_info;
			_tmp88_ = g_key_file_get_value (config_file, _tmp87_, "Shortcut", &_inner_error0_);
			_tmp86_ = _tmp88_;
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				_g_object_unref0 (shortcut_label);
				_g_object_unref0 (command_label);
				_g_object_unref0 (name_label);
				_g_object_unref0 (grid);
				_g_object_unref0 (close_button);
				_g_object_unref0 (title_label);
				_g_object_unref0 (spacing_box);
				_g_object_unref0 (overlay);
				_g_object_unref0 (event_area);
				_g_object_unref0 (top_box);
				goto __catch0_g_error;
			}
			_tmp89_ = self->shortcut_entry;
			widgets_shortcut_entry_set_text (_tmp89_, _tmp86_);
			_g_free0 (_tmp86_);
		}
		_tmp90_ = shortcut_label;
		_tmp91_ = self->shortcut_entry;
		_tmp92_ = command_label;
		_tmp93_ = grid;
		widgets_command_dialog_create_follow_key_row (self, _tmp90_, (GtkWidget*) _tmp91_, _ ("Shortcuts:"), _tmp92_, _tmp93_, "preference_entry");
		_tmp94_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
		g_object_ref_sink (_tmp94_);
		_g_object_unref0 (self->command_action_box);
		self->command_action_box = _tmp94_;
		_tmp95_ = self->command_action_box;
		gtk_widget_set_size_request ((GtkWidget*) _tmp95_, -1, 30);
		_tmp96_ = self->content_box;
		_tmp97_ = self->command_action_box;
		gtk_box_pack_start (_tmp96_, (GtkWidget*) _tmp97_, FALSE, FALSE, (guint) 0);
		_tmp98_ = self->command_info;
		if (_tmp98_ != NULL) {
			widgets_command_dialog_add_delete_button (self);
		}
		_tmp99_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
		g_object_ref_sink (_tmp99_);
		button_box = _tmp99_;
		_tmp100_ = button_box;
		gtk_widget_set_margin_top ((GtkWidget*) _tmp100_, self->action_button_margin_top);
		_tmp101_ = self->parent_window;
		_tmp102_ = _tmp101_->screen_monitor;
		_tmp103_ = widgets_dialog_button_new (_ ("Cancel"), "left", "text", gdk_screen_is_composited (_tmp102_));
		g_object_ref_sink (_tmp103_);
		cancel_button = _tmp103_;
		_tmp104_ = self->command_info;
		if (_tmp104_ != NULL) {
			gchar* _tmp105_;
			_tmp105_ = g_strdup (_ ("Save"));
			_g_free0 (button_name);
			button_name = _tmp105_;
		} else {
			gchar* _tmp106_;
			_tmp106_ = g_strdup (_ ("Add"));
			_g_free0 (button_name);
			button_name = _tmp106_;
		}
		_tmp107_ = button_name;
		_tmp108_ = self->parent_window;
		_tmp109_ = _tmp108_->screen_monitor;
		_tmp110_ = widgets_dialog_button_new (_tmp107_, "right", "action", gdk_screen_is_composited (_tmp109_));
		g_object_ref_sink (_tmp110_);
		confirm_button = _tmp110_;
		_tmp111_ = cancel_button;
		g_signal_connect_object ((GtkButton*) _tmp111_, "clicked", (GCallback) ____lambda231__gtk_button_clicked, self, 0);
		g_signal_connect_object ((GtkButton*) confirm_button, "clicked", (GCallback) ____lambda232__gtk_button_clicked, self, 0);
		tab_order_list = NULL;
		_tmp112_ = cancel_button;
		_tmp113_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp112_, gtk_widget_get_type (), GtkWidget));
		tab_order_list = g_list_append (tab_order_list, _tmp113_);
		_tmp114_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (confirm_button, gtk_widget_get_type (), GtkWidget));
		tab_order_list = g_list_append (tab_order_list, _tmp114_);
		_tmp115_ = button_box;
		gtk_container_set_focus_chain ((GtkContainer*) _tmp115_, tab_order_list);
		_tmp116_ = button_box;
		gtk_container_set_focus_child ((GtkContainer*) _tmp116_, (GtkWidget*) confirm_button);
		_tmp117_ = button_box;
		_tmp118_ = cancel_button;
		gtk_box_pack_start (_tmp117_, (GtkWidget*) _tmp118_, TRUE, TRUE, (guint) 0);
		_tmp119_ = button_box;
		gtk_box_pack_start (_tmp119_, (GtkWidget*) confirm_button, TRUE, TRUE, (guint) 0);
		_tmp120_ = self->box;
		_tmp121_ = button_box;
		gtk_box_pack_start (_tmp120_, (GtkWidget*) _tmp121_, FALSE, FALSE, (guint) 0);
		_tmp122_ = self->box;
		widgets_dialog_add_widget ((WidgetsDialog*) self, (GtkWidget*) _tmp122_);
		(tab_order_list == NULL) ? NULL : (tab_order_list = (_g_list_free__g_object_unref0_ (tab_order_list), NULL));
		_g_object_unref0 (confirm_button);
		_g_free0 (button_name);
		_g_object_unref0 (cancel_button);
		_g_object_unref0 (button_box);
		_g_object_unref0 (shortcut_label);
		_g_object_unref0 (command_label);
		_g_object_unref0 (name_label);
		_g_object_unref0 (grid);
		_g_object_unref0 (close_button);
		_g_object_unref0 (title_label);
		_g_object_unref0 (spacing_box);
		_g_object_unref0 (overlay);
		_g_object_unref0 (event_area);
		_g_object_unref0 (top_box);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		const gchar* _tmp123_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp123_ = e->message;
		g_error ("command_dialog.vala:233: %s", _tmp123_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		label_names = (_vala_array_free (label_names, label_names_length1, (GDestroyNotify) g_free), NULL);
		__vala_PangoFontDescription_free0 (font_description);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return NULL;
	}
	label_names = (_vala_array_free (label_names, label_names_length1, (GDestroyNotify) g_free), NULL);
	__vala_PangoFontDescription_free0 (font_description);
	return self;
}

WidgetsCommandDialog*
widgets_command_dialog_new (WidgetsConfigWindow* window,
                            WidgetsTerm* term,
                            GtkWidget* widget,
                            const gchar* info,
                            GKeyFile* config_file)
{
	return widgets_command_dialog_construct (WIDGETS_TYPE_COMMAND_DIALOG, window, term, widget, info, config_file);
}

static glong
string_strnlen (gchar* str,
                glong maxlen)
{
	gchar* end = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	glong result;
	_tmp0_ = memchr (str, 0, (gsize) maxlen);
	end = _tmp0_;
	_tmp1_ = end;
	if (_tmp1_ == NULL) {
		result = maxlen;
		return result;
	} else {
		gchar* _tmp2_;
		_tmp2_ = end;
		result = (glong) (_tmp2_ - str);
		return result;
	}
}

static gchar*
string_substring (const gchar* self,
                  glong offset,
                  glong len)
{
	glong string_length = 0L;
	gboolean _tmp0_ = FALSE;
	gchar* _tmp3_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	if (offset >= ((glong) 0)) {
		_tmp0_ = len >= ((glong) 0);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		string_length = string_strnlen ((gchar*) self, offset + len);
	} else {
		gint _tmp1_;
		gint _tmp2_;
		_tmp1_ = strlen (self);
		_tmp2_ = _tmp1_;
		string_length = (glong) _tmp2_;
	}
	if (offset < ((glong) 0)) {
		offset = string_length + offset;
		g_return_val_if_fail (offset >= ((glong) 0), NULL);
	} else {
		g_return_val_if_fail (offset <= string_length, NULL);
	}
	if (len < ((glong) 0)) {
		len = string_length - offset;
	}
	g_return_val_if_fail ((offset + len) <= string_length, NULL);
	_tmp3_ = g_strndup (((gchar*) self) + offset, (gsize) len);
	result = _tmp3_;
	return result;
}

static void
__lambda229_ (WidgetsCommandDialog* self,
              WidgetsConfirmDialog* w)
{
	g_return_if_fail (w != NULL);
	gtk_widget_destroy ((GtkWidget*) self);
}

static void
___lambda229__widgets_confirm_dialog_cancel (WidgetsConfirmDialog* _sender,
                                             gpointer self)
{
	__lambda229_ ((WidgetsCommandDialog*) self, _sender);
}

static void
__lambda230_ (WidgetsCommandDialog* self,
              WidgetsConfirmDialog* w)
{
	WidgetsEntry* _tmp0_;
	const gchar* _tmp1_;
	g_return_if_fail (w != NULL);
	_tmp0_ = self->name_entry;
	_tmp1_ = gtk_entry_get_text ((GtkEntry*) _tmp0_);
	g_signal_emit (self, widgets_command_dialog_signals[WIDGETS_COMMAND_DIALOG_DELETE_COMMAND_SIGNAL], 0, _tmp1_);
	gtk_widget_destroy ((GtkWidget*) self);
}

static void
___lambda230__widgets_confirm_dialog_confirm (WidgetsConfirmDialog* _sender,
                                              gpointer self)
{
	__lambda230_ ((WidgetsCommandDialog*) self, _sender);
}

static void
__lambda228_ (WidgetsCommandDialog* self,
              GdkEventButton* w)
{
	gchar* command_name = NULL;
	WidgetsEntry* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	const gchar* _tmp3_;
	gint _tmp4_;
	gint _tmp5_;
	WidgetsConfirmDialog* confirm_dialog = NULL;
	const gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	WidgetsConfirmDialog* _tmp13_;
	WidgetsConfirmDialog* _tmp14_;
	WidgetsConfigWindow* _tmp15_;
	g_return_if_fail (w != NULL);
	gtk_widget_hide ((GtkWidget*) self);
	_tmp0_ = self->name_entry;
	_tmp1_ = gtk_entry_get_text ((GtkEntry*) _tmp0_);
	_tmp2_ = g_strdup (_tmp1_);
	command_name = _tmp2_;
	_tmp3_ = command_name;
	_tmp4_ = strlen (_tmp3_);
	_tmp5_ = _tmp4_;
	if (_tmp5_ > self->max_command_name_length) {
		const gchar* _tmp6_;
		gchar* _tmp7_;
		gchar* _tmp8_;
		gchar* _tmp9_;
		_tmp6_ = command_name;
		_tmp7_ = string_substring (_tmp6_, (glong) 0, (glong) self->max_command_name_length);
		_tmp8_ = _tmp7_;
		_tmp9_ = g_strconcat (_tmp8_, " ... ", NULL);
		_g_free0 (command_name);
		command_name = _tmp9_;
		_g_free0 (_tmp8_);
	}
	_tmp10_ = command_name;
	_tmp11_ = g_strdup_printf (_ ("Are you sure you want to delete %s?"), _tmp10_);
	_tmp12_ = _tmp11_;
	_tmp13_ = widgets_confirm_dialog_new (_ ("Delete command"), _tmp12_, _ ("Cancel"), _ ("Delete"));
	g_object_ref_sink (_tmp13_);
	_tmp14_ = _tmp13_;
	_g_free0 (_tmp12_);
	confirm_dialog = _tmp14_;
	_tmp15_ = self->parent_window;
	widgets_dialog_transient_for_window ((WidgetsDialog*) confirm_dialog, _tmp15_);
	g_signal_connect_object (confirm_dialog, "cancel", (GCallback) ___lambda229__widgets_confirm_dialog_cancel, self, 0);
	g_signal_connect_object (confirm_dialog, "confirm", (GCallback) ___lambda230__widgets_confirm_dialog_confirm, self, 0);
	_g_object_unref0 (confirm_dialog);
	_g_free0 (command_name);
}

static void
___lambda228__widgets_click_event_box_clicked (WidgetsClickEventBox* _sender,
                                               GdkEventButton* event,
                                               gpointer self)
{
	__lambda228_ ((WidgetsCommandDialog*) self, event);
}

void
widgets_command_dialog_add_delete_button (WidgetsCommandDialog* self)
{
	WidgetsTextButton* _tmp0_;
	WidgetsTextButton* _tmp1_;
	GtkBox* _tmp2_;
	WidgetsTextButton* _tmp3_;
	GtkBox* _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = widgets_create_delete_button (_ ("Delete command"));
	_g_object_unref0 (self->delete_command_button);
	self->delete_command_button = _tmp0_;
	_tmp1_ = self->delete_command_button;
	g_signal_connect_object ((WidgetsClickEventBox*) _tmp1_, "clicked", (GCallback) ___lambda228__widgets_click_event_box_clicked, self, 0);
	_tmp2_ = self->command_action_box;
	_tmp3_ = self->delete_command_button;
	gtk_box_pack_start (_tmp2_, (GtkWidget*) _tmp3_, TRUE, TRUE, (guint) 0);
	_tmp4_ = self->command_action_box;
	gtk_widget_show_all ((GtkWidget*) _tmp4_);
}

GtkLabel*
widgets_command_dialog_create_label (WidgetsCommandDialog* self,
                                     const gchar* text)
{
	GtkLabel* label = NULL;
	GtkLabel* _tmp0_;
	GtkStyleContext* _tmp1_;
	GtkLabel* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (text != NULL, NULL);
	_tmp0_ = (GtkLabel*) gtk_label_new (NULL);
	g_object_ref_sink (_tmp0_);
	label = _tmp0_;
	gtk_widget_set_margin_start ((GtkWidget*) label, self->label_margin_left);
	gtk_label_set_text (label, text);
	_tmp1_ = gtk_widget_get_style_context ((GtkWidget*) label);
	gtk_style_context_add_class (_tmp1_, "preference_label");
	gtk_label_set_xalign (label, (gfloat) 0);
	result = label;
	return result;
}

void
widgets_command_dialog_create_key_row (WidgetsCommandDialog* self,
                                       GtkLabel* label,
                                       GtkWidget* widget,
                                       const gchar* name,
                                       GtkGrid* grid,
                                       const gchar* class_name)
{
	GtkStyleContext* _tmp0_;
	GtkStyleContext* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (label != NULL);
	g_return_if_fail (widget != NULL);
	g_return_if_fail (name != NULL);
	g_return_if_fail (grid != NULL);
	g_return_if_fail (class_name != NULL);
	gtk_label_set_text (label, name);
	gtk_widget_set_margin_start ((GtkWidget*) label, self->label_margin_left);
	_tmp0_ = gtk_widget_get_style_context ((GtkWidget*) label);
	gtk_style_context_add_class (_tmp0_, "preference_label");
	_tmp1_ = gtk_widget_get_style_context (widget);
	gtk_style_context_add_class (_tmp1_, class_name);
	gtk_widget_set_margin_start (widget, self->label_margin_left);
	widgets_command_dialog_adjust_option_widgets (self, label, widget);
	widgets_dialog_grid_attach ((WidgetsDialog*) self, grid, (GtkWidget*) label, 0, 0, self->preference_name_width, self->grid_height);
	widgets_dialog_grid_attach_next_to ((WidgetsDialog*) self, grid, widget, (GtkWidget*) label, GTK_POS_RIGHT, self->preference_widget_width, self->grid_height);
}

void
widgets_command_dialog_create_follow_key_row (WidgetsCommandDialog* self,
                                              GtkLabel* label,
                                              GtkWidget* widget,
                                              const gchar* name,
                                              GtkLabel* previous_label,
                                              GtkGrid* grid,
                                              const gchar* class_name)
{
	GtkStyleContext* _tmp0_;
	GtkStyleContext* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (label != NULL);
	g_return_if_fail (widget != NULL);
	g_return_if_fail (name != NULL);
	g_return_if_fail (previous_label != NULL);
	g_return_if_fail (grid != NULL);
	g_return_if_fail (class_name != NULL);
	gtk_label_set_text (label, name);
	gtk_widget_set_margin_start ((GtkWidget*) label, self->label_margin_left);
	_tmp0_ = gtk_widget_get_style_context ((GtkWidget*) label);
	gtk_style_context_add_class (_tmp0_, "preference_label");
	_tmp1_ = gtk_widget_get_style_context (widget);
	gtk_style_context_add_class (_tmp1_, class_name);
	gtk_widget_set_margin_start (widget, self->label_margin_left);
	widgets_command_dialog_adjust_option_widgets (self, label, widget);
	widgets_dialog_grid_attach_next_to ((WidgetsDialog*) self, grid, (GtkWidget*) label, (GtkWidget*) previous_label, GTK_POS_BOTTOM, self->preference_name_width, self->grid_height);
	widgets_dialog_grid_attach_next_to ((WidgetsDialog*) self, grid, widget, (GtkWidget*) label, GTK_POS_RIGHT, self->preference_widget_width, self->grid_height);
}

void
widgets_command_dialog_adjust_option_widgets (WidgetsCommandDialog* self,
                                              GtkLabel* name_widget,
                                              GtkWidget* value_widget)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (name_widget != NULL);
	g_return_if_fail (value_widget != NULL);
	gtk_label_set_xalign (name_widget, (gfloat) 0);
	gtk_widget_set_size_request ((GtkWidget*) name_widget, self->preference_name_width, self->grid_height);
	gtk_widget_set_size_request (value_widget, self->preference_widget_width, self->grid_height);
	gtk_widget_set_hexpand (value_widget, TRUE);
}

static void
g_cclosure_user_marshal_VOID__STRING_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__STRING_STRING_STRING) (gpointer data1, const char* arg_1, const char* arg_2, const char* arg_3, gpointer data2);
	register GMarshalFunc_VOID__STRING_STRING_STRING callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 4);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__STRING_STRING_STRING) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_string (param_values + 1), g_value_get_string (param_values + 2), g_value_get_string (param_values + 3), data2);
}

static void
widgets_command_dialog_class_init (WidgetsCommandDialogClass * klass,
                                   gpointer klass_data)
{
	widgets_command_dialog_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->finalize = widgets_command_dialog_finalize;
	widgets_command_dialog_signals[WIDGETS_COMMAND_DIALOG_ADD_COMMAND_SIGNAL] = g_signal_new ("add-command", WIDGETS_TYPE_COMMAND_DIALOG, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_STRING_STRING, G_TYPE_NONE, 3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
	widgets_command_dialog_signals[WIDGETS_COMMAND_DIALOG_EDIT_COMMAND_SIGNAL] = g_signal_new ("edit-command", WIDGETS_TYPE_COMMAND_DIALOG, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_STRING_STRING, G_TYPE_NONE, 3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
	widgets_command_dialog_signals[WIDGETS_COMMAND_DIALOG_DELETE_COMMAND_SIGNAL] = g_signal_new ("delete-command", WIDGETS_TYPE_COMMAND_DIALOG, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
}

static void
widgets_command_dialog_instance_init (WidgetsCommandDialog * self,
                                      gpointer klass)
{
	self->action_button_margin_top = 20;
	self->font_size = 11;
	self->grid_height = 24;
	self->label_margin_left = 14;
	self->max_command_name_length = 50;
	self->preference_margin_end = 10;
	self->preference_margin_start = 10;
	self->preference_margin_top = 10;
	self->preference_name_margin_left = 10;
	self->preference_name_width = 0;
	self->preference_widget_width = 300;
	self->window_expand_height = 330;
}

static void
widgets_command_dialog_finalize (GObject * obj)
{
	WidgetsCommandDialog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, WIDGETS_TYPE_COMMAND_DIALOG, WidgetsCommandDialog);
	_g_object_unref0 (self->box);
	_g_object_unref0 (self->command_action_box);
	_g_object_unref0 (self->content_box);
	_g_object_unref0 (self->backspace_key_box);
	_g_object_unref0 (self->del_key_box);
	_g_object_unref0 (self->encode_box);
	_g_object_unref0 (self->advanced_grid);
	_g_object_unref0 (self->focus_widget);
	_g_object_unref0 (self->focus_term);
	_g_object_unref0 (self->parent_window);
	_g_object_unref0 (self->command_entry);
	_g_object_unref0 (self->groupname_entry);
	_g_object_unref0 (self->name_entry);
	_g_object_unref0 (self->path_entry);
	_g_object_unref0 (self->port_entry);
	_g_object_unref0 (self->user_entry);
	_g_object_unref0 (self->file_button);
	_g_object_unref0 (self->password_button);
	_g_object_unref0 (self->shortcut_entry);
	_g_object_unref0 (self->delete_command_button);
	_g_object_unref0 (self->show_advanced_button);
	_g_free0 (self->command_info);
	G_OBJECT_CLASS (widgets_command_dialog_parent_class)->finalize (obj);
}

static GType
widgets_command_dialog_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (WidgetsCommandDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) widgets_command_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (WidgetsCommandDialog), 0, (GInstanceInitFunc) widgets_command_dialog_instance_init, NULL };
	GType widgets_command_dialog_type_id;
	widgets_command_dialog_type_id = g_type_register_static (WIDGETS_TYPE_DIALOG, "WidgetsCommandDialog", &g_define_type_info, 0);
	return widgets_command_dialog_type_id;
}

GType
widgets_command_dialog_get_type (void)
{
	static volatile gsize widgets_command_dialog_type_id__once = 0;
	if (g_once_init_enter (&widgets_command_dialog_type_id__once)) {
		GType widgets_command_dialog_type_id;
		widgets_command_dialog_type_id = widgets_command_dialog_get_type_once ();
		g_once_init_leave (&widgets_command_dialog_type_id__once, widgets_command_dialog_type_id);
	}
	return widgets_command_dialog_type_id__once;
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize 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,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

