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

#include <adwaita.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include "planify.h"
#include <glib/gi18n-lib.h>
#include <float.h>
#include <math.h>
#include <gio/gio.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
#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_NEW_VERSION_POPUP (widgets_new_version_popup_get_type ())
#define WIDGETS_NEW_VERSION_POPUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_NEW_VERSION_POPUP, WidgetsNewVersionPopup))
#define WIDGETS_NEW_VERSION_POPUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_NEW_VERSION_POPUP, WidgetsNewVersionPopupClass))
#define WIDGETS_IS_NEW_VERSION_POPUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_NEW_VERSION_POPUP))
#define WIDGETS_IS_NEW_VERSION_POPUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_NEW_VERSION_POPUP))
#define WIDGETS_NEW_VERSION_POPUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_NEW_VERSION_POPUP, WidgetsNewVersionPopupClass))

typedef struct _WidgetsNewVersionPopup WidgetsNewVersionPopup;
typedef struct _WidgetsNewVersionPopupClass WidgetsNewVersionPopupClass;
typedef struct _WidgetsNewVersionPopupPrivate WidgetsNewVersionPopupPrivate;
enum  {
	WIDGETS_NEW_VERSION_POPUP_0_PROPERTY,
	WIDGETS_NEW_VERSION_POPUP_VERSION_PROPERTY,
	WIDGETS_NEW_VERSION_POPUP_DESCRIPTION_PROPERTY,
	WIDGETS_NEW_VERSION_POPUP_NUM_PROPERTIES
};
static GParamSpec* widgets_new_version_popup_properties[WIDGETS_NEW_VERSION_POPUP_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
enum  {
	WIDGETS_NEW_VERSION_POPUP_DISMISSED_SIGNAL,
	WIDGETS_NEW_VERSION_POPUP_NUM_SIGNALS
};
static guint widgets_new_version_popup_signals[WIDGETS_NEW_VERSION_POPUP_NUM_SIGNALS] = {0};

struct _WidgetsNewVersionPopup {
	AdwBin parent_instance;
	WidgetsNewVersionPopupPrivate * priv;
};

struct _WidgetsNewVersionPopupClass {
	AdwBinClass parent_class;
};

struct _WidgetsNewVersionPopupPrivate {
	GtkLabel* version_label;
	GtkLabel* description_label;
	GtkImage* star_icon;
	gchar* _version;
};

static gint WidgetsNewVersionPopup_private_offset;
static gpointer widgets_new_version_popup_parent_class = NULL;

VALA_EXTERN GType widgets_new_version_popup_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsNewVersionPopup, g_object_unref)
VALA_EXTERN void widgets_new_version_popup_show_with_animation (WidgetsNewVersionPopup* self);
static gboolean __lambda4_ (WidgetsNewVersionPopup* self);
static gboolean ___lambda4__gsource_func (gpointer self);
VALA_EXTERN WidgetsNewVersionPopup* widgets_new_version_popup_new (void);
VALA_EXTERN WidgetsNewVersionPopup* widgets_new_version_popup_construct (GType object_type);
VALA_EXTERN const gchar* widgets_new_version_popup_get_version (WidgetsNewVersionPopup* self);
VALA_EXTERN void widgets_new_version_popup_set_version (WidgetsNewVersionPopup* self,
                                            const gchar* value);
VALA_EXTERN void widgets_new_version_popup_set_description (WidgetsNewVersionPopup* self,
                                                const gchar* value);
static GObject * widgets_new_version_popup_constructor (GType type,
                                                 guint n_construct_properties,
                                                 GObjectConstructParam * construct_properties);
static void _widgets_new_version_popup___lambda5_ (WidgetsNewVersionPopup* self);
static void __widgets_new_version_popup___lambda5__gtk_button_clicked (GtkButton* _sender,
                                                                gpointer self);
static void _widgets_new_version_popup___lambda6_ (WidgetsNewVersionPopup* self);
static void __widgets_new_version_popup___lambda6__gtk_button_clicked (GtkButton* _sender,
                                                                gpointer self);
static void widgets_new_version_popup_finalize (GObject * obj);
static GType widgets_new_version_popup_get_type_once (void);
static void _vala_widgets_new_version_popup_get_property (GObject * object,
                                                   guint property_id,
                                                   GValue * value,
                                                   GParamSpec * pspec);
static void _vala_widgets_new_version_popup_set_property (GObject * object,
                                                   guint property_id,
                                                   const GValue * value,
                                                   GParamSpec * pspec);

