/* 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-welcome.h"

/* self casting macros */
#define SELF(x) BALSA_DRUID_PAGE_WELCOME(x)
#define IS_SELF(x) BALSA_IS_DRUID_PAGE_WELCOME(x)
#define SELF_CLASS(x) BALSA_DRUID_PAGE_WELCOME_CLASS(x)

struct _BalsaDruidPageWelcomePrivate {
#line 32 "../../balsa/libinit_balsa/balsa-druid-page-welcome.gob"
	BalsaInitDruid *druid;
#line 19 "balsa-druid-page-welcome.c"
};
/* here are local prototypes */
static void balsa_druid_page_welcome_class_init (BalsaDruidPageWelcomeClass *c) G_GNUC_UNUSED;
static void balsa_druid_page_welcome_init (BalsaDruidPageWelcome *self) G_GNUC_UNUSED;
static void ___real_balsa_druid_page_welcome_construct (BalsaDruidPageWelcome *self);
static void balsa_druid_page_welcome_prepare (GnomeDruidPage *_self, GtkWidget *druid) G_GNUC_UNUSED;
static gboolean balsa_druid_page_welcome_next (GnomeDruidPage *_self, GtkWidget *druid) G_GNUC_UNUSED;
static gboolean balsa_druid_page_welcome_back (GnomeDruidPage *_self, GtkWidget *druid) G_GNUC_UNUSED;
static void balsa_druid_page_welcome_finalize (GtkObject *o) G_GNUC_UNUSED;

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

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

	if (!type) {
		static const GtkTypeInfo info = {
			"BalsaDruidPageWelcome",
			sizeof (BalsaDruidPageWelcome),
			sizeof (BalsaDruidPageWelcomeClass),
			(GtkClassInitFunc) balsa_druid_page_welcome_class_init,
			(GtkObjectInitFunc) balsa_druid_page_welcome_init,
			/* reserved_1 */ NULL,
			/* reserved_2 */ NULL,
			(GtkClassInitFunc) NULL,
		};

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

	return type;
}


#ifdef __GNUC__
static const typeof(&balsa_druid_page_welcome_new) new __attribute__ ((__unused__)) = balsa_druid_page_welcome_new;
#define new(args...) balsa_druid_page_welcome_new(##args)
static const typeof(&balsa_druid_page_welcome_construct) construct __attribute__ ((__unused__)) = balsa_druid_page_welcome_construct;
#define construct(args...) balsa_druid_page_welcome_construct(##args)
#else /* __GNUC__ */
static GtkObject *(* new) (BalsaInitDruid *druid) = balsa_druid_page_welcome_new;
static void (* construct) (BalsaDruidPageWelcome *self) = balsa_druid_page_welcome_construct;
#endif /* __GNUC__ */

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

static void 
balsa_druid_page_welcome_class_init (BalsaDruidPageWelcomeClass *c)
{
	GnomeDruidPageClass *gnome_druid_page_class = (GnomeDruidPageClass *)c;
	GtkObjectClass *gtk_object_class = (GtkObjectClass *)c;

	parent_class = gtk_type_class (gnome_druid_page_start_get_type ());

#line 62 "../../balsa/libinit_balsa/balsa-druid-page-welcome.gob"
	c->construct = ___real_balsa_druid_page_welcome_construct;
#line 110 "../../balsa/libinit_balsa/balsa-druid-page-welcome.gob"
	gnome_druid_page_class->prepare = balsa_druid_page_welcome_prepare;
#line 118 "../../balsa/libinit_balsa/balsa-druid-page-welcome.gob"
	gnome_druid_page_class->next = balsa_druid_page_welcome_next;
#line 132 "../../balsa/libinit_balsa/balsa-druid-page-welcome.gob"
	gnome_druid_page_class->back = balsa_druid_page_welcome_back;
#line 86 "balsa-druid-page-welcome.c"
	gtk_object_class->finalize = balsa_druid_page_welcome_finalize;
return;
}
#line 45 "../../balsa/libinit_balsa/balsa-druid-page-welcome.gob"
static void 
balsa_druid_page_welcome_init (BalsaDruidPageWelcome *self)
#line 93 "balsa-druid-page-welcome.c"
{
	self->_priv = g_new0 (BalsaDruidPageWelcomePrivate, 1);
 {
#line 45 "../../balsa/libinit_balsa/balsa-druid-page-welcome.gob"

		(GNOME_DRUID_PAGE_START( self ))->title = 
			g_strdup( _("Welcome to Balsa!") );
		(GNOME_DRUID_PAGE_START( self ))->text =
			g_strdup( _(
	 		"You seem to be running Balsa for the first time. The following\n"
			"steps will set up Balsa by asking a few simple questions. Once\n"
			"you have completed these steps, you can always change them later\n"
			"in Balsa's preferences. If any files or directories need to be created,\n"
			"it will be done so automatically. Please check the about box in Balsa's\n"
			"main window for more information about contacting the authors or\n"
			"reporting bugs."
			) );

		balsa_druid_page_welcome_construct( self );
	
#line 114 "balsa-druid-page-welcome.c"
 }
}


