2 * This file is a part of hildon
4 * Copyright (C) 2005, 2006 Nokia Corporation, all rights reserved.
6 * Contact: Rodrigo Novo <rodrigo.novo@nokia.com>
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public License
10 * as published by the Free Software Foundation; version 2.1 of
11 * the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
26 * SECTION:hildon-set-password-dialog
27 * @short_description: A dialog used to set, change or remove a password.
28 * @see_also: #HildonGetPasswordDialog
30 * HildonSetPasswordDialog allows setting and changing a password.
32 * In Change mode: Dialog is used to change or remove an existing
33 * password. Unselecting the check box dims the password fields below
34 * it. If the dialog is accepted with 'OK' while the check box is
35 * unselected, a Confirmation Note is shown. If the Confirmation Note
36 * Dialog is accepted with 'Remove', the password protection is removed.
38 * In Set mode: Set Password Dialog is used to define a password, or
39 * change a password that cannot be removed.
42 #undef HILDON_DISABLE_DEPRECATED
55 #include <gdk/gdkkeysyms.h>
57 #include "hildon-set-password-dialog.h"
58 #include "hildon-caption.h"
59 #include "hildon-note.h"
60 #include "hildon-defines.h"
61 #include "hildon-banner.h"
62 #include "hildon-set-password-dialog-private.h"
63 #include "hildon-entry.h"
64 #include "hildon-check-button.h"
66 #define HILDON_SET_PASSWORD_DIALOG_TITLE "ecdg_ti_set_password"
68 #define HILDON_SET_PASSWORD_DIALOG_PASSWORD "ecdg_fi_set_passwd_enter_pwd"
70 #define HILDON_SET_PASSWORD_DIALOG_VERIFY_PASSWORD "ecdg_fi_set_passwd_confirm"
72 #define HILDON_SET_PASSWORD_DIALOG_OK "wdgt_bd_done"
74 #define HILDON_SET_PASSWORD_DIALOG_CANCEL "ecdg_bd_set_password_dialog_cancel"
76 #define HILDON_SET_MODIFY_PASSWORD_DIALOG_TITLE "ckdg_ti_dialog_c_passwd_change_password"
78 #define HILDON_SET_MODIFY_PASSWORD_DIALOG_LABEL "ckdg_fi_dialog_c_passwd_pwd_protect"
80 #define HILDON_SET_MODIFY_PASSWORD_DIALOG_PASSWORD "ckdg_fi_dialog_c_passwd_new_pwd"
82 #define HILDON_SET_MODIFY_PASSWORD_DIALOG_VERIFY_PASSWORD "ckdg_fi_dialog_c_passwd_ver_pwd"
84 #define HILDON_SET_MODIFY_PASSWORD_DIALOG_OK "wdgt_bd_done"
86 #define HILDON_SET_MODIFY_PASSWORD_DIALOG_CANCEL "ckdg_bd_change_password_dialog_cancel"
88 #define HILDON_SET_PASSWORD_DIALOG_MISMATCH "ecdg_ib_passwords_do_not_match"
90 #define HILDON_SET_PASSWORD_DIALOG_EMPTY "ecdg_ib_password_is_empty"
92 #define HILDON_SET_PASSWORD_DIALOG_REMOVE_PROTECTION "ckdg_nc_dialog_c_passwd_remove_pwd"
94 #define HILDON_REMOVE_PROTECTION_CONFIRMATION_REMOVE "ckdg_bd_dialog_c_passwd_remove_button"
96 #define HILDON_REMOVE_PROTECTION_CONFIRMATION_CANCEL "ckdg_bd_dialog_c_passwd_cancel_button"
98 #define _(String) dgettext("hildon-libs", String)
100 #define c_(String) dgettext("hildon-common-strings", String)
102 static GtkDialogClass* parent_class;
105 hildon_set_password_dialog_class_init (HildonSetPasswordDialogClass *class);
108 hildon_set_password_dialog_init (HildonSetPasswordDialog *dialog);
111 hildon_checkbox_toggled (GtkWidget *widget,
115 hildon_set_password_response_change (GtkDialog *d,
120 hildon_set_password_response_set (GtkDialog * d,
125 create_contents (HildonSetPasswordDialog *dialog);
128 hildon_set_password_set_property (GObject *object,
134 hildon_set_password_get_property (GObject *object,
144 PROP_HILDON_PASSWORD_DIALOG
148 hildon_set_password_set_property (GObject *object,
153 HildonSetPasswordDialog *dialog = HILDON_SET_PASSWORD_DIALOG (object);
154 HildonSetPasswordDialogPrivate *priv;
156 priv = HILDON_SET_PASSWORD_DIALOG_GET_PRIVATE (dialog);
162 /* Update domain label to display new value */
163 gtk_label_set_text (priv->message_label, g_value_get_string (value));
167 /* Update password entry to display new value */
168 hildon_entry_set_text (HILDON_ENTRY (priv->pwd1st_entry), g_value_get_string (value));
171 case PROP_HILDON_PASSWORD_DIALOG:
172 /* Note this is a G_PARAM_CONSTRUCT_ONLY type property */
173 priv->protection = g_value_get_boolean (value);
175 /* We now have the necessary information to populate the dialog */
176 /* FIXME It looks kinda extremally bad that this is here...
177 * what about situations where this prop is NOT set during
179 create_contents (dialog);
183 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
189 hildon_set_password_get_property (GObject *object,
194 HildonSetPasswordDialogPrivate *priv = NULL;
196 priv = HILDON_SET_PASSWORD_DIALOG_GET_PRIVATE (object);
202 g_value_set_string (value, gtk_label_get_text (priv->message_label));
206 g_value_set_string (value,
207 hildon_entry_get_text (HILDON_ENTRY (priv->pwd1st_entry)));
210 case PROP_HILDON_PASSWORD_DIALOG:
211 g_value_set_boolean (value, priv->protection);
215 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
222 create_contents (HildonSetPasswordDialog *dialog)
224 HildonSetPasswordDialogPrivate *priv = NULL;
225 AtkObject *atk_aux = NULL;
229 priv = HILDON_SET_PASSWORD_DIALOG_GET_PRIVATE (dialog);
231 priv->checkbox = NULL;
233 /* Size group for labels */
234 group = GTK_SIZE_GROUP (gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL));
236 gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
238 /* Setup and pack domain label */
239 priv->message_label = GTK_LABEL (gtk_label_new (NULL));
240 gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
241 GTK_WIDGET(priv->message_label), FALSE, FALSE, 0);
242 gtk_widget_show (GTK_WIDGET (priv->message_label));
244 if (priv->protection == TRUE) {
245 /* Use Change Password Dialog strings */
246 priv->pwd1st_caption_string = _(HILDON_SET_MODIFY_PASSWORD_DIALOG_PASSWORD);
247 priv->pwd2nd_caption_string = _(HILDON_SET_MODIFY_PASSWORD_DIALOG_VERIFY_PASSWORD);
249 /* Setup checkbox to enable/disable password protection */
250 priv->checkbox = hildon_check_button_new (HILDON_SIZE_AUTO_WIDTH | HILDON_SIZE_FINGER_HEIGHT);
251 gtk_button_set_label (GTK_BUTTON (priv->checkbox), _(HILDON_SET_MODIFY_PASSWORD_DIALOG_LABEL));
252 gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
253 priv->checkbox, TRUE, TRUE, 0);
254 gtk_widget_show (priv->checkbox);
255 hildon_check_button_set_active (HILDON_CHECK_BUTTON (priv->checkbox),
257 gtk_signal_connect (GTK_OBJECT (priv->checkbox), "toggled",
258 G_CALLBACK (hildon_checkbox_toggled), dialog);
260 /* Setup appropriate response handler */
261 g_signal_connect (G_OBJECT (dialog), "response",
262 G_CALLBACK (hildon_set_password_response_change),
265 /* Use Set Password Dialog strings */
266 priv->pwd1st_caption_string = _(HILDON_SET_PASSWORD_DIALOG_PASSWORD);
267 priv->pwd2nd_caption_string = _(HILDON_SET_PASSWORD_DIALOG_VERIFY_PASSWORD);
269 /* Setup appropriate response handler */
270 g_signal_connect (G_OBJECT (dialog), "response",
271 G_CALLBACK(hildon_set_password_response_set),
275 /* Create the password field */
276 priv->pwd1st_entry = hildon_entry_new (HILDON_SIZE_FINGER_HEIGHT | HILDON_SIZE_AUTO_WIDTH);
277 if ((atk_aux = gtk_widget_get_accessible(priv->pwd1st_entry)))
279 atk_object_set_name(atk_aux, "Old Passwd");
284 g_object_set (priv->pwd1st_entry, "hildon-input-mode", HILDON_GTK_INPUT_MODE_FULL, NULL);
287 gtk_entry_set_visibility (GTK_ENTRY(priv->pwd1st_entry), FALSE);
288 gtk_widget_show (priv->pwd1st_entry);
289 priv->pwd1st_caption = hildon_caption_new (group,
290 priv->pwd1st_caption_string,
292 NULL, HILDON_CAPTION_OPTIONAL);
294 hildon_caption_set_separator (HILDON_CAPTION(priv->pwd1st_caption), "");
295 gtk_entry_set_visibility (GTK_ENTRY (priv->pwd1st_entry), FALSE);
296 gtk_box_pack_start (GTK_BOX(GTK_DIALOG (dialog)->vbox),
297 priv->pwd1st_caption, TRUE, TRUE, 0);
298 gtk_widget_show (priv->pwd1st_caption);
300 /* Create the password verify field */
301 priv->pwd2nd_entry = hildon_entry_new (HILDON_SIZE_FINGER_HEIGHT | HILDON_SIZE_AUTO_WIDTH);
302 if ((atk_aux = gtk_widget_get_accessible(priv->pwd2nd_entry)))
304 atk_object_set_name(atk_aux, "New Passwd");
309 g_object_set (priv->pwd2nd_entry, "hildon-input-mode", HILDON_GTK_INPUT_MODE_FULL, NULL);
312 gtk_widget_show (priv->pwd2nd_entry);
313 priv->pwd2nd_caption = hildon_caption_new (group,
314 priv->pwd2nd_caption_string,
316 NULL, HILDON_CAPTION_OPTIONAL);
317 hildon_caption_set_separator (HILDON_CAPTION (priv->pwd2nd_caption), "");
318 gtk_entry_set_visibility (GTK_ENTRY (priv->pwd2nd_entry), FALSE);
319 gtk_box_pack_start (GTK_BOX(GTK_DIALOG (dialog)->vbox),
320 priv->pwd2nd_caption, TRUE, TRUE, 0);
321 gtk_widget_show (priv->pwd2nd_caption);
323 /* Set dialog title */
324 gtk_window_set_title (GTK_WINDOW (dialog),
326 ? HILDON_SET_MODIFY_PASSWORD_DIALOG_TITLE
327 : HILDON_SET_PASSWORD_DIALOG_TITLE));
329 /* Create the OK/CANCEL buttons */
330 gtk_dialog_add_button (GTK_DIALOG (dialog), _(priv->protection
331 ? HILDON_SET_MODIFY_PASSWORD_DIALOG_OK
332 : HILDON_SET_PASSWORD_DIALOG_OK), GTK_RESPONSE_OK);
334 gtk_widget_show_all (GTK_DIALOG (dialog)->vbox);
335 gtk_widget_show_all (GTK_DIALOG (dialog)->action_area);
337 /* Ensure group is freed when all its contents have been removed */
338 g_object_unref (group);
342 hildon_set_password_dialog_class_init (HildonSetPasswordDialogClass *class)
344 GObjectClass *object_class = G_OBJECT_CLASS (class);
346 parent_class = g_type_class_peek_parent (class);
348 /* Override virtual methods */
349 object_class->set_property = hildon_set_password_set_property;
350 object_class->get_property = hildon_set_password_get_property;
352 /* Install new properties */
353 g_object_class_install_property (object_class,
355 g_param_spec_string ("message",
357 "A message to display to the user",
362 * HildonSetPasswordDialog:modify-protection:
366 g_object_class_install_property (object_class,
367 PROP_HILDON_PASSWORD_DIALOG,
368 g_param_spec_boolean ("modify-protection",
370 "Set type to dialog",
372 G_PARAM_CONSTRUCT_ONLY |
376 * HildonSetPasswordDialog:password:
378 * Content of the password field.
380 g_object_class_install_property (object_class,
382 g_param_spec_string ("password",
384 "Set content to dialog",
388 /* Install private structure */
389 g_type_class_add_private (class,
390 sizeof (HildonSetPasswordDialogPrivate));
394 hildon_set_password_dialog_init (HildonSetPasswordDialog *dialog)
396 /* Most of the initializations are done in create_contents()
397 after the 'modify_protection' property has been set */
399 gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
403 /* We come here when response button is clicked and dialog
404 is used to change existing password. */
406 hildon_set_password_response_change (GtkDialog *dialog,
410 GtkEntry *pwd1st_entry;
411 GtkEntry *pwd2nd_entry;
416 HildonSetPasswordDialogPrivate *priv;
418 priv = HILDON_SET_PASSWORD_DIALOG_GET_PRIVATE (dialog);
421 /* Password and verification */
422 pwd1st_entry = GTK_ENTRY (gtk_bin_get_child
423 (GTK_BIN (priv->pwd1st_caption)));
424 pwd2nd_entry = GTK_ENTRY (gtk_bin_get_child
425 (GTK_BIN (priv->pwd2nd_caption)));
426 text1 = GTK_ENTRY (pwd1st_entry)->text;
427 text2 = GTK_ENTRY (pwd2nd_entry)->text;
429 /* User accepted the dialog */
430 if (arg1 == GTK_RESPONSE_OK) {
431 /* Is the checkbox marked, so password protection is still in use? */
432 if (hildon_check_button_get_active (HILDON_CHECK_BUTTON (priv->checkbox))){
433 /* Yes, Something is given as password as well? */
434 if (text1[0] != '\0') {
435 if (strcmp (text1, text2) == 0) {
436 /* Passwords match, so accept change password */
437 priv->protection = TRUE;
439 } else if (text2[0] == '\0') {
440 /* Second field is empty, so show error, but don't clear fields */
441 g_signal_stop_emission_by_name (G_OBJECT(dialog),
444 hildon_banner_show_information (GTK_WIDGET (dialog), NULL,
445 c_(HILDON_SET_PASSWORD_DIALOG_MISMATCH));
447 gtk_widget_grab_focus (GTK_WIDGET (pwd2nd_entry));
450 /* Error: Passwords don't match, so start over */
451 g_signal_stop_emission_by_name (G_OBJECT(dialog),
454 hildon_entry_set_text (HILDON_ENTRY (pwd1st_entry), "");
455 hildon_entry_set_text (HILDON_ENTRY (pwd2nd_entry), "");
457 hildon_banner_show_information (GTK_WIDGET (dialog), NULL,
458 c_(HILDON_SET_PASSWORD_DIALOG_MISMATCH));
460 gtk_widget_grab_focus (GTK_WIDGET (pwd1st_entry));
463 /* No, the password is empty */
464 g_signal_stop_emission_by_name (G_OBJECT (dialog), "response");
466 if (text2[0] == '\0') {
467 /* Error: Both fields are empty */
468 hildon_banner_show_information (GTK_WIDGET (dialog), NULL, c_(HILDON_SET_PASSWORD_DIALOG_EMPTY));
470 /* Error: Second field doesn't match
471 the empty first field, so start over */
472 hildon_banner_show_information (GTK_WIDGET (dialog), NULL, c_(HILDON_SET_PASSWORD_DIALOG_MISMATCH));
473 hildon_entry_set_text (HILDON_ENTRY (pwd2nd_entry), "");
476 gtk_widget_grab_focus (GTK_WIDGET (pwd1st_entry));
479 /* No, user wants to remove password protection.
480 Confirm remove password protection */
481 note = HILDON_NOTE (hildon_note_new_confirmation
482 (GTK_WINDOW (dialog),
483 c_(HILDON_SET_PASSWORD_DIALOG_REMOVE_PROTECTION)));
485 hildon_note_set_button_texts
487 c_(HILDON_REMOVE_PROTECTION_CONFIRMATION_REMOVE),
488 c_(HILDON_REMOVE_PROTECTION_CONFIRMATION_CANCEL));
490 /* Display confirmation note */
491 i = gtk_dialog_run (GTK_DIALOG (note));
493 gtk_widget_destroy (GTK_WIDGET (note));
495 if (i == GTK_RESPONSE_OK)
496 /* Remove password protection */
497 priv->protection = FALSE;
499 /* Remove password protection cancelled */
500 priv->protection = TRUE;
501 g_signal_stop_emission_by_name (G_OBJECT(dialog), "response");
506 /* Watch out for fading boolean values */
507 priv->protection = TRUE;
511 /* We come here when response button is clicked and dialog
512 is used to set new password. */
514 hildon_set_password_response_set (GtkDialog *dialog,
518 GtkEntry *pwd1st_entry;
519 GtkEntry *pwd2nd_entry;
523 HildonSetPasswordDialogPrivate *priv;
525 priv = HILDON_SET_PASSWORD_DIALOG_GET_PRIVATE (dialog);
528 /* Password and confirmation */
529 pwd1st_entry = GTK_ENTRY (gtk_bin_get_child
530 (GTK_BIN (priv->pwd1st_caption)));
532 pwd2nd_entry = GTK_ENTRY (gtk_bin_get_child
533 (GTK_BIN (priv->pwd2nd_caption)));
535 text1 = GTK_ENTRY (pwd1st_entry)->text;
536 text2 = GTK_ENTRY (pwd2nd_entry)->text;
538 if (arg1 == GTK_RESPONSE_OK) {
539 /* User provided something for password? */
540 if (text1[0] != '\0') {
541 if (strcmp (text1, text2) == 0) {
542 /* Passwords match, so accept set password */
543 priv->protection = TRUE;
545 } else if (text2[0] == '\0') {
546 /* Second field is empty, so show error,
547 but don't clear the fields */
548 g_signal_stop_emission_by_name (G_OBJECT(dialog), "response");
549 hildon_banner_show_information (GTK_WIDGET (dialog), NULL, c_(HILDON_SET_PASSWORD_DIALOG_MISMATCH));
551 gtk_widget_grab_focus (GTK_WIDGET (priv->pwd2nd_entry));
554 /* Error: Passwords don't match, so start over */
555 g_signal_stop_emission_by_name (G_OBJECT(dialog), "response");
556 hildon_entry_set_text (HILDON_ENTRY (pwd1st_entry), "");
557 hildon_entry_set_text (HILDON_ENTRY (pwd2nd_entry), "");
558 hildon_banner_show_information (GTK_WIDGET (dialog), NULL, c_(HILDON_SET_PASSWORD_DIALOG_MISMATCH));
560 gtk_widget_grab_focus (GTK_WIDGET (priv->pwd1st_entry));
563 /* First field is empty */
564 g_signal_stop_emission_by_name (G_OBJECT (dialog), "response");
565 if (text2[0] == '\0') {
566 /* Error: Both fields are empty */
567 hildon_banner_show_information (GTK_WIDGET (dialog), NULL, c_(HILDON_SET_PASSWORD_DIALOG_EMPTY));
569 /* Error: Second field doesn't match
570 the empty first field, so start over */
571 hildon_banner_show_information (GTK_WIDGET (dialog), NULL, c_(HILDON_SET_PASSWORD_DIALOG_MISMATCH));
572 hildon_entry_set_text (HILDON_ENTRY (pwd2nd_entry), "");
575 gtk_widget_grab_focus (GTK_WIDGET (pwd1st_entry));
578 /* Watch out for fading boolean values */
579 priv->protection = FALSE;
584 hildon_checkbox_toggled (GtkWidget *widget,
587 HildonSetPasswordDialogPrivate *priv = HILDON_SET_PASSWORD_DIALOG_GET_PRIVATE (dialog);
592 /* If the user enabled/disabled the password protection feature
593 we enable/disable password entries accordingly */
594 active = hildon_check_button_get_active (HILDON_CHECK_BUTTON (widget));
595 gtk_widget_set_sensitive (GTK_WIDGET (priv->pwd1st_entry), active);
596 gtk_widget_set_sensitive (GTK_WIDGET (priv->pwd2nd_entry), active);
600 * hildon_set_password_dialog_get_type:
602 * Returns GType for HildonPasswordDialog as produced by
603 * g_type_register_static().
605 * Returns: HildonSetPasswordDialog type
608 hildon_set_password_dialog_get_type (void)
610 static GType dialog_type = 0;
613 static const GTypeInfo dialog_info = {
614 sizeof (HildonSetPasswordDialogClass),
615 NULL, /* base_init */
616 NULL, /* base_finalize */
617 (GClassInitFunc) hildon_set_password_dialog_class_init,
618 NULL, /* class_finalize */
619 NULL, /* class_data */
620 sizeof (HildonSetPasswordDialog),
622 (GInstanceInitFunc) hildon_set_password_dialog_init
625 dialog_type = g_type_register_static (GTK_TYPE_DIALOG,
626 "HildonSetPasswordDialog",
634 * hildon_set_password_dialog_new:
635 * @parent: parent window; can be NULL
636 * @modify_protection: TRUE creates a new change password dialog and FALSE
637 * creates a new set password dialog
639 * Constructs a new HildonSetPasswordDialog.
641 * Returns: a new #GtkWidget of type HildonSetPasswordDialog
644 hildon_set_password_dialog_new (GtkWindow *parent,
645 gboolean modify_protection)
647 return hildon_set_password_dialog_new_with_default (parent, "", modify_protection);
651 * hildon_set_password_dialog_new_with_default:
652 * @parent: parent window; can be NULL
653 * @password: a default password to be shown in password field
654 * @modify_protection: TRUE creates a new change password dialog and FALSE
655 * creates a new set password dialog
657 * Same as #hildon_set_password_dialog_new, but with a default password
660 * Returns: a new #GtkWidget of type HildonSetPasswordDialog
664 hildon_set_password_dialog_new_with_default (GtkWindow *parent,
665 const gchar *password,
666 gboolean modify_protection)
668 GtkWidget *dialog = g_object_new (HILDON_TYPE_SET_PASSWORD_DIALOG,
669 "modify_protection", modify_protection,
670 "password", password, NULL);
672 if (parent != NULL) {
673 gtk_window_set_transient_for (GTK_WINDOW (dialog), parent);
680 * hildon_set_password_dialog_get_password:
681 * @dialog: pointer to HildonSetPasswordDialog
683 * Returns current password.
685 * Returns: changed password ( if the dialog is successfully
686 * accepted with 'OK' ( and when the check box is 'ON' ( in Change Password
690 hildon_set_password_dialog_get_password (HildonSetPasswordDialog *dialog)
692 HildonSetPasswordDialogPrivate *priv;
694 g_return_val_if_fail (HILDON_IS_SET_PASSWORD_DIALOG (dialog), NULL);
696 priv = HILDON_SET_PASSWORD_DIALOG_GET_PRIVATE (dialog);
699 return GTK_ENTRY (priv->pwd1st_entry)->text;
703 * hildon_set_password_dialog_get_protected:
704 * @dialog: pointer to HildonSetPasswordDialog
706 * Returns the protection mode.
708 * Returns: password protection mode ( TRUE when the protection is
709 * 'ON' and FALSE when the protection is 'OFF' )
712 hildon_set_password_dialog_get_protected (HildonSetPasswordDialog *dialog)
714 HildonSetPasswordDialogPrivate *priv;
716 g_return_val_if_fail (HILDON_IS_SET_PASSWORD_DIALOG (dialog), FALSE);
718 priv = HILDON_SET_PASSWORD_DIALOG_GET_PRIVATE (dialog);
721 return priv->protection;
725 * hildon_set_password_dialog_set_message:
726 * @dialog: the dialog
727 * @message: the message or some other descriptive text to be set
729 * Sets the optional descriptive text.
732 hildon_set_password_dialog_set_message (HildonSetPasswordDialog *dialog,
733 const gchar *message)
735 HildonSetPasswordDialogPrivate *priv = NULL;
737 g_return_if_fail (HILDON_IS_SET_PASSWORD_DIALOG (dialog));
739 priv = HILDON_SET_PASSWORD_DIALOG_GET_PRIVATE (dialog);
742 gtk_label_set_text (priv->message_label, message);