/* transfer-info-row.c generated by valac 0.39.5, the Vala compiler
 * generated from transfer-info-row.vala, do not modify */

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

#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <float.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gi18n-lib.h>


#define BOXES_TYPE_TRANSFER_INFO_ROW (boxes_transfer_info_row_get_type ())
#define BOXES_TRANSFER_INFO_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_TRANSFER_INFO_ROW, BoxesTransferInfoRow))
#define BOXES_TRANSFER_INFO_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_TRANSFER_INFO_ROW, BoxesTransferInfoRowClass))
#define BOXES_IS_TRANSFER_INFO_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_TRANSFER_INFO_ROW))
#define BOXES_IS_TRANSFER_INFO_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_TRANSFER_INFO_ROW))
#define BOXES_TRANSFER_INFO_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_TRANSFER_INFO_ROW, BoxesTransferInfoRowClass))

typedef struct _BoxesTransferInfoRow BoxesTransferInfoRow;
typedef struct _BoxesTransferInfoRowClass BoxesTransferInfoRowClass;
typedef struct _BoxesTransferInfoRowPrivate BoxesTransferInfoRowPrivate;
enum  {
	BOXES_TRANSFER_INFO_ROW_0_PROPERTY,
	BOXES_TRANSFER_INFO_ROW_PROGRESS_PROPERTY,
	BOXES_TRANSFER_INFO_ROW_TRANSFERRED_BYTES_PROPERTY,
	BOXES_TRANSFER_INFO_ROW_TOTAL_BYTES_PROPERTY,
	BOXES_TRANSFER_INFO_ROW_NUM_PROPERTIES
};
static GParamSpec* boxes_transfer_info_row_properties[BOXES_TRANSFER_INFO_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))
enum  {
	BOXES_TRANSFER_INFO_ROW_FINISHED_SIGNAL,
	BOXES_TRANSFER_INFO_ROW_NUM_SIGNALS
};
static guint boxes_transfer_info_row_signals[BOXES_TRANSFER_INFO_ROW_NUM_SIGNALS] = {0};

struct _BoxesTransferInfoRow {
	GtkGrid parent_instance;
	BoxesTransferInfoRowPrivate * priv;
};

struct _BoxesTransferInfoRowClass {
	GtkGridClass parent_class;
};

struct _BoxesTransferInfoRowPrivate {
	GtkLabel* status_label;
	GtkLabel* details_label;
	GtkButton* cancel_button;
	GtkProgressBar* progress_bar;
	GtkImage* done_image;
	gdouble _progress;
	guint64 _total_bytes;
};


static gpointer boxes_transfer_info_row_parent_class = NULL;

GType boxes_transfer_info_row_get_type (void) G_GNUC_CONST;
#define BOXES_TRANSFER_INFO_ROW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BOXES_TYPE_TRANSFER_INFO_ROW, BoxesTransferInfoRowPrivate))
BoxesTransferInfoRow* boxes_transfer_info_row_new (const gchar* name);
BoxesTransferInfoRow* boxes_transfer_info_row_construct (GType object_type,
                                                         const gchar* name);
void boxes_transfer_info_row_set_progress (BoxesTransferInfoRow* self,
                                           gdouble value);
static gchar* boxes_transfer_info_row_trim_string (BoxesTransferInfoRow* self,
                                            const gchar* s);
static void __lambda78_ (BoxesTransferInfoRow* self);
void boxes_transfer_info_row_finalize_transfer (BoxesTransferInfoRow* self);
static void ___lambda78__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
gdouble boxes_transfer_info_row_get_progress (BoxesTransferInfoRow* self);
void boxes_transfer_info_row_set_transferred_bytes (BoxesTransferInfoRow* self,
                                                    guint64 value);
guint64 boxes_transfer_info_row_get_total_bytes (BoxesTransferInfoRow* self);
void boxes_transfer_info_row_set_total_bytes (BoxesTransferInfoRow* self,
                                              guint64 value);
