~ubuntu-branches/ubuntu/raring/gdm/raring

« back to all changes in this revision

Viewing changes to gui/simple-greeter/greeter-main.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-07-17 11:41:35 UTC
  • mfrom: (1.4.32 upstream)
  • Revision ID: james.westby@ubuntu.com-20090717114135-1ql0hht1lumoiscv
Tags: 2.26.1git20090717-0ubuntu1
* Update to latest upstream git head:
  - Make greeter login window be a dock. Fixes metacity complaining about
    session management. (LP: #395324)
* Drop patches which are fixed upstream:
  - 00git-greeter-session-management.patch
  - 00git-invalid-dmrc-layout.patch
  - 00git-use-after-free.patch
  - 00git-xklavier4.patch
  - 02_dont_force_us_keyboard.patch
  - 04_polkit1.patch
* 80_workaround_incorrect_directories.patch: Update to new upstream version.
* Drop 01_xconfigoptions.patch; these configure variables are not used any
  more in the upstream code, and upstream supplies the X.org -br option by
  default now. Also drop the corresponding configure changes from
  17_update_default_xserver.patch.
* Apply 15_usplash.patch to debian/gdm.init and drop the patch.
* 17_update_default_xserver.patch: Update to new upstream version, add
  corresponding configure change, add patch tag header, forward upstream,
  and rename to 02_x_server_location.patch.
* Drop 99_autoreconf.patch. The only remaining build system change is the
  previous item.
* Drop 20_xdm-stuff.patch, it's just cruft.
* Drop debian/Xsession, and change debian/rules to install the upstream one.
* 01_xrdb_nocpp.patch: Add patch tag header, forward upstream.
* Rename 80_workaround_incorrect_directories.patch to
  04_fix_external_program_directories.patch and add patch tag header.
* Rename 81_initial_server_on_vt7.patch to 05_initial_server_on_vt7.patch.
* debian/rules: Remove /var/gdm (empty and nonstandard) and /var/run (will
  be created at runtime), thanks lintian.
* debian/copyright: Point to versioned GPL, thanks lintian.
* debian/gdm.postrm: Use "set -e" to conform to policy.
* Add debian/xterm.desktop: Reintroduce "failsafe xterm" session.

Show diffs side-by-side

added added

removed removed

Lines of Context:
155
155
        return (sm_proxy != NULL);
156
156
}
157
157
 
 
158
static void
 
159
stop_cb (gpointer data)
 
160
{
 
161
        gtk_main_quit ();
 
162
}
 
163
 
 
164
static gboolean
 
165
end_session_response (gboolean is_okay, const gchar *reason)
 
166
{
 
167
        gboolean ret;
 
168
        GError *error = NULL;
 
169
 
 
170
        ret = dbus_g_proxy_call (client_proxy, "EndSessionResponse",
 
171
                                 &error,
 
172
                                 G_TYPE_BOOLEAN, is_okay,
 
173
                                 G_TYPE_STRING, reason,
 
174
                                 G_TYPE_INVALID,
 
175
                                 G_TYPE_INVALID);
 
176
 
 
177
        if (!ret) {
 
178
                g_warning ("Failed to send session response %s", error->message);
 
179
                g_error_free (error);
 
180
        }
 
181
 
 
182
        return ret;
 
183
}
 
184
 
 
185
static void
 
186
query_end_session_cb (guint flags, gpointer data)
 
187
{
 
188
        end_session_response (TRUE, NULL);
 
189
}
 
190
 
 
191
static void
 
192
end_session_cb (guint flags, gpointer data)
 
193
{
 
194
        end_session_response (TRUE, NULL);
 
195
        gtk_main_quit ();
 
196
}
 
197
 
158
198
static gboolean
159
199
register_client (void)
160
200
{
186
226
                                                  SM_DBUS_NAME,
187
227
                                                  client_id,
188
228
                                                  SM_CLIENT_DBUS_INTERFACE);
 
229
 
 
230
        dbus_g_proxy_add_signal (client_proxy, "Stop", G_TYPE_INVALID);
 
231
        dbus_g_proxy_connect_signal (client_proxy, "Stop",
 
232
                                     G_CALLBACK (stop_cb), NULL, NULL);
 
233
 
 
234
        dbus_g_proxy_add_signal (client_proxy, "QueryEndSession", G_TYPE_UINT, G_TYPE_INVALID);
 
235
        dbus_g_proxy_connect_signal (client_proxy, "QueryEndSession",
 
236
                                     G_CALLBACK (query_end_session_cb), NULL, NULL);
 
237
 
 
238
        dbus_g_proxy_add_signal (client_proxy, "EndSession", G_TYPE_UINT, G_TYPE_INVALID);
 
239
        dbus_g_proxy_connect_signal (client_proxy, "EndSession",
 
240
                                     G_CALLBACK (end_session_cb), NULL, NULL);
 
241
 
189
242
        g_unsetenv ("DESKTOP_AUTOSTART_ID");
190
243
 
191
244
        return TRUE;