Updated Hungarian translation
[evolution.git] / mail / e-mail-config-lookup-page.c
blob22cbf5147cd7d6221571afb1cf6d5f6d3d7fde2a
1 /*
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
11 * for more details.
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/>.
17 #ifdef HAVE_CONFIG_H
18 #include <config.h>
19 #endif
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,
34 GTK_TYPE_BOX,
35 G_IMPLEMENT_INTERFACE (
36 E_TYPE_MAIL_CONFIG_PAGE,
37 e_mail_config_lookup_page_interface_init))
39 static void
40 mail_config_lookup_page_constructed (GObject *object)
42 EMailConfigLookupPage *page;
43 GtkWidget *container;
44 GtkWidget *widget;
45 const gchar *text;
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);
63 container = 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);
76 static gboolean
77 mail_config_lookup_page_check_complete (EMailConfigPage *page)
79 return FALSE;
82 static void
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;
91 static void
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. */
96 iface->title = "";
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;
102 static void
103 e_mail_config_lookup_page_init (EMailConfigLookupPage *page)
107 EMailConfigPage *
108 e_mail_config_lookup_page_new ()
110 return g_object_new (E_TYPE_MAIL_CONFIG_LOOKUP_PAGE, NULL);