/* alert-dialog.c generated by valac 0.56.3, the Vala compiler
 * generated from alert-dialog.vala, do not modify */

/* Copyright 2016 Software Freedom Conservancy Inc.
 *
 * This software is licensed under the GNU Lesser General Public License
 * (version 2.1 or later).  See the COPYING file in this distribution.
 */

#include <glib-object.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include "geary-engine.h"
#include "geary-client-43.0.h"

#define TYPE_ALERT_DIALOG (alert_dialog_get_type ())
#define ALERT_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ALERT_DIALOG, AlertDialog))
#define ALERT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ALERT_DIALOG, AlertDialogClass))
#define IS_ALERT_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ALERT_DIALOG))
#define IS_ALERT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ALERT_DIALOG))
#define ALERT_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ALERT_DIALOG, AlertDialogClass))

typedef struct _AlertDialog AlertDialog;
typedef struct _AlertDialogClass AlertDialogClass;
typedef struct _AlertDialogPrivate AlertDialogPrivate;
enum  {
	ALERT_DIALOG_0_PROPERTY,
	ALERT_DIALOG_NUM_PROPERTIES
};
static GParamSpec* alert_dialog_properties[ALERT_DIALOG_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define TYPE_CONFIRMATION_DIALOG (confirmation_dialog_get_type ())
#define CONFIRMATION_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONFIRMATION_DIALOG, ConfirmationDialog))
#define CONFIRMATION_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CONFIRMATION_DIALOG, ConfirmationDialogClass))
#define IS_CONFIRMATION_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONFIRMATION_DIALOG))
#define IS_CONFIRMATION_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CONFIRMATION_DIALOG))
#define CONFIRMATION_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CONFIRMATION_DIALOG, ConfirmationDialogClass))

typedef struct _ConfirmationDialog ConfirmationDialog;
typedef struct _ConfirmationDialogClass ConfirmationDialogClass;
typedef struct _ConfirmationDialogPrivate ConfirmationDialogPrivate;
enum  {
	CONFIRMATION_DIALOG_0_PROPERTY,
	CONFIRMATION_DIALOG_NUM_PROPERTIES
};
static GParamSpec* confirmation_dialog_properties[CONFIRMATION_DIALOG_NUM_PROPERTIES];

#define TYPE_TERNARY_CONFIRMATION_DIALOG (ternary_confirmation_dialog_get_type ())
#define TERNARY_CONFIRMATION_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TERNARY_CONFIRMATION_DIALOG, TernaryConfirmationDialog))
#define TERNARY_CONFIRMATION_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TERNARY_CONFIRMATION_DIALOG, TernaryConfirmationDialogClass))
#define IS_TERNARY_CONFIRMATION_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TERNARY_CONFIRMATION_DIALOG))
#define IS_TERNARY_CONFIRMATION_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TERNARY_CONFIRMATION_DIALOG))
#define TERNARY_CONFIRMATION_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TERNARY_CONFIRMATION_DIALOG, TernaryConfirmationDialogClass))

typedef struct _TernaryConfirmationDialog TernaryConfirmationDialog;
typedef struct _TernaryConfirmationDialogClass TernaryConfirmationDialogClass;
typedef struct _TernaryConfirmationDialogPrivate TernaryConfirmationDialogPrivate;
enum  {
	TERNARY_CONFIRMATION_DIALOG_0_PROPERTY,
	TERNARY_CONFIRMATION_DIALOG_NUM_PROPERTIES
};
static GParamSpec* ternary_confirmation_dialog_properties[TERNARY_CONFIRMATION_DIALOG_NUM_PROPERTIES];

#define TYPE_ERROR_DIALOG (error_dialog_get_type ())
#define ERROR_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ERROR_DIALOG, ErrorDialog))
#define ERROR_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ERROR_DIALOG, ErrorDialogClass))
#define IS_ERROR_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ERROR_DIALOG))
#define IS_ERROR_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ERROR_DIALOG))
#define ERROR_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ERROR_DIALOG, ErrorDialogClass))

typedef struct _ErrorDialog ErrorDialog;
typedef struct _ErrorDialogClass ErrorDialogClass;
typedef struct _ErrorDialogPrivate ErrorDialogPrivate;
enum  {
	ERROR_DIALOG_0_PROPERTY,
	ERROR_DIALOG_NUM_PROPERTIES
};
static GParamSpec* error_dialog_properties[ERROR_DIALOG_NUM_PROPERTIES];

#define TYPE_QUESTION_DIALOG (question_dialog_get_type ())
#define QUESTION_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_QUESTION_DIALOG, QuestionDialog))
#define QUESTION_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_QUESTION_DIALOG, QuestionDialogClass))
#define IS_QUESTION_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_QUESTION_DIALOG))
#define IS_QUESTION_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_QUESTION_DIALOG))
#define QUESTION_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_QUESTION_DIALOG, QuestionDialogClass))

typedef struct _QuestionDialog QuestionDialog;
typedef struct _QuestionDialogClass QuestionDialogClass;
typedef struct _QuestionDialogPrivate QuestionDialogPrivate;
enum  {
	QUESTION_DIALOG_0_PROPERTY,
	QUESTION_DIALOG_IS_CHECKED_PROPERTY,
	QUESTION_DIALOG_NUM_PROPERTIES
};
static GParamSpec* question_dialog_properties[QUESTION_DIALOG_NUM_PROPERTIES];

struct _AlertDialog {
	GObject parent_instance;
	AlertDialogPrivate * priv;
};

struct _AlertDialogClass {
	GObjectClass parent_class;
};

struct _AlertDialogPrivate {
	GtkMessageDialog* dialog;
};

struct _ConfirmationDialog {
	AlertDialog parent_instance;
	ConfirmationDialogPrivate * priv;
};

struct _ConfirmationDialogClass {
	AlertDialogClass parent_class;
};

struct _TernaryConfirmationDialog {
	AlertDialog parent_instance;
	TernaryConfirmationDialogPrivate * priv;
};

struct _TernaryConfirmationDialogClass {
	AlertDialogClass parent_class;
};

struct _ErrorDialog {
	AlertDialog parent_instance;
	ErrorDialogPrivate * priv;
};

struct _ErrorDialogClass {
	AlertDialogClass parent_class;
};

struct _QuestionDialog {
	AlertDialog parent_instance;
	QuestionDialogPrivate * priv;
};

struct _QuestionDialogClass {
	AlertDialogClass parent_class;
};

struct _QuestionDialogPrivate {
	gboolean _is_checked;
	GtkCheckButton* checkbutton;
};

static gint AlertDialog_private_offset;
static gpointer alert_dialog_parent_class = NULL;
static gpointer confirmation_dialog_parent_class = NULL;
static gpointer ternary_confirmation_dialog_parent_class = NULL;
static gpointer error_dialog_parent_class = NULL;
static gint QuestionDialog_private_offset;
static gpointer question_dialog_parent_class = NULL;

VALA_EXTERN GType alert_dialog_get_type (void) G_GNUC_CONST ;
VALA_EXTERN AlertDialog* alert_dialog_new (GtkWindow* parent,
                               GtkMessageType message_type,
                               const gchar* title,
                               const gchar* description,
                               const gchar* ok_button,
                               const gchar* cancel_button,
                               const gchar* tertiary_button,
                               GtkResponseType tertiary_response_type,
                               const gchar* ok_action_type,
                               const gchar* tertiary_action_type,
                               GtkResponseType* default_response);
VALA_EXTERN AlertDialog* alert_dialog_construct (GType object_type,
                                     GtkWindow* parent,
                                     GtkMessageType message_type,
                                     const gchar* title,
                                     const gchar* description,
                                     const gchar* ok_button,
                                     const gchar* cancel_button,
                                     const gchar* tertiary_button,
                                     GtkResponseType tertiary_response_type,
                                     const gchar* ok_action_type,
                                     const gchar* tertiary_action_type,
                                     GtkResponseType* default_response);
VALA_EXTERN void alert_dialog_use_secondary_markup (AlertDialog* self,
                                        gboolean markup);
VALA_EXTERN GtkBox* alert_dialog_get_message_area (AlertDialog* self);
VALA_EXTERN void alert_dialog_set_focus_response (AlertDialog* self,
                                      GtkResponseType response);
VALA_EXTERN GtkResponseType alert_dialog_run (AlertDialog* self);
static void alert_dialog_finalize (GObject * obj);
static GType alert_dialog_get_type_once (void);
VALA_EXTERN GType confirmation_dialog_get_type (void) G_GNUC_CONST ;
VALA_EXTERN ConfirmationDialog* confirmation_dialog_new (GtkWindow* parent,
                                             const gchar* title,
                                             const gchar* description,
                                             const gchar* ok_button,
                                             const gchar* ok_action_type);
VALA_EXTERN ConfirmationDialog* confirmation_dialog_construct (GType object_type,
                                                   GtkWindow* parent,
                                                   const gchar* title,
                                                   const gchar* description,
                                                   const gchar* ok_button,
                                                   const gchar* ok_action_type);
static GType confirmation_dialog_get_type_once (void);
VALA_EXTERN GType ternary_confirmation_dialog_get_type (void) G_GNUC_CONST ;
VALA_EXTERN TernaryConfirmationDialog* ternary_confirmation_dialog_new (GtkWindow* parent,
                                                            const gchar* title,
                                                            const gchar* description,
                                                            const gchar* ok_button,
                                                            const gchar* tertiary_button,
                                                            GtkResponseType tertiary_response_type,
                                                            const gchar* ok_action_type,
                                                            const gchar* tertiary_action_type,
                                                            GtkResponseType* default_response);
VALA_EXTERN TernaryConfirmationDialog* ternary_confirmation_dialog_construct (GType object_type,
                                                                  GtkWindow* parent,
                                                                  const gchar* title,
                                                                  const gchar* description,
                                                                  const gchar* ok_button,
                                                                  const gchar* tertiary_button,
                                                                  GtkResponseType tertiary_response_type,
                                                                  const gchar* ok_action_type,
                                                                  const gchar* tertiary_action_type,
                                                                  GtkResponseType* default_response);
static GType ternary_confirmation_dialog_get_type_once (void);
VALA_EXTERN GType error_dialog_get_type (void) G_GNUC_CONST ;
VALA_EXTERN ErrorDialog* error_dialog_new (GtkWindow* parent,
                               const gchar* title,
                               const gchar* description);
VALA_EXTERN ErrorDialog* error_dialog_construct (GType object_type,
                                     GtkWindow* parent,
                                     const gchar* title,
                                     const gchar* description);
static GType error_dialog_get_type_once (void);
VALA_EXTERN GType question_dialog_get_type (void) G_GNUC_CONST ;
VALA_EXTERN gboolean question_dialog_get_is_checked (QuestionDialog* self);
static void question_dialog_set_is_checked (QuestionDialog* self,
                                     gboolean value);
VALA_EXTERN QuestionDialog* question_dialog_new (GtkWindow* parent,
                                     const gchar* title,
                                     const gchar* description,
                                     const gchar* yes_button,
                                     const gchar* no_button);
VALA_EXTERN QuestionDialog* question_dialog_construct (GType object_type,
                                           GtkWindow* parent,
                                           const gchar* title,
                                           const gchar* description,
                                           const gchar* yes_button,
                                           const gchar* no_button);
VALA_EXTERN QuestionDialog* question_dialog_new_with_checkbox (GtkWindow* parent,
                                                   const gchar* title,
                                                   const gchar* description,
                                                   const gchar* yes_button,
                                                   const gchar* no_button,
                                                   const gchar* checkbox_label,
                                                   gboolean checkbox_default);
VALA_EXTERN QuestionDialog* question_dialog_construct_with_checkbox (GType object_type,
                                                         GtkWindow* parent,
                                                         const gchar* title,
                                                         const gchar* description,
                                                         const gchar* yes_button,
                                                         const gchar* no_button,
                                                         const gchar* checkbox_label,
                                                         gboolean checkbox_default);
static void question_dialog_on_checkbox_toggled (QuestionDialog* self);
static void _question_dialog_on_checkbox_toggled_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                     gpointer self);
static void question_dialog_finalize (GObject * obj);
static GType question_dialog_get_type_once (void);
static void _vala_question_dialog_get_property (GObject * object,
                                         guint property_id,
                                         GValue * value,
                                         GParamSpec * pspec);