static void boxes_transfer_info_row_finalize (GObject * obj);
static void _vala_boxes_transfer_info_row_get_property (GObject * object,
                                                 guint property_id,
                                                 GValue * value,
                                                 GParamSpec * pspec);
static void _vala_boxes_transfer_info_row_set_property (GObject * object,
                                                 guint property_id,
                                                 const GValue * value,
                                                 GParamSpec * pspec);


static void
__lambda78_ (BoxesTransferInfoRow* self)
{
#line 36 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	boxes_transfer_info_row_finalize_transfer (self);
#line 37 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	g_signal_emit (self, boxes_transfer_info_row_signals[BOXES_TRANSFER_INFO_ROW_FINISHED_SIGNAL], 0);
#line 102 "transfer-info-row.c"
}


static void
___lambda78__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
#line 35 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	__lambda78_ ((BoxesTransferInfoRow*) self);
#line 112 "transfer-info-row.c"
}


BoxesTransferInfoRow*
boxes_transfer_info_row_construct (GType object_type,
                                   const gchar* name)
{
	BoxesTransferInfoRow * self = NULL;
	gchar* msg = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	GtkLabel* _tmp6_;
	GtkProgressBar* _tmp7_;
	GtkButton* _tmp8_;
#line 27 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 27 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	self = (BoxesTransferInfoRow*) g_object_new (object_type, NULL);
#line 28 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	boxes_transfer_info_row_set_progress (self, (gdouble) 0);
#line 31 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	_tmp0_ = boxes_transfer_info_row_trim_string (self, name);
#line 31 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	_tmp1_ = _tmp0_;
#line 31 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	_tmp2_ = g_strdup_printf ("Copying “%s” to “Downloads”", _tmp1_);
#line 31 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	_tmp3_ = _tmp2_;
#line 31 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	_tmp4_ = g_strdup (_ (_tmp3_));
#line 31 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	_tmp5_ = _tmp4_;
#line 31 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	_g_free0 (_tmp3_);
#line 31 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	_g_free0 (_tmp1_);
#line 31 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	msg = _tmp5_;
#line 32 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	_tmp6_ = self->priv->status_label;
#line 32 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	gtk_label_set_text (_tmp6_, msg);
#line 34 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	_tmp7_ = self->priv->progress_bar;
#line 34 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	g_object_bind_property_with_closures ((GObject*) self, "progress", (GObject*) _tmp7_, "fraction", G_BINDING_BIDIRECTIONAL, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
#line 35 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	_tmp8_ = self->priv->cancel_button;
#line 35 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	g_signal_connect_object (_tmp8_, "clicked", (GCallback) ___lambda78__gtk_button_clicked, self, 0);
#line 27 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	_g_free0 (msg);
#line 27 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	return self;
#line 171 "transfer-info-row.c"
}


BoxesTransferInfoRow*
boxes_transfer_info_row_new (const gchar* name)
{
#line 27 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	return boxes_transfer_info_row_construct (BOXES_TYPE_TRANSFER_INFO_ROW, name);
#line 180 "transfer-info-row.c"
}


void
boxes_transfer_info_row_finalize_transfer (BoxesTransferInfoRow* self)
{
	GtkButton* _tmp0_;
	GtkImage* _tmp1_;
	GtkButton* _tmp2_;
	GtkButton* _tmp3_;
#line 41 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	g_return_if_fail (self != NULL);
#line 42 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	_tmp0_ = self->priv->cancel_button;
#line 42 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	_tmp1_ = self->priv->done_image;
#line 42 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	gtk_button_set_image (_tmp0_, (GtkWidget*) _tmp1_);
#line 43 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	_tmp2_ = self->priv->cancel_button;
#line 43 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	gtk_widget_set_sensitive ((GtkWidget*) _tmp2_, FALSE);
#line 44 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	_tmp3_ = self->priv->cancel_button;
#line 44 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	gtk_widget_queue_draw ((GtkWidget*) _tmp3_);
#line 207 "transfer-info-row.c"
}


