X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fmaemo%2Fmodest-account-settings-dialog.c;h=21ba1cf5eba8b9552912c7a1668a33297792de99;hb=652527fd671cc695045b75893d7010c246585ef2;hp=4df4873927a7404e9a2617e28713875b4b70884e;hpb=9bd1924e6eb4205f91ab96bd7697be8bec3720ee;p=modest diff --git a/src/maemo/modest-account-settings-dialog.c b/src/maemo/modest-account-settings-dialog.c index 4df4873..21ba1cf 100644 --- a/src/maemo/modest-account-settings-dialog.c +++ b/src/maemo/modest-account-settings-dialog.c @@ -15,8 +15,8 @@ #include #include #include -#include -#include +#include "modest-hildon-includes.h" + #include "widgets/modest-serversecurity-combo-box.h" #include "widgets/modest-secureauth-combo-box.h" #include "widgets/modest-validating-entry.h" @@ -227,7 +227,7 @@ on_entry_max (ModestValidatingEntry *self, gpointer user_data) static GtkWidget* create_page_account_details (ModestAccountSettingsDialog *self) { - GtkWidget *box = gtk_vbox_new (FALSE, MODEST_MARGIN_HALF); + GtkWidget *box = gtk_vbox_new (FALSE, MODEST_MARGIN_NONE); GtkWidget *label = gtk_label_new(_("mcen_ia_accountdetails")); gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, MODEST_MARGIN_HALF); gtk_widget_show (label); @@ -239,6 +239,9 @@ create_page_account_details (ModestAccountSettingsDialog *self) /* The description widgets: */ self->entry_account_title = GTK_WIDGET (modest_validating_entry_new ()); + /* Do use auto-capitalization: */ + hildon_gtk_entry_set_input_mode (GTK_ENTRY (self->entry_account_title), + HILDON_GTK_INPUT_MODE_FULL | HILDON_GTK_INPUT_MODE_AUTOCAP); GtkWidget *caption = create_caption_new_with_asterix (self, sizegroup, _("mcen_fi_account_title"), self->entry_account_title, NULL, HILDON_CAPTION_MANDATORY); gtk_widget_show (self->entry_account_title); @@ -290,11 +293,13 @@ create_page_account_details (ModestAccountSettingsDialog *self) /* The leave-messages widgets: */ if(!self->checkbox_leave_messages) - self->checkbox_leave_messages = - gtk_check_button_new_with_label (_("mcen_fi_advsetup_leave_on_server")); - gtk_box_pack_start (GTK_BOX (box), self->checkbox_leave_messages, FALSE, FALSE, MODEST_MARGIN_HALF); + self->checkbox_leave_messages = gtk_check_button_new (); + caption = create_caption_new_with_asterix (self, sizegroup, _("mcen_fi_advsetup_leave_on_server"), + self->checkbox_leave_messages, NULL, HILDON_CAPTION_MANDATORY); gtk_widget_show (self->checkbox_leave_messages); connect_for_modified (self, self->checkbox_leave_messages); + gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF); + gtk_widget_show (caption); gtk_widget_show (GTK_WIDGET (box)); @@ -340,7 +345,7 @@ on_button_signature (GtkButton *button, gpointer user_data) static GtkWidget* create_page_user_details (ModestAccountSettingsDialog *self) { - GtkWidget *box = gtk_vbox_new (FALSE, MODEST_MARGIN_HALF); + GtkWidget *box = gtk_vbox_new (FALSE, MODEST_MARGIN_NONE); /* Create a size group to be used by all captions. * Note that HildonCaption does not create a default size group if we do not specify one. @@ -475,7 +480,7 @@ static void update_incoming_server_security_choices (ModestAccountSettingsDialog static GtkWidget* create_page_incoming (ModestAccountSettingsDialog *self) { - GtkWidget *box = gtk_vbox_new (FALSE, MODEST_MARGIN_HALF); + GtkWidget *box = gtk_vbox_new (FALSE, MODEST_MARGIN_NONE); /* Create a size group to be used by all captions. * Note that HildonCaption does not create a default size group if we do not specify one. @@ -529,11 +534,13 @@ static GtkWidget* create_page_incoming (ModestAccountSettingsDialog *self) /* The secure authentication widgets: */ if(!self->checkbox_incoming_auth) - self->checkbox_incoming_auth = - gtk_check_button_new_with_label (_("mcen_li_emailsetup_secure_authentication")); - gtk_box_pack_start (GTK_BOX (box), self->checkbox_incoming_auth, FALSE, FALSE, MODEST_MARGIN_HALF); + self->checkbox_incoming_auth = gtk_check_button_new (); + caption = hildon_caption_new (sizegroup, _("mcen_li_emailsetup_secure_authentication"), + self->checkbox_incoming_auth, NULL, HILDON_CAPTION_OPTIONAL); gtk_widget_show (self->checkbox_incoming_auth); connect_for_modified (self, self->checkbox_incoming_auth); + gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF); + gtk_widget_show (caption); gtk_widget_show (GTK_WIDGET (box)); @@ -628,7 +635,7 @@ on_combo_incoming_security_changed (GtkComboBox *widget, gpointer user_data) static GtkWidget* create_page_outgoing (ModestAccountSettingsDialog *self) { - GtkWidget *box = gtk_vbox_new (FALSE, MODEST_MARGIN_HALF); + GtkWidget *box = gtk_vbox_new (FALSE, MODEST_MARGIN_NONE); /* Create a size group to be used by all captions. * Note that HildonCaption does not create a default size group if we do not specify one. @@ -727,12 +734,15 @@ static GtkWidget* create_page_outgoing (ModestAccountSettingsDialog *self) /* connection-specific checkbox: */ if (!self->checkbox_outgoing_smtp_specific) { - self->checkbox_outgoing_smtp_specific = gtk_check_button_new_with_label (_("mcen_fi_advsetup_connection_smtp")); + self->checkbox_outgoing_smtp_specific = gtk_check_button_new (); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->checkbox_outgoing_smtp_specific), FALSE); } - gtk_box_pack_start (GTK_BOX (box), self->checkbox_outgoing_smtp_specific, FALSE, FALSE, MODEST_MARGIN_HALF); + caption = hildon_caption_new (sizegroup, _("mcen_fi_advsetup_connection_smtp"), + self->checkbox_outgoing_smtp_specific, NULL, HILDON_CAPTION_OPTIONAL); gtk_widget_show (self->checkbox_outgoing_smtp_specific); + gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF); + gtk_widget_show (caption); connect_for_modified (self, self->checkbox_outgoing_smtp_specific); /* Connection-specific SMTP-Severs Edit button: */ @@ -1265,27 +1275,33 @@ modest_account_settings_dialog_class_init (ModestAccountSettingsDialogClass *kla static void show_error (GtkWindow *parent_window, const gchar* text) { + GtkDialog *dialog = GTK_DIALOG (hildon_note_new_information (parent_window, text)); + /* GtkDialog *dialog = GTK_DIALOG (gtk_message_dialog_new (parent_window, (GtkDialogFlags)0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, text )); - - gtk_dialog_run (dialog); - gtk_widget_destroy (GTK_WIDGET (dialog)); + */ + + gtk_dialog_run (dialog); + gtk_widget_destroy (GTK_WIDGET (dialog)); } static void show_ok (GtkWindow *parent_window, const gchar* text) { + GtkDialog *dialog = GTK_DIALOG (hildon_note_new_information (parent_window, text)); + /* GtkDialog *dialog = GTK_DIALOG (gtk_message_dialog_new (parent_window, (GtkDialogFlags)0, GTK_MESSAGE_INFO, GTK_BUTTONS_OK, text )); + */ - gtk_dialog_run (dialog); - gtk_widget_destroy (GTK_WIDGET (dialog)); + gtk_dialog_run (dialog); + gtk_widget_destroy (GTK_WIDGET (dialog)); }