static void _vala_question_dialog_set_property (GObject * object,
                                         guint property_id,
                                         const GValue * value,
                                         GParamSpec * pspec);

static inline gpointer
alert_dialog_get_instance_private (AlertDialog* self)
{
	return G_STRUCT_MEMBER_P (self, AlertDialog_private_offset);
}

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

AlertDialog*
alert_dialog_construct (GType object_type,
                        GtkWindow* parent,
                        GtkMessageType message_type,
                        const gchar* title,
                        const gchar* description,
                        const gchar* ok_button,
                        const gchar* cancel_button,
                        const gchar* tertiary_button,
                        GtkResponseType tertiary_response_type,
                        const gchar* ok_action_type,
                        const gchar* tertiary_action_type,
                        GtkResponseType* default_response)
{
	AlertDialog * self = NULL;
	GtkMessageDialog* _tmp0_;
	GtkMessageDialog* _tmp1_;
	GtkMessageDialog* _tmp2_;
	g_return_val_if_fail ((parent == NULL) || G_TYPE_CHECK_INSTANCE_TYPE (parent, gtk_window_get_type ()), NULL);
	g_return_val_if_fail (title != NULL, NULL);
	self = (AlertDialog*) g_object_new (object_type, NULL);
	_tmp0_ = (GtkMessageDialog*) gtk_message_dialog_new (parent, GTK_DIALOG_DESTROY_WITH_PARENT, message_type, GTK_BUTTONS_NONE, "");
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->dialog);
	self->priv->dialog = _tmp0_;
	_tmp1_ = self->priv->dialog;
	g_object_set (_tmp1_, "text", title, NULL);
	_tmp2_ = self->priv->dialog;
	g_object_set (_tmp2_, "secondary-text", description, NULL);
	if (!geary_string_is_empty_or_whitespace (tertiary_button)) {
		GtkWidget* button = NULL;
		GtkMessageDialog* _tmp3_;
		GtkWidget* _tmp4_;
		GtkWidget* _tmp5_;
		_tmp3_ = self->priv->dialog;
		_tmp4_ = gtk_dialog_add_button (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_dialog_get_type (), GtkDialog), tertiary_button, (gint) tertiary_response_type);
		_tmp5_ = _g_object_ref0 (_tmp4_);
		button = _tmp5_;
		if (!geary_string_is_empty_or_whitespace (tertiary_action_type)) {
			GtkWidget* _tmp6_;
			GtkStyleContext* _tmp7_;
			_tmp6_ = button;
			_tmp7_ = gtk_widget_get_style_context (_tmp6_);
			gtk_style_context_add_class (_tmp7_, tertiary_action_type);
		}
		_g_object_unref0 (button);
	}
	if (!geary_string_is_empty_or_whitespace (cancel_button)) {
		GtkMessageDialog* _tmp8_;
		_tmp8_ = self->priv->dialog;
		gtk_dialog_add_button (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_dialog_get_type (), GtkDialog), cancel_button, (gint) GTK_RESPONSE_CANCEL);
	}
	if (!geary_string_is_empty_or_whitespace (ok_button)) {
		GtkWidget* button = NULL;
		GtkMessageDialog* _tmp9_;
		GtkWidget* _tmp10_;
		GtkWidget* _tmp11_;
		_tmp9_ = self->priv->dialog;
		_tmp10_ = gtk_dialog_add_button (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_dialog_get_type (), GtkDialog), ok_button, (gint) GTK_RESPONSE_OK);
		_tmp11_ = _g_object_ref0 (_tmp10_);
		button = _tmp11_;
		if (!geary_string_is_empty_or_whitespace (ok_action_type)) {
			GtkWidget* _tmp12_;
			GtkStyleContext* _tmp13_;
			_tmp12_ = button;
			_tmp13_ = gtk_widget_get_style_context (_tmp12_);
			gtk_style_context_add_class (_tmp13_, ok_action_type);
		}
		_g_object_unref0 (button);
	}
	if (default_response != NULL) {
		GtkMessageDialog* _tmp14_;
		_tmp14_ = self->priv->dialog;
		gtk_dialog_set_default_response (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, gtk_dialog_get_type (), GtkDialog), *default_response);
	}
	return self;
}

