|  |  |  | hildon 2.1.24 Reference Manual |  | 
|---|---|---|---|---|
                    HildonGetPasswordDialog;
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_message
                                                        (HildonGetPasswordDialog *dialog,
                                                         const gchar *message);
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);
  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkBin
                                 +----GtkWindow
                                       +----GtkDialog
                                             +----HildonGetPasswordDialog
"caption-label" gchar* : Read / Write "get-old" gboolean : Read / Write / Construct Only "max-characters" gint : Read / Write "message" gchar* : Read / Write "numbers-only" gboolean : Read / Write "password" gchar* : Read / Write
HildonGetPasswordDialog prompts the user for a password. It allows inputting password, with an optional configurable label eg. for showing a custom message. The maximum length of the password can be set.
Example 24. HildonGetPassword example
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));
}
typedef struct _HildonGetPasswordDialog HildonGetPasswordDialog;
HildonGetPasswordDialog is deprecated and should not be used in newly-written code.
GtkWidget*          hildon_get_password_dialog_new      (GtkWindow *parent,
                                                         gboolean get_old);
hildon_get_password_dialog_new is deprecated and should not be used in newly-written code.
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);
hildon_get_password_dialog_new_with_default is deprecated and should not be used in newly-written code.
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_message
                                                        (HildonGetPasswordDialog *dialog,
                                                         const gchar *message);
hildon_get_password_dialog_set_message is deprecated and should not be used in newly-written code.
Sets the optional descriptive text displayed at the top of the dialog.
| dialog: | the dialog | 
| message: | a custom message or some other descriptive text to be set | 
void                hildon_get_password_dialog_set_caption
                                                        (HildonGetPasswordDialog *dialog,
                                                         const gchar *new_caption);
hildon_get_password_dialog_set_caption is deprecated and should not be used in newly-written code.
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);
hildon_get_password_dialog_set_max_characters is deprecated and should not be used in newly-written code.
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);
hildon_get_password_dialog_get_password is deprecated and should not be used in newly-written code.
Gets the currently entered password. The string should not be freed.
| dialog: | pointer to HildonSetPasswordDialog | 
| Returns : | current password entered by the user. | 
"caption-label" property"caption-label" gchar* : Read / Write
Caption label.
Default value: NULL
"get-old" property"get-old" gboolean : Read / Write / Construct Only
If the dialog is used to retrieve an old password or set a new one.
Default value: FALSE
"max-characters" property"max-characters" gint : Read / Write
Maximum characters than can be entered.
Default value: 0
"message" property"message" gchar* : Read / Write
Optional message displayed to the user.
Default value: NULL
"numbers-only" property"numbers-only" gboolean : Read / Write
If the password entry field is operating in numbers-only mode.
Default value: FALSE