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

/*
 *  pamac-vala
 *
 *  Copyright (C) 2014-2022 Guillaume Benoit <guillaume@manjaro.org>
 *
 *  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
 *  (at your option) 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 get 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 <glib.h>
#include "pamac-gtk.h"

#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

#define PAMAC_TYPE_TRANSACTION_SUM_DIALOG (pamac_transaction_sum_dialog_get_type ())
#define PAMAC_TRANSACTION_SUM_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PAMAC_TYPE_TRANSACTION_SUM_DIALOG, PamacTransactionSumDialog))
#define PAMAC_TRANSACTION_SUM_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PAMAC_TYPE_TRANSACTION_SUM_DIALOG, PamacTransactionSumDialogClass))
#define PAMAC_IS_TRANSACTION_SUM_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PAMAC_TYPE_TRANSACTION_SUM_DIALOG))
#define PAMAC_IS_TRANSACTION_SUM_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PAMAC_TYPE_TRANSACTION_SUM_DIALOG))
#define PAMAC_TRANSACTION_SUM_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PAMAC_TYPE_TRANSACTION_SUM_DIALOG, PamacTransactionSumDialogClass))

typedef struct _PamacTransactionSumDialog PamacTransactionSumDialog;
typedef struct _PamacTransactionSumDialogClass PamacTransactionSumDialogClass;
typedef struct _PamacTransactionSumDialogPrivate PamacTransactionSumDialogPrivate;
enum  {
	PAMAC_TRANSACTION_SUM_DIALOG_0_PROPERTY,
	PAMAC_TRANSACTION_SUM_DIALOG_NUM_PROPERTIES
};
static GParamSpec* pamac_transaction_sum_dialog_properties[PAMAC_TRANSACTION_SUM_DIALOG_NUM_PROPERTIES];

struct _PamacTransactionSumDialog {
	GtkDialog parent_instance;
	PamacTransactionSumDialogPrivate * priv;
	GtkLabel* top_label;
	GtkBox* box;
	GtkButton* cancel_button;
};

struct _PamacTransactionSumDialogClass {
	GtkDialogClass parent_class;
};

static gpointer pamac_transaction_sum_dialog_parent_class = NULL;

VALA_EXTERN GType pamac_transaction_sum_dialog_get_type (void) G_GNUC_CONST ;
VALA_EXTERN PamacTransactionSumDialog* pamac_transaction_sum_dialog_new (GtkWindow* window);
VALA_EXTERN PamacTransactionSumDialog* pamac_transaction_sum_dialog_construct (GType object_type,
                                                                   GtkWindow* window);
static void pamac_transaction_sum_dialog_finalize (GObject * obj);
static GType pamac_transaction_sum_dialog_get_type_once (void);

PamacTransactionSumDialog*
pamac_transaction_sum_dialog_construct (GType object_type,
                                        GtkWindow* window)
{
	PamacTransactionSumDialog * self = NULL;
	gint use_header_bar = 0;
	GtkSettings* _tmp0_;
	gint _tmp1_ = 0;
	_tmp0_ = gtk_settings_get_default ();
	g_object_get ((GObject*) _tmp0_, "gtk-dialogs-use-header", &_tmp1_, NULL);
	use_header_bar = _tmp1_;
	self = (PamacTransactionSumDialog*) g_object_new (object_type, "transient-for", window, "use-header-bar", use_header_bar, NULL);
	return self;
}

PamacTransactionSumDialog*
pamac_transaction_sum_dialog_new (GtkWindow* window)
{
	return pamac_transaction_sum_dialog_construct (PAMAC_TYPE_TRANSACTION_SUM_DIALOG, window);
}

static void
pamac_transaction_sum_dialog_class_init (PamacTransactionSumDialogClass * klass,
                                         gpointer klass_data)
{
	pamac_transaction_sum_dialog_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->finalize = pamac_transaction_sum_dialog_finalize;
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/manjaro/pamac/transaction/transaction_sum_dialog.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "top_label", FALSE, G_STRUCT_OFFSET (PamacTransactionSumDialog, top_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "box", FALSE, G_STRUCT_OFFSET (PamacTransactionSumDialog, box));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "cancel_button", FALSE, G_STRUCT_OFFSET (PamacTransactionSumDialog, cancel_button));
}

static void
pamac_transaction_sum_dialog_instance_init (PamacTransactionSumDialog * self,
                                            gpointer klass)
{
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
pamac_transaction_sum_dialog_finalize (GObject * obj)
{
	PamacTransactionSumDialog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PAMAC_TYPE_TRANSACTION_SUM_DIALOG, PamacTransactionSumDialog);
	G_OBJECT_CLASS (pamac_transaction_sum_dialog_parent_class)->finalize (obj);
}

static GType
pamac_transaction_sum_dialog_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (PamacTransactionSumDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) pamac_transaction_sum_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PamacTransactionSumDialog), 0, (GInstanceInitFunc) pamac_transaction_sum_dialog_instance_init, NULL };
	GType pamac_transaction_sum_dialog_type_id;
	pamac_transaction_sum_dialog_type_id = g_type_register_static (gtk_dialog_get_type (), "PamacTransactionSumDialog", &g_define_type_info, 0);
	return pamac_transaction_sum_dialog_type_id;
}

GType
pamac_transaction_sum_dialog_get_type (void)
{
	static volatile gsize pamac_transaction_sum_dialog_type_id__once = 0;
	if (g_once_init_enter (&pamac_transaction_sum_dialog_type_id__once)) {
		GType pamac_transaction_sum_dialog_type_id;
		pamac_transaction_sum_dialog_type_id = pamac_transaction_sum_dialog_get_type_once ();
		g_once_init_leave (&pamac_transaction_sum_dialog_type_id__once, pamac_transaction_sum_dialog_type_id);
	}
	return pamac_transaction_sum_dialog_type_id__once;
}

