From d2b8a3161699b230647e1a3d27c23766d1a28983 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Mon, 8 Jan 2007 13:32:20 +0000 Subject: [PATCH] * os_unix.C (canAutoOpenFile, autoOpenFile): on Mac OS X, use the role kLSRolesAll for both editor and viewer, since it is what the finder does. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_4_X@16605 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/support/ChangeLog | 18 +++++++++++++----- src/support/os_unix.C | 22 +++++++++++++++------- status.14x | 13 ++++++++----- 3 files changed, 36 insertions(+), 17 deletions(-) diff --git a/src/support/ChangeLog b/src/support/ChangeLog index 30abbcf07a..a4157c28e6 100644 --- a/src/support/ChangeLog +++ b/src/support/ChangeLog @@ -1,13 +1,21 @@ +2007-01-08 Jean-Marc Lasgouttes + + * os_unix.C (canAutoOpenFile, autoOpenFile): on Mac OS X, use + the role kLSRolesAll for both editor and viewer, since it is what + the finder does. + 2006-10-15 Bo Peng + * os_win32.C: remove console-hiding code 2006-09-07 Enrico Forestieri <[EMAIL PROTECTED]> + * os_cygwin.C (is_windows_path): avoid unnecessary conversion - when path is relative - (convert_path_list): avoid unnecessary conversion when path - list is empty - (external_path, external_path_list): for an X11 build it is not - necessary that the output path style is windows + when path is relative + (convert_path_list): avoid unnecessary conversion when path + list is empty + (external_path, external_path_list): for an X11 build it is not + necessary that the output path style is windows 2006-06-27 Enrico Forestieri diff --git a/src/support/os_unix.C b/src/support/os_unix.C index fb266089fc..03efbdd3b0 100644 --- a/src/support/os_unix.C +++ b/src/support/os_unix.C @@ -126,7 +126,11 @@ bool canAutoOpenFile(string const & ext, auto_open_mode const mode) 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 & filename, auto_open_mode const mode) { #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); diff --git a/status.14x b/status.14x index 977ce37420..0d7b519922 100644 --- a/status.14x +++ b/status.14x @@ -158,15 +158,18 @@ What's new - Don't reset cell selection when opening tabular dialog (bug 2715). - Quotation marks can now be inserted easier into mathed, which is - important for phonetic notation (bug 3044) + important for phonetic notation (bug 3044). -- Fix one more case of copied ERT inset producing wrong language (bug 2476) +- Fix one more case of copied ERT inset producing wrong language (bug 2476). -- reset the language when dissolving an ERT inset (bug 2978) +- Reset the language when dissolving an ERT inset (bug 2978). -- Sanitize button enabling in the bibtex dialog [qt only] (bug 2895) +- Sanitize button enabling in the bibtex dialog [qt only] (bug 2895). -- fix focus problems in the graphics dialog [qt only] (bug 1663) +- Fix focus problems in the graphics dialog [qt only] (bug 1663). + +- On Mac OS X, make sure to view files with the same application as + the Finder uses. * Build/installation: