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

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

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

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

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

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

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

typedef struct _WidgetsConfigWindow WidgetsConfigWindow;
typedef struct _WidgetsConfigWindowClass WidgetsConfigWindowClass;

#define WIDGETS_TYPE_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;
typedef struct _WidgetsRenameDialogPrivate WidgetsRenameDialogPrivate;

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

typedef struct _WidgetsDialogButton WidgetsDialogButton;
typedef struct _WidgetsDialogButtonClass WidgetsDialogButtonClass;
enum  {
	WIDGETS_RENAME_DIALOG_0_PROPERTY,
	WIDGETS_RENAME_DIALOG_NUM_PROPERTIES
};
static GParamSpec* widgets_rename_dialog_properties[WIDGETS_RENAME_DIALOG_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

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

typedef struct _WidgetsEntry WidgetsEntry;
typedef struct _WidgetsEntryClass WidgetsEntryClass;
typedef struct _Block36Data Block36Data;

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

typedef struct _WidgetsClickEventBox WidgetsClickEventBox;
typedef struct _WidgetsClickEventBoxClass WidgetsClickEventBoxClass;

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

typedef struct _WidgetsWindowButton WidgetsWindowButton;
typedef struct _WidgetsWindowButtonClass WidgetsWindowButtonClass;
#define _g_free0(var) (var = (g_free (var), NULL))

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

typedef struct _WidgetsWindowEventArea WidgetsWindowEventArea;
typedef struct _WidgetsWindowEventAreaClass WidgetsWindowEventAreaClass;
enum  {
	WIDGETS_RENAME_DIALOG_CANCEL_SIGNAL,
	WIDGETS_RENAME_DIALOG_RENAME_SIGNAL,
	WIDGETS_RENAME_DIALOG_NUM_SIGNALS
};
static guint widgets_rename_dialog_signals[WIDGETS_RENAME_DIALOG_NUM_SIGNALS] = {0};

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

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

struct _WidgetsRenameDialog {
	WidgetsDialog parent_instance;
	WidgetsRenameDialogPrivate * priv;
};

struct _WidgetsRenameDialogClass {
	WidgetsDialogClass parent_class;
};

struct _WidgetsRenameDialogPrivate {
	WidgetsDialogButton* cancel_button;
	WidgetsDialogButton* rename_button;
	gint box_margin_bottom;
	gint box_margin_end;
	gint box_margin_top;
	gint content_margin_top;
	gint logo_margin_end;
	gint logo_margin_start;
	gint title_margin_top;
};

struct _Block36Data {
	int _ref_count_;
	WidgetsRenameDialog* self;
	WidgetsEntry* title_entry;
};

static gint WidgetsRenameDialog_private_offset;
static gpointer widgets_rename_dialog_parent_class = NULL;
VALA_EXTERN gint constant_CLOSE_BUTTON_WIDTH;
VALA_EXTERN gint constant_TITLEBAR_HEIGHT;

VALA_EXTERN GType widgets_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsDialog, g_object_unref)
VALA_EXTERN GType widgets_config_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsConfigWindow, g_object_unref)
VALA_EXTERN GType widgets_rename_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsRenameDialog, g_object_unref)
VALA_EXTERN GType widgets_dialog_button_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsDialogButton, 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);
VALA_EXTERN GType widgets_entry_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsEntry, g_object_unref)
static Block36Data* block36_data_ref (Block36Data* _data36_);
static void block36_data_unref (void * _userdata_);
VALA_EXTERN WidgetsDialog* widgets_dialog_new (void);
VALA_EXTERN WidgetsDialog* widgets_dialog_construct (GType object_type);
VALA_EXTERN void widgets_dialog_set_init_size (WidgetsDialog* self,
                                   gint width,
                                   gint height);
VALA_EXTERN GType widgets_click_event_box_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsClickEventBox, g_object_unref)
VALA_EXTERN GType widgets_window_button_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsWindowButton, g_object_unref)
VALA_EXTERN WidgetsWindowButton* widgets_create_close_button (void);
static void __lambda209_ (WidgetsRenameDialog* self,
                   GdkEventButton* b);