AlertDialog*
alert_dialog_new (GtkWindow* parent,
                  GtkMessageType message_type,
                  const gchar* title,
                  const gchar* description,
                  const gchar* ok_button,
                  const gchar* cancel_button,
                  const gchar* tertiary_button,
                  GtkResponseType tertiary_response_type,
                  const gchar* ok_action_type,
                  const gchar* tertiary_action_type,
                  GtkResponseType* default_response)
{
	return alert_dialog_construct (TYPE_ALERT_DIALOG, parent, message_type, title, description, ok_button, cancel_button, tertiary_button, tertiary_response_type, ok_action_type, tertiary_action_type, default_response);
}

void
alert_dialog_use_secondary_markup (AlertDialog* self,
                                   gboolean markup)
{
	GtkMessageDialog* _tmp0_;
	g_return_if_fail (IS_ALERT_DIALOG (self));
	_tmp0_ = self->priv->dialog;
	g_object_set (_tmp0_, "secondary-use-markup", markup, NULL);
}

GtkBox*
alert_dialog_get_message_area (AlertDialog* self)
{
	GtkMessageDialog* _tmp0_;
	GtkWidget* _tmp1_;
	GtkBox* _tmp2_;
	GtkBox* result;
	g_return_val_if_fail (IS_ALERT_DIALOG (self), NULL);
	_tmp0_ = self->priv->dialog;
	_tmp1_ = gtk_message_dialog_get_message_area (_tmp0_);
	_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_box_get_type (), GtkBox));
	result = _tmp2_;
	return result;
}

