X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=gtk%2Fxboard.c;h=750e64fefce869eb0a7825b900807096f9c87295;hb=e6e38912837a4fe2464356408d10dee950b3121c;hp=16d7a9fb364438326938e58a76852c15b3bb2943;hpb=686059ae9cb5a33576ae0e91ddf88b14c90c9218;p=xboard.git diff --git a/gtk/xboard.c b/gtk/xboard.c index 16d7a9f..750e64f 100644 --- a/gtk/xboard.c +++ b/gtk/xboard.c @@ -5,7 +5,7 @@ * Massachusetts. * * Enhancements Copyright 1992-2001, 2002, 2003, 2004, 2005, 2006, - * 2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. + * 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc. * * The following terms apply to Digital Equipment Corporation's copyright * interest in XBoard: @@ -167,14 +167,15 @@ extern char *getenv(); #include "gettext.h" #include "draw.h" -#ifdef OSX -# include "gtkmacintegration/gtkosxapplication.h" +#ifdef __APPLE__ +# include // prevent pathname of positional file argument provided by OS X being be mistaken for option name // (price is that we won't recognize Windows option format anymore). # define SLASH '-' // redefine some defaults # undef ICS_LOGON # undef SYSCONFDIR +# undef DATADIR # define ICS_LOGON "Library/Preferences/XboardICS.conf" # define SYSCONFDIR "../etc" # define DATADIR dataDir @@ -679,6 +680,7 @@ PrintArg (ArgType t) case ArgTwo: case ArgNone: case ArgCommSettings: + default: break; } return p; @@ -728,7 +730,7 @@ SlaveResize (Option *opt) gtk_window_resize(GTK_WINDOW(shells[DummyDlg]), slaveW + opt->max, slaveH + opt->value); } -#ifdef OSX +#ifdef __APPLE__ static char clickedFile[MSG_SIZ]; static int suppress; @@ -761,7 +763,7 @@ main (int argc, char **argv) debugFP = stderr; if(argc > 1 && (!strcmp(argv[1], "-v" ) || !strcmp(argv[1], "--version" ))) { - printf("%s version %s\n", PACKAGE_NAME, PACKAGE_VERSION); + printf("%s version %s\n\n configure options: %s\n", PACKAGE_NAME, PACKAGE_VERSION, CONFIGURE_OPTIONS); exit(0); } @@ -772,7 +774,7 @@ main (int argc, char **argv) /* set up GTK */ gtk_init (&argc, &argv); -#ifdef OSX +#ifdef __APPLE__ { // prepare to catch OX OpenFile signal, which will tell us the clicked file GtkosxApplication *theApp = g_object_new(GTKOSX_TYPE_APPLICATION, NULL); dataDir = gtkosx_application_get_bundle_path(); @@ -1785,7 +1787,7 @@ TempForwardProc (Widget w, XEvent *event, String *prms, Cardinal *nprms) void ManProc () { // called from menu -#ifdef OSX +#ifdef __APPLE__ system("%s ./man.command", appData.sysOpen); #else system("xterm -e man xboard &");