mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-25 14:04:25 +00:00
9b64d7bd24
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.
278 lines
8.0 KiB
XML
278 lines
8.0 KiB
XML
<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>
|
|
<item row="12" column="0" colspan="3" >
|
|
<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>
|
|
<property name="wordWrap">
|
|
<bool>true</bool>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="10" column="0" >
|
|
<widget class="QLabel" name="pathPrefixLA" >
|
|
<property name="text" >
|
|
<string>&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>
|
|
</item>
|
|
<item row="11" column="0">
|
|
<widget class="QLabel" name="texinputsPrefixLA">
|
|
<property name="text">
|
|
<string>TEX&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">
|
|
<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&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>&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&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>&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>&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>&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>&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&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>
|