* hildon-widgets/hildon-get-password-dialog.h, hildon-widgets/hildon-get-password...
authorMarius Vollmer <marius.vollmer@nokia.com>
Tue, 4 Apr 2006 06:49:12 +0000 (06:49 +0000)
committerMarius Vollmer <marius.vollmer@nokia.com>
Tue, 4 Apr 2006 06:49:12 +0000 (06:49 +0000)
ChangeLog
hildon-widgets/hildon-get-password-dialog.c
hildon-widgets/hildon-get-password-dialog.h
ut/hildon-widgets_tests.c

index 83e3c2c..0d75f1a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2006-04-04  Marius Vollmer  <marius.vollmer@nokia.com>
+
+       * hildon-widgets/hildon-get-password-dialog.h,
+       hildon-widgets/hildon-get-password-dialog.c
+       (hildon_get_password_dialog_new,
+       hildon_get_password_dialog_new_with_default): Renamed
+       get_old_password_title parameter to "get_old" to correspond with
+       the property name.  This helps the C++ bindings.
+       * ut/hildon-widgets_tests.c (test43, test44): New.
+
 2006-04-03  Marius Vollmer  <marius.vollmer@nokia.com>
 
        * ut/hildon-widgets_tests.c: Disabled unimplemented testcases:
index 6d835ae..60d3fe8 100644 (file)
@@ -380,21 +380,21 @@ GType hildon_get_password_dialog_get_type(void)
 /**
  * hildon_get_password_dialog_new:
  * @parent: parent window; can be NULL
- * @get_old_password_title: 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.  
+ * @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.  
  * 
  * Construct a new HildonGetPasswordDialog.
  *
  * Returns: a new #GtkWidget of type HildonGetPasswordDialog
  */
 GtkWidget *hildon_get_password_dialog_new(GtkWindow * parent,
-                                          gboolean get_old_password_title)
+                                          gboolean get_old)
 {
     HildonGetPasswordDialog *dialog = g_object_new
         (HILDON_TYPE_GET_PASSWORD_DIALOG,
-         "get-old", get_old_password_title, NULL);
+         "get-old", get_old, NULL);
 
     if (parent != NULL) {
         gtk_window_set_transient_for(GTK_WINDOW(dialog), parent);
@@ -407,10 +407,10 @@ GtkWidget *hildon_get_password_dialog_new(GtkWindow * parent,
  * hildon_get_password_dialog_new_with_default:
  * @parent: parent window; can be NULL
  * @password: a default password to be shown in password field
- * @get_old_password_title: 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.
+ * @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.
  *                        
  * 
  * Same as #hildon_get_password_dialog_new but with a default password
@@ -420,11 +420,11 @@ GtkWidget *hildon_get_password_dialog_new(GtkWindow * parent,
  */
 GtkWidget *hildon_get_password_dialog_new_with_default (GtkWindow * parent,
                                                        const gchar *password,
-                                               gboolean get_old_password_title)
+                                               gboolean get_old)
 {
     GtkWidget *dialog;
 
-    dialog = hildon_get_password_dialog_new(parent, get_old_password_title);
+    dialog = hildon_get_password_dialog_new(parent, get_old);
     if(password != NULL)
         g_object_set(G_OBJECT(dialog), "password", password, NULL);
 
index b881a42..1d46074 100644 (file)
@@ -72,11 +72,11 @@ struct _HildonGetPasswordDialogClass {
 GType      hildon_get_password_dialog_get_type(void) G_GNUC_CONST;
 
 GtkWidget *hildon_get_password_dialog_new              (GtkWindow   *parent,
-                                                        gboolean     get_old_password_title);
+                                                        gboolean     get_old);
 
 GtkWidget *hildon_get_password_dialog_new_with_default (GtkWindow   *parent,
                                                        const gchar *password,
-                                                       gboolean     get_old_password_title);
+                                                       gboolean     get_old);
 
 void       hildon_get_password_dialog_set_domain       (HildonGetPasswordDialog *dialog, 
                                                        const gchar             *domain);
index a423dc3..624b3fc 100644 (file)
@@ -340,6 +340,8 @@ int test41a(void);
 #endif
 
 int test42 (void);
+int test43 (void);
+int test44 (void);
 
 /* this has to be like this (not static). outo
    calls for this! */
@@ -2931,6 +2933,34 @@ int test42 ()
   return 1;
 }
 
+int test43 ()
+{
+  GtkWidget *dialog;
+
+  dialog = hildon_get_password_dialog_new (NULL, TRUE);
+  g_assert (dialog);
+
+  dialog = hildon_get_password_dialog_new (NULL, FALSE);
+  g_assert (dialog);
+
+  return 1;
+}
+
+int test44 ()
+{
+  GtkWidget *dialog;
+
+  dialog = hildon_get_password_dialog_new_with_default (NULL, "seekrit",
+                                                       TRUE);
+  g_assert (dialog);
+
+  dialog = hildon_get_password_dialog_new_with_default (NULL, "seekrit",
+                                                       FALSE);
+  g_assert (dialog);
+
+  return 1;
+}
+
 testcase tcases[] =
 {
     {*test1a, "hildon_controlbar_new", EXPECT_OK},
@@ -3155,6 +3185,8 @@ testcase tcases[] =
     {*test38a, "gtk_confirmation_banner (NULL)", EXPECT_OK},*/
 
     { test42, "hildon_caption_new", EXPECT_OK },
+    { test43, "hildon_get_password_dialog_new", EXPECT_OK },
+    { test44, "hildon_get_password_dialog_new_with_default", EXPECT_OK },
 
     {0} /*REMEMBER THE TERMINATING NULL*/
 };