From 1665be55ae22761328cbf3af17ac9d5fc255ffd8 Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Thu, 20 Jan 2005 15:02:16 +0000 Subject: [PATCH] Change the meaning of the $$s placeholder to . (It was /scripts.) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9509 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/ChangeLog | 4 ++++ lib/configure.m4 | 14 +++++++------- src/ChangeLog | 5 +++++ src/frontends/xforms/ChangeLog | 5 +++++ src/frontends/xforms/FormPreferences.C | 10 +++++----- src/mover.h | 4 ++-- src/support/ChangeLog | 6 ++++++ src/support/filetools.C | 7 ++++--- src/support/filetools.h | 10 +++++----- 9 files changed, 43 insertions(+), 22 deletions(-) diff --git a/lib/ChangeLog b/lib/ChangeLog index 55c77fa91b..932111e6c8 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,7 @@ +2005-01-20 Angus Leeming + + * configure.m4: replace all occurences of '$$s/' with '$$s/scripts'. + 2005-01-15 Georg Baum * ui/classic.ui, ui/stdmenus.ui: Increase number of bookmarks to 5 diff --git a/lib/configure.m4 b/lib/configure.m4 index 0f34a7f385..b83c861176 100644 --- a/lib/configure.m4 +++ b/lib/configure.m4 @@ -322,7 +322,7 @@ SEARCH_PROG([for a DVI to PDF converter],dvi_to_pdf_command,dvipdfm) test $dvi_to_pdf_command = "dvipdfm" && dvi_to_pdf_command="dvipdfm \$\$i" # We have a script to convert previewlyx to ppm or to png -lyxpreview_to_bitmap_command='python $$s/lyxpreview2bitmap.py' +lyxpreview_to_bitmap_command='python $$s/scripts/lyxpreview2bitmap.py' # Search for 'dvipng'. Only enable the conversion from lyxpreview -> png # if dvipng is found. @@ -584,9 +584,9 @@ cat >$outfile <>$outfile < + + * mover.h: change commentary to reflect the changed meaning of + the $$s placeholder. + 2005-01-20 Jean-Marc Lasgouttes * output_linuxdoc.C (linuxdocParagraphs): silence warning diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index 4efdf27f25..6300ff4ca1 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,8 @@ +2005-01-20 Angus Leeming + + * FormPreferences.C: change the tooltip messages to reflect the + changed meaning of the $$s placeholder. + 2005-01-15 Angus Leeming * FormPreferences.C, forms/form_preferences.fd: add an interface diff --git a/src/frontends/xforms/FormPreferences.C b/src/frontends/xforms/FormPreferences.C index d05f4a4e95..042af27d8d 100644 --- a/src/frontends/xforms/FormPreferences.C +++ b/src/frontends/xforms/FormPreferences.C @@ -763,9 +763,9 @@ FormPreferences::Converters::feedback(FL_OBJECT const * const ob) const if (ob == dialog_->input_converter) return _("The conversion command. $$i is the input file name, " - "$$b is the file name without its extension and $$o is " - "the name of the output file. $$s can be used as path to " - "LyX's own collection of conversion scripts."); + "$$b is the file name without its extension and $$o " + "is the name of the output file. $$s can be used " + "as the path to LyX's support directory."); if (ob == dialog_->input_flags) return _("Extra information for the Converter class, whether and " @@ -1024,8 +1024,8 @@ FormPreferences::Copiers::feedback(FL_OBJECT const * const ob) const return _("The command used to copy the file. " "$$i is the \"from\" file name and " "$$o is the \"to\" file name.\n" - "$$s can be used as path to " - "LyX's own collection of scripts."); + "$$s can be used as the path to LyX's support " + "directory."); if (ob == dialog_->button_delete) return _("Remove the current copier from the list of available " diff --git a/src/mover.h b/src/mover.h index 159545b56e..0b74e00fdc 100644 --- a/src/mover.h +++ b/src/mover.h @@ -105,9 +105,9 @@ public: /** @c command should be of the form * - * sh $$s/copy_fig.sh $$i $$o $$l + * sh $$s/scripts/fig_copy.sh $$i $$o $$l * - * where $$s is a placeholder for the lyx script directory, + * where $$s is a placeholder for the lyx support directory, * $$i is a placeholder for the name of the file to be moved, * $$o is a placeholder for the name of the file after moving, * $$l is a placeholder for the name of the file after moving, diff --git a/src/support/ChangeLog b/src/support/ChangeLog index 8b544f7d07..b410f0eb73 100644 --- a/src/support/ChangeLog +++ b/src/support/ChangeLog @@ -1,3 +1,9 @@ +2005-01-20 Angus Leeming + + * filetools.[Ch] (LibScriptSearch): modify the code that replaces + the $$s placeholder with a path, so that it now inserts the path + of the lyx support directory, not the scripts subdirectory. + 2005-01-19 Asger Ottar Alstrup * lyxsum.C, socktools.C, tempname.C, userinfo.C: use the diff --git a/src/support/filetools.C b/src/support/filetools.C index eea9dc46e0..af376e4bf5 100644 --- a/src/support/filetools.C +++ b/src/support/filetools.C @@ -362,7 +362,8 @@ string const LibScriptSearch(string const & command_in) string::size_type const pos1 = command.find(token_scriptpath); if (pos1 == string::npos) return command; - // Find the end of the "$$s/some_script" word within command + // Find the end of the "$$s/some_script" word within command. + // Assumes that the script name does not contain spaces. string::size_type const start_script = pos1 + 4; string::size_type const pos2 = command.find(' ', start_script); string::size_type const size_script = pos2 == string::npos? @@ -370,13 +371,13 @@ string const LibScriptSearch(string const & command_in) // Does this script file exist? string const script = - LibFileSearch("scripts", command.substr(start_script, size_script)); + LibFileSearch(".", command.substr(start_script, size_script)); if (script.empty()) { // Replace "$$s/" with "" command.erase(pos1, 4); } else { - // Replace "$$s/some_script" with "$LYX_SCRIPT_PATH/some_script" + // Replace "$$s/foo/some_script" with "/some_script". string::size_type const size_replace = size_script + 4; command.replace(pos1, size_replace, QuoteName(script)); } diff --git a/src/support/filetools.h b/src/support/filetools.h index 69b5fb6408..1f3fe1fd59 100644 --- a/src/support/filetools.h +++ b/src/support/filetools.h @@ -104,11 +104,11 @@ std::string const i18nLibFileSearch(std::string const & dir, std::string const & name, std::string const & ext = std::string()); -/** Takes a command such as "sh $$s/convertDefault.sh file.in file.out" - * and replaces "$$s/" with the path to the "most important" of LyX's - * script directories containing this script. If the script is not found, - * "$$s/" is removed. Executing the command will still fail, but the - * error message will make some sort of sense ;-) +/** Takes a command such as "sh $$s/scripts/convertDefault.sh file.in file.out" + * and replaces "$$s/" with the path to the LyX support directory containing + * this script. If the script is not found, "$$s/" is removed. Executing the + * command will still fail, but the error message will make some sort of + * sense ;-) */ std::string const LibScriptSearch(std::string const & command); -- 2.39.2