static glong
string_strnlen (gchar* str,
                glong maxlen)
{
	glong result = 0L;
	gchar* end = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
#line 1336 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
	_tmp0_ = memchr (str, 0, (gsize) maxlen);
#line 1336 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
	end = _tmp0_;
#line 1337 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
	_tmp1_ = end;
#line 1337 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
	if (_tmp1_ == NULL) {
#line 1338 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
		result = maxlen;
#line 1338 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
		return result;
#line 231 "transfer-info-row.c"
	} else {
		gchar* _tmp2_;
#line 1340 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
		_tmp2_ = end;
#line 1340 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
		result = (glong) (_tmp2_ - str);
#line 1340 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
		return result;
#line 240 "transfer-info-row.c"
	}
}


static gchar*
string_substring (const gchar* self,
                  glong offset,
                  glong len)
{
	gchar* result = NULL;
	glong string_length = 0L;
	gboolean _tmp0_ = FALSE;
	glong _tmp6_;
	gchar* _tmp7_;
#line 1347 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, NULL);
#line 1349 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
	if (offset >= ((glong) 0)) {
#line 1349 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
		_tmp0_ = len >= ((glong) 0);
#line 261 "transfer-info-row.c"
	} else {
#line 1349 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
		_tmp0_ = FALSE;
#line 265 "transfer-info-row.c"
	}
#line 1349 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
	if (_tmp0_) {
#line 1351 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
		string_length = string_strnlen ((gchar*) self, offset + len);
#line 271 "transfer-info-row.c"
	} else {
		gint _tmp1_;
		gint _tmp2_;
#line 1353 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
		_tmp1_ = strlen (self);
#line 1353 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
		_tmp2_ = _tmp1_;
#line 1353 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
		string_length = (glong) _tmp2_;
#line 281 "transfer-info-row.c"
	}
#line 1356 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
	if (offset < ((glong) 0)) {
#line 285 "transfer-info-row.c"
		glong _tmp3_;
#line 1357 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
		_tmp3_ = string_length;
#line 1357 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
		offset = _tmp3_ + offset;
#line 1358 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
		g_return_val_if_fail (offset >= ((glong) 0), NULL);
#line 293 "transfer-info-row.c"
	} else {
		glong _tmp4_;
#line 1360 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
		_tmp4_ = string_length;
#line 1360 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
		g_return_val_if_fail (offset <= _tmp4_, NULL);
#line 300 "transfer-info-row.c"
	}
#line 1362 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
	if (len < ((glong) 0)) {
#line 304 "transfer-info-row.c"
		glong _tmp5_;
#line 1363 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
		_tmp5_ = string_length;
#line 1363 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
		len = _tmp5_ - offset;
#line 310 "transfer-info-row.c"
	}
#line 1365 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
	_tmp6_ = string_length;
#line 1365 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
	g_return_val_if_fail ((offset + len) <= _tmp6_, NULL);
#line 1366 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
	_tmp7_ = g_strndup (((gchar*) self) + offset, (gsize) len);
#line 1366 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
	result = _tmp7_;
#line 1366 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
	return result;
#line 322 "transfer-info-row.c"
}


