Mercurial > audlegacy
diff audacious/main.c @ 680:8282b365f6cb trunk
[svn] - Add some sanity checking to make sure we can't do X11 stuff when running headless.
author | nenolod |
---|---|
date | Fri, 24 Feb 2006 23:56:24 -0800 |
parents | 0a73d1faeb4e |
children | f5457b6cdc0e |
line wrap: on
line diff
--- a/audacious/main.c Fri Feb 24 23:44:27 2006 -0800 +++ b/audacious/main.c Fri Feb 24 23:56:24 2006 -0800 @@ -1,5 +1,5 @@ -/* Audacious - Cross-platform multimedia platform. - * Copyright (C) 2005 Audacious development team. +/* Audacious - Cross-platform multimedia player + * Copyright (C) 2005-2006 Audacious development team. * * Based on BMP: * Copyright (C) 2003-2004 BMP development team. @@ -78,6 +78,7 @@ #include "pixmaps.h" #include "images/audacious_player.xpm" +gboolean has_x11_connection = FALSE; /* do we have an X11 connection? */ /* Translatable string for beep.desktop's comment field */ const gchar *desktop_comment = N_("Audacious"); @@ -918,11 +919,11 @@ /* Check GTK version. Really, this is only needed for binary * distribution since configure already checks. */ - if (!GTK_CHECK_VERSION(2, 4, 0)) { + if (!GTK_CHECK_VERSION(2, 6, 0)) { g_printerr(_("Sorry, your GTK+ version (%d.%d.%d) does not work with Audacious.\n" "Please use GTK+ %s or newer.\n"), gtk_major_version, gtk_minor_version, gtk_micro_version, - "2.4.0"); + "2.6.0"); exit(EXIT_FAILURE); } @@ -942,7 +943,6 @@ /* Now let's parse the command line options first. */ parse_cmd_line(argc, argv, &options); if (!gtk_init_check_ok) { - // if (!gtk_init_check(&argc, &argv)) { if (argc < 2) { /* GTK check failed, and no arguments passed to indicate that user is intending to only remote control a running @@ -1040,6 +1040,8 @@ starting_up = FALSE; + has_x11_connection = TRUE; + gtk_main(); GDK_THREADS_LEAVE();