hildon-libs 0.14.11 Reference Manual |
---|
HildonGetPasswordDialogHildonGetPasswordDialog — A widget used to get a password |
#define HILDON_GET_PASSWORD_DIALOG_TITLE #define HILDON_GET_PASSWORD_DIALOG_PASSWORD #define HILDON_GET_PASSWORD_DIALOG_OK #define HILDON_GET_PASSWORD_DIALOG_CANCEL #define HILDON_GET_PASSWORD_VERIFY_DIALOG_TITLE #define HILDON_GET_PASSWORD_VERIFY_DIALOG_PASSWORD #define HILDON_GET_PASSWORD_VERIFY_DIALOG_OK #define HILDON_GET_PASSWORD_VERIFY_DIALOG_CANCEL #define HILDON_GET_PASSWORD_DIALOG_MAX_CHARS GtkWidget* hildon_get_password_dialog_new (GtkWindow *parent, gboolean get_old); GtkWidget* hildon_get_password_dialog_new_with_default (GtkWindow *parent, const gchar *password, gboolean get_old); void hildon_get_password_dialog_set_domain (HildonGetPasswordDialog *dialog, const gchar *domain); void hildon_get_password_dialog_set_caption (HildonGetPasswordDialog *dialog, const gchar *new_caption); void hildon_get_password_dialog_set_max_characters (HildonGetPasswordDialog *dialog, gint max_characters); const gchar* hildon_get_password_dialog_get_password (HildonGetPasswordDialog *dialog); void hildon_get_password_dialog_set_title (HildonGetPasswordDialog *dialog, const gchar *new_title);
HildonGetPasswordDialog prompts the user for a password. It allows inputting password, with an optional configurable label eg. for showing the domain. The maximum length of the password can be set.
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); } gtk_widget_destroy (GTK_WIDGET (get_dialog)); }
#define HILDON_GET_PASSWORD_DIALOG_TITLE "ecdg_ti_get_old_password"
#define HILDON_GET_PASSWORD_DIALOG_PASSWORD "ecdg_fi_get_old_pwd_enter_pwd"
#define HILDON_GET_PASSWORD_DIALOG_OK "ecdg_bd_get_old_password_dialog_ok"
#define HILDON_GET_PASSWORD_DIALOG_CANCEL "ecdg_bd_get_old_password_dialog_cancel"
#define HILDON_GET_PASSWORD_VERIFY_DIALOG_TITLE "ecdg_ti_verify_password"
#define HILDON_GET_PASSWORD_VERIFY_DIALOG_PASSWORD "ecdg_fi_verify_pwd_enter_pwd"
#define HILDON_GET_PASSWORD_VERIFY_DIALOG_OK "ecdg_bd_verify_password_dialog_ok"
#define HILDON_GET_PASSWORD_VERIFY_DIALOG_CANCEL "ecdg_bd_verify_password_dialog_cancel"
#define HILDON_GET_PASSWORD_DIALOG_MAX_CHARS "ckdg_ib_maximum_characters_reached"
GtkWidget* hildon_get_password_dialog_new (GtkWindow *parent, gboolean get_old);
Construct a new HildonGetPasswordDialog.
parent : |
parent window; can be NULL |
get_old : |
FALSE creates a new get password dialog and TRUE creates a new get old password dialog. That is, if the password to be obtained is the old password, this parameter is specified TRUE. |
Returns : | a new GtkWidget of type HildonGetPasswordDialog |
GtkWidget* hildon_get_password_dialog_new_with_default (GtkWindow *parent, const gchar *password, gboolean get_old);
Same as hildon_get_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 |
get_old : |
FALSE creates a new get password dialog and TRUE creates a new get old password dialog.That is, if the password to be obtained is the old password, this parameter is specified TRUE. |
Returns : | a new GtkWidget of type HildonGetPasswordDialog |
void hildon_get_password_dialog_set_domain (HildonGetPasswordDialog *dialog, const gchar *domain);
Sets the optional descriptive text.
dialog : |
the dialog |
domain : |
the domain or some other descriptive text to be set |
void hildon_get_password_dialog_set_caption (HildonGetPasswordDialog *dialog, const gchar *new_caption);
Sets the password entry field's neigbouring label.
dialog : |
the dialog |
new_caption : |
the text to be set as the caption label |
void hildon_get_password_dialog_set_max_characters (HildonGetPasswordDialog *dialog, gint max_characters);
sets the maximum number of characters allowed as the password
dialog : |
the dialog |
max_characters : |
the maximum number of characters the password dialog accepts |
const gchar* hildon_get_password_dialog_get_password (HildonGetPasswordDialog *dialog);
Gets the currently inputted password.
dialog : |
pointer to HildonSetPasswordDialog |
Returns : | current password ( if the dialog is successfully accepted with 'OK' ) |
<< HildonSetPasswordDialog | HildonNamePasswordDialog >> |