From aefbd97a16e70d6be9c9d23f32804c3229c87108 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Mon, 22 Mar 2004 16:22:52 +0000 Subject: [PATCH] find correct ps and pdf previewers in win32 (bug 1508); remove lyxrc variable \ps_command git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8515 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/ChangeLog | 8 ++++++++ lib/configure.m4 | 16 +++++++++------- lib/lyxrc.example | 7 ------- src/ChangeLog | 13 +++++++++---- src/lyxrc.C | 16 ---------------- src/lyxrc.h | 3 --- 6 files changed, 26 insertions(+), 37 deletions(-) diff --git a/lib/ChangeLog b/lib/ChangeLog index 0923b1f066..1415717447 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,11 @@ +2004-03-22 Jean-Marc Lasgouttes + + * lyxrc.example: remove \ps_command + + * configure.m4: check for acrobat, acrord32 and gsview32 as PDF + viewers (useful for windows); do not pass -swap option when + gsview32 is used as ps viewer. Remove support for \ps_command + 2004-03-17 Angus Leeming * ui/classic.ui: diff --git a/lib/configure.m4 b/lib/configure.m4 index 4efc6c0dfa..f78a236433 100644 --- a/lib/configure.m4 +++ b/lib/configure.m4 @@ -263,14 +263,16 @@ test "$word_to_latex_command" = "word2x" && word_to_latex_command="word2x -f lat SEARCH_PROG([for Image converter],image_command,convert) test $image_command = "convert" && image_command="convert \$\$i \$\$o" -# Search for a Postscript interpreter -LYXRC_PROG([for a Postscript interpreter], \ps_command, gs) - # Search something to preview postscript -SEARCH_PROG([for a Postscript previewer],GHOSTVIEW,gv ghostview) +SEARCH_PROG([for a Postscript previewer],GHOSTVIEW,gsview32 gv ghostview) +case $GHOSTVIEW in + gv|ghostview) PS_VIEWER="$GHOSTVIEW -swap" ;; + *) PS_VIEWER="$GHOSTVIEW";; +esac +EPS_VIEWER=$GHOSTVIEW # Search for a program to preview pdf -SEARCH_PROG([for a PDF preview],PDF_VIEWER,acroread gv ghostview xpdf) +SEARCH_PROG([for a PDF preview],PDF_VIEWER, acrobat acrord32 gsview32 acroread gv ghostview xpdf) # Search something to preview dvi SEARCH_PROG([for a DVI previewer],DVI_VIEWER, xdvi windvi yap) @@ -559,8 +561,8 @@ cat >$outfile < + + * lyxrc.C (setDefaults, getDescription, output, read): + * lyxrc.h: remove ps_command + 2004-03-22 Angus Leeming * lyx_main.C (error_handler, init): remove handler for SIGPIPE. @@ -12,12 +17,12 @@ 2004-03-19 André Pönitz -        * cursor.[Ch] (reset): take main text inset as argument + * cursor.[Ch] (reset): take main text inset as argument -        * BufferView: adjust -        * BufferView_pimpl.C: adjust + * BufferView: adjust + * BufferView_pimpl.C: adjust -        * paragraph.[Ch]: fix completely broken operator=() + * paragraph.[Ch]: fix completely broken operator=() 2004-03-16 Jean-Marc Lasgouttes diff --git a/src/lyxrc.C b/src/lyxrc.C index 13911fdc68..11110b040e 100644 --- a/src/lyxrc.C +++ b/src/lyxrc.C @@ -123,7 +123,6 @@ keyword_item lyxrcTags[] = { { "\\print_to_file", LyXRC::RC_PRINTTOFILE }, { "\\print_to_printer", LyXRC::RC_PRINTTOPRINTER }, { "\\printer", LyXRC::RC_PRINTER }, - { "\\ps_command", LyXRC::RC_PS_COMMAND }, { "\\rtl", LyXRC::RC_RTL_SUPPORT }, { "\\screen_dpi", LyXRC::RC_SCREEN_DPI }, { "\\screen_font_encoding", LyXRC::RC_SCREEN_FONT_ENCODING }, @@ -198,7 +197,6 @@ void LyXRC::setDefaults() { print_paper_dimension_flag = "-T"; document_path.erase(); tempdir_path = "/tmp"; - ps_command = "gs"; view_dvi_paper_option.erase(); default_papersize = PAPER_USLETTER; custom_export_format = "ps"; @@ -552,12 +550,6 @@ int LyXRC::read(string const & filename) } break; - case RC_PS_COMMAND: - if (lexrc.next()) { - ps_command = lexrc.getString(); - } - break; - case RC_CHKTEX_COMMAND: if (lexrc.next()) { chktex_command = lexrc.getString(); @@ -1165,11 +1157,6 @@ void LyXRC::output(ostream & os) const } os << "\"\n"; } - case RC_PS_COMMAND: - if (ps_command != system_lyxrc.ps_command) { - os << "# Program used for interpreting postscript.\n" - << "\\ps_command \"" << ps_command << "\"\n"; - } case RC_CHKTEX_COMMAND: if (chktex_command != system_lyxrc.chktex_command) { os << "\\chktex_command \"" << chktex_command << "\"\n"; @@ -1956,9 +1943,6 @@ string const LyXRC::getDescription(LyXRCTags tag) str = _("Specify the default paper size."); break; - case RC_PS_COMMAND: - break; - case RC_ACCEPT_COMPOUND: str = _("Consider run-together words, such as \"diskdrive\" for \"disk drive\", as legal words?"); break; diff --git a/src/lyxrc.h b/src/lyxrc.h index 019aa61a90..71894683e0 100644 --- a/src/lyxrc.h +++ b/src/lyxrc.h @@ -87,7 +87,6 @@ enum LyXRCTags { RC_CHECKLASTFILES, RC_VIEWDVI_PAPEROPTION, RC_DEFAULT_PAPERSIZE, - RC_PS_COMMAND, RC_ACCEPT_COMPOUND, RC_SPELL_COMMAND, RC_USE_INP_ENC, @@ -191,8 +190,6 @@ enum LyXRCTags { std::string custom_export_command; /// std::string custom_export_format; - /// postscript interpreter (in general "gs", if it is installed) - std::string ps_command; /// option for telling the dvi viewer about the paper size std::string view_dvi_paper_option; /// default paper size for local xdvi/dvips/ghostview/whatever