#line 35 "../../balsa/libinit_balsa/balsa-druid-page-welcome.gob"
GtkObject *
balsa_druid_page_welcome_new (BalsaInitDruid *druid)
{
#line 35 "../../balsa/libinit_balsa/balsa-druid-page-welcome.gob"
	g_return_val_if_fail (druid != NULL, (GtkObject *)0);
#line 35 "../../balsa/libinit_balsa/balsa-druid-page-welcome.gob"
	g_return_val_if_fail (BALSA_IS_INITDRUID (druid), (GtkObject *)0);
#line 127 "balsa-druid-page-welcome.c"
{
#line 35 "../../balsa/libinit_balsa/balsa-druid-page-welcome.gob"
	 
		GtkObject *self = GTK_OBJECT( GET_NEW );

		(BALSA_DRUID_PAGE_WELCOME( self ))->_priv->druid = druid;
		gnome_druid_page_start_set_logo( GNOME_DRUID_PAGE_START( self ), druid->default_logo );
		gnome_druid_page_start_set_watermark( GNOME_DRUID_PAGE_START( self ), balsa_init_get_png( "balsa-watermark.png" ) );

		return self;
	}}
#line 139 "balsa-druid-page-welcome.c"


#line 62 "../../balsa/libinit_balsa/balsa-druid-page-welcome.gob"
void 
balsa_druid_page_welcome_construct (BalsaDruidPageWelcome *self)
#line 145 "balsa-druid-page-welcome.c"
{
	BalsaDruidPageWelcomeClass *klass;
#line 62 "../../balsa/libinit_balsa/balsa-druid-page-welcome.gob"
	g_return_if_fail (self != NULL);
#line 62 "../../balsa/libinit_balsa/balsa-druid-page-welcome.gob"
	g_return_if_fail (BALSA_IS_DRUID_PAGE_WELCOME (self));
#line 152 "balsa-druid-page-welcome.c"
	klass = BALSA_DRUID_PAGE_WELCOME_CLASS(GTK_OBJECT(self)->klass);

	if(klass->construct)
		(*klass->construct)(self);
}
#line 62 "../../balsa/libinit_balsa/balsa-druid-page-welcome.gob"
static void 
___real_balsa_druid_page_welcome_construct (BalsaDruidPageWelcome *self)
{
{
#line 63 "../../balsa/libinit_balsa/balsa-druid-page-welcome.gob"
	
		GnomeDruidPageStart *druid_page_start = GNOME_DRUID_PAGE_START( self );

		/*FIXME: copied out of gnome-druid-page-start.c.... */
		druid_page_start->background_item =
			gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (druid_page_start->canvas)),
			gnome_canvas_rect_get_type (), NULL);

		druid_page_start->textbox_item =
			gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (druid_page_start->canvas)),
			gnome_canvas_rect_get_type (), NULL);

		druid_page_start->logoframe_item =
			gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (druid_page_start->canvas)),
			gnome_canvas_rect_get_type (), NULL);

		druid_page_start->logo_item =
			gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (druid_page_start->canvas)),
			gnome_canvas_image_get_type (),
			"image", druid_page_start->logo_image, NULL);

		if (druid_page_start->logo_image != NULL)
			gnome_canvas_item_set (druid_page_start->logo_item,
				"image", druid_page_start->logo_image, NULL);

		druid_page_start->watermark_item =
			gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (druid_page_start->canvas)),
				 gnome_canvas_image_get_type (),
				 "image", druid_page_start->watermark_image, NULL);

		druid_page_start->title_item =
			gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (druid_page_start->canvas)),
				gnome_canvas_text_get_type (),
				"text", druid_page_start->title,
				"font", "-adobe-helvetica-bold-r-normal-*-*-180-*-*-p-*-iso8859-1",
				NULL);

		druid_page_start->text_item =
			gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (druid_page_start->canvas)),
				gnome_canvas_text_get_type (),
				"text", druid_page_start->text,
				"justification", GTK_JUSTIFY_LEFT,
				"font", "-adobe-helvetica-medium-r-normal-*-*-120-*-*-p-*-iso8859-1",
				NULL );
	}}
