2 * This file is a part of hildon
4 * Copyright (C) 2005, 2006 Nokia Corporation, all rights reserved.
6 * Contact: Michael Dominic Kostrzewa <michael.kostrzewa@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.
46 #include "hildon-set-password-dialog.h"
47 #include <gdk/gdkkeysyms.h>
55 #include "hildon-caption.h"
56 #include "hildon-note.h"
57 #include "hildon-defines.h"
58 #include "hildon-banner.h"
60 #include "hildon-set-password-dialog-private.h"
62 #define HILDON_SET_PASSWORD_DIALOG_TITLE "ecdg_ti_set_password"
64 #define HILDON_SET_PASSWORD_DIALOG_PASSWORD "ecdg_fi_set_passwd_enter_pwd"
66 #define HILDON_SET_PASSWORD_DIALOG_VERIFY_PASSWORD "ecdg_fi_set_passwd_confirm"
68 #define HILDON_SET_PASSWORD_DIALOG_OK "ecdg_bd_set_password_dialog_ok"
70 #define HILDON_SET_PASSWORD_DIALOG_CANCEL "ecdg_bd_set_password_dialog_cancel"
72 #define HILDON_SET_MODIFY_PASSWORD_DIALOG_TITLE "ckdg_ti_dialog_c_passwd_change_password"
74 #define HILDON_SET_MODIFY_PASSWORD_DIALOG_LABEL "ckdg_fi_dialog_c_passwd_pwd_protect"
76 #define HILDON_SET_MODIFY_PASSWORD_DIALOG_PASSWORD "ckdg_fi_dialog_c_passwd_new_pwd"
78 #define HILDON_SET_MODIFY_PASSWORD_DIALOG_VERIFY_PASSWORD "ckdg_fi_dialog_c_passwd_ver_pwd"
80 #define HILDON_SET_MODIFY_PASSWORD_DIALOG_OK "ckdg_bd_change_password_dialog_ok"
82 #define HILDON_SET_MODIFY_PASSWORD_DIALOG_CANCEL "ckdg_bd_change_password_dialog_cancel"
84 #define HILDON_SET_PASSWORD_DIALOG_MISMATCH "ecdg_ib_passwords_do_not_match"
86 #define HILDON_SET_PASSWORD_DIALOG_EMPTY "ecdg_ib_password_is_empty"
88 #define HILDON_SET_PASSWORD_DIALOG_REMOVE_PROTECTION "ckdg_nc_dialog_c_passwd_remove_pwd"
90 #define HILDON_REMOVE_PROTECTION_CONFIRMATION_REMOVE "ckdg_bd_dialog_c_passwd_remove_button"
92 #define HILDON_REMOVE_PROTECTION_CONFIRMATION_CANCEL "ckdg_bd_dialog_c_passwd_cancel_button"
94 #define _(String) dgettext("hildon-libs", String)
96 #define c_(String) dgettext("hildon-common-strings", String)
98 static GtkDialogClass* parent_class;
101 hildon_set_password_dialog_class_init (HildonSetPasswordDialogClass *class);
104 hildon_set_password_dialog_init (HildonSetPasswordDialog *dialog);
107 hildon_checkbox_toggled (GtkWidget *widget,
111 hildon_set_password_response_change (GtkDialog *d,
116 hildon_set_password_response_set (GtkDialog * d,
121 create_contents (HildonSetPasswordDialog *dialog);
124 hildon_set_password_set_property (GObject *object,
130 hildon_set_password_get_property (GObject *object,
140 PROP_HILDON_PASSWORD_DIALOG
144 hildon_set_password_set_property (GObject *object,
149 HildonSetPasswordDialog *dialog = HILDON_SET_PASSWORD_DIALOG (object);
150 HildonSetPasswordDialogPrivate *priv;
152 priv = HILDON_SET_PASSWORD_DIALOG_GET_PRIVATE (dialog);
158 /* Update domain label to display new value */
159 gtk_label_set_text (priv->message_label, g_value_get_string (value));
163 /* Update password entry to display new value */
164 gtk_entry_set_text (GTK_ENTRY (priv->pwd1st_entry), g_value_get_string (value));
167 case PROP_HILDON_PASSWORD_DIALOG:
168 /* Note this is a G_PARAM_CONSTRUCT_ONLY type property */
169 priv->protection = g_value_get_boolean (value);
171 /* We now have the necessary information to populate the dialog */
172 /* FIXME It looks kinda extremally bad that this is here...
173 * what about situations where this prop is NOT set during
175 create_contents (dialog);
179 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
185 hildon_set_password_get_property (GObject *object,
190 HildonSetPasswordDialogPrivate *priv = NULL;
192 priv = HILDON_SET_PASSWORD_DIALOG_GET_PRIVATE (object);
198 g_value_set_string (value, gtk_label_get_text (priv->message_label));
202 g_value_set_string (value,
203 gtk_entry_get_text (GTK_ENTRY (priv->pwd1st_entry)));
206 case PROP_HILDON_PASSWORD_DIALOG:
207 g_value_set_boolean (value, priv->protection);
211 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
218 create_contents (HildonSetPasswordDialog *dialog)
220 HildonSetPasswordDialogPrivate *priv = NULL;
224 priv = HILDON_SET_PASSWORD_DIALOG_GET_PRIVATE (dialog);
226 priv->checkbox = NULL;
228 /* Size group for labels */
229 group = GTK_SIZE_GROUP (gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL));
231 gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
233 /* Setup and pack domain label */
234 priv->message_label = GTK_LABEL (gtk_label_new (NULL));
235 gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
236 GTK_WIDGET(priv->message_label), FALSE, FALSE, 0);
237 gtk_widget_show (GTK_WIDGET (priv->message_label));
239 if (priv->protection == TRUE) {
240 /* Use Change Password Dialog strings */
241 priv->pwd1st_caption_string = _(HILDON_SET_MODIFY_PASSWORD_DIALOG_PASSWORD);
242 priv->pwd2nd_caption_string = _(HILDON_SET_MODIFY_PASSWORD_DIALOG_VERIFY_PASSWORD);
244 /* Setup checkbox to enable/disable password protection */
245 priv->checkbox = gtk_check_button_new ();
246 gtk_widget_show (priv->checkbox);
247 priv->checkbox_caption = hildon_caption_new
249 _(HILDON_SET_MODIFY_PASSWORD_DIALOG_LABEL),
251 NULL, HILDON_CAPTION_OPTIONAL);
252 hildon_caption_set_separator (HILDON_CAPTION (priv->checkbox_caption), "");
253 gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
254 priv->checkbox_caption, TRUE, TRUE, 0);
255 gtk_widget_show (priv->checkbox_caption);
256 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->checkbox),
258 gtk_signal_connect (GTK_OBJECT (priv->checkbox), "toggled",
259 G_CALLBACK (hildon_checkbox_toggled), dialog);
261 /* Setup appropriate response handler */
262 g_signal_connect (G_OBJECT (dialog), "response",
263 G_CALLBACK (hildon_set_password_response_change),
266 /* Use Set Password Dialog strings */
267 priv->pwd1st_caption_string = _(HILDON_SET_PASSWORD_DIALOG_PASSWORD);
268 priv->pwd2nd_caption_string = _(HILDON_SET_PASSWORD_DIALOG_VERIFY_PASSWORD);
270 /* Setup appropriate response handler */
271 g_signal_connect (G_OBJECT (dialog), "response",
272 G_CALLBACK(hildon_set_password_response_set),
276 /* Create the password field */
277 priv->pwd1st_entry = gtk_entry_new ();
280 g_object_set (priv->pwd1st_entry, "hildon-input-mode", HILDON_GTK_INPUT_MODE_FULL, NULL);
283 gtk_entry_set_visibility (GTK_ENTRY(priv->pwd1st_entry), FALSE);
284 gtk_widget_show (priv->pwd1st_entry);
285 priv->pwd1st_caption = hildon_caption_new (group,
286 priv->pwd1st_caption_string,
288 NULL, HILDON_CAPTION_OPTIONAL);
290 hildon_caption_set_separator (HILDON_CAPTION(priv->pwd1st_caption), "");
291 gtk_entry_set_visibility (GTK_ENTRY (priv->pwd1st_entry), FALSE);
292 gtk_box_pack_start (GTK_BOX(GTK_DIALOG (dialog)->vbox),
293 priv->pwd1st_caption, TRUE, TRUE, 0);
294 gtk_widget_show (priv->pwd1st_caption);
296 /* Create the password verify field */
297 priv->pwd2nd_entry = gtk_entry_new();
300 g_object_set (priv->pwd2nd_entry, "hildon-input-mode", HILDON_GTK_INPUT_MODE_FULL, NULL);
303 gtk_widget_show (priv->pwd2nd_entry);
304 priv->pwd2nd_caption = hildon_caption_new (group,
305 priv->pwd2nd_caption_string,
307 NULL, HILDON_CAPTION_OPTIONAL);
308 hildon_caption_set_separator (HILDON_CAPTION (priv->pwd2nd_caption), "");
309 gtk_entry_set_visibility (GTK_ENTRY (priv->pwd2nd_entry), FALSE);
310 gtk_box_pack_start (GTK_BOX(GTK_DIALOG (dialog)->vbox),
311 priv->pwd2nd_caption, TRUE, TRUE, 0);
312 gtk_widget_show (priv->pwd2nd_caption);
314 /* Set dialog title */
315 gtk_window_set_title (GTK_WINDOW (dialog),
317 ? HILDON_SET_MODIFY_PASSWORD_DIALOG_TITLE
318 : HILDON_SET_PASSWORD_DIALOG_TITLE));
320 /* Create the OK/CANCEL buttons */
321 gtk_dialog_add_button (GTK_DIALOG (dialog), _(priv->protection
322 ? HILDON_SET_MODIFY_PASSWORD_DIALOG_OK
323 : HILDON_SET_PASSWORD_DIALOG_OK), GTK_RESPONSE_OK);
325 gtk_dialog_add_button (GTK_DIALOG (dialog), _(priv->protection
326 ? HILDON_SET_MODIFY_PASSWORD_DIALOG_CANCEL
327 : HILDON_SET_PASSWORD_DIALOG_CANCEL), GTK_RESPONSE_CANCEL);
329 gtk_widget_show_all (GTK_DIALOG (dialog)->vbox);
330 gtk_widget_show_all (GTK_DIALOG (dialog)->action_area);
332 /* Ensure group is freed when all its contents have been removed */
333 g_object_unref (group);
337 hildon_set_password_dialog_class_init (HildonSetPasswordDialogClass *class)
339 GObjectClass *object_class = G_OBJECT_CLASS (class);
341 parent_class = g_type_class_peek_parent (class);
343 /* Override virtual methods */
344 object_class->set_property = hildon_set_password_set_property;
345 object_class->get_property = hildon_set_password_get_property;
347 /* Install new properties */
348 g_object_class_install_property (object_class,
350 g_param_spec_string ("message",
352 "A message to display to the user",
357 * HildonSetPasswordDialog:modify-protection:
361 g_object_class_install_property (object_class,
362 PROP_HILDON_PASSWORD_DIALOG,
363 g_param_spec_boolean ("modify-protection",
365 "Set type to dialog",
367 G_PARAM_CONSTRUCT_ONLY |
371 * HildonSetPasswordDialog:password:
373 * Content of the password field.
375 g_object_class_install_property (object_class,
377 g_param_spec_string ("password",
379 "Set content to dialog",
383 /* Install private structure */
384 g_type_class_add_private (class,
385 sizeof (HildonSetPasswordDialogPrivate));
389 hildon_set_password_dialog_init (HildonSetPasswordDialog *dialog)
391 /* Most of the initializations are done in create_contents()
392 after the 'modify_protection' property has been set */
394 gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
398 /* We come here when response button is clicked and dialog
399 is used to change existing password. */
401 hildon_set_password_response_change (GtkDialog *dialog,
405 GtkEntry *pwd1st_entry;
406 GtkEntry *pwd2nd_entry;
411 HildonSetPasswordDialogPrivate *priv;
413 priv = HILDON_SET_PASSWORD_DIALOG_GET_PRIVATE (dialog);
416 /* Password and verification */
417 pwd1st_entry = GTK_ENTRY (gtk_bin_get_child
418 (GTK_BIN (priv->pwd1st_caption)));
419 pwd2nd_entry = GTK_ENTRY (gtk_bin_get_child
420 (GTK_BIN (priv->pwd2nd_caption)));
421 text1 = GTK_ENTRY (pwd1st_entry)->text;
422 text2 = GTK_ENTRY (pwd2nd_entry)->text;
424 /* User accepted the dialog */
425 if (arg1 == GTK_RESPONSE_OK) {
426 /* Is the checkbox marked, so password protection is still in use? */
427 if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->checkbox))){
428 /* Yes, Something is given as password as well? */
429 if (text1[0] != '\0') {
430 if (strcmp (text1, text2) == 0) {
431 /* Passwords match, so accept change password */
432 priv->protection = TRUE;
434 } else if (text2[0] == '\0') {
435 /* Second field is empty, so show error, but don't clear fields */
436 g_signal_stop_emission_by_name (G_OBJECT(dialog),
439 hildon_banner_show_information (GTK_WIDGET (dialog), NULL,
440 c_(HILDON_SET_PASSWORD_DIALOG_MISMATCH));
442 gtk_widget_grab_focus (GTK_WIDGET (pwd2nd_entry));
445 /* Error: Passwords don't match, so start over */
446 g_signal_stop_emission_by_name (G_OBJECT(dialog),
449 gtk_entry_set_text (pwd1st_entry, "");
450 gtk_entry_set_text (pwd2nd_entry, "");
452 hildon_banner_show_information (GTK_WIDGET (dialog), NULL,
453 c_(HILDON_SET_PASSWORD_DIALOG_MISMATCH));
455 gtk_widget_grab_focus (GTK_WIDGET (pwd1st_entry));
458 /* No, the password is empty */
459 g_signal_stop_emission_by_name (G_OBJECT (dialog), "response");
461 if (text2[0] == '\0') {
462 /* Error: Both fields are empty */
463 hildon_banner_show_information (GTK_WIDGET (dialog), NULL, c_(HILDON_SET_PASSWORD_DIALOG_EMPTY));
465 /* Error: Second field doesn't match
466 the empty first field, so start over */
467 hildon_banner_show_information (GTK_WIDGET (dialog), NULL, c_(HILDON_SET_PASSWORD_DIALOG_MISMATCH));
468 gtk_entry_set_text(pwd2nd_entry, "");
471 gtk_widget_grab_focus (GTK_WIDGET (pwd1st_entry));
474 /* No, user wants to remove password protection.
475 Confirm remove password protection */
476 note = HILDON_NOTE (hildon_note_new_confirmation
477 (GTK_WINDOW (dialog),
478 c_(HILDON_SET_PASSWORD_DIALOG_REMOVE_PROTECTION)));
480 hildon_note_set_button_texts
482 c_(HILDON_REMOVE_PROTECTION_CONFIRMATION_REMOVE),
483 c_(HILDON_REMOVE_PROTECTION_CONFIRMATION_CANCEL));
485 /* Display confirmation note */
486 i = gtk_dialog_run (GTK_DIALOG (note));
488 gtk_widget_destroy (GTK_WIDGET (note));
490 if (i == GTK_RESPONSE_OK)
491 /* Remove password protection */
492 priv->protection = FALSE;
494 /* Remove password protection cancelled */
495 priv->protection = TRUE;
496 g_signal_stop_emission_by_name (G_OBJECT(dialog), "response");
501 /* Watch out for fading boolean values */
502 priv->protection = TRUE;
506 /* We come here when response button is clicked and dialog
507 is used to set new password. */
509 hildon_set_password_response_set (GtkDialog *dialog,
513 GtkEntry *pwd1st_entry;
514 GtkEntry *pwd2nd_entry;
518 HildonSetPasswordDialogPrivate *priv;
520 priv = HILDON_SET_PASSWORD_DIALOG_GET_PRIVATE (dialog);
523 /* Password and confirmation */
524 pwd1st_entry = GTK_ENTRY (gtk_bin_get_child
525 (GTK_BIN (priv->pwd1st_caption)));
527 pwd2nd_entry = GTK_ENTRY (gtk_bin_get_child
528 (GTK_BIN (priv->pwd2nd_caption)));
530 text1 = GTK_ENTRY (pwd1st_entry)->text;
531 text2 = GTK_ENTRY (pwd2nd_entry)->text;
533 if (arg1 == GTK_RESPONSE_OK) {
534 /* User provided something for password? */
535 if (text1[0] != '\0') {
536 if (strcmp (text1, text2) == 0) {
537 /* Passwords match, so accept set password */
538 priv->protection = TRUE;
540 } else if (text2[0] == '\0') {
541 /* Second field is empty, so show error,
542 but don't clear the fields */
543 g_signal_stop_emission_by_name (G_OBJECT(dialog), "response");
544 hildon_banner_show_information (GTK_WIDGET (dialog), NULL, c_(HILDON_SET_PASSWORD_DIALOG_MISMATCH));
546 gtk_widget_grab_focus (GTK_WIDGET (priv->pwd2nd_entry));
549 /* Error: Passwords don't match, so start over */
550 g_signal_stop_emission_by_name (G_OBJECT(dialog), "response");
551 gtk_entry_set_text (pwd1st_entry, "");
552 gtk_entry_set_text (pwd2nd_entry, "");
553 hildon_banner_show_information (GTK_WIDGET (dialog), NULL, c_(HILDON_SET_PASSWORD_DIALOG_MISMATCH));
555 gtk_widget_grab_focus (GTK_WIDGET (priv->pwd1st_entry));
558 /* First field is empty */
559 g_signal_stop_emission_by_name (G_OBJECT (dialog), "response");
560 if (text2[0] == '\0') {
561 /* Error: Both fields are empty */
562 hildon_banner_show_information (GTK_WIDGET (dialog), NULL, c_(HILDON_SET_PASSWORD_DIALOG_EMPTY));
564 /* Error: Second field doesn't match
565 the empty first field, so start over */
566 hildon_banner_show_information (GTK_WIDGET (dialog), NULL, c_(HILDON_SET_PASSWORD_DIALOG_MISMATCH));
567 gtk_entry_set_text (pwd2nd_entry, "");
570 gtk_widget_grab_focus (GTK_WIDGET (pwd1st_entry));
573 /* Watch out for fading boolean values */
574 priv->protection = FALSE;
579 hildon_checkbox_toggled (GtkWidget *widget,
582 HildonSetPasswordDialogPrivate *priv = HILDON_SET_PASSWORD_DIALOG_GET_PRIVATE (dialog);
587 /* If the user enabled/disabled the password protection feature
588 we enable/disable password entries accordingly */
589 active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
590 gtk_widget_set_sensitive (GTK_WIDGET (priv->pwd1st_entry), active);
591 gtk_widget_set_sensitive (GTK_WIDGET (priv->pwd2nd_entry), active);
595 * hildon_set_password_dialog_get_type:
597 * Returns GType for HildonPasswordDialog as produced by
598 * g_type_register_static().
600 * Returns: HildonSetPasswordDialog type
603 hildon_set_password_dialog_get_type (void)
605 static GType dialog_type = 0;
608 static const GTypeInfo dialog_info = {
609 sizeof (HildonSetPasswordDialogClass),
610 NULL, /* base_init */
611 NULL, /* base_finalize */
612 (GClassInitFunc) hildon_set_password_dialog_class_init,
613 NULL, /* class_finalize */
614 NULL, /* class_data */
615 sizeof (HildonSetPasswordDialog),
617 (GInstanceInitFunc) hildon_set_password_dialog_init
620 dialog_type = g_type_register_static (GTK_TYPE_DIALOG,
621 "HildonSetPasswordDialog",
629 * hildon_set_password_dialog_new:
630 * @parent: parent window; can be NULL
631 * @modify_protection: TRUE creates a new change password dialog and FALSE
632 * creates a new set password dialog
634 * Constructs a new HildonSetPasswordDialog.
636 * Returns: a new #GtkWidget of type HildonSetPasswordDialog
639 hildon_set_password_dialog_new (GtkWindow *parent,
640 gboolean modify_protection)
642 return hildon_set_password_dialog_new_with_default (parent, "", modify_protection);
646 * hildon_set_password_dialog_new_with_default:
647 * @parent: parent window; can be NULL
648 * @password: a default password to be shown in password field
649 * @modify_protection: TRUE creates a new change password dialog and FALSE
650 * creates a new set password dialog
652 * Same as #hildon_set_password_dialog_new, but with a default password
655 * Returns: a new #GtkWidget of type HildonSetPasswordDialog
659 hildon_set_password_dialog_new_with_default (GtkWindow *parent,
660 const gchar *password,
661 gboolean modify_protection)
663 GtkWidget *dialog = g_object_new (HILDON_TYPE_SET_PASSWORD_DIALOG,
664 "modify_protection", modify_protection,
665 "password", password, NULL);
667 if (parent != NULL) {
668 gtk_window_set_transient_for (GTK_WINDOW (dialog), parent);
675 * hildon_set_password_dialog_get_password:
676 * @dialog: pointer to HildonSetPasswordDialog
678 * Returns current password.
680 * Returns: changed password ( if the dialog is successfully
681 * accepted with 'OK' ( and when the check box is 'ON' ( in Change Password
685 hildon_set_password_dialog_get_password (HildonSetPasswordDialog *dialog)
687 HildonSetPasswordDialogPrivate *priv;
689 g_return_val_if_fail (HILDON_IS_SET_PASSWORD_DIALOG (dialog), NULL);
691 priv = HILDON_SET_PASSWORD_DIALOG_GET_PRIVATE (dialog);
694 return GTK_ENTRY (priv->pwd1st_entry)->text;
698 * hildon_set_password_dialog_get_protected:
699 * @dialog: pointer to HildonSetPasswordDialog
701 * Returns the protection mode.
703 * Returns: password protection mode ( TRUE when the protection is
704 * 'ON' and FALSE when the protection is 'OFF' )
707 hildon_set_password_dialog_get_protected (HildonSetPasswordDialog *dialog)
709 HildonSetPasswordDialogPrivate *priv;
711 g_return_val_if_fail (HILDON_IS_SET_PASSWORD_DIALOG (dialog), FALSE);
713 priv = HILDON_SET_PASSWORD_DIALOG_GET_PRIVATE (dialog);
716 return priv->protection;
720 * hildon_set_password_dialog_set_message:
721 * @dialog: the dialog
722 * @message: the message or some other descriptive text to be set
724 * Sets the optional descriptive text.
727 hildon_set_password_dialog_set_message (HildonSetPasswordDialog *dialog,
728 const gchar *message)
730 HildonSetPasswordDialogPrivate *priv = NULL;
732 g_return_if_fail (HILDON_IS_SET_PASSWORD_DIALOG (dialog));
734 priv = HILDON_SET_PASSWORD_DIALOG_GET_PRIVATE (dialog);
737 gtk_label_set_text (priv->message_label, message);