Updated Indonesian translation
[evolution.git] / mail / e-mail-config-lookup-page.c
blobd200c3cba0c55784ce1aadf6d8e18761f1b4f7af
1 /*
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"
21 #include <config.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,
31 GTK_TYPE_BOX,
32 G_IMPLEMENT_INTERFACE (
33 E_TYPE_MAIL_CONFIG_PAGE,
34 e_mail_config_lookup_page_interface_init))
36 static void
37 mail_config_lookup_page_constructed (GObject *object)
39 EMailConfigLookupPage *page;
40 GtkWidget *container;
41 GtkWidget *widget;
42 const gchar *text;
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)->
48 constructed (object);
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);
61 container = 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);
74 static gboolean
75 mail_config_lookup_page_check_complete (EMailConfigPage *page)
77 return FALSE;
80 static void
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;
89 static void
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;
100 static void
101 e_mail_config_lookup_page_init (EMailConfigLookupPage *page)
105 EMailConfigPage *
106 e_mail_config_lookup_page_new ()
108 return g_object_new (E_TYPE_MAIL_CONFIG_LOOKUP_PAGE, NULL);