/* snapshot-list-row.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from snapshot-list-row.vala, do not modify */

/* This file is part of GNOME Boxes. License: LGPLv2+*/

#include <handy.h>
#include <glib-object.h>
#include <libvirt-gobject/libvirt-gobject.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gtk/gtk.h>
#include <libvirt-gconfig/libvirt-gconfig.h>
#include <glib/gi18n-lib.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 BOXES_TYPE_SNAPSHOT_LIST_ROW (boxes_snapshot_list_row_get_type ())
#define BOXES_SNAPSHOT_LIST_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_SNAPSHOT_LIST_ROW, BoxesSnapshotListRow))
#define BOXES_SNAPSHOT_LIST_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_SNAPSHOT_LIST_ROW, BoxesSnapshotListRowClass))
#define BOXES_IS_SNAPSHOT_LIST_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_SNAPSHOT_LIST_ROW))
#define BOXES_IS_SNAPSHOT_LIST_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_SNAPSHOT_LIST_ROW))
#define BOXES_SNAPSHOT_LIST_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_SNAPSHOT_LIST_ROW, BoxesSnapshotListRowClass))

typedef struct _BoxesSnapshotListRow BoxesSnapshotListRow;
typedef struct _BoxesSnapshotListRowClass BoxesSnapshotListRowClass;
typedef struct _BoxesSnapshotListRowPrivate BoxesSnapshotListRowPrivate;

#define BOXES_TYPE_COLLECTION_ITEM (boxes_collection_item_get_type ())
#define BOXES_COLLECTION_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_COLLECTION_ITEM, BoxesCollectionItem))
#define BOXES_COLLECTION_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_COLLECTION_ITEM, BoxesCollectionItemClass))
#define BOXES_IS_COLLECTION_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_COLLECTION_ITEM))
#define BOXES_IS_COLLECTION_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_COLLECTION_ITEM))
#define BOXES_COLLECTION_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_COLLECTION_ITEM, BoxesCollectionItemClass))

typedef struct _BoxesCollectionItem BoxesCollectionItem;
typedef struct _BoxesCollectionItemClass BoxesCollectionItemClass;

#define BOXES_TYPE_MACHINE (boxes_machine_get_type ())
#define BOXES_MACHINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_MACHINE, BoxesMachine))
#define BOXES_MACHINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_MACHINE, BoxesMachineClass))
#define BOXES_IS_MACHINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_MACHINE))
#define BOXES_IS_MACHINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_MACHINE))
#define BOXES_MACHINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_MACHINE, BoxesMachineClass))

typedef struct _BoxesMachine BoxesMachine;
typedef struct _BoxesMachineClass BoxesMachineClass;

#define BOXES_TYPE_LIBVIRT_MACHINE (boxes_libvirt_machine_get_type ())
#define BOXES_LIBVIRT_MACHINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_LIBVIRT_MACHINE, BoxesLibvirtMachine))
#define BOXES_LIBVIRT_MACHINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_LIBVIRT_MACHINE, BoxesLibvirtMachineClass))
#define BOXES_IS_LIBVIRT_MACHINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_LIBVIRT_MACHINE))
#define BOXES_IS_LIBVIRT_MACHINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_LIBVIRT_MACHINE))
#define BOXES_LIBVIRT_MACHINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_LIBVIRT_MACHINE, BoxesLibvirtMachineClass))

typedef struct _BoxesLibvirtMachine BoxesLibvirtMachine;
typedef struct _BoxesLibvirtMachineClass BoxesLibvirtMachineClass;
enum  {
	BOXES_SNAPSHOT_LIST_ROW_0_PROPERTY,
	BOXES_SNAPSHOT_LIST_ROW_ACTIVITY_MESSAGE_PROPERTY,
	BOXES_SNAPSHOT_LIST_ROW_NUM_PROPERTIES
};
static GParamSpec* boxes_snapshot_list_row_properties[BOXES_SNAPSHOT_LIST_ROW_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 BOXES_TYPE_TOAST (boxes_toast_get_type ())
#define BOXES_TOAST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_TOAST, BoxesToast))
#define BOXES_TOAST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_TOAST, BoxesToastClass))
#define BOXES_IS_TOAST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_TOAST))
#define BOXES_IS_TOAST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_TOAST))
#define BOXES_TOAST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_TOAST, BoxesToastClass))

typedef struct _BoxesToast BoxesToast;
typedef struct _BoxesToastClass BoxesToastClass;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL)))

#define BOXES_TYPE_APP_WINDOW (boxes_app_window_get_type ())
#define BOXES_APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_APP_WINDOW, BoxesAppWindow))
#define BOXES_APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_APP_WINDOW, BoxesAppWindowClass))
#define BOXES_IS_APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_APP_WINDOW))
#define BOXES_IS_APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_APP_WINDOW))
#define BOXES_APP_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_APP_WINDOW, BoxesAppWindowClass))

typedef struct _BoxesAppWindow BoxesAppWindow;
typedef struct _BoxesAppWindowClass BoxesAppWindowClass;

#define BOXES_TYPE_UI (boxes_ui_get_type ())
#define BOXES_UI(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_UI, BoxesUI))
#define BOXES_IS_UI(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_UI))
#define BOXES_UI_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), BOXES_TYPE_UI, BoxesUIIface))

typedef struct _BoxesUI BoxesUI;
typedef struct _BoxesUIIface BoxesUIIface;
typedef enum  {
	BOXES_UI_STATE_NONE,
	BOXES_UI_STATE_COLLECTION,
	BOXES_UI_STATE_CREDS,
	BOXES_UI_STATE_DISPLAY,
	BOXES_UI_STATE_WIZARD,
	BOXES_UI_STATE_PROPERTIES,
	BOXES_UI_STATE_TROUBLESHOOT
} BoxesUIState;

#define BOXES_TYPE_UI_STATE (boxes_ui_state_get_type ())
typedef struct _Block61Data Block61Data;
typedef enum  {
	BOXES_MACHINE_CONNECT_FLAGS_NONE = 0,
	BOXES_MACHINE_CONNECT_FLAGS_IGNORE_SAVED_STATE = 1 << 0
} BoxesMachineConnectFlags;

