2008-04-15 13:21:13 <timj@imendio.com>
[hildon] / src / hildon-login-dialog.c
index 26920f0..931c91a 100644 (file)
@@ -8,7 +8,7 @@
  * 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.
+ * the License, or (at your option) any later version.
  *
  * This library is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -25,7 +25,7 @@
 /**
  * SECTION:hildon-login-dialog
  * @short_description: A widget which allows a user to enter an username
- * and a password
+ * and a password.
  * @see_also: #HildonGetPasswordDialog, #HildonSetPasswordDialog
  *
  * #HildonLoginDialog is used to enter a username and password
@@ -90,6 +90,13 @@ hildon_login_dialog_get_property                (GObject *object,
 
 static GtkDialogClass*                          parent_class;
 
+/**
+ * hildon_login_dialog_get_type:
+ *
+ * Returns GType for HildonLoginDialog.
+ *
+ * Returns: HildonLoginDialog type
+ */
 GType G_GNUC_CONST
 hildon_login_dialog_get_type                    (void)
 {
@@ -196,6 +203,12 @@ hildon_login_dialog_class_init                  (HildonLoginDialogClass *class)
     object_class->get_property = hildon_login_dialog_get_property;
 
     /* Install new properties */
+
+    /**
+     * HildonLoginDialog:message:
+     *
+     * Optional message displayed to the user.
+     */
     g_object_class_install_property (object_class, 
             PROP_MESSAGE, 
             g_param_spec_string ("message",
@@ -204,6 +217,11 @@ hildon_login_dialog_class_init                  (HildonLoginDialogClass *class)
                 NULL,
                 G_PARAM_READWRITE));
 
+    /**
+     * HildonLoginDialog:username:
+     *
+     * Contents of the username field.
+     */
     g_object_class_install_property (object_class,
             PROP_USERNAME, 
             g_param_spec_string ("username",
@@ -211,7 +229,12 @@ hildon_login_dialog_class_init                  (HildonLoginDialogClass *class)
                 "Username field",
                 "DEFAULT",
                 G_PARAM_READWRITE));
-
+    
+    /**
+     * HildonLoginDialog:password:
+     *
+     * Contents of the password field.
+     */
     g_object_class_install_property (object_class, 
             PROP_PASSWORD,
             g_param_spec_string ("password",
@@ -251,8 +274,10 @@ hildon_login_dialog_init                        (HildonLoginDialog *dialog)
 
     /* Setup username entry */
     priv->username_entry = GTK_ENTRY (gtk_entry_new ());
+
+#ifdef MAEMO_GTK 
     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);
+#endif
 
     caption = HILDON_CAPTION (hildon_caption_new
             (group,
@@ -266,7 +291,11 @@ hildon_login_dialog_init                        (HildonLoginDialog *dialog)
 
     /* Setup password entry */
     priv->password_entry = GTK_ENTRY (gtk_entry_new ());
+
+#ifdef MAEMO_GTK
     g_object_set (priv->password_entry, "hildon-input-mode", HILDON_GTK_INPUT_MODE_FULL, NULL);
+#endif
+
     gtk_entry_set_visibility (GTK_ENTRY (priv->password_entry), FALSE);
 
     caption = HILDON_CAPTION (hildon_caption_new (group,
@@ -313,7 +342,7 @@ hildon_login_dialog_new                         (GtkWindow *parent)
  * @name: default username, NULL if unset
  * @password: default password, NULL if unset
  * 
- * Same as #hildon_login_dialog_new, but with a 
+ * Same as #hildon_login_dialog_new but with a 
  * default username and password.
  *
  * Returns: the newly created #HildonLoginDialog
@@ -381,7 +410,8 @@ hildon_login_dialog_get_password                (HildonLoginDialog *dialog)
  * @dialog: the dialog
  * @msg: the message or some other descriptive text to be set
  * 
- * sets the optional descriptive text
+ * Sets the optional descriptive text that is displayed on the top 
+ * of the dialog. 
  */
 void 
 hildon_login_dialog_set_message                 (HildonLoginDialog *dialog,