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

/* -*- Mode: vala; indent-tabs-mode: nil; tab-width: 4 -*-*/
/*-
 * Copyright 2015 - 2022 elementary, Inc. (https://elementary.io)
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 3 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
 * Boston, MA 02110-1301, USA.
 *
 * Authored by: Corentin Noël <corentin@elementary.io>
 */

#include "io.elementary.settings.printers.h"
#include <gtk/gtk.h>
#include <glib-object.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gi18n-lib.h>
#include <granite-7.h>
#include <pango/pango.h>
#include <float.h>
#include <math.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

enum  {
	PRINTERS_PRINTER_ROW_0_PROPERTY,
	PRINTERS_PRINTER_ROW_PRINTER_PROPERTY,
	PRINTERS_PRINTER_ROW_NUM_PROPERTIES
};
static GParamSpec* printers_printer_row_properties[PRINTERS_PRINTER_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))

struct _PrintersPrinterRowPrivate {
	PrintersPrinter* _printer;
	GtkImage* printer_image;
	GtkImage* status_image;
	GtkLabel* name_label;
	GtkLabel* status_label;
};

static gint PrintersPrinterRow_private_offset;
static gpointer printers_printer_row_parent_class = NULL;

static void printers_printer_row_update_status (PrintersPrinterRow* self);
static GObject * printers_printer_row_constructor (GType type,
                                            guint n_construct_properties,
                                            GObjectConstructParam * construct_properties);
static void _printers_printer_row___lambda23_ (PrintersPrinterRow* self);
static void __printers_printer_row___lambda23__g_object_notify (GObject* _sender,
                                                         GParamSpec* pspec,
                                                         gpointer self);
static void _printers_printer_row___lambda24_ (PrintersPrinterRow* self);
static void __printers_printer_row___lambda24__gtk_button_clicked (GtkButton* _sender,
                                                            gpointer self);
static void _printers_printer_row___lambda25_ (PrintersPrinterRow* self);
static void __printers_printer_row___lambda25__printers_printer_deleted (PrintersPrinter* _sender,
                                                                  gpointer self);
static void printers_printer_row_finalize (GObject * obj);
static GType printers_printer_row_get_type_once (void);
static void _vala_printers_printer_row_get_property (GObject * object,
                                              guint property_id,
                                              GValue * value,
                                              GParamSpec * pspec);
static void _vala_printers_printer_row_set_property (GObject * object,
                                              guint property_id,
                                              const GValue * value,
                                              GParamSpec * pspec);

static inline gpointer
printers_printer_row_get_instance_private (PrintersPrinterRow* self)
{
	return G_STRUCT_MEMBER_P (self, PrintersPrinterRow_private_offset);
}

PrintersPrinterRow*
printers_printer_row_construct (GType object_type,
                                PrintersPrinter* printer)
{
	PrintersPrinterRow * self = NULL;
	g_return_val_if_fail (printer != NULL, NULL);
	self = (PrintersPrinterRow*) g_object_new (object_type, "printer", printer, NULL);
	return self;
}

PrintersPrinterRow*
printers_printer_row_new (PrintersPrinter* printer)
{
	return printers_printer_row_construct (PRINTERS_TYPE_PRINTER_ROW, printer);
}