#define BOXES_MACHINE_TYPE_CONNECT_FLAGS (boxes_machine_connect_flags_get_type ())
typedef struct _Block62Data Block62Data;
typedef void (*BoxesToastOKFunc) (gpointer user_data);
typedef void (*BoxesToastDismissFunc) (gpointer user_data);
typedef struct _BoxesToastPrivate BoxesToastPrivate;
enum  {
	BOXES_SNAPSHOT_LIST_ROW_DISPLAY_TOAST_SIGNAL,
	BOXES_SNAPSHOT_LIST_ROW_IS_CURRENT_SIGNAL,
	BOXES_SNAPSHOT_LIST_ROW_NUM_SIGNALS
};
static guint boxes_snapshot_list_row_signals[BOXES_SNAPSHOT_LIST_ROW_NUM_SIGNALS] = {0};

struct _BoxesSnapshotListRow {
	HdyActionRow parent_instance;
	BoxesSnapshotListRowPrivate * priv;
	GVirDomainSnapshot* snapshot;
};

struct _BoxesSnapshotListRowClass {
	HdyActionRowClass parent_class;
};

struct _BoxesSnapshotListRowPrivate {
	gchar* _activity_message;
	GtkLabel* name_label;
	GtkLabel* description_label;
	GtkStack* mode_stack;
	GtkEntry* name_entry;
	GtkBox* edit_name_box;
	GtkBox* show_name_box;
	BoxesLibvirtMachine* machine;
	GtkContainer* parent_container;
};

struct _BoxesUIIface {
	GTypeInterface parent_iface;
	BoxesUIState (*get_previous_ui_state) (BoxesUI* self);
	void (*set_previous_ui_state) (BoxesUI* self, BoxesUIState value);
	BoxesUIState (*get_ui_state) (BoxesUI* self);
	void (*set_ui_state) (BoxesUI* self, BoxesUIState value);
};

struct _Block61Data {
	int _ref_count_;
	BoxesSnapshotListRow* self;
	gulong restart_id;
};

struct _Block62Data {
	int _ref_count_;
	BoxesSnapshotListRow* self;
	BoxesSnapshotListRow* row;
};

struct _BoxesToast {
	GtkBox parent_instance;
	BoxesToastPrivate * priv;
	BoxesToastOKFunc undo_func;
	gpointer undo_func_target;
	GDestroyNotify undo_func_target_destroy_notify;
	BoxesToastDismissFunc dismiss_func;
	gpointer dismiss_func_target;
	GDestroyNotify dismiss_func_target_destroy_notify;
};

struct _BoxesToastClass {
	GtkBoxClass parent_class;
};

static gint BoxesSnapshotListRow_private_offset;
static gpointer boxes_snapshot_list_row_parent_class = NULL;

VALA_EXTERN GType boxes_snapshot_list_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesSnapshotListRow, g_object_unref)
VALA_EXTERN GType boxes_collection_item_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesCollectionItem, g_object_unref)
VALA_EXTERN GType boxes_machine_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesMachine, g_object_unref)
VALA_EXTERN GType boxes_libvirt_machine_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesLibvirtMachine, g_object_unref)
VALA_EXTERN BoxesSnapshotListRow* boxes_snapshot_list_row_new (GVirDomainSnapshot* snapshot,
                                                   BoxesLibvirtMachine* machine);
VALA_EXTERN BoxesSnapshotListRow* boxes_snapshot_list_row_construct (GType object_type,
                                                         GVirDomainSnapshot* snapshot,
                                                         BoxesLibvirtMachine* machine);
static void boxes_snapshot_list_row_setup_labels (BoxesSnapshotListRow* self,
                                           GVirConfigDomainSnapshot* config,
                                           const gchar* name);
VALA_EXTERN BoxesToast* boxes_toast_new (const gchar* message);
VALA_EXTERN BoxesToast* boxes_toast_construct (GType object_type,
                                   const gchar* message);
VALA_EXTERN GType boxes_toast_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesToast, g_object_unref)
static void boxes_snapshot_list_row_on_save_name_button_clicked (BoxesSnapshotListRow* self);
static void _boxes_snapshot_list_row_on_save_name_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                              gpointer self);
static void boxes_snapshot_list_row_on_revert_button_clicked (BoxesSnapshotListRow* self);
VALA_EXTERN void boxes_snapshot_list_row_set_activity_message (BoxesSnapshotListRow* self,
                                                   const gchar* value);
VALA_EXTERN GType boxes_app_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesAppWindow, g_object_unref)
VALA_EXTERN BoxesAppWindow* boxes_machine_get_window (BoxesMachine* self);
VALA_EXTERN GType boxes_ui_state_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType boxes_ui_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesUI, g_object_unref)
VALA_EXTERN BoxesUIState boxes_ui_get_previous_ui_state (BoxesUI* self);
static Block61Data* block61_data_ref (Block61Data* _data61_);
static void block61_data_unref (void * _userdata_);
VALA_EXTERN GVirDomain* boxes_libvirt_machine_get_domain (BoxesLibvirtMachine* self);
static void ___lambda80_ (Block61Data* _data61_);
VALA_EXTERN GType boxes_machine_connect_flags_get_type (void) G_GNUC_CONST ;
VALA_EXTERN void boxes_libvirt_machine_start (BoxesLibvirtMachine* self,
                                  BoxesMachineConnectFlags flags,
                                  GCancellable* cancellable,
                                  GAsyncReadyCallback _callback_,
                                  gpointer _user_data_);
VALA_EXTERN void boxes_libvirt_machine_start_finish (BoxesLibvirtMachine* self,
                                         GAsyncResult* _res_,
                                         GError** error);
static void ____lambda80__gvir_domain_stopped (GVirDomain* _sender,
                                        gpointer self);
static void __lambda81_ (BoxesSnapshotListRow* self,
                  GObject* obj,
                  GAsyncResult* res);
static void ___lambda81__gasync_ready_callback (GObject* source_object,
                                         GAsyncResult* res,
                                         gpointer self);
