X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=gtk%2Fxboard.c;h=e3d32d080f4c11351f88f84ab5a57bc05a1e613d;hb=530ea490637c32ac84f5f8daf9df98c5843deb58;hp=b2c080c33a14764eb9cfd90ef77ab0827ea258dd;hpb=e5156fd4c6007cb79c7a1d16b99ca4f48c5bce9e;p=xboard.git diff --git a/gtk/xboard.c b/gtk/xboard.c index b2c080c..e3d32d0 100644 --- a/gtk/xboard.c +++ b/gtk/xboard.c @@ -1966,7 +1966,7 @@ ManProc () { // called from menu #ifdef OSXAPP char buf[MSG_SIZ]; - snprintf(buf, MSG_SIZ, "%s ./man.command", appData.sysOpen); + snprintf(buf, MSG_SIZ, "osascript -e 'tell application \"Terminal\"' -e 'activate' -e 'do script \"man %s/../man/man6/xboard.6\"' -e 'end tell'", dataDir); system(buf); #else system("xterm -e man xboard &"); @@ -1974,6 +1974,20 @@ ManProc () } void +InfoProc () +{ + char buf[MSG_SIZ]; +#ifdef OSXAPP + snprintf(buf, MSG_SIZ, "osascript -e 'tell application \"Terminal\"' -e 'activate' -e 'do script \"info -d %s/../info -f xboard.info\"' -e 'end tell'", dataDir); +#else + snprintf(buf, sizeof(buf), "xterm -e info --directory %s --directory . -f %s &", + INFODIR, INFOFILE); +#endif + system(buf); +} + + +void SetWindowTitle (char *text, char *title, char *icon) { #ifdef TODO_GTK @@ -2321,6 +2335,12 @@ void FileNamePopUpWrapper(label, def, filter, proc, pathFlag, openMode, name, fp StartDir(filter, NULL); // change to start directory for this file type + if(def && *def && def[strlen(def)-1] == '/') { + getcwd(curDir, MSG_SIZ); + chdir(def); + } + + /* make a copy of the filter string, so that strtok can work with it*/ cp = strdup(filter);