static void ___lambda209__widgets_click_event_box_clicked (WidgetsClickEventBox* _sender,
                                                    GdkEventButton* event,
                                                    gpointer self);
VALA_EXTERN gchar* utils_get_image_path (const gchar* image_name);
VALA_EXTERN WidgetsEntry* widgets_entry_new (void);
VALA_EXTERN WidgetsEntry* widgets_entry_construct (GType object_type);
static void __lambda210_ (WidgetsRenameDialog* self,
                   GtkEntry* entry);
static void ___lambda210__gtk_entry_activate (GtkEntry* _sender,
                                       gpointer self);
VALA_EXTERN WidgetsDialogButton* widgets_dialog_button_new (const gchar* text,
                                                const gchar* direction,
                                                const gchar* type,
                                                gboolean has_radius);
VALA_EXTERN WidgetsDialogButton* widgets_dialog_button_construct (GType object_type,
                                                      const gchar* text,
                                                      const gchar* direction,
                                                      const gchar* type,
                                                      gboolean has_radius);
static void ___lambda211_ (WidgetsRenameDialog* self,
                    GtkButton* b);
static void ____lambda211__gtk_button_clicked (GtkButton* _sender,
                                        gpointer self);
static void __lambda212_ (Block36Data* _data36_,
                   GtkButton* b);
static void ___lambda212__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
VALA_EXTERN GType widgets_window_event_area_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsWindowEventArea, g_object_unref)
VALA_EXTERN WidgetsWindowEventArea* widgets_window_event_area_new (GtkContainer* area);
VALA_EXTERN WidgetsWindowEventArea* widgets_window_event_area_construct (GType object_type,
                                                             GtkContainer* area);
VALA_EXTERN void widgets_dialog_add_widget (WidgetsDialog* self,
                                GtkWidget* widget);
static void _g_object_unref0_ (gpointer var);
static inline void _g_list_free__g_object_unref0_ (GList* self);
static void widgets_rename_dialog_finalize (GObject * obj);
static GType widgets_rename_dialog_get_type_once (void);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
widgets_rename_dialog_get_instance_private (WidgetsRenameDialog* self)
{
	return G_STRUCT_MEMBER_P (self, WidgetsRenameDialog_private_offset);
}

static Block36Data*
block36_data_ref (Block36Data* _data36_)
{
	g_atomic_int_inc (&_data36_->_ref_count_);
	return _data36_;
}

static void
block36_data_unref (void * _userdata_)
{
	Block36Data* _data36_;
	_data36_ = (Block36Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data36_->_ref_count_)) {
		WidgetsRenameDialog* self;
		self = _data36_->self;
		_g_object_unref0 (_data36_->title_entry);
		_g_object_unref0 (self);
		g_slice_free (Block36Data, _data36_);
	}
}

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

static void
___lambda209__widgets_click_event_box_clicked (WidgetsClickEventBox* _sender,
                                               GdkEventButton* event,
                                               gpointer self)
{
	__lambda209_ ((WidgetsRenameDialog*) self, event);
}

static void
__lambda210_ (WidgetsRenameDialog* self,
              GtkEntry* entry)
{
	const gchar* _tmp0_;
	g_return_if_fail (entry != NULL);
	_tmp0_ = gtk_entry_get_text (entry);
	g_signal_emit (self, widgets_rename_dialog_signals[WIDGETS_RENAME_DIALOG_RENAME_SIGNAL], 0, _tmp0_);
	gtk_widget_destroy ((GtkWidget*) self);
}

static void
___lambda210__gtk_entry_activate (GtkEntry* _sender,
                                  gpointer self)
{
	__lambda210_ ((WidgetsRenameDialog*) self, _sender);
}

static void
___lambda211_ (WidgetsRenameDialog* self,
               GtkButton* b)
{
	g_return_if_fail (b != NULL);
	g_signal_emit (self, widgets_rename_dialog_signals[WIDGETS_RENAME_DIALOG_CANCEL_SIGNAL], 0);
	gtk_widget_destroy ((GtkWidget*) self);
}

