1 /* modest-account-wizard.c */
3 /* insert (c)/licensing information) */
5 #include "modest-account-wizard.h"
6 /* include other impl specific header files */
8 /* 'private'/'protected' functions */
9 static void modest_account_wizard_class_init (ModestAccountWizardClass *klass);
10 static void modest_account_wizard_init (ModestAccountWizard *obj);
11 static void modest_account_wizard_finalize (GObject *obj);
20 typedef struct _ModestAccountWizardPrivate ModestAccountWizardPrivate;
21 struct _ModestAccountWizardPrivate {
22 /* my private members go here, eg. */
23 /* gboolean frobnicate_mode; */
25 #define MODEST_ACCOUNT_WIZARD_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE((o), \
26 MODEST_TYPE_ACCOUNT_WIZARD, \
27 ModestAccountWizardPrivate))
29 static GtkAssistantClass *parent_class = NULL;
31 /* uncomment the following if you have defined any signals */
32 /* static guint signals[LAST_SIGNAL] = {0}; */
35 modest_account_wizard_get_type (void)
37 static GType my_type = 0;
39 static const GTypeInfo my_info = {
40 sizeof(ModestAccountWizardClass),
42 NULL, /* base finalize */
43 (GClassInitFunc) modest_account_wizard_class_init,
44 NULL, /* class finalize */
45 NULL, /* class data */
46 sizeof(ModestAccountWizard),
48 (GInstanceInitFunc) modest_account_wizard_init,
50 my_type = g_type_register_static (GTK_TYPE_ASSISTANT,
51 "ModestAccountWizard",
58 modest_account_wizard_class_init (ModestAccountWizardClass *klass)
60 GObjectClass *gobject_class;
61 gobject_class = (GObjectClass*) klass;
63 parent_class = g_type_class_peek_parent (klass);
64 gobject_class->finalize = modest_account_wizard_finalize;
66 g_type_class_add_private (gobject_class, sizeof(ModestAccountWizardPrivate));
68 /* signal definitions go here, e.g.: */
69 /* signals[MY_SIGNAL_1] = */
70 /* g_signal_new ("my_signal_1",....); */
71 /* signals[MY_SIGNAL_2] = */
72 /* g_signal_new ("my_signal_2",....); */
84 _("Welcome to the Modest Setup Wizard\n\n"
85 "This wizard will help you to set up email accounts.\n"
86 "Push the 'Next'-button to start");
88 label = gtk_label_new (NULL);
89 gtk_label_set_markup (GTK_LABEL(label), txt);
98 modest_account_wizard_init (ModestAccountWizard *obj)
103 page1 = first_page ();
104 pageno = gtk_assistant_append_page (GTK_ASSISTANT(obj), page1);
106 gtk_assistant_set_page_type (GTK_ASSISTANT(obj),
108 GTK_ASSISTANT_PAGE_INTRO);
109 gtk_assistant_set_page_title (GTK_ASSISTANT(obj),
110 page1, _("Account Wizard"));
112 gtk_assistant_set_page_complete (GTK_ASSISTANT(obj), page1, TRUE);
114 /* without this next one, we crash...
115 * http://bugzilla.gnome.org/show_bug.cgi?id=347048
117 //k_assistant_set_current_page (GTK_ASSISTANT(obj), pageno);
123 modest_account_wizard_finalize (GObject *obj)
125 /* free/unref instance resources here */
129 modest_account_wizard_new (void)
131 return GTK_WIDGET(g_object_new(MODEST_TYPE_ACCOUNT_WIZARD, NULL));