hildon-libs 0.14.11 Reference Manual |
---|
HildonSetPasswordDialogHildonSetPasswordDialog — A dialog used to set, change or remove a password |
#define HILDON_SET_PASSWORD_DIALOG_TITLE #define HILDON_SET_PASSWORD_DIALOG_PASSWORD #define HILDON_SET_PASSWORD_DIALOG_VERIFY_PASSWORD #define HILDON_SET_PASSWORD_DIALOG_OK #define HILDON_SET_PASSWORD_DIALOG_CANCEL #define HILDON_SET_MODIFY_PASSWORD_DIALOG_TITLE #define HILDON_SET_MODIFY_PASSWORD_DIALOG_LABEL #define HILDON_SET_MODIFY_PASSWORD_DIALOG_PASSWORD #define HILDON_SET_MODIFY_PASSWORD_DIALOG_VERIFY_PASSWORD #define HILDON_SET_MODIFY_PASSWORD_DIALOG_OK #define HILDON_SET_MODIFY_PASSWORD_DIALOG_CANCEL #define HILDON_SET_PASSWORD_DIALOG_MISMATCH #define HILDON_SET_PASSWORD_DIALOG_EMPTY #define HILDON_SET_PASSWORD_DIALOG_REMOVE_PROTECTION #define HILDON_REMOVE_PROTECTION_CONFIRMATION_REMOVE #define HILDON_REMOVE_PROTECTION_CONFIRMATION_CANCEL GtkWidget* hildon_set_password_dialog_new (GtkWindow *parent, gboolean modify_protection); GtkWidget* hildon_set_password_dialog_new_with_default (GtkWindow *parent, const gchar *password, gboolean modify_protection); const gchar* hildon_set_password_dialog_get_password (HildonSetPasswordDialog *dialog); gboolean hildon_set_password_dialog_get_protected (HildonSetPasswordDialog *dialog); void hildon_set_password_dialog_set_domain (HildonSetPasswordDialog *dialog, const gchar *domain);
HildonSetPasswordDialog allows setting and changing a password.
In Change mode: Dialog is used to change or remove an existing password. Unselecting the check box dims the password fields below it. If the dialog is accepted with 'OK' while the check box is unselected, a Confirmation Note is shown. If the Confirmation Note Dialog is accepted with 'Remove', the password protection is removed.
In Set mode: Set Password Dialog is used to define a password, or change a password that cannot be removed.
HildonGetPasswordDialog *get_dialog = HILDON_GET_PASSWORD_DIALOG( hildon_get_password_dialog_new (parent, FALSE)); gtk_widget_show (GTK_WIDGET (get_dialog)); i = gtk_dialog_run (GTK_DIALOG (get_dialog)); pass = hildon_get_password_dialog_get_password (get_dialog); if (i == GTK_RESPONSE_OK && (strcmp (pass, dialog.current_password) != 0)) { gtk_infoprint (GTK_WINDOW (parent), STR_PASSWORD_INCORRECT); gtk_widget_set_sensitive (GTK_WIDGET (dialog.button2), FALSE); gtk_widget_set_sensitive (GTK_WIDGET (dialog.button3), FALSE); gtk_widget_set_sensitive (GTK_WIDGET (dialog.button4), FALSE); } else if (i == GTK_RESPONSE_OK) { gtk_widget_set_sensitive( GTK_WIDGET( dialog.button2 ), TRUE); } else { gtk_widget_set_sensitive (GTK_WIDGET (dialog.button2), FALSE); gtk_widget_set_sensitive (GTK_WIDGET (dialog.button3), FALSE); gtk_widget_set_sensitive (GTK_WIDGET (dialog.button4), FALSE); }
#define HILDON_SET_PASSWORD_DIALOG_PASSWORD "ecdg_fi_set_passwd_enter_pwd"
#define HILDON_SET_PASSWORD_DIALOG_VERIFY_PASSWORD "ecdg_fi_set_passwd_confirm"
#define HILDON_SET_PASSWORD_DIALOG_OK "ecdg_bd_set_password_dialog_ok"
#define HILDON_SET_PASSWORD_DIALOG_CANCEL "ecdg_bd_set_password_dialog_cancel"
#define HILDON_SET_MODIFY_PASSWORD_DIALOG_TITLE "ckdg_ti_dialog_c_passwd_change_password"
#define HILDON_SET_MODIFY_PASSWORD_DIALOG_LABEL "ckdg_fi_dialog_c_passwd_pwd_protect"
#define HILDON_SET_MODIFY_PASSWORD_DIALOG_PASSWORD "ckdg_fi_dialog_c_passwd_new_pwd"
#define HILDON_SET_MODIFY_PASSWORD_DIALOG_VERIFY_PASSWORD "ckdg_fi_dialog_c_passwd_ver_pwd"
#define HILDON_SET_MODIFY_PASSWORD_DIALOG_OK "ckdg_bd_change_password_dialog_ok"
#define HILDON_SET_MODIFY_PASSWORD_DIALOG_CANCEL "ckdg_bd_change_password_dialog_cancel"
#define HILDON_SET_PASSWORD_DIALOG_MISMATCH "ecdg_ib_passwords_do_not_match"
#define HILDON_SET_PASSWORD_DIALOG_EMPTY "ecdg_ib_password_is_empty"
#define HILDON_SET_PASSWORD_DIALOG_REMOVE_PROTECTION "ckdg_nc_dialog_c_passwd_remove_pwd"
#define HILDON_REMOVE_PROTECTION_CONFIRMATION_REMOVE "ckdg_bd_dialog_c_passwd_remove_button"
#define HILDON_REMOVE_PROTECTION_CONFIRMATION_CANCEL "ckdg_bd_dialog_c_passwd_cancel_button"
GtkWidget* hildon_set_password_dialog_new (GtkWindow *parent, gboolean modify_protection);
Constructs a new HildonSetPasswordDialog.
parent : |
parent window; can be NULL |
modify_protection : |
TRUE creates a new change password dialog and FALSE creates a new set password dialog |
Returns : | a new GtkWidget of type HildonSetPasswordDialog |
GtkWidget* hildon_set_password_dialog_new_with_default (GtkWindow *parent, const gchar *password, gboolean modify_protection);
Same as hildon_set_password_dialog_new, but with a default password in password field.
parent : |
parent window; can be NULL |
password : |
a default password to be shown in password field |
modify_protection : |
TRUE creates a new change password dialog and FALSE creates a new set password dialog |
Returns : | a new GtkWidget of type HildonSetPasswordDialog |
const gchar* hildon_set_password_dialog_get_password (HildonSetPasswordDialog *dialog);
Returns current password.
dialog : |
pointer to HildonSetPasswordDialog |
Returns : | changed password ( if the dialog is successfully accepted with 'OK' ( and when the check box is 'ON' ( in Change Password Dialog )) |
gboolean hildon_set_password_dialog_get_protected (HildonSetPasswordDialog *dialog);
Returns the protection mode.
dialog : |
pointer to HildonSetPasswordDialog |
Returns : | password protection mode ( TRUE when the protection is 'ON' and FALSE when the protection is 'OFF' ) |
<< Dialogs | HildonGetPasswordDialog >> |