From: Arun Persaud Date: Sat, 18 Oct 2014 04:17:28 +0000 (-0700) Subject: forget a few __APPLE__ ifdefs; changed to OSXAPP X-Git-Url: http://winboard.nl/cgi-bin?p=xboard.git;a=commitdiff_plain;h=c927f6b84a06bd7ed84adf0216b24acb042115d2 forget a few __APPLE__ ifdefs; changed to OSXAPP --- diff --git a/args.h b/args.h index 9ce2b47..304278f 100644 --- a/args.h +++ b/args.h @@ -1614,7 +1614,7 @@ SaveSettings(char* name) if(*(char**)ad->argLoc == NULL) break; // just in case { char buf[MSG_SIZ]; snprintf(buf, MSG_SIZ, "%s", *(char**)ad->argLoc); -#ifdef __APPLE__ +#ifdef OSXAPP if(strstr(buf, DATADIR) == buf) snprintf(buf, MSG_SIZ, "~~%s", *(char**)ad->argLoc + strlen(DATADIR)); #endif diff --git a/gtk/xoptions.c b/gtk/xoptions.c index 5c35c8e..0d36830 100644 --- a/gtk/xoptions.c +++ b/gtk/xoptions.c @@ -51,7 +51,7 @@ extern char *getenv(); #include #include #include -#ifdef __APPLE__ +#ifdef OSXAPP # include #endif @@ -425,7 +425,7 @@ CreateMenuPopup (Option *opt, int n, int def) { char *msg = mb[i].string; if(!msg) break; -#ifdef __APPLE__ +#ifdef OSXAPP if(!strcmp(msg, "Quit ")) continue; // Quit item will appear automatically in App menu if(!strcmp(msg, "About XBoard")) msg = "About"; // 'XBoard' will be appended automatically when moved to App menu 1st item #endif @@ -443,7 +443,7 @@ CreateMenuPopup (Option *opt, int n, int def) GdkModifierType accelerator_mods; gtk_accelerator_parse(mb[i].accel, &accelerator_key, &accelerator_mods); -#ifdef __APPLE__ +#ifdef OSXAPP if(accelerator_mods & GDK_CONTROL_MASK) { // in OSX use Meta where Linux uses Ctrl accelerator_mods &= ~GDK_CONTROL_MASK; // clear Ctrl flag accelerator_mods |= GDK_META_MASK; // set Meta flag @@ -1562,7 +1562,7 @@ if(appData.debugMode) printf("n=%d, h=%d, w=%d\n",n,height,width); case DropDown: top--; msg = _(option[i].name); // write name on the menu button -#ifndef __APPLE__ +#ifndef OSXAPP if(tinyLayout) { strcpy(def, msg); def[tinyLayout] = NULLCHAR; msg = def; } // clip menu text to keep menu bar small #endif // XtSetArg(args[j], XtNmenuName, XtNewString(option[i].name)); j++; @@ -1590,7 +1590,7 @@ if(appData.debugMode) printf("n=%d, h=%d, w=%d\n",n,height,width); break; case BarEnd: top--; -#ifndef __APPLE__ +#ifndef OSXAPP gtk_table_attach(GTK_TABLE(table), menuBar, left, left+r, top, top+1, GTK_FILL | GTK_EXPAND, GTK_FILL, 2, 1); if(option[i].target) ((ButtonCallback*)option[i].target)(boxStart); // callback that can make sizing decisions diff --git a/menus.c b/menus.c index 4934a3c..9d2b286 100644 --- a/menus.c +++ b/menus.c @@ -313,7 +313,7 @@ void InfoProc () { char buf[MSG_SIZ]; -#ifdef __APPLE__ +#ifdef OSXAPP snprintf(buf, MSG_SIZ, "%s ./info.command", appData.sysOpen); #else snprintf(buf, sizeof(buf), "xterm -e info --directory %s --directory . -f %s &",