void
alert_dialog_set_focus_response (AlertDialog* self,
                                 GtkResponseType response)
{
	GtkWidget* to_focus = NULL;
	GtkMessageDialog* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	GtkWidget* _tmp3_;
	g_return_if_fail (IS_ALERT_DIALOG (self));
	_tmp0_ = self->priv->dialog;
	_tmp1_ = gtk_dialog_get_widget_for_response (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_dialog_get_type (), GtkDialog), (gint) response);
	_tmp2_ = _g_object_ref0 (_tmp1_);
	to_focus = _tmp2_;
	_tmp3_ = to_focus;
	if (_tmp3_ != NULL) {
		GtkWidget* _tmp4_;
		_tmp4_ = to_focus;
		gtk_widget_grab_focus (_tmp4_);
	}
	_g_object_unref0 (to_focus);
}

GtkResponseType
alert_dialog_run (AlertDialog* self)
{
	GtkResponseType response = 0;
	GtkMessageDialog* _tmp0_;
	GtkMessageDialog* _tmp1_;
	GtkResponseType result;
	g_return_val_if_fail (IS_ALERT_DIALOG (self), 0);
	_tmp0_ = self->priv->dialog;
	response = (GtkResponseType) gtk_dialog_run (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_dialog_get_type (), GtkDialog));
	_tmp1_ = self->priv->dialog;
	gtk_widget_destroy (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_widget_get_type (), GtkWidget));
	result = response;
	return result;
}