static gchar*
boxes_transfer_info_row_trim_string (BoxesTransferInfoRow* self,
                                     const gchar* s)
{
	gchar* result = NULL;
	gint _tmp0_;
	gint _tmp1_;
	gchar* _tmp10_;
#line 47 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 47 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	g_return_val_if_fail (s != NULL, NULL);
#line 48 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	_tmp0_ = strlen (s);
#line 48 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	_tmp1_ = _tmp0_;
#line 48 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	if (_tmp1_ > 23) {
#line 344 "transfer-info-row.c"
		gchar* _tmp2_;
		gchar* _tmp3_;
		gchar* _tmp4_;
		gchar* _tmp5_;
		gchar* _tmp6_;
		gchar* _tmp7_;
		gchar* _tmp8_;
		gchar* _tmp9_;
#line 49 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
		_tmp2_ = string_substring (s, (glong) 0, (glong) 15);
#line 49 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
		_tmp3_ = _tmp2_;
#line 49 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
		_tmp4_ = g_strconcat (_tmp3_, "…", NULL);
#line 49 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
		_tmp5_ = _tmp4_;
#line 49 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
		_tmp6_ = string_substring (s, (glong) -4, (glong) -1);
#line 49 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
		_tmp7_ = _tmp6_;
#line 49 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
		_tmp8_ = g_strconcat (_tmp5_, _tmp7_, NULL);
#line 49 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
		_tmp9_ = _tmp8_;
#line 49 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
		_g_free0 (_tmp7_);
#line 49 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
		_g_free0 (_tmp5_);
#line 49 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
		_g_free0 (_tmp3_);
#line 49 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
		result = _tmp9_;
#line 49 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
		return result;
#line 379 "transfer-info-row.c"
	}
#line 51 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	_tmp10_ = g_strdup (s);
#line 51 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	result = _tmp10_;
#line 51 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	return result;
#line 387 "transfer-info-row.c"
}


gdouble
boxes_transfer_info_row_get_progress (BoxesTransferInfoRow* self)
{
	gdouble result;
	gdouble _tmp0_;
#line 19 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	g_return_val_if_fail (self != NULL, 0.0);
#line 19 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	_tmp0_ = self->priv->_progress;
#line 19 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	result = _tmp0_;
#line 19 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	return result;
#line 404 "transfer-info-row.c"
}


void
boxes_transfer_info_row_set_progress (BoxesTransferInfoRow* self,
                                      gdouble value)
{
#line 19 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	g_return_if_fail (self != NULL);
#line 19 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	if (boxes_transfer_info_row_get_progress (self) != value) {
#line 19 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
		self->priv->_progress = value;
#line 19 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
		g_object_notify_by_pspec ((GObject *) self, boxes_transfer_info_row_properties[BOXES_TRANSFER_INFO_ROW_PROGRESS_PROPERTY]);
#line 420 "transfer-info-row.c"
	}
}


void
boxes_transfer_info_row_set_transferred_bytes (BoxesTransferInfoRow* self,
                                               guint64 value)
{
	GtkLabel* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	guint64 _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
#line 21 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	g_return_if_fail (self != NULL);
#line 22 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	_tmp0_ = self->priv->details_label;
#line 22 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	_tmp1_ = g_format_size_full (value, G_FORMAT_SIZE_DEFAULT);
#line 22 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	_tmp2_ = _tmp1_;
#line 22 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	_tmp3_ = self->priv->_total_bytes;
#line 22 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	_tmp4_ = g_format_size_full (_tmp3_, G_FORMAT_SIZE_DEFAULT);
#line 22 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	_tmp5_ = _tmp4_;
#line 22 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	_tmp6_ = g_strdup_printf ("%s / %s", _tmp2_, _tmp5_);
#line 22 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	_tmp7_ = _tmp6_;
#line 22 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	gtk_label_set_text (_tmp0_, _tmp7_);
#line 22 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	_g_free0 (_tmp7_);
#line 22 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	_g_free0 (_tmp5_);
#line 22 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	_g_free0 (_tmp2_);
#line 21 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	g_object_notify_by_pspec ((GObject *) self, boxes_transfer_info_row_properties[BOXES_TRANSFER_INFO_ROW_TRANSFERRED_BYTES_PROPERTY]);
#line 465 "transfer-info-row.c"
}


guint64
boxes_transfer_info_row_get_total_bytes (BoxesTransferInfoRow* self)
{
	guint64 result;
	guint64 _tmp0_;
#line 25 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	g_return_val_if_fail (self != NULL, 0ULL);
#line 25 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	_tmp0_ = self->priv->_total_bytes;
#line 25 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	result = _tmp0_;
#line 25 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	return result;
#line 482 "transfer-info-row.c"
}


