~timovwb/lightdm/fix-for-868613

« back to all changes in this revision

Viewing changes to liblightdm-gobject/user.c

  • Committer: Robert Ancell
  • Date: 2011-10-05 23:26:07 UTC
  • Revision ID: robert.ancell@canonical.com-20111005232607-9ljd8w2wa9fdjm8v
Fix inconsistent usage of braces

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
#include "lightdm/user.h"
21
21
 
22
 
enum {
 
22
enum
 
23
{
23
24
    LIST_PROP_0,
24
25
    LIST_PROP_NUM_USERS,
25
26
    LIST_PROP_USERS,
26
27
};
27
28
 
28
 
enum {
 
29
enum
 
30
{
29
31
    USER_PROP_0,
30
32
    USER_PROP_NAME,
31
33
    USER_PROP_REAL_NAME,
38
40
    USER_PROP_LOGGED_IN
39
41
};
40
42
 
41
 
enum {
 
43
enum
 
44
{
42
45
    USER_ADDED,
43
46
    USER_CHANGED,
44
47
    USER_REMOVED,
46
49
};
47
50
static guint list_signals[LAST_LIST_SIGNAL] = { 0 };
48
51
 
49
 
enum {
 
52
enum
 
53
{
50
54
    CHANGED,
51
55
    LAST_USER_SIGNAL
52
56
};
900
904
 
901
905
    self = LIGHTDM_USER_LIST (object);
902
906
 
903
 
    switch (prop_id) {
 
907
    switch (prop_id)
 
908
    {
904
909
    case LIST_PROP_NUM_USERS:
905
910
        g_value_set_int (value, lightdm_user_list_get_length (self));
906
911
        break;
1126
1131
 
1127
1132
    answer = g_dbus_proxy_get_cached_property (proxy, property);
1128
1133
 
1129
 
    if (!answer) {
 
1134
    if (!answer)
 
1135
    {
1130
1136
        g_warning ("Could not get accounts property %s", property);
1131
1137
        return NULL;
1132
1138
    }
1133
1139
 
1134
 
    if (!g_variant_is_of_type (answer, G_VARIANT_TYPE ("s"))) {
 
1140
    if (!g_variant_is_of_type (answer, G_VARIANT_TYPE ("s")))
 
1141
    {
1135
1142
        g_warning ("Unexpected accounts property type for %s: %s",
1136
1143
                   property, g_variant_get_type_string (answer));
1137
1144
        g_variant_unref (answer);
1153
1160
    /* First, find AccountObject proxy */
1154
1161
    UserAccountObject *account = NULL;
1155
1162
    GList *iter;
1156
 
    for (iter = list_priv->user_account_objects; iter; iter = iter->next) {
1157
 
        if (((UserAccountObject *)iter->data)->user == user) {
 
1163
    for (iter = list_priv->user_account_objects; iter; iter = iter->next)
 
1164
    {
 
1165
        if (((UserAccountObject *)iter->data)->user == user)
 
1166
        {
1158
1167
            account = (UserAccountObject *)iter->data;
1159
1168
            break;
1160
1169
        }
1289
1298
 
1290
1299
    self = LIGHTDM_USER (object);
1291
1300
 
1292
 
    switch (prop_id) {
 
1301
    switch (prop_id)
 
1302
    {
1293
1303
    case USER_PROP_NAME:
1294
1304
        g_value_set_string (value, lightdm_user_get_name (self));
1295
1305
        break;