static void
alert_dialog_class_init (AlertDialogClass * klass,
                         gpointer klass_data)
{
	alert_dialog_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &AlertDialog_private_offset);
	G_OBJECT_CLASS (klass)->finalize = alert_dialog_finalize;
}

static void
alert_dialog_instance_init (AlertDialog * self,
                            gpointer klass)
{
	self->priv = alert_dialog_get_instance_private (self);
}

static void
alert_dialog_finalize (GObject * obj)
{
	AlertDialog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_ALERT_DIALOG, AlertDialog);
	_g_object_unref0 (self->priv->dialog);
	G_OBJECT_CLASS (alert_dialog_parent_class)->finalize (obj);
}

static GType
alert_dialog_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (AlertDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) alert_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AlertDialog), 0, (GInstanceInitFunc) alert_dialog_instance_init, NULL };
	GType alert_dialog_type_id;
	alert_dialog_type_id = g_type_register_static (G_TYPE_OBJECT, "AlertDialog", &g_define_type_info, 0);
	AlertDialog_private_offset = g_type_add_instance_private (alert_dialog_type_id, sizeof (AlertDialogPrivate));
	return alert_dialog_type_id;
}

GType
alert_dialog_get_type (void)
{
	static volatile gsize alert_dialog_type_id__once = 0;
	if (g_once_init_enter (&alert_dialog_type_id__once)) {
		GType alert_dialog_type_id;
		alert_dialog_type_id = alert_dialog_get_type_once ();
		g_once_init_leave (&alert_dialog_type_id__once, alert_dialog_type_id);
	}
	return alert_dialog_type_id__once;
}

ConfirmationDialog*
confirmation_dialog_construct (GType object_type,
                               GtkWindow* parent,
                               const gchar* title,
                               const gchar* description,
                               const gchar* ok_button,
                               const gchar* ok_action_type)
{
	ConfirmationDialog * self = NULL;
	g_return_val_if_fail ((parent == NULL) || G_TYPE_CHECK_INSTANCE_TYPE (parent, gtk_window_get_type ()), NULL);
	g_return_val_if_fail (title != NULL, NULL);
	self = (ConfirmationDialog*) alert_dialog_construct (object_type, parent, GTK_MESSAGE_WARNING, title, description, ok_button, STOCK__CANCEL, NULL, GTK_RESPONSE_NONE, ok_action_type, "", NULL);
	return self;
}

ConfirmationDialog*
confirmation_dialog_new (GtkWindow* parent,
                         const gchar* title,
                         const gchar* description,
                         const gchar* ok_button,
                         const gchar* ok_action_type)
{
	return confirmation_dialog_construct (TYPE_CONFIRMATION_DIALOG, parent, title, description, ok_button, ok_action_type);
}

static void
confirmation_dialog_class_init (ConfirmationDialogClass * klass,
                                gpointer klass_data)
{
	confirmation_dialog_parent_class = g_type_class_peek_parent (klass);
}

static void
confirmation_dialog_instance_init (ConfirmationDialog * self,
                                   gpointer klass)
{
}

static GType
confirmation_dialog_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ConfirmationDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) confirmation_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ConfirmationDialog), 0, (GInstanceInitFunc) confirmation_dialog_instance_init, NULL };
	GType confirmation_dialog_type_id;
	confirmation_dialog_type_id = g_type_register_static (TYPE_ALERT_DIALOG, "ConfirmationDialog", &g_define_type_info, 0);
	return confirmation_dialog_type_id;
}