void
boxes_transfer_info_row_set_total_bytes (BoxesTransferInfoRow* self,
                                         guint64 value)
{
#line 25 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	g_return_if_fail (self != NULL);
#line 25 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	if (boxes_transfer_info_row_get_total_bytes (self) != value) {
#line 25 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
		self->priv->_total_bytes = value;
#line 25 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
		g_object_notify_by_pspec ((GObject *) self, boxes_transfer_info_row_properties[BOXES_TRANSFER_INFO_ROW_TOTAL_BYTES_PROPERTY]);
#line 498 "transfer-info-row.c"
	}
}


static void
boxes_transfer_info_row_class_init (BoxesTransferInfoRowClass * klass)
{
	gint BoxesTransferInfoRow_private_offset;
#line 5 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	boxes_transfer_info_row_parent_class = g_type_class_peek_parent (klass);
#line 5 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	g_type_class_add_private (klass, sizeof (BoxesTransferInfoRowPrivate));
#line 5 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_boxes_transfer_info_row_get_property;
#line 5 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_boxes_transfer_info_row_set_property;
#line 5 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	G_OBJECT_CLASS (klass)->finalize = boxes_transfer_info_row_finalize;
#line 5 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_TRANSFER_INFO_ROW_PROGRESS_PROPERTY, boxes_transfer_info_row_properties[BOXES_TRANSFER_INFO_ROW_PROGRESS_PROPERTY] = g_param_spec_double ("progress", "progress", "progress", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 5 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_TRANSFER_INFO_ROW_TRANSFERRED_BYTES_PROPERTY, boxes_transfer_info_row_properties[BOXES_TRANSFER_INFO_ROW_TRANSFERRED_BYTES_PROPERTY] = g_param_spec_uint64 ("transferred-bytes", "transferred-bytes", "transferred-bytes", 0, G_MAXUINT64, 0U, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_WRITABLE));
#line 5 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_TRANSFER_INFO_ROW_TOTAL_BYTES_PROPERTY, boxes_transfer_info_row_properties[BOXES_TRANSFER_INFO_ROW_TOTAL_BYTES_PROPERTY] = g_param_spec_uint64 ("total-bytes", "total-bytes", "total-bytes", 0, G_MAXUINT64, 0U, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 5 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	BoxesTransferInfoRow_private_offset = g_type_class_get_instance_private_offset (klass);
#line 5 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/Boxes/ui/transfer-info-row.ui");
#line 5 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	boxes_transfer_info_row_signals[BOXES_TRANSFER_INFO_ROW_FINISHED_SIGNAL] = g_signal_new ("finished", BOXES_TYPE_TRANSFER_INFO_ROW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
#line 5 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "status_label", FALSE, BoxesTransferInfoRow_private_offset + G_STRUCT_OFFSET (BoxesTransferInfoRowPrivate, status_label));
#line 5 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "details_label", FALSE, BoxesTransferInfoRow_private_offset + G_STRUCT_OFFSET (BoxesTransferInfoRowPrivate, details_label));
#line 5 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "cancel_button", FALSE, BoxesTransferInfoRow_private_offset + G_STRUCT_OFFSET (BoxesTransferInfoRowPrivate, cancel_button));
#line 5 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "progress_bar", FALSE, BoxesTransferInfoRow_private_offset + G_STRUCT_OFFSET (BoxesTransferInfoRowPrivate, progress_bar));
#line 5 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "done_image", FALSE, BoxesTransferInfoRow_private_offset + G_STRUCT_OFFSET (BoxesTransferInfoRowPrivate, done_image));
#line 539 "transfer-info-row.c"
}


