/* deleter.c generated by valac 0.20.1.64-fa28c, the Vala compiler
 * generated from deleter.vala, do not modify */

/*
 * Seahorse
 *
 * Copyright (C) 2011 Collabora Ltd.
 * Copyright (C) 2012 Stefan Walter
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program 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 General Public License for more details.
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the
 * Free Software Foundation, Inc.,
 * 59 Temple Place, Suite 330,
 * Boston, MA 02111-1307, USA.
 *
 * Author: Stef Walter <stefw@collabora.co.uk>
 */

#include <glib.h>
#include <glib-object.h>
#include "seahorse-internal.h"
#include <gtk/gtk.h>
#include <gio/gio.h>

#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))


static gpointer seahorse_deleter_parent_class = NULL;

enum  {
	SEAHORSE_DELETER_DUMMY_PROPERTY
};
static GtkDialog* seahorse_deleter_real_create_confirm (SeahorseDeleter* self, GtkWindow* parent);
static GList* seahorse_deleter_real_get_objects (SeahorseDeleter* self);
static gboolean seahorse_deleter_real_add_object (SeahorseDeleter* self, GObject* obj);


static GtkDialog* seahorse_deleter_real_create_confirm (SeahorseDeleter* self, GtkWindow* parent) {
#line 28 "/data/projects/seahorse/common/deleter.vala"
	g_critical ("Type `%s' does not implement abstract method `seahorse_deleter_create_confirm'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 28 "/data/projects/seahorse/common/deleter.vala"
	return NULL;
#line 53 "deleter.c"
}


GtkDialog* seahorse_deleter_create_confirm (SeahorseDeleter* self, GtkWindow* parent) {
#line 28 "/data/projects/seahorse/common/deleter.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 28 "/data/projects/seahorse/common/deleter.vala"
	return SEAHORSE_DELETER_GET_CLASS (self)->create_confirm (self, parent);
#line 62 "deleter.c"
}


static GList* seahorse_deleter_real_get_objects (SeahorseDeleter* self) {
#line 30 "/data/projects/seahorse/common/deleter.vala"
	g_critical ("Type `%s' does not implement abstract method `seahorse_deleter_get_objects'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 30 "/data/projects/seahorse/common/deleter.vala"
	return NULL;
#line 71 "deleter.c"
}


GList* seahorse_deleter_get_objects (SeahorseDeleter* self) {
#line 30 "/data/projects/seahorse/common/deleter.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 30 "/data/projects/seahorse/common/deleter.vala"
	return SEAHORSE_DELETER_GET_CLASS (self)->get_objects (self);
#line 80 "deleter.c"
}


static gboolean seahorse_deleter_real_add_object (SeahorseDeleter* self, GObject* obj) {
#line 32 "/data/projects/seahorse/common/deleter.vala"
	g_critical ("Type `%s' does not implement abstract method `seahorse_deleter_add_object'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 32 "/data/projects/seahorse/common/deleter.vala"
	return FALSE;
#line 89 "deleter.c"
}


gboolean seahorse_deleter_add_object (SeahorseDeleter* self, GObject* obj) {
#line 32 "/data/projects/seahorse/common/deleter.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 32 "/data/projects/seahorse/common/deleter.vala"
	return SEAHORSE_DELETER_GET_CLASS (self)->add_object (self, obj);
#line 98 "deleter.c"
}


void seahorse_deleter_delete (SeahorseDeleter* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
#line 27 "/data/projects/seahorse/common/deleter.vala"
	SEAHORSE_DELETER_GET_CLASS (self)->delete (self, cancellable, _callback_, _user_data_);
#line 105 "deleter.c"
}


gboolean seahorse_deleter_delete_finish (SeahorseDeleter* self, GAsyncResult* _res_, GError** error) {
#line 27 "/data/projects/seahorse/common/deleter.vala"
	return SEAHORSE_DELETER_GET_CLASS (self)->delete_finish (self, _res_, error);
#line 112 "deleter.c"
}


gboolean seahorse_deleter_prompt (SeahorseDeleter* self, GtkWindow* parent) {
	gboolean result = FALSE;
	GtkDialog* prompt = NULL;
	GtkWindow* _tmp0_ = NULL;
	GtkDialog* _tmp1_ = NULL;
	gint res = 0;
	GtkDialog* _tmp2_ = NULL;
	gint _tmp3_ = 0;
	GtkDialog* _tmp4_ = NULL;
	gboolean _tmp5_ = FALSE;
	gint _tmp6_ = 0;
	gboolean _tmp8_ = FALSE;
#line 36 "/data/projects/seahorse/common/deleter.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 37 "/data/projects/seahorse/common/deleter.vala"
	_tmp0_ = parent;
#line 37 "/data/projects/seahorse/common/deleter.vala"
	_tmp1_ = seahorse_deleter_create_confirm (self, _tmp0_);
#line 37 "/data/projects/seahorse/common/deleter.vala"
	prompt = _tmp1_;
#line 38 "/data/projects/seahorse/common/deleter.vala"
	_tmp2_ = prompt;
#line 38 "/data/projects/seahorse/common/deleter.vala"
	_tmp3_ = gtk_dialog_run (_tmp2_);
#line 38 "/data/projects/seahorse/common/deleter.vala"
	res = _tmp3_;
#line 39 "/data/projects/seahorse/common/deleter.vala"
	_tmp4_ = prompt;
#line 39 "/data/projects/seahorse/common/deleter.vala"
	gtk_widget_destroy ((GtkWidget*) _tmp4_);
#line 40 "/data/projects/seahorse/common/deleter.vala"
	_tmp6_ = res;
#line 40 "/data/projects/seahorse/common/deleter.vala"
	if (_tmp6_ == ((gint) GTK_RESPONSE_OK)) {
#line 40 "/data/projects/seahorse/common/deleter.vala"
		_tmp5_ = TRUE;
#line 152 "deleter.c"
	} else {
		gint _tmp7_ = 0;
#line 40 "/data/projects/seahorse/common/deleter.vala"
		_tmp7_ = res;
#line 40 "/data/projects/seahorse/common/deleter.vala"
		_tmp5_ = _tmp7_ == ((gint) GTK_RESPONSE_ACCEPT);
#line 159 "deleter.c"
	}
#line 40 "/data/projects/seahorse/common/deleter.vala"
	_tmp8_ = _tmp5_;
#line 40 "/data/projects/seahorse/common/deleter.vala"
	result = _tmp8_;
#line 40 "/data/projects/seahorse/common/deleter.vala"
	_g_object_unref0 (prompt);
#line 40 "/data/projects/seahorse/common/deleter.vala"
	return result;
#line 169 "deleter.c"
}


SeahorseDeleter* seahorse_deleter_construct (GType object_type) {
	SeahorseDeleter * self = NULL;
#line 27 "/data/projects/seahorse/common/deleter.vala"
	self = (SeahorseDeleter*) g_object_new (object_type, NULL);
#line 27 "/data/projects/seahorse/common/deleter.vala"
	return self;
#line 179 "deleter.c"
}


static void seahorse_deleter_class_init (SeahorseDeleterClass * klass) {
#line 27 "/data/projects/seahorse/common/deleter.vala"
	seahorse_deleter_parent_class = g_type_class_peek_parent (klass);
#line 27 "/data/projects/seahorse/common/deleter.vala"
	SEAHORSE_DELETER_CLASS (klass)->create_confirm = seahorse_deleter_real_create_confirm;
#line 27 "/data/projects/seahorse/common/deleter.vala"
	SEAHORSE_DELETER_CLASS (klass)->get_objects = seahorse_deleter_real_get_objects;
#line 27 "/data/projects/seahorse/common/deleter.vala"
	SEAHORSE_DELETER_CLASS (klass)->add_object = seahorse_deleter_real_add_object;
#line 192 "deleter.c"
}


static void seahorse_deleter_instance_init (SeahorseDeleter * self) {
}


GType seahorse_deleter_get_type (void) {
	static volatile gsize seahorse_deleter_type_id__volatile = 0;
	if (g_once_init_enter (&seahorse_deleter_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (SeahorseDeleterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) seahorse_deleter_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SeahorseDeleter), 0, (GInstanceInitFunc) seahorse_deleter_instance_init, NULL };
		GType seahorse_deleter_type_id;
		seahorse_deleter_type_id = g_type_register_static (G_TYPE_OBJECT, "SeahorseDeleter", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		g_once_init_leave (&seahorse_deleter_type_id__volatile, seahorse_deleter_type_id);
	}
	return seahorse_deleter_type_id__volatile;
}



