Le 03/01/2016 22:26, Richard Heck a écrit :
On 01/03/2016 02:25 PM, Guillaume Munch wrote:
Le 03/01/2016 09:46, Georg Baum a écrit :
Guillaume Munch wrote:

Regarding http://www.lyx.org/trac/ticket/9794, I had two questions
below
before making the requested changes:

Le 29/12/2015 00:27, LyX Ticket Tracker a écrit :
#9794: inset-modify tabular commands are incorrectly disabled
-----------------------------------------+-------------------------
    Reporter:  gadmm                        |       Owner:  lasgouttes
        Type:  defect                       |      Status:  new
    Priority:  high                         |   Milestone:  2.2.0
Component:  general                      |     Version:  2.1.3
    Severity:  normal                       |  Resolution:
    Keywords:  regression patch fileformat  |
-----------------------------------------+-------------------------

Comment (by gadmm):

    I now have some little more time again. Only the following
remains to
    do:

    Replying to [comment:17 lasgouttes]:
    >  * increment lyx format and add some lyx2lyx code to update info
    >  insets.

    I need help for "some lyx2lyx code to update info insets", if you
    really want to implement these higher standards. How do I do that?

If you post a description of the needed changes on the list then
somebody
will probably come up with a prototype lyx2lyx code that you can fine
tune.


I would like to know the proper way of applying prefs2prefs_lfun from
format 3 to format 4 in the arg line in the following:

\begin_inset Info
type "shortcut"
arg "inset-modify tabular append-column"
\end_inset

(in Shortcuts.lyx).

This is our own file. I'd just update it manually.

That's what I thought and had done in an earlier version of the patches
(as well as translations).

If you want to update
it programmatically,

I thought this was your and Jean-Marc's idea. My only interest in this
is making sure that things are done in the correct way.

then you need to use lyx2lyx for that, since we're
updating a LyX file. prefs2prefs* are used to update ui, bind, etc,
files.

Then I misunderstood the comment about incrementing the lyx format
version at the same time as the lfun format. I thought the point of your
and Jean-Marc's "new idea" was to use prefs2prefs automatically from now
on inside lyx2lyx to update the info inset.

If you do want to do it via lyx2lyx, then just give me a list of
conversions and I'll write the code. This kind of thing is easy once
you've done it a few times.

The Python code in prefs2prefs_lfuns.lyx is going to be

def conv_tabular_features(line):
line = simple_renaming(line, "inset-modify tabular from-dialog", "inset-modify tabular")
        return simple_renaming(line, "inset-modify tabular", "tabular-feature")


If we allow ourselves to duplicate the code then I expect it to be easy
indeed, but I welcome your input if you give me the equivalent code
using the functions in lyx2lyx.


We can also change it for type="icon", which will affect many more
manuals as well, though this is superfluous given that the renaming hack
that was there before is still there. Maybe we should only bother
doing it if we decide to get rid of the renaming hack at some point.

Just let me know which you want. Easy both ways.

Let's not fix what is not broken, if people agree in this case. This
conversion can be done later by whoever gets rid of the icon name
conversion hack. Or I could use this occasion to get rid of the hack entirely. Easy both ways :)



Guillaume


Reply via email to