static void
____lambda211__gtk_button_clicked (GtkButton* _sender,
                                   gpointer self)
{
	___lambda211_ ((WidgetsRenameDialog*) self, _sender);
}

static void
__lambda212_ (Block36Data* _data36_,
              GtkButton* b)
{
	WidgetsRenameDialog* self;
	WidgetsEntry* _tmp0_;
	const gchar* _tmp1_;
	self = _data36_->self;
	g_return_if_fail (b != NULL);
	_tmp0_ = _data36_->title_entry;
	_tmp1_ = gtk_entry_get_text ((GtkEntry*) _tmp0_);
	g_signal_emit (self, widgets_rename_dialog_signals[WIDGETS_RENAME_DIALOG_RENAME_SIGNAL], 0, _tmp1_);
	gtk_widget_destroy ((GtkWidget*) self);
}

static void
___lambda212__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	__lambda212_ (self, _sender);
}

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

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

WidgetsRenameDialog*
widgets_rename_dialog_construct (GType object_type,
                                 const gchar* title,
                                 const gchar* content,
                                 const gchar* cancel_text,
                                 const gchar* rename_text)
{
	WidgetsRenameDialog * self = NULL;
	Block36Data* _data36_;
	GtkOverlay* overlay = NULL;
	GtkOverlay* _tmp0_;
	GtkBox* box = NULL;
	GtkBox* _tmp1_;
	WidgetsWindowButton* close_button = NULL;
	WidgetsWindowButton* _tmp2_;
	WidgetsWindowButton* _tmp3_;
	GtkBox* close_button_box = NULL;
	GtkBox* _tmp4_;
	GtkBox* _tmp5_;
	WidgetsWindowButton* _tmp6_;
	GtkBox* content_button_box = NULL;
	GtkBox* _tmp7_;
	GtkBox* _tmp8_;
	GtkBox* _tmp9_;
	GtkBox* _tmp10_;
	GtkImage* logo_image = NULL;
	gchar* _tmp11_;
	gchar* _tmp12_;
	GtkImage* _tmp13_;
	GtkImage* _tmp14_;
	GtkImage* _tmp15_;
	GtkImage* _tmp16_;
	GtkBox* label_box = NULL;
	GtkBox* _tmp17_;
	GtkLabel* title_label = NULL;
	GtkLabel* _tmp18_;
	GtkLabel* _tmp19_;
	GtkLabel* _tmp20_;
	GtkStyleContext* _tmp21_;
	GtkLabel* _tmp22_;
	GtkLabel* _tmp23_;
	WidgetsEntry* _tmp24_;
	WidgetsEntry* _tmp25_;
	WidgetsEntry* _tmp26_;
	WidgetsEntry* _tmp27_;
	GtkStyleContext* _tmp28_;
	WidgetsEntry* _tmp29_;
	GtkBox* button_box = NULL;
	GtkBox* _tmp30_;
	WidgetsDialogButton* _tmp38_;
	GList* tab_order_list = NULL;
	WidgetsEntry* _tmp39_;
	GtkWidget* _tmp40_;
	WidgetsDialogButton* _tmp43_;
	GtkWidget* _tmp44_;
	GtkBox* _tmp45_;
	GList* _tmp46_;
	GtkBox* _tmp47_;
	WidgetsEntry* _tmp48_;
	GtkBox* _tmp49_;
	WidgetsWindowButton* _tmp50_;
	GtkBox* _tmp51_;
	GtkLabel* _tmp52_;
	GtkBox* _tmp53_;
	WidgetsEntry* _tmp54_;
	GtkBox* _tmp55_;
	GtkImage* _tmp56_;
	GtkBox* _tmp57_;
	GtkBox* _tmp58_;
	GtkBox* _tmp61_;
	WidgetsDialogButton* _tmp62_;
	GtkBox* _tmp63_;
	GtkBox* _tmp64_;
	GtkBox* _tmp65_;
	GtkBox* _tmp66_;
	GtkBox* _tmp67_;
	GtkBox* _tmp68_;
	WidgetsWindowEventArea* event_area = NULL;
	WidgetsWindowEventArea* _tmp69_;
	WidgetsWindowEventArea* _tmp70_;
	GdkScreen* _tmp71_;
	GtkOverlay* _tmp74_;
	GtkBox* _tmp75_;
	GtkOverlay* _tmp76_;
	WidgetsWindowEventArea* _tmp77_;
	GtkOverlay* _tmp78_;
	g_return_val_if_fail (title != NULL, NULL);
	g_return_val_if_fail (content != NULL, NULL);
	g_return_val_if_fail (cancel_text != NULL, NULL);
	g_return_val_if_fail (rename_text != NULL, NULL);
	_data36_ = g_slice_new0 (Block36Data);
	_data36_->_ref_count_ = 1;
	self = (WidgetsRenameDialog*) widgets_dialog_construct (object_type);
	_data36_->self = g_object_ref (self);
	bindtextdomain (GETTEXT_PACKAGE, "/usr/share/locale");
	widgets_dialog_set_init_size ((WidgetsDialog*) self, 480, 230);
	_tmp0_ = (GtkOverlay*) gtk_overlay_new ();
	g_object_ref_sink (_tmp0_);
	overlay = _tmp0_;
	_tmp1_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp1_);
	box = _tmp1_;
	_tmp2_ = widgets_create_close_button ();
	close_button = _tmp2_;
	_tmp3_ = close_button;
	g_signal_connect_object ((WidgetsClickEventBox*) _tmp3_, "clicked", (GCallback) ___lambda209__widgets_click_event_box_clicked, self, 0);
	_tmp4_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	g_object_ref_sink (_tmp4_);
	close_button_box = _tmp4_;
	_tmp5_ = close_button_box;
	_tmp6_ = close_button;
	gtk_box_pack_start (_tmp5_, (GtkWidget*) _tmp6_, TRUE, TRUE, (guint) 0);
	_tmp7_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	g_object_ref_sink (_tmp7_);
	content_button_box = _tmp7_;
	_tmp8_ = content_button_box;
	gtk_widget_set_margin_top ((GtkWidget*) _tmp8_, self->priv->box_margin_top);
	_tmp9_ = content_button_box;
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp9_, self->priv->box_margin_bottom);
	_tmp10_ = content_button_box;
	gtk_widget_set_margin_end ((GtkWidget*) _tmp10_, self->priv->box_margin_end);
	_tmp11_ = utils_get_image_path ("dialog_icon.svg");
	_tmp12_ = _tmp11_;
	_tmp13_ = (GtkImage*) gtk_image_new_from_file (_tmp12_);
	g_object_ref_sink (_tmp13_);
	_tmp14_ = _tmp13_;
	_g_free0 (_tmp12_);
	logo_image = _tmp14_;
	_tmp15_ = logo_image;
	gtk_widget_set_margin_start ((GtkWidget*) _tmp15_, self->priv->logo_margin_start);
	_tmp16_ = logo_image;
	gtk_widget_set_margin_end ((GtkWidget*) _tmp16_, self->priv->logo_margin_end);
	_tmp17_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp17_);
	label_box = _tmp17_;
	_tmp18_ = (GtkLabel*) gtk_label_new (NULL);
	g_object_ref_sink (_tmp18_);
	title_label = _tmp18_;
	_tmp19_ = title_label;
	gtk_widget_set_halign ((GtkWidget*) _tmp19_, GTK_ALIGN_START);
	_tmp20_ = title_label;
	_tmp21_ = gtk_widget_get_style_context ((GtkWidget*) _tmp20_);
	gtk_style_context_add_class (_tmp21_, "dialog_title");
	_tmp22_ = title_label;
	gtk_label_set_text (_tmp22_, title);
	_tmp23_ = title_label;
	gtk_widget_set_margin_top ((GtkWidget*) _tmp23_, self->priv->title_margin_top);
	_tmp24_ = widgets_entry_new ();
	g_object_ref_sink (_tmp24_);
	_data36_->title_entry = _tmp24_;
	_tmp25_ = _data36_->title_entry;
	gtk_entry_set_text ((GtkEntry*) _tmp25_, content);
	_tmp26_ = _data36_->title_entry;
	gtk_widget_set_margin_top ((GtkWidget*) _tmp26_, self->priv->content_margin_top);
	_tmp27_ = _data36_->title_entry;
	_tmp28_ = gtk_widget_get_style_context ((GtkWidget*) _tmp27_);
	gtk_style_context_add_class (_tmp28_, "preference_entry");
	_tmp29_ = _data36_->title_entry;
	g_signal_connect_object ((GtkEntry*) _tmp29_, "activate", (GCallback) ___lambda210__gtk_entry_activate, self, 0);
	_tmp30_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	g_object_ref_sink (_tmp30_);
	button_box = _tmp30_;
	if (g_strcmp0 (cancel_text, "") != 0) {
		GdkScreen* _tmp31_;
		WidgetsDialogButton* _tmp32_;
		WidgetsDialogButton* _tmp33_;
		_tmp31_ = ((WidgetsDialog*) self)->screen_monitor;
		_tmp32_ = widgets_dialog_button_new (cancel_text, "left", "text", gdk_screen_is_composited (_tmp31_));
		g_object_ref_sink (_tmp32_);
		_g_object_unref0 (self->priv->cancel_button);
		self->priv->cancel_button = _tmp32_;
		_tmp33_ = self->priv->cancel_button;
		g_signal_connect_object ((GtkButton*) _tmp33_, "clicked", (GCallback) ____lambda211__gtk_button_clicked, self, 0);
	}
	if (g_strcmp0 (cancel_text, "") != 0) {
		GdkScreen* _tmp34_;
		WidgetsDialogButton* _tmp35_;
		_tmp34_ = ((WidgetsDialog*) self)->screen_monitor;
		_tmp35_ = widgets_dialog_button_new (rename_text, "right", "warning", gdk_screen_is_composited (_tmp34_));
		g_object_ref_sink (_tmp35_);
		_g_object_unref0 (self->priv->rename_button);
		self->priv->rename_button = _tmp35_;
	} else {
		GdkScreen* _tmp36_;
		WidgetsDialogButton* _tmp37_;
		_tmp36_ = ((WidgetsDialog*) self)->screen_monitor;
		_tmp37_ = widgets_dialog_button_new (rename_text, "middle", "warning", gdk_screen_is_composited (_tmp36_));
		g_object_ref_sink (_tmp37_);
		_g_object_unref0 (self->priv->rename_button);
		self->priv->rename_button = _tmp37_;
	}
	_tmp38_ = self->priv->rename_button;
	g_signal_connect_data ((GtkButton*) _tmp38_, "clicked", (GCallback) ___lambda212__gtk_button_clicked, block36_data_ref (_data36_), (GClosureNotify) block36_data_unref, 0);
	tab_order_list = NULL;
	_tmp39_ = _data36_->title_entry;
	_tmp40_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp39_, gtk_widget_get_type (), GtkWidget));
	tab_order_list = g_list_append (tab_order_list, _tmp40_);
	if (g_strcmp0 (cancel_text, "") != 0) {
		WidgetsDialogButton* _tmp41_;
		GtkWidget* _tmp42_;
		_tmp41_ = self->priv->cancel_button;
		_tmp42_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp41_, gtk_widget_get_type (), GtkWidget));
		tab_order_list = g_list_append (tab_order_list, _tmp42_);
	}
	_tmp43_ = self->priv->rename_button;
	_tmp44_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp43_, gtk_widget_get_type (), GtkWidget));
	tab_order_list = g_list_append (tab_order_list, _tmp44_);
	_tmp45_ = button_box;
	_tmp46_ = tab_order_list;
	gtk_container_set_focus_chain ((GtkContainer*) _tmp45_, _tmp46_);
	_tmp47_ = button_box;
	_tmp48_ = _data36_->title_entry;
	gtk_container_set_focus_child ((GtkContainer*) _tmp47_, (GtkWidget*) _tmp48_);
	_tmp49_ = close_button_box;
	_tmp50_ = close_button;
	gtk_box_pack_start (_tmp49_, (GtkWidget*) _tmp50_, TRUE, TRUE, (guint) 0);
	_tmp51_ = label_box;
	_tmp52_ = title_label;
	gtk_box_pack_start (_tmp51_, (GtkWidget*) _tmp52_, FALSE, FALSE, (guint) 0);
	_tmp53_ = label_box;
	_tmp54_ = _data36_->title_entry;
	gtk_box_pack_start (_tmp53_, (GtkWidget*) _tmp54_, FALSE, FALSE, (guint) 0);
	_tmp55_ = content_button_box;
	_tmp56_ = logo_image;
	gtk_box_pack_start (_tmp55_, (GtkWidget*) _tmp56_, FALSE, FALSE, (guint) 0);
	_tmp57_ = content_button_box;
	_tmp58_ = label_box;
	gtk_box_pack_start (_tmp57_, (GtkWidget*) _tmp58_, TRUE, TRUE, (guint) 0);
	if (g_strcmp0 (cancel_text, "") != 0) {
		GtkBox* _tmp59_;
		WidgetsDialogButton* _tmp60_;
		_tmp59_ = button_box;
		_tmp60_ = self->priv->cancel_button;
		gtk_box_pack_start (_tmp59_, (GtkWidget*) _tmp60_, TRUE, TRUE, (guint) 0);
	}
	_tmp61_ = button_box;
	_tmp62_ = self->priv->rename_button;
	gtk_box_pack_start (_tmp61_, (GtkWidget*) _tmp62_, TRUE, TRUE, (guint) 0);
	_tmp63_ = box;
	_tmp64_ = close_button_box;
	gtk_box_pack_start (_tmp63_, (GtkWidget*) _tmp64_, FALSE, FALSE, (guint) 0);
	_tmp65_ = box;
	_tmp66_ = content_button_box;
	gtk_box_pack_start (_tmp65_, (GtkWidget*) _tmp66_, TRUE, TRUE, (guint) 0);
	_tmp67_ = box;
	_tmp68_ = button_box;
	gtk_box_pack_start (_tmp67_, (GtkWidget*) _tmp68_, TRUE, TRUE, (guint) 0);
	_tmp69_ = widgets_window_event_area_new ((GtkContainer*) self);
	g_object_ref_sink (_tmp69_);
	event_area = _tmp69_;
	_tmp70_ = event_area;
	gtk_widget_set_margin_end ((GtkWidget*) _tmp70_, constant_CLOSE_BUTTON_WIDTH);
	_tmp71_ = ((WidgetsDialog*) self)->screen_monitor;
	if (gdk_screen_is_composited (_tmp71_)) {
		WidgetsWindowEventArea* _tmp72_;
		_tmp72_ = event_area;
		gtk_widget_set_margin_bottom ((GtkWidget*) _tmp72_, ((((WidgetsDialog*) self)->window_init_height - ((WidgetsDialog*) self)->window_frame_margin_top) - ((WidgetsDialog*) self)->window_frame_margin_bottom) - constant_TITLEBAR_HEIGHT);
	} else {
		WidgetsWindowEventArea* _tmp73_;
		_tmp73_ = event_area;
		gtk_widget_set_margin_bottom ((GtkWidget*) _tmp73_, ((WidgetsDialog*) self)->window_init_height - constant_TITLEBAR_HEIGHT);
	}
	_tmp74_ = overlay;
	_tmp75_ = box;
	gtk_container_add ((GtkContainer*) _tmp74_, (GtkWidget*) _tmp75_);
	_tmp76_ = overlay;
	_tmp77_ = event_area;
	gtk_overlay_add_overlay (_tmp76_, (GtkWidget*) _tmp77_);
	_tmp78_ = overlay;
	widgets_dialog_add_widget ((WidgetsDialog*) self, (GtkWidget*) _tmp78_);
	_g_object_unref0 (event_area);
	(tab_order_list == NULL) ? NULL : (tab_order_list = (_g_list_free__g_object_unref0_ (tab_order_list), NULL));
	_g_object_unref0 (button_box);
	_g_object_unref0 (title_label);
	_g_object_unref0 (label_box);
	_g_object_unref0 (logo_image);
	_g_object_unref0 (content_button_box);
	_g_object_unref0 (close_button_box);
	_g_object_unref0 (close_button);
	_g_object_unref0 (box);
	_g_object_unref0 (overlay);
	block36_data_unref (_data36_);
	_data36_ = NULL;
	return self;
}