static void
printers_printer_row_update_status (PrintersPrinterRow* self)
{
	PrintersPrinter* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_printer;
	_tmp1_ = printers_printer_get_is_enabled (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		GtkLabel* _tmp3_;
		PrintersPrinter* _tmp4_;
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		PrintersPrinter* _tmp7_;
		const gchar* _tmp8_;
		const gchar* _tmp9_;
		const gchar* _tmp10_;
		GQuark _tmp12_ = 0U;
		static GQuark _tmp11_label0 = 0;
		static GQuark _tmp11_label1 = 0;
		static GQuark _tmp11_label2 = 0;
		static GQuark _tmp11_label3 = 0;
		static GQuark _tmp11_label4 = 0;
		static GQuark _tmp11_label5 = 0;
		static GQuark _tmp11_label6 = 0;
		static GQuark _tmp11_label7 = 0;
		static GQuark _tmp11_label8 = 0;
		_tmp3_ = self->priv->status_label;
		_tmp4_ = self->priv->_printer;
		_tmp5_ = printers_printer_get_state_reasons (_tmp4_);
		_tmp6_ = _tmp5_;
		gtk_label_set_label (_tmp3_, _tmp6_);
		_tmp7_ = self->priv->_printer;
		_tmp8_ = printers_printer_get_state_reasons_raw (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = _tmp9_;
		_tmp12_ = (NULL == _tmp10_) ? 0 : g_quark_from_string (_tmp10_);
		if (_tmp12_ == ((0 != _tmp11_label0) ? _tmp11_label0 : (_tmp11_label0 = g_quark_from_static_string ("offline")))) {
			switch (0) {
				default:
				{
					GtkImage* _tmp13_;
					_tmp13_ = self->priv->status_image;
					g_object_set (_tmp13_, "icon-name", "emblem-disabled", NULL);
					break;
				}
			}
		} else if ((_tmp12_ == ((0 != _tmp11_label1) ? _tmp11_label1 : (_tmp11_label1 = g_quark_from_static_string ("none")))) || (_tmp12_ == ((0 != _tmp11_label2) ? _tmp11_label2 : (_tmp11_label2 = g_quark_from_static_string (NULL))))) {
			switch (0) {
				default:
				{
					GtkImage* _tmp14_;
					_tmp14_ = self->priv->status_image;
					g_object_set (_tmp14_, "icon-name", "emblem-enabled", NULL);
					break;
				}
			}
		} else if ((((((_tmp12_ == ((0 != _tmp11_label3) ? _tmp11_label3 : (_tmp11_label3 = g_quark_from_static_string ("developer-low")))) || (_tmp12_ == ((0 != _tmp11_label4) ? _tmp11_label4 : (_tmp11_label4 = g_quark_from_static_string ("marker-supply-low"))))) || (_tmp12_ == ((0 != _tmp11_label5) ? _tmp11_label5 : (_tmp11_label5 = g_quark_from_static_string ("marker-waste-almost-full"))))) || (_tmp12_ == ((0 != _tmp11_label6) ? _tmp11_label6 : (_tmp11_label6 = g_quark_from_static_string ("media-low"))))) || (_tmp12_ == ((0 != _tmp11_label7) ? _tmp11_label7 : (_tmp11_label7 = g_quark_from_static_string ("opc-near-eol"))))) || (_tmp12_ == ((0 != _tmp11_label8) ? _tmp11_label8 : (_tmp11_label8 = g_quark_from_static_string ("toner-low"))))) {
			switch (0) {
				default:
				{
					GtkImage* _tmp15_;
					_tmp15_ = self->priv->status_image;
					g_object_set (_tmp15_, "icon-name", "emblem-warning", NULL);
					break;
				}
			}
		} else {
			switch (0) {
				default:
				{
					GtkImage* _tmp16_;
					_tmp16_ = self->priv->status_image;
					g_object_set (_tmp16_, "icon-name", "emblem-error", NULL);
					break;
				}
			}
		}
	} else {
		GtkImage* _tmp17_;
		GtkLabel* _tmp18_;
		_tmp17_ = self->priv->status_image;
		g_object_set (_tmp17_, "icon-name", "emblem-disabled", NULL);
		_tmp18_ = self->priv->status_label;
		gtk_label_set_label (_tmp18_, _ ("Disabled"));
	}
}

PrintersPrinter*
printers_printer_row_get_printer (PrintersPrinterRow* self)
{
	PrintersPrinter* result;
	PrintersPrinter* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_printer;
	result = _tmp0_;
	return result;
}

static void
printers_printer_row_set_printer (PrintersPrinterRow* self,
                                  PrintersPrinter* value)
{
	PrintersPrinter* old_value;
	g_return_if_fail (self != NULL);
	old_value = printers_printer_row_get_printer (self);
	if (old_value != value) {
		self->priv->_printer = value;
		g_object_notify_by_pspec ((GObject *) self, printers_printer_row_properties[PRINTERS_PRINTER_ROW_PRINTER_PROPERTY]);
	}
}

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

static void
_printers_printer_row___lambda23_ (PrintersPrinterRow* self)
{
	printers_printer_row_update_status (self);
}

static void
__printers_printer_row___lambda23__g_object_notify (GObject* _sender,
                                                    GParamSpec* pspec,
                                                    gpointer self)
{
	_printers_printer_row___lambda23_ ((PrintersPrinterRow*) self);
}

static void
_printers_printer_row___lambda24_ (PrintersPrinterRow* self)
{
	PrintersRemoveDialog* remove_dialog = NULL;
	PrintersPrinter* _tmp0_;
	GtkRoot* _tmp1_;
	GtkWindow* _tmp2_;
	PrintersRemoveDialog* _tmp3_ = NULL;
	PrintersRemoveDialog* _tmp4_;
	_tmp0_ = self->priv->_printer;
	_tmp1_ = gtk_widget_get_root ((GtkWidget*) self);
	_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_window_get_type (), GtkWindow));
	_tmp3_ = printers_remove_dialog_new (_tmp0_);
	gtk_window_set_transient_for ((GtkWindow*) _tmp3_, _tmp2_);
	_g_object_unref0 (_tmp2_);
	g_object_ref_sink (_tmp3_);
	remove_dialog = _tmp3_;
	_tmp4_ = remove_dialog;
	gtk_window_present ((GtkWindow*) _tmp4_);
	_g_object_unref0 (remove_dialog);
}