static inline gpointer
widgets_new_version_popup_get_instance_private (WidgetsNewVersionPopup* self)
{
	return G_STRUCT_MEMBER_P (self, WidgetsNewVersionPopup_private_offset);
}

static gboolean
__lambda4_ (WidgetsNewVersionPopup* self)
{
	GtkImage* _tmp0_;
	gboolean result;
	_tmp0_ = self->priv->star_icon;
	gtk_widget_remove_css_class ((GtkWidget*) _tmp0_, "fancy-bounce-turn-animation");
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
___lambda4__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda4_ ((WidgetsNewVersionPopup*) self);
	return result;
}

void
widgets_new_version_popup_show_with_animation (WidgetsNewVersionPopup* self)
{
	GtkImage* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->star_icon;
	gtk_widget_add_css_class ((GtkWidget*) _tmp0_, "fancy-bounce-turn-animation");
	g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 800, ___lambda4__gsource_func, g_object_ref (self), g_object_unref);
}

WidgetsNewVersionPopup*
widgets_new_version_popup_construct (GType object_type)
{
	WidgetsNewVersionPopup * self = NULL;
	self = (WidgetsNewVersionPopup*) g_object_new (object_type, NULL);
	return self;
}

WidgetsNewVersionPopup*
widgets_new_version_popup_new (void)
{
	return widgets_new_version_popup_construct (WIDGETS_TYPE_NEW_VERSION_POPUP);
}

const gchar*
widgets_new_version_popup_get_version (WidgetsNewVersionPopup* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_version;
	result = _tmp0_;
	return result;
}

void
widgets_new_version_popup_set_version (WidgetsNewVersionPopup* self,
                                       const gchar* value)
{
	gchar* _tmp0_;
	GtkLabel* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_strdup (value);
	_g_free0 (self->priv->_version);
	self->priv->_version = _tmp0_;
	_tmp1_ = self->priv->version_label;
	_tmp2_ = g_strconcat ("v", value, NULL);
	_tmp3_ = _tmp2_;
	gtk_label_set_label (_tmp1_, _tmp3_);
	_g_free0 (_tmp3_);
	g_object_notify_by_pspec ((GObject *) self, widgets_new_version_popup_properties[WIDGETS_NEW_VERSION_POPUP_VERSION_PROPERTY]);
}

void
widgets_new_version_popup_set_description (WidgetsNewVersionPopup* self,
                                           const gchar* value)
{
	GtkLabel* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->description_label;
	gtk_label_set_label (_tmp0_, value);
	g_object_notify_by_pspec ((GObject *) self, widgets_new_version_popup_properties[WIDGETS_NEW_VERSION_POPUP_DESCRIPTION_PROPERTY]);
}

static void
_widgets_new_version_popup___lambda5_ (WidgetsNewVersionPopup* self)
{
	gboolean launched = FALSE;
	GError* _inner_error0_ = NULL;
	launched = FALSE;
	{
		gboolean _tmp0_ = FALSE;
		_tmp0_ = g_app_info_launch_default_for_uri ("appstream://io.github.alainm23.planify", NULL, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		launched = _tmp0_;
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp1_;
		const gchar* _tmp2_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp1_ = e;
		_tmp2_ = _tmp1_->message;
		g_warning ("NewVersionPopup.vala:84: Error opening software center: %s", _tmp2_);
		_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;
	}
	if (!launched) {
		{
			g_app_info_launch_default_for_uri ("https://flathub.org/apps/io.github.alainm23.planify", NULL, &_inner_error0_);
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				goto __catch1_g_error;
			}
		}
		goto __finally1;
		__catch1_g_error:
		{
			GError* e = NULL;
			GError* _tmp3_;
			const gchar* _tmp4_;
			e = _inner_error0_;
			_inner_error0_ = NULL;
			_tmp3_ = e;
			_tmp4_ = _tmp3_->message;
			g_warning ("NewVersionPopup.vala:91: Error opening browser: %s", _tmp4_);
			_g_error_free0 (e);
		}
		__finally1:
		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;
		}
	}
	g_signal_emit (self, widgets_new_version_popup_signals[WIDGETS_NEW_VERSION_POPUP_DISMISSED_SIGNAL], 0);
}

static void
__widgets_new_version_popup___lambda5__gtk_button_clicked (GtkButton* _sender,
                                                           gpointer self)
{
	_widgets_new_version_popup___lambda5_ ((WidgetsNewVersionPopup*) self);
}

static void
_widgets_new_version_popup___lambda6_ (WidgetsNewVersionPopup* self)
{
	g_signal_emit (self, widgets_new_version_popup_signals[WIDGETS_NEW_VERSION_POPUP_DISMISSED_SIGNAL], 0);
}

