~unity8-desktop-session-team/indicator-session/indicator-session-using-upstart

« back to all changes in this revision

Viewing changes to src/backend-dbus/utils.c

  • Committer: Charles Kerr
  • Date: 2013-07-02 00:26:11 UTC
  • mto: This revision was merged to the branch mainline in revision 399.
  • Revision ID: charles.kerr@canonical.com-20130702002611-lhtxz8ouz9uc2ldx
in cmake/Translations.cmake, use the GNUInstallDirs variables

Show diffs side-by-side

added added

removed removed

Lines of Context:
126
126
                     gpointer                                      user_data)
127
127
{
128
128
  struct session_proxy_data * data;
129
 
  const char * str;
 
129
  char * seat_path;
130
130
 
131
131
  data = g_new0 (struct session_proxy_data, 1);
132
132
  data->callback = func;
133
133
  data->user_data = user_data;
134
134
  data->cancellable = g_object_ref (cancellable);
135
135
 
136
 
  /* login1 */
137
136
  data->pending++;
138
137
  login1_manager_proxy_new_for_bus (G_BUS_TYPE_SYSTEM,
139
138
                                    G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES,
142
141
                                    data->cancellable,
143
142
                                    on_login1_manager_ready, data);
144
143
 
145
 
  /* login1 seat */
146
 
  if ((str = g_getenv ("XDG_SEAT")))
147
 
    {
148
 
      char * path;
149
 
      data->pending++;
150
 
      path = g_strconcat ("/org/freedesktop/login1/seat/", str, NULL);
151
 
      login1_seat_proxy_new_for_bus (G_BUS_TYPE_SYSTEM,
 
144
  data->pending++;
 
145
  seat_path = g_strconcat ("/org/freedesktop/login1/seat/", g_getenv("XDG_SEAT"), NULL);
 
146
  login1_seat_proxy_new_for_bus (G_BUS_TYPE_SYSTEM,
152
147
                                 G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES,
153
148
                                 "org.freedesktop.login1",
154
 
                                 path,
 
149
                                 seat_path,
155
150
                                 data->cancellable,
156
151
                                 on_login1_seat_ready,
157
152
                                 data);
158
 
      g_free (path);
159
 
    }
160
 
 
161
 
  /* Accounts */
162
153
  data->pending++;
163
154
  accounts_proxy_new_for_bus (G_BUS_TYPE_SYSTEM,
164
155
                              G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES,
167
158
                              data->cancellable,
168
159
                              on_accounts_proxy_ready, data);
169
160
 
170
 
  /* DisplayManager seat */
171
 
  if ((str = g_getenv ("XDG_SEAT_PATH")))
172
 
    {
173
 
      data->pending++;
174
 
      display_manager_seat_proxy_new_for_bus (
 
161
  data->pending++;
 
162
  display_manager_seat_proxy_new_for_bus (
175
163
                               G_BUS_TYPE_SYSTEM,
176
164
                               G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES,
177
165
                               "org.freedesktop.DisplayManager",
178
 
                               str,
 
166
                               g_getenv ("XDG_SEAT_PATH"),
179
167
                               data->cancellable,
180
168
                               on_display_manager_seat_proxy_ready, data);
181
 
    }
 
169
 
 
170
  g_free (seat_path);
182
171
}