X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Fhildon2%2Fmodest-maemo-security-options-view.c;h=65bf10cf95bae01f1b94c1176927db6d474b7605;hb=8d4419037aad046e1587b0df5dc9acff343adaf4;hp=209e3ebd116a42224634f43e29152cddc3ae1cad;hpb=890fc5d31b9fb3d50d25613f8b05cc6b4aaea1a0;p=modest diff --git a/src/hildon2/modest-maemo-security-options-view.c b/src/hildon2/modest-maemo-security-options-view.c index 209e3eb..65bf10c 100644 --- a/src/hildon2/modest-maemo-security-options-view.c +++ b/src/hildon2/modest-maemo-security-options-view.c @@ -221,12 +221,23 @@ on_entry_changed (GtkEditable *editable, } else { missing = FALSE; } + + if (!missing && ppriv->full && !modest_number_editor_is_valid (MODEST_NUMBER_EDITOR (ppriv->port_view))) + missing = TRUE; /* Emit a signal to notify if mandatory data is missing */ g_signal_emit_by_name (G_OBJECT (self), "missing_mandatory_data", missing, NULL); } +void +on_valid_changed (ModestNumberEditor *editor, + gboolean valid, + ModestSecurityOptionsView *self) +{ + on_entry_changed (NULL, (gpointer) self); +} + static void create_outgoing_security (ModestSecurityOptionsView* self, GtkSizeGroup *title_size_group, @@ -313,6 +324,8 @@ create_outgoing_security (ModestSecurityOptionsView* self, G_CALLBACK (on_auth_changed), self); g_signal_connect (G_OBJECT (ppriv->user_entry), "changed", G_CALLBACK (on_entry_changed), self); + g_signal_connect (G_OBJECT (ppriv->port_view), "valid-changed", + G_CALLBACK (on_valid_changed), self); } /* Initialize widgets */