lyx_mirror/src/frontends/qt4/ui/PrefPathsUi.ui

278 lines
8.0 KiB
Plaintext
Raw Normal View History

<ui version="4.0" >
<class>PrefPathsUi</class>
<widget class="QWidget" name="PrefPathsUi" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>347</width>
<height>311</height>
</rect>
</property>
<property name="windowTitle" >
<string/>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
Introduce the possibility of setting a prefix for the TEXINPUTS environment variable. This is done in the preferences, much like as the PATH prefix. A single '.' in the paths will get replaced with the current document dir and also non-absolute paths will be prefixed with that dir. The default semantics of TEXINPUTS apply, such that, for example, if a path is terminated with a double slash, all subdirectories will be also searched by both the TeX engine and ancillary programs such as dvi previewers or dvips. As an example, if the prefix is set to ".:figs", the TEXINPUTS variable will be set as ".:<docdir>:<docdir>/figs:$ORIGTEXINPUTS", where <docdir> is the document directory. The initial '.' is necessary to address the actual current dir (this will be the temp dir at preview time), while if TEXINPUTS was initially unset, such that $ORIGTEXINPUTS is empty, a colon (or semicolon on Windows) will end the path list. This is very important, because we don't want to replace the system directories but to complement them and, in order to do that, an empty element has to be present in the list. Indeed, according to the TEXINPUTS semantics, an empty element means the standard search path. This works whether TEXINPUTS is originally set or not, because if the original TEXINPUTS starts with a colon (meaning that the standard search path is wanted there) we will have an empty element at that point, otherwise the final colon will simply serve as a path separator. Of course, on Windows a ';' has to be used as a path separator. LyX will take care of transforming the platform path list into one understandable by the TeX engine. For example, this will be the case for a Cygwin version of LyX using a native Windows TeX engine or viceversa. I tested all of this and it works for me. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38681 a592a061-630c-0410-9148-cb99ea01b6c8
2011-05-09 23:25:51 +00:00
<item row="12" column="0" colspan="3" >
Rel. path in paths prefs preserved as rel. paths Before this commit, in the paths preferences tab if you put a relative path, LyX would convert it behind the scenes to an absolute path by evaluating the relative path with respect to the working directory of the LyX instance where the preference change is taking place. This seems confusing because (1) it is done behind the scenes (after the preferences dialog is closed) and (2) if the user chooses to enter a relative path, the safest thing to do is to preserve it as a relative path, instead of making the assumption that the user intended for it to be expanded to an absolute path. An explanation of how relative paths are handled is given at the bottom of the paths tab. Note that the height/width of the preferences window is not changed as a result of adding this explanatory comment because the height of the preferences dialog is already stretched by other tabs. This commit improves consistency in the sense that the behavior of LyX is now the same when a relative path is specified in the preferences dialog as when it is manually specified in the preferences file. Before, if the preferences file were manually edited and a relative path were inserted, the next time the user made a change to preferences with the GUI (even if the preference change was a different preference, e.g. instant preview), the relative path would be silently converted to an absolute path, evaluated with respect to the working directory of that instance. Beyond improving clarity and consistency (IMO), this commit allows for a new feature to be implemented of using relative paths in the paths preferences. For example, the user may now enter '.' as the "Working directory" path and now whenever they start LyX from a directory and create a new file, the default location of the file will be the directory from which they started LyX, instead of the user's home directory which is LyX's default and is less intuitive. No prefs2prefs work is needed because if a relative path were entered in the preferences dialog before this commit, it was converted to an absolute path before being stored in preferences. If a relative path were specified by manually editing the preferences file, then (unless the path were already automatically converted to an absolute path by a GUI preferences change, as described above) the behavior will be the same (the path will be treated as a relative path). For related discussion, see the lyx-devel thread here: https://www.mail-archive.com/search?l=mid&q=20160616003010.bnymtcouar7g55ti%40cotopaxi This commit removes the last use of lyx::support::expandPath() in LyX's sources.
2016-07-29 17:13:55 +00:00
<widget class="QLabel" name="label">
<property name="text">
<string>Relative and absolute paths are allowed. Relative paths will be expanded with respect to the working directory (WD). For all paths except the "TEXINPUTS prefix" the WD is the directory from which you start LyX, and thus could change for each LyX session. For the "TEXINPUTS prefix" path the WD is the directory containing the document. The path "." (without quotes) is a common example of a relative path and refers to the WD.</string>
</property>
Rel. path in paths prefs preserved as rel. paths Before this commit, in the paths preferences tab if you put a relative path, LyX would convert it behind the scenes to an absolute path by evaluating the relative path with respect to the working directory of the LyX instance where the preference change is taking place. This seems confusing because (1) it is done behind the scenes (after the preferences dialog is closed) and (2) if the user chooses to enter a relative path, the safest thing to do is to preserve it as a relative path, instead of making the assumption that the user intended for it to be expanded to an absolute path. An explanation of how relative paths are handled is given at the bottom of the paths tab. Note that the height/width of the preferences window is not changed as a result of adding this explanatory comment because the height of the preferences dialog is already stretched by other tabs. This commit improves consistency in the sense that the behavior of LyX is now the same when a relative path is specified in the preferences dialog as when it is manually specified in the preferences file. Before, if the preferences file were manually edited and a relative path were inserted, the next time the user made a change to preferences with the GUI (even if the preference change was a different preference, e.g. instant preview), the relative path would be silently converted to an absolute path, evaluated with respect to the working directory of that instance. Beyond improving clarity and consistency (IMO), this commit allows for a new feature to be implemented of using relative paths in the paths preferences. For example, the user may now enter '.' as the "Working directory" path and now whenever they start LyX from a directory and create a new file, the default location of the file will be the directory from which they started LyX, instead of the user's home directory which is LyX's default and is less intuitive. No prefs2prefs work is needed because if a relative path were entered in the preferences dialog before this commit, it was converted to an absolute path before being stored in preferences. If a relative path were specified by manually editing the preferences file, then (unless the path were already automatically converted to an absolute path by a GUI preferences change, as described above) the behavior will be the same (the path will be treated as a relative path). For related discussion, see the lyx-devel thread here: https://www.mail-archive.com/search?l=mid&q=20160616003010.bnymtcouar7g55ti%40cotopaxi This commit removes the last use of lyx::support::expandPath() in LyX's sources.
2016-07-29 17:13:55 +00:00
<property name="wordWrap">
<bool>true</bool>
</property>
Rel. path in paths prefs preserved as rel. paths Before this commit, in the paths preferences tab if you put a relative path, LyX would convert it behind the scenes to an absolute path by evaluating the relative path with respect to the working directory of the LyX instance where the preference change is taking place. This seems confusing because (1) it is done behind the scenes (after the preferences dialog is closed) and (2) if the user chooses to enter a relative path, the safest thing to do is to preserve it as a relative path, instead of making the assumption that the user intended for it to be expanded to an absolute path. An explanation of how relative paths are handled is given at the bottom of the paths tab. Note that the height/width of the preferences window is not changed as a result of adding this explanatory comment because the height of the preferences dialog is already stretched by other tabs. This commit improves consistency in the sense that the behavior of LyX is now the same when a relative path is specified in the preferences dialog as when it is manually specified in the preferences file. Before, if the preferences file were manually edited and a relative path were inserted, the next time the user made a change to preferences with the GUI (even if the preference change was a different preference, e.g. instant preview), the relative path would be silently converted to an absolute path, evaluated with respect to the working directory of that instance. Beyond improving clarity and consistency (IMO), this commit allows for a new feature to be implemented of using relative paths in the paths preferences. For example, the user may now enter '.' as the "Working directory" path and now whenever they start LyX from a directory and create a new file, the default location of the file will be the directory from which they started LyX, instead of the user's home directory which is LyX's default and is less intuitive. No prefs2prefs work is needed because if a relative path were entered in the preferences dialog before this commit, it was converted to an absolute path before being stored in preferences. If a relative path were specified by manually editing the preferences file, then (unless the path were already automatically converted to an absolute path by a GUI preferences change, as described above) the behavior will be the same (the path will be treated as a relative path). For related discussion, see the lyx-devel thread here: https://www.mail-archive.com/search?l=mid&q=20160616003010.bnymtcouar7g55ti%40cotopaxi This commit removes the last use of lyx::support::expandPath() in LyX's sources.
2016-07-29 17:13:55 +00:00
</widget>
</item>
<item row="10" column="0" >
<widget class="QLabel" name="pathPrefixLA" >
<property name="text" >
<string>&amp;PATH prefix:</string>
</property>
<property name="buddy" >
<cstring>pathPrefixED</cstring>
</property>
</widget>
</item>
<item row="10" column="1" colspan="2" >
<widget class="QLineEdit" name="pathPrefixED">
<property name="toolTip">
<string>Specify those directories which should be prepended to the PATH environment variable. Use the OS native format.</string>
</property>
</widget>
Introduce the possibility of setting a prefix for the TEXINPUTS environment variable. This is done in the preferences, much like as the PATH prefix. A single '.' in the paths will get replaced with the current document dir and also non-absolute paths will be prefixed with that dir. The default semantics of TEXINPUTS apply, such that, for example, if a path is terminated with a double slash, all subdirectories will be also searched by both the TeX engine and ancillary programs such as dvi previewers or dvips. As an example, if the prefix is set to ".:figs", the TEXINPUTS variable will be set as ".:<docdir>:<docdir>/figs:$ORIGTEXINPUTS", where <docdir> is the document directory. The initial '.' is necessary to address the actual current dir (this will be the temp dir at preview time), while if TEXINPUTS was initially unset, such that $ORIGTEXINPUTS is empty, a colon (or semicolon on Windows) will end the path list. This is very important, because we don't want to replace the system directories but to complement them and, in order to do that, an empty element has to be present in the list. Indeed, according to the TEXINPUTS semantics, an empty element means the standard search path. This works whether TEXINPUTS is originally set or not, because if the original TEXINPUTS starts with a colon (meaning that the standard search path is wanted there) we will have an empty element at that point, otherwise the final colon will simply serve as a path separator. Of course, on Windows a ';' has to be used as a path separator. LyX will take care of transforming the platform path list into one understandable by the TeX engine. For example, this will be the case for a Cygwin version of LyX using a native Windows TeX engine or viceversa. I tested all of this and it works for me. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38681 a592a061-630c-0410-9148-cb99ea01b6c8
2011-05-09 23:25:51 +00:00
</item>
<item row="11" column="0">
<widget class="QLabel" name="texinputsPrefixLA">
<property name="text">
<string>TEX&amp;INPUTS prefix:</string>
</property>
<property name="buddy">
<cstring>texinputsPrefixED</cstring>
</property>
</widget>
</item>
<item row="11" column="1" colspan="2">
<widget class="QLineEdit" name="texinputsPrefixED">
<property name="toolTip">
Rel. path in paths prefs preserved as rel. paths Before this commit, in the paths preferences tab if you put a relative path, LyX would convert it behind the scenes to an absolute path by evaluating the relative path with respect to the working directory of the LyX instance where the preference change is taking place. This seems confusing because (1) it is done behind the scenes (after the preferences dialog is closed) and (2) if the user chooses to enter a relative path, the safest thing to do is to preserve it as a relative path, instead of making the assumption that the user intended for it to be expanded to an absolute path. An explanation of how relative paths are handled is given at the bottom of the paths tab. Note that the height/width of the preferences window is not changed as a result of adding this explanatory comment because the height of the preferences dialog is already stretched by other tabs. This commit improves consistency in the sense that the behavior of LyX is now the same when a relative path is specified in the preferences dialog as when it is manually specified in the preferences file. Before, if the preferences file were manually edited and a relative path were inserted, the next time the user made a change to preferences with the GUI (even if the preference change was a different preference, e.g. instant preview), the relative path would be silently converted to an absolute path, evaluated with respect to the working directory of that instance. Beyond improving clarity and consistency (IMO), this commit allows for a new feature to be implemented of using relative paths in the paths preferences. For example, the user may now enter '.' as the "Working directory" path and now whenever they start LyX from a directory and create a new file, the default location of the file will be the directory from which they started LyX, instead of the user's home directory which is LyX's default and is less intuitive. No prefs2prefs work is needed because if a relative path were entered in the preferences dialog before this commit, it was converted to an absolute path before being stored in preferences. If a relative path were specified by manually editing the preferences file, then (unless the path were already automatically converted to an absolute path by a GUI preferences change, as described above) the behavior will be the same (the path will be treated as a relative path). For related discussion, see the lyx-devel thread here: https://www.mail-archive.com/search?l=mid&q=20160616003010.bnymtcouar7g55ti%40cotopaxi This commit removes the last use of lyx::support::expandPath() in LyX's sources.
2016-07-29 17:13:55 +00:00
<string>Specify those directories which should be prepended to the TEXINPUTS environment variable. Use the OS native format.</string>
</property>
</widget>
</item>
<item row="6" column="2" >
<widget class="QPushButton" name="thesaurusDirPB" >
<property name="text" >
<string>Browse...</string>
</property>
<property name="autoDefault" >
<bool>false</bool>
</property>
</widget>
</item>
<item row="6" column="0" >
<widget class="QLabel" name="thesaurusDirLA" >
<property name="text" >
<string>T&amp;hesaurus dictionaries:</string>
</property>
<property name="buddy" >
<cstring>thesaurusDirED</cstring>
</property>
</widget>
</item>
<item row="6" column="1" >
<widget class="QLineEdit" name="thesaurusDirED" />
</item>
<item row="5" column="2" >
<widget class="QPushButton" name="tempDirPB" >
<property name="text" >
<string>Browse...</string>
</property>
<property name="autoDefault" >
<bool>false</bool>
</property>
</widget>
</item>
<item row="5" column="1" >
<widget class="QLineEdit" name="tempDirED" />
</item>
<item row="5" column="0" >
<widget class="QLabel" name="tempDirLA" >
<property name="text" >
<string>&amp;Temporary directory:</string>
</property>
<property name="buddy" >
<cstring>tempDirED</cstring>
</property>
</widget>
</item>
<item row="4" column="2" >
<widget class="QPushButton" name="lyxserverDirPB" >
<property name="text" >
<string>Browse...</string>
</property>
<property name="autoDefault" >
<bool>false</bool>
</property>
</widget>
</item>
<item row="4" column="1" >
<widget class="QLineEdit" name="lyxserverDirED" />
</item>
<item row="4" column="0" >
<widget class="QLabel" name="lyxserverDirLA" >
<property name="text" >
<string>Ly&amp;XServer pipe:</string>
</property>
<property name="buddy" >
<cstring>lyxserverDirED</cstring>
</property>
</widget>
</item>
<item row="3" column="2" >
<widget class="QPushButton" name="backupDirPB" >
<property name="text" >
<string>Browse...</string>
</property>
<property name="autoDefault" >
<bool>false</bool>
</property>
</widget>
</item>
<item row="3" column="1" >
<widget class="QLineEdit" name="backupDirED" />
</item>
<item row="3" column="0" >
<widget class="QLabel" name="backupDirLA" >
<property name="text" >
<string>&amp;Backup directory:</string>
</property>
<property name="buddy" >
<cstring>backupDirED</cstring>
</property>
</widget>
</item>
<item row="2" column="2" >
<widget class="QPushButton" name="exampleDirPB" >
<property name="text" >
<string>Browse...</string>
</property>
<property name="autoDefault" >
<bool>false</bool>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QLineEdit" name="exampleDirED" />
</item>
<item row="2" column="0" >
<widget class="QLabel" name="exampleDirLA" >
<property name="text" >
<string>&amp;Example files:</string>
</property>
<property name="buddy" >
<cstring>exampleDirED</cstring>
</property>
</widget>
</item>
<item row="1" column="2" >
<widget class="QPushButton" name="templateDirPB" >
<property name="text" >
<string>Browse...</string>
</property>
<property name="autoDefault" >
<bool>false</bool>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QLineEdit" name="templateDirED" />
</item>
<item row="1" column="0" >
<widget class="QLabel" name="templateDirLA" >
<property name="text" >
<string>&amp;Document templates:</string>
</property>
<property name="buddy" >
<cstring>templateDirED</cstring>
</property>
</widget>
</item>
<item row="0" column="2" >
<widget class="QPushButton" name="workingDirPB" >
<property name="text" >
<string>Browse...</string>
</property>
<property name="autoDefault" >
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLineEdit" name="workingDirED" />
</item>
<item row="0" column="0" >
<widget class="QLabel" name="workingDirLA" >
<property name="text" >
<string>&amp;Working directory:</string>
</property>
<property name="buddy" >
<cstring>workingDirED</cstring>
</property>
</widget>
</item>
<item row="8" column="0" >
<widget class="QLabel" name="hunspellDirLA" >
<property name="text" >
<string>H&amp;unspell dictionaries:</string>
</property>
<property name="buddy" >
<cstring>hunspellDirED</cstring>
</property>
</widget>
</item>
<item row="8" column="1" >
<widget class="QLineEdit" name="hunspellDirED" />
</item>
<item row="8" column="2" >
<widget class="QPushButton" name="hunspellDirPB" >
<property name="text" >
<string>Browse...</string>
</property>
<property name="autoDefault" >
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</widget>
<tabstops>
<tabstop>workingDirED</tabstop>
<tabstop>workingDirPB</tabstop>
<tabstop>templateDirED</tabstop>
<tabstop>templateDirPB</tabstop>
<tabstop>exampleDirED</tabstop>
<tabstop>exampleDirPB</tabstop>
<tabstop>backupDirED</tabstop>
<tabstop>backupDirPB</tabstop>
<tabstop>lyxserverDirED</tabstop>
<tabstop>lyxserverDirPB</tabstop>
<tabstop>tempDirED</tabstop>
<tabstop>tempDirPB</tabstop>
<tabstop>thesaurusDirED</tabstop>
<tabstop>thesaurusDirPB</tabstop>
<tabstop>hunspellDirED</tabstop>
<tabstop>hunspellDirPB</tabstop>
<tabstop>pathPrefixED</tabstop>
<tabstop>texinputsPrefixED</tabstop>
</tabstops>
<includes>
<include location="local" >qt_i18n.h</include>
</includes>
<resources/>
<connections/>
</ui>