* some cleanup in modest-ui-wizzard.c/h
[modest] / src / gtk-glade / modest-ui-account-setup.c
1 /* modest-ui-wizard.c */
2
3 /* insert (c)/licensing information) */
4
5 #include <gtk/gtk.h>
6 #include <glade/glade.h>
7 #include <glib/gi18n.h>
8 #include <string.h>
9
10 #ifdef HAVE_CONFIG_H
11 #include <config.h>
12 #endif /*HAVE_CONFIG_H*/
13
14 #include "../modest-account-mgr.h"
15
16 #include "modest-ui-glade.h"
17 #include "modest-ui-account-setup.h"
18
19 static void
20 accounts_and_identities_dialog (gpointer user_data)
21 {
22         GladeXML *glade_xml;
23         GtkWidget *advanced_account_setup;
24         ModestUIPrivate *priv;
25         gint retval;
26
27
28         g_return_if_fail(MODEST_IS_UI(user_data));
29         priv = MODEST_UI_GET_PRIVATE(MODEST_UI(user_data));
30
31         glade_xml = glade_xml_new(MODEST_GLADE, "IdentitiesAndAccountsDialog", NULL);
32         advanced_account_setup = glade_xml_get_widget(glade_xml, "IdentitiesAndAccountsDialog");
33
34
35         gtk_widget_show_all(GTK_WIDGET(advanced_account_setup));
36
37         while (TRUE) {
38                 retval=gtk_dialog_run(GTK_DIALOG(advanced_account_setup));
39                 if (retval==GTK_RESPONSE_CANCEL)
40                         break;
41         }
42
43         gtk_widget_destroy(GTK_WIDGET(advanced_account_setup));
44         g_object_unref(glade_xml);
45 }
46
47 void account_settings (GtkWidget *widget,
48                        gpointer user_data)
49 {
50         accounts_and_identities_dialog (MODEST_UI(user_data));
51 }
52