static void
boxes_transfer_info_row_instance_init (BoxesTransferInfoRow * self)
{
#line 5 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	self->priv = BOXES_TRANSFER_INFO_ROW_GET_PRIVATE (self);
#line 5 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	gtk_widget_init_template (GTK_WIDGET (self));
#line 550 "transfer-info-row.c"
}


static void
boxes_transfer_info_row_finalize (GObject * obj)
{
	BoxesTransferInfoRow * self;
#line 5 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_TRANSFER_INFO_ROW, BoxesTransferInfoRow);
#line 7 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	_g_object_unref0 (self->priv->status_label);
#line 9 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	_g_object_unref0 (self->priv->details_label);
#line 11 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	_g_object_unref0 (self->priv->cancel_button);
#line 13 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	_g_object_unref0 (self->priv->progress_bar);
#line 15 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	_g_object_unref0 (self->priv->done_image);
#line 5 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	G_OBJECT_CLASS (boxes_transfer_info_row_parent_class)->finalize (obj);
#line 572 "transfer-info-row.c"
}


GType
boxes_transfer_info_row_get_type (void)
{
	static volatile gsize boxes_transfer_info_row_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_transfer_info_row_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesTransferInfoRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_transfer_info_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesTransferInfoRow), 0, (GInstanceInitFunc) boxes_transfer_info_row_instance_init, NULL };
		GType boxes_transfer_info_row_type_id;
		boxes_transfer_info_row_type_id = g_type_register_static (gtk_grid_get_type (), "BoxesTransferInfoRow", &g_define_type_info, 0);
		g_once_init_leave (&boxes_transfer_info_row_type_id__volatile, boxes_transfer_info_row_type_id);
	}
	return boxes_transfer_info_row_type_id__volatile;
}


static void
_vala_boxes_transfer_info_row_get_property (GObject * object,
                                            guint property_id,
                                            GValue * value,
                                            GParamSpec * pspec)
{
	BoxesTransferInfoRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_TRANSFER_INFO_ROW, BoxesTransferInfoRow);
#line 5 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	switch (property_id) {
#line 5 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
		case BOXES_TRANSFER_INFO_ROW_PROGRESS_PROPERTY:
#line 5 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
		g_value_set_double (value, boxes_transfer_info_row_get_progress (self));
#line 5 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
		break;
#line 5 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
		case BOXES_TRANSFER_INFO_ROW_TOTAL_BYTES_PROPERTY:
#line 5 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
		g_value_set_uint64 (value, boxes_transfer_info_row_get_total_bytes (self));
#line 5 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
		break;
#line 612 "transfer-info-row.c"
		default:
#line 5 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 5 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
		break;
#line 618 "transfer-info-row.c"
	}
}


static void
_vala_boxes_transfer_info_row_set_property (GObject * object,
                                            guint property_id,
                                            const GValue * value,
                                            GParamSpec * pspec)
{
	BoxesTransferInfoRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_TRANSFER_INFO_ROW, BoxesTransferInfoRow);
#line 5 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
	switch (property_id) {
#line 5 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
		case BOXES_TRANSFER_INFO_ROW_PROGRESS_PROPERTY:
#line 5 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
		boxes_transfer_info_row_set_progress (self, g_value_get_double (value));
#line 5 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
		break;
#line 5 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
		case BOXES_TRANSFER_INFO_ROW_TRANSFERRED_BYTES_PROPERTY:
#line 5 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
		boxes_transfer_info_row_set_transferred_bytes (self, g_value_get_uint64 (value));
#line 5 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
		break;
#line 5 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
		case BOXES_TRANSFER_INFO_ROW_TOTAL_BYTES_PROPERTY:
#line 5 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
		boxes_transfer_info_row_set_total_bytes (self, g_value_get_uint64 (value));
#line 5 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
		break;
#line 651 "transfer-info-row.c"
		default:
#line 5 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 5 "/home/fborges/checkout/gnome-boxes/src/transfer-info-row.vala"
		break;
#line 657 "transfer-info-row.c"
	}
}



