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

#include <granite.h>
#include <glib-object.h>
#include <libedataserver/libedataserver.h>
#include <libecal/libecal.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <glib/gi18n-lib.h>
#include <gio/gio.h>
#include <gtk/gtk.h>
#include "elementary-calendar.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 CALENDAR_TYPE_DELETE_EVENT_DIALOG (calendar_delete_event_dialog_get_type ())
#define CALENDAR_DELETE_EVENT_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CALENDAR_TYPE_DELETE_EVENT_DIALOG, CalendarDeleteEventDialog))
#define CALENDAR_DELETE_EVENT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CALENDAR_TYPE_DELETE_EVENT_DIALOG, CalendarDeleteEventDialogClass))
#define CALENDAR_IS_DELETE_EVENT_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CALENDAR_TYPE_DELETE_EVENT_DIALOG))
#define CALENDAR_IS_DELETE_EVENT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CALENDAR_TYPE_DELETE_EVENT_DIALOG))
#define CALENDAR_DELETE_EVENT_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CALENDAR_TYPE_DELETE_EVENT_DIALOG, CalendarDeleteEventDialogClass))

typedef struct _CalendarDeleteEventDialog CalendarDeleteEventDialog;
typedef struct _CalendarDeleteEventDialogClass CalendarDeleteEventDialogClass;
typedef struct _CalendarDeleteEventDialogPrivate CalendarDeleteEventDialogPrivate;
enum  {
	CALENDAR_DELETE_EVENT_DIALOG_0_PROPERTY,
	CALENDAR_DELETE_EVENT_DIALOG_SOURCE_PROPERTY,
	CALENDAR_DELETE_EVENT_DIALOG_ECAL_EVENT_PROPERTY,
	CALENDAR_DELETE_EVENT_DIALOG_MOD_TYPE_PROP_PROPERTY,
	CALENDAR_DELETE_EVENT_DIALOG_DELETE_BUTTON_TEXT_PROPERTY,
	CALENDAR_DELETE_EVENT_DIALOG_NUM_PROPERTIES
};
static GParamSpec* calendar_delete_event_dialog_properties[CALENDAR_DELETE_EVENT_DIALOG_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 __vala_ECalComponentText_free0(var) ((var == NULL) ? NULL : (var = (_vala_ECalComponentText_free (var), NULL)))

struct _CalendarDeleteEventDialog {
	GraniteMessageDialog parent_instance;
	CalendarDeleteEventDialogPrivate * priv;
};

struct _CalendarDeleteEventDialogClass {
	GraniteMessageDialogClass parent_class;
};

struct _CalendarDeleteEventDialogPrivate {
	ESource* _source;
	ECalComponent* _ecal_event;
	ECalObjModType _mod_type_prop;
	gchar* _delete_button_text;
};

static gint CalendarDeleteEventDialog_private_offset;
static gpointer calendar_delete_event_dialog_parent_class = NULL;

VALA_EXTERN GType calendar_delete_event_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (CalendarDeleteEventDialog, g_object_unref)
VALA_EXTERN CalendarDeleteEventDialog* calendar_delete_event_dialog_new (ESource* source,
                                                             ECalComponent* ecal_event,
                                                             ECalObjModType mod_type_prop);
VALA_EXTERN CalendarDeleteEventDialog* calendar_delete_event_dialog_construct (GType object_type,
                                                                   ESource* source,
                                                                   ECalComponent* ecal_event,
                                                                   ECalObjModType mod_type_prop);
static void _vala_ECalComponentText_free (ECalComponentText* self);
VALA_EXTERN GtkResponseType calendar_delete_event_dialog_run_dialog (CalendarDeleteEventDialog* self);
VALA_EXTERN ESource* calendar_delete_event_dialog_get_source (CalendarDeleteEventDialog* self);
VALA_EXTERN ECalComponent* calendar_delete_event_dialog_get_ecal_event (CalendarDeleteEventDialog* self);
VALA_EXTERN ECalObjModType calendar_delete_event_dialog_get_mod_type_prop (CalendarDeleteEventDialog* self);
static void calendar_delete_event_dialog_set_source (CalendarDeleteEventDialog* self,
                                              ESource* value);
static void calendar_delete_event_dialog_set_ecal_event (CalendarDeleteEventDialog* self,
                                                  ECalComponent* value);
static void calendar_delete_event_dialog_set_mod_type_prop (CalendarDeleteEventDialog* self,
                                                     ECalObjModType value);
VALA_EXTERN const gchar* calendar_delete_event_dialog_get_delete_button_text (CalendarDeleteEventDialog* self);
static void calendar_delete_event_dialog_set_delete_button_text (CalendarDeleteEventDialog* self,
                                                          const gchar* value);
static GObject * calendar_delete_event_dialog_constructor (GType type,
                                                    guint n_construct_properties,
                                                    GObjectConstructParam * construct_properties);
static void calendar_delete_event_dialog_finalize (GObject * obj);
static GType calendar_delete_event_dialog_get_type_once (void);
static void _vala_calendar_delete_event_dialog_get_property (GObject * object,
                                                      guint property_id,
                                                      GValue * value,
                                                      GParamSpec * pspec);
static void _vala_calendar_delete_event_dialog_set_property (GObject * object,
                                                      guint property_id,
                                                      const GValue * value,
                                                      GParamSpec * pspec);

static inline gpointer
calendar_delete_event_dialog_get_instance_private (CalendarDeleteEventDialog* self)
{
	return G_STRUCT_MEMBER_P (self, CalendarDeleteEventDialog_private_offset);
}

static void
_vala_ECalComponentText_free (ECalComponentText* self)
{
	g_boxed_free (e_cal_component_text_get_type (), self);
}

CalendarDeleteEventDialog*
calendar_delete_event_dialog_construct (GType object_type,
                                        ESource* source,
                                        ECalComponent* ecal_event,
                                        ECalObjModType mod_type_prop)
{
	CalendarDeleteEventDialog * self = NULL;
	gchar* title = NULL;
	gchar* description = NULL;
	gchar* delete_text = NULL;
	ECalComponentText* summary = NULL;
	ECalComponentText* _tmp0_;
	const gchar* _tmp25_;
	const gchar* _tmp26_;
	GThemedIcon* _tmp27_;
	GThemedIcon* _tmp28_;
	const gchar* _tmp29_;
	g_return_val_if_fail (ecal_event != NULL, NULL);
	_tmp0_ = e_cal_component_get_summary (ecal_event);
	summary = _tmp0_;
	if (e_cal_component_has_recurrences (ecal_event)) {
		if (mod_type_prop == E_CAL_OBJ_MOD_THIS) {
			ECalComponentText* _tmp1_;
			gchar* _tmp6_;
			gchar* _tmp7_;
			_tmp1_ = summary;
			if (_tmp1_ == NULL) {
				gchar* _tmp2_;
				_tmp2_ = g_strdup (_ ("Delete this occurrence of event?"));
				_g_free0 (title);
				title = _tmp2_;
			} else {
				ECalComponentText* _tmp3_;
				const gchar* _tmp4_;
				gchar* _tmp5_;
				_tmp3_ = summary;
				_tmp4_ = e_cal_component_text_get_value ((ECalComponentText*) _tmp3_);
				_tmp5_ = g_strdup_printf (_ ("Delete this occurrence of event “%s”?"), _tmp4_);
				_g_free0 (title);
				title = _tmp5_;
			}
			_tmp6_ = g_strdup (_ ("This occurrence will be permanently deleted, but all other occurrences" \
" will remain unchanged."));
			_g_free0 (description);
			description = _tmp6_;
			_tmp7_ = g_strdup (_ ("Delete Occurrence"));
			_g_free0 (delete_text);
			delete_text = _tmp7_;
		} else {
			ECalComponentText* _tmp11_;
			gchar* _tmp16_;
			gchar* _tmp17_;
			if (mod_type_prop != E_CAL_OBJ_MOD_ALL) {
				GFlagsValue* _tmp8_;
				gchar* _tmp9_;
				gchar* _tmp10_;
				_tmp8_ = g_flags_get_first_value (g_type_class_ref (e_cal_obj_mod_type_get_type ()), mod_type_prop);
				_tmp9_ = g_strconcat ("Creating delete dialog for unknown ObjModType: ", (_tmp8_ != NULL) ? _tmp8_->value_name : NULL, "; defaulting to modify all", NULL);
				_tmp10_ = _tmp9_;
				g_warning ("DeleteDialog.vala:21: %s", _tmp10_);
				_g_free0 (_tmp10_);
			}
			_tmp11_ = summary;
			if (_tmp11_ == NULL) {
				gchar* _tmp12_;
				_tmp12_ = g_strdup (_ ("Delete event?"));
				_g_free0 (title);
				title = _tmp12_;
			} else {
				ECalComponentText* _tmp13_;
				const gchar* _tmp14_;
				gchar* _tmp15_;
				_tmp13_ = summary;
				_tmp14_ = e_cal_component_text_get_value ((ECalComponentText*) _tmp13_);
				_tmp15_ = g_strdup_printf (_ ("Delete event “%s”?"), _tmp14_);
				_g_free0 (title);
				title = _tmp15_;
			}
			_tmp16_ = g_strdup (_ ("This event and all its occurrences will be permanently deleted."));
			_g_free0 (description);
			description = _tmp16_;
			_tmp17_ = g_strdup (_ ("Delete Event"));
			_g_free0 (delete_text);
			delete_text = _tmp17_;
		}
	} else {
		ECalComponentText* _tmp18_;
		gchar* _tmp23_;
		gchar* _tmp24_;
		_tmp18_ = summary;
		if (_tmp18_ == NULL) {
			gchar* _tmp19_;
			_tmp19_ = g_strdup (_ ("Delete event?"));
			_g_free0 (title);
			title = _tmp19_;
		} else {
			ECalComponentText* _tmp20_;
			const gchar* _tmp21_;
			gchar* _tmp22_;
			_tmp20_ = summary;
			_tmp21_ = e_cal_component_text_get_value ((ECalComponentText*) _tmp20_);
			_tmp22_ = g_strdup_printf (_ ("Delete event “%s”?"), _tmp21_);
			_g_free0 (title);
			title = _tmp22_;
		}
		_tmp23_ = g_strdup (_ ("This event will be permanently deleted."));
		_g_free0 (description);
		description = _tmp23_;
		_tmp24_ = g_strdup (_ ("Delete Event"));
		_g_free0 (delete_text);
		delete_text = _tmp24_;
	}
	_tmp25_ = title;
	_tmp26_ = description;
	_tmp27_ = (GThemedIcon*) g_themed_icon_new ("dialog-warning");
	_tmp28_ = _tmp27_;
	_tmp29_ = delete_text;
	self = (CalendarDeleteEventDialog*) g_object_new (object_type, "source", source, "ecal-event", ecal_event, "mod-type-prop", mod_type_prop, "primary-text", _tmp25_, "secondary-text", _tmp26_, "image-icon", _tmp28_, "buttons", GTK_BUTTONS_CANCEL, "delete-button-text", _tmp29_, NULL);
	_g_object_unref0 (_tmp28_);
	__vala_ECalComponentText_free0 (summary);
	_g_free0 (delete_text);
	_g_free0 (description);
	_g_free0 (title);
	return self;
}

CalendarDeleteEventDialog*
calendar_delete_event_dialog_new (ESource* source,
                                  ECalComponent* ecal_event,
                                  ECalObjModType mod_type_prop)
{
	return calendar_delete_event_dialog_construct (CALENDAR_TYPE_DELETE_EVENT_DIALOG, source, ecal_event, mod_type_prop);
}

GtkResponseType
calendar_delete_event_dialog_run_dialog (CalendarDeleteEventDialog* self)
{
	GtkResponseType response = 0;
	GtkResponseType result;
	g_return_val_if_fail (self != NULL, 0);
	response = (GtkResponseType) gtk_dialog_run ((GtkDialog*) self);
	if (response == GTK_RESPONSE_YES) {
		CalendarEventStore* calmodel = NULL;
		CalendarEventStore* _tmp0_;
		CalendarEventStore* _tmp1_;
		ESource* _tmp2_;
		ECalComponent* _tmp3_;
		ECalObjModType _tmp4_;
		_tmp0_ = calendar_event_store_get_default ();
		calmodel = _tmp0_;
		_tmp1_ = calmodel;
		_tmp2_ = self->priv->_source;
		_tmp3_ = self->priv->_ecal_event;
		_tmp4_ = self->priv->_mod_type_prop;
		calendar_event_store_remove_event (_tmp1_, _tmp2_, _tmp3_, _tmp4_);
		_g_object_unref0 (calmodel);
	}
	gtk_widget_destroy ((GtkWidget*) self);
	result = response;
	return result;
}

ESource*
calendar_delete_event_dialog_get_source (CalendarDeleteEventDialog* self)
{
	ESource* result;
	ESource* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_source;
	result = _tmp0_;
	return result;
}

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

static void
calendar_delete_event_dialog_set_source (CalendarDeleteEventDialog* self,
                                         ESource* value)
{
	ESource* old_value;
	g_return_if_fail (self != NULL);
	old_value = calendar_delete_event_dialog_get_source (self);
	if (old_value != value) {
		ESource* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_source);
		self->priv->_source = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, calendar_delete_event_dialog_properties[CALENDAR_DELETE_EVENT_DIALOG_SOURCE_PROPERTY]);
	}
}

