priv->range_error_occured = TRUE;
if (type == HILDON_NUMBER_EDITOR_ERROR_MAXIMUM_VALUE_EXCEED) {
- msg = g_strdup (_HL("ckct_ib_maximum_value"));
+ msg = g_strdup_printf (dgettext ("hildon-libs", "ckct_ib_maximum_value"), 65535);
} else if (type == HILDON_NUMBER_EDITOR_ERROR_MINIMUM_VALUE_EXCEED) {
- msg = g_strdup (_HL("ckct_ib_minimum_value"));
+ msg = g_strdup_printf (dgettext ("hildon-libs", "ckct_ib_minimum_value"), 1);
} else {
msg = g_strdup_printf (_HL("ckct_ib_set_a_value_within_range"), PORT_RANGE_MIN, PORT_RANGE_MAX);
}
if(port_number != 0) {
hildon_number_editor_set_value (
HILDON_NUMBER_EDITOR (priv->entry_port), port_number);
- }
+ }
}
static void
+on_auth_picker_changed (HildonPickerButton *widget, gpointer user_data)
+{
+ ModestConnectionSpecificSmtpEditWindow *self =
+ MODEST_CONNECTION_SPECIFIC_SMTP_EDIT_WINDOW (user_data);
+ ModestConnectionSpecificSmtpEditWindowPrivate *priv =
+ CONNECTION_SPECIFIC_SMTP_EDIT_WINDOW_GET_PRIVATE (self);
+ ModestProtocolType auth_proto;
+
+ on_change (GTK_WIDGET(widget), self);
+
+ /* Enable/disable username and password fields */
+ auth_proto =
+ modest_secureauth_picker_get_active_secureauth (MODEST_SECUREAUTH_PICKER (priv->outgoing_auth_picker));
+
+ if (auth_proto == modest_protocol_registry_get_none_auth_type_id ()) {
+ gtk_widget_set_sensitive (priv->entry_user_username, FALSE);
+ gtk_widget_set_sensitive (priv->entry_user_password, FALSE);
+ } else {
+ gtk_widget_set_sensitive (priv->entry_user_username, TRUE);
+ gtk_widget_set_sensitive (priv->entry_user_password, TRUE);
+ }
+}
+
+
+static void
modest_connection_specific_smtp_edit_window_init (ModestConnectionSpecificSmtpEditWindow *self)
{
ModestConnectionSpecificSmtpEditWindowPrivate *priv;
modest_maemo_utils_set_hbutton_layout (title_sizegroup, value_sizegroup,
_("mcen_li_emailsetup_secure_authentication"),
priv->outgoing_auth_picker);
- g_signal_connect (G_OBJECT (priv->outgoing_auth_picker), "value-changed", G_CALLBACK(on_change), self);
+ g_signal_connect (G_OBJECT (priv->outgoing_auth_picker), "value-changed", (GCallback)on_auth_picker_changed, self);
gtk_widget_show (priv->outgoing_auth_picker);
gtk_box_pack_start (GTK_BOX (vbox), priv->outgoing_auth_picker, FALSE, FALSE, MODEST_MARGIN_HALF);
/* Show a default port number when the security method changes, as per the UI spec: */
g_signal_connect (G_OBJECT (priv->outgoing_security_picker), "value-changed", (GCallback)on_security_picker_changed, self);
- on_security_picker_changed (HILDON_PICKER_BUTTON (priv->outgoing_security_picker), self);
/* Add the buttons: */
gtk_dialog_add_button (GTK_DIALOG (self), _HL("wdgt_bd_save"), GTK_RESPONSE_OK);
modest_window_mgr_prevent_hibernation_while_window_is_shown (
modest_runtime_get_window_mgr (), GTK_WINDOW (self));
- hildon_help_dialog_help_enable (GTK_DIALOG(self),
- "applications_email_connectionspecificsmtpconf",
- modest_maemo_utils_get_osso_context());
+ /* Refresh view with current settings */
+ on_auth_picker_changed (HILDON_PICKER_BUTTON (priv->outgoing_auth_picker), self);
+ on_security_picker_changed (HILDON_PICKER_BUTTON (priv->outgoing_security_picker), self);
}
ModestConnectionSpecificSmtpEditWindow*