static void _boxes_snapshot_list_row_on_revert_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                           gpointer self);
static void boxes_snapshot_list_row_on_delete_button_clicked (BoxesSnapshotListRow* self);
static Block62Data* block62_data_ref (Block62Data* _data62_);
static void block62_data_unref (void * _userdata_);
static void __lambda82_ (Block62Data* _data62_);
static void ___lambda82__boxes_toast_ok_func (gpointer self);
static void __lambda83_ (Block62Data* _data62_);
static void __lambda84_ (BoxesSnapshotListRow* self,
                  GObject* obj,
                  GAsyncResult* res);
static void ___lambda84__gasync_ready_callback (GObject* source_object,
                                         GAsyncResult* res,
                                         gpointer self);
static void ___lambda83__boxes_toast_dismiss_func (gpointer self);
VALA_EXTERN void boxes_toast_set_message (BoxesToast* self,
                              const gchar* value);
VALA_EXTERN void boxes_toast_set_action (BoxesToast* self,
                             const gchar* value);
static void _boxes_snapshot_list_row_on_delete_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                           gpointer self);
static void boxes_snapshot_list_row_on_rename_button_clicked (BoxesSnapshotListRow* self);
static void _boxes_snapshot_list_row_on_rename_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                           gpointer self);
VALA_EXTERN const gchar* boxes_snapshot_list_row_get_activity_message (BoxesSnapshotListRow* self);
static GObject * boxes_snapshot_list_row_constructor (GType type,
                                               guint n_construct_properties,
                                               GObjectConstructParam * construct_properties);
static void _boxes_snapshot_list_row___lambda85_ (BoxesSnapshotListRow* self);
static void __boxes_snapshot_list_row___lambda85__gtk_widget_parent_set (GtkWidget* _sender,
                                                                  GtkWidget* previous_parent,
                                                                  gpointer self);
static void boxes_snapshot_list_row_finalize (GObject * obj);
static GType boxes_snapshot_list_row_get_type_once (void);
static void _vala_boxes_snapshot_list_row_get_property (GObject * object,
                                                 guint property_id,
                                                 GValue * value,
                                                 GParamSpec * pspec);
static void _vala_boxes_snapshot_list_row_set_property (GObject * object,
                                                 guint property_id,
                                                 const GValue * value,
                                                 GParamSpec * pspec);

static inline gpointer
boxes_snapshot_list_row_get_instance_private (BoxesSnapshotListRow* self)
{
	return G_STRUCT_MEMBER_P (self, BoxesSnapshotListRow_private_offset);
}

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