ECalComponent*
calendar_delete_event_dialog_get_ecal_event (CalendarDeleteEventDialog* self)
{
	ECalComponent* result;
	ECalComponent* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_ecal_event;
	result = _tmp0_;
	return result;
}

static void
calendar_delete_event_dialog_set_ecal_event (CalendarDeleteEventDialog* self,
                                             ECalComponent* value)
{
	ECalComponent* old_value;
	g_return_if_fail (self != NULL);
	old_value = calendar_delete_event_dialog_get_ecal_event (self);
	if (old_value != value) {
		ECalComponent* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_ecal_event);
		self->priv->_ecal_event = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, calendar_delete_event_dialog_properties[CALENDAR_DELETE_EVENT_DIALOG_ECAL_EVENT_PROPERTY]);
	}
}

ECalObjModType
calendar_delete_event_dialog_get_mod_type_prop (CalendarDeleteEventDialog* self)
{
	ECalObjModType result;
	g_return_val_if_fail (self != NULL, 0U);
	result = self->priv->_mod_type_prop;
	return result;
}

static void
calendar_delete_event_dialog_set_mod_type_prop (CalendarDeleteEventDialog* self,
                                                ECalObjModType value)
{
	ECalObjModType old_value;
	g_return_if_fail (self != NULL);
	old_value = calendar_delete_event_dialog_get_mod_type_prop (self);
	if (old_value != value) {
		self->priv->_mod_type_prop = value;
		g_object_notify_by_pspec ((GObject *) self, calendar_delete_event_dialog_properties[CALENDAR_DELETE_EVENT_DIALOG_MOD_TYPE_PROP_PROPERTY]);
	}
}