static void
__printers_printer_row___lambda24__gtk_button_clicked (GtkButton* _sender,
                                                       gpointer self)
{
	_printers_printer_row___lambda24_ ((PrintersPrinterRow*) self);
}

static void
_printers_printer_row___lambda25_ (PrintersPrinterRow* self)
{
	PrintersPrinterPage* _tmp0_;
	_tmp0_ = self->page;
	g_signal_emit_by_name ((GtkWidget*) _tmp0_, "destroy");
	g_signal_emit_by_name ((GtkWidget*) self, "destroy");
}

static void
__printers_printer_row___lambda25__printers_printer_deleted (PrintersPrinter* _sender,
                                                             gpointer self)
{
	_printers_printer_row___lambda25_ ((PrintersPrinterRow*) self);
}

static GObject *
printers_printer_row_constructor (GType type,
                                  guint n_construct_properties,
                                  GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	PrintersPrinterRow * self;
	GtkButton* remove_button = NULL;
	gchar* _tmp0_;
	GtkButton* _tmp1_ = NULL;
	GtkButton* _tmp2_;
	GtkLabel* _tmp3_ = NULL;
	GtkLabel* _tmp4_;
	GtkLabel* _tmp5_ = NULL;
	GtkLabel* _tmp6_;
	GtkImage* _tmp7_;
	GtkImage* _tmp8_;
	GtkImage* _tmp9_ = NULL;
	GtkOverlay* overlay = NULL;
	GtkImage* _tmp10_;
	GtkWidget* _tmp11_;
	GtkOverlay* _tmp12_ = NULL;
	GtkOverlay* _tmp13_;
	GtkImage* _tmp14_;
	GtkGrid* grid = NULL;
	GtkGrid* _tmp15_ = NULL;
	GtkGrid* _tmp16_;
	GtkOverlay* _tmp17_;
	GtkGrid* _tmp18_;
	GtkLabel* _tmp19_;
	GtkGrid* _tmp20_;
	GtkLabel* _tmp21_;
	GtkGrid* _tmp22_;
	GtkButton* _tmp23_;
	GtkGrid* _tmp24_;
	PrintersPrinter* _tmp25_;
	PrintersPrinterPage* _tmp26_;
	PrintersPrinter* _tmp27_;
	PrintersPrinter* _tmp28_;
	GtkLabel* _tmp29_;
	PrintersPrinter* _tmp30_;
	GtkButton* _tmp31_;
	PrintersPrinter* _tmp32_;
	parent_class = G_OBJECT_CLASS (printers_printer_row_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PRINTERS_TYPE_PRINTER_ROW, PrintersPrinterRow);
	_tmp0_ = g_strdup (_ ("Remove this printer"));
	_tmp1_ = (GtkButton*) gtk_button_new_from_icon_name ("edit-delete-symbolic");
	gtk_widget_set_valign ((GtkWidget*) _tmp1_, GTK_ALIGN_CENTER);
	gtk_widget_set_halign ((GtkWidget*) _tmp1_, GTK_ALIGN_END);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp1_, TRUE);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp1_, _tmp0_);
	_g_free0 (_tmp0_);
	g_object_ref_sink (_tmp1_);
	remove_button = _tmp1_;
	_tmp2_ = remove_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp2_, GRANITE_STYLE_CLASS_FLAT);
	_tmp3_ = (GtkLabel*) gtk_label_new (NULL);
	gtk_label_set_ellipsize (_tmp3_, PANGO_ELLIPSIZE_END);
	gtk_label_set_xalign (_tmp3_, (gfloat) 0);
	g_object_ref_sink (_tmp3_);
	_g_object_unref0 (self->priv->name_label);
	self->priv->name_label = _tmp3_;
	_tmp4_ = self->priv->name_label;
	gtk_widget_add_css_class ((GtkWidget*) _tmp4_, GRANITE_STYLE_CLASS_H3_LABEL);
	_tmp5_ = (GtkLabel*) gtk_label_new (NULL);
	gtk_label_set_ellipsize (_tmp5_, PANGO_ELLIPSIZE_END);
	gtk_label_set_xalign (_tmp5_, (gfloat) 0);
	g_object_ref_sink (_tmp5_);
	_g_object_unref0 (self->priv->status_label);
	self->priv->status_label = _tmp5_;
	_tmp6_ = self->priv->status_label;
	gtk_widget_add_css_class ((GtkWidget*) _tmp6_, GRANITE_STYLE_CLASS_SMALL_LABEL);
	_tmp7_ = (GtkImage*) gtk_image_new_from_icon_name ("printer");
	g_object_ref_sink (_tmp7_);
	_g_object_unref0 (self->priv->printer_image);
	self->priv->printer_image = _tmp7_;
	_tmp8_ = self->priv->printer_image;
	gtk_widget_add_css_class ((GtkWidget*) _tmp8_, GRANITE_STYLE_CLASS_LARGE_ICONS);
	_tmp9_ = (GtkImage*) gtk_image_new_from_icon_name ("emblem-enabled");
	gtk_widget_set_halign ((GtkWidget*) _tmp9_, GTK_ALIGN_END);
	gtk_widget_set_valign ((GtkWidget*) _tmp9_, GTK_ALIGN_END);
	g_object_ref_sink (_tmp9_);
	_g_object_unref0 (self->priv->status_image);
	self->priv->status_image = _tmp9_;
	_tmp10_ = self->priv->printer_image;
	_tmp11_ = _g_object_ref0 ((GtkWidget*) _tmp10_);
	_tmp12_ = (GtkOverlay*) gtk_overlay_new ();
	gtk_overlay_set_child (_tmp12_, _tmp11_);
	_g_object_unref0 (_tmp11_);
	g_object_ref_sink (_tmp12_);
	overlay = _tmp12_;
	_tmp13_ = overlay;
	_tmp14_ = self->priv->status_image;
	gtk_overlay_add_overlay (_tmp13_, (GtkWidget*) _tmp14_);
	_tmp15_ = (GtkGrid*) gtk_grid_new ();
	gtk_grid_set_column_spacing (_tmp15_, 6);
	g_object_ref_sink (_tmp15_);
	grid = _tmp15_;
	_tmp16_ = grid;
	_tmp17_ = overlay;
	gtk_grid_attach (_tmp16_, (GtkWidget*) _tmp17_, 0, 0, 1, 2);
	_tmp18_ = grid;
	_tmp19_ = self->priv->name_label;
	gtk_grid_attach (_tmp18_, (GtkWidget*) _tmp19_, 1, 0, 1, 1);
	_tmp20_ = grid;
	_tmp21_ = self->priv->status_label;
	gtk_grid_attach (_tmp20_, (GtkWidget*) _tmp21_, 1, 1, 1, 1);
	_tmp22_ = grid;
	_tmp23_ = remove_button;
	gtk_grid_attach (_tmp22_, (GtkWidget*) _tmp23_, 2, 0, 2, 2);
	_tmp24_ = grid;
	gtk_list_box_row_set_child ((GtkListBoxRow*) self, (GtkWidget*) _tmp24_);
	_tmp25_ = self->priv->_printer;
	_tmp26_ = printers_printer_page_new (_tmp25_);
	g_object_ref_sink (_tmp26_);
	_g_object_unref0 (self->page);
	self->page = _tmp26_;
	_tmp27_ = self->priv->_printer;
	g_object_bind_property_with_closures ((GObject*) _tmp27_, "info", (GObject*) self, "tooltip-text", G_BINDING_SYNC_CREATE, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp28_ = self->priv->_printer;
	_tmp29_ = self->priv->name_label;
	g_object_bind_property_with_closures ((GObject*) _tmp28_, "info", (GObject*) _tmp29_, "label", G_BINDING_SYNC_CREATE, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp30_ = self->priv->_printer;
	g_signal_connect_object ((GObject*) _tmp30_, "notify::state", (GCallback) __printers_printer_row___lambda23__g_object_notify, self, 0);
	_tmp31_ = remove_button;
	g_signal_connect_object (_tmp31_, "clicked", (GCallback) __printers_printer_row___lambda24__gtk_button_clicked, self, 0);
	_tmp32_ = self->priv->_printer;
	g_signal_connect_object (_tmp32_, "deleted", (GCallback) __printers_printer_row___lambda25__printers_printer_deleted, self, 0);
	printers_printer_row_update_status (self);
	_g_object_unref0 (grid);
	_g_object_unref0 (overlay);
	_g_object_unref0 (remove_button);
	return obj;
}

static void
printers_printer_row_class_init (PrintersPrinterRowClass * klass,
                                 gpointer klass_data)
{
	printers_printer_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &PrintersPrinterRow_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_printers_printer_row_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_printers_printer_row_set_property;
	G_OBJECT_CLASS (klass)->constructor = printers_printer_row_constructor;
	G_OBJECT_CLASS (klass)->finalize = printers_printer_row_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PRINTERS_PRINTER_ROW_PRINTER_PROPERTY, printers_printer_row_properties[PRINTERS_PRINTER_ROW_PRINTER_PROPERTY] = g_param_spec_object ("printer", "printer", "printer", PRINTERS_TYPE_PRINTER, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
}

static void
printers_printer_row_instance_init (PrintersPrinterRow * self,
                                    gpointer klass)
{
	self->priv = printers_printer_row_get_instance_private (self);
}

static void
printers_printer_row_finalize (GObject * obj)
{
	PrintersPrinterRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PRINTERS_TYPE_PRINTER_ROW, PrintersPrinterRow);
	_g_object_unref0 (self->page);
	_g_object_unref0 (self->priv->printer_image);
	_g_object_unref0 (self->priv->status_image);
	_g_object_unref0 (self->priv->name_label);
	_g_object_unref0 (self->priv->status_label);
	G_OBJECT_CLASS (printers_printer_row_parent_class)->finalize (obj);
}

static GType
printers_printer_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (PrintersPrinterRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) printers_printer_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PrintersPrinterRow), 0, (GInstanceInitFunc) printers_printer_row_instance_init, NULL };
	GType printers_printer_row_type_id;
	printers_printer_row_type_id = g_type_register_static (gtk_list_box_row_get_type (), "PrintersPrinterRow", &g_define_type_info, 0);
	PrintersPrinterRow_private_offset = g_type_add_instance_private (printers_printer_row_type_id, sizeof (PrintersPrinterRowPrivate));
	return printers_printer_row_type_id;
}

