2 * e-mail-config-lookup-page.c
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
10 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program; if not, see <http://www.gnu.org/licenses/>.
21 #include <glib/gi18n-lib.h>
23 #include "e-util/e-util.h"
25 #include "e-mail-config-lookup-page.h"
27 /* Forward Declarations */
28 static void e_mail_config_lookup_page_interface_init
29 (EMailConfigPageInterface
*iface
);
31 G_DEFINE_TYPE_WITH_CODE (
32 EMailConfigLookupPage
,
33 e_mail_config_lookup_page
,
35 G_IMPLEMENT_INTERFACE (
36 E_TYPE_MAIL_CONFIG_PAGE
,
37 e_mail_config_lookup_page_interface_init
))
40 mail_config_lookup_page_constructed (GObject
*object
)
42 EMailConfigLookupPage
*page
;
47 page
= E_MAIL_CONFIG_LOOKUP_PAGE (object
);
49 /* Chain up to parent's constructed() method. */
50 G_OBJECT_CLASS (e_mail_config_lookup_page_parent_class
)->constructed (object
);
52 gtk_orientable_set_orientation (
53 GTK_ORIENTABLE (page
), GTK_ORIENTATION_VERTICAL
);
55 gtk_box_set_spacing (GTK_BOX (page
), 12);
57 gtk_widget_set_valign (GTK_WIDGET (page
), GTK_ALIGN_FILL
);
59 widget
= gtk_alignment_new (0.5, 0.5, 0.5, 0.5);
60 gtk_box_pack_start (GTK_BOX (page
), widget
, TRUE
, TRUE
, 0);
61 gtk_widget_show (widget
);
65 widget
= e_spinner_new ();
66 e_spinner_start (E_SPINNER (widget
));
67 gtk_container_add (GTK_CONTAINER (container
), widget
);
68 gtk_widget_show (widget
);
70 text
= _("Looking up account details...");
71 widget
= gtk_label_new (text
);
72 gtk_box_pack_start (GTK_BOX (page
), widget
, FALSE
, FALSE
, 0);
73 gtk_widget_show (widget
);
77 mail_config_lookup_page_check_complete (EMailConfigPage
*page
)
83 e_mail_config_lookup_page_class_init (EMailConfigLookupPageClass
*class)
85 GObjectClass
*object_class
;
87 object_class
= G_OBJECT_CLASS (class);
88 object_class
->constructed
= mail_config_lookup_page_constructed
;
92 e_mail_config_lookup_page_interface_init (EMailConfigPageInterface
*iface
)
94 /* Do not set a title. We don't want this
95 * page listed in a GtkAssistant sidebar. */
97 iface
->sort_order
= E_MAIL_CONFIG_LOOKUP_PAGE_SORT_ORDER
;
98 iface
->page_type
= GTK_ASSISTANT_PAGE_CUSTOM
;
99 iface
->check_complete
= mail_config_lookup_page_check_complete
;
103 e_mail_config_lookup_page_init (EMailConfigLookupPage
*page
)
108 e_mail_config_lookup_page_new ()
110 return g_object_new (E_TYPE_MAIL_CONFIG_LOOKUP_PAGE
, NULL
);