2 * e-mail-config-lookup-page.c
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) version 3.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with the program; if not, see <http://www.gnu.org/licenses/>
19 #include "e-mail-config-lookup-page.h"
22 #include <glib/gi18n-lib.h>
24 /* Forward Declarations */
25 static void e_mail_config_lookup_page_interface_init
26 (EMailConfigPageInterface
*interface
);
28 G_DEFINE_TYPE_WITH_CODE (
29 EMailConfigLookupPage
,
30 e_mail_config_lookup_page
,
32 G_IMPLEMENT_INTERFACE (
33 E_TYPE_MAIL_CONFIG_PAGE
,
34 e_mail_config_lookup_page_interface_init
))
37 mail_config_lookup_page_constructed (GObject
*object
)
39 EMailConfigLookupPage
*page
;
44 page
= E_MAIL_CONFIG_LOOKUP_PAGE (object
);
46 /* Chain up to parent's constructed() method. */
47 G_OBJECT_CLASS (e_mail_config_lookup_page_parent_class
)->
50 gtk_orientable_set_orientation (
51 GTK_ORIENTABLE (page
), GTK_ORIENTATION_VERTICAL
);
53 gtk_box_set_spacing (GTK_BOX (page
), 12);
55 gtk_widget_set_valign (GTK_WIDGET (page
), GTK_ALIGN_FILL
);
57 widget
= gtk_alignment_new (0.5, 0.5, 0.5, 0.5);
58 gtk_box_pack_start (GTK_BOX (page
), widget
, TRUE
, TRUE
, 0);
59 gtk_widget_show (widget
);
63 widget
= gtk_spinner_new ();
64 gtk_spinner_start (GTK_SPINNER (widget
));
65 gtk_container_add (GTK_CONTAINER (container
), widget
);
66 gtk_widget_show (widget
);
68 text
= _("Looking up account details...");
69 widget
= gtk_label_new (text
);
70 gtk_box_pack_start (GTK_BOX (page
), widget
, FALSE
, FALSE
, 0);
71 gtk_widget_show (widget
);
75 mail_config_lookup_page_check_complete (EMailConfigPage
*page
)
81 e_mail_config_lookup_page_class_init (EMailConfigLookupPageClass
*class)
83 GObjectClass
*object_class
;
85 object_class
= G_OBJECT_CLASS (class);
86 object_class
->constructed
= mail_config_lookup_page_constructed
;
90 e_mail_config_lookup_page_interface_init (EMailConfigPageInterface
*interface
)
92 /* Do not set a title. We don't want this
93 * page listed in a GtkAssistant sidebar. */
94 interface
->title
= "";
95 interface
->sort_order
= E_MAIL_CONFIG_LOOKUP_PAGE_SORT_ORDER
;
96 interface
->page_type
= GTK_ASSISTANT_PAGE_CUSTOM
;
97 interface
->check_complete
= mail_config_lookup_page_check_complete
;
101 e_mail_config_lookup_page_init (EMailConfigLookupPage
*page
)
106 e_mail_config_lookup_page_new ()
108 return g_object_new (E_TYPE_MAIL_CONFIG_LOOKUP_PAGE
, NULL
);