BoxesSnapshotListRow*
boxes_snapshot_list_row_construct (GType object_type,
                                   GVirDomainSnapshot* snapshot,
                                   BoxesLibvirtMachine* machine)
{
	BoxesSnapshotListRow * self = NULL;
	GVirDomainSnapshot* _tmp0_;
	BoxesLibvirtMachine* _tmp1_;
	GError* _inner_error0_ = NULL;
	g_return_val_if_fail (snapshot != NULL, NULL);
	g_return_val_if_fail (machine != NULL, NULL);
	self = (BoxesSnapshotListRow*) g_object_new (object_type, NULL);
	_tmp0_ = _g_object_ref0 (snapshot);
	_g_object_unref0 (self->snapshot);
	self->snapshot = _tmp0_;
	_tmp1_ = _g_object_ref0 (machine);
	_g_object_unref0 (self->priv->machine);
	self->priv->machine = _tmp1_;
	{
		GVirConfigDomainSnapshot* _tmp2_ = NULL;
		GVirConfigDomainSnapshot* _tmp3_;
		_tmp3_ = gvir_domain_snapshot_get_config (snapshot, (guint) 0, &_inner_error0_);
		_tmp2_ = _tmp3_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		boxes_snapshot_list_row_setup_labels (self, _tmp2_, NULL);
		_g_object_unref0 (_tmp2_);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp4_;
		const gchar* _tmp5_;
		GError* _tmp6_;
		const gchar* _tmp7_;
		BoxesToast* _tmp8_;
		BoxesToast* _tmp9_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp4_ = e;
		_tmp5_ = _tmp4_->message;
		g_critical ("snapshot-list-row.vala:46: %s", _tmp5_);
		_tmp6_ = e;
		_tmp7_ = _tmp6_->message;
		_tmp8_ = boxes_toast_new (_tmp7_);
		g_object_ref_sink (_tmp8_);
		_tmp9_ = _tmp8_;
		g_signal_emit (self, boxes_snapshot_list_row_signals[BOXES_SNAPSHOT_LIST_ROW_DISPLAY_TOAST_SIGNAL], 0, _tmp9_);
		_g_object_unref0 (_tmp9_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return NULL;
	}
	return self;
}

BoxesSnapshotListRow*
boxes_snapshot_list_row_new (GVirDomainSnapshot* snapshot,
                             BoxesLibvirtMachine* machine)
{
	return boxes_snapshot_list_row_construct (BOXES_TYPE_SNAPSHOT_LIST_ROW, snapshot, machine);
}

static void
boxes_snapshot_list_row_setup_labels (BoxesSnapshotListRow* self,
                                      GVirConfigDomainSnapshot* config,
                                      const gchar* name)
{
	const gchar* _tmp0_ = NULL;
	GtkLabel* _tmp2_;
	GDateTime* date = NULL;
	GDateTime* _tmp3_;
	gchar* date_string = NULL;
	GDateTime* _tmp4_;
	gchar* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (config != NULL);
	if (name == NULL) {
		const gchar* _tmp1_;
		_tmp1_ = gvir_config_domain_snapshot_get_description (config);
		_tmp0_ = _tmp1_;
	} else {
		_tmp0_ = name;
	}
	_tmp2_ = self->priv->name_label;
	gtk_label_set_label (_tmp2_, _tmp0_);
	_tmp3_ = g_date_time_new_from_unix_local ((gint64) gvir_config_domain_snapshot_get_creation_time (config));
	date = _tmp3_;
	_tmp4_ = date;
	_tmp5_ = g_date_time_format (_tmp4_, "%x, %X");
	date_string = _tmp5_;
	_tmp6_ = date_string;
	_tmp7_ = gvir_config_domain_snapshot_get_description (config);
	if (g_strcmp0 (_tmp6_, _tmp7_) != 0) {
		GtkLabel* _tmp8_;
		GtkLabel* _tmp9_;
		const gchar* _tmp10_;
		_tmp8_ = self->priv->description_label;
		gtk_widget_set_visible ((GtkWidget*) _tmp8_, TRUE);
		_tmp9_ = self->priv->description_label;
		_tmp10_ = date_string;
		gtk_label_set_label (_tmp9_, _tmp10_);
	}
	_g_free0 (date_string);
	_g_date_time_unref0 (date);
}

static void
boxes_snapshot_list_row_on_save_name_button_clicked (BoxesSnapshotListRow* self)
{
	gchar* name = NULL;
	GtkEntry* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->name_entry;
	_tmp1_ = gtk_entry_get_text (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strdup (_tmp2_);
	name = _tmp3_;
	{
		GVirConfigDomainSnapshot* config = NULL;
		GVirDomainSnapshot* _tmp4_;
		GVirConfigDomainSnapshot* _tmp5_;
		GVirConfigDomainSnapshot* _tmp6_;
		const gchar* _tmp7_;
		GVirDomainSnapshot* _tmp8_;
		GVirConfigDomainSnapshot* _tmp9_;
		GVirConfigDomainSnapshot* _tmp10_;
		const gchar* _tmp11_;
		GtkStack* _tmp12_;
		GtkBox* _tmp13_;
		_tmp4_ = self->snapshot;
		_tmp5_ = gvir_domain_snapshot_get_config (_tmp4_, (guint) 0, &_inner_error0_);
		config = _tmp5_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp6_ = config;
		_tmp7_ = name;
		gvir_config_domain_snapshot_set_description (_tmp6_, _tmp7_);
		_tmp8_ = self->snapshot;
		_tmp9_ = config;
		gvir_domain_snapshot_set_config (_tmp8_, _tmp9_, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_object_unref0 (config);
			goto __catch0_g_error;
		}
		_tmp10_ = config;
		_tmp11_ = name;
		boxes_snapshot_list_row_setup_labels (self, _tmp10_, _tmp11_);
		_tmp12_ = self->priv->mode_stack;
		_tmp13_ = self->priv->show_name_box;
		gtk_stack_set_visible_child (_tmp12_, (GtkWidget*) _tmp13_);
		_g_object_unref0 (config);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		const gchar* _tmp14_;
		GError* _tmp15_;
		const gchar* _tmp16_;
		GError* _tmp17_;
		const gchar* _tmp18_;
		gchar* _tmp19_;
		gchar* _tmp20_;
		BoxesToast* _tmp21_;
		BoxesToast* _tmp22_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp14_ = name;
		_tmp15_ = e;
		_tmp16_ = _tmp15_->message;
		g_warning ("snapshot-list-row.vala:74: Failed to rename snapshot to %s: %s", _tmp14_, _tmp16_);
		_tmp17_ = e;
		_tmp18_ = _tmp17_->message;
		_tmp19_ = g_strdup_printf (_ ("Failed to rename snapshot: %s"), _tmp18_);
		_tmp20_ = _tmp19_;
		_tmp21_ = boxes_toast_new (_tmp20_);
		g_object_ref_sink (_tmp21_);
		_tmp22_ = _tmp21_;
		g_signal_emit (self, boxes_snapshot_list_row_signals[BOXES_SNAPSHOT_LIST_ROW_DISPLAY_TOAST_SIGNAL], 0, _tmp22_);
		_g_object_unref0 (_tmp22_);
		_g_free0 (_tmp20_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		_g_free0 (name);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
	_g_free0 (name);
}

static void
_boxes_snapshot_list_row_on_save_name_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                         gpointer self)
{
	boxes_snapshot_list_row_on_save_name_button_clicked ((BoxesSnapshotListRow*) self);
}

static Block61Data*
block61_data_ref (Block61Data* _data61_)
{
	g_atomic_int_inc (&_data61_->_ref_count_);
	return _data61_;
}

static void
block61_data_unref (void * _userdata_)
{
	Block61Data* _data61_;
	_data61_ = (Block61Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data61_->_ref_count_)) {
		BoxesSnapshotListRow* self;
		self = _data61_->self;
		_g_object_unref0 (self);
		g_slice_free (Block61Data, _data61_);
	}
}

static void
___lambda80_ (Block61Data* _data61_)
{
	BoxesSnapshotListRow* self;
	BoxesLibvirtMachine* _tmp0_;
	BoxesLibvirtMachine* _tmp1_;
	GVirDomain* _tmp2_;
	GVirDomain* _tmp3_;
	self = _data61_->self;
	_tmp0_ = self->priv->machine;
	boxes_libvirt_machine_start (_tmp0_, BOXES_MACHINE_CONNECT_FLAGS_NONE, NULL, NULL, NULL);
	_tmp1_ = self->priv->machine;
	_tmp2_ = boxes_libvirt_machine_get_domain (_tmp1_);
	_tmp3_ = _tmp2_;
	g_signal_handler_disconnect ((GObject*) _tmp3_, _data61_->restart_id);
}

static void
____lambda80__gvir_domain_stopped (GVirDomain* _sender,
                                   gpointer self)
{
	___lambda80_ (self);
}

static void
__lambda81_ (BoxesSnapshotListRow* self,
             GObject* obj,
             GAsyncResult* res)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (res != NULL);
	{
		GVirDomainSnapshot* _tmp0_;
		GtkContainer* _tmp1_;
		_tmp0_ = self->snapshot;
		gvir_domain_snapshot_revert_to_finish (_tmp0_, res, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp1_ = self->priv->parent_container;
		gtk_widget_queue_draw ((GtkWidget*) _tmp1_);
		g_signal_emit (self, boxes_snapshot_list_row_signals[BOXES_SNAPSHOT_LIST_ROW_IS_CURRENT_SIGNAL], 0);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp2_;
		const gchar* _tmp3_;
		GError* _tmp4_;
		const gchar* _tmp5_;
		gchar* _tmp6_;
		gchar* _tmp7_;
		BoxesToast* _tmp8_;
		BoxesToast* _tmp9_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp2_ = e;
		_tmp3_ = _tmp2_->message;
		g_warning ("snapshot-list-row.vala:112: %s", _tmp3_);
		_tmp4_ = e;
		_tmp5_ = _tmp4_->message;
		_tmp6_ = g_strdup_printf (_ ("Failed to revert to snapshot: %s"), _tmp5_);
		_tmp7_ = _tmp6_;
		_tmp8_ = boxes_toast_new (_tmp7_);
		g_object_ref_sink (_tmp8_);
		_tmp9_ = _tmp8_;
		g_signal_emit (self, boxes_snapshot_list_row_signals[BOXES_SNAPSHOT_LIST_ROW_DISPLAY_TOAST_SIGNAL], 0, _tmp9_);
		_g_object_unref0 (_tmp9_);
		_g_free0 (_tmp7_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
	boxes_snapshot_list_row_set_activity_message (self, NULL);
}

static void
___lambda81__gasync_ready_callback (GObject* source_object,
                                    GAsyncResult* res,
                                    gpointer self)
{
	__lambda81_ ((BoxesSnapshotListRow*) self, source_object, res);
	g_object_unref (self);
}

static void
boxes_snapshot_list_row_on_revert_button_clicked (BoxesSnapshotListRow* self)
{
	gchar* snapshot_name = NULL;
	GVirDomainSnapshot* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	GVirConfigDomainSnapshotDomainState snapshot_state = 0;
	const gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gboolean _tmp10_ = FALSE;
	BoxesLibvirtMachine* _tmp11_;
	BoxesAppWindow* _tmp12_;
	BoxesAppWindow* _tmp13_;
	BoxesUIState _tmp14_;
	BoxesUIState _tmp15_;
	GVirDomainSnapshot* _tmp20_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->snapshot;
	_tmp1_ = gvir_domain_snapshot_get_name (_tmp0_);
	_tmp2_ = g_strdup (_tmp1_);
	snapshot_name = _tmp2_;
	snapshot_state = GVIR_CONFIG_DOMAIN_SNAPSHOT_DOMAIN_STATE_NOSTATE;
	{
		GVirConfigDomainSnapshot* snapshot_config = NULL;
		GVirDomainSnapshot* _tmp3_;
		GVirConfigDomainSnapshot* _tmp4_;
		const gchar* _tmp5_;
		gchar* _tmp6_;
		_tmp3_ = self->snapshot;
		_tmp4_ = gvir_domain_snapshot_get_config (_tmp3_, (guint) 0, &_inner_error0_);
		snapshot_config = _tmp4_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp5_ = gvir_config_domain_snapshot_get_description (snapshot_config);
		_tmp6_ = g_strdup (_tmp5_);
		_g_free0 (snapshot_name);
		snapshot_name = _tmp6_;
		snapshot_state = gvir_config_domain_snapshot_get_state (snapshot_config);
		_g_object_unref0 (snapshot_config);
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_inner_error0_);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		_g_free0 (snapshot_name);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
	_tmp7_ = snapshot_name;
	_tmp8_ = g_strdup_printf (_ ("Reverting to %s…"), _tmp7_);
	_tmp9_ = _tmp8_;
	boxes_snapshot_list_row_set_activity_message (self, _tmp9_);
	_g_free0 (_tmp9_);
	_tmp11_ = self->priv->machine;
	_tmp12_ = boxes_machine_get_window ((BoxesMachine*) _tmp11_);
	_tmp13_ = _tmp12_;
	_tmp14_ = boxes_ui_get_previous_ui_state ((BoxesUI*) _tmp13_);
	_tmp15_ = _tmp14_;
	if (_tmp15_ == BOXES_UI_STATE_DISPLAY) {
		_tmp10_ = snapshot_state == GVIR_CONFIG_DOMAIN_SNAPSHOT_DOMAIN_STATE_SHUTOFF;
	} else {
		_tmp10_ = FALSE;
	}
	if (_tmp10_) {
		Block61Data* _data61_;
		BoxesLibvirtMachine* _tmp16_;
		GVirDomain* _tmp17_;
		GVirDomain* _tmp18_;
		gulong _tmp19_;
		_data61_ = g_slice_new0 (Block61Data);
		_data61_->_ref_count_ = 1;
		_data61_->self = g_object_ref (self);
		_data61_->restart_id = (gulong) 0;
		_tmp16_ = self->priv->machine;
		_tmp17_ = boxes_libvirt_machine_get_domain (_tmp16_);
		_tmp18_ = _tmp17_;
		_tmp19_ = g_signal_connect_data (_tmp18_, "stopped", (GCallback) ____lambda80__gvir_domain_stopped, block61_data_ref (_data61_), (GClosureNotify) block61_data_unref, 0);
		_data61_->restart_id = _tmp19_;
		block61_data_unref (_data61_);
		_data61_ = NULL;
	}
	_tmp20_ = self->snapshot;
	gvir_domain_snapshot_revert_to_async (_tmp20_, (guint) 0, NULL, ___lambda81__gasync_ready_callback, g_object_ref (self));
	_g_free0 (snapshot_name);
}

static void
_boxes_snapshot_list_row_on_revert_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                      gpointer self)
{
	boxes_snapshot_list_row_on_revert_button_clicked ((BoxesSnapshotListRow*) self);
}

static Block62Data*
block62_data_ref (Block62Data* _data62_)
{
	g_atomic_int_inc (&_data62_->_ref_count_);
	return _data62_;
}

static void
block62_data_unref (void * _userdata_)
{
	Block62Data* _data62_;
	_data62_ = (Block62Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data62_->_ref_count_)) {
		BoxesSnapshotListRow* self;
		self = _data62_->self;
		_g_object_unref0 (_data62_->row);
		_g_object_unref0 (self);
		g_slice_free (Block62Data, _data62_);
	}
}

static void
__lambda82_ (Block62Data* _data62_)
{
	BoxesSnapshotListRow* self;
	GtkContainer* _tmp0_;
	self = _data62_->self;
	_tmp0_ = self->priv->parent_container;
	gtk_container_add (_tmp0_, (GtkWidget*) self);
	_g_object_unref0 (_data62_->row);
	_data62_->row = NULL;
}

static void
___lambda82__boxes_toast_ok_func (gpointer self)
{
	__lambda82_ (self);
}

static void
__lambda84_ (BoxesSnapshotListRow* self,
             GObject* obj,
             GAsyncResult* res)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (res != NULL);
	{
		GVirDomainSnapshot* _tmp0_;
		GtkContainer* _tmp1_;
		_tmp0_ = self->snapshot;
		gvir_domain_snapshot_delete_finish (_tmp0_, res, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp1_ = self->priv->parent_container;
		gtk_widget_queue_draw ((GtkWidget*) _tmp1_);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GVirDomainSnapshot* _tmp2_;
		const gchar* _tmp3_;
		GError* _tmp4_;
		const gchar* _tmp5_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp2_ = self->snapshot;
		_tmp3_ = gvir_domain_snapshot_get_name (_tmp2_);
		_tmp4_ = e;
		_tmp5_ = _tmp4_->message;
		g_warning ("snapshot-list-row.vala:149: Error while deleting snapshot %s: %s", _tmp3_, _tmp5_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

static void
___lambda84__gasync_ready_callback (GObject* source_object,
                                    GAsyncResult* res,
                                    gpointer self)
{
	__lambda84_ ((BoxesSnapshotListRow*) self, source_object, res);
	g_object_unref (self);
}

static void
__lambda83_ (Block62Data* _data62_)
{
	BoxesSnapshotListRow* self;
	GVirDomainSnapshot* _tmp0_;
	self = _data62_->self;
	_tmp0_ = self->snapshot;
	gvir_domain_snapshot_delete_async (_tmp0_, (guint) 0, NULL, ___lambda84__gasync_ready_callback, g_object_ref (self));
	_g_object_unref0 (_data62_->row);
	_data62_->row = NULL;
}

static void
___lambda83__boxes_toast_dismiss_func (gpointer self)
{
	__lambda83_ (self);
}

static void
boxes_snapshot_list_row_on_delete_button_clicked (BoxesSnapshotListRow* self)
{
	Block62Data* _data62_;
	gchar* snapshot_identifier = NULL;
	GVirDomainSnapshot* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* message = NULL;
	const gchar* _tmp11_;
	gchar* _tmp12_;
	GtkContainer* _tmp13_;
	BoxesSnapshotListRow* _tmp14_;
	GtkContainer* _tmp15_;
	BoxesToastOKFunc undo = NULL;
	gpointer undo_target;
	GDestroyNotify undo_target_destroy_notify;
	BoxesToastDismissFunc really_remove = NULL;
	gpointer really_remove_target;
	GDestroyNotify really_remove_target_destroy_notify;
	gchar* _tmp16_;
	gchar* _tmp17_;
	BoxesToastOKFunc _tmp18_;
	gpointer _tmp18__target;
	GDestroyNotify _tmp18__target_destroy_notify;
	BoxesToastDismissFunc _tmp19_;
	gpointer _tmp19__target;
	GDestroyNotify _tmp19__target_destroy_notify;
	BoxesToast* _tmp20_ = NULL;
	BoxesToast* _tmp21_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	_data62_ = g_slice_new0 (Block62Data);
	_data62_->_ref_count_ = 1;
	_data62_->self = g_object_ref (self);
	_tmp0_ = self->snapshot;
	_tmp1_ = gvir_domain_snapshot_get_name (_tmp0_);
	_tmp2_ = g_strdup (_tmp1_);
	snapshot_identifier = _tmp2_;
	{
		GVirConfigDomainSnapshot* config = NULL;
		GVirDomainSnapshot* _tmp3_;
		GVirConfigDomainSnapshot* _tmp4_;
		const gchar* _tmp5_;
		gchar* _tmp6_;
		_tmp3_ = self->snapshot;
		_tmp4_ = gvir_domain_snapshot_get_config (_tmp3_, (guint) 0, &_inner_error0_);
		config = _tmp4_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp5_ = gvir_config_domain_snapshot_get_description (config);
		_tmp6_ = g_strdup (_tmp5_);
		_g_free0 (snapshot_identifier);
		snapshot_identifier = _tmp6_;
		_g_object_unref0 (config);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GVirDomainSnapshot* _tmp7_;
		const gchar* _tmp8_;
		GError* _tmp9_;
		const gchar* _tmp10_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp7_ = self->snapshot;
		_tmp8_ = gvir_domain_snapshot_get_name (_tmp7_);
		_tmp9_ = e;
		_tmp10_ = _tmp9_->message;
		g_warning ("snapshot-list-row.vala:129: Could not get configuration of snapshot %s" \
": %s", _tmp8_, _tmp10_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		_g_free0 (snapshot_identifier);
		block62_data_unref (_data62_);
		_data62_ = 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;
	}
	_tmp11_ = snapshot_identifier;
	_tmp12_ = g_strdup_printf (_ ("Snapshot “%s” deleted."), _tmp11_);
	message = _tmp12_;
	_tmp13_ = gtk_widget_get_parent ((GtkWidget*) self);
	self->priv->parent_container = G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, gtk_container_get_type (), GtkContainer);
	_tmp14_ = _g_object_ref0 (self);
	_data62_->row = _tmp14_;
	_tmp15_ = self->priv->parent_container;
	gtk_container_remove (_tmp15_, (GtkWidget*) self);
	undo = ___lambda82__boxes_toast_ok_func;
	undo_target = block62_data_ref (_data62_);
	undo_target_destroy_notify = block62_data_unref;
	really_remove = ___lambda83__boxes_toast_dismiss_func;
	really_remove_target = block62_data_ref (_data62_);
	really_remove_target_destroy_notify = block62_data_unref;
	_tmp16_ = g_strdup (message);
	_tmp17_ = g_strdup (_ ("Undo"));
	_tmp18_ = undo;
	_tmp18__target = undo_target;
	_tmp18__target_destroy_notify = undo_target_destroy_notify;
	undo = NULL;
	undo_target = NULL;
	undo_target_destroy_notify = NULL;
	_tmp19_ = really_remove;
	_tmp19__target = really_remove_target;
	_tmp19__target_destroy_notify = really_remove_target_destroy_notify;
	really_remove = NULL;
	really_remove_target = NULL;
	really_remove_target_destroy_notify = NULL;
	_tmp20_ = boxes_toast_new (NULL);
	boxes_toast_set_message (_tmp20_, _tmp16_);
	_g_free0 (_tmp16_);
	boxes_toast_set_action (_tmp20_, _tmp17_);
	_g_free0 (_tmp17_);
	(_tmp20_->undo_func_target_destroy_notify == NULL) ? NULL : (_tmp20_->undo_func_target_destroy_notify (_tmp20_->undo_func_target), NULL);
	_tmp20_->undo_func = NULL;
	_tmp20_->undo_func_target = NULL;
	_tmp20_->undo_func_target_destroy_notify = NULL;
	_tmp20_->undo_func = _tmp18_;
	_tmp20_->undo_func_target = _tmp18__target;
	_tmp20_->undo_func_target_destroy_notify = _tmp18__target_destroy_notify;
	(_tmp20_->dismiss_func_target_destroy_notify == NULL) ? NULL : (_tmp20_->dismiss_func_target_destroy_notify (_tmp20_->dismiss_func_target), NULL);
	_tmp20_->dismiss_func = NULL;
	_tmp20_->dismiss_func_target = NULL;
	_tmp20_->dismiss_func_target_destroy_notify = NULL;
	_tmp20_->dismiss_func = _tmp19_;
	_tmp20_->dismiss_func_target = _tmp19__target;
	_tmp20_->dismiss_func_target_destroy_notify = _tmp19__target_destroy_notify;
	g_object_ref_sink (_tmp20_);
	_tmp21_ = _tmp20_;
	g_signal_emit (self, boxes_snapshot_list_row_signals[BOXES_SNAPSHOT_LIST_ROW_DISPLAY_TOAST_SIGNAL], 0, _tmp21_);
	_g_object_unref0 (_tmp21_);
	(really_remove_target_destroy_notify == NULL) ? NULL : (really_remove_target_destroy_notify (really_remove_target), NULL);
	really_remove = NULL;
	really_remove_target = NULL;
	really_remove_target_destroy_notify = NULL;
	(undo_target_destroy_notify == NULL) ? NULL : (undo_target_destroy_notify (undo_target), NULL);
	undo = NULL;
	undo_target = NULL;
	undo_target_destroy_notify = NULL;
	_g_free0 (message);
	_g_free0 (snapshot_identifier);
	block62_data_unref (_data62_);
	_data62_ = NULL;
}

static void
_boxes_snapshot_list_row_on_delete_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                      gpointer self)
{
	boxes_snapshot_list_row_on_delete_button_clicked ((BoxesSnapshotListRow*) self);
}

static void
boxes_snapshot_list_row_on_rename_button_clicked (BoxesSnapshotListRow* self)
{
	GtkEntry* _tmp0_;
	GtkLabel* _tmp1_;
	const gchar* _tmp2_;
	GtkStack* _tmp3_;
	GtkBox* _tmp4_;
	GtkEntry* _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->name_entry;
	_tmp1_ = self->priv->name_label;
	_tmp2_ = gtk_label_get_text (_tmp1_);
	gtk_entry_set_text (_tmp0_, _tmp2_);
	_tmp3_ = self->priv->mode_stack;
	_tmp4_ = self->priv->edit_name_box;
	gtk_stack_set_visible_child (_tmp3_, (GtkWidget*) _tmp4_);
	_tmp5_ = self->priv->name_entry;
	gtk_widget_grab_focus ((GtkWidget*) _tmp5_);
}

static void
_boxes_snapshot_list_row_on_rename_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                      gpointer self)
{
	boxes_snapshot_list_row_on_rename_button_clicked ((BoxesSnapshotListRow*) self);
}

const gchar*
boxes_snapshot_list_row_get_activity_message (BoxesSnapshotListRow* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_activity_message;
	result = _tmp0_;
	return result;
}

void
boxes_snapshot_list_row_set_activity_message (BoxesSnapshotListRow* self,
                                              const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = boxes_snapshot_list_row_get_activity_message (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_activity_message);
		self->priv->_activity_message = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, boxes_snapshot_list_row_properties[BOXES_SNAPSHOT_LIST_ROW_ACTIVITY_MESSAGE_PROPERTY]);
	}
}

static void
_boxes_snapshot_list_row___lambda85_ (BoxesSnapshotListRow* self)
{
	GtkContainer* parent = NULL;
	GtkContainer* _tmp0_;
	GtkContainer* _tmp1_;
	GtkContainer* _tmp2_;
	GtkContainer* _tmp3_;
	_tmp0_ = gtk_widget_get_parent ((GtkWidget*) self);
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, gtk_container_get_type ()) ? ((GtkContainer*) _tmp0_) : NULL);
	parent = _tmp1_;
	_tmp2_ = parent;
	if (_tmp2_ == NULL) {
		_g_object_unref0 (parent);
		return;
	}
	_tmp3_ = parent;
	self->priv->parent_container = _tmp3_;
	_g_object_unref0 (parent);
}