const gchar*
calendar_delete_event_dialog_get_delete_button_text (CalendarDeleteEventDialog* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_delete_button_text;
	result = _tmp0_;
	return result;
}

static void
calendar_delete_event_dialog_set_delete_button_text (CalendarDeleteEventDialog* self,
                                                     const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = calendar_delete_event_dialog_get_delete_button_text (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_delete_button_text);
		self->priv->_delete_button_text = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, calendar_delete_event_dialog_properties[CALENDAR_DELETE_EVENT_DIALOG_DELETE_BUTTON_TEXT_PROPERTY]);
	}
}

static GObject *
calendar_delete_event_dialog_constructor (GType type,
                                          guint n_construct_properties,
                                          GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	CalendarDeleteEventDialog * self;
	GtkWidget* trash_button = NULL;
	const gchar* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	GtkStyleContext* _tmp3_;
	parent_class = G_OBJECT_CLASS (calendar_delete_event_dialog_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, CALENDAR_TYPE_DELETE_EVENT_DIALOG, CalendarDeleteEventDialog);
	_tmp0_ = self->priv->_delete_button_text;
	_tmp1_ = gtk_dialog_add_button ((GtkDialog*) self, _tmp0_, (gint) GTK_RESPONSE_YES);
	trash_button = _tmp1_;
	_tmp2_ = trash_button;
	_tmp3_ = gtk_widget_get_style_context (_tmp2_);
	gtk_style_context_add_class (_tmp3_, GTK_STYLE_CLASS_DESTRUCTIVE_ACTION);
	return obj;
}