GType
confirmation_dialog_get_type (void)
{
	static volatile gsize confirmation_dialog_type_id__once = 0;
	if (g_once_init_enter (&confirmation_dialog_type_id__once)) {
		GType confirmation_dialog_type_id;
		confirmation_dialog_type_id = confirmation_dialog_get_type_once ();
		g_once_init_leave (&confirmation_dialog_type_id__once, confirmation_dialog_type_id);
	}
	return confirmation_dialog_type_id__once;
}

TernaryConfirmationDialog*
ternary_confirmation_dialog_construct (GType object_type,
                                       GtkWindow* parent,
                                       const gchar* title,
                                       const gchar* description,
                                       const gchar* ok_button,
                                       const gchar* tertiary_button,
                                       GtkResponseType tertiary_response_type,
                                       const gchar* ok_action_type,
                                       const gchar* tertiary_action_type,
                                       GtkResponseType* default_response)
{
	TernaryConfirmationDialog * self = NULL;
	g_return_val_if_fail ((parent == NULL) || G_TYPE_CHECK_INSTANCE_TYPE (parent, gtk_window_get_type ()), NULL);
	g_return_val_if_fail (title != NULL, NULL);
	self = (TernaryConfirmationDialog*) alert_dialog_construct (object_type, parent, GTK_MESSAGE_WARNING, title, description, ok_button, STOCK__CANCEL, tertiary_button, tertiary_response_type, ok_action_type, tertiary_action_type, default_response);
	return self;
}

TernaryConfirmationDialog*
ternary_confirmation_dialog_new (GtkWindow* parent,
                                 const gchar* title,
                                 const gchar* description,
                                 const gchar* ok_button,
                                 const gchar* tertiary_button,
                                 GtkResponseType tertiary_response_type,
                                 const gchar* ok_action_type,
                                 const gchar* tertiary_action_type,
                                 GtkResponseType* default_response)
{
	return ternary_confirmation_dialog_construct (TYPE_TERNARY_CONFIRMATION_DIALOG, parent, title, description, ok_button, tertiary_button, tertiary_response_type, ok_action_type, tertiary_action_type, default_response);
}

static void
ternary_confirmation_dialog_class_init (TernaryConfirmationDialogClass * klass,
                                        gpointer klass_data)
{
	ternary_confirmation_dialog_parent_class = g_type_class_peek_parent (klass);
}

static void
ternary_confirmation_dialog_instance_init (TernaryConfirmationDialog * self,
                                           gpointer klass)
{
}

static GType
ternary_confirmation_dialog_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TernaryConfirmationDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) ternary_confirmation_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TernaryConfirmationDialog), 0, (GInstanceInitFunc) ternary_confirmation_dialog_instance_init, NULL };
	GType ternary_confirmation_dialog_type_id;
	ternary_confirmation_dialog_type_id = g_type_register_static (TYPE_ALERT_DIALOG, "TernaryConfirmationDialog", &g_define_type_info, 0);
	return ternary_confirmation_dialog_type_id;
}

GType
ternary_confirmation_dialog_get_type (void)
{
	static volatile gsize ternary_confirmation_dialog_type_id__once = 0;
	if (g_once_init_enter (&ternary_confirmation_dialog_type_id__once)) {
		GType ternary_confirmation_dialog_type_id;
		ternary_confirmation_dialog_type_id = ternary_confirmation_dialog_get_type_once ();
		g_once_init_leave (&ternary_confirmation_dialog_type_id__once, ternary_confirmation_dialog_type_id);
	}
	return ternary_confirmation_dialog_type_id__once;
}

ErrorDialog*
error_dialog_construct (GType object_type,
                        GtkWindow* parent,
                        const gchar* title,
                        const gchar* description)
{
	ErrorDialog * self = NULL;
	g_return_val_if_fail ((parent == NULL) || G_TYPE_CHECK_INSTANCE_TYPE (parent, gtk_window_get_type ()), NULL);
	g_return_val_if_fail (title != NULL, NULL);
	self = (ErrorDialog*) alert_dialog_construct (object_type, parent, GTK_MESSAGE_ERROR, title, description, STOCK__OK, NULL, NULL, GTK_RESPONSE_NONE, NULL, "", NULL);
	return self;
}

ErrorDialog*
error_dialog_new (GtkWindow* parent,
                  const gchar* title,
                  const gchar* description)
{
	return error_dialog_construct (TYPE_ERROR_DIALOG, parent, title, description);
}

static void
error_dialog_class_init (ErrorDialogClass * klass,
                         gpointer klass_data)
{
	error_dialog_parent_class = g_type_class_peek_parent (klass);
}

static void
error_dialog_instance_init (ErrorDialog * self,
                            gpointer klass)
{
}

