b2d74d507f2616c2dc9d6e8ba55c35002f84e976
[modest] / src / maemo / modest-account-settings-dialog.h
1 /* Copyright (c) 2007, Nokia Corporation
2  * All rights reserved.
3  *
4  */
5
6 #ifndef _MODEST_ACCOUNT_SETTINGS_DIALOG
7 #define _MODEST_ACCOUNT_SETTINGS_DIALOG
8
9 #include <gtk/gtkdialog.h>
10 #include <gtk/gtknotebook.h>
11 #include "modest-account-mgr.h"
12 #include "modest-hildon-includes.h"
13
14 G_BEGIN_DECLS
15
16 #define MODEST_TYPE_ACCOUNT_SETTINGS_DIALOG modest_account_settings_dialog_get_type()
17
18 #define MODEST_ACCOUNT_SETTINGS_DIALOG(obj) \
19         (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
20         MODEST_TYPE_ACCOUNT_SETTINGS_DIALOG, ModestAccountSettingsDialog))
21
22 #define MODEST_ACCOUNT_SETTINGS_DIALOG_CLASS(klass) \
23         (G_TYPE_CHECK_CLASS_CAST ((klass), \
24         MODEST_TYPE_ACCOUNT_SETTINGS_DIALOG, ModestAccountSettingsDialogClass))
25
26 #define MODEST_IS_ACCOUNT_SETTINGS_DIALOG(obj) \
27         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
28         MODEST_TYPE_ACCOUNT_SETTINGS_DIALOG))
29
30 #define MODEST_IS_ACCOUNT_SETTINGS_DIALOG_CLASS(klass) \
31         (G_TYPE_CHECK_CLASS_TYPE ((klass), \
32         MODEST_TYPE_ACCOUNT_SETTINGS_DIALOG))
33
34 #define MODEST_ACCOUNT_SETTINGS_DIALOG_GET_CLASS(obj) \
35         (G_TYPE_INSTANCE_GET_CLASS ((obj), \
36         MODEST_TYPE_ACCOUNT_SETTINGS_DIALOG, ModestAccountSettingsDialogClass))
37
38 typedef struct {
39         GtkDialog parent;
40         
41         /* Used by derived widgets to query existing accounts,
42          * and to create new accounts: */
43         ModestAccountMgr *account_manager;
44         ModestAccountSettings *settings;
45         
46         gboolean modified;
47         gboolean save_password;
48         gchar * account_name; /* This may not change. It is not user visible. */
49         ModestTransportStoreProtocol incoming_protocol; /* This may not change. */
50         ModestTransportStoreProtocol outgoing_protocol; /* This may not change. */
51         gchar * original_account_title;
52
53         ModestAuthProtocol protocol_authentication_incoming;
54         
55         GtkNotebook *notebook;
56         
57         GtkWidget *page_account_details;
58         GtkWidget *entry_account_title;
59         GtkWidget *combo_retrieve;
60         GtkWidget *combo_limit_retrieve;
61         GtkWidget *caption_leave_messages;
62         GtkWidget *checkbox_leave_messages;
63         
64         GtkWidget *page_user_details;
65         GtkWidget *entry_user_name;
66         GtkWidget *entry_user_username;
67         GtkWidget *entry_user_password;
68         GtkWidget *entry_user_email;
69         GtkWidget *entry_incoming_port;
70         GtkWidget *button_signature;
71         
72         GtkWidget *page_complete_easysetup;
73         
74         GtkWidget *page_incoming;
75         GtkWidget *caption_incoming;
76         GtkWidget *entry_incomingserver;
77         GtkWidget *combo_incoming_security;
78         GtkWidget *checkbox_incoming_auth;
79
80         GtkWidget *page_outgoing;
81         GtkWidget *entry_outgoingserver;
82         GtkWidget *caption_outgoing_username;
83         GtkWidget *entry_outgoing_username;
84         GtkWidget *caption_outgoing_password;
85         GtkWidget *entry_outgoing_password;
86         GtkWidget *combo_outgoing_security;
87         GtkWidget *combo_outgoing_auth;
88         GtkWidget *entry_outgoing_port;
89         GtkWidget *checkbox_outgoing_smtp_specific;
90         GtkWidget *button_outgoing_smtp_servers;
91         
92         GtkWidget *specific_window;
93         GtkWidget *signature_dialog;
94         
95 } ModestAccountSettingsDialog;
96
97 typedef struct {
98         GtkDialogClass parent_class;
99         
100 } ModestAccountSettingsDialogClass;
101
102 GType modest_account_settings_dialog_get_type (void);
103
104 ModestAccountSettingsDialog* modest_account_settings_dialog_new (void);
105
106 void modest_account_settings_dialog_set_account (ModestAccountSettingsDialog *dialog, ModestAccountSettings *settings);
107
108 void modest_account_settings_dialog_switch_to_user_info (ModestAccountSettingsDialog *dialog);
109
110 void modest_account_settings_dialog_set_modified (ModestAccountSettingsDialog *dialog, gboolean modified);
111
112 void modest_account_settings_dialog_save_password (ModestAccountSettingsDialog *dialog);
113
114 G_END_DECLS
115
116 #endif /* _MODEST_ACCOUNT_SETTINGS_DIALOG */