static void
calendar_delete_event_dialog_class_init (CalendarDeleteEventDialogClass * klass,
                                         gpointer klass_data)
{
	calendar_delete_event_dialog_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &CalendarDeleteEventDialog_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_calendar_delete_event_dialog_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_calendar_delete_event_dialog_set_property;
	G_OBJECT_CLASS (klass)->constructor = calendar_delete_event_dialog_constructor;
	G_OBJECT_CLASS (klass)->finalize = calendar_delete_event_dialog_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), CALENDAR_DELETE_EVENT_DIALOG_SOURCE_PROPERTY, calendar_delete_event_dialog_properties[CALENDAR_DELETE_EVENT_DIALOG_SOURCE_PROPERTY] = g_param_spec_object ("source", "source", "source", e_source_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), CALENDAR_DELETE_EVENT_DIALOG_ECAL_EVENT_PROPERTY, calendar_delete_event_dialog_properties[CALENDAR_DELETE_EVENT_DIALOG_ECAL_EVENT_PROPERTY] = g_param_spec_object ("ecal-event", "ecal-event", "ecal-event", e_cal_component_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), CALENDAR_DELETE_EVENT_DIALOG_MOD_TYPE_PROP_PROPERTY, calendar_delete_event_dialog_properties[CALENDAR_DELETE_EVENT_DIALOG_MOD_TYPE_PROP_PROPERTY] = g_param_spec_flags ("mod-type-prop", "mod-type-prop", "mod-type-prop", e_cal_obj_mod_type_get_type (), 0U, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), CALENDAR_DELETE_EVENT_DIALOG_DELETE_BUTTON_TEXT_PROPERTY, calendar_delete_event_dialog_properties[CALENDAR_DELETE_EVENT_DIALOG_DELETE_BUTTON_TEXT_PROPERTY] = g_param_spec_string ("delete-button-text", "delete-button-text", "delete-button-text", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
}

