2007-02-06 Michael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
+ * examples/Makefile.am:
+ * examples/hildon-get-password-dialog-example.c:
+ * examples/hildon-login-dialog-example.c:
+ * examples/hildon-set-password-dialog-example.c: Adding examples for
+ password dialogs.
+
+ * src/hildon-get-password-dialog.c: Doc fix.
+
+ * src/hildon-login-dialog.c: Do not show the username as hidden field.
+
+2007-02-06 Michael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
+
* HACKING: Adding a HACKING file with some basic rules of styling and
code formatting.
MAINTAINERCLEANFILES = Makefile.in
if BUILD_EXAMPLES
-noinst_PROGRAMS = hildon-window-example \
- hildon-banner-example \
- hildon-caption-example \
- hildon-weekday-picker-example \
- hildon-sort-dialog-example \
- hildon-controlbar-example \
- hildon-note-example \
- hildon-time-picker-example \
- hildon-color-chooser-example \
- hildon-color-button-example \
- hildon-login-dialog-example \
- hildon-time-editor-example \
- hildon-icon-sizes-example \
- hildon-insensitive-example
+noinst_PROGRAMS = hildon-window-example \
+ hildon-banner-example \
+ hildon-caption-example \
+ hildon-weekday-picker-example \
+ hildon-sort-dialog-example \
+ hildon-controlbar-example \
+ hildon-note-example \
+ hildon-time-picker-example \
+ hildon-color-chooser-example \
+ hildon-color-button-example \
+ hildon-login-dialog-example \
+ hildon-time-editor-example \
+ hildon-icon-sizes-example \
+ hildon-insensitive-example \
+ hildon-get-password-dialog-example \
+ hildon-set-password-dialog-example
# HIldon window
hildon_window_example_LDADD = $(HILDON_OBJ_LIBS)
hildon_insensitive_example_CFLAGS = $(HILDON_OBJ_CFLAGS)
hildon_insensitive_example_SOURCES = hildon-insensitive-example.c
+# HIldon get password dialog example
+hildon_get_password_dialog_example_LDADD = $(HILDON_OBJ_LIBS)
+hildon_get_password_dialog_example_CFLAGS = $(HILDON_OBJ_CFLAGS)
+hildon_get_password_dialog_example_SOURCES = hildon-get-password-dialog-example.c
+
+# HIldon set password dialog example
+hildon_set_password_dialog_example_LDADD = $(HILDON_OBJ_LIBS)
+hildon_set_password_dialog_example_CFLAGS = $(HILDON_OBJ_CFLAGS)
+hildon_set_password_dialog_example_SOURCES = hildon-set-password-dialog-example.c
endif
--- /dev/null
+/*
+ * This file is a part of hildon examples
+ *
+ * Copyright (C) 2005, 2006 Nokia Corporation, all rights reserved.
+ *
+ * Author: Michael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; version 2.1 of
+ * the License.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <glib.h>
+#include <gtk/gtk.h>
+#include "hildon.h"
+
+int
+main (int argc,
+ char **args)
+{
+ gtk_init (&argc, &args);
+
+ GtkDialog *dialog = GTK_DIALOG (hildon_get_password_dialog_new (NULL, TRUE));
+
+ hildon_get_password_dialog_set_message ((HildonGetPasswordDialog *) dialog, "Enter secret password");
+
+ gtk_widget_show_all (GTK_WIDGET (dialog));
+ gtk_dialog_run (dialog);
+
+ g_debug ("Password: %s", hildon_get_password_dialog_get_password ((HildonGetPasswordDialog *) dialog));
+
+ return 0;
+}
+
+
#include "hildon.h"
int
-main (int argc, char **args)
+main (int argc,
+ char **args)
{
gtk_init (&argc, &args);
hildon_login_dialog_set_message ((HildonLoginDialog *) dialog, "Enter password to login");
-
gtk_widget_show_all (GTK_WIDGET (dialog));
gtk_dialog_run (dialog);
+
+ g_debug ("Password: %s", hildon_login_dialog_get_password ((HildonLoginDialog *) dialog));
+ g_debug ("Username: %s", hildon_login_dialog_get_username ((HildonLoginDialog *) dialog));
return 0;
}
--- /dev/null
+/*
+ * This file is a part of hildon examples
+ *
+ * Copyright (C) 2005, 2006 Nokia Corporation, all rights reserved.
+ *
+ * Author: Michael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; version 2.1 of
+ * the License.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <glib.h>
+#include <gtk/gtk.h>
+#include "hildon.h"
+
+int
+main (int argc,
+ char **args)
+{
+ gtk_init (&argc, &args);
+
+ GtkDialog *dialog = GTK_DIALOG (hildon_set_password_dialog_new (NULL, TRUE));
+
+ hildon_set_password_dialog_set_message ((HildonSetPasswordDialog *) dialog, "Enter new password");
+
+ gtk_widget_show_all (GTK_WIDGET (dialog));
+ gtk_dialog_run (dialog);
+
+ g_debug ("Password: %s", hildon_set_password_dialog_get_password ((HildonSetPasswordDialog *) dialog));
+
+ return 0;
+}
+
+
* @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,
+ * 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.
*
/* Setup username entry */
priv->username_entry = GTK_ENTRY (gtk_entry_new ());
g_object_set (priv->username_entry, "hildon-input-mode", HILDON_GTK_INPUT_MODE_FULL, NULL);
- gtk_entry_set_visibility (GTK_ENTRY (priv->username_entry), FALSE);
caption = HILDON_CAPTION (hildon_caption_new
(group,