/* Generated by GOB (v0.93.3) on Sat May 20 15:34:30 2000
   (do not edit directly) */

#define GOB_VERSION_MAJOR 0
#define GOB_VERSION_MINOR 93
#define GOB_VERSION_PATCHLEVEL 3

#include "balsa-druid-page-error.h"


#line 29 "../../balsa/libinit_balsa/balsa-druid-page-error.gob"

#include <errno.h>

#line 16 "balsa-druid-page-error.c"
/* self casting macros */
#define SELF(x) BALSA_DRUID_PAGE_ERROR(x)
#define IS_SELF(x) BALSA_IS_DRUID_PAGE_ERROR(x)
#define SELF_CLASS(x) BALSA_DRUID_PAGE_ERROR_CLASS(x)

struct _BalsaDruidPageErrorPrivate {
#line 34 "../../balsa/libinit_balsa/balsa-druid-page-error.gob"
	GnomeDruidPage *real_next;
#line 35 "../../balsa/libinit_balsa/balsa-druid-page-error.gob"
	gchar *text;
#line 27 "balsa-druid-page-error.c"
};
/* here are local prototypes */
static void balsa_druid_page_error_class_init (BalsaDruidPageErrorClass *c) G_GNUC_UNUSED;
static void balsa_druid_page_error_init (BalsaDruidPageError *self) G_GNUC_UNUSED;
static void balsa_druid_page_error_construct (BalsaDruidPage *self) G_GNUC_UNUSED;
static void balsa_druid_page_error_prepare (GnomeDruidPage *_self, GtkWidget *druid) G_GNUC_UNUSED;
static gboolean balsa_druid_page_error_back (GnomeDruidPage *_self, GtkWidget *druid) G_GNUC_UNUSED;
static void balsa_druid_page_error_finalize (GtkObject *o) G_GNUC_UNUSED;

/* pointer to the class of our parent */
static BalsaDruidPageClass *parent_class = NULL;

guint
balsa_druid_page_error_get_type (void)
{
	static guint type = 0;

	if (!type) {
		static const GtkTypeInfo info = {
			"BalsaDruidPageError",
			sizeof (BalsaDruidPageError),
			sizeof (BalsaDruidPageErrorClass),
			(GtkClassInitFunc) balsa_druid_page_error_class_init,
			(GtkObjectInitFunc) balsa_druid_page_error_init,
			/* reserved_1 */ NULL,
			/* reserved_2 */ NULL,
			(GtkClassInitFunc) NULL,
		};

		type = gtk_type_unique (balsa_druid_page_get_type(), &info);
	}

	return type;
}


#ifdef __GNUC__
static const typeof(&balsa_druid_page_error_new_after) new_after __attribute__ ((__unused__)) = balsa_druid_page_error_new_after;
#define new_after(args...) balsa_druid_page_error_new_after(##args)
static const typeof(&balsa_druid_page_error_goto_me) goto_me __attribute__ ((__unused__)) = balsa_druid_page_error_goto_me;
#define goto_me(args...) balsa_druid_page_error_goto_me(##args)
#else /* __GNUC__ */
static GtkObject *(* new_after) (BalsaDruidPage *prev, gchar *title, gchar *text) = balsa_druid_page_error_new_after;
static void (* goto_me) (BalsaDruidPageError *self) = balsa_druid_page_error_goto_me;
#endif /* __GNUC__ */

/* a macro for creating a new object of our type */
#define GET_NEW ((BalsaDruidPageError *)gtk_type_new(balsa_druid_page_error_get_type()))

static void 
balsa_druid_page_error_class_init (BalsaDruidPageErrorClass *c)
{
	BalsaDruidPageClass *balsa_druid_page_class = (BalsaDruidPageClass *)c;
	GnomeDruidPageClass *gnome_druid_page_class = (GnomeDruidPageClass *)c;
	GtkObjectClass *gtk_object_class = (GtkObjectClass *)c;

	parent_class = gtk_type_class (balsa_druid_page_get_type ());

#line 70 "../../balsa/libinit_balsa/balsa-druid-page-error.gob"
	balsa_druid_page_class->construct = balsa_druid_page_error_construct;
#line 89 "../../balsa/libinit_balsa/balsa-druid-page-error.gob"
	gnome_druid_page_class->prepare = balsa_druid_page_error_prepare;
#line 99 "../../balsa/libinit_balsa/balsa-druid-page-error.gob"
	gnome_druid_page_class->back = balsa_druid_page_error_back;
#line 92 "balsa-druid-page-error.c"
	gtk_object_class->finalize = balsa_druid_page_error_finalize;
return;
}
#line 63 "../../balsa/libinit_balsa/balsa-druid-page-error.gob"
static void 
balsa_druid_page_error_init (BalsaDruidPageError *self)
#line 99 "balsa-druid-page-error.c"
{
	self->_priv = g_new0 (BalsaDruidPageErrorPrivate, 1);
 {
#line 63 "../../balsa/libinit_balsa/balsa-druid-page-error.gob"

		GdkColor alarm;

		alarm.red = 40000; alarm.blue = 0; alarm.green = 0;		
		gnome_druid_page_standard_set_bg_color( GNOME_DRUID_PAGE_STANDARD( self ), &alarm );
	
#line 110 "balsa-druid-page-error.c"
 }
}