static void
__boxes_snapshot_list_row___lambda85__gtk_widget_parent_set (GtkWidget* _sender,
                                                             GtkWidget* previous_parent,
                                                             gpointer self)
{
	_boxes_snapshot_list_row___lambda85_ ((BoxesSnapshotListRow*) self);
}

static GObject *
boxes_snapshot_list_row_constructor (GType type,
                                     guint n_construct_properties,
                                     GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	BoxesSnapshotListRow * self;
	parent_class = G_OBJECT_CLASS (boxes_snapshot_list_row_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_SNAPSHOT_LIST_ROW, BoxesSnapshotListRow);
	g_signal_connect_object ((GtkWidget*) self, "parent-set", (GCallback) __boxes_snapshot_list_row___lambda85__gtk_widget_parent_set, self, 0);
	return obj;
}

static void
boxes_snapshot_list_row_class_init (BoxesSnapshotListRowClass * klass,
                                    gpointer klass_data)
{
	boxes_snapshot_list_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &BoxesSnapshotListRow_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_boxes_snapshot_list_row_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_boxes_snapshot_list_row_set_property;
	G_OBJECT_CLASS (klass)->constructor = boxes_snapshot_list_row_constructor;
	G_OBJECT_CLASS (klass)->finalize = boxes_snapshot_list_row_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_SNAPSHOT_LIST_ROW_ACTIVITY_MESSAGE_PROPERTY, boxes_snapshot_list_row_properties[BOXES_SNAPSHOT_LIST_ROW_ACTIVITY_MESSAGE_PROPERTY] = g_param_spec_string ("activity-message", "activity-message", "activity-message", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/Boxes/ui/preferences/snapshot-list-row.ui");
	boxes_snapshot_list_row_signals[BOXES_SNAPSHOT_LIST_ROW_DISPLAY_TOAST_SIGNAL] = g_signal_new ("display-toast", BOXES_TYPE_SNAPSHOT_LIST_ROW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, BOXES_TYPE_TOAST);
	boxes_snapshot_list_row_signals[BOXES_SNAPSHOT_LIST_ROW_IS_CURRENT_SIGNAL] = g_signal_new ("is-current", BOXES_TYPE_SNAPSHOT_LIST_ROW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "name_label", FALSE, BoxesSnapshotListRow_private_offset + G_STRUCT_OFFSET (BoxesSnapshotListRowPrivate, name_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "description_label", FALSE, BoxesSnapshotListRow_private_offset + G_STRUCT_OFFSET (BoxesSnapshotListRowPrivate, description_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "mode_stack", FALSE, BoxesSnapshotListRow_private_offset + G_STRUCT_OFFSET (BoxesSnapshotListRowPrivate, mode_stack));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "name_entry", FALSE, BoxesSnapshotListRow_private_offset + G_STRUCT_OFFSET (BoxesSnapshotListRowPrivate, name_entry));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "edit_name_box", FALSE, BoxesSnapshotListRow_private_offset + G_STRUCT_OFFSET (BoxesSnapshotListRowPrivate, edit_name_box));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "show_name_box", FALSE, BoxesSnapshotListRow_private_offset + G_STRUCT_OFFSET (BoxesSnapshotListRowPrivate, show_name_box));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_save_name_button_clicked", G_CALLBACK(_boxes_snapshot_list_row_on_save_name_button_clicked_gtk_button_clicked));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_revert_button_clicked", G_CALLBACK(_boxes_snapshot_list_row_on_revert_button_clicked_gtk_button_clicked));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_delete_button_clicked", G_CALLBACK(_boxes_snapshot_list_row_on_delete_button_clicked_gtk_button_clicked));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_rename_button_clicked", G_CALLBACK(_boxes_snapshot_list_row_on_rename_button_clicked_gtk_button_clicked));
}