#line 209 "balsa-druid-page-welcome.c"

#line 110 "../../balsa/libinit_balsa/balsa-druid-page-welcome.gob"
static void 
balsa_druid_page_welcome_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 110 "../../balsa/libinit_balsa/balsa-druid-page-welcome.gob"
	g_return_if_fail (druid != NULL);
#line 110 "../../balsa/libinit_balsa/balsa-druid-page-welcome.gob"
	g_return_if_fail (GTK_IS_WIDGET (druid));
#line 222 "balsa-druid-page-welcome.c"
{
#line 111 "../../balsa/libinit_balsa/balsa-druid-page-welcome.gob"
			
		/*BalsaDruidPageWelcome *self = BALSA_DRUID_PAGE_WELCOME( _self );*/

		gnome_druid_set_buttons_sensitive( GNOME_DRUID( druid ), FALSE, TRUE, TRUE );
		gnome_druid_set_show_finish( GNOME_DRUID( druid ), FALSE );
	}}
#line 231 "balsa-druid-page-welcome.c"
#undef PARENT_HANDLER

#line 118 "../../balsa/libinit_balsa/balsa-druid-page-welcome.gob"
static gboolean 
balsa_druid_page_welcome_next (GnomeDruidPage *_self, GtkWidget *druid)
#define PARENT_HANDLER(____self,___druid) \
	((GNOME_DRUID_PAGE_CLASS(parent_class)->next)? \
		(* GNOME_DRUID_PAGE_CLASS(parent_class)->next)(____self,___druid): \
		((gboolean )0))
{
#line 118 "../../balsa/libinit_balsa/balsa-druid-page-welcome.gob"
	g_return_val_if_fail (druid != NULL, (gboolean )0);
#line 118 "../../balsa/libinit_balsa/balsa-druid-page-welcome.gob"
	g_return_val_if_fail (GTK_IS_WIDGET (druid), (gboolean )0);
#line 246 "balsa-druid-page-welcome.c"
{
#line 119 "../../balsa/libinit_balsa/balsa-druid-page-welcome.gob"
	
		BalsaDruidPageWelcome *self = BALSA_DRUID_PAGE_WELCOME( _self );

		g_return_val_if_fail( self->next != NULL, FALSE );

		if( BALSA_IS_DRUID_PAGE( self->next ) ) {
			(BALSA_DRUID_PAGE( self->next ))->prev = GNOME_DRUID_PAGE( self );
		}

		gnome_druid_set_page( GNOME_DRUID( druid ), GNOME_DRUID_PAGE( self->next ) );
		return TRUE;
	}}
#line 261 "balsa-druid-page-welcome.c"
#undef PARENT_HANDLER

#line 132 "../../balsa/libinit_balsa/balsa-druid-page-welcome.gob"
static gboolean 
balsa_druid_page_welcome_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 132 "../../balsa/libinit_balsa/balsa-druid-page-welcome.gob"
	g_return_val_if_fail (druid != NULL, (gboolean )0);
#line 132 "../../balsa/libinit_balsa/balsa-druid-page-welcome.gob"
	g_return_val_if_fail (GTK_IS_WIDGET (druid), (gboolean )0);
#line 276 "balsa-druid-page-welcome.c"
{
#line 133 "../../balsa/libinit_balsa/balsa-druid-page-welcome.gob"
	
		g_warning( "Trying to go back from start page... prev button should "
			   "be disabled!" );
		return TRUE;
	}}
#line 284 "balsa-druid-page-welcome.c"
#undef PARENT_HANDLER

static void 
balsa_druid_page_welcome_finalize (GtkObject *o)
#define PARENT_HANDLER(___o) \
	{ if(GTK_OBJECT_CLASS(parent_class)->finalize) \
		(* GTK_OBJECT_CLASS(parent_class)->finalize)(___o); }
{
	BalsaDruidPageWelcome *___self = BALSA_DRUID_PAGE_WELCOME (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_welcome_really_bad_hack_to_avoid_warnings(void)
{
	((void (*)(void))new)();
	((void (*)(void))construct)();
	___balsa_druid_page_welcome_really_bad_hack_to_avoid_warnings();
}
#endif /* __GNUC__ */

