[maemo-commits] [maemo-commits] r9689 - in projects/haf/branches/hildon-libs/hildon-1: . examples src

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Tue Feb 6 16:15:18 EET 2007
Author: mdk
Date: 2007-02-06 16:15:16 +0200 (Tue, 06 Feb 2007)
New Revision: 9689

Added:
   projects/haf/branches/hildon-libs/hildon-1/examples/hildon-get-password-dialog-example.c
   projects/haf/branches/hildon-libs/hildon-1/examples/hildon-set-password-dialog-example.c
Modified:
   projects/haf/branches/hildon-libs/hildon-1/ChangeLog.2
   projects/haf/branches/hildon-libs/hildon-1/examples/Makefile.am
   projects/haf/branches/hildon-libs/hildon-1/examples/hildon-login-dialog-example.c
   projects/haf/branches/hildon-libs/hildon-1/src/hildon-get-password-dialog.c
   projects/haf/branches/hildon-libs/hildon-1/src/hildon-login-dialog.c
Log:
Adding examples for password dialogs.
Doc fix.
Do not show the username as a hidden field.


Modified: projects/haf/branches/hildon-libs/hildon-1/ChangeLog.2
===================================================================
--- projects/haf/branches/hildon-libs/hildon-1/ChangeLog.2	2007-02-06 14:04:46 UTC (rev 9688)
+++ projects/haf/branches/hildon-libs/hildon-1/ChangeLog.2	2007-02-06 14:15:16 UTC (rev 9689)
@@ -1,5 +1,17 @@
 2007-02-06  Michael Dominic Kostrzewa  <michael.kostrzewa at 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 at nokia.com> 
+
 	* HACKING: Adding a HACKING file with some basic rules of styling and
 	code formatting.
 

Modified: projects/haf/branches/hildon-libs/hildon-1/examples/Makefile.am
===================================================================
--- projects/haf/branches/hildon-libs/hildon-1/examples/Makefile.am	2007-02-06 14:04:46 UTC (rev 9688)
+++ projects/haf/branches/hildon-libs/hildon-1/examples/Makefile.am	2007-02-06 14:15:16 UTC (rev 9689)
@@ -1,20 +1,22 @@
 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)
@@ -86,5 +88,14 @@
 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

Added: projects/haf/branches/hildon-libs/hildon-1/examples/hildon-get-password-dialog-example.c
===================================================================
--- projects/haf/branches/hildon-libs/hildon-1/examples/hildon-get-password-dialog-example.c	2007-02-06 14:04:46 UTC (rev 9688)
+++ projects/haf/branches/hildon-libs/hildon-1/examples/hildon-get-password-dialog-example.c	2007-02-06 14:15:16 UTC (rev 9689)
@@ -0,0 +1,49 @@
+/*
+ * This file is a part of hildon examples
+ *
+ * Copyright (C) 2005, 2006 Nokia Corporation, all rights reserved.
+ *
+ * Author: Michael Dominic Kostrzewa <michael.kostrzewa at 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;
+}
+
+

Modified: projects/haf/branches/hildon-libs/hildon-1/examples/hildon-login-dialog-example.c
===================================================================
--- projects/haf/branches/hildon-libs/hildon-1/examples/hildon-login-dialog-example.c	2007-02-06 14:04:46 UTC (rev 9688)
+++ projects/haf/branches/hildon-libs/hildon-1/examples/hildon-login-dialog-example.c	2007-02-06 14:15:16 UTC (rev 9689)
@@ -29,7 +29,8 @@
 #include                                        "hildon.h"
 
 int
-main (int argc, char **args)
+main                                            (int argc, 
+                                                 char **args)
 {
     gtk_init (&argc, &args);
     
@@ -37,9 +38,11 @@
     
     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;
 }

Added: projects/haf/branches/hildon-libs/hildon-1/examples/hildon-set-password-dialog-example.c
===================================================================
--- projects/haf/branches/hildon-libs/hildon-1/examples/hildon-set-password-dialog-example.c	2007-02-06 14:04:46 UTC (rev 9688)
+++ projects/haf/branches/hildon-libs/hildon-1/examples/hildon-set-password-dialog-example.c	2007-02-06 14:15:16 UTC (rev 9689)
@@ -0,0 +1,49 @@
+/*
+ * This file is a part of hildon examples
+ *
+ * Copyright (C) 2005, 2006 Nokia Corporation, all rights reserved.
+ *
+ * Author: Michael Dominic Kostrzewa <michael.kostrzewa at 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;
+}
+
+

Modified: projects/haf/branches/hildon-libs/hildon-1/src/hildon-get-password-dialog.c
===================================================================
--- projects/haf/branches/hildon-libs/hildon-1/src/hildon-get-password-dialog.c	2007-02-06 14:04:46 UTC (rev 9688)
+++ projects/haf/branches/hildon-libs/hildon-1/src/hildon-get-password-dialog.c	2007-02-06 14:15:16 UTC (rev 9689)
@@ -500,7 +500,7 @@
  * @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.
  *                        

Modified: projects/haf/branches/hildon-libs/hildon-1/src/hildon-login-dialog.c
===================================================================
--- projects/haf/branches/hildon-libs/hildon-1/src/hildon-login-dialog.c	2007-02-06 14:04:46 UTC (rev 9688)
+++ projects/haf/branches/hildon-libs/hildon-1/src/hildon-login-dialog.c	2007-02-06 14:15:16 UTC (rev 9689)
@@ -275,7 +275,6 @@
     /* 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,


More information about the maemo-commits mailing list