static void
boxes_snapshot_list_row_instance_init (BoxesSnapshotListRow * self,
                                       gpointer klass)
{
	gchar* _tmp0_;
	self->priv = boxes_snapshot_list_row_get_instance_private (self);
	_tmp0_ = g_strdup ("");
	self->priv->_activity_message = _tmp0_;
	self->priv->parent_container = NULL;
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
boxes_snapshot_list_row_finalize (GObject * obj)
{
	BoxesSnapshotListRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_SNAPSHOT_LIST_ROW, BoxesSnapshotListRow);
	_g_object_unref0 (self->snapshot);
	_g_free0 (self->priv->_activity_message);
	_g_object_unref0 (self->priv->machine);
	G_OBJECT_CLASS (boxes_snapshot_list_row_parent_class)->finalize (obj);
}

static GType
boxes_snapshot_list_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (BoxesSnapshotListRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_snapshot_list_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesSnapshotListRow), 0, (GInstanceInitFunc) boxes_snapshot_list_row_instance_init, NULL };
	GType boxes_snapshot_list_row_type_id;
	boxes_snapshot_list_row_type_id = g_type_register_static (hdy_action_row_get_type (), "BoxesSnapshotListRow", &g_define_type_info, 0);
	BoxesSnapshotListRow_private_offset = g_type_add_instance_private (boxes_snapshot_list_row_type_id, sizeof (BoxesSnapshotListRowPrivate));
	return boxes_snapshot_list_row_type_id;
}