static void
__widgets_new_version_popup___lambda6__gtk_button_clicked (GtkButton* _sender,
                                                           gpointer self)
{
	_widgets_new_version_popup___lambda6_ ((WidgetsNewVersionPopup*) self);
}

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

static GObject *
widgets_new_version_popup_constructor (GType type,
                                       guint n_construct_properties,
                                       GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	WidgetsNewVersionPopup * self;
	GtkImage* _tmp0_ = NULL;
	GtkImage* _tmp1_;
	Util* _tmp2_;
	Util* _tmp3_;
	Util* _tmp4_;
	Util* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	GtkImage* _tmp8_;
	GtkLabel* title_label = NULL;
	GtkLabel* _tmp9_ = NULL;
	GtkLabel* _tmp10_;
	GtkLabel* _tmp11_ = NULL;
	GtkLabel* _tmp12_;
	GtkLabel* _tmp13_;
	GtkGrid* header_grid = NULL;
	GtkGrid* _tmp14_ = NULL;
	GtkGrid* _tmp15_;
	GtkImage* _tmp16_;
	GtkGrid* _tmp17_;
	GtkLabel* _tmp18_;
	GtkGrid* _tmp19_;
	GtkLabel* _tmp20_;
	GtkLabel* _tmp21_ = NULL;
	GtkButton* update_button = NULL;
	GtkButton* _tmp22_ = NULL;
	GtkButton* _tmp23_;
	GtkButton* _tmp24_;
	GtkButton* dismiss_button = NULL;
	GtkButton* _tmp25_ = NULL;
	GtkButton* _tmp26_;
	GtkButton* _tmp27_;
	GtkButton* _tmp28_;
	GtkBox* content_box = NULL;
	GtkBox* _tmp29_;
	GtkBox* _tmp30_;
	GtkGrid* _tmp31_;
	GtkBox* _tmp32_;
	GtkLabel* _tmp33_;
	GtkBox* _tmp34_;
	GtkButton* _tmp35_;
	GtkBox* _tmp36_;
	GtkButton* _tmp37_;
	AdwBin* card = NULL;
	GtkBox* _tmp38_;
	GtkWidget* _tmp39_;
	AdwBin* _tmp40_ = NULL;
	AdwBin* _tmp41_;
	AdwBin* _tmp42_;
	AdwBin* _tmp43_;
	parent_class = G_OBJECT_CLASS (widgets_new_version_popup_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, WIDGETS_TYPE_NEW_VERSION_POPUP, WidgetsNewVersionPopup);
	_tmp0_ = (GtkImage*) gtk_image_new_from_icon_name ("star-outline-thick-symbolic");
	gtk_widget_set_valign ((GtkWidget*) _tmp0_, GTK_ALIGN_CENTER);
	gtk_image_set_pixel_size (_tmp0_, 32);
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->star_icon);
	self->priv->star_icon = _tmp0_;
	_tmp1_ = self->priv->star_icon;
	gtk_widget_add_css_class ((GtkWidget*) _tmp1_, "view-icon");
	_tmp2_ = util_get_default ();
	_tmp3_ = _tmp2_;
	_tmp4_ = util_get_default ();
	_tmp5_ = _tmp4_;
	_tmp6_ = util_get_accent_color (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = self->priv->star_icon;
	util_set_widget_color (_tmp3_, _tmp7_, (GtkWidget*) _tmp8_);
	_g_free0 (_tmp7_);
	_g_object_unref0 (_tmp5_);
	_g_object_unref0 (_tmp3_);
	_tmp9_ = (GtkLabel*) gtk_label_new (_ ("New version available!"));
	gtk_widget_set_halign ((GtkWidget*) _tmp9_, GTK_ALIGN_START);
	gtk_widget_set_valign ((GtkWidget*) _tmp9_, GTK_ALIGN_END);
	gtk_label_set_xalign (_tmp9_, (gfloat) 0);
	g_object_ref_sink (_tmp9_);
	title_label = _tmp9_;
	_tmp10_ = title_label;
	gtk_widget_add_css_class ((GtkWidget*) _tmp10_, "font-bold");
	_tmp11_ = (GtkLabel*) gtk_label_new (NULL);
	gtk_widget_set_halign ((GtkWidget*) _tmp11_, GTK_ALIGN_START);
	gtk_widget_set_valign ((GtkWidget*) _tmp11_, GTK_ALIGN_START);
	gtk_label_set_xalign (_tmp11_, (gfloat) 0);
	g_object_ref_sink (_tmp11_);
	_g_object_unref0 (self->priv->version_label);
	self->priv->version_label = _tmp11_;
	_tmp12_ = self->priv->version_label;
	gtk_widget_add_css_class ((GtkWidget*) _tmp12_, "dimmed");
	_tmp13_ = self->priv->version_label;
	gtk_widget_add_css_class ((GtkWidget*) _tmp13_, "caption");
	_tmp14_ = (GtkGrid*) gtk_grid_new ();
	gtk_grid_set_column_spacing (_tmp14_, 12);
	gtk_grid_set_row_spacing (_tmp14_, 3);
	g_object_ref_sink (_tmp14_);
	header_grid = _tmp14_;
	_tmp15_ = header_grid;
	_tmp16_ = self->priv->star_icon;
	gtk_grid_attach (_tmp15_, (GtkWidget*) _tmp16_, 0, 0, 1, 2);
	_tmp17_ = header_grid;
	_tmp18_ = title_label;
	gtk_grid_attach (_tmp17_, (GtkWidget*) _tmp18_, 1, 0, 1, 1);
	_tmp19_ = header_grid;
	_tmp20_ = self->priv->version_label;
	gtk_grid_attach (_tmp19_, (GtkWidget*) _tmp20_, 1, 1, 1, 1);
	_tmp21_ = (GtkLabel*) gtk_label_new (_ ("Update now to enjoy the latest improvements, bug fixes, and new featur" \
"es that make Planify even better"));
	gtk_label_set_wrap (_tmp21_, TRUE);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp21_, 12);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp21_, 12);
	gtk_label_set_xalign (_tmp21_, (gfloat) 0);
	g_object_ref_sink (_tmp21_);
	_g_object_unref0 (self->priv->description_label);
	self->priv->description_label = _tmp21_;
	_tmp22_ = (GtkButton*) gtk_button_new_with_label (_ ("Update Now"));
	gtk_widget_set_hexpand ((GtkWidget*) _tmp22_, TRUE);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp22_, 6);
	g_object_ref_sink (_tmp22_);
	update_button = _tmp22_;
	_tmp23_ = update_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp23_, "suggested-action");
	_tmp24_ = update_button;
	g_signal_connect_object (_tmp24_, "clicked", (GCallback) __widgets_new_version_popup___lambda5__gtk_button_clicked, self, 0);
	_tmp25_ = (GtkButton*) gtk_button_new_with_label (_ ("Dismiss"));
	gtk_widget_set_hexpand ((GtkWidget*) _tmp25_, TRUE);
	g_object_ref_sink (_tmp25_);
	dismiss_button = _tmp25_;
	_tmp26_ = dismiss_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp26_, "flat");
	_tmp27_ = dismiss_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp27_, "caption");
	_tmp28_ = dismiss_button;
	g_signal_connect_object (_tmp28_, "clicked", (GCallback) __widgets_new_version_popup___lambda6__gtk_button_clicked, self, 0);
	_tmp29_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
	g_object_ref_sink (_tmp29_);
	content_box = _tmp29_;
	_tmp30_ = content_box;
	_tmp31_ = header_grid;
	gtk_box_append (_tmp30_, (GtkWidget*) _tmp31_);
	_tmp32_ = content_box;
	_tmp33_ = self->priv->description_label;
	gtk_box_append (_tmp32_, (GtkWidget*) _tmp33_);
	_tmp34_ = content_box;
	_tmp35_ = update_button;
	gtk_box_append (_tmp34_, (GtkWidget*) _tmp35_);
	_tmp36_ = content_box;
	_tmp37_ = dismiss_button;
	gtk_box_append (_tmp36_, (GtkWidget*) _tmp37_);
	_tmp38_ = content_box;
	_tmp39_ = _g_object_ref0 ((GtkWidget*) _tmp38_);
	_tmp40_ = (AdwBin*) adw_bin_new ();
	gtk_widget_set_margin_top ((GtkWidget*) _tmp40_, 12);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp40_, 12);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp40_, 12);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp40_, 12);
	adw_bin_set_child (_tmp40_, _tmp39_);
	_g_object_unref0 (_tmp39_);
	g_object_ref_sink (_tmp40_);
	card = _tmp40_;
	_tmp41_ = card;
	gtk_widget_add_css_class ((GtkWidget*) _tmp41_, "card");
	_tmp42_ = card;
	gtk_widget_add_css_class ((GtkWidget*) _tmp42_, "version-popup");
	_tmp43_ = card;
	adw_bin_set_child ((AdwBin*) self, (GtkWidget*) _tmp43_);
	_g_object_unref0 (card);
	_g_object_unref0 (content_box);
	_g_object_unref0 (dismiss_button);
	_g_object_unref0 (update_button);
	_g_object_unref0 (header_grid);
	_g_object_unref0 (title_label);
	return obj;
}