#line 37 "../../balsa/libinit_balsa/balsa-druid-page-error.gob"
GtkObject *
balsa_druid_page_error_new_after (BalsaDruidPage *prev, gchar *title, gchar *text)
{
#line 37 "../../balsa/libinit_balsa/balsa-druid-page-error.gob"
	g_return_val_if_fail (prev != NULL, (GtkObject *)0);
#line 37 "../../balsa/libinit_balsa/balsa-druid-page-error.gob"
	g_return_val_if_fail (BALSA_IS_DRUID_PAGE (prev), (GtkObject *)0);
#line 37 "../../balsa/libinit_balsa/balsa-druid-page-error.gob"
	g_return_val_if_fail (title != NULL, (GtkObject *)0);
#line 37 "../../balsa/libinit_balsa/balsa-druid-page-error.gob"
	g_return_val_if_fail (text != NULL, (GtkObject *)0);
#line 127 "balsa-druid-page-error.c"
{
#line 37 "../../balsa/libinit_balsa/balsa-druid-page-error.gob"
	
		BalsaDruidPageError *self = BALSA_DRUID_PAGE_ERROR( GET_NEW );

		self->_priv->real_next = prev->next;
		self->_priv->text = g_strdup( text );
		prev->next = GNOME_DRUID_PAGE( self );
		(BALSA_DRUID_PAGE( self ))->prev = GNOME_DRUID_PAGE( prev );
		(BALSA_DRUID_PAGE( self ))->next = NULL;
		(BALSA_DRUID_PAGE( self ))->druid = (BALSA_DRUID_PAGE( prev ))->druid;
	
		balsa_druid_page_error_construct( BALSA_DRUID_PAGE( self ) );
		gnome_druid_page_standard_set_title( GNOME_DRUID_PAGE_STANDARD( self ), title );
		gnome_druid_page_standard_set_logo( GNOME_DRUID_PAGE_STANDARD( self ), 
			(BALSA_INITDRUID( (BALSA_DRUID_PAGE( self ))->druid ))->default_logo );
		gnome_druid_append_page( GNOME_DRUID( prev->druid ), GNOME_DRUID_PAGE( self ) );
		return GTK_OBJECT( self );
	}}
#line 147 "balsa-druid-page-error.c"

#line 55 "../../balsa/libinit_balsa/balsa-druid-page-error.gob"
void 
balsa_druid_page_error_goto_me (BalsaDruidPageError *self)
{
#line 55 "../../balsa/libinit_balsa/balsa-druid-page-error.gob"
	g_return_if_fail (self != NULL);
#line 55 "../../balsa/libinit_balsa/balsa-druid-page-error.gob"
	g_return_if_fail (BALSA_IS_DRUID_PAGE_ERROR (self));
#line 157 "balsa-druid-page-error.c"
{
#line 56 "../../balsa/libinit_balsa/balsa-druid-page-error.gob"
	
		BalsaInitDruid *druid = BALSA_INITDRUID( (BALSA_DRUID_PAGE( self ))->druid );

		(BALSA_DRUID_PAGE( (BALSA_DRUID_PAGE( self ))->prev ))->next = GNOME_DRUID_PAGE( self );
		gnome_druid_set_page( GNOME_DRUID( druid ), GNOME_DRUID_PAGE( self ) );
	}}
#line 166 "balsa-druid-page-error.c"


#line 70 "../../balsa/libinit_balsa/balsa-druid-page-error.gob"
static void 
balsa_druid_page_error_construct (BalsaDruidPage *self)
#define PARENT_HANDLER(___self) \
	{ if(BALSA_DRUID_PAGE_CLASS(parent_class)->construct) \
		(* BALSA_DRUID_PAGE_CLASS(parent_class)->construct)(___self); }
{
#line 176 "balsa-druid-page-error.c"
{
#line 71 "../../balsa/libinit_balsa/balsa-druid-page-error.gob"
	
		GtkWidget *label;
		gchar *errtext;

		PARENT_HANDLER( self );

		label = gtk_label_new( (BALSA_DRUID_PAGE_ERROR( self ))->_priv->text );
		gtk_box_pack_start( GTK_BOX( (GNOME_DRUID_PAGE_STANDARD( self ))->vbox ), label, TRUE, TRUE, 8 );

		errtext = g_strdup_printf( "Technical Information:\n"
			"errno = %d (%s)", errno, g_strerror( errno ) );
		label = gtk_label_new( errtext );
		g_free( errtext );
		gtk_box_pack_start( GTK_BOX( (GNOME_DRUID_PAGE_STANDARD( self ))->vbox ), label, TRUE, TRUE, 8 );

		gtk_widget_show_all( GTK_WIDGET( self ) );
	}}
