X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=gtk%2Fxboard.c;h=0546a3a4d4fb6fc9221674256ae897e2b1b95613;hb=35f89898c92a8709618e2db77b11cbedfd7fc48c;hp=442b9367c2d908a87184dbb9d40d2fc518d11ddb;hpb=0a8f96e95c703feb86bb9770442d6842e3d67248;p=xboard.git diff --git a/gtk/xboard.c b/gtk/xboard.c index 442b936..0546a3a 100644 --- a/gtk/xboard.c +++ b/gtk/xboard.c @@ -169,14 +169,17 @@ extern char *getenv(); #ifdef OSX # include "gtkmacintegration/gtkosxapplication.h" - // prevent pathname of positional file argument provided by OSx being be mistaken for option name + // 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 + char *dataDir; // for expanding ~~ #else # define SLASH '/' #endif @@ -773,6 +776,7 @@ main (int argc, char **argv) #ifdef OSX { // 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(); g_signal_connect(theApp, "NSApplicationOpenFile", G_CALLBACK(StartNewXBoard), NULL); // we must call application ready before we can get the signal, // and supply a (dummy) menu bar before that, to avoid problems with dual apples in it