static void
widgets_new_version_popup_class_init (WidgetsNewVersionPopupClass * klass,
                                      gpointer klass_data)
{
	widgets_new_version_popup_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &WidgetsNewVersionPopup_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_widgets_new_version_popup_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_widgets_new_version_popup_set_property;
	G_OBJECT_CLASS (klass)->constructor = widgets_new_version_popup_constructor;
	G_OBJECT_CLASS (klass)->finalize = widgets_new_version_popup_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_NEW_VERSION_POPUP_VERSION_PROPERTY, widgets_new_version_popup_properties[WIDGETS_NEW_VERSION_POPUP_VERSION_PROPERTY] = g_param_spec_string ("version", "version", "version", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_NEW_VERSION_POPUP_DESCRIPTION_PROPERTY, widgets_new_version_popup_properties[WIDGETS_NEW_VERSION_POPUP_DESCRIPTION_PROPERTY] = g_param_spec_string ("description", "description", "description", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_WRITABLE));
	widgets_new_version_popup_signals[WIDGETS_NEW_VERSION_POPUP_DISMISSED_SIGNAL] = g_signal_new ("dismissed", WIDGETS_TYPE_NEW_VERSION_POPUP, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
widgets_new_version_popup_instance_init (WidgetsNewVersionPopup * self,
                                         gpointer klass)
{
	self->priv = widgets_new_version_popup_get_instance_private (self);
}

static void
widgets_new_version_popup_finalize (GObject * obj)
{
	WidgetsNewVersionPopup * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, WIDGETS_TYPE_NEW_VERSION_POPUP, WidgetsNewVersionPopup);
	_g_object_unref0 (self->priv->version_label);
	_g_object_unref0 (self->priv->description_label);
	_g_object_unref0 (self->priv->star_icon);
	_g_free0 (self->priv->_version);
	G_OBJECT_CLASS (widgets_new_version_popup_parent_class)->finalize (obj);
}

static GType
widgets_new_version_popup_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (WidgetsNewVersionPopupClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) widgets_new_version_popup_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (WidgetsNewVersionPopup), 0, (GInstanceInitFunc) widgets_new_version_popup_instance_init, NULL };
	GType widgets_new_version_popup_type_id;
	widgets_new_version_popup_type_id = g_type_register_static (adw_bin_get_type (), "WidgetsNewVersionPopup", &g_define_type_info, 0);
	WidgetsNewVersionPopup_private_offset = g_type_add_instance_private (widgets_new_version_popup_type_id, sizeof (WidgetsNewVersionPopupPrivate));
	return widgets_new_version_popup_type_id;
}