GType
printers_printer_row_get_type (void)
{
	static volatile gsize printers_printer_row_type_id__once = 0;
	if (g_once_init_enter (&printers_printer_row_type_id__once)) {
		GType printers_printer_row_type_id;
		printers_printer_row_type_id = printers_printer_row_get_type_once ();
		g_once_init_leave (&printers_printer_row_type_id__once, printers_printer_row_type_id);
	}
	return printers_printer_row_type_id__once;
}

static void
_vala_printers_printer_row_get_property (GObject * object,
                                         guint property_id,
                                         GValue * value,
                                         GParamSpec * pspec)
{
	PrintersPrinterRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PRINTERS_TYPE_PRINTER_ROW, PrintersPrinterRow);
	switch (property_id) {
		case PRINTERS_PRINTER_ROW_PRINTER_PROPERTY:
		g_value_set_object (value, printers_printer_row_get_printer (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_printers_printer_row_set_property (GObject * object,
                                         guint property_id,
                                         const GValue * value,
                                         GParamSpec * pspec)
{
	PrintersPrinterRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PRINTERS_TYPE_PRINTER_ROW, PrintersPrinterRow);
	switch (property_id) {
		case PRINTERS_PRINTER_ROW_PRINTER_PROPERTY:
		printers_printer_row_set_printer (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