#line 196 "balsa-druid-page-error.c"
#undef PARENT_HANDLER

#line 89 "../../balsa/libinit_balsa/balsa-druid-page-error.gob"
static void 
balsa_druid_page_error_prepare (GnomeDruidPage *_self, GtkWidget *druid)
#define PARENT_HANDLER(____self,___druid) \
	{ if(GNOME_DRUID_PAGE_CLASS(parent_class)->prepare) \
		(* GNOME_DRUID_PAGE_CLASS(parent_class)->prepare)(____self,___druid); }
{
#line 89 "../../balsa/libinit_balsa/balsa-druid-page-error.gob"
	g_return_if_fail (!(druid) || GTK_IS_WIDGET (druid));
#line 89 "../../balsa/libinit_balsa/balsa-druid-page-error.gob"
	g_return_if_fail (druid != NULL);
#line 210 "balsa-druid-page-error.c"
{
#line 90 "../../balsa/libinit_balsa/balsa-druid-page-error.gob"
	
		/*BalsaDruidPageFinish *self = BALSA_DRUID_PAGE_FINISH( _self );*/

		/*gnome_druid_page_standard_set_logo( GNOME_DRUID_PAGE_STANDARD( self ), (BALSA_INITDRUID( druid ))->default_logo );*/
		gnome_druid_set_buttons_sensitive( GNOME_DRUID( druid ), TRUE, FALSE, TRUE );
		gnome_druid_set_show_finish( GNOME_DRUID( druid ), FALSE );
		PARENT_HANDLER( _self, druid );
	}}
#line 221 "balsa-druid-page-error.c"
#undef PARENT_HANDLER

#line 99 "../../balsa/libinit_balsa/balsa-druid-page-error.gob"
static gboolean 
balsa_druid_page_error_back (GnomeDruidPage *_self, GtkWidget *druid)
#define PARENT_HANDLER(____self,___druid) \
	((GNOME_DRUID_PAGE_CLASS(parent_class)->back)? \
		(* GNOME_DRUID_PAGE_CLASS(parent_class)->back)(____self,___druid): \
		((gboolean )0))
{
#line 99 "../../balsa/libinit_balsa/balsa-druid-page-error.gob"
	g_return_val_if_fail (!(druid) || GTK_IS_WIDGET (druid), (gboolean )0);
#line 99 "../../balsa/libinit_balsa/balsa-druid-page-error.gob"
	g_return_val_if_fail (druid != NULL, (gboolean )0);
#line 236 "balsa-druid-page-error.c"
{
#line 100 "../../balsa/libinit_balsa/balsa-druid-page-error.gob"
	
		BalsaDruidPage *self = BALSA_DRUID_PAGE( _self );

		g_return_val_if_fail( self->prev != NULL, TRUE );

		(BALSA_DRUID_PAGE( self->prev ))->next = (BALSA_DRUID_PAGE_ERROR( self ))->_priv->real_next;
		gnome_druid_set_page( GNOME_DRUID( (BALSA_DRUID_PAGE( self ))->druid ), GNOME_DRUID_PAGE( self->prev ) );
		gtk_object_destroy( GTK_OBJECT( self ) );
		return TRUE;
	}}
#line 249 "balsa-druid-page-error.c"
#undef PARENT_HANDLER

static void 
balsa_druid_page_error_finalize (GtkObject *o)
#define PARENT_HANDLER(___o) \
	{ if(GTK_OBJECT_CLASS(parent_class)->finalize) \
		(* GTK_OBJECT_CLASS(parent_class)->finalize)(___o); }
{
	BalsaDruidPageError *___self = BALSA_DRUID_PAGE_ERROR (o);
	g_free (___self->_priv);
	___self->_priv = NULL;
{
	PARENT_HANDLER (o);
}}
#undef PARENT_HANDLER


#ifndef __GNUC__
/*REALLY BAD HACK
  This is to avoid unused warnings if you don't call
  some method.  I need to find a better way to do
  this, not needed in GCC since we use some gcc
  extentions to make saner, faster code */
static void
___balsa_druid_page_error_really_bad_hack_to_avoid_warnings(void)
{
	((void (*)(void))new_after)();
	((void (*)(void))goto_me)();
	___balsa_druid_page_error_really_bad_hack_to_avoid_warnings();
}
#endif /* __GNUC__ */

