/* terminal.c generated by valac 0.56.17, the Vala compiler
 * generated from terminal.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 <gee.h>
#include <glib.h>
#include <gdk/gdk.h>
#include <vte/vte.h>
#include <float.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gi18n-lib.h>
#include <cairo-gobject.h>
#include <gio/gio.h>
#include <glib/gstdio.h>
#include <unistd.h>
#include <stdio.h>
#include <pango/pango.h>
#include <signal.h>
#include <sys/types.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_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;
typedef struct _WidgetsTermPrivate WidgetsTermPrivate;

#define MENU_TYPE_MENU (menu_menu_get_type ())
#define MENU_MENU(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MENU_TYPE_MENU, MenuMenu))
#define MENU_MENU_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MENU_TYPE_MENU, MenuMenuClass))
#define MENU_IS_MENU(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MENU_TYPE_MENU))
#define MENU_IS_MENU_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MENU_TYPE_MENU))
#define MENU_MENU_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MENU_TYPE_MENU, MenuMenuClass))

typedef struct _MenuMenu MenuMenu;
typedef struct _MenuMenuClass MenuMenuClass;

#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;
enum  {
	WIDGETS_TERM_0_PROPERTY,
	WIDGETS_TERM_NUM_PROPERTIES
};
static GParamSpec* widgets_term_properties[WIDGETS_TERM_NUM_PROPERTIES];
typedef enum  {
	WIDGETS_TERM_DROP_TARGETS_URILIST,
	WIDGETS_TERM_DROP_TARGETS_STRING,
	WIDGETS_TERM_DROP_TARGETS_TEXT
} WidgetsTermDropTargets;

#define WIDGETS_TERM_TYPE_DROP_TARGETS (widgets_term_drop_targets_get_type ())
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_key_file_unref0(var) ((var == NULL) ? NULL : (var = (g_key_file_unref (var), NULL)))

#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;
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;
typedef struct _ConfigConfigPrivate ConfigConfigPrivate;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

#define WIDGETS_TYPE_QUAKE_WINDOW (widgets_quake_window_get_type ())
#define WIDGETS_QUAKE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_QUAKE_WINDOW, WidgetsQuakeWindow))
#define WIDGETS_QUAKE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_QUAKE_WINDOW, WidgetsQuakeWindowClass))
#define WIDGETS_IS_QUAKE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_QUAKE_WINDOW))
#define WIDGETS_IS_QUAKE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_QUAKE_WINDOW))
#define WIDGETS_QUAKE_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_QUAKE_WINDOW, WidgetsQuakeWindowClass))

typedef struct _WidgetsQuakeWindow WidgetsQuakeWindow;
typedef struct _WidgetsQuakeWindowClass WidgetsQuakeWindowClass;

#define MENU_TYPE_MENU_ITEM (menu_menu_item_get_type ())
#define MENU_MENU_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MENU_TYPE_MENU_ITEM, MenuMenuItem))
#define MENU_MENU_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MENU_TYPE_MENU_ITEM, MenuMenuItemClass))
#define MENU_IS_MENU_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MENU_TYPE_MENU_ITEM))
#define MENU_IS_MENU_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MENU_TYPE_MENU_ITEM))
#define MENU_MENU_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MENU_TYPE_MENU_ITEM, MenuMenuItemClass))

typedef struct _MenuMenuItem MenuMenuItem;
typedef struct _MenuMenuItemClass MenuMenuItemClass;
typedef struct _WidgetsWorkspaceManagerPrivate WidgetsWorkspaceManagerPrivate;

#define WIDGETS_TYPE_WORKSPACE (widgets_workspace_get_type ())
#define WIDGETS_WORKSPACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_WORKSPACE, WidgetsWorkspace))
#define WIDGETS_WORKSPACE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_WORKSPACE, WidgetsWorkspaceClass))
#define WIDGETS_IS_WORKSPACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_WORKSPACE))
#define WIDGETS_IS_WORKSPACE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_WORKSPACE))
#define WIDGETS_WORKSPACE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_WORKSPACE, WidgetsWorkspaceClass))

typedef struct _WidgetsWorkspace WidgetsWorkspace;
typedef struct _WidgetsWorkspaceClass WidgetsWorkspaceClass;

#define WIDGETS_TYPE_TABBAR (widgets_tabbar_get_type ())
#define WIDGETS_TABBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_TABBAR, WidgetsTabbar))
#define WIDGETS_TABBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_TABBAR, WidgetsTabbarClass))
#define WIDGETS_IS_TABBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_TABBAR))
#define WIDGETS_IS_TABBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_TABBAR))
#define WIDGETS_TABBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_TABBAR, WidgetsTabbarClass))

typedef struct _WidgetsTabbar WidgetsTabbar;
typedef struct _WidgetsTabbarClass WidgetsTabbarClass;
typedef struct _WidgetsWorkspacePrivate WidgetsWorkspacePrivate;

#define ANIMATION_TYPE_ANIMATE_TIMER (animation_animate_timer_get_type ())
#define ANIMATION_ANIMATE_TIMER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ANIMATION_TYPE_ANIMATE_TIMER, AnimationAnimateTimer))
#define ANIMATION_ANIMATE_TIMER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ANIMATION_TYPE_ANIMATE_TIMER, AnimationAnimateTimerClass))
#define ANIMATION_IS_ANIMATE_TIMER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ANIMATION_TYPE_ANIMATE_TIMER))
#define ANIMATION_IS_ANIMATE_TIMER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ANIMATION_TYPE_ANIMATE_TIMER))
#define ANIMATION_ANIMATE_TIMER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ANIMATION_TYPE_ANIMATE_TIMER, AnimationAnimateTimerClass))

typedef struct _AnimationAnimateTimer AnimationAnimateTimer;
typedef struct _AnimationAnimateTimerClass AnimationAnimateTimerClass;

#define WIDGETS_TYPE_BASE_PANEL (widgets_base_panel_get_type ())
#define WIDGETS_BASE_PANEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_BASE_PANEL, WidgetsBasePanel))
#define WIDGETS_BASE_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_BASE_PANEL, WidgetsBasePanelClass))
#define WIDGETS_IS_BASE_PANEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_BASE_PANEL))
#define WIDGETS_IS_BASE_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_BASE_PANEL))
#define WIDGETS_BASE_PANEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_BASE_PANEL, WidgetsBasePanelClass))

typedef struct _WidgetsBasePanel WidgetsBasePanel;
typedef struct _WidgetsBasePanelClass WidgetsBasePanelClass;

#define WIDGETS_TYPE_COMMAND_PANEL (widgets_command_panel_get_type ())
#define WIDGETS_COMMAND_PANEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_COMMAND_PANEL, WidgetsCommandPanel))
#define WIDGETS_COMMAND_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_COMMAND_PANEL, WidgetsCommandPanelClass))
#define WIDGETS_IS_COMMAND_PANEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_COMMAND_PANEL))
#define WIDGETS_IS_COMMAND_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_COMMAND_PANEL))
#define WIDGETS_COMMAND_PANEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_COMMAND_PANEL, WidgetsCommandPanelClass))

typedef struct _WidgetsCommandPanel WidgetsCommandPanel;
typedef struct _WidgetsCommandPanelClass WidgetsCommandPanelClass;

#define WIDGETS_TYPE_ENCODING_PANEL (widgets_encoding_panel_get_type ())
#define WIDGETS_ENCODING_PANEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_ENCODING_PANEL, WidgetsEncodingPanel))
#define WIDGETS_ENCODING_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_ENCODING_PANEL, WidgetsEncodingPanelClass))
#define WIDGETS_IS_ENCODING_PANEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_ENCODING_PANEL))
#define WIDGETS_IS_ENCODING_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_ENCODING_PANEL))
#define WIDGETS_ENCODING_PANEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_ENCODING_PANEL, WidgetsEncodingPanelClass))

typedef struct _WidgetsEncodingPanel WidgetsEncodingPanel;
typedef struct _WidgetsEncodingPanelClass WidgetsEncodingPanelClass;

#define WIDGETS_TYPE_REMOTE_PANEL (widgets_remote_panel_get_type ())
#define WIDGETS_REMOTE_PANEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_REMOTE_PANEL, WidgetsRemotePanel))
#define WIDGETS_REMOTE_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_REMOTE_PANEL, WidgetsRemotePanelClass))
#define WIDGETS_IS_REMOTE_PANEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_REMOTE_PANEL))
#define WIDGETS_IS_REMOTE_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_REMOTE_PANEL))
#define WIDGETS_REMOTE_PANEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_REMOTE_PANEL, WidgetsRemotePanelClass))

typedef struct _WidgetsRemotePanel WidgetsRemotePanel;
typedef struct _WidgetsRemotePanelClass WidgetsRemotePanelClass;

#define WIDGETS_TYPE_SEARCH_PANEL (widgets_search_panel_get_type ())
#define WIDGETS_SEARCH_PANEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_SEARCH_PANEL, WidgetsSearchPanel))
#define WIDGETS_SEARCH_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_SEARCH_PANEL, WidgetsSearchPanelClass))
#define WIDGETS_IS_SEARCH_PANEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_SEARCH_PANEL))
#define WIDGETS_IS_SEARCH_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_SEARCH_PANEL))
#define WIDGETS_SEARCH_PANEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_SEARCH_PANEL, WidgetsSearchPanelClass))

typedef struct _WidgetsSearchPanel WidgetsSearchPanel;
typedef struct _WidgetsSearchPanelClass WidgetsSearchPanelClass;

#define WIDGETS_TYPE_THEME_PANEL (widgets_theme_panel_get_type ())
#define WIDGETS_THEME_PANEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_THEME_PANEL, WidgetsThemePanel))
#define WIDGETS_THEME_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_THEME_PANEL, WidgetsThemePanelClass))
#define WIDGETS_IS_THEME_PANEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_THEME_PANEL))
#define WIDGETS_IS_THEME_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_THEME_PANEL))
#define WIDGETS_THEME_PANEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_THEME_PANEL, WidgetsThemePanelClass))

typedef struct _WidgetsThemePanel WidgetsThemePanel;
typedef struct _WidgetsThemePanelClass WidgetsThemePanelClass;

#define WIDGETS_TYPE_HIGHLIGHT_FRAME (widgets_highlight_frame_get_type ())
#define WIDGETS_HIGHLIGHT_FRAME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_HIGHLIGHT_FRAME, WidgetsHighlightFrame))
#define WIDGETS_HIGHLIGHT_FRAME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_HIGHLIGHT_FRAME, WidgetsHighlightFrameClass))
#define WIDGETS_IS_HIGHLIGHT_FRAME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_HIGHLIGHT_FRAME))
#define WIDGETS_IS_HIGHLIGHT_FRAME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_HIGHLIGHT_FRAME))
#define WIDGETS_HIGHLIGHT_FRAME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_HIGHLIGHT_FRAME, WidgetsHighlightFrameClass))

typedef struct _WidgetsHighlightFrame WidgetsHighlightFrame;
typedef struct _WidgetsHighlightFrameClass WidgetsHighlightFrameClass;

#define WIDGETS_TYPE_WINDOW (widgets_window_get_type ())
#define WIDGETS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_WINDOW, WidgetsWindow))
#define WIDGETS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_WINDOW, WidgetsWindowClass))
#define WIDGETS_IS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_WINDOW))
#define WIDGETS_IS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_WINDOW))
#define WIDGETS_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_WINDOW, WidgetsWindowClass))

typedef struct _WidgetsWindow WidgetsWindow;
typedef struct _WidgetsWindowClass WidgetsWindowClass;

#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;

#define WIDGETS_TYPE_PREFERENCE (widgets_preference_get_type ())
#define WIDGETS_PREFERENCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_PREFERENCE, WidgetsPreference))
#define WIDGETS_PREFERENCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_PREFERENCE, WidgetsPreferenceClass))
#define WIDGETS_IS_PREFERENCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_PREFERENCE))
#define WIDGETS_IS_PREFERENCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_PREFERENCE))
#define WIDGETS_PREFERENCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_PREFERENCE, WidgetsPreferenceClass))

typedef struct _WidgetsPreference WidgetsPreference;
typedef struct _WidgetsPreferenceClass WidgetsPreferenceClass;
typedef struct _Block43Data Block43Data;

#define WIDGETS_TYPE_RENAME_DIALOG (widgets_rename_dialog_get_type ())
#define WIDGETS_RENAME_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_RENAME_DIALOG, WidgetsRenameDialog))
#define WIDGETS_RENAME_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_RENAME_DIALOG, WidgetsRenameDialogClass))
#define WIDGETS_IS_RENAME_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_RENAME_DIALOG))
#define WIDGETS_IS_RENAME_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_RENAME_DIALOG))
#define WIDGETS_RENAME_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_RENAME_DIALOG, WidgetsRenameDialogClass))

typedef struct _WidgetsRenameDialog WidgetsRenameDialog;
typedef struct _WidgetsRenameDialogClass WidgetsRenameDialogClass;
#define __vala_PangoFontDescription_free0(var) ((var == NULL) ? NULL : (var = (_vala_PangoFontDescription_free (var), NULL)))
typedef struct _Block44Data Block44Data;
#define _vte_regex_unref0(var) ((var == NULL) ? NULL : (var = (vte_regex_unref (var), NULL)))
typedef struct _Block45Data Block45Data;
typedef struct _Block46Data Block46Data;
typedef struct _WidgetsTabbarPrivate WidgetsTabbarPrivate;
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
enum  {
	WIDGETS_TERM_CHANGE_TITLE_SIGNAL,
	WIDGETS_TERM_EXIT_SIGNAL,
	WIDGETS_TERM_HIGHLIGHT_TAB_SIGNAL,
	WIDGETS_TERM_EXIT_WITH_BAD_CODE_SIGNAL,
	WIDGETS_TERM_NUM_SIGNALS
};
static guint widgets_term_signals[WIDGETS_TERM_NUM_SIGNALS] = {0};

struct _WidgetsTerm {
	GtkOverlay parent_instance;
	WidgetsTermPrivate * priv;
	GeeArrayList* command_execute_y_coordinates;
	GPid child_pid;
	GdkRGBA background_color;
	GdkRGBA foreground_color;
	GtkScrollbar* scrollbar;
	MenuMenu* menu;
	VteTerminal* term;
	WidgetsWorkspaceManager* workspace_manager;
	gboolean child_has_exit;
	gboolean has_print_exit_notify;
	gboolean has_select_all;
	gboolean is_first_term;
	gboolean is_press_scrollbar;
	gboolean login_remote_server;
	gboolean press_anything;
	gdouble zoom_factor;
	gint font_size;
	gint hide_scrollbar_offset;
	gint show_scrollbar_offset;
	gchar* current_dir;
	gchar* current_title;
	gchar* expect_file_path;
	gchar* customize_title;
	gchar* remote_server_title;
	gchar* uri_at_right_press;
	gchar* server_info;
	guint launch_idle_id;
	guint* hide_scrollbar_timeout_source_id;
	GKeyFile* search_engine_config_file;
	gchar* search_engine_config_file_path;
};

struct _WidgetsTermClass {
	GtkOverlayClass parent_class;
};

struct _WidgetsTermPrivate {
	gboolean enter_sz_command;
	gchar* save_file_directory;
};

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);
};

struct _ConfigConfig {
	GObject parent_instance;
	ConfigConfigPrivate * priv;
	GeeArrayList* backspace_key_erase_names;
	GeeArrayList* del_key_erase_names;
	GeeArrayList* encoding_names;
	GeeHashMap* erase_map;
	gdouble default_opacity;
	gint default_size;
	gchar* default_mono_font;
	GKeyFile* config_file;
	gchar* config_file_path;
	gchar* temp_theme;
};

struct _ConfigConfigClass {
	GObjectClass parent_class;
};

struct _WidgetsWorkspaceManager {
	GtkBox parent_instance;
	WidgetsWorkspaceManagerPrivate * priv;
	GeeHashMap* workspace_map;
	WidgetsTabbar* tabbar;
	WidgetsWorkspace* focus_workspace;
	gint workspace_index;
};

struct _WidgetsWorkspaceManagerClass {
	GtkBoxClass parent_class;
};

struct _WidgetsWorkspace {
	GtkOverlay parent_instance;
	WidgetsWorkspacePrivate * priv;
	WidgetsWorkspaceManager* workspace_manager;
	AnimationAnimateTimer* command_panel_hide_timer;
	AnimationAnimateTimer* command_panel_show_timer;
	AnimationAnimateTimer* encoding_panel_hide_timer;
	AnimationAnimateTimer* encoding_panel_show_timer;
	AnimationAnimateTimer* remote_panel_hide_timer;
	AnimationAnimateTimer* remote_panel_show_timer;
	AnimationAnimateTimer* theme_panel_hide_timer;
	AnimationAnimateTimer* theme_panel_show_timer;
	GeeArrayList* term_list;
	WidgetsCommandPanel* command_panel;
	WidgetsEncodingPanel* encoding_panel;
	WidgetsRemotePanel* remote_panel;
	WidgetsSearchPanel* search_panel;
	WidgetsTerm* focus_terminal;
	WidgetsTerm* terminal_before_popup;
	WidgetsThemePanel* theme_panel;
	WidgetsHighlightFrame* highlight_frame;
	gint PANED_HANDLE_SIZE;
	gint hide_slider_interval;
	gint hide_slider_start_x;
	gint index;
	gint show_slider_interval;
	gint show_slider_start_x;
	guint* highlight_frame_timeout_source_id;
};

struct _WidgetsWorkspaceClass {
	GtkOverlayClass parent_class;
};

struct _Block43Data {
	int _ref_count_;
	WidgetsTerm* self;
	GSList* file_list;
};

struct _Block44Data {
	int _ref_count_;
	WidgetsTerm* self;
	gchar** uris;
	gint uris_length1;
	gint _uris_size_;
};

struct _Block45Data {
	int _ref_count_;
	WidgetsTerm* self;
	gchar* directory;
	gchar** argv;
	gint argv_length1;
	gint _argv_size_;
	VtePtyFlags pty_flags;
	GSpawnFlags spawn_flags;
};

struct _Block46Data {
	int _ref_count_;
	WidgetsTerm* self;
	gchar** argv;
	gint argv_length1;
	gint _argv_size_;
	gchar* dir;
};

struct _WidgetsTabbar {
	GtkDrawingArea parent_instance;
	WidgetsTabbarPrivate * priv;
	GdkRGBA tab_split_dark_color;
	GdkRGBA tab_split_light_color;
	GeeHashMap* tab_highlight_map;
	GeeArrayList* tab_list;
	GdkRGBA hover_arrow_color;
	GdkRGBA inactive_arrow_color;
	GdkRGBA tab_text_color;
	GdkRGBA text_active_color;
	GdkRGBA text_dark_color;
	GdkRGBA text_highlight_color;
	GdkRGBA text_hover_dark_color;
	GdkRGBA text_hover_light_color;
	GdkRGBA text_light_color;
	GeeHashMap* tab_name_map;
	PangoFontDescription* font_description;
	gboolean allowed_add_tab;
	gint font_size;
	gint height;
	gint hover_clip_right_offset;
	gint min_tab_width;
	gint tab_index;
};

struct _WidgetsTabbarClass {
	GtkDrawingAreaClass parent_class;
};

static gint WidgetsTerm_private_offset;
static gpointer widgets_term_parent_class = NULL;
VALA_EXTERN gchar* widgets_term_USERCHARS;
gchar* widgets_term_USERCHARS = NULL;
VALA_EXTERN gchar* widgets_term_USERCHARS_CLASS;
gchar* widgets_term_USERCHARS_CLASS = NULL;
VALA_EXTERN gchar* widgets_term_PASSCHARS_CLASS;
gchar* widgets_term_PASSCHARS_CLASS = NULL;
VALA_EXTERN gchar* widgets_term_HOSTCHARS_CLASS;
gchar* widgets_term_HOSTCHARS_CLASS = NULL;
VALA_EXTERN gchar* widgets_term_HOST;
gchar* widgets_term_HOST = NULL;
VALA_EXTERN gchar* widgets_term_PORT;
gchar* widgets_term_PORT = NULL;
VALA_EXTERN gchar* widgets_term_PATHCHARS_CLASS;
gchar* widgets_term_PATHCHARS_CLASS = NULL;
VALA_EXTERN gchar* widgets_term_PATHTERM_CLASS;
gchar* widgets_term_PATHTERM_CLASS = NULL;
VALA_EXTERN gchar* widgets_term_SCHEME;
gchar* widgets_term_SCHEME = NULL;
VALA_EXTERN gchar* widgets_term_USERPASS;
gchar* widgets_term_USERPASS = NULL;
VALA_EXTERN gchar* widgets_term_URLPATH;
gchar* widgets_term_URLPATH = NULL;
VALA_EXTERN gchar** widgets_term_REGEX_STRINGS;
VALA_EXTERN gint widgets_term_REGEX_STRINGS_length1;
gchar** widgets_term_REGEX_STRINGS = NULL;
gint widgets_term_REGEX_STRINGS_length1 = 0;
VALA_EXTERN gint constant_EXIT_CODE_BAD_SMABA;
VALA_EXTERN GeeArrayList* application_commands;
VALA_EXTERN gdouble constant_TERMINAL_MIN_OPACITY;

VALA_EXTERN GType widgets_term_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsTerm, g_object_unref)
VALA_EXTERN GType menu_menu_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MenuMenu, g_object_unref)
VALA_EXTERN GType widgets_workspace_manager_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsWorkspaceManager, g_object_unref)
static GType widgets_term_drop_targets_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
VALA_EXTERN gchar* utils_get_config_file_path (const gchar* config_name);
VALA_EXTERN WidgetsTerm* widgets_term_new (gboolean first_term,
                               const gchar* work_directory,
                               WidgetsWorkspaceManager* manager);
VALA_EXTERN WidgetsTerm* widgets_term_construct (GType object_type,
                                     gboolean first_term,
                                     const gchar* work_directory,
                                     WidgetsWorkspaceManager* manager);
static void __lambda7_ (WidgetsTerm* self,
                 VteTerminal* t,
                 gint exit_status);
VALA_EXTERN GType widgets_config_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsConfigWindow, 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 gboolean widgets_term_is_launch_command (WidgetsTerm* self);
VALA_EXTERN gboolean widgets_workspace_manager_is_first_term (WidgetsWorkspaceManager* self,
                                                  WidgetsTerm* term);
VALA_EXTERN void widgets_term_print_exit_notify (WidgetsTerm* self);
static void ___lambda7__vte_terminal_child_exited (VteTerminal* _sender,
                                            gint status,
                                            gpointer self);
static void __lambda9_ (WidgetsTerm* self,
                 GtkWidget* t);
VALA_EXTERN void widgets_term_kill_fg (WidgetsTerm* self);
static void ___lambda9__gtk_widget_destroy (GtkWidget* _sender,
                                     gpointer self);
static void __lambda10_ (WidgetsTerm* self,
                  GtkWidget* t);
VALA_EXTERN void widgets_term_setup_from_config (WidgetsTerm* self);
VALA_EXTERN void widgets_term_focus_term (WidgetsTerm* self);
static void ___lambda10__gtk_widget_realize (GtkWidget* _sender,
                                      gpointer self);
static void __lambda11_ (WidgetsTerm* self,
                  VteTerminal* t);
VALA_EXTERN void widgets_term_update_terminal_title (WidgetsTerm* self);
static void ___lambda11__vte_terminal_window_title_changed (VteTerminal* _sender,
                                                     gpointer self);
static gboolean widgets_term_on_key_press (WidgetsTerm* self,
                                    GtkWidget* widget,
                                    GdkEventKey* key_event);
static gboolean _widgets_term_on_key_press_gtk_widget_key_press_event (GtkWidget* _sender,
                                                                GdkEventKey* event,
                                                                gpointer self);
VALA_EXTERN gboolean widgets_term_on_scroll (WidgetsTerm* self,
                                 GtkWidget* widget,
                                 GdkEventScroll* scroll_event);
static gboolean _widgets_term_on_scroll_gtk_widget_scroll_event (GtkWidget* _sender,
                                                          GdkEventScroll* event,
                                                          gpointer self);
static gboolean __lambda249_ (WidgetsTerm* self,
                       GdkEventButton* event);
VALA_EXTERN void widgets_term_show_menu (WidgetsTerm* self,
                             gint x,
                             gint y);
static gboolean ___lambda249__gtk_widget_button_press_event (GtkWidget* _sender,
                                                      GdkEventButton* event,
                                                      gpointer self);
static gboolean __lambda250_ (WidgetsTerm* self,
                       GdkEventButton* event);
static gboolean ___lambda250__gtk_widget_button_release_event (GtkWidget* _sender,
                                                        GdkEventButton* event,
                                                        gpointer self);
static void _vala_array_add6 (GtkTargetEntry* * array,
                       gint* length,
                       gint* size,
                       const GtkTargetEntry* value);
static void _vala_array_add7 (GtkTargetEntry* * array,
                       gint* length,
                       gint* size,
                       const GtkTargetEntry* value);
static void _vala_array_add8 (GtkTargetEntry* * array,
                       gint* length,
                       gint* size,
                       const GtkTargetEntry* value);
VALA_EXTERN void widgets_term_drag_received (WidgetsTerm* self,
                                 GdkDragContext* context,
                                 gint x,
                                 gint y,
                                 GtkSelectionData* selection_data,
                                 guint target_type,
                                 guint time_);
static void _widgets_term_drag_received_gtk_widget_drag_data_received (GtkWidget* _sender,
                                                                GdkDragContext* context,
                                                                gint x,
                                                                gint y,
                                                                GtkSelectionData* selection_data,
                                                                guint info,
                                                                guint time_,
                                                                gpointer self);
static void widgets_term_clickable (WidgetsTerm* self,
                             gchar** str,
                             gint str_length1);
VALA_EXTERN void widgets_term_launch_command (WidgetsTerm* self,
                                  GeeArrayList* commands,
                                  const gchar* dir);
VALA_EXTERN void widgets_term_launch_shell (WidgetsTerm* self,
                                const gchar* dir);
static gboolean __lambda256_ (WidgetsTerm* self,
                       GtkWidget* w,
                       GdkEventButton* e);
static gboolean ___lambda256__gtk_widget_button_press_event (GtkWidget* _sender,
                                                      GdkEventButton* event,
                                                      gpointer self);
static gboolean __lambda257_ (WidgetsTerm* self,
                       GtkWidget* w,
                       GdkEventButton* e);
static gboolean ___lambda257__gtk_widget_button_release_event (GtkWidget* _sender,
                                                        GdkEventButton* event,
                                                        gpointer self);
static void __lambda258_ (WidgetsTerm* self);
VALA_EXTERN void widgets_term_try_hide_scrollbar (WidgetsTerm* self);
static void ___lambda258__gtk_range_value_changed (GtkRange* _sender,
                                            gpointer self);
static gboolean __lambda260_ (WidgetsTerm* self,
                       GtkWidget* w,
                       GdkEventMotion* e);
static gboolean ___lambda260__gtk_widget_motion_notify_event (GtkWidget* _sender,
                                                       GdkEventMotion* event,
                                                       gpointer self);
static gboolean ___lambda259_ (WidgetsTerm* self);
static gboolean ____lambda259__gsource_func (gpointer self);
static guint* _uint_dup (guint* self);
VALA_EXTERN gboolean widgets_term_is_in_remote_server (WidgetsTerm* self);
VALA_EXTERN gboolean widgets_term_try_get_foreground_pid (WidgetsTerm* self,
                                              gint* pid);
VALA_EXTERN gchar* utils_get_proc_file_content (const gchar* proc_file_path);
static gboolean _vala_string_array_contains (gchar* * stack,
                                      gssize stack_length,
                                      const gchar* needle);
VALA_EXTERN GType widgets_quake_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsQuakeWindow, g_object_unref)
VALA_EXTERN GType menu_menu_item_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MenuMenuItem, g_object_unref)
VALA_EXTERN MenuMenuItem* menu_menu_item_new (const gchar* item_id,
                                  const gchar* item_text);
VALA_EXTERN MenuMenuItem* menu_menu_item_construct (GType object_type,
                                        const gchar* item_id,
                                        const gchar* item_text);
VALA_EXTERN gboolean widgets_term_clipboard_has_context (WidgetsTerm* self);
VALA_EXTERN gchar* widgets_term_get_selection_file (WidgetsTerm* self);
VALA_EXTERN gchar* widgets_term_get_cwd (WidgetsTerm* self);
VALA_EXTERN GType widgets_workspace_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsWorkspace, g_object_unref)
VALA_EXTERN GType widgets_tabbar_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsTabbar, g_object_unref)
VALA_EXTERN GType animation_animate_timer_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (AnimationAnimateTimer, g_object_unref)
VALA_EXTERN GType widgets_base_panel_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsBasePanel, g_object_unref)
VALA_EXTERN GType widgets_command_panel_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsCommandPanel, g_object_unref)
VALA_EXTERN GType widgets_encoding_panel_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsEncodingPanel, g_object_unref)
VALA_EXTERN GType widgets_remote_panel_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsRemotePanel, g_object_unref)
VALA_EXTERN GType widgets_search_panel_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsSearchPanel, g_object_unref)
VALA_EXTERN GType widgets_theme_panel_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsThemePanel, g_object_unref)
VALA_EXTERN GType widgets_highlight_frame_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsHighlightFrame, g_object_unref)
VALA_EXTERN GType widgets_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsWindow, g_object_unref)
VALA_EXTERN gboolean widgets_config_window_window_is_fullscreen (WidgetsConfigWindow* self);
VALA_EXTERN void menu_menu_item_add_submenu_item (MenuMenuItem* self,
                                      MenuMenuItem* item);
static void _g_object_unref0_ (gpointer var);
static inline void _g_list_free__g_object_unref0_ (GList* self);
VALA_EXTERN MenuMenu* menu_menu_new (void);
VALA_EXTERN MenuMenu* menu_menu_construct (GType object_type);
VALA_EXTERN void widgets_term_handle_menu_item_click (WidgetsTerm* self,
                                          const gchar* item_id);
static void _widgets_term_handle_menu_item_click_menu_menu_click_item (MenuMenu* _sender,
                                                                const gchar* item_id,
                                                                gpointer self);
VALA_EXTERN void widgets_term_handle_menu_destroy (WidgetsTerm* self);
static void _widgets_term_handle_menu_destroy_menu_menu_destroy (MenuMenu* _sender,
                                                          gpointer self);
VALA_EXTERN void menu_menu_set_prefer_deepin_menu (MenuMenu* self,
                                       gboolean _prefer_deepin_menu);
VALA_EXTERN void menu_menu_popup_at_position (MenuMenu* self,
                                  GList* menu_content,
                                  gint x,
                                  gint y);
VALA_EXTERN void widgets_term_open_selection_file (WidgetsTerm* self);
VALA_EXTERN void widgets_term_open_current_dir_in_file_manager (WidgetsTerm* self);
VALA_EXTERN void widgets_config_window_toggle_fullscreen (WidgetsConfigWindow* self);
VALA_EXTERN void widgets_workspace_search (WidgetsWorkspace* self,
                               const gchar* search_text);
VALA_EXTERN gchar* widgets_term_get_selection_text (WidgetsTerm* self);
VALA_EXTERN void widgets_workspace_split_horizontal (WidgetsWorkspace* self);
VALA_EXTERN void widgets_workspace_split_vertical (WidgetsWorkspace* self);
VALA_EXTERN void widgets_workspace_close_focus_term (WidgetsWorkspace* self);
VALA_EXTERN void widgets_workspace_close_other_terms (WidgetsWorkspace* self);
VALA_EXTERN void widgets_workspace_manager_new_workspace_with_current_directory (WidgetsWorkspaceManager* self,
                                                                     gboolean remote_serve_action);
VALA_EXTERN void widgets_workspace_show_command_panel (WidgetsWorkspace* self,
                                           WidgetsWorkspace* workspace);
VALA_EXTERN void widgets_workspace_show_remote_panel (WidgetsWorkspace* self,
                                          WidgetsWorkspace* workspace);
VALA_EXTERN void widgets_workspace_show_theme_panel (WidgetsWorkspace* self,
                                         WidgetsWorkspace* workspace);
VALA_EXTERN void widgets_term_upload_file (WidgetsTerm* self);
VALA_EXTERN void widgets_term_download_file (WidgetsTerm* self);
VALA_EXTERN void widgets_term_rename_title (WidgetsTerm* self);
VALA_EXTERN void widgets_workspace_show_encoding_panel (WidgetsWorkspace* self,
                                            WidgetsWorkspace* workspace);
VALA_EXTERN GType widgets_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsDialog, g_object_unref)
VALA_EXTERN GType widgets_preference_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsPreference, g_object_unref)
VALA_EXTERN WidgetsPreference* widgets_preference_new (WidgetsConfigWindow* window,
                                           GtkWidget* widget);
VALA_EXTERN WidgetsPreference* widgets_preference_construct (GType object_type,
                                                 WidgetsConfigWindow* window,
                                                 GtkWidget* widget);
VALA_EXTERN void widgets_dialog_transient_for_window (WidgetsDialog* self,
                                          WidgetsConfigWindow* window);
VALA_EXTERN void widgets_term_search_text_in_search_engine (WidgetsTerm* self,
                                                const gchar* search_text,
                                                const gchar* search_engline_api);
static Block43Data* block43_data_ref (Block43Data* _data43_);
static inline void _g_slist_free__g_object_unref0_ (GSList* self);
static void block43_data_unref (void * _userdata_);
VALA_EXTERN void widgets_term_press_ctrl_at (WidgetsTerm* self);
static gboolean ___lambda242_ (Block43Data* _data43_);
VALA_EXTERN guint8* utils_to_raw_data (const gchar* str,
                           gint* result_length1);
static gboolean ____lambda242__gsource_func (gpointer self);
VALA_EXTERN void widgets_term_press_ctrl_a (WidgetsTerm* self);
static gboolean ___lambda243_ (WidgetsTerm* self);
VALA_EXTERN void widgets_term_press_ctrl_k (WidgetsTerm* self);
static gboolean __lambda244_ (WidgetsTerm* self);
static gboolean ___lambda244__gsource_func (gpointer self);
static gboolean ____lambda243__gsource_func (gpointer self);
VALA_EXTERN GType widgets_rename_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsRenameDialog, g_object_unref)
VALA_EXTERN WidgetsRenameDialog* widgets_rename_dialog_new (const gchar* title,
                                                const gchar* content,
                                                const gchar* cancel_text,
                                                const gchar* rename_text);
VALA_EXTERN WidgetsRenameDialog* widgets_rename_dialog_construct (GType object_type,
                                                      const gchar* title,
                                                      const gchar* content,
                                                      const gchar* cancel_text,
                                                      const gchar* rename_text);
static void __lambda213_ (WidgetsTerm* self,
                   WidgetsRenameDialog* w,
                   const gchar* new_title);
static void ___lambda213__widgets_rename_dialog_rename (WidgetsRenameDialog* _sender,
                                                 const gchar* new_title,
                                                 gpointer self);
VALA_EXTERN void widgets_term_execute_download (WidgetsTerm* self);
static gboolean __lambda245_ (WidgetsTerm* self);
static gboolean __lambda246_ (WidgetsTerm* self);
static gboolean __lambda247_ (WidgetsTerm* self);
static gboolean __lambda248_ (WidgetsTerm* self);
static gboolean ___lambda248__gsource_func (gpointer self);
static gboolean ___lambda247__gsource_func (gpointer self);
static gboolean ___lambda246__gsource_func (gpointer self);
static gboolean ___lambda245__gsource_func (gpointer self);
VALA_EXTERN void widgets_term_press_ctrl_e (WidgetsTerm* self);
VALA_EXTERN gchar* utils_get_process_cmdline (gint pid);
VALA_EXTERN void config_config_load_config (ConfigConfig* self);
VALA_EXTERN void config_config_save (ConfigConfig* self);
VALA_EXTERN gchar* keymap_get_keyevent_name (GdkEventKey* key_event);
VALA_EXTERN void utils_get_pointer_position (gint* x,
                                 gint* y);
VALA_EXTERN void widgets_term_increment_size (WidgetsTerm* self);
VALA_EXTERN void widgets_term_decrement_size (WidgetsTerm* self);
VALA_EXTERN void widgets_term_set_default_font_size (WidgetsTerm* self);
VALA_EXTERN void widgets_term_jump_to_next_command (WidgetsTerm* self);
VALA_EXTERN void widgets_term_jump_to_previous_command (WidgetsTerm* self);
VALA_EXTERN gboolean widgets_term_has_foreground_process (WidgetsTerm* self);
VALA_EXTERN void widgets_term_update_font_info (WidgetsTerm* self);
static void _vala_PangoFontDescription_free (PangoFontDescription* self);
static Block44Data* block44_data_ref (Block44Data* _data44_);
static void block44_data_unref (void * _userdata_);
static gboolean ____lambda251_ (Block44Data* _data44_);
static gboolean _____lambda251__gsource_func (gpointer self);
static Block45Data* block45_data_ref (Block45Data* _data45_);
static void block45_data_unref (void * _userdata_);
VALA_EXTERN ConfigConfig* config_config_new (void);
VALA_EXTERN ConfigConfig* config_config_construct (GType object_type);
static void _vala_array_add9 (gchar** * array,
                       gint* length,
                       gint* size,
                       gchar* value);
static gboolean __lambda254_ (Block45Data* _data45_);
static gboolean ___lambda255_ (WidgetsTerm* self);
static gboolean ____lambda255__gsource_func (gpointer self);
static gboolean ___lambda254__gsource_func (gpointer self);
static gboolean ___lambda8_ (WidgetsTerm* self);
static gboolean ____lambda8__gsource_func (gpointer self);
static Block46Data* block46_data_ref (Block46Data* _data46_);
static void block46_data_unref (void * _userdata_);
static void _vala_array_add10 (gchar** * array,
                        gint* length,
                        gint* size,
                        gchar* value);
static gboolean __lambda252_ (WidgetsTerm* self);
VALA_EXTERN void widgets_tabbar_rename_tab (WidgetsTabbar* self,
                                gint tab_id,
                                const gchar* tab_name);
static gboolean ___lambda252__gsource_func (gpointer self);
static gboolean __lambda253_ (Block46Data* _data46_);
static gboolean ___lambda253__gsource_func (gpointer self);
VALA_EXTERN void widgets_term_toggle_select_all (WidgetsTerm* self);
VALA_EXTERN void utils_hex_to_rgba (const gchar* hex_color,
                        gdouble alpha,
                        GdkRGBA* result);
VALA_EXTERN void widgets_term_login_server (WidgetsTerm* self,
                                const gchar* info);
VALA_EXTERN void utils_touch_dir (const gchar* dir);
VALA_EXTERN gchar* utils_get_config_dir (void);
VALA_EXTERN void utils_create_file (const gchar* file_path);
VALA_EXTERN gchar* utils_get_ssh_script_path (void);
VALA_EXTERN gchar* utils_lookup_password (const gchar* user,
                              const gchar* server_address,
                              const gchar* port);
static void widgets_term_finalize (GObject * obj);
static GType widgets_term_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 gssize _vala_array_length (gpointer array);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
widgets_term_get_instance_private (WidgetsTerm* self)
{
	return G_STRUCT_MEMBER_P (self, WidgetsTerm_private_offset);
}

static GType
widgets_term_drop_targets_get_type_once (void)
{
	static const GEnumValue values[] = {{WIDGETS_TERM_DROP_TARGETS_URILIST, "WIDGETS_TERM_DROP_TARGETS_URILIST", "urilist"}, {WIDGETS_TERM_DROP_TARGETS_STRING, "WIDGETS_TERM_DROP_TARGETS_STRING", "string"}, {WIDGETS_TERM_DROP_TARGETS_TEXT, "WIDGETS_TERM_DROP_TARGETS_TEXT", "text"}, {0, NULL, NULL}};
	GType widgets_term_drop_targets_type_id;
	widgets_term_drop_targets_type_id = g_enum_register_static ("WidgetsTermDropTargets", values);
	return widgets_term_drop_targets_type_id;
}

static GType
widgets_term_drop_targets_get_type (void)
{
	static volatile gsize widgets_term_drop_targets_type_id__once = 0;
	if (g_once_init_enter (&widgets_term_drop_targets_type_id__once)) {
		GType widgets_term_drop_targets_type_id;
		widgets_term_drop_targets_type_id = widgets_term_drop_targets_get_type_once ();
		g_once_init_leave (&widgets_term_drop_targets_type_id__once, widgets_term_drop_targets_type_id);
	}
	return widgets_term_drop_targets_type_id__once;
}

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

static void
__lambda7_ (WidgetsTerm* self,
            VteTerminal* t,
            gint exit_status)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (t != NULL);
	g_print ("Terminal exit with code: %i\n", exit_status);
	if (exit_status == constant_EXIT_CODE_BAD_SMABA) {
		g_signal_emit (self, widgets_term_signals[WIDGETS_TERM_EXIT_WITH_BAD_CODE_SIGNAL], 0, exit_status);
	} else {
		VteTerminal* _tmp0_;
		GtkWidget* _tmp1_;
		self->child_has_exit = TRUE;
		_tmp0_ = self->term;
		_tmp1_ = gtk_widget_get_toplevel ((GtkWidget*) _tmp0_);
		if (g_type_is_a (G_TYPE_FROM_INSTANCE ((GObject*) _tmp1_), WIDGETS_TYPE_CONFIG_WINDOW)) {
			WidgetsConfigWindow* window = NULL;
			VteTerminal* _tmp2_;
			GtkWidget* _tmp3_;
			WidgetsConfigWindow* _tmp4_;
			_tmp2_ = self->term;
			_tmp3_ = gtk_widget_get_toplevel ((GtkWidget*) _tmp2_);
			_tmp4_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, WIDGETS_TYPE_CONFIG_WINDOW, WidgetsConfigWindow));
			window = _tmp4_;
			{
				gboolean _tmp5_ = FALSE;
				gboolean _tmp6_ = FALSE;
				gboolean _tmp7_ = FALSE;
				WidgetsConfigWindow* _tmp8_;
				ConfigConfig* _tmp9_;
				GKeyFile* _tmp10_;
				_tmp8_ = window;
				_tmp9_ = _tmp8_->config;
				_tmp10_ = _tmp9_->config_file;
				_tmp7_ = g_key_file_get_boolean (_tmp10_, "advanced", "print_notify_after_script_finish", &_inner_error0_);
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					goto __catch0_g_error;
				}
				if (_tmp7_) {
					_tmp6_ = widgets_term_is_launch_command (self);
				} else {
					_tmp6_ = FALSE;
				}
				if (_tmp6_) {
					WidgetsWorkspaceManager* _tmp11_;
					_tmp11_ = self->workspace_manager;
					_tmp5_ = widgets_workspace_manager_is_first_term (_tmp11_, self);
				} else {
					_tmp5_ = FALSE;
				}
				if (_tmp5_) {
					widgets_term_print_exit_notify (self);
				} else {
					g_signal_emit (self, widgets_term_signals[WIDGETS_TERM_EXIT_SIGNAL], 0);
				}
			}
			goto __finally0;
			__catch0_g_error:
			{
				GError* e = NULL;
				GError* _tmp12_;
				const gchar* _tmp13_;
				e = _inner_error0_;
				_inner_error0_ = NULL;
				_tmp12_ = e;
				_tmp13_ = _tmp12_->message;
				g_print ("child_exited: %s\n", _tmp13_);
				_g_error_free0 (e);
			}
			__finally0:
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				_g_object_unref0 (window);
				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;
			}
			_g_object_unref0 (window);
		}
	}
}

static void
___lambda7__vte_terminal_child_exited (VteTerminal* _sender,
                                       gint status,
                                       gpointer self)
{
	__lambda7_ ((WidgetsTerm*) self, _sender, status);
}

static void
__lambda9_ (WidgetsTerm* self,
            GtkWidget* t)
{
	g_return_if_fail (t != NULL);
	widgets_term_kill_fg (self);
}

static void
___lambda9__gtk_widget_destroy (GtkWidget* _sender,
                                gpointer self)
{
	__lambda9_ ((WidgetsTerm*) self, _sender);
}

static void
__lambda10_ (WidgetsTerm* self,
             GtkWidget* t)
{
	g_return_if_fail (t != NULL);
	widgets_term_setup_from_config (self);
	widgets_term_focus_term (self);
}

static void
___lambda10__gtk_widget_realize (GtkWidget* _sender,
                                 gpointer self)
{
	__lambda10_ ((WidgetsTerm*) self, _sender);
}

static void
__lambda11_ (WidgetsTerm* self,
             VteTerminal* t)
{
	VteTerminal* _tmp0_;
	GtkWidget* _tmp1_;
	g_return_if_fail (t != NULL);
	widgets_term_update_terminal_title (self);
	_tmp0_ = self->term;
	_tmp1_ = gtk_widget_get_toplevel ((GtkWidget*) _tmp0_);
	if (!g_type_is_a (G_TYPE_FROM_INSTANCE ((GObject*) _tmp1_), WIDGETS_TYPE_CONFIG_WINDOW)) {
		if (self->press_anything) {
			g_signal_emit (self, widgets_term_signals[WIDGETS_TERM_HIGHLIGHT_TAB_SIGNAL], 0);
		}
	}
}

static void
___lambda11__vte_terminal_window_title_changed (VteTerminal* _sender,
                                                gpointer self)
{
	__lambda11_ ((WidgetsTerm*) self, _sender);
}

static gboolean
_widgets_term_on_key_press_gtk_widget_key_press_event (GtkWidget* _sender,
                                                       GdkEventKey* event,
                                                       gpointer self)
{
	gboolean result;
	result = widgets_term_on_key_press ((WidgetsTerm*) self, _sender, event);
	return result;
}

static gboolean
_widgets_term_on_scroll_gtk_widget_scroll_event (GtkWidget* _sender,
                                                 GdkEventScroll* event,
                                                 gpointer self)
{
	gboolean result;
	result = widgets_term_on_scroll ((WidgetsTerm*) self, _sender, event);
	return result;
}

static gboolean
__lambda249_ (WidgetsTerm* self,
              GdkEventButton* event)
{
	gchar* uri = NULL;
	VteTerminal* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	GError* _inner_error0_ = NULL;
	gboolean result;
	g_return_val_if_fail (event != NULL, FALSE);
	self->has_select_all = FALSE;
	_tmp0_ = self->term;
	_tmp1_ = vte_terminal_hyperlink_check_event (_tmp0_, (GdkEvent*) event);
	uri = _tmp1_;
	_tmp2_ = uri;
	if (_tmp2_ == NULL) {
		VteTerminal* _tmp3_;
		gchar* _tmp4_;
		_tmp3_ = self->term;
		_tmp4_ = vte_terminal_match_check_event (_tmp3_, (GdkEvent*) event, NULL);
		_g_free0 (uri);
		uri = _tmp4_;
	}
	switch (event->button) {
		case GDK_BUTTON_PRIMARY:
		{
			gint modifiers = 0;
			gboolean _tmp5_ = FALSE;
			widgets_term_focus_term (self);
			modifiers = (gint) gtk_accelerator_get_default_mod_mask ();
			if ((event->state & modifiers) == GDK_CONTROL_MASK) {
				const gchar* _tmp6_;
				_tmp6_ = uri;
				_tmp5_ = _tmp6_ != NULL;
			} else {
				_tmp5_ = FALSE;
			}
			if (_tmp5_) {
				{
					const gchar* _tmp7_;
					_tmp7_ = uri;
					gtk_show_uri (NULL, (const gchar*) _tmp7_, gtk_get_current_event_time (), &_inner_error0_);
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
						goto __catch0_g_error;
					}
					result = TRUE;
					_g_free0 (uri);
					return result;
				}
				goto __finally0;
				__catch0_g_error:
				{
					g_clear_error (&_inner_error0_);
					{
						const gchar* _tmp8_;
						gchar* _tmp9_;
						const gchar* _tmp10_;
						_tmp8_ = uri;
						_tmp9_ = g_strdup_printf ("http://%s", _tmp8_);
						_g_free0 (uri);
						uri = _tmp9_;
						_tmp10_ = uri;
						gtk_show_uri (NULL, (const gchar*) _tmp10_, gtk_get_current_event_time (), &_inner_error0_);
						if (G_UNLIKELY (_inner_error0_ != NULL)) {
							goto __catch1_g_error;
						}
					}
					goto __finally1;
					__catch1_g_error:
					{
						g_clear_error (&_inner_error0_);
						g_warning ("terminal.vala:181: Could Not Open link");
					}
					__finally1:
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
						gboolean _tmp11_ = FALSE;
						_g_free0 (uri);
						g_critical ("file %s: line %d: unexpected 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 _tmp11_;
					}
				}
				__finally0:
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					gboolean _tmp12_ = FALSE;
					_g_free0 (uri);
					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 _tmp12_;
				}
			}
			result = FALSE;
			_g_free0 (uri);
			return result;
		}
		case GDK_BUTTON_SECONDARY:
		{
			const gchar* _tmp13_;
			gchar* _tmp14_;
			widgets_term_focus_term (self);
			_tmp13_ = uri;
			_tmp14_ = g_strdup (_tmp13_);
			_g_free0 (self->uri_at_right_press);
			self->uri_at_right_press = _tmp14_;
			widgets_term_show_menu (self, (gint) event->x_root, (gint) event->y_root);
			result = FALSE;
			_g_free0 (uri);
			return result;
		}
		default:
		break;
	}
	result = FALSE;
	_g_free0 (uri);
	return result;
}

static gboolean
___lambda249__gtk_widget_button_press_event (GtkWidget* _sender,
                                             GdkEventButton* event,
                                             gpointer self)
{
	gboolean result;
	result = __lambda249_ ((WidgetsTerm*) self, event);
	return result;
}

static gboolean
__lambda250_ (WidgetsTerm* self,
              GdkEventButton* event)
{
	GError* _inner_error0_ = NULL;
	gboolean result;
	g_return_val_if_fail (event != NULL, FALSE);
	{
		WidgetsConfigWindow* window = NULL;
		VteTerminal* _tmp0_;
		GtkWidget* _tmp1_;
		WidgetsConfigWindow* _tmp2_;
		gboolean _tmp3_ = FALSE;
		gboolean _tmp4_ = FALSE;
		ConfigConfig* _tmp5_;
		GKeyFile* _tmp6_;
		_tmp0_ = self->term;
		_tmp1_ = gtk_widget_get_toplevel ((GtkWidget*) _tmp0_);
		_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, WIDGETS_TYPE_CONFIG_WINDOW, WidgetsConfigWindow));
		window = _tmp2_;
		_tmp5_ = window->config;
		_tmp6_ = _tmp5_->config_file;
		_tmp4_ = g_key_file_get_boolean (_tmp6_, "advanced", "copy_on_select", &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_object_unref0 (window);
			goto __catch0_g_error;
		}
		if (_tmp4_) {
			VteTerminal* _tmp7_;
			_tmp7_ = self->term;
			_tmp3_ = vte_terminal_get_has_selection (_tmp7_);
		} else {
			_tmp3_ = FALSE;
		}
		if (_tmp3_) {
			VteTerminal* _tmp8_;
			_tmp8_ = self->term;
			vte_terminal_copy_clipboard (_tmp8_);
		}
		_g_object_unref0 (window);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp9_;
		const gchar* _tmp10_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp9_ = e;
		_tmp10_ = _tmp9_->message;
		g_print ("term button_release_event: %s\n", _tmp10_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		gboolean _tmp11_ = FALSE;
		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 _tmp11_;
	}
	result = FALSE;
	return result;
}

static gboolean
___lambda250__gtk_widget_button_release_event (GtkWidget* _sender,
                                               GdkEventButton* event,
                                               gpointer self)
{
	gboolean result;
	result = __lambda250_ ((WidgetsTerm*) self, event);
	return result;
}

static void
_vala_array_add6 (GtkTargetEntry* * array,
                  gint* length,
                  gint* size,
                  const GtkTargetEntry* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (GtkTargetEntry, *array, *size);
	}
	(*array)[(*length)++] = *value;
}

static void
_vala_array_add7 (GtkTargetEntry* * array,
                  gint* length,
                  gint* size,
                  const GtkTargetEntry* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (GtkTargetEntry, *array, *size);
	}
	(*array)[(*length)++] = *value;
}

static void
_vala_array_add8 (GtkTargetEntry* * array,
                  gint* length,
                  gint* size,
                  const GtkTargetEntry* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (GtkTargetEntry, *array, *size);
	}
	(*array)[(*length)++] = *value;
}

static void
_widgets_term_drag_received_gtk_widget_drag_data_received (GtkWidget* _sender,
                                                           GdkDragContext* context,
                                                           gint x,
                                                           gint y,
                                                           GtkSelectionData* selection_data,
                                                           guint info,
                                                           guint time_,
                                                           gpointer self)
{
	widgets_term_drag_received ((WidgetsTerm*) self, context, x, y, selection_data, info, time_);
}

static gboolean
__lambda256_ (WidgetsTerm* self,
              GtkWidget* w,
              GdkEventButton* e)
{
	gboolean result;
	g_return_val_if_fail (w != NULL, FALSE);
	g_return_val_if_fail (e != NULL, FALSE);
	self->is_press_scrollbar = TRUE;
	result = FALSE;
	return result;
}

static gboolean
___lambda256__gtk_widget_button_press_event (GtkWidget* _sender,
                                             GdkEventButton* event,
                                             gpointer self)
{
	gboolean result;
	result = __lambda256_ ((WidgetsTerm*) self, _sender, event);
	return result;
}

static gboolean
__lambda257_ (WidgetsTerm* self,
              GtkWidget* w,
              GdkEventButton* e)
{
	gboolean result;
	g_return_val_if_fail (w != NULL, FALSE);
	g_return_val_if_fail (e != NULL, FALSE);
	self->is_press_scrollbar = FALSE;
	result = FALSE;
	return result;
}

static gboolean
___lambda257__gtk_widget_button_release_event (GtkWidget* _sender,
                                               GdkEventButton* event,
                                               gpointer self)
{
	gboolean result;
	result = __lambda257_ ((WidgetsTerm*) self, _sender, event);
	return result;
}

static void
__lambda258_ (WidgetsTerm* self)
{
	GtkAdjustment* adj = NULL;
	GtkScrollbar* _tmp0_;
	GtkAdjustment* _tmp1_;
	GtkAdjustment* _tmp2_;
	GtkAdjustment* _tmp3_;
	GtkAdjustment* _tmp4_;
	GtkAdjustment* _tmp5_;
	_tmp0_ = self->scrollbar;
	_tmp1_ = gtk_range_get_adjustment ((GtkRange*) _tmp0_);
	_tmp2_ = _g_object_ref0 (_tmp1_);
	adj = _tmp2_;
	_tmp3_ = adj;
	_tmp4_ = adj;
	_tmp5_ = adj;
	if (gtk_adjustment_get_upper (_tmp3_) == (gtk_adjustment_get_lower (_tmp4_) + gtk_adjustment_get_page_size (_tmp5_))) {
		GtkScrollbar* _tmp6_;
		_tmp6_ = self->scrollbar;
		gtk_widget_set_child_visible ((GtkWidget*) _tmp6_, FALSE);
	} else {
		GtkScrollbar* _tmp7_;
		_tmp7_ = self->scrollbar;
		gtk_widget_set_child_visible ((GtkWidget*) _tmp7_, TRUE);
		widgets_term_try_hide_scrollbar (self);
	}
	_g_object_unref0 (adj);
}

static void
___lambda258__gtk_range_value_changed (GtkRange* _sender,
                                       gpointer self)
{
	__lambda258_ ((WidgetsTerm*) self);
}

static gboolean
__lambda260_ (WidgetsTerm* self,
              GtkWidget* w,
              GdkEventMotion* e)
{
	GtkAllocation rect = {0};
	GtkAllocation _tmp0_ = {0};
	GtkAllocation _tmp1_;
	gboolean result;
	g_return_val_if_fail (w != NULL, FALSE);
	g_return_val_if_fail (e != NULL, FALSE);
	gtk_widget_get_allocation (w, &_tmp0_);
	rect = _tmp0_;
	_tmp1_ = rect;
	if (e->x < ((gdouble) (_tmp1_.width - self->hide_scrollbar_offset))) {
		widgets_term_try_hide_scrollbar (self);
	} else {
		GtkAllocation _tmp2_;
		_tmp2_ = rect;
		if (e->x > ((gdouble) (_tmp2_.width - self->show_scrollbar_offset))) {
			GtkAdjustment* adj = NULL;
			GtkScrollbar* _tmp3_;
			GtkAdjustment* _tmp4_;
			GtkAdjustment* _tmp5_;
			GtkAdjustment* _tmp6_;
			GtkAdjustment* _tmp7_;
			GtkAdjustment* _tmp8_;
			_tmp3_ = self->scrollbar;
			_tmp4_ = gtk_range_get_adjustment ((GtkRange*) _tmp3_);
			_tmp5_ = _g_object_ref0 (_tmp4_);
			adj = _tmp5_;
			_tmp6_ = adj;
			_tmp7_ = adj;
			_tmp8_ = adj;
			if (gtk_adjustment_get_upper (_tmp6_) != (gtk_adjustment_get_lower (_tmp7_) + gtk_adjustment_get_page_size (_tmp8_))) {
				GtkScrollbar* _tmp9_;
				_tmp9_ = self->scrollbar;
				gtk_widget_set_child_visible ((GtkWidget*) _tmp9_, TRUE);
			}
			_g_object_unref0 (adj);
		}
	}
	result = FALSE;
	return result;
}

static gboolean
___lambda260__gtk_widget_motion_notify_event (GtkWidget* _sender,
                                              GdkEventMotion* event,
                                              gpointer self)
{
	gboolean result;
	result = __lambda260_ ((WidgetsTerm*) self, _sender, event);
	return result;
}

WidgetsTerm*
widgets_term_construct (GType object_type,
                        gboolean first_term,
                        const gchar* work_directory,
                        WidgetsWorkspaceManager* manager)
{
	WidgetsTerm * self = NULL;
	WidgetsWorkspaceManager* _tmp0_;
	GeeArrayList* _tmp1_;
	VteTerminal* _tmp2_;
	GKeyFile* _tmp3_;
	VteTerminal* _tmp4_;
	VteTerminal* _tmp5_;
	VteTerminal* _tmp6_;
	VteTerminal* _tmp7_;
	VteTerminal* _tmp8_;
	VteTerminal* _tmp9_;
	VteTerminal* _tmp10_;
	VteTerminal* _tmp11_;
	GtkTargetEntry uri_entry = {0};
	GtkTargetEntry _tmp12_ = {0};
	GtkTargetEntry string_entry = {0};
	GtkTargetEntry _tmp13_ = {0};
	GtkTargetEntry text_entry = {0};
	GtkTargetEntry _tmp14_ = {0};
	GtkTargetEntry* targets = NULL;
	GtkTargetEntry* _tmp15_;
	gint targets_length1;
	gint _targets_size_;
	GtkTargetEntry _tmp16_;
	GtkTargetEntry _tmp17_;
	GtkTargetEntry _tmp18_;
	GtkTargetEntry* _tmp19_;
	gint _tmp19__length1;
	gchar** _tmp20_;
	gint _tmp20__length1;
	gboolean _tmp21_ = FALSE;
	VteTerminal* _tmp24_;
	VteTerminal* _tmp25_;
	GtkAdjustment* _tmp26_;
	GtkScrollbar* _tmp27_;
	GtkScrollbar* _tmp28_;
	GtkScrollbar* _tmp29_;
	GtkScrollbar* _tmp30_;
	GtkScrollbar* _tmp31_;
	GtkScrollbar* _tmp32_;
	VteTerminal* _tmp33_;
	GtkScrollbar* _tmp34_;
	g_return_val_if_fail (manager != NULL, NULL);
	self = (WidgetsTerm*) g_object_new (object_type, NULL);
	bindtextdomain (GETTEXT_PACKAGE, "/usr/share/locale");
	_tmp0_ = _g_object_ref0 (manager);
	_g_object_unref0 (self->workspace_manager);
	self->workspace_manager = _tmp0_;
	self->is_first_term = first_term;
	_tmp1_ = gee_array_list_new (G_TYPE_INT, NULL, NULL, NULL, NULL, NULL);
	_g_object_unref0 (self->command_execute_y_coordinates);
	self->command_execute_y_coordinates = _tmp1_;
	_tmp2_ = (VteTerminal*) vte_terminal_new ();
	g_object_ref_sink (_tmp2_);
	_g_object_unref0 (self->term);
	self->term = _tmp2_;
	_tmp3_ = g_key_file_new ();
	_g_key_file_unref0 (self->search_engine_config_file);
	self->search_engine_config_file = _tmp3_;
	_tmp4_ = self->term;
	g_signal_connect_object (_tmp4_, "child-exited", (GCallback) ___lambda7__vte_terminal_child_exited, self, 0);
	_tmp5_ = self->term;
	g_signal_connect_object ((GtkWidget*) _tmp5_, "destroy", (GCallback) ___lambda9__gtk_widget_destroy, self, 0);
	_tmp6_ = self->term;
	g_signal_connect_object ((GtkWidget*) _tmp6_, "realize", (GCallback) ___lambda10__gtk_widget_realize, self, 0);
	_tmp7_ = self->term;
	g_signal_connect_object (_tmp7_, "window-title-changed", (GCallback) ___lambda11__vte_terminal_window_title_changed, self, 0);
	_tmp8_ = self->term;
	g_signal_connect_object ((GtkWidget*) _tmp8_, "key-press-event", (GCallback) _widgets_term_on_key_press_gtk_widget_key_press_event, self, 0);
	_tmp9_ = self->term;
	g_signal_connect_object ((GtkWidget*) _tmp9_, "scroll-event", (GCallback) _widgets_term_on_scroll_gtk_widget_scroll_event, self, 0);
	_tmp10_ = self->term;
	g_signal_connect_object ((GtkWidget*) _tmp10_, "button-press-event", (GCallback) ___lambda249__gtk_widget_button_press_event, self, 0);
	_tmp11_ = self->term;
	g_signal_connect_object ((GtkWidget*) _tmp11_, "button-release-event", (GCallback) ___lambda250__gtk_widget_button_release_event, self, 0);
	_tmp12_.target = "text/uri-list";
	_tmp12_.flags = (guint) GTK_TARGET_OTHER_APP;
	_tmp12_.info = (guint) WIDGETS_TERM_DROP_TARGETS_URILIST;
	uri_entry = _tmp12_;
	_tmp13_.target = "STRING";
	_tmp13_.flags = (guint) GTK_TARGET_OTHER_APP;
	_tmp13_.info = (guint) WIDGETS_TERM_DROP_TARGETS_STRING;
	string_entry = _tmp13_;
	_tmp14_.target = "text/plain";
	_tmp14_.flags = (guint) GTK_TARGET_OTHER_APP;
	_tmp14_.info = (guint) WIDGETS_TERM_DROP_TARGETS_TEXT;
	text_entry = _tmp14_;
	_tmp15_ = g_new0 (GtkTargetEntry, 0);
	targets = _tmp15_;
	targets_length1 = 0;
	_targets_size_ = targets_length1;
	_tmp16_ = uri_entry;
	_vala_array_add6 (&targets, &targets_length1, &_targets_size_, &_tmp16_);
	_tmp17_ = string_entry;
	_vala_array_add7 (&targets, &targets_length1, &_targets_size_, &_tmp17_);
	_tmp18_ = text_entry;
	_vala_array_add8 (&targets, &targets_length1, &_targets_size_, &_tmp18_);
	_tmp19_ = targets;
	_tmp19__length1 = targets_length1;
	gtk_drag_dest_set ((GtkWidget*) self, GTK_DEST_DEFAULT_ALL, _tmp19_, (gint) _tmp19__length1, GDK_ACTION_COPY);
	g_signal_connect_object ((GtkWidget*) self, "drag-data-received", (GCallback) _widgets_term_drag_received_gtk_widget_drag_data_received, self, 0);
	_tmp20_ = widgets_term_REGEX_STRINGS;
	_tmp20__length1 = widgets_term_REGEX_STRINGS_length1;
	widgets_term_clickable (self, _tmp20_, (gint) _tmp20__length1);
	if (widgets_term_is_launch_command (self)) {
		WidgetsWorkspaceManager* _tmp22_;
		_tmp22_ = self->workspace_manager;
		_tmp21_ = widgets_workspace_manager_is_first_term (_tmp22_, self);
	} else {
		_tmp21_ = FALSE;
	}
	if (_tmp21_) {
		GeeArrayList* _tmp23_;
		_tmp23_ = application_commands;
		widgets_term_launch_command (self, _tmp23_, work_directory);
	} else {
		widgets_term_launch_shell (self, work_directory);
	}
	_tmp24_ = self->term;
	gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp24_);
	_tmp25_ = self->term;
	_tmp26_ = gtk_scrollable_get_vadjustment ((GtkScrollable*) _tmp25_);
	_tmp27_ = (GtkScrollbar*) gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, _tmp26_);
	g_object_ref_sink (_tmp27_);
	_g_object_unref0 (self->scrollbar);
	self->scrollbar = _tmp27_;
	_tmp28_ = self->scrollbar;
	gtk_widget_set_halign ((GtkWidget*) _tmp28_, GTK_ALIGN_END);
	_tmp29_ = self->scrollbar;
	gtk_widget_set_child_visible ((GtkWidget*) _tmp29_, FALSE);
	_tmp30_ = self->scrollbar;
	g_signal_connect_object ((GtkWidget*) _tmp30_, "button-press-event", (GCallback) ___lambda256__gtk_widget_button_press_event, self, 0);
	_tmp31_ = self->scrollbar;
	g_signal_connect_object ((GtkWidget*) _tmp31_, "button-release-event", (GCallback) ___lambda257__gtk_widget_button_release_event, self, 0);
	_tmp32_ = self->scrollbar;
	g_signal_connect_object ((GtkRange*) _tmp32_, "value-changed", (GCallback) ___lambda258__gtk_range_value_changed, self, 0);
	_tmp33_ = self->term;
	g_signal_connect_object ((GtkWidget*) _tmp33_, "motion-notify-event", (GCallback) ___lambda260__gtk_widget_motion_notify_event, self, 0);
	_tmp34_ = self->scrollbar;
	gtk_overlay_add_overlay ((GtkOverlay*) self, (GtkWidget*) _tmp34_);
	targets = (g_free (targets), NULL);
	return self;
}

WidgetsTerm*
widgets_term_new (gboolean first_term,
                  const gchar* work_directory,
                  WidgetsWorkspaceManager* manager)
{
	return widgets_term_construct (WIDGETS_TYPE_TERM, first_term, work_directory, manager);
}

static gboolean
___lambda259_ (WidgetsTerm* self)
{
	gboolean result;
	if (!self->is_press_scrollbar) {
		GtkScrollbar* _tmp0_;
		_tmp0_ = self->scrollbar;
		gtk_widget_set_child_visible ((GtkWidget*) _tmp0_, FALSE);
	}
	_g_free0 (self->hide_scrollbar_timeout_source_id);
	self->hide_scrollbar_timeout_source_id = NULL;
	result = FALSE;
	return result;
}

static gboolean
____lambda259__gsource_func (gpointer self)
{
	gboolean result;
	result = ___lambda259_ ((WidgetsTerm*) self);
	return result;
}

static guint*
_uint_dup (guint* self)
{
	guint* dup;
	dup = g_new0 (guint, 1);
	memcpy (dup, self, sizeof (guint));
	return dup;
}

static gpointer
__uint_dup0 (gpointer self)
{
	return self ? _uint_dup (self) : NULL;
}

void
widgets_term_try_hide_scrollbar (WidgetsTerm* self)
{
	guint* _tmp0_;
	guint* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->hide_scrollbar_timeout_source_id;
	if (_tmp0_ != NULL) {
		guint* _tmp1_;
		_tmp1_ = self->hide_scrollbar_timeout_source_id;
		g_source_remove (*_tmp1_);
		_g_free0 (self->hide_scrollbar_timeout_source_id);
		self->hide_scrollbar_timeout_source_id = NULL;
	}
	_tmp2_ = self->hide_scrollbar_timeout_source_id;
	if (_tmp2_ == NULL) {
		guint _tmp3_;
		guint* _tmp4_;
		_tmp3_ = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 3000, ____lambda259__gsource_func, g_object_ref (self), g_object_unref);
		_tmp4_ = __uint_dup0 (&_tmp3_);
		_g_free0 (self->hide_scrollbar_timeout_source_id);
		self->hide_scrollbar_timeout_source_id = _tmp4_;
	}
}

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 gboolean
_vala_string_array_contains (gchar* * stack,
                             gssize stack_length,
                             const gchar* needle)
{
	gssize i;
	for (i = 0; i < stack_length; i++) {
		if (g_strcmp0 (stack[i], needle) == 0) {
			return TRUE;
		}
	}
	return FALSE;
}

gboolean
widgets_term_is_in_remote_server (WidgetsTerm* self)
{
	gboolean in_remote_server = FALSE;
	gint foreground_pid = 0;
	gboolean has_foreground_process = FALSE;
	gint _tmp0_ = 0;
	gboolean _tmp1_;
	GError* _inner_error0_ = NULL;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	in_remote_server = FALSE;
	_tmp1_ = widgets_term_try_get_foreground_pid (self, &_tmp0_);
	foreground_pid = _tmp0_;
	has_foreground_process = _tmp1_;
	if (has_foreground_process) {
		{
			WidgetsConfigWindow* window = NULL;
			VteTerminal* _tmp2_;
			GtkWidget* _tmp3_;
			WidgetsConfigWindow* _tmp4_;
			gchar* command = NULL;
			gchar* _tmp5_;
			gchar* _tmp6_;
			gchar* _tmp7_;
			gchar* _tmp8_;
			gchar* _tmp9_;
			gchar* _tmp10_;
			gchar* remote_commands = NULL;
			WidgetsConfigWindow* _tmp11_;
			ConfigConfig* _tmp12_;
			GKeyFile* _tmp13_;
			gchar* _tmp14_;
			const gchar* _tmp15_;
			const gchar* _tmp16_;
			gchar** _tmp17_;
			gchar** _tmp18_;
			gchar** _tmp19_;
			gint _tmp19__length1;
			gboolean _tmp20_;
			_tmp2_ = self->term;
			_tmp3_ = gtk_widget_get_toplevel ((GtkWidget*) _tmp2_);
			_tmp4_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, WIDGETS_TYPE_CONFIG_WINDOW, WidgetsConfigWindow));
			window = _tmp4_;
			_tmp5_ = g_strdup_printf ("/proc/%i/comm", foreground_pid);
			_tmp6_ = _tmp5_;
			_tmp7_ = utils_get_proc_file_content (_tmp6_);
			_tmp8_ = _tmp7_;
			_tmp9_ = string_strip (_tmp8_);
			_tmp10_ = _tmp9_;
			_g_free0 (_tmp8_);
			_g_free0 (_tmp6_);
			command = _tmp10_;
			_tmp11_ = window;
			_tmp12_ = _tmp11_->config;
			_tmp13_ = _tmp12_->config_file;
			_tmp14_ = g_key_file_get_string (_tmp13_, "advanced", "remote_commands", &_inner_error0_);
			remote_commands = _tmp14_;
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				_g_free0 (command);
				_g_object_unref0 (window);
				goto __catch0_g_error;
			}
			_tmp15_ = command;
			_tmp16_ = remote_commands;
			_tmp18_ = _tmp17_ = g_strsplit (_tmp16_, ";", 0);
			_tmp19_ = _tmp18_;
			_tmp19__length1 = _vala_array_length (_tmp17_);
			_tmp20_ = _vala_string_array_contains (_tmp19_, _vala_array_length (_tmp17_), _tmp15_);
			_tmp19_ = (_vala_array_free (_tmp19_, _tmp19__length1, (GDestroyNotify) g_free), NULL);
			if (_tmp20_) {
				in_remote_server = TRUE;
			} else {
				const gchar* _tmp21_;
				_tmp21_ = command;
				if (g_strcmp0 (_tmp21_, "expect") == 0) {
					gchar** cmdline = NULL;
					gchar* _tmp22_;
					gchar* _tmp23_;
					gchar* _tmp24_;
					gchar* _tmp25_;
					gchar* _tmp26_;
					gchar* _tmp27_;
					gchar** _tmp28_;
					gchar** _tmp29_;
					gchar** _tmp30_;
					gint _tmp30__length1;
					gint cmdline_length1;
					gint _cmdline_size_;
					gboolean _tmp31_ = FALSE;
					gboolean _tmp32_ = FALSE;
					gchar** _tmp33_;
					gint _tmp33__length1;
					_tmp22_ = g_strdup_printf ("/proc/%i/cmdline", foreground_pid);
					_tmp23_ = _tmp22_;
					_tmp24_ = utils_get_proc_file_content (_tmp23_);
					_tmp25_ = _tmp24_;
					_tmp26_ = string_strip (_tmp25_);
					_tmp27_ = _tmp26_;
					_tmp29_ = _tmp28_ = g_strsplit (_tmp27_, " ", 0);
					_tmp30_ = _tmp29_;
					_tmp30__length1 = _vala_array_length (_tmp28_);
					_g_free0 (_tmp27_);
					_g_free0 (_tmp25_);
					_g_free0 (_tmp23_);
					cmdline = _tmp30_;
					cmdline_length1 = _tmp30__length1;
					_cmdline_size_ = cmdline_length1;
					_tmp33_ = cmdline;
					_tmp33__length1 = cmdline_length1;
					if (_tmp33__length1 == 3) {
						gchar** _tmp34_;
						gint _tmp34__length1;
						const gchar* _tmp35_;
						_tmp34_ = cmdline;
						_tmp34__length1 = cmdline_length1;
						_tmp35_ = _tmp34_[1];
						_tmp32_ = g_strcmp0 (_tmp35_, "-f") == 0;
					} else {
						_tmp32_ = FALSE;
					}
					if (_tmp32_) {
						gchar** _tmp36_;
						gint _tmp36__length1;
						const gchar* _tmp37_;
						const gchar* _tmp38_;
						_tmp36_ = cmdline;
						_tmp36__length1 = cmdline_length1;
						_tmp37_ = _tmp36_[2];
						_tmp38_ = self->expect_file_path;
						_tmp31_ = g_strcmp0 (_tmp37_, _tmp38_) == 0;
					} else {
						_tmp31_ = FALSE;
					}
					if (_tmp31_) {
						in_remote_server = TRUE;
					}
					cmdline = (_vala_array_free (cmdline, cmdline_length1, (GDestroyNotify) g_free), NULL);
				}
			}
			_g_free0 (remote_commands);
			_g_free0 (command);
			_g_object_unref0 (window);
		}
		goto __finally0;
		__catch0_g_error:
		{
			GError* e = NULL;
			GError* _tmp39_;
			const gchar* _tmp40_;
			e = _inner_error0_;
			_inner_error0_ = NULL;
			_tmp39_ = e;
			_tmp40_ = _tmp39_->message;
			g_print ("is_in_remote_server: %s\n", _tmp40_);
			_g_error_free0 (e);
		}
		__finally0:
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			gboolean _tmp41_ = FALSE;
			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 _tmp41_;
		}
	}
	result = in_remote_server;
	return result;
}

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
_widgets_term_handle_menu_item_click_menu_menu_click_item (MenuMenu* _sender,
                                                           const gchar* item_id,
                                                           gpointer self)
{
	widgets_term_handle_menu_item_click ((WidgetsTerm*) self, item_id);
}

static void
_widgets_term_handle_menu_destroy_menu_menu_destroy (MenuMenu* _sender,
                                                     gpointer self)
{
	widgets_term_handle_menu_destroy ((WidgetsTerm*) self);
}

void
widgets_term_show_menu (WidgetsTerm* self,
                        gint x,
                        gint y)
{
	gboolean in_quake_window = FALSE;
	GtkWidget* _tmp0_;
	gboolean display_first_spliter = FALSE;
	GList* menu_content = NULL;
	VteTerminal* _tmp5_;
	VteTerminal* _tmp11_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	gboolean _tmp17_;
	MenuMenuItem* _tmp23_;
	MenuMenuItem* _tmp24_;
	MenuMenuItem* _tmp25_;
	WidgetsWorkspaceManager* _tmp26_;
	WidgetsWorkspace* _tmp27_;
	GeeArrayList* _tmp28_;
	gint _tmp29_;
	gint _tmp30_;
	MenuMenuItem* _tmp32_;
	MenuMenuItem* _tmp33_;
	MenuMenuItem* _tmp34_;
	MenuMenuItem* _tmp40_;
	MenuMenuItem* _tmp41_;
	VteTerminal* _tmp42_;
	MenuMenuItem* _tmp94_;
	MenuMenuItem* _tmp95_;
	MenuMenuItem* _tmp96_;
	MenuMenuItem* _tmp97_;
	MenuMenuItem* _tmp98_;
	MenuMenuItem* _tmp99_;
	MenuMenuItem* _tmp103_;
	MenuMenuItem* _tmp104_;
	WidgetsWindow* window = NULL;
	GtkWidget* _tmp105_;
	WidgetsWindow* _tmp106_;
	MenuMenu* _tmp107_;
	MenuMenu* _tmp108_;
	MenuMenu* _tmp109_;
	gboolean _tmp110_ = FALSE;
	ConfigConfig* _tmp111_;
	GKeyFile* _tmp112_;
	MenuMenu* _tmp113_;
	MenuMenu* _tmp114_;
	GList* _tmp115_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = gtk_widget_get_toplevel ((GtkWidget*) self);
	in_quake_window = g_type_is_a (G_TYPE_FROM_INSTANCE ((GObject*) _tmp0_), WIDGETS_TYPE_QUAKE_WINDOW);
	if (in_quake_window) {
		WidgetsConfigWindow* window = NULL;
		VteTerminal* _tmp1_;
		GtkWidget* _tmp2_;
		WidgetsConfigWindow* _tmp3_;
		WidgetsConfigWindow* _tmp4_;
		_tmp1_ = self->term;
		_tmp2_ = gtk_widget_get_toplevel ((GtkWidget*) _tmp1_);
		_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, WIDGETS_TYPE_CONFIG_WINDOW, WidgetsConfigWindow));
		window = _tmp3_;
		_tmp4_ = window;
		_tmp4_->show_quake_menu = TRUE;
		_g_object_unref0 (window);
	}
	display_first_spliter = FALSE;
	menu_content = NULL;
	_tmp5_ = self->term;
	if (vte_terminal_get_has_selection (_tmp5_)) {
		MenuMenuItem* _tmp6_;
		_tmp6_ = menu_menu_item_new ("copy", _ ("Copy"));
		menu_content = g_list_append (menu_content, _tmp6_);
		display_first_spliter = TRUE;
	} else {
		const gchar* _tmp7_;
		_tmp7_ = self->uri_at_right_press;
		if (_tmp7_ != NULL) {
			MenuMenuItem* _tmp8_;
			MenuMenuItem* _tmp9_;
			_tmp8_ = menu_menu_item_new ("open", _ ("Open link"));
			menu_content = g_list_append (menu_content, _tmp8_);
			_tmp9_ = menu_menu_item_new ("copy", _ ("Copy link"));
			menu_content = g_list_append (menu_content, _tmp9_);
			display_first_spliter = TRUE;
		}
	}
	if (widgets_term_clipboard_has_context (self)) {
		MenuMenuItem* _tmp10_;
		_tmp10_ = menu_menu_item_new ("paste", _ ("Paste"));
		menu_content = g_list_append (menu_content, _tmp10_);
		display_first_spliter = TRUE;
	}
	_tmp11_ = self->term;
	if (vte_terminal_get_has_selection (_tmp11_)) {
		gchar* selection_file = NULL;
		gchar* _tmp12_;
		const gchar* _tmp13_;
		_tmp12_ = widgets_term_get_selection_file (self);
		selection_file = _tmp12_;
		_tmp13_ = selection_file;
		if (_tmp13_ != NULL) {
			MenuMenuItem* _tmp14_;
			_tmp14_ = menu_menu_item_new ("open", _ ("Open"));
			menu_content = g_list_append (menu_content, _tmp14_);
		}
		display_first_spliter = TRUE;
		_g_free0 (selection_file);
	}
	_tmp15_ = widgets_term_get_cwd (self);
	_tmp16_ = _tmp15_;
	_tmp17_ = g_strcmp0 (_tmp16_, "") != 0;
	_g_free0 (_tmp16_);
	if (_tmp17_) {
		GFile* dir_file = NULL;
		const gchar* _tmp18_;
		GFile* _tmp19_;
		GFile* _tmp20_;
		_tmp18_ = self->current_dir;
		_tmp19_ = g_file_new_for_path (_tmp18_);
		dir_file = _tmp19_;
		_tmp20_ = dir_file;
		if (g_file_query_exists (_tmp20_, NULL)) {
			MenuMenuItem* _tmp21_;
			_tmp21_ = menu_menu_item_new ("open_in_filemanager", _ ("Open in file manager"));
			menu_content = g_list_append (menu_content, _tmp21_);
		}
		display_first_spliter = TRUE;
		_g_object_unref0 (dir_file);
	}
	if (display_first_spliter) {
		MenuMenuItem* _tmp22_;
		_tmp22_ = menu_menu_item_new ("", "");
		menu_content = g_list_append (menu_content, _tmp22_);
	}
	_tmp23_ = menu_menu_item_new ("horizontal_split", _ ("Horizontal split"));
	menu_content = g_list_append (menu_content, _tmp23_);
	_tmp24_ = menu_menu_item_new ("vertical_split", _ ("Vertical split"));
	menu_content = g_list_append (menu_content, _tmp24_);
	_tmp25_ = menu_menu_item_new ("close_window", _ ("Close window"));
	menu_content = g_list_append (menu_content, _tmp25_);
	_tmp26_ = self->workspace_manager;
	_tmp27_ = _tmp26_->focus_workspace;
	_tmp28_ = _tmp27_->term_list;
	_tmp29_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp28_);
	_tmp30_ = _tmp29_;
	if (_tmp30_ > 1) {
		MenuMenuItem* _tmp31_;
		_tmp31_ = menu_menu_item_new ("close_other_windows", _ ("Close other windows"));
		menu_content = g_list_append (menu_content, _tmp31_);
	}
	_tmp32_ = menu_menu_item_new ("", "");
	menu_content = g_list_append (menu_content, _tmp32_);
	_tmp33_ = menu_menu_item_new ("new_workspace", _ ("New workspace"));
	menu_content = g_list_append (menu_content, _tmp33_);
	_tmp34_ = menu_menu_item_new ("", "");
	menu_content = g_list_append (menu_content, _tmp34_);
	if (!in_quake_window) {
		WidgetsWindow* window = NULL;
		GtkWidget* _tmp35_;
		WidgetsWindow* _tmp36_;
		WidgetsWindow* _tmp37_;
		_tmp35_ = gtk_widget_get_toplevel ((GtkWidget*) self);
		_tmp36_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp35_, WIDGETS_TYPE_WINDOW, WidgetsWindow));
		window = _tmp36_;
		_tmp37_ = window;
		if (widgets_config_window_window_is_fullscreen ((WidgetsConfigWindow*) _tmp37_)) {
			MenuMenuItem* _tmp38_;
			_tmp38_ = menu_menu_item_new ("quit_fullscreen", _ ("Exit fullscreen"));
			menu_content = g_list_append (menu_content, _tmp38_);
		} else {
			MenuMenuItem* _tmp39_;
			_tmp39_ = menu_menu_item_new ("fullscreen", _ ("Fullscreen"));
			menu_content = g_list_append (menu_content, _tmp39_);
		}
		_g_object_unref0 (window);
	}
	_tmp40_ = menu_menu_item_new ("find", _ ("Find"));
	menu_content = g_list_append (menu_content, _tmp40_);
	_tmp41_ = menu_menu_item_new ("", "");
	menu_content = g_list_append (menu_content, _tmp41_);
	_tmp42_ = self->term;
	if (vte_terminal_get_has_selection (_tmp42_)) {
		MenuMenuItem* online_search = NULL;
		MenuMenuItem* _tmp43_;
		MenuMenuItem* _tmp44_;
		MenuMenuItem* _tmp45_;
		MenuMenuItem* _tmp46_;
		MenuMenuItem* _tmp47_;
		MenuMenuItem* _tmp48_;
		MenuMenuItem* _tmp49_;
		gchar* lang = NULL;
		const gchar* _tmp50_;
		gchar* _tmp51_;
		gboolean _tmp52_ = FALSE;
		const gchar* _tmp53_;
		MenuMenuItem* _tmp58_;
		MenuMenuItem* _tmp59_;
		MenuMenuItem* _tmp60_;
		MenuMenuItem* _tmp61_;
		MenuMenuItem* _tmp62_;
		MenuMenuItem* _tmp63_;
		MenuMenuItem* _tmp64_;
		MenuMenuItem* _tmp65_;
		MenuMenuItem* _tmp66_;
		GFile* file = NULL;
		const gchar* _tmp67_;
		GFile* _tmp68_;
		GFile* _tmp69_;
		MenuMenuItem* _tmp92_;
		MenuMenuItem* _tmp93_;
		_tmp43_ = menu_menu_item_new ("search", _ ("Search"));
		online_search = _tmp43_;
		_tmp44_ = online_search;
		_tmp45_ = menu_menu_item_new ("google", "Google");
		_tmp46_ = _tmp45_;
		menu_menu_item_add_submenu_item (_tmp44_, _tmp46_);
		_g_object_unref0 (_tmp46_);
		_tmp47_ = online_search;
		_tmp48_ = menu_menu_item_new ("bing", "Bing");
		_tmp49_ = _tmp48_;
		menu_menu_item_add_submenu_item (_tmp47_, _tmp49_);
		_g_object_unref0 (_tmp49_);
		_tmp50_ = g_getenv ("LANG");
		_tmp51_ = g_strdup (_tmp50_);
		lang = _tmp51_;
		_tmp53_ = lang;
		if (_tmp53_ != NULL) {
			const gchar* _tmp54_;
			_tmp54_ = lang;
			_tmp52_ = g_strcmp0 (_tmp54_, "zh_CN.UTF-8") == 0;
		} else {
			_tmp52_ = FALSE;
		}
		if (_tmp52_) {
			MenuMenuItem* _tmp55_;
			MenuMenuItem* _tmp56_;
			MenuMenuItem* _tmp57_;
			_tmp55_ = online_search;
			_tmp56_ = menu_menu_item_new ("baidu", "Baidu");
			_tmp57_ = _tmp56_;
			menu_menu_item_add_submenu_item (_tmp55_, _tmp57_);
			_g_object_unref0 (_tmp57_);
		}
		_tmp58_ = online_search;
		_tmp59_ = menu_menu_item_new ("github", "Github");
		_tmp60_ = _tmp59_;
		menu_menu_item_add_submenu_item (_tmp58_, _tmp60_);
		_g_object_unref0 (_tmp60_);
		_tmp61_ = online_search;
		_tmp62_ = menu_menu_item_new ("stackoverflow", "Stack Overflow");
		_tmp63_ = _tmp62_;
		menu_menu_item_add_submenu_item (_tmp61_, _tmp63_);
		_g_object_unref0 (_tmp63_);
		_tmp64_ = online_search;
		_tmp65_ = menu_menu_item_new ("duckduckgo", "DuckDuckGo");
		_tmp66_ = _tmp65_;
		menu_menu_item_add_submenu_item (_tmp64_, _tmp66_);
		_g_object_unref0 (_tmp66_);
		_tmp67_ = self->search_engine_config_file_path;
		_tmp68_ = g_file_new_for_path (_tmp67_);
		file = _tmp68_;
		_tmp69_ = file;
		if (g_file_query_exists (_tmp69_, NULL)) {
			{
				GKeyFile* _tmp70_;
				const gchar* _tmp71_;
				GKeyFile* _tmp72_;
				gsize _tmp73_ = 0;
				gchar** _tmp74_;
				_tmp70_ = self->search_engine_config_file;
				_tmp71_ = self->search_engine_config_file_path;
				g_key_file_load_from_file (_tmp70_, _tmp71_, G_KEY_FILE_NONE, &_inner_error0_);
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					goto __catch0_g_error;
				}
				_tmp72_ = self->search_engine_config_file;
				_tmp74_ = g_key_file_get_groups (_tmp72_, &_tmp73_);
				{
					gchar** option_collection = NULL;
					gint option_collection_length1 = 0;
					gint _option_collection_size_ = 0;
					gint option_it = 0;
					option_collection = _tmp74_;
					option_collection_length1 = _tmp73_;
					for (option_it = 0; option_it < option_collection_length1; option_it = option_it + 1) {
						const gchar* option = NULL;
						option = option_collection[option_it];
						{
							gchar* search_engine_name = NULL;
							GKeyFile* _tmp75_;
							const gchar* _tmp76_;
							gchar* _tmp77_;
							gchar* search_engine_api = NULL;
							GKeyFile* _tmp78_;
							const gchar* _tmp79_;
							gchar* _tmp80_;
							gboolean _tmp81_ = FALSE;
							const gchar* _tmp82_;
							_tmp75_ = self->search_engine_config_file;
							_tmp76_ = option;
							_tmp77_ = g_key_file_get_value (_tmp75_, _tmp76_, "name", &_inner_error0_);
							search_engine_name = _tmp77_;
							if (G_UNLIKELY (_inner_error0_ != NULL)) {
								option_collection = (_vala_array_free (option_collection, option_collection_length1, (GDestroyNotify) g_free), NULL);
								goto __catch0_g_error;
							}
							_tmp78_ = self->search_engine_config_file;
							_tmp79_ = option;
							_tmp80_ = g_key_file_get_value (_tmp78_, _tmp79_, "api", &_inner_error0_);
							search_engine_api = _tmp80_;
							if (G_UNLIKELY (_inner_error0_ != NULL)) {
								_g_free0 (search_engine_name);
								option_collection = (_vala_array_free (option_collection, option_collection_length1, (GDestroyNotify) g_free), NULL);
								goto __catch0_g_error;
							}
							_tmp82_ = search_engine_name;
							if (g_strcmp0 (_tmp82_, "") != 0) {
								const gchar* _tmp83_;
								_tmp83_ = search_engine_api;
								_tmp81_ = g_strcmp0 (_tmp83_, "") != 0;
							} else {
								_tmp81_ = FALSE;
							}
							if (_tmp81_) {
								MenuMenuItem* _tmp84_;
								const gchar* _tmp85_;
								const gchar* _tmp86_;
								MenuMenuItem* _tmp87_;
								MenuMenuItem* _tmp88_;
								_tmp84_ = online_search;
								_tmp85_ = option;
								_tmp86_ = search_engine_name;
								_tmp87_ = menu_menu_item_new (_tmp85_, _tmp86_);
								_tmp88_ = _tmp87_;
								menu_menu_item_add_submenu_item (_tmp84_, _tmp88_);
								_g_object_unref0 (_tmp88_);
							}
							_g_free0 (search_engine_api);
							_g_free0 (search_engine_name);
						}
					}
					option_collection = (_vala_array_free (option_collection, option_collection_length1, (GDestroyNotify) g_free), NULL);
				}
			}
			goto __finally0;
			__catch0_g_error:
			{
				GError* e = NULL;
				const gchar* _tmp89_;
				e = _inner_error0_;
				_inner_error0_ = NULL;
				_tmp89_ = self->search_engine_config_file_path;
				if (!g_file_test (_tmp89_, G_FILE_TEST_EXISTS)) {
					GError* _tmp90_;
					const gchar* _tmp91_;
					_tmp90_ = e;
					_tmp91_ = _tmp90_->message;
					g_print ("Config: %s\n", _tmp91_);
				}
				_g_error_free0 (e);
			}
			__finally0:
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				_g_object_unref0 (file);
				_g_free0 (lang);
				_g_object_unref0 (online_search);
				(menu_content == NULL) ? NULL : (menu_content = (_g_list_free__g_object_unref0_ (menu_content), NULL));
				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;
			}
		}
		_tmp92_ = online_search;
		_tmp93_ = _g_object_ref0 (_tmp92_);
		menu_content = g_list_append (menu_content, _tmp93_);
		_g_object_unref0 (file);
		_g_free0 (lang);
		_g_object_unref0 (online_search);
	}
	_tmp94_ = menu_menu_item_new ("", "");
	menu_content = g_list_append (menu_content, _tmp94_);
	_tmp95_ = menu_menu_item_new ("switch_theme", _ ("Switch theme"));
	menu_content = g_list_append (menu_content, _tmp95_);
	_tmp96_ = menu_menu_item_new ("rename_title", _ ("Rename title"));
	menu_content = g_list_append (menu_content, _tmp96_);
	_tmp97_ = menu_menu_item_new ("encoding", _ ("Encoding"));
	menu_content = g_list_append (menu_content, _tmp97_);
	_tmp98_ = menu_menu_item_new ("custom_commands", _ ("Custom commands"));
	menu_content = g_list_append (menu_content, _tmp98_);
	_tmp99_ = menu_menu_item_new ("remote_manage", _ ("Remote management"));
	menu_content = g_list_append (menu_content, _tmp99_);
	if (widgets_term_is_in_remote_server (self)) {
		MenuMenuItem* _tmp100_;
		MenuMenuItem* _tmp101_;
		MenuMenuItem* _tmp102_;
		_tmp100_ = menu_menu_item_new ("", "");
		menu_content = g_list_append (menu_content, _tmp100_);
		_tmp101_ = menu_menu_item_new ("upload_file", _ ("Upload file"));
		menu_content = g_list_append (menu_content, _tmp101_);
		_tmp102_ = menu_menu_item_new ("download_file", _ ("Download file"));
		menu_content = g_list_append (menu_content, _tmp102_);
	}
	_tmp103_ = menu_menu_item_new ("", "");
	menu_content = g_list_append (menu_content, _tmp103_);
	_tmp104_ = menu_menu_item_new ("preference", _ ("Settings"));
	menu_content = g_list_append (menu_content, _tmp104_);
	_tmp105_ = gtk_widget_get_toplevel ((GtkWidget*) self);
	_tmp106_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp105_, WIDGETS_TYPE_WINDOW, WidgetsWindow));
	window = _tmp106_;
	_tmp107_ = menu_menu_new ();
	_g_object_unref0 (self->menu);
	self->menu = _tmp107_;
	_tmp108_ = self->menu;
	g_signal_connect_object (_tmp108_, "click-item", (GCallback) _widgets_term_handle_menu_item_click_menu_menu_click_item, self, 0);
	_tmp109_ = self->menu;
	g_signal_connect_object (_tmp109_, "destroy", (GCallback) _widgets_term_handle_menu_destroy_menu_menu_destroy, self, 0);
	_tmp111_ = ((WidgetsConfigWindow*) window)->config;
	_tmp112_ = _tmp111_->config_file;
	_tmp110_ = g_key_file_get_boolean (_tmp112_, "advanced", "prefer_deepin_menu", &_inner_error0_);
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		_g_object_unref0 (window);
		(menu_content == NULL) ? NULL : (menu_content = (_g_list_free__g_object_unref0_ (menu_content), NULL));
		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;
	}
	_tmp113_ = self->menu;
	menu_menu_set_prefer_deepin_menu (_tmp113_, _tmp110_);
	_tmp114_ = self->menu;
	_tmp115_ = menu_content;
	menu_menu_popup_at_position (_tmp114_, _tmp115_, x, y);
	_g_object_unref0 (window);
	(menu_content == NULL) ? NULL : (menu_content = (_g_list_free__g_object_unref0_ (menu_content), NULL));
}

void
widgets_term_handle_menu_item_click (WidgetsTerm* self,
                                     const gchar* item_id)
{
	WidgetsWorkspaceManager* _tmp0_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (item_id != NULL);
	_tmp0_ = self->workspace_manager;
	if (g_type_is_a (G_TYPE_FROM_INSTANCE ((GObject*) _tmp0_), WIDGETS_TYPE_WORKSPACE_MANAGER)) {
		const gchar* _tmp1_;
		GQuark _tmp3_ = 0U;
		static GQuark _tmp2_label0 = 0;
		static GQuark _tmp2_label1 = 0;
		static GQuark _tmp2_label2 = 0;
		static GQuark _tmp2_label3 = 0;
		static GQuark _tmp2_label4 = 0;
		static GQuark _tmp2_label5 = 0;
		static GQuark _tmp2_label6 = 0;
		static GQuark _tmp2_label7 = 0;
		static GQuark _tmp2_label8 = 0;
		static GQuark _tmp2_label9 = 0;
		static GQuark _tmp2_label10 = 0;
		static GQuark _tmp2_label11 = 0;
		static GQuark _tmp2_label12 = 0;
		static GQuark _tmp2_label13 = 0;
		static GQuark _tmp2_label14 = 0;
		static GQuark _tmp2_label15 = 0;
		static GQuark _tmp2_label16 = 0;
		static GQuark _tmp2_label17 = 0;
		static GQuark _tmp2_label18 = 0;
		static GQuark _tmp2_label19 = 0;
		_tmp1_ = item_id;
		_tmp3_ = (NULL == _tmp1_) ? 0 : g_quark_from_string (_tmp1_);
		if (_tmp3_ == ((0 != _tmp2_label0) ? _tmp2_label0 : (_tmp2_label0 = g_quark_from_static_string ("paste")))) {
			switch (0) {
				default:
				{
					VteTerminal* _tmp4_;
					_tmp4_ = self->term;
					vte_terminal_paste_clipboard (_tmp4_);
					break;
				}
			}
		} else if (_tmp3_ == ((0 != _tmp2_label1) ? _tmp2_label1 : (_tmp2_label1 = g_quark_from_static_string ("copy")))) {
			switch (0) {
				default:
				{
					VteTerminal* _tmp5_;
					_tmp5_ = self->term;
					if (vte_terminal_get_has_selection (_tmp5_)) {
						VteTerminal* _tmp6_;
						_tmp6_ = self->term;
						vte_terminal_copy_clipboard (_tmp6_);
					} else {
						const gchar* _tmp7_;
						_tmp7_ = self->uri_at_right_press;
						if (_tmp7_ != NULL) {
							GdkDisplay* display = NULL;
							GtkWidget* _tmp8_;
							GdkDisplay* _tmp9_;
							GdkDisplay* _tmp10_;
							GdkDisplay* _tmp11_;
							GtkClipboard* _tmp12_;
							const gchar* _tmp13_;
							const gchar* _tmp14_;
							gint _tmp15_;
							gint _tmp16_;
							GdkDisplay* _tmp17_;
							GtkClipboard* _tmp18_;
							const gchar* _tmp19_;
							const gchar* _tmp20_;
							gint _tmp21_;
							gint _tmp22_;
							_tmp8_ = gtk_widget_get_toplevel ((GtkWidget*) self);
							_tmp9_ = gtk_widget_get_display ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_window_get_type (), GtkWindow));
							_tmp10_ = _g_object_ref0 (_tmp9_);
							display = _tmp10_;
							_tmp11_ = display;
							_tmp12_ = gtk_clipboard_get_for_display (_tmp11_, GDK_SELECTION_CLIPBOARD);
							_tmp13_ = self->uri_at_right_press;
							_tmp14_ = self->uri_at_right_press;
							_tmp15_ = strlen (_tmp14_);
							_tmp16_ = _tmp15_;
							gtk_clipboard_set_text (_tmp12_, _tmp13_, _tmp16_);
							_tmp17_ = display;
							_tmp18_ = gtk_clipboard_get_for_display (_tmp17_, GDK_SELECTION_PRIMARY);
							_tmp19_ = self->uri_at_right_press;
							_tmp20_ = self->uri_at_right_press;
							_tmp21_ = strlen (_tmp20_);
							_tmp22_ = _tmp21_;
							gtk_clipboard_set_text (_tmp18_, _tmp19_, _tmp22_);
							_g_object_unref0 (display);
						}
					}
					break;
				}
			}
		} else if (_tmp3_ == ((0 != _tmp2_label2) ? _tmp2_label2 : (_tmp2_label2 = g_quark_from_static_string ("open")))) {
			switch (0) {
				default:
				{
					VteTerminal* _tmp23_;
					_tmp23_ = self->term;
					if (vte_terminal_get_has_selection (_tmp23_)) {
						widgets_term_open_selection_file (self);
					} else {
						const gchar* _tmp24_;
						_tmp24_ = self->uri_at_right_press;
						if (_tmp24_ != NULL) {
							{
								const gchar* _tmp25_;
								_tmp25_ = self->uri_at_right_press;
								gtk_show_uri (NULL, (const gchar*) _tmp25_, gtk_get_current_event_time (), &_inner_error0_);
								if (G_UNLIKELY (_inner_error0_ != NULL)) {
									goto __catch0_g_error;
								}
							}
							goto __finally0;
							__catch0_g_error:
							{
								g_clear_error (&_inner_error0_);
								{
									gchar* uri = NULL;
									const gchar* _tmp26_;
									gchar* _tmp27_;
									const gchar* _tmp28_;
									_tmp26_ = self->uri_at_right_press;
									_tmp27_ = g_strdup_printf ("http://%s", _tmp26_);
									uri = _tmp27_;
									_tmp28_ = uri;
									gtk_show_uri (NULL, (const gchar*) _tmp28_, gtk_get_current_event_time (), &_inner_error0_);
									if (G_UNLIKELY (_inner_error0_ != NULL)) {
										_g_free0 (uri);
										goto __catch1_g_error;
									}
									_g_free0 (uri);
								}
								goto __finally1;
								__catch1_g_error:
								{
									g_clear_error (&_inner_error0_);
									g_warning ("terminal.vala:497: Could Not Open link");
								}
								__finally1:
								if (G_UNLIKELY (_inner_error0_ != NULL)) {
									g_critical ("file %s: line %d: unexpected 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;
								}
							}
							__finally0:
							if (G_UNLIKELY (_inner_error0_ != NULL)) {
								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;
							}
						}
					}
					break;
				}
			}
		} else if (_tmp3_ == ((0 != _tmp2_label3) ? _tmp2_label3 : (_tmp2_label3 = g_quark_from_static_string ("open_in_filemanager")))) {
			switch (0) {
				default:
				{
					widgets_term_open_current_dir_in_file_manager (self);
					break;
				}
			}
		} else if (_tmp3_ == ((0 != _tmp2_label4) ? _tmp2_label4 : (_tmp2_label4 = g_quark_from_static_string ("fullscreen")))) {
			switch (0) {
				default:
				{
					WidgetsWindow* window = NULL;
					GtkWidget* _tmp29_;
					WidgetsWindow* _tmp30_;
					WidgetsWindow* _tmp31_;
					_tmp29_ = gtk_widget_get_toplevel ((GtkWidget*) self);
					_tmp30_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, WIDGETS_TYPE_WINDOW, WidgetsWindow));
					window = _tmp30_;
					_tmp31_ = window;
					widgets_config_window_toggle_fullscreen ((WidgetsConfigWindow*) _tmp31_);
					_g_object_unref0 (window);
					break;
				}
			}
		} else if (_tmp3_ == ((0 != _tmp2_label5) ? _tmp2_label5 : (_tmp2_label5 = g_quark_from_static_string ("quit_fullscreen")))) {
			switch (0) {
				default:
				{
					WidgetsWindow* window = NULL;
					GtkWidget* _tmp32_;
					WidgetsWindow* _tmp33_;
					WidgetsWindow* _tmp34_;
					_tmp32_ = gtk_widget_get_toplevel ((GtkWidget*) self);
					_tmp33_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, WIDGETS_TYPE_WINDOW, WidgetsWindow));
					window = _tmp33_;
					_tmp34_ = window;
					widgets_config_window_toggle_fullscreen ((WidgetsConfigWindow*) _tmp34_);
					_g_object_unref0 (window);
					break;
				}
			}
		} else if (_tmp3_ == ((0 != _tmp2_label6) ? _tmp2_label6 : (_tmp2_label6 = g_quark_from_static_string ("find")))) {
			switch (0) {
				default:
				{
					WidgetsWorkspaceManager* _tmp35_;
					WidgetsWorkspace* _tmp36_;
					gchar* _tmp37_;
					gchar* _tmp38_;
					_tmp35_ = self->workspace_manager;
					_tmp36_ = _tmp35_->focus_workspace;
					_tmp37_ = widgets_term_get_selection_text (self);
					_tmp38_ = _tmp37_;
					widgets_workspace_search (_tmp36_, _tmp38_);
					_g_free0 (_tmp38_);
					break;
				}
			}
		} else if (_tmp3_ == ((0 != _tmp2_label7) ? _tmp2_label7 : (_tmp2_label7 = g_quark_from_static_string ("horizontal_split")))) {
			switch (0) {
				default:
				{
					WidgetsWorkspaceManager* _tmp39_;
					WidgetsWorkspace* _tmp40_;
					_tmp39_ = self->workspace_manager;
					_tmp40_ = _tmp39_->focus_workspace;
					widgets_workspace_split_horizontal (_tmp40_);
					break;
				}
			}
		} else if (_tmp3_ == ((0 != _tmp2_label8) ? _tmp2_label8 : (_tmp2_label8 = g_quark_from_static_string ("vertical_split")))) {
			switch (0) {
				default:
				{
					WidgetsWorkspaceManager* _tmp41_;
					WidgetsWorkspace* _tmp42_;
					_tmp41_ = self->workspace_manager;
					_tmp42_ = _tmp41_->focus_workspace;
					widgets_workspace_split_vertical (_tmp42_);
					break;
				}
			}
		} else if (_tmp3_ == ((0 != _tmp2_label9) ? _tmp2_label9 : (_tmp2_label9 = g_quark_from_static_string ("close_window")))) {
			switch (0) {
				default:
				{
					WidgetsWorkspaceManager* _tmp43_;
					WidgetsWorkspace* _tmp44_;
					_tmp43_ = self->workspace_manager;
					_tmp44_ = _tmp43_->focus_workspace;
					widgets_workspace_close_focus_term (_tmp44_);
					break;
				}
			}
		} else if (_tmp3_ == ((0 != _tmp2_label10) ? _tmp2_label10 : (_tmp2_label10 = g_quark_from_static_string ("close_other_windows")))) {
			switch (0) {
				default:
				{
					WidgetsWorkspaceManager* _tmp45_;
					WidgetsWorkspace* _tmp46_;
					_tmp45_ = self->workspace_manager;
					_tmp46_ = _tmp45_->focus_workspace;
					widgets_workspace_close_other_terms (_tmp46_);
					break;
				}
			}
		} else if (_tmp3_ == ((0 != _tmp2_label11) ? _tmp2_label11 : (_tmp2_label11 = g_quark_from_static_string ("new_workspace")))) {
			switch (0) {
				default:
				{
					WidgetsWorkspaceManager* _tmp47_;
					_tmp47_ = self->workspace_manager;
					widgets_workspace_manager_new_workspace_with_current_directory (_tmp47_, FALSE);
					break;
				}
			}
		} else if (_tmp3_ == ((0 != _tmp2_label12) ? _tmp2_label12 : (_tmp2_label12 = g_quark_from_static_string ("custom_commands")))) {
			switch (0) {
				default:
				{
					WidgetsWorkspaceManager* _tmp48_;
					WidgetsWorkspace* _tmp49_;
					WidgetsWorkspaceManager* _tmp50_;
					WidgetsWorkspace* _tmp51_;
					_tmp48_ = self->workspace_manager;
					_tmp49_ = _tmp48_->focus_workspace;
					_tmp50_ = self->workspace_manager;
					_tmp51_ = _tmp50_->focus_workspace;
					widgets_workspace_show_command_panel (_tmp49_, _tmp51_);
					break;
				}
			}
		} else if (_tmp3_ == ((0 != _tmp2_label13) ? _tmp2_label13 : (_tmp2_label13 = g_quark_from_static_string ("remote_manage")))) {
			switch (0) {
				default:
				{
					WidgetsWorkspaceManager* _tmp52_;
					WidgetsWorkspace* _tmp53_;
					WidgetsWorkspaceManager* _tmp54_;
					WidgetsWorkspace* _tmp55_;
					_tmp52_ = self->workspace_manager;
					_tmp53_ = _tmp52_->focus_workspace;
					_tmp54_ = self->workspace_manager;
					_tmp55_ = _tmp54_->focus_workspace;
					widgets_workspace_show_remote_panel (_tmp53_, _tmp55_);
					break;
				}
			}
		} else if (_tmp3_ == ((0 != _tmp2_label14) ? _tmp2_label14 : (_tmp2_label14 = g_quark_from_static_string ("switch_theme")))) {
			switch (0) {
				default:
				{
					WidgetsWorkspaceManager* _tmp56_;
					WidgetsWorkspace* _tmp57_;
					WidgetsWorkspaceManager* _tmp58_;
					WidgetsWorkspace* _tmp59_;
					_tmp56_ = self->workspace_manager;
					_tmp57_ = _tmp56_->focus_workspace;
					_tmp58_ = self->workspace_manager;
					_tmp59_ = _tmp58_->focus_workspace;
					widgets_workspace_show_theme_panel (_tmp57_, _tmp59_);
					break;
				}
			}
		} else if (_tmp3_ == ((0 != _tmp2_label15) ? _tmp2_label15 : (_tmp2_label15 = g_quark_from_static_string ("upload_file")))) {
			switch (0) {
				default:
				{
					widgets_term_upload_file (self);
					break;
				}
			}
		} else if (_tmp3_ == ((0 != _tmp2_label16) ? _tmp2_label16 : (_tmp2_label16 = g_quark_from_static_string ("download_file")))) {
			switch (0) {
				default:
				{
					widgets_term_download_file (self);
					break;
				}
			}
		} else if (_tmp3_ == ((0 != _tmp2_label17) ? _tmp2_label17 : (_tmp2_label17 = g_quark_from_static_string ("rename_title")))) {
			switch (0) {
				default:
				{
					widgets_term_rename_title (self);
					break;
				}
			}
		} else if (_tmp3_ == ((0 != _tmp2_label18) ? _tmp2_label18 : (_tmp2_label18 = g_quark_from_static_string ("encoding")))) {
			switch (0) {
				default:
				{
					WidgetsWorkspaceManager* _tmp60_;
					WidgetsWorkspace* _tmp61_;
					WidgetsWorkspaceManager* _tmp62_;
					WidgetsWorkspace* _tmp63_;
					_tmp60_ = self->workspace_manager;
					_tmp61_ = _tmp60_->focus_workspace;
					_tmp62_ = self->workspace_manager;
					_tmp63_ = _tmp62_->focus_workspace;
					widgets_workspace_show_encoding_panel (_tmp61_, _tmp63_);
					break;
				}
			}
		} else if (_tmp3_ == ((0 != _tmp2_label19) ? _tmp2_label19 : (_tmp2_label19 = g_quark_from_static_string ("preference")))) {
			switch (0) {
				default:
				{
					WidgetsPreference* preference = NULL;
					GtkWidget* _tmp64_;
					GtkWidget* _tmp65_;
					GtkWidget* _tmp66_;
					WidgetsPreference* _tmp67_;
					WidgetsPreference* _tmp68_;
					GtkWidget* _tmp69_;
					_tmp64_ = gtk_widget_get_toplevel ((GtkWidget*) self);
					_tmp65_ = gtk_widget_get_toplevel ((GtkWidget*) self);
					_tmp66_ = gtk_window_get_focus (G_TYPE_CHECK_INSTANCE_CAST (_tmp65_, gtk_window_get_type (), GtkWindow));
					_tmp67_ = widgets_preference_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp64_, WIDGETS_TYPE_CONFIG_WINDOW, WidgetsConfigWindow), _tmp66_);
					g_object_ref_sink (_tmp67_);
					preference = _tmp67_;
					_tmp68_ = preference;
					_tmp69_ = gtk_widget_get_toplevel ((GtkWidget*) self);
					widgets_dialog_transient_for_window ((WidgetsDialog*) _tmp68_, G_TYPE_CHECK_INSTANCE_CAST (_tmp69_, WIDGETS_TYPE_CONFIG_WINDOW, WidgetsConfigWindow));
					_g_object_unref0 (preference);
					break;
				}
			}
		} else {
			switch (0) {
				default:
				{
					if (g_strcmp0 (item_id, "google") == 0) {
						gchar* _tmp70_;
						gchar* _tmp71_;
						_tmp70_ = widgets_term_get_selection_text (self);
						_tmp71_ = _tmp70_;
						widgets_term_search_text_in_search_engine (self, _tmp71_, "http://google.com/search?q=%s");
						_g_free0 (_tmp71_);
					} else {
						if (g_strcmp0 (item_id, "bing") == 0) {
							gchar* _tmp72_;
							gchar* _tmp73_;
							_tmp72_ = widgets_term_get_selection_text (self);
							_tmp73_ = _tmp72_;
							widgets_term_search_text_in_search_engine (self, _tmp73_, "http://cn.bing.com/search?q=%s");
							_g_free0 (_tmp73_);
						} else {
							if (g_strcmp0 (item_id, "baidu") == 0) {
								gchar* _tmp74_;
								gchar* _tmp75_;
								_tmp74_ = widgets_term_get_selection_text (self);
								_tmp75_ = _tmp74_;
								widgets_term_search_text_in_search_engine (self, _tmp75_, "https://www.baidu.com/s?wd=%s");
								_g_free0 (_tmp75_);
							} else {
								if (g_strcmp0 (item_id, "github") == 0) {
									gchar* _tmp76_;
									gchar* _tmp77_;
									_tmp76_ = widgets_term_get_selection_text (self);
									_tmp77_ = _tmp76_;
									widgets_term_search_text_in_search_engine (self, _tmp77_, "https://github.com/search?q=%s");
									_g_free0 (_tmp77_);
								} else {
									if (g_strcmp0 (item_id, "stackoverflow") == 0) {
										gchar* _tmp78_;
										gchar* _tmp79_;
										_tmp78_ = widgets_term_get_selection_text (self);
										_tmp79_ = _tmp78_;
										widgets_term_search_text_in_search_engine (self, _tmp79_, "https://stackoverflow.com/search?q=%s");
										_g_free0 (_tmp79_);
									} else {
										if (g_strcmp0 (item_id, "duckduckgo") == 0) {
											gchar* _tmp80_;
											gchar* _tmp81_;
											_tmp80_ = widgets_term_get_selection_text (self);
											_tmp81_ = _tmp80_;
											widgets_term_search_text_in_search_engine (self, _tmp81_, "https://duckduckgo.com/?q=%s");
											_g_free0 (_tmp81_);
										} else {
											GKeyFile* _tmp82_;
											gsize _tmp83_ = 0;
											gchar** _tmp84_;
											_tmp82_ = self->search_engine_config_file;
											_tmp84_ = g_key_file_get_groups (_tmp82_, &_tmp83_);
											{
												gchar** option_collection = NULL;
												gint option_collection_length1 = 0;
												gint _option_collection_size_ = 0;
												gint option_it = 0;
												option_collection = _tmp84_;
												option_collection_length1 = _tmp83_;
												for (option_it = 0; option_it < option_collection_length1; option_it = option_it + 1) {
													const gchar* option = NULL;
													option = option_collection[option_it];
													{
														const gchar* _tmp85_;
														_tmp85_ = option;
														if (g_strcmp0 (item_id, _tmp85_) == 0) {
															{
																gchar* search_engine_api = NULL;
																GKeyFile* _tmp86_;
																const gchar* _tmp87_;
																gchar* _tmp88_;
																gchar* _tmp89_;
																gchar* _tmp90_;
																const gchar* _tmp91_;
																_tmp86_ = self->search_engine_config_file;
																_tmp87_ = option;
																_tmp88_ = g_key_file_get_value (_tmp86_, _tmp87_, "api", &_inner_error0_);
																search_engine_api = _tmp88_;
																if (G_UNLIKELY (_inner_error0_ != NULL)) {
																	goto __catch2_g_error;
																}
																_tmp89_ = widgets_term_get_selection_text (self);
																_tmp90_ = _tmp89_;
																_tmp91_ = search_engine_api;
																widgets_term_search_text_in_search_engine (self, _tmp90_, _tmp91_);
																_g_free0 (_tmp90_);
																_g_free0 (search_engine_api);
															}
															goto __finally2;
															__catch2_g_error:
															{
																GError* e = NULL;
																const gchar* _tmp92_;
																e = _inner_error0_;
																_inner_error0_ = NULL;
																_tmp92_ = self->search_engine_config_file_path;
																if (!g_file_test (_tmp92_, G_FILE_TEST_EXISTS)) {
																	GError* _tmp93_;
																	const gchar* _tmp94_;
																	_tmp93_ = e;
																	_tmp94_ = _tmp93_->message;
																	g_print ("Config: %s\n", _tmp94_);
																}
																_g_error_free0 (e);
															}
															__finally2:
															if (G_UNLIKELY (_inner_error0_ != NULL)) {
																option_collection = (_vala_array_free (option_collection, option_collection_length1, (GDestroyNotify) g_free), NULL);
																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;
															}
															break;
														}
													}
												}
												option_collection = (_vala_array_free (option_collection, option_collection_length1, (GDestroyNotify) g_free), NULL);
											}
										}
									}
								}
							}
						}
					}
					break;
				}
			}
		}
	} else {
		g_print ("handle_menu_item_click: impossible here!\n");
	}
}

static Block43Data*
block43_data_ref (Block43Data* _data43_)
{
	g_atomic_int_inc (&_data43_->_ref_count_);
	return _data43_;
}

static inline void
_g_slist_free__g_object_unref0_ (GSList* self)
{
	g_slist_free_full (self, (GDestroyNotify) _g_object_unref0_);
}

static void
block43_data_unref (void * _userdata_)
{
	Block43Data* _data43_;
	_data43_ = (Block43Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data43_->_ref_count_)) {
		WidgetsTerm* self;
		self = _data43_->self;
		(_data43_->file_list == NULL) ? NULL : (_data43_->file_list = (_g_slist_free__g_object_unref0_ (_data43_->file_list), NULL));
		_g_object_unref0 (self);
		g_slice_free (Block43Data, _data43_);
	}
}

static gboolean
___lambda242_ (Block43Data* _data43_)
{
	WidgetsTerm* self;
	gchar* upload_command = NULL;
	gchar* _tmp0_;
	GSList* _tmp1_;
	const gchar* _tmp12_;
	gchar* _tmp13_;
	VteTerminal* _tmp14_;
	const gchar* _tmp15_;
	gint _tmp16_ = 0;
	guint8* _tmp17_;
	guint8* _tmp18_;
	gint _tmp18__length1;
	gboolean result;
	self = _data43_->self;
	_tmp0_ = g_strdup ("sz ");
	upload_command = _tmp0_;
	_tmp1_ = _data43_->file_list;
	{
		GSList* file_collection = NULL;
		GSList* file_it = NULL;
		file_collection = _tmp1_;
		for (file_it = file_collection; file_it != NULL; file_it = file_it->next) {
			GFile* _tmp2_;
			GFile* file = NULL;
			_tmp2_ = _g_object_ref0 ((GFile*) file_it->data);
			file = _tmp2_;
			{
				const gchar* _tmp3_;
				gchar* _tmp4_;
				gchar* _tmp5_;
				GFile* _tmp6_;
				gchar* _tmp7_;
				gchar* _tmp8_;
				gchar* _tmp9_;
				gchar* _tmp10_;
				gchar* _tmp11_;
				_tmp3_ = upload_command;
				_tmp4_ = g_strconcat (_tmp3_, "'", NULL);
				_tmp5_ = _tmp4_;
				_tmp6_ = file;
				_tmp7_ = g_file_get_path (_tmp6_);
				_tmp8_ = _tmp7_;
				_tmp9_ = g_strconcat (_tmp5_, _tmp8_, NULL);
				_tmp10_ = _tmp9_;
				_tmp11_ = g_strconcat (_tmp10_, "' ", NULL);
				_g_free0 (upload_command);
				upload_command = _tmp11_;
				_g_free0 (_tmp10_);
				_g_free0 (_tmp8_);
				_g_free0 (_tmp5_);
				_g_object_unref0 (file);
			}
		}
	}
	_tmp12_ = upload_command;
	_tmp13_ = g_strconcat (_tmp12_, "\n", NULL);
	_g_free0 (upload_command);
	upload_command = _tmp13_;
	_tmp14_ = self->term;
	_tmp15_ = upload_command;
	_tmp17_ = utils_to_raw_data (_tmp15_, &_tmp16_);
	_tmp18_ = _tmp17_;
	_tmp18__length1 = _tmp16_;
	vte_terminal_feed_child (_tmp14_, _tmp18_, (gssize) _tmp16_);
	_tmp18_ = (g_free (_tmp18_), NULL);
	result = FALSE;
	_g_free0 (upload_command);
	return result;
}

static gboolean
____lambda242__gsource_func (gpointer self)
{
	gboolean result;
	result = ___lambda242_ (self);
	return result;
}

void
widgets_term_upload_file (WidgetsTerm* self)
{
	GtkFileChooserAction action = 0;
	GtkFileChooserDialog* chooser = NULL;
	GtkWidget* _tmp0_;
	GtkFileChooserDialog* _tmp1_;
	GtkFileChooserDialog* _tmp2_;
	GtkFileChooserDialog* _tmp3_;
	GtkFileChooserDialog* _tmp4_;
	GtkFileChooserDialog* _tmp5_;
	GtkFileChooserDialog* _tmp8_;
	g_return_if_fail (self != NULL);
	action = GTK_FILE_CHOOSER_ACTION_OPEN;
	_tmp0_ = gtk_widget_get_toplevel ((GtkWidget*) self);
	_tmp1_ = (GtkFileChooserDialog*) gtk_file_chooser_dialog_new (_ ("Select file to upload"), G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, gtk_window_get_type ()) ? ((GtkWindow*) _tmp0_) : NULL, action, NULL);
	g_object_ref_sink (_tmp1_);
	chooser = _tmp1_;
	_tmp2_ = chooser;
	gtk_dialog_add_button ((GtkDialog*) _tmp2_, _ ("Cancel"), (gint) GTK_RESPONSE_CANCEL);
	_tmp3_ = chooser;
	gtk_file_chooser_set_select_multiple ((GtkFileChooser*) _tmp3_, TRUE);
	_tmp4_ = chooser;
	gtk_dialog_add_button ((GtkDialog*) _tmp4_, _ ("Upload"), (gint) GTK_RESPONSE_ACCEPT);
	_tmp5_ = chooser;
	if (gtk_dialog_run ((GtkDialog*) _tmp5_) == ((gint) GTK_RESPONSE_ACCEPT)) {
		Block43Data* _data43_;
		GtkFileChooserDialog* _tmp6_;
		GSList* _tmp7_;
		_data43_ = g_slice_new0 (Block43Data);
		_data43_->_ref_count_ = 1;
		_data43_->self = g_object_ref (self);
		_tmp6_ = chooser;
		_tmp7_ = gtk_file_chooser_get_files ((GtkFileChooser*) _tmp6_);
		_data43_->file_list = _tmp7_;
		widgets_term_press_ctrl_at (self);
		g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 500, ____lambda242__gsource_func, block43_data_ref (_data43_), block43_data_unref);
		block43_data_unref (_data43_);
		_data43_ = NULL;
	}
	_tmp8_ = chooser;
	gtk_widget_destroy ((GtkWidget*) _tmp8_);
	_g_object_unref0 (chooser);
}

static gboolean
__lambda244_ (WidgetsTerm* self)
{
	gchar* command = NULL;
	gchar* _tmp0_;
	VteTerminal* _tmp1_;
	gint _tmp2_ = 0;
	guint8* _tmp3_;
	guint8* _tmp4_;
	gint _tmp4__length1;
	gboolean result;
	_tmp0_ = g_strdup_printf ("read -e -a files -p \"%s: \"; sz \"${files[@]}\"\n", _ ("Type path to download file"));
	command = _tmp0_;
	_tmp1_ = self->term;
	_tmp3_ = utils_to_raw_data (command, &_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp4__length1 = _tmp2_;
	vte_terminal_feed_child (_tmp1_, _tmp4_, (gssize) _tmp2_);
	_tmp4_ = (g_free (_tmp4_), NULL);
	self->priv->enter_sz_command = TRUE;
	result = FALSE;
	_g_free0 (command);
	return result;
}

static gboolean
___lambda244__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda244_ ((WidgetsTerm*) self);
	return result;
}

static gboolean
___lambda243_ (WidgetsTerm* self)
{
	gboolean result;
	widgets_term_press_ctrl_k (self);
	g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 100, ___lambda244__gsource_func, g_object_ref (self), g_object_unref);
	result = FALSE;
	return result;
}

static gboolean
____lambda243__gsource_func (gpointer self)
{
	gboolean result;
	result = ___lambda243_ ((WidgetsTerm*) self);
	return result;
}

void
widgets_term_download_file (WidgetsTerm* self)
{
	GtkFileChooserAction action = 0;
	GtkFileChooserDialog* chooser = NULL;
	GtkWidget* _tmp0_;
	GtkFileChooserDialog* _tmp1_;
	GtkFileChooserDialog* _tmp2_;
	GtkFileChooserDialog* _tmp3_;
	GtkFileChooserDialog* _tmp4_;
	GtkFileChooserDialog* _tmp7_;
	g_return_if_fail (self != NULL);
	action = GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER;
	_tmp0_ = gtk_widget_get_toplevel ((GtkWidget*) self);
	_tmp1_ = (GtkFileChooserDialog*) gtk_file_chooser_dialog_new (_ ("Select directory to save the file"), G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, gtk_window_get_type ()) ? ((GtkWindow*) _tmp0_) : NULL, action, NULL);
	g_object_ref_sink (_tmp1_);
	chooser = _tmp1_;
	_tmp2_ = chooser;
	gtk_dialog_add_button ((GtkDialog*) _tmp2_, _ ("Cancel"), (gint) GTK_RESPONSE_CANCEL);
	_tmp3_ = chooser;
	gtk_dialog_add_button ((GtkDialog*) _tmp3_, _ ("Select"), (gint) GTK_RESPONSE_ACCEPT);
	_tmp4_ = chooser;
	if (gtk_dialog_run ((GtkDialog*) _tmp4_) == ((gint) GTK_RESPONSE_ACCEPT)) {
		GtkFileChooserDialog* _tmp5_;
		gchar* _tmp6_;
		_tmp5_ = chooser;
		_tmp6_ = gtk_file_chooser_get_filename ((GtkFileChooser*) _tmp5_);
		_g_free0 (self->priv->save_file_directory);
		self->priv->save_file_directory = _tmp6_;
		widgets_term_press_ctrl_a (self);
		g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 100, ____lambda243__gsource_func, g_object_ref (self), g_object_unref);
	}
	_tmp7_ = chooser;
	gtk_widget_destroy ((GtkWidget*) _tmp7_);
	_g_object_unref0 (chooser);
}

static void
__lambda213_ (WidgetsTerm* self,
              WidgetsRenameDialog* w,
              const gchar* new_title)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	gboolean _tmp2_;
	g_return_if_fail (w != NULL);
	g_return_if_fail (new_title != NULL);
	_tmp0_ = string_strip (new_title);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strcmp0 (_tmp1_, "") == 0;
	_g_free0 (_tmp1_);
	if (_tmp2_) {
		_g_free0 (self->customize_title);
		self->customize_title = NULL;
	} else {
		gchar* _tmp3_;
		_tmp3_ = string_strip (new_title);
		_g_free0 (self->customize_title);
		self->customize_title = _tmp3_;
	}
	widgets_term_update_terminal_title (self);
}

static void
___lambda213__widgets_rename_dialog_rename (WidgetsRenameDialog* _sender,
                                            const gchar* new_title,
                                            gpointer self)
{
	__lambda213_ ((WidgetsTerm*) self, _sender, new_title);
}

void
widgets_term_rename_title (WidgetsTerm* self)
{
	WidgetsConfigWindow* parent_window = NULL;
	VteTerminal* _tmp0_;
	GtkWidget* _tmp1_;
	WidgetsConfigWindow* _tmp2_;
	WidgetsRenameDialog* rename_dialog = NULL;
	const gchar* _tmp3_;
	WidgetsRenameDialog* _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->term;
	_tmp1_ = gtk_widget_get_toplevel ((GtkWidget*) _tmp0_);
	_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, WIDGETS_TYPE_CONFIG_WINDOW, WidgetsConfigWindow));
	parent_window = _tmp2_;
	_tmp3_ = self->current_title;
	_tmp4_ = widgets_rename_dialog_new (_ ("Rename title"), _tmp3_, _ ("Cancel"), _ ("Rename"));
	g_object_ref_sink (_tmp4_);
	rename_dialog = _tmp4_;
	widgets_dialog_transient_for_window ((WidgetsDialog*) rename_dialog, parent_window);
	g_signal_connect_object (rename_dialog, "rename", (GCallback) ___lambda213__widgets_rename_dialog_rename, self, 0);
	_g_object_unref0 (rename_dialog);
	_g_object_unref0 (parent_window);
}

static gboolean
__lambda248_ (WidgetsTerm* self)
{
	gchar* enter_command = NULL;
	gchar* _tmp0_;
	VteTerminal* _tmp1_;
	gint _tmp2_ = 0;
	guint8* _tmp3_;
	guint8* _tmp4_;
	gint _tmp4__length1;
	gboolean result;
	_tmp0_ = g_strdup ("\n");
	enter_command = _tmp0_;
	_tmp1_ = self->term;
	_tmp3_ = utils_to_raw_data (enter_command, &_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp4__length1 = _tmp2_;
	vte_terminal_feed_child (_tmp1_, _tmp4_, (gssize) _tmp2_);
	_tmp4_ = (g_free (_tmp4_), NULL);
	result = FALSE;
	_g_free0 (enter_command);
	return result;
}

static gboolean
___lambda248__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda248_ ((WidgetsTerm*) self);
	return result;
}

static gboolean
__lambda247_ (WidgetsTerm* self)
{
	gchar* download_command = NULL;
	gchar* _tmp0_;
	VteTerminal* _tmp1_;
	gint _tmp2_ = 0;
	guint8* _tmp3_;
	guint8* _tmp4_;
	gint _tmp4__length1;
	gboolean result;
	_tmp0_ = g_strdup ("rz\n");
	download_command = _tmp0_;
	_tmp1_ = self->term;
	_tmp3_ = utils_to_raw_data (download_command, &_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp4__length1 = _tmp2_;
	vte_terminal_feed_child (_tmp1_, _tmp4_, (gssize) _tmp2_);
	_tmp4_ = (g_free (_tmp4_), NULL);
	g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 100, ___lambda248__gsource_func, g_object_ref (self), g_object_unref);
	result = FALSE;
	_g_free0 (download_command);
	return result;
}

static gboolean
___lambda247__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda247_ ((WidgetsTerm*) self);
	return result;
}

static gboolean
__lambda246_ (WidgetsTerm* self)
{
	gchar* switch_command = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	VteTerminal* _tmp2_;
	gint _tmp3_ = 0;
	guint8* _tmp4_;
	guint8* _tmp5_;
	gint _tmp5__length1;
	gboolean result;
	_tmp0_ = self->priv->save_file_directory;
	_tmp1_ = g_strdup_printf ("cd %s\n", _tmp0_);
	switch_command = _tmp1_;
	_tmp2_ = self->term;
	_tmp4_ = utils_to_raw_data (switch_command, &_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp5__length1 = _tmp3_;
	vte_terminal_feed_child (_tmp2_, _tmp5_, (gssize) _tmp3_);
	_tmp5_ = (g_free (_tmp5_), NULL);
	g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 100, ___lambda247__gsource_func, g_object_ref (self), g_object_unref);
	result = FALSE;
	_g_free0 (switch_command);
	return result;
}

static gboolean
___lambda246__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda246_ ((WidgetsTerm*) self);
	return result;
}

static gboolean
__lambda245_ (WidgetsTerm* self)
{
	gboolean result;
	widgets_term_press_ctrl_at (self);
	g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 100, ___lambda246__gsource_func, g_object_ref (self), g_object_unref);
	result = FALSE;
	return result;
}

static gboolean
___lambda245__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda245_ ((WidgetsTerm*) self);
	return result;
}

void
widgets_term_execute_download (WidgetsTerm* self)
{
	g_return_if_fail (self != NULL);
	g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 1000, ___lambda245__gsource_func, g_object_ref (self), g_object_unref);
}

void
widgets_term_press_ctrl_at (WidgetsTerm* self)
{
	GdkEventKey* event = NULL;
	GdkEvent* _tmp0_;
	GdkWindow* window = NULL;
	VteTerminal* _tmp1_;
	GdkWindow* _tmp2_;
	GdkWindow* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gdk_event_new (GDK_KEY_PRESS);
	event = (GdkEventKey*) _tmp0_;
	_tmp1_ = self->term;
	_tmp2_ = gtk_widget_get_window ((GtkWidget*) _tmp1_);
	_tmp3_ = _g_object_ref0 (_tmp2_);
	window = _tmp3_;
	event->window = window;
	event->keyval = (guint) 64;
	event->state = (GdkModifierType) 33554437;
	event->hardware_keycode = (guint16) 11;
	gdk_event_put ((GdkEvent*) event);
	_g_object_unref0 (window);
}

void
widgets_term_press_ctrl_k (WidgetsTerm* self)
{
	GdkEventKey* event = NULL;
	GdkEvent* _tmp0_;
	GdkWindow* window = NULL;
	VteTerminal* _tmp1_;
	GdkWindow* _tmp2_;
	GdkWindow* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gdk_event_new (GDK_KEY_PRESS);
	event = (GdkEventKey*) _tmp0_;
	_tmp1_ = self->term;
	_tmp2_ = gtk_widget_get_window ((GtkWidget*) _tmp1_);
	_tmp3_ = _g_object_ref0 (_tmp2_);
	window = _tmp3_;
	event->window = window;
	event->keyval = (guint) 75;
	event->state = (GdkModifierType) 33554437;
	event->hardware_keycode = (guint16) 45;
	gdk_event_put ((GdkEvent*) event);
	_g_object_unref0 (window);
}

void
widgets_term_press_ctrl_a (WidgetsTerm* self)
{
	GdkEventKey* event = NULL;
	GdkEvent* _tmp0_;
	GdkWindow* window = NULL;
	VteTerminal* _tmp1_;
	GdkWindow* _tmp2_;
	GdkWindow* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gdk_event_new (GDK_KEY_PRESS);
	event = (GdkEventKey*) _tmp0_;
	_tmp1_ = self->term;
	_tmp2_ = gtk_widget_get_window ((GtkWidget*) _tmp1_);
	_tmp3_ = _g_object_ref0 (_tmp2_);
	window = _tmp3_;
	event->window = window;
	event->keyval = (guint) 97;
	event->state = (GdkModifierType) 33554436;
	event->hardware_keycode = (guint16) 38;
	gdk_event_put ((GdkEvent*) event);
	_g_object_unref0 (window);
}

void
widgets_term_press_ctrl_e (WidgetsTerm* self)
{
	GdkEventKey* event = NULL;
	GdkEvent* _tmp0_;
	GdkWindow* window = NULL;
	VteTerminal* _tmp1_;
	GdkWindow* _tmp2_;
	GdkWindow* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gdk_event_new (GDK_KEY_PRESS);
	event = (GdkEventKey*) _tmp0_;
	_tmp1_ = self->term;
	_tmp2_ = gtk_widget_get_window ((GtkWidget*) _tmp1_);
	_tmp3_ = _g_object_ref0 (_tmp2_);
	window = _tmp3_;
	event->window = window;
	event->keyval = (guint) 69;
	event->state = (GdkModifierType) 33554437;
	event->hardware_keycode = (guint16) 26;
	gdk_event_put ((GdkEvent*) event);
	_g_object_unref0 (window);
}

void
widgets_term_handle_menu_destroy (WidgetsTerm* self)
{
	g_return_if_fail (self != NULL);
	_g_object_unref0 (self->menu);
	self->menu = NULL;
}

void
widgets_term_focus_term (WidgetsTerm* self)
{
	VteTerminal* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->term;
	gtk_widget_grab_focus ((GtkWidget*) _tmp0_);
	widgets_term_update_terminal_title (self);
}

static gint
string_index_of (const gchar* self,
                 const gchar* needle,
                 gint start_index)
{
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gint result;
	g_return_val_if_fail (self != NULL, 0);
	g_return_val_if_fail (needle != NULL, 0);
	_tmp0_ = strstr (((gchar*) self) + start_index, (gchar*) needle);
	_result_ = _tmp0_;
	_tmp1_ = _result_;
	if (_tmp1_ != NULL) {
		gchar* _tmp2_;
		_tmp2_ = _result_;
		result = (gint) (_tmp2_ - ((gchar*) self));
		return result;
	} else {
		result = -1;
		return result;
	}
}

void
widgets_term_update_terminal_title (WidgetsTerm* self)
{
	gint foreground_pid = 0;
	gboolean has_foreground_process = FALSE;
	gint _tmp0_ = 0;
	gboolean _tmp1_;
	gchar* title = NULL;
	const gchar* _tmp6_;
	const gchar* _tmp28_;
	const gchar* _tmp29_;
	gchar* _tmp30_;
	g_return_if_fail (self != NULL);
	_tmp1_ = widgets_term_try_get_foreground_pid (self, &_tmp0_);
	foreground_pid = _tmp0_;
	has_foreground_process = _tmp1_;
	if (has_foreground_process) {
		gchar* command = NULL;
		gchar* _tmp2_;
		gboolean _tmp3_ = FALSE;
		const gchar* _tmp4_;
		_tmp2_ = utils_get_process_cmdline (foreground_pid);
		command = _tmp2_;
		_tmp4_ = command;
		if (string_index_of (_tmp4_, "expect -f /tmp/deepin-terminal-gtk-", 0) == 0) {
			_tmp3_ = !self->login_remote_server;
		} else {
			_tmp3_ = FALSE;
		}
		if (_tmp3_) {
			self->login_remote_server = TRUE;
		}
		_g_free0 (command);
	} else {
		if (self->login_remote_server) {
			const gchar* _tmp5_;
			self->login_remote_server = FALSE;
			_tmp5_ = self->remote_server_title;
			if (_tmp5_ != NULL) {
				_g_free0 (self->remote_server_title);
				self->remote_server_title = NULL;
			}
		}
	}
	_tmp6_ = self->customize_title;
	if (_tmp6_ != NULL) {
		const gchar* _tmp7_;
		gchar* _tmp8_;
		_tmp7_ = self->customize_title;
		_tmp8_ = g_strdup (_tmp7_);
		_g_free0 (title);
		title = _tmp8_;
	} else {
		const gchar* _tmp9_;
		_tmp9_ = self->remote_server_title;
		if (_tmp9_ != NULL) {
			const gchar* _tmp10_;
			gchar* _tmp11_;
			_tmp10_ = self->remote_server_title;
			_tmp11_ = g_strdup (_tmp10_);
			_g_free0 (title);
			title = _tmp11_;
		} else {
			gchar* vte_window_title = NULL;
			VteTerminal* _tmp12_;
			const gchar* _tmp13_;
			gchar* _tmp14_;
			const gchar* _tmp15_;
			_tmp12_ = self->term;
			_tmp13_ = vte_terminal_get_window_title (_tmp12_);
			_tmp14_ = g_strdup (_tmp13_);
			vte_window_title = _tmp14_;
			_tmp15_ = vte_window_title;
			if (_tmp15_ != NULL) {
				const gchar* _tmp16_;
				gchar* _tmp17_;
				_tmp16_ = vte_window_title;
				_tmp17_ = g_strdup (_tmp16_);
				_g_free0 (title);
				title = _tmp17_;
			} else {
				gchar* dir_basename = NULL;
				gchar* _tmp18_;
				gchar* _tmp19_;
				gchar* _tmp20_;
				gchar* _tmp21_;
				const gchar* _tmp22_;
				_tmp18_ = widgets_term_get_cwd (self);
				_tmp19_ = _tmp18_;
				_tmp20_ = g_path_get_basename (_tmp19_);
				_tmp21_ = _tmp20_;
				_g_free0 (_tmp19_);
				dir_basename = _tmp21_;
				_tmp22_ = dir_basename;
				if (_tmp22_ != NULL) {
					const gchar* _tmp23_;
					gchar* _tmp24_;
					const gchar* _tmp25_;
					gchar* _tmp26_;
					_tmp23_ = dir_basename;
					_tmp24_ = g_strdup (_tmp23_);
					_g_free0 (title);
					title = _tmp24_;
					_tmp25_ = dir_basename;
					_tmp26_ = g_strdup (_tmp25_);
					_g_free0 (self->current_title);
					self->current_title = _tmp26_;
				} else {
					gchar* _tmp27_;
					_tmp27_ = g_strdup (_ ("deepin"));
					_g_free0 (title);
					title = _tmp27_;
				}
				_g_free0 (dir_basename);
			}
			_g_free0 (vte_window_title);
		}
	}
	_tmp28_ = title;
	g_signal_emit (self, widgets_term_signals[WIDGETS_TERM_CHANGE_TITLE_SIGNAL], 0, _tmp28_);
	_tmp29_ = title;
	_tmp30_ = g_strdup (_tmp29_);
	_g_free0 (self->current_title);
	self->current_title = _tmp30_;
	_g_free0 (title);
}

gchar*
widgets_term_get_cwd (WidgetsTerm* self)
{
	VteTerminal* _tmp0_;
	VtePty* _tmp1_;
	const gchar* _tmp15_;
	gchar* _tmp16_;
	GError* _inner_error0_ = NULL;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->term;
	_tmp1_ = vte_terminal_get_pty (_tmp0_);
	if (_tmp1_ != NULL) {
		gint pty_fd = 0;
		VteTerminal* _tmp2_;
		VtePty* _tmp3_;
		gint _tmp4_;
		gint _tmp5_;
		gint fpid = 0;
		_tmp2_ = self->term;
		_tmp3_ = vte_terminal_get_pty (_tmp2_);
		_tmp4_ = vte_pty_get_fd (_tmp3_);
		_tmp5_ = _tmp4_;
		pty_fd = _tmp5_;
		fpid = (gint) tcgetpgrp (pty_fd);
		if (fpid > 0) {
			{
				gchar* _tmp6_ = NULL;
				gchar* _tmp7_;
				gchar* _tmp8_;
				gchar* _tmp9_;
				gchar* _tmp10_;
				gchar* _tmp11_;
				_tmp7_ = g_strdup_printf ("/proc/%d/cwd", fpid);
				_tmp8_ = _tmp7_;
				_tmp9_ = g_file_read_link (_tmp8_, &_inner_error0_);
				_tmp10_ = _tmp9_;
				_g_free0 (_tmp8_);
				_tmp6_ = _tmp10_;
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					goto __catch0_g_error;
				}
				_tmp11_ = _tmp6_;
				_tmp6_ = NULL;
				_g_free0 (self->current_dir);
				self->current_dir = _tmp11_;
				_g_free0 (_tmp6_);
			}
			goto __finally0;
			__catch0_g_error:
			{
				GError* e = NULL;
				FILE* _tmp12_;
				GError* _tmp13_;
				const gchar* _tmp14_;
				e = _inner_error0_;
				_inner_error0_ = NULL;
				_tmp12_ = stderr;
				_tmp13_ = e;
				_tmp14_ = _tmp13_->message;
				fprintf (_tmp12_, "Parse cwd of %d failed: %s\n", fpid, _tmp14_);
				_g_error_free0 (e);
			}
			__finally0:
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				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;
			}
		}
	}
	_tmp15_ = self->current_dir;
	_tmp16_ = g_strdup (_tmp15_);
	result = _tmp16_;
	return result;
}

gboolean
widgets_term_on_scroll (WidgetsTerm* self,
                        GtkWidget* widget,
                        GdkEventScroll* scroll_event)
{
	GError* _inner_error0_ = NULL;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (widget != NULL, FALSE);
	g_return_val_if_fail (scroll_event != NULL, FALSE);
	if ((scroll_event->state & GDK_CONTROL_MASK) != 0) {
		{
			WidgetsConfigWindow* window = NULL;
			VteTerminal* _tmp0_;
			GtkWidget* _tmp1_;
			WidgetsConfigWindow* _tmp2_;
			gdouble old_opacity = 0.0;
			WidgetsConfigWindow* _tmp3_;
			ConfigConfig* _tmp4_;
			GKeyFile* _tmp5_;
			gdouble new_opacity = 0.0;
			_tmp0_ = self->term;
			_tmp1_ = gtk_widget_get_toplevel ((GtkWidget*) _tmp0_);
			_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, WIDGETS_TYPE_CONFIG_WINDOW, WidgetsConfigWindow));
			window = _tmp2_;
			_tmp3_ = window;
			_tmp4_ = _tmp3_->config;
			_tmp5_ = _tmp4_->config_file;
			old_opacity = g_key_file_get_double (_tmp5_, "general", "opacity", &_inner_error0_);
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				gboolean _tmp6_ = FALSE;
				_g_object_unref0 (window);
				if (_inner_error0_->domain == G_KEY_FILE_ERROR) {
					goto __catch0_g_key_file_error;
				}
				g_critical ("file %s: line %d: unexpected 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 _tmp6_;
			}
			new_opacity = old_opacity;
			if (scroll_event->delta_y < ((gdouble) 0)) {
				new_opacity = MIN (MAX (old_opacity + 0.01, constant_TERMINAL_MIN_OPACITY), (gdouble) 1);
			} else {
				if (scroll_event->delta_y > ((gdouble) 0)) {
					new_opacity = MIN (MAX (old_opacity - 0.01, constant_TERMINAL_MIN_OPACITY), (gdouble) 1);
				}
			}
			if (new_opacity != old_opacity) {
				WidgetsConfigWindow* _tmp7_;
				ConfigConfig* _tmp8_;
				WidgetsConfigWindow* _tmp9_;
				ConfigConfig* _tmp10_;
				GKeyFile* _tmp11_;
				WidgetsConfigWindow* _tmp12_;
				ConfigConfig* _tmp13_;
				WidgetsConfigWindow* _tmp14_;
				ConfigConfig* _tmp15_;
				_tmp7_ = window;
				_tmp8_ = _tmp7_->config;
				config_config_load_config (_tmp8_);
				_tmp9_ = window;
				_tmp10_ = _tmp9_->config;
				_tmp11_ = _tmp10_->config_file;
				g_key_file_set_double (_tmp11_, "general", "opacity", new_opacity);
				_tmp12_ = window;
				_tmp13_ = _tmp12_->config;
				config_config_save (_tmp13_);
				_tmp14_ = window;
				_tmp15_ = _tmp14_->config;
				g_signal_emit_by_name (_tmp15_, "update");
			}
			result = TRUE;
			_g_object_unref0 (window);
			return result;
		}
		goto __finally0;
		__catch0_g_key_file_error:
		{
			GError* e = NULL;
			GError* _tmp16_;
			const gchar* _tmp17_;
			e = _inner_error0_;
			_inner_error0_ = NULL;
			_tmp16_ = e;
			_tmp17_ = _tmp16_->message;
			g_print ("Terminal on_scroll: %s\n", _tmp17_);
			_g_error_free0 (e);
		}
		__finally0:
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			gboolean _tmp18_ = FALSE;
			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 _tmp18_;
		}
	}
	result = FALSE;
	return result;
}

static gboolean
widgets_term_on_key_press (WidgetsTerm* self,
                           GtkWidget* widget,
                           GdkEventKey* key_event)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp149_ = FALSE;
	GError* _inner_error0_ = NULL;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (widget != NULL, FALSE);
	g_return_val_if_fail (key_event != NULL, FALSE);
	if (self->child_has_exit) {
		_tmp1_ = widgets_term_is_launch_command (self);
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		WidgetsWorkspaceManager* _tmp2_;
		_tmp2_ = self->workspace_manager;
		_tmp0_ = widgets_workspace_manager_is_first_term (_tmp2_, self);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		gchar* keyname = NULL;
		gchar* _tmp3_;
		const gchar* _tmp4_;
		_tmp3_ = keymap_get_keyevent_name (key_event);
		keyname = _tmp3_;
		_tmp4_ = keyname;
		if (g_strcmp0 (_tmp4_, "Enter") == 0) {
			g_signal_emit (self, widgets_term_signals[WIDGETS_TERM_EXIT_SIGNAL], 0);
			result = TRUE;
			_g_free0 (keyname);
			return result;
		}
		_g_free0 (keyname);
	}
	self->press_anything = TRUE;
	{
		gchar* keyname = NULL;
		gchar* _tmp5_;
		WidgetsConfigWindow* parent_window = NULL;
		VteTerminal* _tmp6_;
		GtkWidget* _tmp7_;
		WidgetsConfigWindow* _tmp8_;
		const gchar* _tmp9_;
		gchar* copy_key = NULL;
		WidgetsConfigWindow* _tmp21_;
		ConfigConfig* _tmp22_;
		GKeyFile* _tmp23_;
		gchar* _tmp24_;
		gboolean _tmp26_ = FALSE;
		const gchar* _tmp27_;
		gchar* paste_key = NULL;
		WidgetsConfigWindow* _tmp31_;
		ConfigConfig* _tmp32_;
		GKeyFile* _tmp33_;
		gchar* _tmp34_;
		gboolean _tmp36_ = FALSE;
		const gchar* _tmp37_;
		gchar* open_key = NULL;
		WidgetsConfigWindow* _tmp41_;
		ConfigConfig* _tmp42_;
		GKeyFile* _tmp43_;
		gchar* _tmp44_;
		gboolean _tmp46_ = FALSE;
		const gchar* _tmp47_;
		gchar* zoom_in_key = NULL;
		WidgetsConfigWindow* _tmp50_;
		ConfigConfig* _tmp51_;
		GKeyFile* _tmp52_;
		gchar* _tmp53_;
		gboolean _tmp55_ = FALSE;
		const gchar* _tmp56_;
		gchar* zoom_out_key = NULL;
		WidgetsConfigWindow* _tmp59_;
		ConfigConfig* _tmp60_;
		GKeyFile* _tmp61_;
		gchar* _tmp62_;
		gboolean _tmp64_ = FALSE;
		const gchar* _tmp65_;
		gchar* zoom_reset_key = NULL;
		WidgetsConfigWindow* _tmp68_;
		ConfigConfig* _tmp69_;
		GKeyFile* _tmp70_;
		gchar* _tmp71_;
		gboolean _tmp73_ = FALSE;
		const gchar* _tmp74_;
		gchar* jump_to_next_command_key = NULL;
		WidgetsConfigWindow* _tmp77_;
		ConfigConfig* _tmp78_;
		GKeyFile* _tmp79_;
		gchar* _tmp80_;
		gboolean _tmp82_ = FALSE;
		const gchar* _tmp83_;
		gchar* jump_to_previous_command_key = NULL;
		WidgetsConfigWindow* _tmp86_;
		ConfigConfig* _tmp87_;
		GKeyFile* _tmp88_;
		gchar* _tmp89_;
		gboolean _tmp91_ = FALSE;
		const gchar* _tmp92_;
		gboolean _tmp95_ = FALSE;
		const gchar* _tmp96_;
		gboolean _tmp110_ = FALSE;
		const gchar* _tmp111_;
		gboolean _tmp113_ = FALSE;
		const gchar* _tmp114_;
		gint _tmp115_;
		gint _tmp116_;
		_tmp5_ = keymap_get_keyevent_name (key_event);
		keyname = _tmp5_;
		_tmp6_ = self->term;
		_tmp7_ = gtk_widget_get_toplevel ((GtkWidget*) _tmp6_);
		_tmp8_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, WIDGETS_TYPE_CONFIG_WINDOW, WidgetsConfigWindow));
		parent_window = _tmp8_;
		_tmp9_ = keyname;
		if (g_strcmp0 (_tmp9_, "Menu") == 0) {
			gint pointer_x = 0;
			gint pointer_y = 0;
			gint _tmp10_ = 0;
			gint _tmp11_ = 0;
			gint window_width = 0;
			gint window_height = 0;
			GtkWidget* _tmp12_;
			gint _tmp13_ = 0;
			gint _tmp14_ = 0;
			gint window_x = 0;
			gint window_y = 0;
			GtkWidget* _tmp15_;
			GdkWindow* _tmp16_;
			gint _tmp17_ = 0;
			gint _tmp18_ = 0;
			gboolean _tmp19_ = FALSE;
			gboolean _tmp20_ = FALSE;
			utils_get_pointer_position (&_tmp10_, &_tmp11_);
			pointer_x = _tmp10_;
			pointer_y = _tmp11_;
			_tmp12_ = gtk_widget_get_toplevel ((GtkWidget*) self);
			gtk_window_get_size ((GtkWindow*) G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, WIDGETS_TYPE_CONFIG_WINDOW, WidgetsConfigWindow), &_tmp13_, &_tmp14_);
			window_width = _tmp13_;
			window_height = _tmp14_;
			_tmp15_ = gtk_widget_get_toplevel ((GtkWidget*) self);
			_tmp16_ = gtk_widget_get_window ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, WIDGETS_TYPE_CONFIG_WINDOW, WidgetsConfigWindow));
			gdk_window_get_origin (_tmp16_, &_tmp17_, &_tmp18_);
			window_x = _tmp17_;
			window_y = _tmp18_;
			if (pointer_x < window_x) {
				_tmp19_ = TRUE;
			} else {
				_tmp19_ = pointer_x > (window_x + window_width);
			}
			if (_tmp19_) {
				pointer_x = window_x + (window_width / 2);
			}
			if (pointer_y < window_y) {
				_tmp20_ = TRUE;
			} else {
				_tmp20_ = pointer_y > (window_y + window_height);
			}
			if (_tmp20_) {
				pointer_y = window_y + (window_height / 2);
			}
			widgets_term_show_menu (self, pointer_x, pointer_y);
			result = TRUE;
			_g_object_unref0 (parent_window);
			_g_free0 (keyname);
			return result;
		}
		_tmp21_ = parent_window;
		_tmp22_ = _tmp21_->config;
		_tmp23_ = _tmp22_->config_file;
		_tmp24_ = g_key_file_get_string (_tmp23_, "shortcut", "copy", &_inner_error0_);
		copy_key = _tmp24_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			gboolean _tmp25_ = FALSE;
			_g_object_unref0 (parent_window);
			_g_free0 (keyname);
			if (_inner_error0_->domain == G_KEY_FILE_ERROR) {
				goto __catch0_g_key_file_error;
			}
			g_critical ("file %s: line %d: unexpected 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 _tmp25_;
		}
		_tmp27_ = copy_key;
		if (g_strcmp0 (_tmp27_, "") != 0) {
			const gchar* _tmp28_;
			const gchar* _tmp29_;
			_tmp28_ = keyname;
			_tmp29_ = copy_key;
			_tmp26_ = g_strcmp0 (_tmp28_, _tmp29_) == 0;
		} else {
			_tmp26_ = FALSE;
		}
		if (_tmp26_) {
			VteTerminal* _tmp30_;
			_tmp30_ = self->term;
			vte_terminal_copy_clipboard (_tmp30_);
			result = TRUE;
			_g_free0 (copy_key);
			_g_object_unref0 (parent_window);
			_g_free0 (keyname);
			return result;
		}
		_tmp31_ = parent_window;
		_tmp32_ = _tmp31_->config;
		_tmp33_ = _tmp32_->config_file;
		_tmp34_ = g_key_file_get_string (_tmp33_, "shortcut", "paste", &_inner_error0_);
		paste_key = _tmp34_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			gboolean _tmp35_ = FALSE;
			_g_free0 (copy_key);
			_g_object_unref0 (parent_window);
			_g_free0 (keyname);
			if (_inner_error0_->domain == G_KEY_FILE_ERROR) {
				goto __catch0_g_key_file_error;
			}
			g_critical ("file %s: line %d: unexpected 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 _tmp35_;
		}
		_tmp37_ = paste_key;
		if (g_strcmp0 (_tmp37_, "") != 0) {
			const gchar* _tmp38_;
			const gchar* _tmp39_;
			_tmp38_ = keyname;
			_tmp39_ = paste_key;
			_tmp36_ = g_strcmp0 (_tmp38_, _tmp39_) == 0;
		} else {
			_tmp36_ = FALSE;
		}
		if (_tmp36_) {
			VteTerminal* _tmp40_;
			_tmp40_ = self->term;
			vte_terminal_paste_clipboard (_tmp40_);
			result = TRUE;
			_g_free0 (paste_key);
			_g_free0 (copy_key);
			_g_object_unref0 (parent_window);
			_g_free0 (keyname);
			return result;
		}
		_tmp41_ = parent_window;
		_tmp42_ = _tmp41_->config;
		_tmp43_ = _tmp42_->config_file;
		_tmp44_ = g_key_file_get_string (_tmp43_, "shortcut", "open", &_inner_error0_);
		open_key = _tmp44_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			gboolean _tmp45_ = FALSE;
			_g_free0 (paste_key);
			_g_free0 (copy_key);
			_g_object_unref0 (parent_window);
			_g_free0 (keyname);
			if (_inner_error0_->domain == G_KEY_FILE_ERROR) {
				goto __catch0_g_key_file_error;
			}
			g_critical ("file %s: line %d: unexpected 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 _tmp45_;
		}
		_tmp47_ = open_key;
		if (g_strcmp0 (_tmp47_, "") != 0) {
			const gchar* _tmp48_;
			const gchar* _tmp49_;
			_tmp48_ = keyname;
			_tmp49_ = open_key;
			_tmp46_ = g_strcmp0 (_tmp48_, _tmp49_) == 0;
		} else {
			_tmp46_ = FALSE;
		}
		if (_tmp46_) {
			widgets_term_open_selection_file (self);
			result = TRUE;
			_g_free0 (open_key);
			_g_free0 (paste_key);
			_g_free0 (copy_key);
			_g_object_unref0 (parent_window);
			_g_free0 (keyname);
			return result;
		}
		_tmp50_ = parent_window;
		_tmp51_ = _tmp50_->config;
		_tmp52_ = _tmp51_->config_file;
		_tmp53_ = g_key_file_get_string (_tmp52_, "shortcut", "zoom_in", &_inner_error0_);
		zoom_in_key = _tmp53_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			gboolean _tmp54_ = FALSE;
			_g_free0 (open_key);
			_g_free0 (paste_key);
			_g_free0 (copy_key);
			_g_object_unref0 (parent_window);
			_g_free0 (keyname);
			if (_inner_error0_->domain == G_KEY_FILE_ERROR) {
				goto __catch0_g_key_file_error;
			}
			g_critical ("file %s: line %d: unexpected 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 _tmp54_;
		}
		_tmp56_ = zoom_in_key;
		if (g_strcmp0 (_tmp56_, "") != 0) {
			const gchar* _tmp57_;
			const gchar* _tmp58_;
			_tmp57_ = keyname;
			_tmp58_ = zoom_in_key;
			_tmp55_ = g_strcmp0 (_tmp57_, _tmp58_) == 0;
		} else {
			_tmp55_ = FALSE;
		}
		if (_tmp55_) {
			widgets_term_increment_size (self);
			result = TRUE;
			_g_free0 (zoom_in_key);
			_g_free0 (open_key);
			_g_free0 (paste_key);
			_g_free0 (copy_key);
			_g_object_unref0 (parent_window);
			_g_free0 (keyname);
			return result;
		}
		_tmp59_ = parent_window;
		_tmp60_ = _tmp59_->config;
		_tmp61_ = _tmp60_->config_file;
		_tmp62_ = g_key_file_get_string (_tmp61_, "shortcut", "zoom_out", &_inner_error0_);
		zoom_out_key = _tmp62_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			gboolean _tmp63_ = FALSE;
			_g_free0 (zoom_in_key);
			_g_free0 (open_key);
			_g_free0 (paste_key);
			_g_free0 (copy_key);
			_g_object_unref0 (parent_window);
			_g_free0 (keyname);
			if (_inner_error0_->domain == G_KEY_FILE_ERROR) {
				goto __catch0_g_key_file_error;
			}
			g_critical ("file %s: line %d: unexpected 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 _tmp63_;
		}
		_tmp65_ = zoom_out_key;
		if (g_strcmp0 (_tmp65_, "") != 0) {
			const gchar* _tmp66_;
			const gchar* _tmp67_;
			_tmp66_ = keyname;
			_tmp67_ = zoom_out_key;
			_tmp64_ = g_strcmp0 (_tmp66_, _tmp67_) == 0;
		} else {
			_tmp64_ = FALSE;
		}
		if (_tmp64_) {
			widgets_term_decrement_size (self);
			result = TRUE;
			_g_free0 (zoom_out_key);
			_g_free0 (zoom_in_key);
			_g_free0 (open_key);
			_g_free0 (paste_key);
			_g_free0 (copy_key);
			_g_object_unref0 (parent_window);
			_g_free0 (keyname);
			return result;
		}
		_tmp68_ = parent_window;
		_tmp69_ = _tmp68_->config;
		_tmp70_ = _tmp69_->config_file;
		_tmp71_ = g_key_file_get_string (_tmp70_, "shortcut", "default_size", &_inner_error0_);
		zoom_reset_key = _tmp71_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			gboolean _tmp72_ = FALSE;
			_g_free0 (zoom_out_key);
			_g_free0 (zoom_in_key);
			_g_free0 (open_key);
			_g_free0 (paste_key);
			_g_free0 (copy_key);
			_g_object_unref0 (parent_window);
			_g_free0 (keyname);
			if (_inner_error0_->domain == G_KEY_FILE_ERROR) {
				goto __catch0_g_key_file_error;
			}
			g_critical ("file %s: line %d: unexpected 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 _tmp72_;
		}
		_tmp74_ = zoom_reset_key;
		if (g_strcmp0 (_tmp74_, "") != 0) {
			const gchar* _tmp75_;
			const gchar* _tmp76_;
			_tmp75_ = keyname;
			_tmp76_ = zoom_reset_key;
			_tmp73_ = g_strcmp0 (_tmp75_, _tmp76_) == 0;
		} else {
			_tmp73_ = FALSE;
		}
		if (_tmp73_) {
			widgets_term_set_default_font_size (self);
			result = TRUE;
			_g_free0 (zoom_reset_key);
			_g_free0 (zoom_out_key);
			_g_free0 (zoom_in_key);
			_g_free0 (open_key);
			_g_free0 (paste_key);
			_g_free0 (copy_key);
			_g_object_unref0 (parent_window);
			_g_free0 (keyname);
			return result;
		}
		_tmp77_ = parent_window;
		_tmp78_ = _tmp77_->config;
		_tmp79_ = _tmp78_->config_file;
		_tmp80_ = g_key_file_get_string (_tmp79_, "shortcut", "jump_to_next_command", &_inner_error0_);
		jump_to_next_command_key = _tmp80_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			gboolean _tmp81_ = FALSE;
			_g_free0 (zoom_reset_key);
			_g_free0 (zoom_out_key);
			_g_free0 (zoom_in_key);
			_g_free0 (open_key);
			_g_free0 (paste_key);
			_g_free0 (copy_key);
			_g_object_unref0 (parent_window);
			_g_free0 (keyname);
			if (_inner_error0_->domain == G_KEY_FILE_ERROR) {
				goto __catch0_g_key_file_error;
			}
			g_critical ("file %s: line %d: unexpected 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 _tmp81_;
		}
		_tmp83_ = jump_to_next_command_key;
		if (g_strcmp0 (_tmp83_, "") != 0) {
			const gchar* _tmp84_;
			const gchar* _tmp85_;
			_tmp84_ = keyname;
			_tmp85_ = jump_to_next_command_key;
			_tmp82_ = g_strcmp0 (_tmp84_, _tmp85_) == 0;
		} else {
			_tmp82_ = FALSE;
		}
		if (_tmp82_) {
			widgets_term_jump_to_next_command (self);
			result = TRUE;
			_g_free0 (jump_to_next_command_key);
			_g_free0 (zoom_reset_key);
			_g_free0 (zoom_out_key);
			_g_free0 (zoom_in_key);
			_g_free0 (open_key);
			_g_free0 (paste_key);
			_g_free0 (copy_key);
			_g_object_unref0 (parent_window);
			_g_free0 (keyname);
			return result;
		}
		_tmp86_ = parent_window;
		_tmp87_ = _tmp86_->config;
		_tmp88_ = _tmp87_->config_file;
		_tmp89_ = g_key_file_get_string (_tmp88_, "shortcut", "jump_to_previous_command", &_inner_error0_);
		jump_to_previous_command_key = _tmp89_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			gboolean _tmp90_ = FALSE;
			_g_free0 (jump_to_next_command_key);
			_g_free0 (zoom_reset_key);
			_g_free0 (zoom_out_key);
			_g_free0 (zoom_in_key);
			_g_free0 (open_key);
			_g_free0 (paste_key);
			_g_free0 (copy_key);
			_g_object_unref0 (parent_window);
			_g_free0 (keyname);
			if (_inner_error0_->domain == G_KEY_FILE_ERROR) {
				goto __catch0_g_key_file_error;
			}
			g_critical ("file %s: line %d: unexpected 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 _tmp90_;
		}
		_tmp92_ = jump_to_previous_command_key;
		if (g_strcmp0 (_tmp92_, "") != 0) {
			const gchar* _tmp93_;
			const gchar* _tmp94_;
			_tmp93_ = keyname;
			_tmp94_ = jump_to_previous_command_key;
			_tmp91_ = g_strcmp0 (_tmp93_, _tmp94_) == 0;
		} else {
			_tmp91_ = FALSE;
		}
		if (_tmp91_) {
			widgets_term_jump_to_previous_command (self);
			result = TRUE;
			_g_free0 (jump_to_previous_command_key);
			_g_free0 (jump_to_next_command_key);
			_g_free0 (zoom_reset_key);
			_g_free0 (zoom_out_key);
			_g_free0 (zoom_in_key);
			_g_free0 (open_key);
			_g_free0 (paste_key);
			_g_free0 (copy_key);
			_g_object_unref0 (parent_window);
			_g_free0 (keyname);
			return result;
		}
		_tmp96_ = keyname;
		if (g_strcmp0 (_tmp96_, "Enter") == 0) {
			_tmp95_ = TRUE;
		} else {
			const gchar* _tmp97_;
			_tmp97_ = keyname;
			_tmp95_ = g_strcmp0 (_tmp97_, "Ctrl + m") == 0;
		}
		if (_tmp95_) {
			if (self->priv->enter_sz_command) {
				widgets_term_execute_download (self);
				self->priv->enter_sz_command = FALSE;
			} else {
				if (!widgets_term_has_foreground_process (self)) {
					gint y_coordinate = 0;
					GtkScrollbar* _tmp98_;
					GtkAdjustment* _tmp99_;
					gboolean _tmp100_ = FALSE;
					GeeArrayList* _tmp101_;
					gint _tmp102_;
					gint _tmp103_;
					_tmp98_ = self->scrollbar;
					_tmp99_ = gtk_range_get_adjustment ((GtkRange*) _tmp98_);
					y_coordinate = (gint) gtk_adjustment_get_value (_tmp99_);
					_tmp101_ = self->command_execute_y_coordinates;
					_tmp102_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp101_);
					_tmp103_ = _tmp102_;
					if (_tmp103_ == 0) {
						_tmp100_ = TRUE;
					} else {
						GeeArrayList* _tmp104_;
						GeeArrayList* _tmp105_;
						gint _tmp106_;
						gint _tmp107_;
						gpointer _tmp108_;
						_tmp104_ = self->command_execute_y_coordinates;
						_tmp105_ = self->command_execute_y_coordinates;
						_tmp106_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp105_);
						_tmp107_ = _tmp106_;
						_tmp108_ = gee_abstract_list_get ((GeeAbstractList*) _tmp104_, _tmp107_ - 1);
						_tmp100_ = y_coordinate != ((gint) ((gintptr) _tmp108_));
					}
					if (_tmp100_) {
						GeeArrayList* _tmp109_;
						_tmp109_ = self->command_execute_y_coordinates;
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp109_, (gpointer) ((gintptr) y_coordinate));
					}
				}
			}
		}
		_tmp111_ = keyname;
		if (g_strcmp0 (_tmp111_, "Ctrl + c") == 0) {
			_tmp110_ = TRUE;
		} else {
			const gchar* _tmp112_;
			_tmp112_ = keyname;
			_tmp110_ = g_strcmp0 (_tmp112_, "Ctrl + d") == 0;
		}
		if (_tmp110_) {
			self->priv->enter_sz_command = FALSE;
			result = FALSE;
			_g_free0 (jump_to_previous_command_key);
			_g_free0 (jump_to_next_command_key);
			_g_free0 (zoom_reset_key);
			_g_free0 (zoom_out_key);
			_g_free0 (zoom_in_key);
			_g_free0 (open_key);
			_g_free0 (paste_key);
			_g_free0 (copy_key);
			_g_object_unref0 (parent_window);
			_g_free0 (keyname);
			return result;
		}
		_tmp114_ = keyname;
		_tmp115_ = strlen (_tmp114_);
		_tmp116_ = _tmp115_;
		if (_tmp116_ > 1) {
			const gchar* _tmp117_;
			_tmp117_ = keyname;
			_tmp113_ = g_strcmp0 (_tmp117_, "Enter") != 0;
		} else {
			_tmp113_ = FALSE;
		}
		if (_tmp113_) {
			gchar* command_config_file_path = NULL;
			gchar* _tmp118_;
			GFile* file = NULL;
			const gchar* _tmp119_;
			GFile* _tmp120_;
			GFile* _tmp121_;
			_tmp118_ = utils_get_config_file_path ("command-config.conf");
			command_config_file_path = _tmp118_;
			_tmp119_ = command_config_file_path;
			_tmp120_ = g_file_new_for_path (_tmp119_);
			file = _tmp120_;
			_tmp121_ = file;
			if (g_file_query_exists (_tmp121_, NULL)) {
				{
					GKeyFile* command_config_file = NULL;
					GKeyFile* _tmp122_;
					GKeyFile* _tmp123_;
					const gchar* _tmp124_;
					GKeyFile* _tmp125_;
					gsize _tmp126_ = 0;
					gchar** _tmp127_;
					_tmp122_ = g_key_file_new ();
					command_config_file = _tmp122_;
					_tmp123_ = command_config_file;
					_tmp124_ = command_config_file_path;
					g_key_file_load_from_file (_tmp123_, _tmp124_, G_KEY_FILE_NONE, &_inner_error0_);
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
						_g_key_file_unref0 (command_config_file);
						goto __catch1_g_error;
					}
					_tmp125_ = command_config_file;
					_tmp127_ = g_key_file_get_groups (_tmp125_, &_tmp126_);
					{
						gchar** option_collection = NULL;
						gint option_collection_length1 = 0;
						gint _option_collection_size_ = 0;
						gint option_it = 0;
						option_collection = _tmp127_;
						option_collection_length1 = _tmp126_;
						for (option_it = 0; option_it < option_collection_length1; option_it = option_it + 1) {
							const gchar* option = NULL;
							option = option_collection[option_it];
							{
								gchar* _tmp128_ = NULL;
								GKeyFile* _tmp129_;
								const gchar* _tmp130_;
								gchar* _tmp131_;
								const gchar* _tmp132_;
								_tmp129_ = command_config_file;
								_tmp130_ = option;
								_tmp131_ = g_key_file_get_value (_tmp129_, _tmp130_, "Shortcut", &_inner_error0_);
								_tmp128_ = _tmp131_;
								if (G_UNLIKELY (_inner_error0_ != NULL)) {
									option_collection = (_vala_array_free (option_collection, option_collection_length1, (GDestroyNotify) g_free), NULL);
									_g_key_file_unref0 (command_config_file);
									goto __catch1_g_error;
								}
								_tmp132_ = keyname;
								if (g_strcmp0 (_tmp132_, _tmp128_) == 0) {
									gchar* _tmp133_ = NULL;
									GKeyFile* _tmp134_;
									const gchar* _tmp135_;
									gchar* _tmp136_;
									gchar* command_string = NULL;
									gchar* _tmp137_;
									VteTerminal* _tmp138_;
									const gchar* _tmp139_;
									gint _tmp140_ = 0;
									guint8* _tmp141_;
									guint8* _tmp142_;
									gint _tmp142__length1;
									_tmp134_ = command_config_file;
									_tmp135_ = option;
									_tmp136_ = g_key_file_get_value (_tmp134_, _tmp135_, "Command", &_inner_error0_);
									_tmp133_ = _tmp136_;
									if (G_UNLIKELY (_inner_error0_ != NULL)) {
										_g_free0 (_tmp128_);
										option_collection = (_vala_array_free (option_collection, option_collection_length1, (GDestroyNotify) g_free), NULL);
										_g_key_file_unref0 (command_config_file);
										goto __catch1_g_error;
									}
									_tmp137_ = g_strdup_printf ("%s\n", _tmp133_);
									command_string = _tmp137_;
									_tmp138_ = self->term;
									_tmp139_ = command_string;
									_tmp141_ = utils_to_raw_data (_tmp139_, &_tmp140_);
									_tmp142_ = _tmp141_;
									_tmp142__length1 = _tmp140_;
									vte_terminal_feed_child (_tmp138_, _tmp142_, (gssize) _tmp140_);
									_tmp142_ = (g_free (_tmp142_), NULL);
									result = TRUE;
									_g_free0 (command_string);
									_g_free0 (_tmp133_);
									_g_free0 (_tmp128_);
									option_collection = (_vala_array_free (option_collection, option_collection_length1, (GDestroyNotify) g_free), NULL);
									_g_key_file_unref0 (command_config_file);
									_g_object_unref0 (file);
									_g_free0 (command_config_file_path);
									_g_free0 (jump_to_previous_command_key);
									_g_free0 (jump_to_next_command_key);
									_g_free0 (zoom_reset_key);
									_g_free0 (zoom_out_key);
									_g_free0 (zoom_in_key);
									_g_free0 (open_key);
									_g_free0 (paste_key);
									_g_free0 (copy_key);
									_g_object_unref0 (parent_window);
									_g_free0 (keyname);
									return result;
								}
								_g_free0 (_tmp128_);
							}
						}
						option_collection = (_vala_array_free (option_collection, option_collection_length1, (GDestroyNotify) g_free), NULL);
					}
					_g_key_file_unref0 (command_config_file);
				}
				goto __finally1;
				__catch1_g_error:
				{
					GError* e = NULL;
					const gchar* _tmp143_;
					e = _inner_error0_;
					_inner_error0_ = NULL;
					_tmp143_ = command_config_file_path;
					if (!g_file_test (_tmp143_, G_FILE_TEST_EXISTS)) {
						GError* _tmp144_;
						const gchar* _tmp145_;
						_tmp144_ = e;
						_tmp145_ = _tmp144_->message;
						g_print ("Config: %s\n", _tmp145_);
					}
					_g_error_free0 (e);
				}
				__finally1:
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					gboolean _tmp146_ = FALSE;
					_g_object_unref0 (file);
					_g_free0 (command_config_file_path);
					_g_free0 (jump_to_previous_command_key);
					_g_free0 (jump_to_next_command_key);
					_g_free0 (zoom_reset_key);
					_g_free0 (zoom_out_key);
					_g_free0 (zoom_in_key);
					_g_free0 (open_key);
					_g_free0 (paste_key);
					_g_free0 (copy_key);
					_g_object_unref0 (parent_window);
					_g_free0 (keyname);
					if (_inner_error0_->domain == G_KEY_FILE_ERROR) {
						goto __catch0_g_key_file_error;
					}
					g_critical ("file %s: line %d: unexpected 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 _tmp146_;
				}
			}
			_g_object_unref0 (file);
			_g_free0 (command_config_file_path);
		}
		result = FALSE;
		_g_free0 (jump_to_previous_command_key);
		_g_free0 (jump_to_next_command_key);
		_g_free0 (zoom_reset_key);
		_g_free0 (zoom_out_key);
		_g_free0 (zoom_in_key);
		_g_free0 (open_key);
		_g_free0 (paste_key);
		_g_free0 (copy_key);
		_g_object_unref0 (parent_window);
		_g_free0 (keyname);
		return result;
	}
	goto __finally0;
	__catch0_g_key_file_error:
	{
		GError* e = NULL;
		GError* _tmp147_;
		const gchar* _tmp148_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp147_ = e;
		_tmp148_ = _tmp147_->message;
		g_print ("Terminal on_key_press: %s\n", _tmp148_);
		result = FALSE;
		_g_error_free0 (e);
		return result;
	}
	__finally0:
	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 _tmp149_;
}

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

void
widgets_term_update_font_info (WidgetsTerm* self)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	{
		WidgetsConfigWindow* parent_window = NULL;
		VteTerminal* _tmp0_;
		GtkWidget* _tmp1_;
		WidgetsConfigWindow* _tmp2_;
		gchar* font = NULL;
		ConfigConfig* _tmp3_;
		GKeyFile* _tmp4_;
		gchar* _tmp5_;
		PangoFontDescription* current_font = NULL;
		PangoFontDescription* _tmp6_;
		PangoFontDescription* _tmp7_;
		PangoFontDescription* _tmp8_;
		VteTerminal* _tmp9_;
		PangoFontDescription* _tmp10_;
		_tmp0_ = self->term;
		_tmp1_ = gtk_widget_get_toplevel ((GtkWidget*) _tmp0_);
		_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, WIDGETS_TYPE_CONFIG_WINDOW, WidgetsConfigWindow));
		parent_window = _tmp2_;
		_tmp3_ = parent_window->config;
		_tmp4_ = _tmp3_->config_file;
		_tmp5_ = g_key_file_get_string (_tmp4_, "general", "font", &_inner_error0_);
		font = _tmp5_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_object_unref0 (parent_window);
			if (_inner_error0_->domain == G_KEY_FILE_ERROR) {
				goto __catch0_g_key_file_error;
			}
			g_critical ("file %s: line %d: unexpected 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;
		}
		_tmp6_ = pango_font_description_new ();
		current_font = _tmp6_;
		_tmp7_ = current_font;
		pango_font_description_set_family (_tmp7_, font);
		_tmp8_ = current_font;
		pango_font_description_set_size (_tmp8_, (gint) (self->font_size * self->zoom_factor));
		_tmp9_ = self->term;
		_tmp10_ = current_font;
		vte_terminal_set_font (_tmp9_, _tmp10_);
		__vala_PangoFontDescription_free0 (current_font);
		_g_free0 (font);
		_g_object_unref0 (parent_window);
	}
	goto __finally0;
	__catch0_g_key_file_error:
	{
		GError* e = NULL;
		GError* _tmp11_;
		const gchar* _tmp12_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp11_ = e;
		_tmp12_ = _tmp11_->message;
		g_print ("Terminal update_font_info: %s\n", _tmp12_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		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;
	}
}

void
widgets_term_increment_size (WidgetsTerm* self)
{
	g_return_if_fail (self != NULL);
	if (self->zoom_factor < ((gdouble) 3)) {
		self->zoom_factor = self->zoom_factor + 0.1;
		widgets_term_update_font_info (self);
	}
}

void
widgets_term_decrement_size (WidgetsTerm* self)
{
	g_return_if_fail (self != NULL);
	if (self->zoom_factor > 0.8) {
		self->zoom_factor = self->zoom_factor - 0.1;
		widgets_term_update_font_info (self);
	}
}

void
widgets_term_set_default_font_size (WidgetsTerm* self)
{
	g_return_if_fail (self != NULL);
	self->zoom_factor = 1.0;
	widgets_term_update_font_info (self);
}

void
widgets_term_jump_to_next_command (WidgetsTerm* self)
{
	gboolean jump_once = FALSE;
	gint y_coordinate = 0;
	GtkScrollbar* _tmp0_;
	GtkAdjustment* _tmp1_;
	g_return_if_fail (self != NULL);
	jump_once = FALSE;
	_tmp0_ = self->scrollbar;
	_tmp1_ = gtk_range_get_adjustment ((GtkRange*) _tmp0_);
	y_coordinate = (gint) gtk_adjustment_get_value (_tmp1_);
	{
		GeeArrayList* _command_y_coordiante_list = NULL;
		GeeArrayList* _tmp2_;
		gint _command_y_coordiante_size = 0;
		GeeArrayList* _tmp3_;
		gint _tmp4_;
		gint _tmp5_;
		gint _command_y_coordiante_index = 0;
		_tmp2_ = self->command_execute_y_coordinates;
		_command_y_coordiante_list = _tmp2_;
		_tmp3_ = _command_y_coordiante_list;
		_tmp4_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp3_);
		_tmp5_ = _tmp4_;
		_command_y_coordiante_size = _tmp5_;
		_command_y_coordiante_index = -1;
		while (TRUE) {
			gint _tmp6_;
			gint _tmp7_;
			gint command_y_coordiante = 0;
			GeeArrayList* _tmp8_;
			gpointer _tmp9_;
			_command_y_coordiante_index = _command_y_coordiante_index + 1;
			_tmp6_ = _command_y_coordiante_index;
			_tmp7_ = _command_y_coordiante_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _command_y_coordiante_list;
			_tmp9_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _command_y_coordiante_index);
			command_y_coordiante = (gint) ((gintptr) _tmp9_);
			if (y_coordinate < command_y_coordiante) {
				GtkScrollbar* _tmp10_;
				GtkAdjustment* _tmp11_;
				jump_once = TRUE;
				_tmp10_ = self->scrollbar;
				_tmp11_ = gtk_range_get_adjustment ((GtkRange*) _tmp10_);
				gtk_adjustment_set_value (_tmp11_, (gdouble) command_y_coordiante);
				break;
			}
		}
	}
	if (!jump_once) {
		GtkScrollbar* _tmp12_;
		GtkAdjustment* _tmp13_;
		GtkScrollbar* _tmp14_;
		GtkAdjustment* _tmp15_;
		_tmp12_ = self->scrollbar;
		_tmp13_ = gtk_range_get_adjustment ((GtkRange*) _tmp12_);
		_tmp14_ = self->scrollbar;
		_tmp15_ = gtk_range_get_adjustment ((GtkRange*) _tmp14_);
		gtk_adjustment_set_value (_tmp13_, gtk_adjustment_get_upper (_tmp15_));
	}
}

void
widgets_term_jump_to_previous_command (WidgetsTerm* self)
{
	gint y_coordinate = 0;
	GtkScrollbar* _tmp0_;
	GtkAdjustment* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->scrollbar;
	_tmp1_ = gtk_range_get_adjustment ((GtkRange*) _tmp0_);
	y_coordinate = (gint) gtk_adjustment_get_value (_tmp1_);
	{
		gint count = 0;
		count = 0;
		{
			gboolean _tmp2_ = FALSE;
			_tmp2_ = TRUE;
			while (TRUE) {
				GeeArrayList* _tmp4_;
				gint _tmp5_;
				gint _tmp6_;
				GeeArrayList* _tmp7_;
				GeeArrayList* _tmp8_;
				gint _tmp9_;
				gint _tmp10_;
				gpointer _tmp11_;
				if (!_tmp2_) {
					gint _tmp3_;
					_tmp3_ = count;
					count = _tmp3_ + 1;
				}
				_tmp2_ = FALSE;
				_tmp4_ = self->command_execute_y_coordinates;
				_tmp5_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp4_);
				_tmp6_ = _tmp5_;
				if (!(count < _tmp6_)) {
					break;
				}
				_tmp7_ = self->command_execute_y_coordinates;
				_tmp8_ = self->command_execute_y_coordinates;
				_tmp9_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp8_);
				_tmp10_ = _tmp9_;
				_tmp11_ = gee_abstract_list_get ((GeeAbstractList*) _tmp7_, (_tmp10_ - 1) - count);
				if (y_coordinate > ((gint) ((gintptr) _tmp11_))) {
					GtkScrollbar* _tmp12_;
					GtkAdjustment* _tmp13_;
					GeeArrayList* _tmp14_;
					GeeArrayList* _tmp15_;
					gint _tmp16_;
					gint _tmp17_;
					gpointer _tmp18_;
					_tmp12_ = self->scrollbar;
					_tmp13_ = gtk_range_get_adjustment ((GtkRange*) _tmp12_);
					_tmp14_ = self->command_execute_y_coordinates;
					_tmp15_ = self->command_execute_y_coordinates;
					_tmp16_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp15_);
					_tmp17_ = _tmp16_;
					_tmp18_ = gee_abstract_list_get ((GeeAbstractList*) _tmp14_, (_tmp17_ - 1) - count);
					gtk_adjustment_set_value (_tmp13_, (gdouble) ((gint) ((gintptr) _tmp18_)));
					break;
				}
			}
		}
	}
}

static Block44Data*
block44_data_ref (Block44Data* _data44_)
{
	g_atomic_int_inc (&_data44_->_ref_count_);
	return _data44_;
}

static void
block44_data_unref (void * _userdata_)
{
	Block44Data* _data44_;
	_data44_ = (Block44Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data44_->_ref_count_)) {
		WidgetsTerm* self;
		self = _data44_->self;
		_data44_->uris = (_vala_array_free (_data44_->uris, _data44_->uris_length1, (GDestroyNotify) g_free), NULL);
		_g_object_unref0 (self);
		g_slice_free (Block44Data, _data44_);
	}
}

static gboolean
____lambda251_ (Block44Data* _data44_)
{
	WidgetsTerm* self;
	gchar* upload_command = NULL;
	gchar* _tmp0_;
	gchar** _tmp1_;
	gint _tmp1__length1;
	const gchar* _tmp10_;
	gchar* _tmp11_;
	VteTerminal* _tmp12_;
	const gchar* _tmp13_;
	gint _tmp14_ = 0;
	guint8* _tmp15_;
	guint8* _tmp16_;
	gint _tmp16__length1;
	gboolean result;
	self = _data44_->self;
	_tmp0_ = g_strdup ("sz ");
	upload_command = _tmp0_;
	_tmp1_ = _data44_->uris;
	_tmp1__length1 = _data44_->uris_length1;
	{
		gchar** file_path_collection = NULL;
		gint file_path_collection_length1 = 0;
		gint _file_path_collection_size_ = 0;
		gint file_path_it = 0;
		file_path_collection = _tmp1_;
		file_path_collection_length1 = _tmp1__length1;
		for (file_path_it = 0; file_path_it < file_path_collection_length1; file_path_it = file_path_it + 1) {
			gchar* _tmp2_;
			gchar* file_path = NULL;
			_tmp2_ = g_strdup (file_path_collection[file_path_it]);
			file_path = _tmp2_;
			{
				const gchar* _tmp3_;
				gchar* _tmp4_;
				gchar* _tmp5_;
				const gchar* _tmp6_;
				gchar* _tmp7_;
				gchar* _tmp8_;
				gchar* _tmp9_;
				_tmp3_ = upload_command;
				_tmp4_ = g_strconcat (_tmp3_, "'", NULL);
				_tmp5_ = _tmp4_;
				_tmp6_ = file_path;
				_tmp7_ = g_strconcat (_tmp5_, _tmp6_, NULL);
				_tmp8_ = _tmp7_;
				_tmp9_ = g_strconcat (_tmp8_, "' ", NULL);
				_g_free0 (upload_command);
				upload_command = _tmp9_;
				_g_free0 (_tmp8_);
				_g_free0 (_tmp5_);
				_g_free0 (file_path);
			}
		}
	}
	_tmp10_ = upload_command;
	_tmp11_ = g_strconcat (_tmp10_, "\n", NULL);
	_g_free0 (upload_command);
	upload_command = _tmp11_;
	_tmp12_ = self->term;
	_tmp13_ = upload_command;
	_tmp15_ = utils_to_raw_data (_tmp13_, &_tmp14_);
	_tmp16_ = _tmp15_;
	_tmp16__length1 = _tmp14_;
	vte_terminal_feed_child (_tmp12_, _tmp16_, (gssize) _tmp14_);
	_tmp16_ = (g_free (_tmp16_), NULL);
	result = FALSE;
	_g_free0 (upload_command);
	return result;
}

static gboolean
_____lambda251__gsource_func (gpointer self)
{
	gboolean result;
	result = ____lambda251_ (self);
	return result;
}

static gchar*
_vala_g_strjoinv (const gchar* separator,
                  gchar** str_array,
                  gint str_array_length1)
{
	gboolean _tmp0_ = FALSE;
	gchar* result;
	if (separator == NULL) {
		separator = "";
	}
	if (str_array != NULL) {
		gboolean _tmp1_ = FALSE;
		if (str_array_length1 > 0) {
			_tmp1_ = TRUE;
		} else {
			gboolean _tmp2_ = FALSE;
			if (str_array_length1 == -1) {
				const gchar* _tmp3_;
				_tmp3_ = str_array[0];
				_tmp2_ = _tmp3_ != NULL;
			} else {
				_tmp2_ = FALSE;
			}
			_tmp1_ = _tmp2_;
		}
		_tmp0_ = _tmp1_;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		gint i = 0;
		gsize len = 0UL;
		gint _tmp16_;
		gint _tmp17_;
		const gchar* res = NULL;
		void* _tmp18_;
		const gchar* _tmp19_ = NULL;
		const gchar* _tmp20_;
		void* ptr = NULL;
		const gchar* _tmp22_;
		void* _tmp23_;
		const gchar* _tmp33_;
		len = (gsize) 1;
		{
			gboolean _tmp4_ = FALSE;
			i = 0;
			_tmp4_ = TRUE;
			while (TRUE) {
				gboolean _tmp6_ = FALSE;
				gboolean _tmp7_ = FALSE;
				gint _tmp10_ = 0;
				const gchar* _tmp11_;
				if (!_tmp4_) {
					gint _tmp5_;
					_tmp5_ = i;
					i = _tmp5_ + 1;
				}
				_tmp4_ = FALSE;
				if (str_array_length1 != -1) {
					_tmp7_ = i < str_array_length1;
				} else {
					_tmp7_ = FALSE;
				}
				if (_tmp7_) {
					_tmp6_ = TRUE;
				} else {
					gboolean _tmp8_ = FALSE;
					if (str_array_length1 == -1) {
						const gchar* _tmp9_;
						_tmp9_ = str_array[i];
						_tmp8_ = _tmp9_ != NULL;
					} else {
						_tmp8_ = FALSE;
					}
					_tmp6_ = _tmp8_;
				}
				if (!_tmp6_) {
					break;
				}
				_tmp11_ = str_array[i];
				if (_tmp11_ != NULL) {
					const gchar* _tmp12_;
					gint _tmp13_;
					gint _tmp14_;
					_tmp12_ = str_array[i];
					_tmp13_ = strlen ((const gchar*) _tmp12_);
					_tmp14_ = _tmp13_;
					_tmp10_ = _tmp14_;
				} else {
					_tmp10_ = 0;
				}
				len += (gsize) _tmp10_;
			}
		}
		if (i == 0) {
			gchar* _tmp15_;
			_tmp15_ = g_strdup ("");
			result = _tmp15_;
			return result;
		}
		str_array_length1 = i;
		_tmp16_ = strlen ((const gchar*) separator);
		_tmp17_ = _tmp16_;
		len += (gsize) (_tmp17_ * (i - 1));
		_tmp18_ = g_malloc (len);
		res = _tmp18_;
		_tmp20_ = str_array[0];
		if (_tmp20_ != NULL) {
			const gchar* _tmp21_;
			_tmp21_ = str_array[0];
			_tmp19_ = (const gchar*) _tmp21_;
		} else {
			_tmp19_ = "";
		}
		_tmp22_ = res;
		_tmp23_ = g_stpcpy ((void*) _tmp22_, _tmp19_);
		ptr = _tmp23_;
		{
			gboolean _tmp24_ = FALSE;
			i = 1;
			_tmp24_ = TRUE;
			while (TRUE) {
				void* _tmp26_;
				void* _tmp27_;
				const gchar* _tmp28_ = NULL;
				const gchar* _tmp29_;
				void* _tmp31_;
				void* _tmp32_;
				if (!_tmp24_) {
					gint _tmp25_;
					_tmp25_ = i;
					i = _tmp25_ + 1;
				}
				_tmp24_ = FALSE;
				if (!(i < str_array_length1)) {
					break;
				}
				_tmp26_ = ptr;
				_tmp27_ = g_stpcpy (_tmp26_, (const gchar*) separator);
				ptr = _tmp27_;
				_tmp29_ = str_array[i];
				if (_tmp29_ != NULL) {
					const gchar* _tmp30_;
					_tmp30_ = str_array[i];
					_tmp28_ = (const gchar*) _tmp30_;
				} else {
					_tmp28_ = "";
				}
				_tmp31_ = ptr;
				_tmp32_ = g_stpcpy (_tmp31_, _tmp28_);
				ptr = _tmp32_;
			}
		}
		_tmp33_ = res;
		res = NULL;
		result = (gchar*) _tmp33_;
		return result;
	} else {
		gchar* _tmp34_;
		_tmp34_ = g_strdup ("");
		result = _tmp34_;
		return result;
	}
}

void
widgets_term_drag_received (WidgetsTerm* self,
                            GdkDragContext* context,
                            gint x,
                            gint y,
                            GtkSelectionData* selection_data,
                            guint target_type,
                            guint time_)
{
	VteTerminal* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (context != NULL);
	g_return_if_fail (selection_data != NULL);
	_tmp0_ = self->term;
	gtk_widget_grab_focus ((GtkWidget*) _tmp0_);
	switch (target_type) {
		case WIDGETS_TERM_DROP_TARGETS_URILIST:
		{
			Block44Data* _data44_;
			gchar** _tmp1_;
			gchar** _tmp2_;
			gchar* path = NULL;
			GFile* file = NULL;
			_data44_ = g_slice_new0 (Block44Data);
			_data44_->_ref_count_ = 1;
			_data44_->self = g_object_ref (self);
			_tmp2_ = _tmp1_ = gtk_selection_data_get_uris (selection_data);
			_data44_->uris = _tmp2_;
			_data44_->uris_length1 = _vala_array_length (_tmp1_);
			_data44_->_uris_size_ = _data44_->uris_length1;
			if (self->login_remote_server) {
				{
					gint i = 0;
					i = 0;
					{
						gboolean _tmp3_ = FALSE;
						_tmp3_ = TRUE;
						while (TRUE) {
							gchar** _tmp5_;
							gint _tmp5__length1;
							gchar** _tmp6_;
							gint _tmp6__length1;
							const gchar* _tmp7_;
							GFile* _tmp8_;
							GFile* _tmp9_;
							gchar* _tmp10_;
							const gchar* _tmp11_;
							if (!_tmp3_) {
								gint _tmp4_;
								_tmp4_ = i;
								i = _tmp4_ + 1;
							}
							_tmp3_ = FALSE;
							_tmp5_ = _data44_->uris;
							_tmp5__length1 = _data44_->uris_length1;
							if (!(i < _tmp5__length1)) {
								break;
							}
							_tmp6_ = _data44_->uris;
							_tmp6__length1 = _data44_->uris_length1;
							_tmp7_ = _tmp6_[i];
							_tmp8_ = g_file_new_for_uri (_tmp7_);
							_g_object_unref0 (file);
							file = _tmp8_;
							_tmp9_ = file;
							_tmp10_ = g_file_get_path (_tmp9_);
							_g_free0 (path);
							path = _tmp10_;
							_tmp11_ = path;
							if (_tmp11_ != NULL) {
								gchar** _tmp12_;
								gint _tmp12__length1;
								const gchar* _tmp13_;
								gchar* _tmp14_;
								_tmp12_ = _data44_->uris;
								_tmp12__length1 = _data44_->uris_length1;
								_tmp13_ = path;
								_tmp14_ = g_shell_quote (_tmp13_);
								_g_free0 (_tmp12_[i]);
								_tmp12_[i] = _tmp14_;
							}
						}
					}
				}
				widgets_term_press_ctrl_at (self);
				g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 500, _____lambda251__gsource_func, block44_data_ref (_data44_), block44_data_unref);
			} else {
				gchar* uris_s = NULL;
				gchar** _tmp29_;
				gint _tmp29__length1;
				gchar* _tmp30_;
				VteTerminal* _tmp31_;
				const gchar* _tmp32_;
				gint _tmp33_ = 0;
				guint8* _tmp34_;
				guint8* _tmp35_;
				gint _tmp35__length1;
				{
					gint i = 0;
					i = 0;
					{
						gboolean _tmp15_ = FALSE;
						_tmp15_ = TRUE;
						while (TRUE) {
							gchar** _tmp17_;
							gint _tmp17__length1;
							gchar** _tmp18_;
							gint _tmp18__length1;
							const gchar* _tmp19_;
							GFile* _tmp20_;
							GFile* _tmp21_;
							gchar* _tmp22_;
							const gchar* _tmp23_;
							if (!_tmp15_) {
								gint _tmp16_;
								_tmp16_ = i;
								i = _tmp16_ + 1;
							}
							_tmp15_ = FALSE;
							_tmp17_ = _data44_->uris;
							_tmp17__length1 = _data44_->uris_length1;
							if (!(i < _tmp17__length1)) {
								break;
							}
							_tmp18_ = _data44_->uris;
							_tmp18__length1 = _data44_->uris_length1;
							_tmp19_ = _tmp18_[i];
							_tmp20_ = g_file_new_for_uri (_tmp19_);
							_g_object_unref0 (file);
							file = _tmp20_;
							_tmp21_ = file;
							_tmp22_ = g_file_get_path (_tmp21_);
							_g_free0 (path);
							path = _tmp22_;
							_tmp23_ = path;
							if (_tmp23_ != NULL) {
								gchar** _tmp24_;
								gint _tmp24__length1;
								const gchar* _tmp25_;
								gchar* _tmp26_;
								gchar* _tmp27_;
								gchar* _tmp28_;
								_tmp24_ = _data44_->uris;
								_tmp24__length1 = _data44_->uris_length1;
								_tmp25_ = path;
								_tmp26_ = g_shell_quote (_tmp25_);
								_tmp27_ = _tmp26_;
								_tmp28_ = g_strconcat (_tmp27_, " ", NULL);
								_g_free0 (_tmp24_[i]);
								_tmp24_[i] = _tmp28_;
								_g_free0 (_tmp27_);
							}
						}
					}
				}
				_tmp29_ = _data44_->uris;
				_tmp29__length1 = _data44_->uris_length1;
				_tmp30_ = _vala_g_strjoinv ("", _tmp29_, (gint) _tmp29__length1);
				uris_s = _tmp30_;
				_tmp31_ = self->term;
				_tmp32_ = uris_s;
				_tmp34_ = utils_to_raw_data (_tmp32_, &_tmp33_);
				_tmp35_ = _tmp34_;
				_tmp35__length1 = _tmp33_;
				vte_terminal_feed_child (_tmp31_, _tmp35_, (gssize) _tmp33_);
				_tmp35_ = (g_free (_tmp35_), NULL);
				_g_free0 (uris_s);
			}
			_g_object_unref0 (file);
			_g_free0 (path);
			block44_data_unref (_data44_);
			_data44_ = NULL;
			break;
		}
		case WIDGETS_TERM_DROP_TARGETS_STRING:
		case WIDGETS_TERM_DROP_TARGETS_TEXT:
		{
			gchar* data = NULL;
			gchar* _tmp36_;
			const gchar* _tmp37_;
			_tmp36_ = gtk_selection_data_get_text (selection_data);
			data = _tmp36_;
			_tmp37_ = data;
			if (_tmp37_ != NULL) {
				VteTerminal* _tmp38_;
				const gchar* _tmp39_;
				gint _tmp40_ = 0;
				guint8* _tmp41_;
				guint8* _tmp42_;
				gint _tmp42__length1;
				_tmp38_ = self->term;
				_tmp39_ = data;
				_tmp41_ = utils_to_raw_data (_tmp39_, &_tmp40_);
				_tmp42_ = _tmp41_;
				_tmp42__length1 = _tmp40_;
				vte_terminal_feed_child (_tmp38_, _tmp42_, (gssize) _tmp40_);
				_tmp42_ = (g_free (_tmp42_), NULL);
			}
			_g_free0 (data);
			break;
		}
		default:
		break;
	}
}

static void
widgets_term_clickable (WidgetsTerm* self,
                        gchar** str,
                        gint str_length1)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	{
		gchar** exp_collection = NULL;
		gint exp_collection_length1 = 0;
		gint _exp_collection_size_ = 0;
		gint exp_it = 0;
		exp_collection = str;
		exp_collection_length1 = str_length1;
		for (exp_it = 0; exp_it < exp_collection_length1; exp_it = exp_it + 1) {
			gchar* _tmp0_;
			gchar* exp = NULL;
			_tmp0_ = g_strdup (exp_collection[exp_it]);
			exp = _tmp0_;
			{
				{
					VteRegex* regex = NULL;
					const gchar* _tmp1_;
					VteRegex* _tmp2_;
					gint id = 0;
					VteTerminal* _tmp3_;
					VteRegex* _tmp4_;
					VteTerminal* _tmp5_;
					_tmp1_ = exp;
					_tmp2_ = vte_regex_new_for_match (_tmp1_, (gssize) -1, (guint32) 0x00000400U, &_inner_error0_);
					regex = _tmp2_;
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
						if (_inner_error0_->domain == G_REGEX_ERROR) {
							goto __catch0_g_regex_error;
						}
						goto __finally0;
					}
					_tmp3_ = self->term;
					_tmp4_ = regex;
					id = vte_terminal_match_add_regex (_tmp3_, _tmp4_, (guint32) 0);
					_tmp5_ = self->term;
					vte_terminal_match_set_cursor_type (_tmp5_, id, GDK_HAND2);
					_vte_regex_unref0 (regex);
				}
				goto __finally0;
				__catch0_g_regex_error:
				{
					GError* _error_ = NULL;
					GError* _tmp6_;
					const gchar* _tmp7_;
					_error_ = _inner_error0_;
					_inner_error0_ = NULL;
					_tmp6_ = _error_;
					_tmp7_ = _tmp6_->message;
					g_warning ("terminal.vala:1140: %s", _tmp7_);
					_g_error_free0 (_error_);
				}
				__finally0:
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					_g_free0 (exp);
					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;
				}
				_g_free0 (exp);
			}
		}
	}
}

static Block45Data*
block45_data_ref (Block45Data* _data45_)
{
	g_atomic_int_inc (&_data45_->_ref_count_);
	return _data45_;
}

static void
block45_data_unref (void * _userdata_)
{
	Block45Data* _data45_;
	_data45_ = (Block45Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data45_->_ref_count_)) {
		WidgetsTerm* self;
		self = _data45_->self;
		_data45_->argv = (_vala_array_free (_data45_->argv, _data45_->argv_length1, (GDestroyNotify) g_free), NULL);
		_g_free0 (_data45_->directory);
		_g_object_unref0 (self);
		g_slice_free (Block45Data, _data45_);
	}
}

static gchar
string_get (const gchar* self,
            glong index)
{
	gchar _tmp0_;
	gchar result;
	g_return_val_if_fail (self != NULL, '\0');
	_tmp0_ = ((gchar*) self)[index];
	result = _tmp0_;
	return result;
}

static void
_vala_array_add9 (gchar** * array,
                  gint* length,
                  gint* size,
                  gchar* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static gboolean
___lambda255_ (WidgetsTerm* self)
{
	gboolean result;
	widgets_term_update_terminal_title (self);
	result = FALSE;
	return result;
}

static gboolean
____lambda255__gsource_func (gpointer self)
{
	gboolean result;
	result = ___lambda255_ ((WidgetsTerm*) self);
	return result;
}

static gboolean
__lambda254_ (Block45Data* _data45_)
{
	WidgetsTerm* self;
	GError* _inner_error0_ = NULL;
	gboolean result;
	self = _data45_->self;
	{
		VteTerminal* _tmp0_;
		const gchar* _tmp1_;
		gchar** _tmp2_;
		gint _tmp2__length1;
		GPid _tmp3_ = 0;
		_tmp0_ = self->term;
		_tmp1_ = _data45_->directory;
		_tmp2_ = _data45_->argv;
		_tmp2__length1 = _data45_->argv_length1;
		vte_terminal_spawn_sync (_tmp0_, _data45_->pty_flags, _tmp1_, _tmp2_, NULL, _data45_->spawn_flags, NULL, NULL, &_tmp3_, NULL, &_inner_error0_);
		self->child_pid = _tmp3_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 200, ____lambda255__gsource_func, g_object_ref (self), g_object_unref);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp4_;
		const gchar* _tmp5_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp4_ = e;
		_tmp5_ = _tmp4_->message;
		g_warning ("terminal.vala:1211: Terminal launch_idle_id: %s\n", _tmp5_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		gboolean _tmp6_ = FALSE;
		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 _tmp6_;
	}
	self->launch_idle_id = (guint) 0;
	result = FALSE;
	return result;
}

static gboolean
___lambda254__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda254_ (self);
	return result;
}

void
widgets_term_launch_shell (WidgetsTerm* self,
                           const gchar* dir)
{
	Block45Data* _data45_;
	gchar* shell = NULL;
	gchar* _tmp2_;
	gboolean _tmp3_ = FALSE;
	const gchar* _tmp4_;
	gboolean _tmp8_ = FALSE;
	const gchar* _tmp9_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	_data45_ = g_slice_new0 (Block45Data);
	_data45_->_ref_count_ = 1;
	_data45_->self = g_object_ref (self);
	if (dir == NULL) {
		gchar* _tmp0_;
		_tmp0_ = g_get_current_dir ();
		_g_free0 (_data45_->directory);
		_data45_->directory = _tmp0_;
	} else {
		gchar* _tmp1_;
		_tmp1_ = g_strdup (dir);
		_g_free0 (_data45_->directory);
		_data45_->directory = _tmp1_;
	}
	_tmp2_ = vte_get_user_shell ();
	_g_free0 (shell);
	shell = _tmp2_;
	_tmp4_ = shell;
	if (_tmp4_ == NULL) {
		_tmp3_ = TRUE;
	} else {
		const gchar* _tmp5_;
		_tmp5_ = shell;
		_tmp3_ = string_get (_tmp5_, (glong) 0) == '\0';
	}
	if (_tmp3_) {
		const gchar* _tmp6_;
		gchar* _tmp7_;
		_tmp6_ = g_getenv ("SHELL");
		_tmp7_ = g_strdup (_tmp6_);
		_g_free0 (shell);
		shell = _tmp7_;
	}
	_tmp9_ = shell;
	if (_tmp9_ == NULL) {
		_tmp8_ = TRUE;
	} else {
		const gchar* _tmp10_;
		_tmp10_ = shell;
		_tmp8_ = string_get (_tmp10_, (glong) 0) == '\0';
	}
	if (_tmp8_) {
		gchar* _tmp11_;
		_tmp11_ = g_strdup ("/bin/sh");
		_g_free0 (shell);
		shell = _tmp11_;
	}
	{
		const gchar* _tmp12_;
		gchar** _tmp13_ = NULL;
		gint _tmp14_ = 0;
		_tmp12_ = shell;
		g_shell_parse_argv (_tmp12_, &_tmp14_, &_tmp13_, &_inner_error0_);
		_data45_->argv = (_vala_array_free (_data45_->argv, _data45_->argv_length1, (GDestroyNotify) g_free), NULL);
		_data45_->argv = _tmp13_;
		_data45_->argv_length1 = _tmp14_;
		_data45_->_argv_size_ = _data45_->argv_length1;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			if (_inner_error0_->domain == G_SHELL_ERROR) {
				goto __catch0_g_shell_error;
			}
			_g_free0 (shell);
			block45_data_unref (_data45_);
			_data45_ = NULL;
			g_critical ("file %s: line %d: unexpected 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;
		}
	}
	goto __finally0;
	__catch0_g_shell_error:
	{
		GError* e = NULL;
		GError* _tmp15_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp15_ = e;
		if (!g_error_matches (_tmp15_, G_SHELL_ERROR, G_SHELL_ERROR_EMPTY_STRING)) {
			GError* _tmp16_;
			const gchar* _tmp17_;
			_tmp16_ = e;
			_tmp17_ = _tmp16_->message;
			g_warning ("terminal.vala:1169: Terminal launch_shell: %s\n", _tmp17_);
		}
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		_g_free0 (shell);
		block45_data_unref (_data45_);
		_data45_ = NULL;
		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;
	}
	_data45_->pty_flags = VTE_PTY_DEFAULT;
	_data45_->spawn_flags = 0;
	{
		ConfigConfig* config = NULL;
		ConfigConfig* _tmp18_;
		gboolean run_as_login_shell = FALSE;
		GKeyFile* _tmp19_;
		_tmp18_ = config_config_new ();
		config = _tmp18_;
		_tmp19_ = config->config_file;
		run_as_login_shell = g_key_file_get_boolean (_tmp19_, "advanced", "run_as_login_shell", &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_object_unref0 (config);
			if (_inner_error0_->domain == G_KEY_FILE_ERROR) {
				goto __catch1_g_key_file_error;
			}
			_g_free0 (shell);
			block45_data_unref (_data45_);
			_data45_ = NULL;
			g_critical ("file %s: line %d: unexpected 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;
		}
		if (run_as_login_shell) {
			const gchar* _tmp20_;
			gchar* _tmp21_;
			gchar* _tmp22_;
			gchar* _tmp23_;
			_data45_->pty_flags |= VTE_PTY_NO_LASTLOG;
			_data45_->spawn_flags |= G_SPAWN_FILE_AND_ARGV_ZERO;
			_tmp20_ = shell;
			_tmp21_ = g_path_get_basename (_tmp20_);
			_tmp22_ = _tmp21_;
			_tmp23_ = g_strdup_printf ("-%s", _tmp22_);
			_vala_array_add9 (&_data45_->argv, &_data45_->argv_length1, &_data45_->_argv_size_, _tmp23_);
			_g_free0 (_tmp22_);
		} else {
			_data45_->spawn_flags |= G_SPAWN_SEARCH_PATH;
		}
		_g_object_unref0 (config);
	}
	goto __finally1;
	__catch1_g_key_file_error:
	{
		GError* e = NULL;
		GError* _tmp24_;
		const gchar* _tmp25_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp24_ = e;
		_tmp25_ = _tmp24_->message;
		g_print ("terminal launch_shell: %s\n", _tmp25_);
		_g_error_free0 (e);
	}
	__finally1:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		_g_free0 (shell);
		block45_data_unref (_data45_);
		_data45_ = NULL;
		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;
	}
	self->launch_idle_id = g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda254__gsource_func, block45_data_ref (_data45_), block45_data_unref);
	_g_free0 (shell);
	block45_data_unref (_data45_);
	_data45_ = NULL;
}

gboolean
widgets_term_is_launch_command (WidgetsTerm* self)
{
	GeeArrayList* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = application_commands;
	_tmp1_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_ > 0;
	return result;
}

static gboolean
___lambda8_ (WidgetsTerm* self)
{
	GError* _inner_error0_ = NULL;
	gboolean result;
	{
		VteTerminal* _tmp0_;
		gchar* _tmp1_;
		gchar* _tmp2_;
		gchar** _tmp3_;
		gchar** _tmp4_;
		gint _tmp4__length1;
		_tmp0_ = self->term;
		_tmp1_ = g_strdup ("echo");
		_tmp2_ = g_strdup (_ ("\nCommand has been completed, press ENTER to exit the terminal."));
		_tmp3_ = g_new0 (gchar*, 2 + 1);
		_tmp3_[0] = _tmp1_;
		_tmp3_[1] = _tmp2_;
		_tmp4_ = _tmp3_;
		_tmp4__length1 = 2;
		vte_terminal_spawn_sync (_tmp0_, VTE_PTY_DEFAULT, NULL, _tmp4_, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL, &_inner_error0_);
		_tmp4_ = (_vala_array_free (_tmp4_, _tmp4__length1, (GDestroyNotify) g_free), NULL);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp5_;
		const gchar* _tmp6_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp5_ = e;
		_tmp6_ = _tmp5_->message;
		g_warning ("terminal.vala:1236: Terminal print_exit_notify: %s\n", _tmp6_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		gboolean _tmp7_ = FALSE;
		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 _tmp7_;
	}
	result = FALSE;
	return result;
}

static gboolean
____lambda8__gsource_func (gpointer self)
{
	gboolean result;
	result = ___lambda8_ ((WidgetsTerm*) self);
	return result;
}

void
widgets_term_print_exit_notify (WidgetsTerm* self)
{
	g_return_if_fail (self != NULL);
	if (!self->has_print_exit_notify) {
		g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 200, ____lambda8__gsource_func, g_object_ref (self), g_object_unref);
		self->has_print_exit_notify = TRUE;
	}
}

static Block46Data*
block46_data_ref (Block46Data* _data46_)
{
	g_atomic_int_inc (&_data46_->_ref_count_);
	return _data46_;
}

static void
block46_data_unref (void * _userdata_)
{
	Block46Data* _data46_;
	_data46_ = (Block46Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data46_->_ref_count_)) {
		WidgetsTerm* self;
		self = _data46_->self;
		_data46_->argv = (_vala_array_free (_data46_->argv, _data46_->argv_length1, (GDestroyNotify) g_free), NULL);
		_g_free0 (_data46_->dir);
		_g_object_unref0 (self);
		g_slice_free (Block46Data, _data46_);
	}
}

static void
_vala_array_add10 (gchar** * array,
                   gint* length,
                   gint* size,
                   gchar* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static gboolean
__lambda252_ (WidgetsTerm* self)
{
	WidgetsWorkspaceManager* _tmp0_;
	WidgetsTabbar* _tmp1_;
	GeeHashMap* _tmp2_;
	WidgetsWorkspaceManager* _tmp3_;
	gpointer _tmp4_;
	gchar* _tmp5_;
	gboolean _tmp6_;
	gboolean result;
	_tmp0_ = self->workspace_manager;
	_tmp1_ = _tmp0_->tabbar;
	_tmp2_ = _tmp1_->tab_name_map;
	_tmp3_ = self->workspace_manager;
	_tmp4_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp2_, (gpointer) ((gintptr) _tmp3_->workspace_index));
	_tmp5_ = (gchar*) _tmp4_;
	_tmp6_ = g_strcmp0 (_tmp5_, "") == 0;
	_g_free0 (_tmp5_);
	if (_tmp6_) {
		WidgetsWorkspaceManager* _tmp7_;
		WidgetsTabbar* _tmp8_;
		WidgetsWorkspaceManager* _tmp9_;
		_tmp7_ = self->workspace_manager;
		_tmp8_ = _tmp7_->tabbar;
		_tmp9_ = self->workspace_manager;
		widgets_tabbar_rename_tab (_tmp8_, _tmp9_->workspace_index, _ ("deepin"));
	}
	result = FALSE;
	return result;
}

static gboolean
___lambda252__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda252_ ((WidgetsTerm*) self);
	return result;
}

static gboolean
__lambda253_ (Block46Data* _data46_)
{
	WidgetsTerm* self;
	GError* _inner_error0_ = NULL;
	gboolean result;
	self = _data46_->self;
	{
		VteTerminal* _tmp0_;
		gchar** _tmp1_;
		gint _tmp1__length1;
		GPid _tmp2_ = 0;
		_tmp0_ = self->term;
		_tmp1_ = _data46_->argv;
		_tmp1__length1 = _data46_->argv_length1;
		vte_terminal_spawn_sync (_tmp0_, VTE_PTY_DEFAULT, _data46_->dir, _tmp1_, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, &_tmp2_, NULL, &_inner_error0_);
		self->child_pid = _tmp2_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp3_;
		const gchar* _tmp4_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp3_ = e;
		_tmp4_ = _tmp3_->message;
		g_warning ("terminal.vala:1272: Terminal launch_idle_id: %s\n", _tmp4_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		gboolean _tmp5_ = FALSE;
		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 _tmp5_;
	}
	self->launch_idle_id = (guint) 0;
	result = FALSE;
	return result;
}

static gboolean
___lambda253__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda253_ (self);
	return result;
}

void
widgets_term_launch_command (WidgetsTerm* self,
                             GeeArrayList* commands,
                             const gchar* dir)
{
	Block46Data* _data46_;
	gchar* _tmp0_;
	gchar** _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (commands != NULL);
	_data46_ = g_slice_new0 (Block46Data);
	_data46_->_ref_count_ = 1;
	_data46_->self = g_object_ref (self);
	_tmp0_ = g_strdup (dir);
	_g_free0 (_data46_->dir);
	_data46_->dir = _tmp0_;
	_tmp1_ = g_new0 (gchar*, 0 + 1);
	_data46_->argv = _tmp1_;
	_data46_->argv_length1 = 0;
	_data46_->_argv_size_ = _data46_->argv_length1;
	{
		GeeArrayList* _arg_list = NULL;
		gint _arg_size = 0;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _arg_index = 0;
		_arg_list = commands;
		_tmp2_ = _arg_list;
		_tmp3_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_arg_size = _tmp4_;
		_arg_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			gchar* arg = NULL;
			GeeArrayList* _tmp7_;
			gpointer _tmp8_;
			const gchar* _tmp9_;
			gchar* _tmp10_;
			_arg_index = _arg_index + 1;
			_tmp5_ = _arg_index;
			_tmp6_ = _arg_size;
			if (!(_tmp5_ < _tmp6_)) {
				break;
			}
			_tmp7_ = _arg_list;
			_tmp8_ = gee_abstract_list_get ((GeeAbstractList*) _tmp7_, _arg_index);
			arg = (gchar*) _tmp8_;
			_tmp9_ = arg;
			_tmp10_ = g_strdup (_tmp9_);
			_vala_array_add10 (&_data46_->argv, &_data46_->argv_length1, &_data46_->_argv_size_, _tmp10_);
			_g_free0 (arg);
		}
	}
	g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 200, ___lambda252__gsource_func, g_object_ref (self), g_object_unref);
	self->launch_idle_id = g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda253__gsource_func, block46_data_ref (_data46_), block46_data_unref);
	block46_data_unref (_data46_);
	_data46_ = NULL;
}

gboolean
widgets_term_try_get_foreground_pid (WidgetsTerm* self,
                                     gint* pid)
{
	gint _vala_pid = 0;
	VteTerminal* _tmp0_;
	VtePty* _tmp1_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->term;
	_tmp1_ = vte_terminal_get_pty (_tmp0_);
	if (_tmp1_ == NULL) {
		_vala_pid = -1;
		result = FALSE;
		if (pid) {
			*pid = _vala_pid;
		}
		return result;
	} else {
		gint pty_fd = 0;
		VteTerminal* _tmp2_;
		VtePty* _tmp3_;
		gint _tmp4_;
		gint _tmp5_;
		gint fgpid = 0;
		gboolean _tmp6_ = FALSE;
		_tmp2_ = self->term;
		_tmp3_ = vte_terminal_get_pty (_tmp2_);
		_tmp4_ = vte_pty_get_fd (_tmp3_);
		_tmp5_ = _tmp4_;
		pty_fd = _tmp5_;
		fgpid = (gint) tcgetpgrp (pty_fd);
		if (fgpid != ((gint) self->child_pid)) {
			_tmp6_ = fgpid > 0;
		} else {
			_tmp6_ = FALSE;
		}
		if (_tmp6_) {
			_vala_pid = (gint) fgpid;
			result = TRUE;
			if (pid) {
				*pid = _vala_pid;
			}
			return result;
		} else {
			_vala_pid = -1;
			result = FALSE;
			if (pid) {
				*pid = _vala_pid;
			}
			return result;
		}
	}
}

gboolean
widgets_term_has_foreground_process (WidgetsTerm* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = widgets_term_try_get_foreground_pid (self, NULL);
	return result;
}

void
widgets_term_kill_fg (WidgetsTerm* self)
{
	gint fg_pid = 0;
	gint _tmp0_ = 0;
	gboolean _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp1_ = widgets_term_try_get_foreground_pid (self, &_tmp0_);
	fg_pid = _tmp0_;
	if (_tmp1_) {
		kill ((pid_t) fg_pid, SIGKILL);
	}
}

void
widgets_term_toggle_select_all (WidgetsTerm* self)
{
	g_return_if_fail (self != NULL);
	if (self->has_select_all) {
		VteTerminal* _tmp0_;
		_tmp0_ = self->term;
		vte_terminal_unselect_all (_tmp0_);
	} else {
		VteTerminal* _tmp1_;
		_tmp1_ = self->term;
		vte_terminal_select_all (_tmp1_);
	}
	self->has_select_all = !self->has_select_all;
}

void
widgets_term_setup_from_config (WidgetsTerm* self)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	{
		WidgetsConfigWindow* parent_window = NULL;
		VteTerminal* _tmp0_;
		GtkWidget* _tmp1_;
		WidgetsConfigWindow* _tmp2_;
		gboolean is_cursor_blink = FALSE;
		WidgetsConfigWindow* _tmp3_;
		ConfigConfig* _tmp4_;
		GKeyFile* _tmp5_;
		gboolean _tmp8_ = FALSE;
		WidgetsConfigWindow* _tmp9_;
		ConfigConfig* _tmp10_;
		GKeyFile* _tmp11_;
		VteTerminal* _tmp12_;
		gboolean _tmp13_ = FALSE;
		WidgetsConfigWindow* _tmp14_;
		ConfigConfig* _tmp15_;
		GKeyFile* _tmp16_;
		VteTerminal* _tmp17_;
		gboolean _tmp18_ = FALSE;
		WidgetsConfigWindow* _tmp19_;
		ConfigConfig* _tmp20_;
		GKeyFile* _tmp21_;
		VteTerminal* _tmp22_;
		gboolean _tmp23_ = FALSE;
		WidgetsConfigWindow* _tmp24_;
		ConfigConfig* _tmp25_;
		GKeyFile* _tmp26_;
		VteTerminal* _tmp27_;
		gint scroll_lines = 0;
		WidgetsConfigWindow* _tmp28_;
		ConfigConfig* _tmp29_;
		GKeyFile* _tmp30_;
		VteTerminal* _tmp31_;
		gchar* cursor_shape = NULL;
		WidgetsConfigWindow* _tmp32_;
		ConfigConfig* _tmp33_;
		GKeyFile* _tmp34_;
		gchar* _tmp35_;
		const gchar* _tmp36_;
		gchar* _tmp42_ = NULL;
		WidgetsConfigWindow* _tmp43_;
		ConfigConfig* _tmp44_;
		GKeyFile* _tmp45_;
		gchar* _tmp46_;
		gdouble _tmp47_ = 0.0;
		WidgetsConfigWindow* _tmp48_;
		ConfigConfig* _tmp49_;
		GKeyFile* _tmp50_;
		GdkRGBA _tmp51_ = {0};
		gchar* _tmp52_ = NULL;
		WidgetsConfigWindow* _tmp53_;
		ConfigConfig* _tmp54_;
		GKeyFile* _tmp55_;
		gchar* _tmp56_;
		GdkRGBA _tmp57_ = {0};
		GdkRGBA* palette = NULL;
		GdkRGBA* _tmp58_;
		gint palette_length1;
		gint _palette_size_;
		VteTerminal* _tmp72_;
		GdkRGBA _tmp73_;
		GdkRGBA _tmp74_;
		GdkRGBA* _tmp75_;
		gint _tmp75__length1;
		gboolean _tmp76_ = FALSE;
		WidgetsConfigWindow* _tmp77_;
		ConfigConfig* _tmp78_;
		GKeyFile* _tmp79_;
		VteTerminal* _tmp80_;
		gboolean _tmp81_ = FALSE;
		WidgetsConfigWindow* _tmp82_;
		ConfigConfig* _tmp83_;
		GKeyFile* _tmp84_;
		VteTerminal* _tmp85_;
		gchar* _tmp86_ = NULL;
		WidgetsConfigWindow* _tmp87_;
		ConfigConfig* _tmp88_;
		GKeyFile* _tmp89_;
		gchar* _tmp90_;
		gint config_size = 0;
		WidgetsConfigWindow* _tmp103_;
		ConfigConfig* _tmp104_;
		GKeyFile* _tmp105_;
		_tmp0_ = self->term;
		_tmp1_ = gtk_widget_get_toplevel ((GtkWidget*) _tmp0_);
		_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, WIDGETS_TYPE_CONFIG_WINDOW, WidgetsConfigWindow));
		parent_window = _tmp2_;
		_tmp3_ = parent_window;
		_tmp4_ = _tmp3_->config;
		_tmp5_ = _tmp4_->config_file;
		is_cursor_blink = g_key_file_get_boolean (_tmp5_, "advanced", "cursor_blink_mode", &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_object_unref0 (parent_window);
			if (_inner_error0_->domain == G_KEY_FILE_ERROR) {
				goto __catch0_g_key_file_error;
			}
			g_critical ("file %s: line %d: unexpected 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;
		}
		if (is_cursor_blink) {
			VteTerminal* _tmp6_;
			_tmp6_ = self->term;
			vte_terminal_set_cursor_blink_mode (_tmp6_, VTE_CURSOR_BLINK_ON);
		} else {
			VteTerminal* _tmp7_;
			_tmp7_ = self->term;
			vte_terminal_set_cursor_blink_mode (_tmp7_, VTE_CURSOR_BLINK_OFF);
		}
		_tmp9_ = parent_window;
		_tmp10_ = _tmp9_->config;
		_tmp11_ = _tmp10_->config_file;
		_tmp8_ = g_key_file_get_boolean (_tmp11_, "advanced", "bold_is_bright", &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_object_unref0 (parent_window);
			if (_inner_error0_->domain == G_KEY_FILE_ERROR) {
				goto __catch0_g_key_file_error;
			}
			g_critical ("file %s: line %d: unexpected 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;
		}
		_tmp12_ = self->term;
		vte_terminal_set_bold_is_bright (_tmp12_, _tmp8_);
		_tmp14_ = parent_window;
		_tmp15_ = _tmp14_->config;
		_tmp16_ = _tmp15_->config_file;
		_tmp13_ = g_key_file_get_boolean (_tmp16_, "advanced", "audible_bell", &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_object_unref0 (parent_window);
			if (_inner_error0_->domain == G_KEY_FILE_ERROR) {
				goto __catch0_g_key_file_error;
			}
			g_critical ("file %s: line %d: unexpected 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;
		}
		_tmp17_ = self->term;
		vte_terminal_set_audible_bell (_tmp17_, _tmp13_);
		_tmp19_ = parent_window;
		_tmp20_ = _tmp19_->config;
		_tmp21_ = _tmp20_->config_file;
		_tmp18_ = g_key_file_get_boolean (_tmp21_, "advanced", "cursor_auto_hide", &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_object_unref0 (parent_window);
			if (_inner_error0_->domain == G_KEY_FILE_ERROR) {
				goto __catch0_g_key_file_error;
			}
			g_critical ("file %s: line %d: unexpected 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;
		}
		_tmp22_ = self->term;
		vte_terminal_set_mouse_autohide (_tmp22_, _tmp18_);
		_tmp24_ = parent_window;
		_tmp25_ = _tmp24_->config;
		_tmp26_ = _tmp25_->config_file;
		_tmp23_ = g_key_file_get_boolean (_tmp26_, "advanced", "allow_hyperlink", &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_object_unref0 (parent_window);
			if (_inner_error0_->domain == G_KEY_FILE_ERROR) {
				goto __catch0_g_key_file_error;
			}
			g_critical ("file %s: line %d: unexpected 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;
		}
		_tmp27_ = self->term;
		vte_terminal_set_allow_hyperlink (_tmp27_, _tmp23_);
		_tmp28_ = parent_window;
		_tmp29_ = _tmp28_->config;
		_tmp30_ = _tmp29_->config_file;
		scroll_lines = g_key_file_get_integer (_tmp30_, "advanced", "scroll_line", &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_object_unref0 (parent_window);
			if (_inner_error0_->domain == G_KEY_FILE_ERROR) {
				goto __catch0_g_key_file_error;
			}
			g_critical ("file %s: line %d: unexpected 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;
		}
		_tmp31_ = self->term;
		vte_terminal_set_scrollback_lines (_tmp31_, (glong) scroll_lines);
		_tmp32_ = parent_window;
		_tmp33_ = _tmp32_->config;
		_tmp34_ = _tmp33_->config_file;
		_tmp35_ = g_key_file_get_string (_tmp34_, "advanced", "cursor_shape", &_inner_error0_);
		cursor_shape = _tmp35_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_object_unref0 (parent_window);
			if (_inner_error0_->domain == G_KEY_FILE_ERROR) {
				goto __catch0_g_key_file_error;
			}
			g_critical ("file %s: line %d: unexpected 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;
		}
		_tmp36_ = cursor_shape;
		if (g_strcmp0 (_tmp36_, "block") == 0) {
			VteTerminal* _tmp37_;
			_tmp37_ = self->term;
			vte_terminal_set_cursor_shape (_tmp37_, VTE_CURSOR_SHAPE_BLOCK);
		} else {
			const gchar* _tmp38_;
			_tmp38_ = cursor_shape;
			if (g_strcmp0 (_tmp38_, "ibeam") == 0) {
				VteTerminal* _tmp39_;
				_tmp39_ = self->term;
				vte_terminal_set_cursor_shape (_tmp39_, VTE_CURSOR_SHAPE_IBEAM);
			} else {
				const gchar* _tmp40_;
				_tmp40_ = cursor_shape;
				if (g_strcmp0 (_tmp40_, "underline") == 0) {
					VteTerminal* _tmp41_;
					_tmp41_ = self->term;
					vte_terminal_set_cursor_shape (_tmp41_, VTE_CURSOR_SHAPE_UNDERLINE);
				}
			}
		}
		_tmp43_ = parent_window;
		_tmp44_ = _tmp43_->config;
		_tmp45_ = _tmp44_->config_file;
		_tmp46_ = g_key_file_get_string (_tmp45_, "theme", "background", &_inner_error0_);
		_tmp42_ = _tmp46_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_free0 (cursor_shape);
			_g_object_unref0 (parent_window);
			if (_inner_error0_->domain == G_KEY_FILE_ERROR) {
				goto __catch0_g_key_file_error;
			}
			g_critical ("file %s: line %d: unexpected 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;
		}
		_tmp48_ = parent_window;
		_tmp49_ = _tmp48_->config;
		_tmp50_ = _tmp49_->config_file;
		_tmp47_ = g_key_file_get_double (_tmp50_, "general", "opacity", &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_free0 (_tmp42_);
			_g_free0 (cursor_shape);
			_g_object_unref0 (parent_window);
			if (_inner_error0_->domain == G_KEY_FILE_ERROR) {
				goto __catch0_g_key_file_error;
			}
			g_critical ("file %s: line %d: unexpected 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;
		}
		utils_hex_to_rgba (_tmp42_, _tmp47_, &_tmp51_);
		self->background_color = _tmp51_;
		_tmp53_ = parent_window;
		_tmp54_ = _tmp53_->config;
		_tmp55_ = _tmp54_->config_file;
		_tmp56_ = g_key_file_get_string (_tmp55_, "theme", "foreground", &_inner_error0_);
		_tmp52_ = _tmp56_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_free0 (_tmp42_);
			_g_free0 (cursor_shape);
			_g_object_unref0 (parent_window);
			if (_inner_error0_->domain == G_KEY_FILE_ERROR) {
				goto __catch0_g_key_file_error;
			}
			g_critical ("file %s: line %d: unexpected 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;
		}
		utils_hex_to_rgba (_tmp52_, 1.0, &_tmp57_);
		self->foreground_color = _tmp57_;
		_tmp58_ = g_new0 (GdkRGBA, 16);
		palette = _tmp58_;
		palette_length1 = 16;
		_palette_size_ = palette_length1;
		{
			gint i = 0;
			i = 0;
			{
				gboolean _tmp59_ = FALSE;
				_tmp59_ = TRUE;
				while (TRUE) {
					gchar* _tmp61_ = NULL;
					WidgetsConfigWindow* _tmp62_;
					ConfigConfig* _tmp63_;
					GKeyFile* _tmp64_;
					gchar* _tmp65_;
					gchar* _tmp66_;
					gchar* _tmp67_;
					gchar* _tmp68_;
					GdkRGBA new_color = {0};
					GdkRGBA _tmp69_ = {0};
					GdkRGBA* _tmp70_;
					gint _tmp70__length1;
					GdkRGBA _tmp71_;
					if (!_tmp59_) {
						gint _tmp60_;
						_tmp60_ = i;
						i = _tmp60_ + 1;
					}
					_tmp59_ = FALSE;
					if (!(i < 16)) {
						break;
					}
					_tmp62_ = parent_window;
					_tmp63_ = _tmp62_->config;
					_tmp64_ = _tmp63_->config_file;
					_tmp65_ = g_strdup_printf ("color_%i", i + 1);
					_tmp66_ = _tmp65_;
					_tmp67_ = g_key_file_get_string (_tmp64_, "theme", _tmp66_, &_inner_error0_);
					_tmp68_ = _tmp67_;
					_g_free0 (_tmp66_);
					_tmp61_ = _tmp68_;
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
						palette = (g_free (palette), NULL);
						_g_free0 (_tmp52_);
						_g_free0 (_tmp42_);
						_g_free0 (cursor_shape);
						_g_object_unref0 (parent_window);
						if (_inner_error0_->domain == G_KEY_FILE_ERROR) {
							goto __catch0_g_key_file_error;
						}
						g_critical ("file %s: line %d: unexpected 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;
					}
					utils_hex_to_rgba (_tmp61_, 1.0, &_tmp69_);
					new_color = _tmp69_;
					_tmp70_ = palette;
					_tmp70__length1 = palette_length1;
					_tmp71_ = new_color;
					_tmp70_[i] = _tmp71_;
					_g_free0 (_tmp61_);
				}
			}
		}
		_tmp72_ = self->term;
		_tmp73_ = self->foreground_color;
		_tmp74_ = self->background_color;
		_tmp75_ = palette;
		_tmp75__length1 = palette_length1;
		vte_terminal_set_colors (_tmp72_, &_tmp73_, &_tmp74_, _tmp75_, (gsize) _tmp75__length1);
		_tmp77_ = parent_window;
		_tmp78_ = _tmp77_->config;
		_tmp79_ = _tmp78_->config_file;
		_tmp76_ = g_key_file_get_boolean (_tmp79_, "advanced", "scroll_on_output", &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			palette = (g_free (palette), NULL);
			_g_free0 (_tmp52_);
			_g_free0 (_tmp42_);
			_g_free0 (cursor_shape);
			_g_object_unref0 (parent_window);
			if (_inner_error0_->domain == G_KEY_FILE_ERROR) {
				goto __catch0_g_key_file_error;
			}
			g_critical ("file %s: line %d: unexpected 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;
		}
		_tmp80_ = self->term;
		vte_terminal_set_scroll_on_output (_tmp80_, _tmp76_);
		_tmp82_ = parent_window;
		_tmp83_ = _tmp82_->config;
		_tmp84_ = _tmp83_->config_file;
		_tmp81_ = g_key_file_get_boolean (_tmp84_, "advanced", "scroll_on_key", &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			palette = (g_free (palette), NULL);
			_g_free0 (_tmp52_);
			_g_free0 (_tmp42_);
			_g_free0 (cursor_shape);
			_g_object_unref0 (parent_window);
			if (_inner_error0_->domain == G_KEY_FILE_ERROR) {
				goto __catch0_g_key_file_error;
			}
			g_critical ("file %s: line %d: unexpected 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;
		}
		_tmp85_ = self->term;
		vte_terminal_set_scroll_on_keystroke (_tmp85_, _tmp81_);
		_tmp87_ = parent_window;
		_tmp88_ = _tmp87_->config;
		_tmp89_ = _tmp88_->config_file;
		_tmp90_ = g_key_file_get_string (_tmp89_, "theme", "style", &_inner_error0_);
		_tmp86_ = _tmp90_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			palette = (g_free (palette), NULL);
			_g_free0 (_tmp52_);
			_g_free0 (_tmp42_);
			_g_free0 (cursor_shape);
			_g_object_unref0 (parent_window);
			if (_inner_error0_->domain == G_KEY_FILE_ERROR) {
				goto __catch0_g_key_file_error;
			}
			g_critical ("file %s: line %d: unexpected 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;
		}
		if (g_strcmp0 (_tmp86_, "light") == 0) {
			GtkScrollbar* _tmp91_;
			GtkStyleContext* _tmp92_;
			GtkScrollbar* _tmp93_;
			GtkStyleContext* _tmp94_;
			GtkScrollbar* _tmp95_;
			GtkStyleContext* _tmp96_;
			_tmp91_ = self->scrollbar;
			_tmp92_ = gtk_widget_get_style_context ((GtkWidget*) _tmp91_);
			gtk_style_context_remove_class (_tmp92_, "light_scrollbar");
			_tmp93_ = self->scrollbar;
			_tmp94_ = gtk_widget_get_style_context ((GtkWidget*) _tmp93_);
			gtk_style_context_remove_class (_tmp94_, "dark_scrollbar");
			_tmp95_ = self->scrollbar;
			_tmp96_ = gtk_widget_get_style_context ((GtkWidget*) _tmp95_);
			gtk_style_context_add_class (_tmp96_, "light_scrollbar");
		} else {
			GtkScrollbar* _tmp97_;
			GtkStyleContext* _tmp98_;
			GtkScrollbar* _tmp99_;
			GtkStyleContext* _tmp100_;
			GtkScrollbar* _tmp101_;
			GtkStyleContext* _tmp102_;
			_tmp97_ = self->scrollbar;
			_tmp98_ = gtk_widget_get_style_context ((GtkWidget*) _tmp97_);
			gtk_style_context_remove_class (_tmp98_, "light_scrollbar");
			_tmp99_ = self->scrollbar;
			_tmp100_ = gtk_widget_get_style_context ((GtkWidget*) _tmp99_);
			gtk_style_context_remove_class (_tmp100_, "dark_scrollbar");
			_tmp101_ = self->scrollbar;
			_tmp102_ = gtk_widget_get_style_context ((GtkWidget*) _tmp101_);
			gtk_style_context_add_class (_tmp102_, "dark_scrollbar");
		}
		_tmp103_ = parent_window;
		_tmp104_ = _tmp103_->config;
		_tmp105_ = _tmp104_->config_file;
		config_size = g_key_file_get_integer (_tmp105_, "general", "font_size", &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_free0 (_tmp86_);
			palette = (g_free (palette), NULL);
			_g_free0 (_tmp52_);
			_g_free0 (_tmp42_);
			_g_free0 (cursor_shape);
			_g_object_unref0 (parent_window);
			if (_inner_error0_->domain == G_KEY_FILE_ERROR) {
				goto __catch0_g_key_file_error;
			}
			g_critical ("file %s: line %d: unexpected 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;
		}
		self->font_size = config_size * PANGO_SCALE;
		widgets_term_update_font_info (self);
		_g_free0 (_tmp86_);
		palette = (g_free (palette), NULL);
		_g_free0 (_tmp52_);
		_g_free0 (_tmp42_);
		_g_free0 (cursor_shape);
		_g_object_unref0 (parent_window);
	}
	goto __finally0;
	__catch0_g_key_file_error:
	{
		GError* e = NULL;
		FILE* _tmp106_;
		GError* _tmp107_;
		const gchar* _tmp108_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp106_ = stdout;
		_tmp107_ = e;
		_tmp108_ = _tmp107_->message;
		fprintf (_tmp106_, "%s", _tmp108_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		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;
	}
}

gboolean
widgets_term_clipboard_has_context (WidgetsTerm* self)
{
	gchar* clipboard_text = NULL;
	GtkClipboard* _tmp0_;
	gchar* _tmp1_;
	gboolean _tmp2_ = FALSE;
	const gchar* _tmp3_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
	_tmp1_ = gtk_clipboard_wait_for_text (_tmp0_);
	clipboard_text = _tmp1_;
	_tmp3_ = clipboard_text;
	if (_tmp3_ != NULL) {
		const gchar* _tmp4_;
		gchar* _tmp5_;
		gchar* _tmp6_;
		_tmp4_ = clipboard_text;
		_tmp5_ = string_strip (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp2_ = g_strcmp0 (_tmp6_, "") != 0;
		_g_free0 (_tmp6_);
	} else {
		_tmp2_ = FALSE;
	}
	result = _tmp2_;
	_g_free0 (clipboard_text);
	return result;
}

gchar*
widgets_term_get_selection_file (WidgetsTerm* self)
{
	gchar* clipboard_text = NULL;
	gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = widgets_term_get_selection_text (self);
	clipboard_text = _tmp0_;
	_tmp1_ = clipboard_text;
	if (g_strcmp0 (_tmp1_, "") != 0) {
		gchar* clipboard_file_path = NULL;
		const gchar* _tmp2_;
		gchar* _tmp3_;
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		gchar* _tmp7_;
		const gchar* _tmp8_;
		_tmp2_ = clipboard_text;
		_tmp3_ = g_strdup (_tmp2_);
		clipboard_file_path = _tmp3_;
		_tmp4_ = clipboard_file_path;
		if (g_file_test (_tmp4_, G_FILE_TEST_EXISTS)) {
			result = clipboard_file_path;
			_g_free0 (clipboard_text);
			return result;
		}
		_tmp5_ = self->current_dir;
		_tmp6_ = clipboard_text;
		_tmp7_ = g_build_path (G_DIR_SEPARATOR_S, _tmp5_, _tmp6_, NULL);
		_g_free0 (clipboard_file_path);
		clipboard_file_path = _tmp7_;
		_tmp8_ = clipboard_file_path;
		if (g_file_test (_tmp8_, G_FILE_TEST_EXISTS)) {
			result = clipboard_file_path;
			_g_free0 (clipboard_text);
			return result;
		} else {
			result = NULL;
			_g_free0 (clipboard_file_path);
			_g_free0 (clipboard_text);
			return result;
		}
		_g_free0 (clipboard_file_path);
	} else {
		result = NULL;
		_g_free0 (clipboard_text);
		return result;
	}
}

gchar*
widgets_term_get_selection_text (WidgetsTerm* self)
{
	VteTerminal* _tmp0_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->term;
	if (vte_terminal_get_has_selection (_tmp0_)) {
		GtkClipboard* clipboard = NULL;
		GtkClipboard* _tmp1_;
		GtkClipboard* _tmp2_;
		gchar* current_clipboard_text = NULL;
		GtkClipboard* _tmp3_;
		gchar* _tmp4_;
		VteTerminal* _tmp5_;
		gchar* clipboard_text = NULL;
		GtkClipboard* _tmp6_;
		gchar* _tmp7_;
		const gchar* _tmp8_;
		const gchar* _tmp17_;
		_tmp1_ = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
		_tmp2_ = _g_object_ref0 (_tmp1_);
		clipboard = _tmp2_;
		_tmp3_ = clipboard;
		_tmp4_ = gtk_clipboard_wait_for_text (_tmp3_);
		current_clipboard_text = _tmp4_;
		_tmp5_ = self->term;
		vte_terminal_copy_clipboard (_tmp5_);
		_tmp6_ = clipboard;
		_tmp7_ = gtk_clipboard_wait_for_text (_tmp6_);
		clipboard_text = _tmp7_;
		_tmp8_ = current_clipboard_text;
		if (_tmp8_ != NULL) {
			GdkDisplay* display = NULL;
			GdkDisplay* _tmp9_;
			GdkDisplay* _tmp10_;
			GdkDisplay* _tmp11_;
			GtkClipboard* _tmp12_;
			const gchar* _tmp13_;
			const gchar* _tmp14_;
			gint _tmp15_;
			gint _tmp16_;
			_tmp9_ = gdk_display_get_default ();
			_tmp10_ = _g_object_ref0 (_tmp9_);
			display = _tmp10_;
			_tmp11_ = display;
			_tmp12_ = gtk_clipboard_get_for_display (_tmp11_, GDK_SELECTION_CLIPBOARD);
			_tmp13_ = current_clipboard_text;
			_tmp14_ = current_clipboard_text;
			_tmp15_ = strlen (_tmp14_);
			_tmp16_ = _tmp15_;
			gtk_clipboard_set_text (_tmp12_, _tmp13_, _tmp16_);
			_g_object_unref0 (display);
		}
		_tmp17_ = clipboard_text;
		if (_tmp17_ != NULL) {
			const gchar* _tmp18_;
			gchar* _tmp19_;
			_tmp18_ = clipboard_text;
			_tmp19_ = string_strip (_tmp18_);
			result = _tmp19_;
			_g_free0 (clipboard_text);
			_g_free0 (current_clipboard_text);
			_g_object_unref0 (clipboard);
			return result;
		} else {
			gchar* _tmp20_;
			_tmp20_ = g_strdup ("");
			result = _tmp20_;
			_g_free0 (clipboard_text);
			_g_free0 (current_clipboard_text);
			_g_object_unref0 (clipboard);
			return result;
		}
		_g_free0 (clipboard_text);
		_g_free0 (current_clipboard_text);
		_g_object_unref0 (clipboard);
	} else {
		gchar* _tmp21_;
		_tmp21_ = g_strdup ("");
		result = _tmp21_;
		return result;
	}
}

void
widgets_term_search_text_in_search_engine (WidgetsTerm* self,
                                           const gchar* search_text,
                                           const gchar* search_engline_api)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (search_text != NULL);
	g_return_if_fail (search_engline_api != NULL);
	{
		GAppInfo* appinfo = NULL;
		gchar* _tmp0_;
		gchar* _tmp1_;
		gchar* _tmp2_;
		gchar* _tmp3_;
		GAppInfo* _tmp4_;
		GAppInfo* _tmp5_;
		GAppInfo* _tmp6_;
		_tmp0_ = g_strdup_printf ("xdg-open '%s'", search_engline_api);
		_tmp1_ = _tmp0_;
		_tmp2_ = g_strdup_printf (_tmp1_, search_text);
		_tmp3_ = _tmp2_;
		_tmp4_ = g_app_info_create_from_commandline (_tmp3_, NULL, G_APP_INFO_CREATE_NONE, &_inner_error0_);
		_tmp5_ = _tmp4_;
		_g_free0 (_tmp3_);
		_g_free0 (_tmp1_);
		appinfo = _tmp5_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp6_ = appinfo;
		g_app_info_launch (_tmp6_, NULL, NULL, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_object_unref0 (appinfo);
			goto __catch0_g_error;
		}
		_g_object_unref0 (appinfo);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp7_;
		const gchar* _tmp8_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp7_ = e;
		_tmp8_ = _tmp7_->message;
		g_print ("Terminal search_in_search_engine: %s\n", _tmp8_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		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;
	}
}

void
widgets_term_open_selection_file (WidgetsTerm* self)
{
	gchar* selection_file = NULL;
	gchar* _tmp0_;
	const gchar* _tmp1_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = widgets_term_get_selection_file (self);
	selection_file = _tmp0_;
	_tmp1_ = selection_file;
	if (_tmp1_ != NULL) {
		{
			GAppInfo* appinfo = NULL;
			const gchar* _tmp2_;
			gchar* _tmp3_;
			gchar* _tmp4_;
			GAppInfo* _tmp5_;
			GAppInfo* _tmp6_;
			GAppInfo* _tmp7_;
			_tmp2_ = selection_file;
			_tmp3_ = g_strdup_printf ("xdg-open '%s'", _tmp2_);
			_tmp4_ = _tmp3_;
			_tmp5_ = g_app_info_create_from_commandline (_tmp4_, NULL, G_APP_INFO_CREATE_NONE, &_inner_error0_);
			_tmp6_ = _tmp5_;
			_g_free0 (_tmp4_);
			appinfo = _tmp6_;
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				goto __catch0_g_error;
			}
			_tmp7_ = appinfo;
			g_app_info_launch (_tmp7_, NULL, NULL, &_inner_error0_);
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				_g_object_unref0 (appinfo);
				goto __catch0_g_error;
			}
			_g_object_unref0 (appinfo);
		}
		goto __finally0;
		__catch0_g_error:
		{
			GError* e = NULL;
			GError* _tmp8_;
			const gchar* _tmp9_;
			e = _inner_error0_;
			_inner_error0_ = NULL;
			_tmp8_ = e;
			_tmp9_ = _tmp8_->message;
			g_print ("Terminal open_selection_file: %s\n", _tmp9_);
			_g_error_free0 (e);
		}
		__finally0:
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_free0 (selection_file);
			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;
		}
	}
	_g_free0 (selection_file);
}

void
widgets_term_open_current_dir_in_file_manager (WidgetsTerm* self)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	{
		GAppInfo* appinfo = NULL;
		const gchar* _tmp0_;
		gchar* _tmp1_;
		gchar* _tmp2_;
		GAppInfo* _tmp3_;
		GAppInfo* _tmp4_;
		GAppInfo* _tmp5_;
		_tmp0_ = self->current_dir;
		_tmp1_ = g_strdup_printf ("xdg-open '%s'", _tmp0_);
		_tmp2_ = _tmp1_;
		_tmp3_ = g_app_info_create_from_commandline (_tmp2_, NULL, G_APP_INFO_CREATE_NONE, &_inner_error0_);
		_tmp4_ = _tmp3_;
		_g_free0 (_tmp2_);
		appinfo = _tmp4_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp5_ = appinfo;
		g_app_info_launch (_tmp5_, NULL, NULL, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_object_unref0 (appinfo);
			goto __catch0_g_error;
		}
		_g_object_unref0 (appinfo);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp6_;
		const gchar* _tmp7_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp6_ = e;
		_tmp7_ = _tmp6_->message;
		g_print ("Terminal open_current_dir_in_file_manager: %s\n", _tmp7_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		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;
	}
}

static gchar*
string_replace (const gchar* self,
                const gchar* old,
                const gchar* replacement)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	GError* _inner_error0_ = NULL;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (old != NULL, NULL);
	g_return_val_if_fail (replacement != NULL, NULL);
	if ((*((gchar*) self)) == '\0') {
		_tmp1_ = TRUE;
	} else {
		_tmp1_ = (*((gchar*) old)) == '\0';
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = g_strcmp0 (old, replacement) == 0;
	}
	if (_tmp0_) {
		gchar* _tmp2_;
		_tmp2_ = g_strdup (self);
		result = _tmp2_;
		return result;
	}
	{
		GRegex* regex = NULL;
		gchar* _tmp3_;
		gchar* _tmp4_;
		GRegex* _tmp5_;
		GRegex* _tmp6_;
		gchar* _tmp7_ = NULL;
		GRegex* _tmp8_;
		gchar* _tmp9_;
		gchar* _tmp10_;
		_tmp3_ = g_regex_escape_string (old, -1);
		_tmp4_ = _tmp3_;
		_tmp5_ = g_regex_new (_tmp4_, 0, 0, &_inner_error0_);
		_tmp6_ = _tmp5_;
		_g_free0 (_tmp4_);
		regex = _tmp6_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			if (_inner_error0_->domain == G_REGEX_ERROR) {
				goto __catch0_g_regex_error;
			}
			g_critical ("file %s: line %d: unexpected 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;
		}
		_tmp8_ = regex;
		_tmp9_ = g_regex_replace_literal (_tmp8_, self, (gssize) -1, 0, replacement, 0, &_inner_error0_);
		_tmp7_ = _tmp9_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_regex_unref0 (regex);
			if (_inner_error0_->domain == G_REGEX_ERROR) {
				goto __catch0_g_regex_error;
			}
			g_critical ("file %s: line %d: unexpected 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;
		}
		_tmp10_ = _tmp7_;
		_tmp7_ = NULL;
		result = _tmp10_;
		_g_free0 (_tmp7_);
		_g_regex_unref0 (regex);
		return result;
	}
	goto __finally0;
	__catch0_g_regex_error:
	{
		g_clear_error (&_inner_error0_);
		g_assert_not_reached ();
	}
	__finally0:
	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;
}

void
widgets_term_login_server (WidgetsTerm* self,
                           const gchar* info)
{
	gchar* _tmp0_;
	GKeyFile* config_file = NULL;
	GKeyFile* _tmp1_;
	gchar* config_file_path = NULL;
	gchar* _tmp2_;
	GFile* gio_file = NULL;
	const gchar* _tmp3_;
	GFile* _tmp4_;
	GFile* _tmp5_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (info != NULL);
	_tmp0_ = g_strdup (info);
	_g_free0 (self->server_info);
	self->server_info = _tmp0_;
	_tmp1_ = g_key_file_new ();
	config_file = _tmp1_;
	_tmp2_ = utils_get_config_file_path ("server-config.conf");
	config_file_path = _tmp2_;
	_tmp3_ = config_file_path;
	_tmp4_ = g_file_new_for_path (_tmp3_);
	gio_file = _tmp4_;
	_tmp5_ = gio_file;
	if (!g_file_query_exists (_tmp5_, NULL)) {
		gchar* _tmp6_;
		gchar* _tmp7_;
		const gchar* _tmp8_;
		_tmp6_ = utils_get_config_dir ();
		_tmp7_ = _tmp6_;
		utils_touch_dir (_tmp7_);
		_g_free0 (_tmp7_);
		_tmp8_ = config_file_path;
		utils_create_file (_tmp8_);
	} else {
		{
			GKeyFile* _tmp9_;
			const gchar* _tmp10_;
			_tmp9_ = config_file;
			_tmp10_ = config_file_path;
			g_key_file_load_from_file (_tmp9_, _tmp10_, G_KEY_FILE_NONE, &_inner_error0_);
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				goto __catch0_g_error;
			}
		}
		goto __finally0;
		__catch0_g_error:
		{
			GError* e = NULL;
			const gchar* _tmp11_;
			e = _inner_error0_;
			_inner_error0_ = NULL;
			_tmp11_ = config_file_path;
			if (!g_file_test (_tmp11_, G_FILE_TEST_EXISTS)) {
				GError* _tmp12_;
				const gchar* _tmp13_;
				_tmp12_ = e;
				_tmp13_ = _tmp12_->message;
				g_print ("Config: %s\n", _tmp13_);
			}
			_g_error_free0 (e);
		}
		__finally0:
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_object_unref0 (gio_file);
			_g_free0 (config_file_path);
			_g_key_file_unref0 (config_file);
			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;
		}
	}
	{
		GFile* file = NULL;
		gchar* _tmp14_;
		gchar* _tmp15_;
		GFile* _tmp16_;
		GFile* _tmp17_;
		GFile* _tmp18_;
		GFileInputStream* _tmp23_ = NULL;
		GFile* _tmp24_;
		GFileInputStream* _tmp25_;
		GDataInputStream* dis = NULL;
		GDataInputStream* _tmp26_;
		gchar* line = NULL;
		gchar* ssh_script_content = NULL;
		gchar* _tmp27_;
		gchar** server_infos = NULL;
		const gchar* _tmp38_;
		gchar** _tmp39_;
		gchar** _tmp40_;
		gint server_infos_length1;
		gint _server_infos_size_;
		gchar* password = NULL;
		gchar* _tmp41_;
		const gchar* _tmp42_;
		gint _tmp43_;
		gint _tmp44_;
		const gchar* _tmp57_;
		gchar** _tmp58_;
		gint _tmp58__length1;
		const gchar* _tmp59_;
		gchar* _tmp60_;
		const gchar* _tmp61_;
		gchar** _tmp62_;
		gint _tmp62__length1;
		const gchar* _tmp63_;
		gchar* _tmp64_;
		gchar** _tmp65_;
		gint _tmp65__length1;
		gboolean use_private_key = FALSE;
		gchar* private_key_file = NULL;
		gchar* _tmp76_;
		gchar* path = NULL;
		GKeyFile* _tmp103_;
		const gchar* _tmp104_;
		gchar* _tmp105_;
		gchar* command = NULL;
		GKeyFile* _tmp106_;
		const gchar* _tmp107_;
		gchar* _tmp108_;
		gchar* remote_command = NULL;
		gchar* _tmp109_;
		const gchar* _tmp110_;
		gchar* _tmp111_;
		gchar* _tmp112_;
		gboolean _tmp113_;
		const gchar* _tmp119_;
		gchar* _tmp120_;
		gchar* _tmp121_;
		gboolean _tmp122_;
		const gchar* _tmp128_;
		const gchar* _tmp129_;
		gchar* _tmp130_;
		GFileIOStream* iostream = NULL;
		GFile* tmpfile = NULL;
		GFileIOStream* _tmp131_ = NULL;
		GFile* _tmp132_;
		GOutputStream* ostream = NULL;
		GFileIOStream* _tmp133_;
		GOutputStream* _tmp134_;
		GOutputStream* _tmp135_;
		GOutputStream* _tmp136_;
		GDataOutputStream* dos = NULL;
		GOutputStream* _tmp137_;
		GDataOutputStream* _tmp138_;
		GDataOutputStream* _tmp139_;
		const gchar* _tmp140_;
		gchar* _tmp141_ = NULL;
		GKeyFile* _tmp142_;
		const gchar* _tmp143_;
		gchar* _tmp144_;
		VteTerminal* _tmp145_;
		gchar* _tmp146_ = NULL;
		GKeyFile* _tmp147_;
		const gchar* _tmp148_;
		gchar* _tmp149_;
		gchar* _tmp150_;
		gchar* backspace_binding = NULL;
		GKeyFile* _tmp151_;
		const gchar* _tmp152_;
		gchar* _tmp153_;
		const gchar* _tmp154_;
		gchar* del_binding = NULL;
		GKeyFile* _tmp164_;
		const gchar* _tmp165_;
		gchar* _tmp166_;
		const gchar* _tmp167_;
		VteTerminal* _tmp177_;
		_tmp14_ = utils_get_ssh_script_path ();
		_tmp15_ = _tmp14_;
		_tmp16_ = g_file_new_for_path (_tmp15_);
		_tmp17_ = _tmp16_;
		_g_free0 (_tmp15_);
		file = _tmp17_;
		_tmp18_ = file;
		if (!g_file_query_exists (_tmp18_, NULL)) {
			FILE* _tmp19_;
			GFile* _tmp20_;
			gchar* _tmp21_;
			gchar* _tmp22_;
			_tmp19_ = stderr;
			_tmp20_ = file;
			_tmp21_ = g_file_get_path (_tmp20_);
			_tmp22_ = _tmp21_;
			fprintf (_tmp19_, "File '%s' doesn't exist.\n", _tmp22_);
			_g_free0 (_tmp22_);
		}
		_tmp24_ = file;
		_tmp25_ = g_file_read (_tmp24_, NULL, &_inner_error0_);
		_tmp23_ = _tmp25_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_object_unref0 (file);
			goto __catch1_g_error;
		}
		_tmp26_ = g_data_input_stream_new ((GInputStream*) _tmp23_);
		dis = _tmp26_;
		_tmp27_ = g_strdup ("");
		ssh_script_content = _tmp27_;
		while (TRUE) {
			gchar* _tmp28_ = NULL;
			GDataInputStream* _tmp29_;
			gchar* _tmp30_;
			gchar* _tmp31_;
			const gchar* _tmp32_;
			const gchar* _tmp33_;
			const gchar* _tmp34_;
			gchar* _tmp35_;
			gchar* _tmp36_;
			gchar* _tmp37_;
			_tmp29_ = dis;
			_tmp30_ = g_data_input_stream_read_line (_tmp29_, NULL, NULL, &_inner_error0_);
			_tmp28_ = _tmp30_;
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				_g_free0 (ssh_script_content);
				_g_free0 (line);
				_g_object_unref0 (dis);
				_g_object_unref0 (_tmp23_);
				_g_object_unref0 (file);
				goto __catch1_g_error;
			}
			_tmp31_ = _tmp28_;
			_tmp28_ = NULL;
			_g_free0 (line);
			line = _tmp31_;
			_tmp32_ = line;
			if (!(_tmp32_ != NULL)) {
				_g_free0 (_tmp28_);
				break;
			}
			_tmp33_ = ssh_script_content;
			_tmp34_ = line;
			_tmp35_ = g_strdup_printf ("%s\n", _tmp34_);
			_tmp36_ = _tmp35_;
			_tmp37_ = g_strconcat (_tmp33_, _tmp36_, NULL);
			_g_free0 (ssh_script_content);
			ssh_script_content = _tmp37_;
			_g_free0 (_tmp36_);
			_g_free0 (_tmp28_);
		}
		_tmp38_ = self->server_info;
		_tmp40_ = _tmp39_ = g_strsplit (_tmp38_, "@", 0);
		server_infos = _tmp40_;
		server_infos_length1 = _vala_array_length (_tmp39_);
		_server_infos_size_ = server_infos_length1;
		_tmp41_ = g_strdup ("");
		password = _tmp41_;
		_tmp42_ = self->server_info;
		_tmp43_ = strlen (_tmp42_);
		_tmp44_ = _tmp43_;
		if (_tmp44_ > 2) {
			gchar** _tmp45_;
			gint _tmp45__length1;
			const gchar* _tmp46_;
			gchar** _tmp47_;
			gint _tmp47__length1;
			const gchar* _tmp48_;
			gchar** _tmp49_;
			gint _tmp49__length1;
			const gchar* _tmp50_;
			gchar* _tmp51_;
			_tmp45_ = server_infos;
			_tmp45__length1 = server_infos_length1;
			_tmp46_ = _tmp45_[0];
			_tmp47_ = server_infos;
			_tmp47__length1 = server_infos_length1;
			_tmp48_ = _tmp47_[1];
			_tmp49_ = server_infos;
			_tmp49__length1 = server_infos_length1;
			_tmp50_ = _tmp49_[2];
			_tmp51_ = utils_lookup_password (_tmp46_, _tmp48_, _tmp50_);
			_g_free0 (password);
			password = _tmp51_;
		} else {
			gchar** _tmp52_;
			gint _tmp52__length1;
			const gchar* _tmp53_;
			gchar** _tmp54_;
			gint _tmp54__length1;
			const gchar* _tmp55_;
			gchar* _tmp56_;
			_tmp52_ = server_infos;
			_tmp52__length1 = server_infos_length1;
			_tmp53_ = _tmp52_[0];
			_tmp54_ = server_infos;
			_tmp54__length1 = server_infos_length1;
			_tmp55_ = _tmp54_[1];
			_tmp56_ = utils_lookup_password (_tmp53_, _tmp55_, NULL);
			_g_free0 (password);
			password = _tmp56_;
		}
		_tmp57_ = ssh_script_content;
		_tmp58_ = server_infos;
		_tmp58__length1 = server_infos_length1;
		_tmp59_ = _tmp58_[0];
		_tmp60_ = string_replace (_tmp57_, "<<USER>>", _tmp59_);
		_g_free0 (ssh_script_content);
		ssh_script_content = _tmp60_;
		_tmp61_ = ssh_script_content;
		_tmp62_ = server_infos;
		_tmp62__length1 = server_infos_length1;
		_tmp63_ = _tmp62_[1];
		_tmp64_ = string_replace (_tmp61_, "<<SERVER>>", _tmp63_);
		_g_free0 (ssh_script_content);
		ssh_script_content = _tmp64_;
		_tmp65_ = server_infos;
		_tmp65__length1 = server_infos_length1;
		if (_tmp65__length1 > 2) {
			const gchar* _tmp66_;
			gchar** _tmp67_;
			gint _tmp67__length1;
			const gchar* _tmp68_;
			gchar* _tmp69_;
			_tmp66_ = ssh_script_content;
			_tmp67_ = server_infos;
			_tmp67__length1 = server_infos_length1;
			_tmp68_ = _tmp67_[2];
			_tmp69_ = string_replace (_tmp66_, "<<PORT>>", _tmp68_);
			_g_free0 (ssh_script_content);
			ssh_script_content = _tmp69_;
		} else {
			gchar* _tmp70_ = NULL;
			GKeyFile* _tmp71_;
			const gchar* _tmp72_;
			gchar* _tmp73_;
			const gchar* _tmp74_;
			gchar* _tmp75_;
			_tmp71_ = config_file;
			_tmp72_ = self->server_info;
			_tmp73_ = g_key_file_get_value (_tmp71_, _tmp72_, "Port", &_inner_error0_);
			_tmp70_ = _tmp73_;
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				_g_free0 (password);
				server_infos = (_vala_array_free (server_infos, server_infos_length1, (GDestroyNotify) g_free), NULL);
				_g_free0 (ssh_script_content);
				_g_free0 (line);
				_g_object_unref0 (dis);
				_g_object_unref0 (_tmp23_);
				_g_object_unref0 (file);
				goto __catch1_g_error;
			}
			_tmp74_ = ssh_script_content;
			_tmp75_ = string_replace (_tmp74_, "<<PORT>>", _tmp70_);
			_g_free0 (ssh_script_content);
			ssh_script_content = _tmp75_;
			_g_free0 (_tmp70_);
		}
		use_private_key = TRUE;
		_tmp76_ = g_strdup ("");
		private_key_file = _tmp76_;
		{
			gchar* _tmp77_ = NULL;
			GKeyFile* _tmp78_;
			const gchar* _tmp79_;
			gchar* _tmp80_;
			gchar* _tmp81_;
			const gchar* _tmp82_;
			_tmp78_ = config_file;
			_tmp79_ = self->server_info;
			_tmp80_ = g_key_file_get_value (_tmp78_, _tmp79_, "PrivateKey", &_inner_error0_);
			_tmp77_ = _tmp80_;
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				if (_inner_error0_->domain == G_KEY_FILE_ERROR) {
					goto __catch2_g_key_file_error;
				}
				_g_free0 (private_key_file);
				_g_free0 (password);
				server_infos = (_vala_array_free (server_infos, server_infos_length1, (GDestroyNotify) g_free), NULL);
				_g_free0 (ssh_script_content);
				_g_free0 (line);
				_g_object_unref0 (dis);
				_g_object_unref0 (_tmp23_);
				_g_object_unref0 (file);
				_g_object_unref0 (gio_file);
				_g_free0 (config_file_path);
				_g_key_file_unref0 (config_file);
				g_critical ("file %s: line %d: unexpected 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;
			}
			_tmp81_ = _tmp77_;
			_tmp77_ = NULL;
			_g_free0 (private_key_file);
			private_key_file = _tmp81_;
			_tmp82_ = private_key_file;
			use_private_key = g_file_test (_tmp82_, G_FILE_TEST_EXISTS);
			_g_free0 (_tmp77_);
		}
		goto __finally2;
		__catch2_g_key_file_error:
		{
			g_clear_error (&_inner_error0_);
			use_private_key = FALSE;
		}
		__finally2:
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_free0 (private_key_file);
			_g_free0 (password);
			server_infos = (_vala_array_free (server_infos, server_infos_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (ssh_script_content);
			_g_free0 (line);
			_g_object_unref0 (dis);
			_g_object_unref0 (_tmp23_);
			_g_object_unref0 (file);
			goto __catch1_g_error;
		}
		if (use_private_key) {
			const gchar* _tmp83_;
			const gchar* _tmp84_;
			gchar* _tmp85_;
			gchar* _tmp86_;
			gchar* _tmp87_;
			const gchar* _tmp88_;
			gchar* _tmp89_;
			const gchar* _tmp90_;
			gchar* _tmp91_;
			_tmp83_ = ssh_script_content;
			_tmp84_ = private_key_file;
			_tmp85_ = g_strdup_printf (" -i %s", _tmp84_);
			_tmp86_ = _tmp85_;
			_tmp87_ = string_replace (_tmp83_, "<<PRIVATE_KEY>>", _tmp86_);
			_g_free0 (ssh_script_content);
			ssh_script_content = _tmp87_;
			_g_free0 (_tmp86_);
			_tmp88_ = ssh_script_content;
			_tmp89_ = string_replace (_tmp88_, "<<PASSWORD>>", "");
			_g_free0 (ssh_script_content);
			ssh_script_content = _tmp89_;
			_tmp90_ = ssh_script_content;
			_tmp91_ = string_replace (_tmp90_, "<<AUTHENTICATION>>", "yes");
			_g_free0 (ssh_script_content);
			ssh_script_content = _tmp91_;
		} else {
			const gchar* _tmp92_;
			gchar* _tmp93_;
			GRegex* _tmp94_ = NULL;
			GRegex* _tmp95_;
			gchar* escaped_password = NULL;
			const gchar* _tmp96_;
			gchar* _tmp97_;
			const gchar* _tmp98_;
			const gchar* _tmp99_;
			gchar* _tmp100_;
			const gchar* _tmp101_;
			gchar* _tmp102_;
			_tmp92_ = ssh_script_content;
			_tmp93_ = string_replace (_tmp92_, "<<PRIVATE_KEY>>", "");
			_g_free0 (ssh_script_content);
			ssh_script_content = _tmp93_;
			_tmp95_ = g_regex_new ("([\"$\\\\])", 0, 0, &_inner_error0_);
			_tmp94_ = _tmp95_;
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				_g_free0 (private_key_file);
				_g_free0 (password);
				server_infos = (_vala_array_free (server_infos, server_infos_length1, (GDestroyNotify) g_free), NULL);
				_g_free0 (ssh_script_content);
				_g_free0 (line);
				_g_object_unref0 (dis);
				_g_object_unref0 (_tmp23_);
				_g_object_unref0 (file);
				goto __catch1_g_error;
			}
			_tmp96_ = password;
			_tmp97_ = g_regex_replace (_tmp94_, _tmp96_, (gssize) -1, 0, "\\\\\\1", 0, &_inner_error0_);
			escaped_password = _tmp97_;
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				_g_regex_unref0 (_tmp94_);
				_g_free0 (private_key_file);
				_g_free0 (password);
				server_infos = (_vala_array_free (server_infos, server_infos_length1, (GDestroyNotify) g_free), NULL);
				_g_free0 (ssh_script_content);
				_g_free0 (line);
				_g_object_unref0 (dis);
				_g_object_unref0 (_tmp23_);
				_g_object_unref0 (file);
				goto __catch1_g_error;
			}
			_tmp98_ = ssh_script_content;
			_tmp99_ = escaped_password;
			_tmp100_ = string_replace (_tmp98_, "<<PASSWORD>>", _tmp99_);
			_g_free0 (ssh_script_content);
			ssh_script_content = _tmp100_;
			_tmp101_ = ssh_script_content;
			_tmp102_ = string_replace (_tmp101_, "<<AUTHENTICATION>>", "no");
			_g_free0 (ssh_script_content);
			ssh_script_content = _tmp102_;
			_g_free0 (escaped_password);
			_g_regex_unref0 (_tmp94_);
		}
		_tmp103_ = config_file;
		_tmp104_ = self->server_info;
		_tmp105_ = g_key_file_get_string (_tmp103_, _tmp104_, "Path", &_inner_error0_);
		path = _tmp105_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_free0 (private_key_file);
			_g_free0 (password);
			server_infos = (_vala_array_free (server_infos, server_infos_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (ssh_script_content);
			_g_free0 (line);
			_g_object_unref0 (dis);
			_g_object_unref0 (_tmp23_);
			_g_object_unref0 (file);
			goto __catch1_g_error;
		}
		_tmp106_ = config_file;
		_tmp107_ = self->server_info;
		_tmp108_ = g_key_file_get_string (_tmp106_, _tmp107_, "Command", &_inner_error0_);
		command = _tmp108_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_free0 (path);
			_g_free0 (private_key_file);
			_g_free0 (password);
			server_infos = (_vala_array_free (server_infos, server_infos_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (ssh_script_content);
			_g_free0 (line);
			_g_object_unref0 (dis);
			_g_object_unref0 (_tmp23_);
			_g_object_unref0 (file);
			goto __catch1_g_error;
		}
		_tmp109_ = g_strdup_printf ("echo %s &&", _ ("Welcome to Deepin Terminal, please make sure that rz and sz commands h" \
"ave been installed in the server before right clicking to upload and d" \
"ownload files."));
		remote_command = _tmp109_;
		_tmp110_ = path;
		_tmp111_ = string_strip (_tmp110_);
		_tmp112_ = _tmp111_;
		_tmp113_ = g_strcmp0 (_tmp112_, "") != 0;
		_g_free0 (_tmp112_);
		if (_tmp113_) {
			const gchar* _tmp114_;
			const gchar* _tmp115_;
			gchar* _tmp116_;
			gchar* _tmp117_;
			gchar* _tmp118_;
			_tmp114_ = remote_command;
			_tmp115_ = path;
			_tmp116_ = g_strdup_printf ("cd %s && ", _tmp115_);
			_tmp117_ = _tmp116_;
			_tmp118_ = g_strconcat (_tmp114_, _tmp117_, NULL);
			_g_free0 (remote_command);
			remote_command = _tmp118_;
			_g_free0 (_tmp117_);
		}
		_tmp119_ = command;
		_tmp120_ = string_strip (_tmp119_);
		_tmp121_ = _tmp120_;
		_tmp122_ = g_strcmp0 (_tmp121_, "") != 0;
		_g_free0 (_tmp121_);
		if (_tmp122_) {
			const gchar* _tmp123_;
			const gchar* _tmp124_;
			gchar* _tmp125_;
			gchar* _tmp126_;
			gchar* _tmp127_;
			_tmp123_ = remote_command;
			_tmp124_ = command;
			_tmp125_ = g_strdup_printf ("%s && ", _tmp124_);
			_tmp126_ = _tmp125_;
			_tmp127_ = g_strconcat (_tmp123_, _tmp126_, NULL);
			_g_free0 (remote_command);
			remote_command = _tmp127_;
			_g_free0 (_tmp126_);
		}
		_tmp128_ = ssh_script_content;
		_tmp129_ = remote_command;
		_tmp130_ = string_replace (_tmp128_, "<<REMOTE_COMMAND>>", _tmp129_);
		_g_free0 (ssh_script_content);
		ssh_script_content = _tmp130_;
		_tmp132_ = g_file_new_tmp ("deepin-terminal-gtk-XXXXXX", &_tmp131_, &_inner_error0_);
		_g_object_unref0 (iostream);
		iostream = _tmp131_;
		tmpfile = _tmp132_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_object_unref0 (iostream);
			_g_free0 (remote_command);
			_g_free0 (command);
			_g_free0 (path);
			_g_free0 (private_key_file);
			_g_free0 (password);
			server_infos = (_vala_array_free (server_infos, server_infos_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (ssh_script_content);
			_g_free0 (line);
			_g_object_unref0 (dis);
			_g_object_unref0 (_tmp23_);
			_g_object_unref0 (file);
			goto __catch1_g_error;
		}
		_tmp133_ = iostream;
		_tmp134_ = g_io_stream_get_output_stream ((GIOStream*) _tmp133_);
		_tmp135_ = _tmp134_;
		_tmp136_ = _g_object_ref0 (_tmp135_);
		ostream = _tmp136_;
		_tmp137_ = ostream;
		_tmp138_ = g_data_output_stream_new (_tmp137_);
		dos = _tmp138_;
		_tmp139_ = dos;
		_tmp140_ = ssh_script_content;
		g_data_output_stream_put_string (_tmp139_, _tmp140_, NULL, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_object_unref0 (dos);
			_g_object_unref0 (ostream);
			_g_object_unref0 (tmpfile);
			_g_object_unref0 (iostream);
			_g_free0 (remote_command);
			_g_free0 (command);
			_g_free0 (path);
			_g_free0 (private_key_file);
			_g_free0 (password);
			server_infos = (_vala_array_free (server_infos, server_infos_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (ssh_script_content);
			_g_free0 (line);
			_g_object_unref0 (dis);
			_g_object_unref0 (_tmp23_);
			_g_object_unref0 (file);
			goto __catch1_g_error;
		}
		_tmp142_ = config_file;
		_tmp143_ = self->server_info;
		_tmp144_ = g_key_file_get_value (_tmp142_, _tmp143_, "Encode", &_inner_error0_);
		_tmp141_ = _tmp144_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_object_unref0 (dos);
			_g_object_unref0 (ostream);
			_g_object_unref0 (tmpfile);
			_g_object_unref0 (iostream);
			_g_free0 (remote_command);
			_g_free0 (command);
			_g_free0 (path);
			_g_free0 (private_key_file);
			_g_free0 (password);
			server_infos = (_vala_array_free (server_infos, server_infos_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (ssh_script_content);
			_g_free0 (line);
			_g_object_unref0 (dis);
			_g_object_unref0 (_tmp23_);
			_g_object_unref0 (file);
			goto __catch1_g_error;
		}
		_tmp145_ = self->term;
		vte_terminal_set_encoding (_tmp145_, _tmp141_, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_free0 (_tmp141_);
			_g_object_unref0 (dos);
			_g_object_unref0 (ostream);
			_g_object_unref0 (tmpfile);
			_g_object_unref0 (iostream);
			_g_free0 (remote_command);
			_g_free0 (command);
			_g_free0 (path);
			_g_free0 (private_key_file);
			_g_free0 (password);
			server_infos = (_vala_array_free (server_infos, server_infos_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (ssh_script_content);
			_g_free0 (line);
			_g_object_unref0 (dis);
			_g_object_unref0 (_tmp23_);
			_g_object_unref0 (file);
			goto __catch1_g_error;
		}
		_tmp147_ = config_file;
		_tmp148_ = self->server_info;
		_tmp149_ = g_key_file_get_value (_tmp147_, _tmp148_, "Name", &_inner_error0_);
		_tmp146_ = _tmp149_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_free0 (_tmp141_);
			_g_object_unref0 (dos);
			_g_object_unref0 (ostream);
			_g_object_unref0 (tmpfile);
			_g_object_unref0 (iostream);
			_g_free0 (remote_command);
			_g_free0 (command);
			_g_free0 (path);
			_g_free0 (private_key_file);
			_g_free0 (password);
			server_infos = (_vala_array_free (server_infos, server_infos_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (ssh_script_content);
			_g_free0 (line);
			_g_object_unref0 (dis);
			_g_object_unref0 (_tmp23_);
			_g_object_unref0 (file);
			goto __catch1_g_error;
		}
		_tmp150_ = _tmp146_;
		_tmp146_ = NULL;
		_g_free0 (self->remote_server_title);
		self->remote_server_title = _tmp150_;
		_tmp151_ = config_file;
		_tmp152_ = self->server_info;
		_tmp153_ = g_key_file_get_value (_tmp151_, _tmp152_, "Backspace", &_inner_error0_);
		backspace_binding = _tmp153_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_free0 (_tmp146_);
			_g_free0 (_tmp141_);
			_g_object_unref0 (dos);
			_g_object_unref0 (ostream);
			_g_object_unref0 (tmpfile);
			_g_object_unref0 (iostream);
			_g_free0 (remote_command);
			_g_free0 (command);
			_g_free0 (path);
			_g_free0 (private_key_file);
			_g_free0 (password);
			server_infos = (_vala_array_free (server_infos, server_infos_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (ssh_script_content);
			_g_free0 (line);
			_g_object_unref0 (dis);
			_g_object_unref0 (_tmp23_);
			_g_object_unref0 (file);
			goto __catch1_g_error;
		}
		_tmp154_ = backspace_binding;
		if (g_strcmp0 (_tmp154_, "auto") == 0) {
			VteTerminal* _tmp155_;
			_tmp155_ = self->term;
			vte_terminal_set_backspace_binding (_tmp155_, VTE_ERASE_AUTO);
		} else {
			const gchar* _tmp156_;
			_tmp156_ = backspace_binding;
			if (g_strcmp0 (_tmp156_, "escape-sequence") == 0) {
				VteTerminal* _tmp157_;
				_tmp157_ = self->term;
				vte_terminal_set_backspace_binding (_tmp157_, VTE_ERASE_DELETE_SEQUENCE);
			} else {
				const gchar* _tmp158_;
				_tmp158_ = backspace_binding;
				if (g_strcmp0 (_tmp158_, "ascii-del") == 0) {
					VteTerminal* _tmp159_;
					_tmp159_ = self->term;
					vte_terminal_set_backspace_binding (_tmp159_, VTE_ERASE_ASCII_DELETE);
				} else {
					const gchar* _tmp160_;
					_tmp160_ = backspace_binding;
					if (g_strcmp0 (_tmp160_, "control-h") == 0) {
						VteTerminal* _tmp161_;
						_tmp161_ = self->term;
						vte_terminal_set_backspace_binding (_tmp161_, VTE_ERASE_ASCII_BACKSPACE);
					} else {
						const gchar* _tmp162_;
						_tmp162_ = backspace_binding;
						if (g_strcmp0 (_tmp162_, "tty") == 0) {
							VteTerminal* _tmp163_;
							_tmp163_ = self->term;
							vte_terminal_set_backspace_binding (_tmp163_, VTE_ERASE_TTY);
						}
					}
				}
			}
		}
		_tmp164_ = config_file;
		_tmp165_ = self->server_info;
		_tmp166_ = g_key_file_get_value (_tmp164_, _tmp165_, "Del", &_inner_error0_);
		del_binding = _tmp166_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_free0 (backspace_binding);
			_g_free0 (_tmp146_);
			_g_free0 (_tmp141_);
			_g_object_unref0 (dos);
			_g_object_unref0 (ostream);
			_g_object_unref0 (tmpfile);
			_g_object_unref0 (iostream);
			_g_free0 (remote_command);
			_g_free0 (command);
			_g_free0 (path);
			_g_free0 (private_key_file);
			_g_free0 (password);
			server_infos = (_vala_array_free (server_infos, server_infos_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (ssh_script_content);
			_g_free0 (line);
			_g_object_unref0 (dis);
			_g_object_unref0 (_tmp23_);
			_g_object_unref0 (file);
			goto __catch1_g_error;
		}
		_tmp167_ = del_binding;
		if (g_strcmp0 (_tmp167_, "auto") == 0) {
			VteTerminal* _tmp168_;
			_tmp168_ = self->term;
			vte_terminal_set_delete_binding (_tmp168_, VTE_ERASE_AUTO);
		} else {
			const gchar* _tmp169_;
			_tmp169_ = del_binding;
			if (g_strcmp0 (_tmp169_, "escape-sequence") == 0) {
				VteTerminal* _tmp170_;
				_tmp170_ = self->term;
				vte_terminal_set_delete_binding (_tmp170_, VTE_ERASE_DELETE_SEQUENCE);
			} else {
				const gchar* _tmp171_;
				_tmp171_ = del_binding;
				if (g_strcmp0 (_tmp171_, "ascii-del") == 0) {
					VteTerminal* _tmp172_;
					_tmp172_ = self->term;
					vte_terminal_set_delete_binding (_tmp172_, VTE_ERASE_ASCII_DELETE);
				} else {
					const gchar* _tmp173_;
					_tmp173_ = del_binding;
					if (g_strcmp0 (_tmp173_, "control-h") == 0) {
						VteTerminal* _tmp174_;
						_tmp174_ = self->term;
						vte_terminal_set_delete_binding (_tmp174_, VTE_ERASE_ASCII_BACKSPACE);
					} else {
						const gchar* _tmp175_;
						_tmp175_ = del_binding;
						if (g_strcmp0 (_tmp175_, "tty") == 0) {
							VteTerminal* _tmp176_;
							_tmp176_ = self->term;
							vte_terminal_set_delete_binding (_tmp176_, VTE_ERASE_TTY);
						}
					}
				}
			}
		}
		_tmp177_ = self->term;
		if (_tmp177_ != NULL) {
			gchar* login_command = NULL;
			GFile* _tmp178_;
			gchar* _tmp179_;
			gchar* _tmp180_;
			gchar* _tmp181_;
			gchar* _tmp182_;
			gchar* _tmp183_;
			gchar* _tmp184_;
			GFile* _tmp185_;
			gchar* _tmp186_;
			VteTerminal* _tmp187_;
			const gchar* _tmp188_;
			gint _tmp189_ = 0;
			guint8* _tmp190_;
			guint8* _tmp191_;
			gint _tmp191__length1;
			_tmp178_ = tmpfile;
			_tmp179_ = g_file_get_path (_tmp178_);
			_tmp180_ = _tmp179_;
			_tmp181_ = g_strconcat ("expect -f ", _tmp180_, NULL);
			_tmp182_ = _tmp181_;
			_tmp183_ = g_strconcat (_tmp182_, "\n", NULL);
			_tmp184_ = _tmp183_;
			_g_free0 (_tmp182_);
			_g_free0 (_tmp180_);
			login_command = _tmp184_;
			_tmp185_ = tmpfile;
			_tmp186_ = g_file_get_path (_tmp185_);
			_g_free0 (self->expect_file_path);
			self->expect_file_path = _tmp186_;
			_tmp187_ = self->term;
			_tmp188_ = login_command;
			_tmp190_ = utils_to_raw_data (_tmp188_, &_tmp189_);
			_tmp191_ = _tmp190_;
			_tmp191__length1 = _tmp189_;
			vte_terminal_feed_child (_tmp187_, _tmp191_, (gssize) _tmp189_);
			_tmp191_ = (g_free (_tmp191_), NULL);
			_g_free0 (login_command);
		}
		_g_free0 (del_binding);
		_g_free0 (backspace_binding);
		_g_free0 (_tmp146_);
		_g_free0 (_tmp141_);
		_g_object_unref0 (dos);
		_g_object_unref0 (ostream);
		_g_object_unref0 (tmpfile);
		_g_object_unref0 (iostream);
		_g_free0 (remote_command);
		_g_free0 (command);
		_g_free0 (path);
		_g_free0 (private_key_file);
		_g_free0 (password);
		server_infos = (_vala_array_free (server_infos, server_infos_length1, (GDestroyNotify) g_free), NULL);
		_g_free0 (ssh_script_content);
		_g_free0 (line);
		_g_object_unref0 (dis);
		_g_object_unref0 (_tmp23_);
		_g_object_unref0 (file);
	}
	goto __finally1;
	__catch1_g_error:
	{
		GError* e = NULL;
		FILE* _tmp192_;
		GError* _tmp193_;
		const gchar* _tmp194_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp192_ = stderr;
		_tmp193_ = e;
		_tmp194_ = _tmp193_->message;
		fprintf (_tmp192_, "login_server: %s\n", _tmp194_);
		_g_error_free0 (e);
	}
	__finally1:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		_g_object_unref0 (gio_file);
		_g_free0 (config_file_path);
		_g_key_file_unref0 (config_file);
		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;
	}
	_g_object_unref0 (gio_file);
	_g_free0 (config_file_path);
	_g_key_file_unref0 (config_file);
}

static void
widgets_term_class_init (WidgetsTermClass * klass,
                         gpointer klass_data)
{
	gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	const gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	const gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	const gchar* _tmp18_;
	gchar* _tmp19_;
	gchar* _tmp20_;
	const gchar* _tmp21_;
	gchar* _tmp22_;
	gchar* _tmp23_;
	gchar* _tmp24_;
	const gchar* _tmp25_;
	gchar* _tmp26_;
	gchar* _tmp27_;
	gchar* _tmp28_;
	gchar* _tmp29_;
	const gchar* _tmp30_;
	gchar* _tmp31_;
	gchar* _tmp32_;
	gchar* _tmp33_;
	gchar* _tmp34_;
	const gchar* _tmp35_;
	gchar* _tmp36_;
	gchar* _tmp37_;
	gchar* _tmp38_;
	gchar* _tmp39_;
	const gchar* _tmp40_;
	gchar* _tmp41_;
	gchar* _tmp42_;
	gchar* _tmp43_;
	const gchar* _tmp44_;
	gchar* _tmp45_;
	gchar* _tmp46_;
	const gchar* _tmp47_;
	gchar* _tmp48_;
	gchar* _tmp49_;
	gchar* _tmp50_;
	gchar* _tmp51_;
	const gchar* _tmp52_;
	gchar* _tmp53_;
	gchar* _tmp54_;
	const gchar* _tmp55_;
	gchar* _tmp56_;
	gchar* _tmp57_;
	const gchar* _tmp58_;
	gchar* _tmp59_;
	const gchar* _tmp60_;
	gchar* _tmp61_;
	gchar* _tmp62_;
	gchar* _tmp63_;
	gchar* _tmp64_;
	const gchar* _tmp65_;
	gchar* _tmp66_;
	gchar* _tmp67_;
	const gchar* _tmp68_;
	gchar* _tmp69_;
	gchar* _tmp70_;
	const gchar* _tmp71_;
	gchar* _tmp72_;
	const gchar* _tmp73_;
	gchar* _tmp74_;
	gchar* _tmp75_;
	gchar* _tmp76_;
	gchar* _tmp77_;
	const gchar* _tmp78_;
	gchar* _tmp79_;
	gchar* _tmp80_;
	gchar* _tmp81_;
	gchar* _tmp82_;
	const gchar* _tmp83_;
	gchar* _tmp84_;
	gchar* _tmp85_;
	gchar* _tmp86_;
	gchar* _tmp87_;
	const gchar* _tmp88_;
	gchar* _tmp89_;
	const gchar* _tmp90_;
	gchar* _tmp91_;
	gchar* _tmp92_;
	gchar* _tmp93_;
	gchar* _tmp94_;
	const gchar* _tmp95_;
	gchar* _tmp96_;
	gchar* _tmp97_;
	gchar* _tmp98_;
	gchar* _tmp99_;
	const gchar* _tmp100_;
	gchar* _tmp101_;
	gchar* _tmp102_;
	gchar* _tmp103_;
	gchar* _tmp104_;
	const gchar* _tmp105_;
	gchar* _tmp106_;
	gchar* _tmp107_;
	const gchar* _tmp108_;
	gchar* _tmp109_;
	gchar* _tmp110_;
	gchar* _tmp111_;
	gchar* _tmp112_;
	const gchar* _tmp113_;
	gchar* _tmp114_;
	gchar* _tmp115_;
	const gchar* _tmp116_;
	gchar* _tmp117_;
	gchar** _tmp118_;
	widgets_term_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &WidgetsTerm_private_offset);
	G_OBJECT_CLASS (klass)->finalize = widgets_term_finalize;
	widgets_term_signals[WIDGETS_TERM_CHANGE_TITLE_SIGNAL] = g_signal_new ("change-title", WIDGETS_TYPE_TERM, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
	widgets_term_signals[WIDGETS_TERM_EXIT_SIGNAL] = g_signal_new ("exit", WIDGETS_TYPE_TERM, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	widgets_term_signals[WIDGETS_TERM_HIGHLIGHT_TAB_SIGNAL] = g_signal_new ("highlight-tab", WIDGETS_TYPE_TERM, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	widgets_term_signals[WIDGETS_TERM_EXIT_WITH_BAD_CODE_SIGNAL] = g_signal_new ("exit-with-bad-code", WIDGETS_TYPE_TERM, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT);
	_tmp0_ = g_strdup ("-[:alnum:]");
	widgets_term_USERCHARS = _tmp0_;
	_tmp1_ = widgets_term_USERCHARS;
	_tmp2_ = g_strconcat ("[", _tmp1_, NULL);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_strconcat (_tmp3_, "]", NULL);
	widgets_term_USERCHARS_CLASS = _tmp4_;
	_tmp5_ = g_strdup ("[-[:alnum:]\\Q,?;.:/!%$^*&~\"#'\\E]");
	widgets_term_PASSCHARS_CLASS = _tmp5_;
	_tmp6_ = g_strdup ("[-[:alnum:]]");
	widgets_term_HOSTCHARS_CLASS = _tmp6_;
	_tmp7_ = widgets_term_HOSTCHARS_CLASS;
	_tmp8_ = g_strconcat (_tmp7_, "+(\\.", NULL);
	_tmp9_ = _tmp8_;
	_tmp10_ = widgets_term_HOSTCHARS_CLASS;
	_tmp11_ = g_strconcat (_tmp9_, _tmp10_, NULL);
	_tmp12_ = _tmp11_;
	_tmp13_ = g_strconcat (_tmp12_, "+)*", NULL);
	widgets_term_HOST = _tmp13_;
	_tmp14_ = g_strdup ("(?:\\:[[:digit:]]{1,5})?");
	widgets_term_PORT = _tmp14_;
	_tmp15_ = g_strdup ("[-[:alnum:]\\Q_$.+!*,;:@&=?/~#%\\E]");
	widgets_term_PATHCHARS_CLASS = _tmp15_;
	_tmp16_ = g_strdup ("[^\\Q]'.}>) \t\r\n,\"\\E]");
	widgets_term_PATHTERM_CLASS = _tmp16_;
	_tmp17_ = g_strdup ("(?:news:|telnet:|nntp:|file:\\/|https?:|ftps?:|sftp:|webcal:|irc:|sftp" \
":|ldaps?:|nfs:|smb:|rsync:|ssh:|rlogin:|telnet:|git:|git\\+ssh:|bzr:|b" \
"zr\\+ssh:|svn:|svn\\+ssh:|hg:|mailto:|magnet:)");
	widgets_term_SCHEME = _tmp17_;
	_tmp18_ = widgets_term_USERCHARS_CLASS;
	_tmp19_ = g_strconcat (_tmp18_, "+(?:", NULL);
	_tmp20_ = _tmp19_;
	_tmp21_ = widgets_term_PASSCHARS_CLASS;
	_tmp22_ = g_strconcat (_tmp20_, _tmp21_, NULL);
	_tmp23_ = _tmp22_;
	_tmp24_ = g_strconcat (_tmp23_, "+)?", NULL);
	widgets_term_USERPASS = _tmp24_;
	_tmp25_ = widgets_term_PATHCHARS_CLASS;
	_tmp26_ = g_strconcat ("(?:(/", _tmp25_, NULL);
	_tmp27_ = _tmp26_;
	_tmp28_ = g_strconcat (_tmp27_, "+(?:[(]", NULL);
	_tmp29_ = _tmp28_;
	_tmp30_ = widgets_term_PATHCHARS_CLASS;
	_tmp31_ = g_strconcat (_tmp29_, _tmp30_, NULL);
	_tmp32_ = _tmp31_;
	_tmp33_ = g_strconcat (_tmp32_, "*[)])*", NULL);
	_tmp34_ = _tmp33_;
	_tmp35_ = widgets_term_PATHCHARS_CLASS;
	_tmp36_ = g_strconcat (_tmp34_, _tmp35_, NULL);
	_tmp37_ = _tmp36_;
	_tmp38_ = g_strconcat (_tmp37_, "*)*", NULL);
	_tmp39_ = _tmp38_;
	_tmp40_ = widgets_term_PATHTERM_CLASS;
	_tmp41_ = g_strconcat (_tmp39_, _tmp40_, NULL);
	_tmp42_ = _tmp41_;
	_tmp43_ = g_strconcat (_tmp42_, ")?", NULL);
	widgets_term_URLPATH = _tmp43_;
	_tmp44_ = widgets_term_SCHEME;
	_tmp45_ = g_strconcat (_tmp44_, "//(?:", NULL);
	_tmp46_ = _tmp45_;
	_tmp47_ = widgets_term_USERPASS;
	_tmp48_ = g_strconcat (_tmp46_, _tmp47_, NULL);
	_tmp49_ = _tmp48_;
	_tmp50_ = g_strconcat (_tmp49_, "\\@)?", NULL);
	_tmp51_ = _tmp50_;
	_tmp52_ = widgets_term_HOST;
	_tmp53_ = g_strconcat (_tmp51_, _tmp52_, NULL);
	_tmp54_ = _tmp53_;
	_tmp55_ = widgets_term_PORT;
	_tmp56_ = g_strconcat (_tmp54_, _tmp55_, NULL);
	_tmp57_ = _tmp56_;
	_tmp58_ = widgets_term_URLPATH;
	_tmp59_ = g_strconcat (_tmp57_, _tmp58_, NULL);
	_tmp60_ = widgets_term_HOSTCHARS_CLASS;
	_tmp61_ = g_strconcat ("(?:www|ftp)", _tmp60_, NULL);
	_tmp62_ = _tmp61_;
	_tmp63_ = g_strconcat (_tmp62_, "*\\.", NULL);
	_tmp64_ = _tmp63_;
	_tmp65_ = widgets_term_HOST;
	_tmp66_ = g_strconcat (_tmp64_, _tmp65_, NULL);
	_tmp67_ = _tmp66_;
	_tmp68_ = widgets_term_PORT;
	_tmp69_ = g_strconcat (_tmp67_, _tmp68_, NULL);
	_tmp70_ = _tmp69_;
	_tmp71_ = widgets_term_URLPATH;
	_tmp72_ = g_strconcat (_tmp70_, _tmp71_, NULL);
	_tmp73_ = widgets_term_USERCHARS_CLASS;
	_tmp74_ = g_strconcat ("(?:callto:|h323:|sip:)", _tmp73_, NULL);
	_tmp75_ = _tmp74_;
	_tmp76_ = g_strconcat (_tmp75_, "[", NULL);
	_tmp77_ = _tmp76_;
	_tmp78_ = widgets_term_USERCHARS;
	_tmp79_ = g_strconcat (_tmp77_, _tmp78_, NULL);
	_tmp80_ = _tmp79_;
	_tmp81_ = g_strconcat (_tmp80_, ".]*(?:", NULL);
	_tmp82_ = _tmp81_;
	_tmp83_ = widgets_term_PORT;
	_tmp84_ = g_strconcat (_tmp82_, _tmp83_, NULL);
	_tmp85_ = _tmp84_;
	_tmp86_ = g_strconcat (_tmp85_, "/[a-z0-9]+)?\\@", NULL);
	_tmp87_ = _tmp86_;
	_tmp88_ = widgets_term_HOST;
	_tmp89_ = g_strconcat (_tmp87_, _tmp88_, NULL);
	_tmp90_ = widgets_term_USERCHARS_CLASS;
	_tmp91_ = g_strconcat ("(?:mailto:)?", _tmp90_, NULL);
	_tmp92_ = _tmp91_;
	_tmp93_ = g_strconcat (_tmp92_, "[", NULL);
	_tmp94_ = _tmp93_;
	_tmp95_ = widgets_term_USERCHARS;
	_tmp96_ = g_strconcat (_tmp94_, _tmp95_, NULL);
	_tmp97_ = _tmp96_;
	_tmp98_ = g_strconcat (_tmp97_, ".]*\\@", NULL);
	_tmp99_ = _tmp98_;
	_tmp100_ = widgets_term_HOSTCHARS_CLASS;
	_tmp101_ = g_strconcat (_tmp99_, _tmp100_, NULL);
	_tmp102_ = _tmp101_;
	_tmp103_ = g_strconcat (_tmp102_, "+\\.", NULL);
	_tmp104_ = _tmp103_;
	_tmp105_ = widgets_term_HOST;
	_tmp106_ = g_strconcat (_tmp104_, _tmp105_, NULL);
	_tmp107_ = g_strdup ("(?:news:|man:|info:)[[:alnum:]\\Q^_{|}~!\"#$%&'()*+,./;:=?`\\E]+");
	_tmp108_ = widgets_term_HOST;
	_tmp109_ = g_strconcat ("git\\@", _tmp108_, NULL);
	_tmp110_ = _tmp109_;
	_tmp111_ = g_strconcat (_tmp110_, ":", NULL);
	_tmp112_ = _tmp111_;
	_tmp113_ = widgets_term_HOST;
	_tmp114_ = g_strconcat (_tmp112_, _tmp113_, NULL);
	_tmp115_ = _tmp114_;
	_tmp116_ = widgets_term_URLPATH;
	_tmp117_ = g_strconcat (_tmp115_, _tmp116_, NULL);
	_tmp118_ = g_new0 (gchar*, 6 + 1);
	_tmp118_[0] = _tmp59_;
	_tmp118_[1] = _tmp72_;
	_tmp118_[2] = _tmp89_;
	_tmp118_[3] = _tmp106_;
	_tmp118_[4] = _tmp107_;
	_tmp118_[5] = _tmp117_;
	widgets_term_REGEX_STRINGS = _tmp118_;
	widgets_term_REGEX_STRINGS_length1 = 6;
}

static void
widgets_term_instance_init (WidgetsTerm * self,
                            gpointer klass)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	self->priv = widgets_term_get_instance_private (self);
	self->priv->enter_sz_command = FALSE;
	_tmp0_ = g_strdup ("");
	self->priv->save_file_directory = _tmp0_;
	memset (&self->background_color, 0, sizeof (GdkRGBA));
	memset (&self->foreground_color, 0, sizeof (GdkRGBA));
	self->child_has_exit = FALSE;
	self->has_print_exit_notify = FALSE;
	self->has_select_all = FALSE;
	self->is_press_scrollbar = FALSE;
	self->login_remote_server = FALSE;
	self->press_anything = FALSE;
	self->zoom_factor = 1.0;
	self->font_size = 0;
	self->hide_scrollbar_offset = 20;
	self->show_scrollbar_offset = 15;
	_tmp1_ = g_strdup ("");
	self->current_dir = _tmp1_;
	_tmp2_ = g_strdup ("");
	self->current_title = _tmp2_;
	_tmp3_ = g_strdup ("");
	self->expect_file_path = _tmp3_;
	self->hide_scrollbar_timeout_source_id = NULL;
	_tmp4_ = utils_get_config_file_path ("search-engine-config.conf");
	self->search_engine_config_file_path = _tmp4_;
}

static void
widgets_term_finalize (GObject * obj)
{
	WidgetsTerm * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, WIDGETS_TYPE_TERM, WidgetsTerm);
	_g_free0 (self->priv->save_file_directory);
	_g_object_unref0 (self->command_execute_y_coordinates);
	_g_object_unref0 (self->scrollbar);
	_g_object_unref0 (self->menu);
	_g_object_unref0 (self->term);
	_g_object_unref0 (self->workspace_manager);
	_g_free0 (self->current_dir);
	_g_free0 (self->current_title);
	_g_free0 (self->expect_file_path);
	_g_free0 (self->customize_title);
	_g_free0 (self->remote_server_title);
	_g_free0 (self->uri_at_right_press);
	_g_free0 (self->server_info);
	_g_free0 (self->hide_scrollbar_timeout_source_id);
	_g_key_file_unref0 (self->search_engine_config_file);
	_g_free0 (self->search_engine_config_file_path);
	G_OBJECT_CLASS (widgets_term_parent_class)->finalize (obj);
}

static GType
widgets_term_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (WidgetsTermClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) widgets_term_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (WidgetsTerm), 0, (GInstanceInitFunc) widgets_term_instance_init, NULL };
	GType widgets_term_type_id;
	widgets_term_type_id = g_type_register_static (gtk_overlay_get_type (), "WidgetsTerm", &g_define_type_info, 0);
	WidgetsTerm_private_offset = g_type_add_instance_private (widgets_term_type_id, sizeof (WidgetsTermPrivate));
	return widgets_term_type_id;
}

GType
widgets_term_get_type (void)
{
	static volatile gsize widgets_term_type_id__once = 0;
	if (g_once_init_enter (&widgets_term_type_id__once)) {
		GType widgets_term_type_id;
		widgets_term_type_id = widgets_term_get_type_once ();
		g_once_init_leave (&widgets_term_type_id__once, widgets_term_type_id);
	}
	return widgets_term_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 gssize
_vala_array_length (gpointer array)
{
	gssize length;
	length = 0;
	if (array) {
		while (((gpointer*) array)[length]) {
			length++;
		}
	}
	return length;
}

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;
}

