>>>>> "Bennett" == Bennett Helm <[EMAIL PROTECTED]> writes:
Bennett> It doesn't seem to have any effect: on a new user account Bennett> (needed since if the user has already customized the default Bennett> application for a particular document type, "auto" works), Bennett> .pdf files get opened with QuickTime Viewer, even though the Bennett> Finder opens them in Preview. Try the new version attached. Bennett> By the way, after some more digging I've discovered that Bennett> there has been some effort to unify the various TeX Bennett> distributions on Mac. In the future, /usr/texbin is the only Bennett> path that will be needed, and so I've added that to the PATH Bennett> prefix on my local copy. (Once the open/ auto issue is Bennett> resolved, I'll submit a new patch. That would be very good. Bennett> Meanwhile, here's an updated patch for 1.4's lyxrc.dist that Bennett> includes /usr/texbin (and the gwTeX paths as well). [This Bennett> supercedes the patch I posted to bugzilla.] I'll apply it. JMarc
Index: src/support/os_unix.C =================================================================== --- src/support/os_unix.C (revision 16535) +++ src/support/os_unix.C (working copy) @@ -126,7 +126,11 @@ bool canAutoOpenFile(string const & ext, CFStringRef cfs_ext = CFStringCreateWithBytes(kCFAllocatorDefault, (UInt8 *) ext.c_str(), ext.length(), kCFStringEncodingISOLatin1, false); - LSRolesMask role = (mode == VIEW) ? kLSRolesViewer : kLSRolesEditor; + // this is what we would like to do but it seems that the + // viewer for PDF is often quicktime... + //LSRolesMask role = (mode == VIEW) ? kLSRolesViewer : kLSRolesEditor; + (void)mode; + LSRolesMask role = kLSRolesAll; FSRef outAppRef; OSStatus status = LSGetApplicationForInfo(kLSUnknownType, kLSUnknownCreator, @@ -150,13 +154,17 @@ bool autoOpenFile(string const & filenam { #ifdef __APPLE__ // Reference: http://developer.apple.com/documentation/Carbon/Reference/LaunchServicesReference/ - FSRef fileref; - OSStatus status = - FSPathMakeRef((UInt8 *) filename.c_str(), &fileref, NULL); - if (status != 0) - return false; + FSRef fileref; + OSStatus status = + FSPathMakeRef((UInt8 *) filename.c_str(), &fileref, NULL); + if (status != 0) + return false; - LSRolesMask role = (mode == VIEW) ? kLSRolesViewer : kLSRolesEditor; + // this is what we would like to do but it seems that the + // viewer for PDF is often quicktime... + //LSRolesMask role = (mode == VIEW) ? kLSRolesViewer : kLSRolesEditor; + (void)mode; + LSRolesMask role = kLSRolesAll; FSRef outAppRef; status = LSGetApplicationForItem(&fileref, role, &outAppRef, NULL);