GType
widgets_new_version_popup_get_type (void)
{
	static volatile gsize widgets_new_version_popup_type_id__once = 0;
	if (g_once_init_enter (&widgets_new_version_popup_type_id__once)) {
		GType widgets_new_version_popup_type_id;
		widgets_new_version_popup_type_id = widgets_new_version_popup_get_type_once ();
		g_once_init_leave (&widgets_new_version_popup_type_id__once, widgets_new_version_popup_type_id);
	}
	return widgets_new_version_popup_type_id__once;
}

static void
_vala_widgets_new_version_popup_get_property (GObject * object,
                                              guint property_id,
                                              GValue * value,
                                              GParamSpec * pspec)
{
	WidgetsNewVersionPopup * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, WIDGETS_TYPE_NEW_VERSION_POPUP, WidgetsNewVersionPopup);
	switch (property_id) {
		case WIDGETS_NEW_VERSION_POPUP_VERSION_PROPERTY:
		g_value_set_string (value, widgets_new_version_popup_get_version (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_widgets_new_version_popup_set_property (GObject * object,
                                              guint property_id,
                                              const GValue * value,
                                              GParamSpec * pspec)
{
	WidgetsNewVersionPopup * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, WIDGETS_TYPE_NEW_VERSION_POPUP, WidgetsNewVersionPopup);
	switch (property_id) {
		case WIDGETS_NEW_VERSION_POPUP_VERSION_PROPERTY:
		widgets_new_version_popup_set_version (self, g_value_get_string (value));
		break;
		case WIDGETS_NEW_VERSION_POPUP_DESCRIPTION_PROPERTY:
		widgets_new_version_popup_set_description (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

