[gdm] Allow use of test program without a DISPLAY
- From: William Jon McCann <mccann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm] Allow use of test program without a DISPLAY
- Date: Tue, 8 Jun 2010 19:15:00 +0000 (UTC)
commit ee769d876d5aedc7dae77757387d79690eb340bf
Author: William Jon McCann <jmccann redhat com>
Date: Tue Jun 8 12:33:52 2010 -0400
Allow use of test program without a DISPLAY
gui/simple-greeter/test-user-manager.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/gui/simple-greeter/test-user-manager.c b/gui/simple-greeter/test-user-manager.c
index a115f29..9891bb8 100644
--- a/gui/simple-greeter/test-user-manager.c
+++ b/gui/simple-greeter/test-user-manager.c
@@ -72,13 +72,15 @@ int
main (int argc, char *argv[])
{
+ GMainLoop *loop;
+
bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
setlocale (LC_ALL, "");
- gtk_init (&argc, &argv);
+ g_type_init ();
if (! gdm_settings_client_init (GDMCONFDIR "/gdm.schemas", "/")) {
g_critical ("Unable to initialize settings client");
@@ -98,8 +100,9 @@ main (int argc, char *argv[])
"user-removed",
G_CALLBACK (on_user_removed),
NULL);
+ loop = g_main_loop_new (NULL, FALSE);
- gtk_main ();
+ g_main_loop_run (loop);
return 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]