static GType
error_dialog_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ErrorDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) error_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ErrorDialog), 0, (GInstanceInitFunc) error_dialog_instance_init, NULL };
	GType error_dialog_type_id;
	error_dialog_type_id = g_type_register_static (TYPE_ALERT_DIALOG, "ErrorDialog", &g_define_type_info, 0);
	return error_dialog_type_id;
}

GType
error_dialog_get_type (void)
{
	static volatile gsize error_dialog_type_id__once = 0;
	if (g_once_init_enter (&error_dialog_type_id__once)) {
		GType error_dialog_type_id;
		error_dialog_type_id = error_dialog_get_type_once ();
		g_once_init_leave (&error_dialog_type_id__once, error_dialog_type_id);
	}
	return error_dialog_type_id__once;
}

static inline gpointer
question_dialog_get_instance_private (QuestionDialog* self)
{
	return G_STRUCT_MEMBER_P (self, QuestionDialog_private_offset);
}

gboolean
question_dialog_get_is_checked (QuestionDialog* self)
{
	gboolean result;
	g_return_val_if_fail (IS_QUESTION_DIALOG (self), FALSE);
	result = self->priv->_is_checked;
	return result;
}

static void
question_dialog_set_is_checked (QuestionDialog* self,
                                gboolean value)
{
	gboolean old_value;
	g_return_if_fail (IS_QUESTION_DIALOG (self));
	old_value = question_dialog_get_is_checked (self);
	if (old_value != value) {
		self->priv->_is_checked = value;
		g_object_notify_by_pspec ((GObject *) self, question_dialog_properties[QUESTION_DIALOG_IS_CHECKED_PROPERTY]);
	}
}

QuestionDialog*
question_dialog_construct (GType object_type,
                           GtkWindow* parent,
                           const gchar* title,
                           const gchar* description,
                           const gchar* yes_button,
                           const gchar* no_button)
{
	QuestionDialog * self = NULL;
	g_return_val_if_fail ((parent == NULL) || G_TYPE_CHECK_INSTANCE_TYPE (parent, gtk_window_get_type ()), NULL);
	g_return_val_if_fail (title != NULL, NULL);
	g_return_val_if_fail (yes_button != NULL, NULL);
	g_return_val_if_fail (no_button != NULL, NULL);
	self = (QuestionDialog*) alert_dialog_construct (object_type, parent, GTK_MESSAGE_QUESTION, title, description, yes_button, no_button, NULL, GTK_RESPONSE_NONE, "suggested-action", "", NULL);
	return self;
}

QuestionDialog*
question_dialog_new (GtkWindow* parent,
                     const gchar* title,
                     const gchar* description,
                     const gchar* yes_button,
                     const gchar* no_button)
{
	return question_dialog_construct (TYPE_QUESTION_DIALOG, parent, title, description, yes_button, no_button);
}

static void
_question_dialog_on_checkbox_toggled_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                gpointer self)
{
	question_dialog_on_checkbox_toggled ((QuestionDialog*) self);
}

QuestionDialog*
question_dialog_construct_with_checkbox (GType object_type,
                                         GtkWindow* parent,
                                         const gchar* title,
                                         const gchar* description,
                                         const gchar* yes_button,
                                         const gchar* no_button,
                                         const gchar* checkbox_label,
                                         gboolean checkbox_default)
{
	QuestionDialog * self = NULL;
	GtkCheckButton* _tmp0_;
	GtkCheckButton* _tmp1_;
	GtkCheckButton* _tmp2_;
	GtkBox* _tmp3_;
	GtkBox* _tmp4_;
	GtkCheckButton* _tmp5_;
	GtkBox* _tmp6_;
	GtkBox* _tmp7_;
	g_return_val_if_fail ((parent == NULL) || G_TYPE_CHECK_INSTANCE_TYPE (parent, gtk_window_get_type ()), NULL);
	g_return_val_if_fail (title != NULL, NULL);
	g_return_val_if_fail (yes_button != NULL, NULL);
	g_return_val_if_fail (no_button != NULL, NULL);
	g_return_val_if_fail (checkbox_label != NULL, NULL);
	self = (QuestionDialog*) question_dialog_construct (object_type, parent, title, description, yes_button, no_button);
	_tmp0_ = (GtkCheckButton*) gtk_check_button_new_with_mnemonic (checkbox_label);
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->checkbutton);
	self->priv->checkbutton = _tmp0_;
	_tmp1_ = self->priv->checkbutton;
	gtk_toggle_button_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_toggle_button_get_type (), GtkToggleButton), checkbox_default);
	_tmp2_ = self->priv->checkbutton;
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_toggle_button_get_type (), GtkToggleButton), "toggled", (GCallback) _question_dialog_on_checkbox_toggled_gtk_toggle_button_toggled, self, 0);
	_tmp3_ = alert_dialog_get_message_area (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_ALERT_DIALOG, AlertDialog));
	_tmp4_ = _tmp3_;
	_tmp5_ = self->priv->checkbutton;
	gtk_box_pack_start (_tmp4_, G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_widget_get_type (), GtkWidget), TRUE, TRUE, (guint) 0);
	_g_object_unref0 (_tmp4_);
	_tmp6_ = alert_dialog_get_message_area (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_ALERT_DIALOG, AlertDialog));
	_tmp7_ = _tmp6_;
	gtk_widget_show_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_widget_get_type (), GtkWidget));
	_g_object_unref0 (_tmp7_);
	alert_dialog_set_focus_response (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_ALERT_DIALOG, AlertDialog), GTK_RESPONSE_OK);
	question_dialog_set_is_checked (self, checkbox_default);
	return self;
}

