#include "modest-utils.h"
#include "modest-hildon-includes.h"
#include "modest-maemo-security-options-view.h"
-#include <modest-account-protocol.h>
+#include "modest-account-protocol.h"
/* Include config.h so that _() works: */
#ifdef HAVE_CONFIG_H
MODEST_TYPE_EASYSETUP_WIZARD_DIALOG, \
ModestEasysetupWizardDialogPrivate))
+#define LABELS_WIDTH -1
+
typedef struct _ModestEasysetupWizardDialogPrivate ModestEasysetupWizardDialogPrivate;
* When the widget is edited, the enable_buttons() vfunc will be called.
*/
static GtkWidget*
-create_caption_new_with_asterisk (ModestEasysetupWizardDialog *self,
- GtkSizeGroup *group,
- const gchar *value,
- GtkWidget *control,
- GtkWidget *icon,
- HildonCaptionStatus flag)
+create_captioned (ModestEasysetupWizardDialog *self,
+ GtkSizeGroup *title_size_group,
+ GtkSizeGroup *value_size_group,
+ const gchar *value,
+ GtkWidget *control)
{
- GtkWidget *caption = NULL;
-
- /* Note: Previously, the translated strings already contained the "*",
- * Comment out this code if they do again.
- */
- /* Add a * character to indicate mandatory fields,
- * as specified in our "Email UI Specification": */
- if (flag == HILDON_CAPTION_MANDATORY) {
- gchar* title = g_strdup_printf("%s*", value);
- caption = hildon_caption_new (group, title, control, icon, flag);
- g_free(title);
- }
- else
- caption = hildon_caption_new (group, value, control, icon, flag);
+
+ GtkWidget *result;
+ result = modest_maemo_utils_create_captioned (title_size_group, value_size_group,
+ value, control);
/* Connect to the appropriate changed signal for the widget,
* so we can ask for the prev/next buttons to be enabled/disabled appropriately:
G_CALLBACK (on_caption_combobox_changed), self);
}
- return caption;
+ return result;
}
static GtkWidget*
GtkWidget *label = gtk_label_new(_("mcen_ia_emailsetup_intro"));
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
/* So that it is not truncated: */
- gtk_widget_set_size_request (label, 600, -1);
+ gtk_widget_set_size_request (label, LABELS_WIDTH, -1);
gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0);
gtk_widget_show (label);
gtk_widget_show (GTK_WIDGET (box));
}
static void
-on_account_serviceprovider_selector_changed (HildonTouchSelector *widget, gint column, gpointer user_data)
+update_user_email_from_provider (ModestEasysetupWizardDialog *self)
{
- ModestEasysetupWizardDialog *self = MODEST_EASYSETUP_WIZARD_DIALOG (user_data);
+ ModestEasysetupWizardDialogPrivate *priv;
+ gchar* provider_id;
+ gchar* domain_name = NULL;
+
g_assert(self);
- ModestEasysetupWizardDialogPrivate *priv = MODEST_EASYSETUP_WIZARD_DIALOG_GET_PRIVATE (self);
-
- priv->dirty = TRUE;
-
+ priv = MODEST_EASYSETUP_WIZARD_DIALOG_GET_PRIVATE (self);
+
/* Fill the providers combo, based on the selected country: */
- gchar* provider_id = modest_provider_picker_get_active_provider_id (
+ provider_id = modest_provider_picker_get_active_provider_id (
MODEST_PROVIDER_PICKER (priv->account_serviceprovider_picker));
- gchar* domain_name = NULL;
if(provider_id)
domain_name = modest_presets_get_domain (priv->presets, provider_id);
}
static void
+on_account_serviceprovider_selector_changed (HildonTouchSelector *widget, gint column, gpointer user_data)
+{
+ ModestEasysetupWizardDialog *self = MODEST_EASYSETUP_WIZARD_DIALOG (user_data);
+ g_assert(self);
+ ModestEasysetupWizardDialogPrivate *priv = MODEST_EASYSETUP_WIZARD_DIALOG_GET_PRIVATE (self);
+
+ priv->dirty = TRUE;
+
+ update_user_email_from_provider (self);
+}
+
+static void
on_entry_max (ModestValidatingEntry *self, gpointer user_data)
{
modest_platform_information_banner (GTK_WIDGET (self), NULL,
ModestEasysetupWizardDialogPrivate* priv = MODEST_EASYSETUP_WIZARD_DIALOG_GET_PRIVATE(self);
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
- gtk_widget_set_size_request (label, 600, -1);
+ gtk_widget_set_size_request (label, LABELS_WIDTH, -1);
gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (label);
/* 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.
* We use GTK_SIZE_GROUP_HORIZONTAL, so that the widths are the same. */
- GtkSizeGroup* sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
+ GtkSizeGroup* title_sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
+ GtkSizeGroup* value_sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
/* The country widgets: */
- priv->account_country_picker = GTK_WIDGET (modest_country_picker_new ());
- hildon_button_set_title (HILDON_BUTTON (priv->account_country_picker), _("mcen_fi_country"));
+ priv->account_country_picker = GTK_WIDGET (modest_country_picker_new (MODEST_EDITABLE_SIZE,
+ HILDON_BUTTON_ARRANGEMENT_HORIZONTAL));
+ modest_maemo_utils_set_hbutton_layout (title_sizegroup, value_sizegroup,
+ _("mcen_fi_country"), priv->account_country_picker);
g_signal_connect (G_OBJECT (priv->account_country_picker), "value-changed",
G_CALLBACK (on_picker_button_value_changed), self);
gtk_box_pack_start (GTK_BOX (box), priv->account_country_picker, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (separator);
/* The service provider widgets: */
- priv->account_serviceprovider_picker = GTK_WIDGET (modest_provider_picker_new ());
- hildon_button_set_title (HILDON_BUTTON (priv->account_serviceprovider_picker), _("mcen_fi_serviceprovider"));
+ priv->account_serviceprovider_picker = GTK_WIDGET (modest_provider_picker_new (MODEST_EDITABLE_SIZE,
+ HILDON_BUTTON_ARRANGEMENT_HORIZONTAL));
+ modest_maemo_utils_set_hbutton_layout (title_sizegroup, value_sizegroup,
+ _("mcen_fi_serviceprovider"),
+ priv->account_serviceprovider_picker);
g_signal_connect (G_OBJECT (priv->account_serviceprovider_picker), "value-changed",
G_CALLBACK (on_picker_button_value_changed), self);
gtk_box_pack_start (GTK_BOX (box), priv->account_serviceprovider_picker, FALSE, FALSE, MODEST_MARGIN_HALF);
g_free (default_account_name);
default_account_name = NULL;
- caption = create_caption_new_with_asterisk (self, sizegroup, _("mcen_fi_account_title"),
- priv->entry_account_title, NULL, HILDON_CAPTION_MANDATORY);
+ caption = create_captioned (self, title_sizegroup, value_sizegroup, _("mcen_fi_account_title"),
+ priv->entry_account_title);
gtk_widget_show (priv->entry_account_title);
gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (caption);
on_entry_max, self);
gtk_widget_show (GTK_WIDGET (box));
+
+ g_object_unref (title_sizegroup);
+ g_object_unref (value_sizegroup);
return GTK_WIDGET (box);
}
static GtkWidget*
create_page_user_details (ModestEasysetupWizardDialog *self)
{
- GtkSizeGroup* sizegroup;
+ GtkSizeGroup* title_sizegroup;
+ GtkSizeGroup* value_sizegroup;
GtkWidget *box;
ModestEasysetupWizardDialogPrivate *priv;
* Note that HildonCaption does not create a default size group if we do not specify one.
* We use GTK_SIZE_GROUP_HORIZONTAL, so that the widths are the same. */
box = gtk_vbox_new (FALSE, MODEST_MARGIN_NONE);
- sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
+ title_sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
+ value_sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
/* The name widgets: (use auto cap) */
priv->entry_user_name = GTK_WIDGET (modest_validating_entry_new ());
gtk_entry_set_max_length (GTK_ENTRY (priv->entry_user_name), 64);
modest_validating_entry_set_max_func (MODEST_VALIDATING_ENTRY (priv->entry_user_name),
on_entry_max, self);
- GtkWidget *caption = create_caption_new_with_asterisk (self, sizegroup,
- _("mcen_li_emailsetup_name"), priv->entry_user_name, NULL, HILDON_CAPTION_OPTIONAL);
+ GtkWidget *caption = create_captioned (self, title_sizegroup, value_sizegroup,
+ _("mcen_li_emailsetup_name"), priv->entry_user_name);
g_signal_connect(G_OBJECT(priv->entry_user_name), "changed",
G_CALLBACK(on_easysetup_changed), self);
gtk_widget_show (priv->entry_user_name);
/* Auto-capitalization is the default, so let's turn it off: */
hildon_gtk_entry_set_input_mode (GTK_ENTRY (priv->entry_user_username),
HILDON_GTK_INPUT_MODE_FULL);
- caption = create_caption_new_with_asterisk (self, sizegroup, _("mail_fi_username"),
- priv->entry_user_username,
- NULL, HILDON_CAPTION_MANDATORY);
+ caption = create_captioned (self, title_sizegroup, value_sizegroup, _("mail_fi_username"),
+ priv->entry_user_username);
gtk_widget_show (priv->entry_user_username);
gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
g_signal_connect(G_OBJECT(priv->entry_user_username), "changed",
HILDON_GTK_INPUT_MODE_FULL | HILDON_GTK_INPUT_MODE_INVISIBLE);
gtk_entry_set_visibility (GTK_ENTRY (priv->entry_user_password), FALSE);
/* gtk_entry_set_invisible_char (GTK_ENTRY (priv->entry_user_password), '*'); */
- caption = create_caption_new_with_asterisk (self, sizegroup,
- _("mail_fi_password"), priv->entry_user_password, NULL, HILDON_CAPTION_OPTIONAL);
+ caption = create_captioned (self, title_sizegroup, value_sizegroup,
+ _("mail_fi_password"), priv->entry_user_password);
g_signal_connect(G_OBJECT(priv->entry_user_password), "changed",
G_CALLBACK(on_easysetup_changed), self);
gtk_widget_show (priv->entry_user_password);
priv->entry_user_email = GTK_WIDGET (modest_validating_entry_new ());
/* Auto-capitalization is the default, so let's turn it off: */
hildon_gtk_entry_set_input_mode (GTK_ENTRY (priv->entry_user_email), HILDON_GTK_INPUT_MODE_FULL);
- caption = create_caption_new_with_asterisk (self, sizegroup,
- _("mcen_li_emailsetup_email_address"), priv->entry_user_email, NULL, HILDON_CAPTION_MANDATORY);
- gtk_entry_set_text (GTK_ENTRY (priv->entry_user_email), MODEST_EXAMPLE_EMAIL_ADDRESS); /* Default text. */
+ caption = create_captioned (self, title_sizegroup, value_sizegroup,
+ _("mcen_li_emailsetup_email_address"), priv->entry_user_email);
+ update_user_email_from_provider (self);
gtk_widget_show (priv->entry_user_email);
gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
g_signal_connect(G_OBJECT(priv->entry_user_email), "changed",
gtk_widget_show (GTK_WIDGET (box));
+ g_object_unref (title_sizegroup);
+ g_object_unref (value_sizegroup);
return GTK_WIDGET (box);
}
GtkWidget *label = gtk_label_new(_("mcen_ia_emailsetup_setup_complete"));
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
- gtk_widget_set_size_request (label, 600, -1);
+ gtk_widget_set_size_request (label, LABELS_WIDTH, -1);
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
/* The documentation for gtk_label_set_line_wrap() says that we must
* call gtk_widget_set_size_request() with a hard-coded width,
label = gtk_label_new (_("mcen_ia_easysetup_complete"));
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
- gtk_widget_set_size_request (label, 600, -1);
+ gtk_widget_set_size_request (label, LABELS_WIDTH, -1);
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0);
protocol_display_name = modest_protocol_get_display_name (modest_protocol_registry_get_protocol_by_type (protocol_registry, protocol_type));
incomingserver_title = g_strdup_printf(_("mcen_li_emailsetup_servertype"), protocol_display_name);
- g_object_set (G_OBJECT (priv->caption_incoming), "label", incomingserver_title, NULL);
g_free(incomingserver_title);
}
}
GtkWidget *box;
GtkWidget *scrolled_window;
GtkWidget *label;
- GtkSizeGroup *sizegroup;
+ GtkSizeGroup *title_sizegroup;
+ GtkSizeGroup *value_sizegroup;
priv = MODEST_EASYSETUP_WIZARD_DIALOG_GET_PRIVATE(self);
protocol_registry = modest_runtime_get_protocol_registry ();
/* Show note that account type cannot be changed in future: */
label = gtk_label_new (_("mcen_ia_emailsetup_account_type"));
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
- gtk_widget_set_size_request (label, 600, -1);
+ gtk_widget_set_size_request (label, LABELS_WIDTH, -1);
gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0);
gtk_widget_show (label);
/* 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.
* We use GTK_SIZE_GROUP_HORIZONTAL, so that the widths are the same. */
- sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
+ title_sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
+ value_sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
/* The incoming server widgets: */
- priv->incoming_servertype_picker = GTK_WIDGET (modest_servertype_picker_new (TRUE));
+ priv->incoming_servertype_picker = GTK_WIDGET (modest_servertype_picker_new (MODEST_EDITABLE_SIZE,
+ HILDON_BUTTON_ARRANGEMENT_HORIZONTAL,
+ TRUE));
hildon_button_set_title (HILDON_BUTTON (priv->incoming_servertype_picker), _("mcen_li_emailsetup_type"));
g_signal_connect (G_OBJECT (priv->incoming_servertype_picker), "value-changed",
G_CALLBACK (on_picker_button_value_changed), self);
/* The caption title will be updated in update_incoming_server_title().
* so this default text will never be seen: */
/* (Note: Changing the title seems pointless. murrayc) */
- priv->caption_incoming = create_caption_new_with_asterisk (self, sizegroup,
- "Incoming Server",
- priv->entry_incomingserver,
- NULL, HILDON_CAPTION_MANDATORY);
+ priv->caption_incoming = create_captioned (self, title_sizegroup, value_sizegroup,
+ "Incoming Server",
+ priv->entry_incomingserver);
update_incoming_server_title (self);
gtk_widget_show (priv->entry_incomingserver);
gtk_box_pack_start (GTK_BOX (box), priv->caption_incoming, FALSE, FALSE, MODEST_MARGIN_HALF);
protocols with security */
priv->incoming_security =
modest_maemo_security_options_view_new (MODEST_SECURITY_OPTIONS_INCOMING,
- FALSE, sizegroup);
+ FALSE, title_sizegroup, value_sizegroup);
gtk_box_pack_start (GTK_BOX (box), priv->incoming_security,
FALSE, FALSE, MODEST_MARGIN_HALF);
+ gtk_widget_show_all (priv->incoming_security);
/* Set default selection */
modest_servertype_picker_set_active_servertype (
gtk_widget_show (GTK_WIDGET (box));
gtk_widget_show (scrolled_window);
+ g_object_unref (title_sizegroup);
+ g_object_unref (value_sizegroup);
+
return GTK_WIDGET (scrolled_window);
}
static void
-on_toggle_button_changed (GtkToggleButton *togglebutton, gpointer user_data)
+on_check_button_changed (HildonCheckButton *button, gpointer user_data)
{
GtkWidget *widget = GTK_WIDGET (user_data);
- /* Enable the widget only if the toggle button is active: */
- const gboolean enable = gtk_toggle_button_get_active (togglebutton);
+ /* Enable the widget only if the check button is active: */
+ const gboolean enable = hildon_check_button_get_active (button);
gtk_widget_set_sensitive (widget, enable);
}
-/* Make the sensitivity of a widget depend on a toggle button.
+/* Make the sensitivity of a widget depend on a check button.
*/
static void
-enable_widget_for_togglebutton (GtkWidget *widget, GtkToggleButton* button)
+enable_widget_for_checkbutton (GtkWidget *widget, HildonCheckButton* button)
{
g_signal_connect (G_OBJECT (button), "toggled",
- G_CALLBACK (on_toggle_button_changed), widget);
+ G_CALLBACK (on_check_button_changed), widget);
/* Set the starting sensitivity: */
- on_toggle_button_changed (button, widget);
+ on_check_button_changed (button, widget);
}
static void
modest_connection_specific_smtp_window_fill_with_connections (MODEST_CONNECTION_SPECIFIC_SMTP_WINDOW (specific_window), priv->account_manager);
/* Show the window */
- modest_window_mgr_set_modal (modest_runtime_get_window_mgr (), GTK_WINDOW (specific_window));
+ modest_window_mgr_set_modal (modest_runtime_get_window_mgr (), GTK_WINDOW (specific_window), GTK_WINDOW (self));
gtk_widget_show (specific_window);
}
/* 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.
* We use GTK_SIZE_GROUP_HORIZONTAL, so that the widths are the same. */
- GtkSizeGroup *sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
+ GtkSizeGroup *title_sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
+ GtkSizeGroup *value_sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
/* The outgoing server widgets: */
priv = MODEST_EASYSETUP_WIZARD_DIALOG_GET_PRIVATE (self);
G_CALLBACK (on_easysetup_changed), self);
/* Auto-capitalization is the default, so let's turn it off: */
hildon_gtk_entry_set_input_mode (GTK_ENTRY (priv->entry_outgoingserver), HILDON_GTK_INPUT_MODE_FULL);
- GtkWidget *caption = create_caption_new_with_asterisk (self, sizegroup,
- _("mcen_li_emailsetup_smtp"), priv->entry_outgoingserver, NULL, HILDON_CAPTION_OPTIONAL);
+ GtkWidget *caption = create_captioned (self, title_sizegroup, value_sizegroup,
+ _("mcen_li_emailsetup_smtp"), priv->entry_outgoingserver);
gtk_widget_show (priv->entry_outgoingserver);
gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (caption);
protocols with security */
priv->outgoing_security =
modest_maemo_security_options_view_new (MODEST_SECURITY_OPTIONS_OUTGOING,
- FALSE, sizegroup);
+ FALSE, title_sizegroup, value_sizegroup);
gtk_box_pack_start (GTK_BOX (box), priv->outgoing_security,
FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (priv->outgoing_security);
gtk_widget_show (separator);
/* connection-specific checkbox: */
- priv->checkbox_outgoing_smtp_specific = gtk_check_button_new ();
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->checkbox_outgoing_smtp_specific),
- FALSE);
+ priv->checkbox_outgoing_smtp_specific = hildon_check_button_new (HILDON_SIZE_FINGER_HEIGHT);
+ hildon_check_button_set_active (HILDON_CHECK_BUTTON (priv->checkbox_outgoing_smtp_specific),
+ FALSE);
+ gtk_button_set_label (GTK_BUTTON (priv->checkbox_outgoing_smtp_specific),
+ _("mcen_fi_advsetup_connection_smtp"));
+ gtk_button_set_alignment (GTK_BUTTON (priv->checkbox_outgoing_smtp_specific),
+ 0.0, 0.5);
g_signal_connect (G_OBJECT (priv->checkbox_outgoing_smtp_specific), "toggled",
G_CALLBACK (on_easysetup_changed), self);
- caption = hildon_caption_new (sizegroup, _("mcen_fi_advsetup_connection_smtp"),
- priv->checkbox_outgoing_smtp_specific, NULL, HILDON_CAPTION_OPTIONAL);
gtk_widget_show (priv->checkbox_outgoing_smtp_specific);
- gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
- gtk_widget_show (caption);
+ gtk_box_pack_start (GTK_BOX (box), priv->checkbox_outgoing_smtp_specific,
+ FALSE, FALSE, MODEST_MARGIN_HALF);
/* Connection-specific SMTP-Severs Edit button: */
- priv->button_outgoing_smtp_servers = gtk_button_new_with_label (_("mcen_bd_edit"));
- caption = hildon_caption_new (sizegroup, _("mcen_fi_advsetup_optional_smtp"),
- priv->button_outgoing_smtp_servers, NULL, HILDON_CAPTION_OPTIONAL);
- hildon_caption_set_child_expand (HILDON_CAPTION (caption), FALSE);
+ priv->button_outgoing_smtp_servers = gtk_button_new_with_label (_("mcen_fi_advsetup_optional_smtp"));
+ hildon_gtk_widget_set_theme_size (priv->button_outgoing_smtp_servers,
+ HILDON_SIZE_FINGER_HEIGHT | HILDON_SIZE_AUTO_WIDTH);
gtk_widget_show (priv->button_outgoing_smtp_servers);
- gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
- gtk_widget_show (caption);
+ gtk_box_pack_start (GTK_BOX (box), priv->button_outgoing_smtp_servers,
+ FALSE, FALSE, MODEST_MARGIN_HALF);
/* Only enable the button when the checkbox is checked: */
- enable_widget_for_togglebutton (priv->button_outgoing_smtp_servers,
- GTK_TOGGLE_BUTTON (priv->checkbox_outgoing_smtp_specific));
+ enable_widget_for_checkbutton (priv->button_outgoing_smtp_servers,
+ HILDON_CHECK_BUTTON (priv->checkbox_outgoing_smtp_specific));
g_signal_connect (G_OBJECT (priv->button_outgoing_smtp_servers), "clicked",
G_CALLBACK (on_button_outgoing_smtp_servers), self);
gtk_widget_show (GTK_WIDGET (box));
+
+ g_object_unref (title_sizegroup);
+ g_object_unref (value_sizegroup);
return GTK_WIDGET (box);
}
}
modest_account_settings_dialog_load_settings (dialog, priv->settings);
- modest_window_mgr_set_modal (modest_runtime_get_window_mgr (), GTK_WINDOW (dialog));
+ modest_window_mgr_set_modal (modest_runtime_get_window_mgr (), GTK_WINDOW (dialog), GTK_WINDOW (self));
response = gtk_dialog_run (GTK_DIALOG (dialog));
GtkWidget *label = gtk_label_new(_("mcen_ia_emailsetup_setup_complete"));
GtkWidget *button_edit = gtk_button_new_with_label (_("mcen_bd_edit"));
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
- gtk_widget_set_size_request (label, 600, -1);
+ gtk_widget_set_size_request (label, LABELS_WIDTH, -1);
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0);
gtk_widget_show (label);
label = gtk_label_new (_("mcen_ia_customsetup_complete"));
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
- gtk_widget_set_size_request (label, 600, -1);
+ gtk_widget_set_size_request (label, LABELS_WIDTH, -1);
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0);
gtk_widget_show (label);
- GtkWidget *caption = hildon_caption_new (NULL, _("mcen_fi_advanced_settings"),
- button_edit, NULL, HILDON_CAPTION_OPTIONAL);
- hildon_caption_set_child_expand (HILDON_CAPTION (caption), FALSE);
+ GtkWidget *caption = modest_maemo_utils_create_captioned (NULL, NULL,
+ _("mcen_fi_advanced_settings"),
+ button_edit);
gtk_widget_show (button_edit);
gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (caption);
/* Aavoid a clash with an existing display name: */
const gboolean name_in_use = modest_account_mgr_account_with_display_name_exists (
priv->account_manager, account_title);
+ g_free (account_title);
if (name_in_use) {
/* Warn the user via a dialog: */
{
ModestEasysetupWizardDialogPrivate *priv = MODEST_EASYSETUP_WIZARD_DIALOG_GET_PRIVATE (self);
guint special_port;
- gchar *provider_id;
+ gchar *provider_id = NULL;
gchar* display_name;
const gchar *username, *password;
gchar *store_hostname, *transport_hostname;
"but it's not a ModestAccountProtocol");
}
+ g_free (provider_id);
return;
}
/* we check if there is a *special* port */
special_port = modest_presets_get_port (priv->presets, provider_id, TRUE /* incoming */);
- if (special_port != 0)
+ if (special_port != 0) {
store_port = special_port;
- else
- store_port = get_port_from_protocol(store_provider_server_type, store_security);
+ } else {
+ gboolean use_alternate_port = FALSE;
+ if (modest_protocol_registry_protocol_type_is_secure (modest_runtime_get_protocol_registry (),
+ store_security))
+ use_alternate_port = TRUE;
+ store_port = get_port_from_protocol(store_provider_server_type, use_alternate_port);
+ }
modest_server_account_settings_set_security_protocol (store_settings,
store_security);
/* Save the connection-specific SMTP server accounts. */
modest_account_settings_set_use_connection_specific_smtp
(priv->settings,
- gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(priv->checkbox_outgoing_smtp_specific)));
+ hildon_check_button_get_active(HILDON_CHECK_BUTTON(priv->checkbox_outgoing_smtp_specific)));
display_name = get_entered_account_title (self);
modest_account_settings_set_display_name (priv->settings, display_name);
g_free (display_name);
+ g_free (provider_id);
}