GType
boxes_snapshot_list_row_get_type (void)
{
	static volatile gsize boxes_snapshot_list_row_type_id__once = 0;
	if (g_once_init_enter (&boxes_snapshot_list_row_type_id__once)) {
		GType boxes_snapshot_list_row_type_id;
		boxes_snapshot_list_row_type_id = boxes_snapshot_list_row_get_type_once ();
		g_once_init_leave (&boxes_snapshot_list_row_type_id__once, boxes_snapshot_list_row_type_id);
	}
	return boxes_snapshot_list_row_type_id__once;
}

static void
_vala_boxes_snapshot_list_row_get_property (GObject * object,
                                            guint property_id,
                                            GValue * value,
                                            GParamSpec * pspec)
{
	BoxesSnapshotListRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_SNAPSHOT_LIST_ROW, BoxesSnapshotListRow);
	switch (property_id) {
		case BOXES_SNAPSHOT_LIST_ROW_ACTIVITY_MESSAGE_PROPERTY:
		g_value_set_string (value, boxes_snapshot_list_row_get_activity_message (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_boxes_snapshot_list_row_set_property (GObject * object,
                                            guint property_id,
                                            const GValue * value,
                                            GParamSpec * pspec)
{
	BoxesSnapshotListRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_SNAPSHOT_LIST_ROW, BoxesSnapshotListRow);
	switch (property_id) {
		case BOXES_SNAPSHOT_LIST_ROW_ACTIVITY_MESSAGE_PROPERTY:
		boxes_snapshot_list_row_set_activity_message (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