static void
calendar_delete_event_dialog_instance_init (CalendarDeleteEventDialog * self,
                                            gpointer klass)
{
	self->priv = calendar_delete_event_dialog_get_instance_private (self);
}

static void
calendar_delete_event_dialog_finalize (GObject * obj)
{
	CalendarDeleteEventDialog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, CALENDAR_TYPE_DELETE_EVENT_DIALOG, CalendarDeleteEventDialog);
	_g_object_unref0 (self->priv->_source);
	_g_object_unref0 (self->priv->_ecal_event);
	_g_free0 (self->priv->_delete_button_text);
	G_OBJECT_CLASS (calendar_delete_event_dialog_parent_class)->finalize (obj);
}

static GType
calendar_delete_event_dialog_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (CalendarDeleteEventDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) calendar_delete_event_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (CalendarDeleteEventDialog), 0, (GInstanceInitFunc) calendar_delete_event_dialog_instance_init, NULL };
	GType calendar_delete_event_dialog_type_id;
	calendar_delete_event_dialog_type_id = g_type_register_static (GRANITE_TYPE_MESSAGE_DIALOG, "CalendarDeleteEventDialog", &g_define_type_info, 0);
	CalendarDeleteEventDialog_private_offset = g_type_add_instance_private (calendar_delete_event_dialog_type_id, sizeof (CalendarDeleteEventDialogPrivate));
	return calendar_delete_event_dialog_type_id;
}

GType
calendar_delete_event_dialog_get_type (void)
{
	static volatile gsize calendar_delete_event_dialog_type_id__once = 0;
	if (g_once_init_enter (&calendar_delete_event_dialog_type_id__once)) {
		GType calendar_delete_event_dialog_type_id;
		calendar_delete_event_dialog_type_id = calendar_delete_event_dialog_get_type_once ();
		g_once_init_leave (&calendar_delete_event_dialog_type_id__once, calendar_delete_event_dialog_type_id);
	}
	return calendar_delete_event_dialog_type_id__once;
}

static void
_vala_calendar_delete_event_dialog_get_property (GObject * object,
                                                 guint property_id,
                                                 GValue * value,
                                                 GParamSpec * pspec)
{
	CalendarDeleteEventDialog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, CALENDAR_TYPE_DELETE_EVENT_DIALOG, CalendarDeleteEventDialog);
	switch (property_id) {
		case CALENDAR_DELETE_EVENT_DIALOG_SOURCE_PROPERTY:
		g_value_set_object (value, calendar_delete_event_dialog_get_source (self));
		break;
		case CALENDAR_DELETE_EVENT_DIALOG_ECAL_EVENT_PROPERTY:
		g_value_set_object (value, calendar_delete_event_dialog_get_ecal_event (self));
		break;
		case CALENDAR_DELETE_EVENT_DIALOG_MOD_TYPE_PROP_PROPERTY:
		g_value_set_flags (value, calendar_delete_event_dialog_get_mod_type_prop (self));
		break;
		case CALENDAR_DELETE_EVENT_DIALOG_DELETE_BUTTON_TEXT_PROPERTY:
		g_value_set_string (value, calendar_delete_event_dialog_get_delete_button_text (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_calendar_delete_event_dialog_set_property (GObject * object,
                                                 guint property_id,
                                                 const GValue * value,
                                                 GParamSpec * pspec)
{
	CalendarDeleteEventDialog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, CALENDAR_TYPE_DELETE_EVENT_DIALOG, CalendarDeleteEventDialog);
	switch (property_id) {
		case CALENDAR_DELETE_EVENT_DIALOG_SOURCE_PROPERTY:
		calendar_delete_event_dialog_set_source (self, g_value_get_object (value));
		break;
		case CALENDAR_DELETE_EVENT_DIALOG_ECAL_EVENT_PROPERTY:
		calendar_delete_event_dialog_set_ecal_event (self, g_value_get_object (value));
		break;
		case CALENDAR_DELETE_EVENT_DIALOG_MOD_TYPE_PROP_PROPERTY:
		calendar_delete_event_dialog_set_mod_type_prop (self, g_value_get_flags (value));
		break;
		case CALENDAR_DELETE_EVENT_DIALOG_DELETE_BUTTON_TEXT_PROPERTY:
		calendar_delete_event_dialog_set_delete_button_text (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