WidgetsRenameDialog*
widgets_rename_dialog_new (const gchar* title,
                           const gchar* content,
                           const gchar* cancel_text,
                           const gchar* rename_text)
{
	return widgets_rename_dialog_construct (WIDGETS_TYPE_RENAME_DIALOG, title, content, cancel_text, rename_text);
}

static void
widgets_rename_dialog_class_init (WidgetsRenameDialogClass * klass,
                                  gpointer klass_data)
{
	widgets_rename_dialog_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &WidgetsRenameDialog_private_offset);
	G_OBJECT_CLASS (klass)->finalize = widgets_rename_dialog_finalize;
	widgets_rename_dialog_signals[WIDGETS_RENAME_DIALOG_CANCEL_SIGNAL] = g_signal_new ("cancel", WIDGETS_TYPE_RENAME_DIALOG, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	widgets_rename_dialog_signals[WIDGETS_RENAME_DIALOG_RENAME_SIGNAL] = g_signal_new ("rename", WIDGETS_TYPE_RENAME_DIALOG, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
}

static void
widgets_rename_dialog_instance_init (WidgetsRenameDialog * self,
                                     gpointer klass)
{
	self->priv = widgets_rename_dialog_get_instance_private (self);
	self->priv->box_margin_bottom = 24;
	self->priv->box_margin_end = 20;
	self->priv->box_margin_top = 4;
	self->priv->content_margin_top = 3;
	self->priv->logo_margin_end = 20;
	self->priv->logo_margin_start = 20;
	self->priv->title_margin_top = 7;
}

static void
widgets_rename_dialog_finalize (GObject * obj)
{
	WidgetsRenameDialog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, WIDGETS_TYPE_RENAME_DIALOG, WidgetsRenameDialog);
	_g_object_unref0 (self->priv->cancel_button);
	_g_object_unref0 (self->priv->rename_button);
	G_OBJECT_CLASS (widgets_rename_dialog_parent_class)->finalize (obj);
}

static GType
widgets_rename_dialog_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (WidgetsRenameDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) widgets_rename_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (WidgetsRenameDialog), 0, (GInstanceInitFunc) widgets_rename_dialog_instance_init, NULL };
	GType widgets_rename_dialog_type_id;
	widgets_rename_dialog_type_id = g_type_register_static (WIDGETS_TYPE_DIALOG, "WidgetsRenameDialog", &g_define_type_info, 0);
	WidgetsRenameDialog_private_offset = g_type_add_instance_private (widgets_rename_dialog_type_id, sizeof (WidgetsRenameDialogPrivate));
	return widgets_rename_dialog_type_id;
}

GType
widgets_rename_dialog_get_type (void)
{
	static volatile gsize widgets_rename_dialog_type_id__once = 0;
	if (g_once_init_enter (&widgets_rename_dialog_type_id__once)) {
		GType widgets_rename_dialog_type_id;
		widgets_rename_dialog_type_id = widgets_rename_dialog_get_type_once ();
		g_once_init_leave (&widgets_rename_dialog_type_id__once, widgets_rename_dialog_type_id);
	}
	return widgets_rename_dialog_type_id__once;
}

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

