It is now possible opening documents that where manually moved to a
different location after they were saved and still produce an output.
Indeed, (hopefully) all needed included files are now still found.
When the moved document is saved again, all paths are accordingly updated.
Of course, for this to work, a document has to be saved in Format 490,
at least.
As an example, after converting the user guide to the last format, it can
be copied anywhere and opened without the need of adapting the paths of
included files or moving them to a proper place.
There is one glitch I am aware of. When moving a child document (but not
the master) the path to the master is correctly updated but it won't be
recognized as such. This is because LyX checks that the parent actually
includes this document but, of course, being the parent document not
touched, it appears not including this child. Anyway, it will also occur
when saving the child to a different location and the user is warned
on the terminal about this fact when the moved child is loaded.
However, there is no problem when it is the master that has been moved.
* src/BufferView.cpp:
* src/FuncCode.h:
* src/LyXAction.cpp:
- new LFUN_NEXT_INSET_MODIFY
* src/insets/InsetBox.{cpp, h}:
* src/insets/InsetCommand.{cpp,h}:
* src/insets/InsetNote.{cpp,h}:
* src/insets/InsetSpace.{cpp,h}:
* src/insets/InsetVSpace.{cpp,h}:
- implement context menu and access to some changes
* lib/ui/stdmenus.ui:
- new context menus for Box, Space, VSpace, Note.
- extend the context menu for InsetRef.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23920 a592a061-630c-0410-9148-cb99ea01b6c8
The idea behind this patch is to make real key-value support for InsetCommand parameters possible. This should be particularly useful for the listings version of InsetInclude, though we would need some kind of UI for it before it would really be helpful. (See below for some thoughts.) This doesn't substantially change anything else, though some things do get re-arranged a bit.
Basically, the idea is this. First, we introduce a whole range of parameter types: Normal LaTeX optional and required parameters; ones for LyX's internal use (like embed); and finally, in connection with keyval, ones that represent keys and ones that represent optional and required arguments where the keyval stuff will appear. (I'm assuming here that there will always be exactly one of those, and that it will accept only keyval-type material.) The parameters themselves are stored in a map, so it's really only the output routines that need to care about the different types of parameters.
Regarding the frontend, it seems to me that something like the following would work:
(i) scan the parameter list for LATEX_KEY type parameters
(ii) the dialog will have a series of lines, each of which has a combo box listing the acceptable keys and a QLineEdit for entering its value, as well as a "delete" button of some sort for removing this key and its value
(iii) there should be an "add line" button to add a new line, activated only when all other lines are filled with values
Probably not even too hard.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23235 a592a061-630c-0410-9148-cb99ea01b6c8
This patch reworks the machinery that holds information about what parameters there are and what their values are. There's enough flexibility here that true keyval support ought to be fairly easy at this point. I'll have a peek at that shortly.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23168 a592a061-630c-0410-9148-cb99ea01b6c8
(i) The file format is changed, so that command insets are represented as:
\begin_inset CommandInset insetype
LatexCommand command
...
\end_inset
This involves some lyx2lyx and changes to the readInset() routine in factory.cpp
(ii) The InsetCommand and InsetCommandParams classes also have to be changed, as the command name was used in these classes for various purposes for which the inset type ought really to be used.
Further clean-up to come.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20544 a592a061-630c-0410-9148-cb99ea01b6c8