QuestionDialog*
question_dialog_new_with_checkbox (GtkWindow* parent,
                                   const gchar* title,
                                   const gchar* description,
                                   const gchar* yes_button,
                                   const gchar* no_button,
                                   const gchar* checkbox_label,
                                   gboolean checkbox_default)
{
	return question_dialog_construct_with_checkbox (TYPE_QUESTION_DIALOG, parent, title, description, yes_button, no_button, checkbox_label, checkbox_default);
}

static void
question_dialog_on_checkbox_toggled (QuestionDialog* self)
{
	GtkCheckButton* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	g_return_if_fail (IS_QUESTION_DIALOG (self));
	_tmp0_ = self->priv->checkbutton;
	_tmp1_ = gtk_toggle_button_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_toggle_button_get_type (), GtkToggleButton));
	_tmp2_ = _tmp1_;
	question_dialog_set_is_checked (self, _tmp2_);
}

static void
question_dialog_class_init (QuestionDialogClass * klass,
                            gpointer klass_data)
{
	question_dialog_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &QuestionDialog_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_question_dialog_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_question_dialog_set_property;
	G_OBJECT_CLASS (klass)->finalize = question_dialog_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), QUESTION_DIALOG_IS_CHECKED_PROPERTY, question_dialog_properties[QUESTION_DIALOG_IS_CHECKED_PROPERTY] = g_param_spec_boolean ("is-checked", "is-checked", "is-checked", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
question_dialog_instance_init (QuestionDialog * self,
                               gpointer klass)
{
	self->priv = question_dialog_get_instance_private (self);
	self->priv->_is_checked = FALSE;
	self->priv->checkbutton = NULL;
}

static void
question_dialog_finalize (GObject * obj)
{
	QuestionDialog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_QUESTION_DIALOG, QuestionDialog);
	_g_object_unref0 (self->priv->checkbutton);
	G_OBJECT_CLASS (question_dialog_parent_class)->finalize (obj);
}

static GType
question_dialog_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (QuestionDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) question_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (QuestionDialog), 0, (GInstanceInitFunc) question_dialog_instance_init, NULL };
	GType question_dialog_type_id;
	question_dialog_type_id = g_type_register_static (TYPE_ALERT_DIALOG, "QuestionDialog", &g_define_type_info, 0);
	QuestionDialog_private_offset = g_type_add_instance_private (question_dialog_type_id, sizeof (QuestionDialogPrivate));
	return question_dialog_type_id;
}

GType
question_dialog_get_type (void)
{
	static volatile gsize question_dialog_type_id__once = 0;
	if (g_once_init_enter (&question_dialog_type_id__once)) {
		GType question_dialog_type_id;
		question_dialog_type_id = question_dialog_get_type_once ();
		g_once_init_leave (&question_dialog_type_id__once, question_dialog_type_id);
	}
	return question_dialog_type_id__once;
}

static void
_vala_question_dialog_get_property (GObject * object,
                                    guint property_id,
                                    GValue * value,
                                    GParamSpec * pspec)
{
	QuestionDialog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_QUESTION_DIALOG, QuestionDialog);
	switch (property_id) {
		case QUESTION_DIALOG_IS_CHECKED_PROPERTY:
		g_value_set_boolean (value, question_dialog_get_is_checked (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_question_dialog_set_property (GObject * object,
                                    guint property_id,
                                    const GValue * value,
                                    GParamSpec * pspec)
{
	QuestionDialog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_QUESTION_DIALOG, QuestionDialog);
	switch (property_id) {
		case QUESTION_DIALOG_IS_CHECKED_PROPERTY:
		question_dialog_set_is_checked (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

