enum
{
- LIST_PROP_0,
- LIST_PROP_NUM_USERS,
+ LIST_PROP_NUM_USERS = 1,
+ LIST_PROP_LENGTH,
LIST_PROP_USERS,
};
enum
{
- USER_PROP_0,
- USER_PROP_COMMON_USER,
+ USER_PROP_COMMON_USER = 1,
USER_PROP_NAME,
USER_PROP_REAL_NAME,
USER_PROP_DISPLAY_NAME,
}
static void
-lightdm_user_list_set_property (GObject *object,
- guint prop_id,
+lightdm_user_list_set_property (GObject *object,
+ guint prop_id,
const GValue *value,
- GParamSpec *pspec)
+ GParamSpec *pspec)
{
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
switch (prop_id)
{
case LIST_PROP_NUM_USERS:
+ case LIST_PROP_LENGTH:
g_value_set_int (value, lightdm_user_list_get_length (self));
break;
default:
"num-users",
"Number of login users",
0, G_MAXINT, 0,
+ G_PARAM_DEPRECATED | G_PARAM_READABLE));
+
+ g_object_class_install_property (object_class,
+ LIST_PROP_LENGTH,
+ g_param_spec_int ("length",
+ "length",
+ "Number of login users",
+ 0, G_MAXINT, 0,
G_PARAM_READABLE));
+
+ /*g_object_class_install_property (object_class,
+ LIST_PROP_USERS,
+ g_param_spec_int ("users",
+ "users",
+ "Users to present to user",
+ 0, G_MAXINT, 0,
+ G_PARAM_READABLE));*/
/**
* LightDMUserList::user-added:
* @user_list: A #LightDMUserList
*
* Get the image URI for a user.
*
- * Return value: The image URI for the given user or #NULL if no URI
+ * Return value: (nullable): The image URI for the given user or #NULL if no URI
**/
const gchar *
lightdm_user_get_image (LightDMUser *user)
*
* Get the background file path for a user.
*
- * Return value: The background file path for the given user or #NULL if no path
+ * Return value: (nullable): The background file path for the given user or #NULL if no path
**/
const gchar *
lightdm_user_get_background (LightDMUser *user)
*
* Get the language for a user.
*
- * Return value: The language in the form of a local specification (e.g. "de_DE.UTF-8") for the given user or #NULL if using the system default locale.
+ * Return value: (nullable): The language in the form of a local specification (e.g. "de_DE.UTF-8") for the given user or #NULL if using the system default locale.
**/
const gchar *
lightdm_user_get_language (LightDMUser *user)
*
* Get the keyboard layout for a user.
*
- * Return value: The keyboard layout for the given user or #NULL if using system defaults. Copy the value if you want to use it long term.
+ * Return value: (nullable): The keyboard layout for the given user or #NULL if using system defaults. Copy the value if you want to use it long term.
**/
const gchar *
lightdm_user_get_layout (LightDMUser *user)
*
* Get the session for a user.
*
- * Return value: The session for the given user or #NULL if using system defaults.
+ * Return value: (nullable): The session for the given user or #NULL if using system defaults.
**/
const gchar *
lightdm_user_get_session (LightDMUser *user)
"name",
"Username",
NULL,
- G_PARAM_READWRITE));
+ G_PARAM_READABLE));
g_object_class_install_property (object_class,
USER_PROP_REAL_NAME,
g_param_spec_string ("real-name",
"real-name",
"Users real name",
NULL,
- G_PARAM_READWRITE));
+ G_PARAM_READABLE));
g_object_class_install_property (object_class,
USER_PROP_DISPLAY_NAME,
g_param_spec_string ("display-name",
"home-directory",
"Home directory",
NULL,
- G_PARAM_READWRITE));
+ G_PARAM_READABLE));
g_object_class_install_property (object_class,
USER_PROP_IMAGE,
g_param_spec_string ("image",
"image",
"Avatar image",
NULL,
- G_PARAM_READWRITE));
+ G_PARAM_READABLE));
g_object_class_install_property (object_class,
USER_PROP_BACKGROUND,
g_param_spec_string ("background",
"background",
"User background",
NULL,
- G_PARAM_READWRITE));
+ G_PARAM_READABLE));
g_object_class_install_property (object_class,
USER_PROP_LANGUAGE,
g_param_spec_string ("language",
"logged-in",
"TRUE if the user is currently in a session",
FALSE,
- G_PARAM_READWRITE));
+ G_PARAM_READABLE));
g_object_class_install_property (object_class,
USER_PROP_LOGGED_IN,
g_param_spec_boolean ("has-messages",
"has-messages",
"TRUE if the user is has waiting messages",
FALSE,
- G_PARAM_READWRITE));
+ G_PARAM_READABLE));
g_object_class_install_property (object_class,
USER_PROP_UID,
- g_param_spec_string ("uid",
+ g_param_spec_uint64 ("uid",
"uid",
"User UID",
- NULL,
+ 0, G_MAXUINT64, 0,
G_PARAM_READABLE));
/**