On May 24, 2006, at 12:28 PM, Bo Peng wrote:
That at least compiles (thanks again!). What do I need to do to test to see if it's working correctly?Under windows, 1. if gsview and acrobad readers are available, you should see pdf (three of them) and ghostscript (dvi, html, update, view source) under view menu.2. if gsview is uninstalled (or hidden), view -> ghostscript should disappear.3. if the associated viewer for pdf etc is changed, lyx should use the new one.These might or might not be easy to verify under mac.
OK. Things seem to be working pretty well. I've made a few changes to Jean-Marc's patch. In addition to following Angus' suggestions, I made two changes:
(a) #include <Carbon/Carbon.h>instead of <Files.h> and <LSInfo.h>: these couldn't be found when compiling.
(b) For LSRolesMask role = (mode = VIEW) ? kLSRolesViewer : kLSRolesEditor; I substituted LSRolesMask role = (mode == VIEW) ? kLSRolesViewer : kLSRolesEditor; ^ in two places. (Isn't that right?)The result is that in the Preferences dialog, the right viewers/ editors show up as "auto" -- at least for the most part. However, there are some oddities, which lead me to question whether it's actually working as it should.
1. The generated lyxrc.defaults file has odd values, which leads me to think reconfigure is not paying attention to Mac native apps but is only looking at unix apps. Thus, gimp (not Mac native) shows up as the viewer/editor for all image formats, even though the default on my system is something else (mostly Preview.app). (In fact, the only change between the old lyxrc.defaults and the new one is the substitution of "gimp" for "none" in these cases.)
Are these the values that should be showing up there?2. LaTeX, Plain text, EPS, Postscript, PDF (all varieties), and HTML all show up as either "" "none" or "none" "" for viewer/editor. Is this what it should be? -- .pdf files open properly (and show up in LyX's Preferences dialog as "auto").
3. The LaTeX -> HTML converter shows up as: \converter latex html "htlatex $$i" "originaldir,needaux"However, with "originaldir" in there, no .html file is produced in the temp directory when choosing View -> HTML.
Some additional notes:There are two file formats for which I would have thought we'd want a viewer/editor but for which none show up: .txt and .tex files. Can these be added to the auto-open code?
I wonder whether we ought to add rtf <-> latex converters as standard.Finally, I'm attaching a lyxrc.dist file that ought to replace the preferences file now located at development/MacOSX/LyX.app/Contents/ Resources/.
Bennett
auto_open_mac.diff
Description: Binary data
lyxrc.dist
Description: Binary data