Re: fr/beamer.lyx + pdf4: encoding issue

2016-09-22 Thread Scott Kostyshak
On Wed, Sep 21, 2016 at 09:33:32PM +, Guenter Milde wrote:
> On 2016-09-21, Scott Kostyshak wrote:

> > To summarize my argument, I would say: I do not think that changing the
> > ERT comment into a LyX note or a comment inset makes the document less
> > readable. I am tempted to say it makes it *more* readable because a
> > comment inset signals better to the reader than ERT that the contents
> > are a comment, but I think I am searching too much here. In any case, my
> > opinion is that one additional test has a small benefit, and I do not
> > think there is a cost to the reader of the document. So:
> 
> >   small benefit - 0 cost > 0
> 
> OK.

In 2.2.x at 40c262cb and e81f6b04; and master at 513a0bc8 and 27beb8f0.

Scott


signature.asc
Description: PGP signature


Re: [LyX/master] ctests: update labeling patterns.

2016-09-22 Thread Kornel Benko
Am Donnerstag, 22. September 2016 um 21:25:07, schrieb Guenter Milde 

> On 2016-09-22, Kornel Benko wrote:
> > Am Donnerstag, 22. September 2016 um 12:10:50, schrieb Günter Milde 
> > 
> >> commit 6b60e6811bdfe73f0e0cb05dd793b5b5267aa6cc
> >> Author: Günter Milde 
> >> Date:   Thu Sep 22 12:09:39 2016 +0200
> 
> >>  Sublabel: ert
> >>  #
> >>  # Export failures due to "raw" LaTeX use in ERT or preamble code.
> >>  # "Wontfix" if demonstrating correct use and OK in the default output 
> >> format.
> 
> >>  # Non-ASCII in ERT, fails with inputenc==ASCII (e.g. XeTeX with tex-fonts)
> >> -export/doc/(de|es|fr)/Additional_pdf4_texF
> >> +export/doc/(de|es)/Additional_pdf4_texF
> 
> 
> > Now, export/doc/es/Additional_pdf4_texF in under label lyxbugs and under 
> > label ert in invertedTests. At the same time
> > in unreliableTests (mask = export/doc/es/.*_(pdf[45]|dvi3)_texF) under 
> > label wrong_output.
> 
> > Which of the labels should it be? (now it is wrong_output)
> 
> Actually both, because this are independent issues:
> 
> * we know export fails currently (like for de/Additional_pdf4_texF)
>   due to nonASCII in an ERT inset
>   
> * we know Spanish has problems with pdf[45]|dvi3)_texF leading to wrong
>   output without (but not export failure).
>   
>   # Babel uses the "unicode" strings if it detects XeTeX or LuaTeX.
>   # This is wrong for Xe/Lua with 8-bit TeX-fonts.
> 
> Please keep both patterns, even if currently it is not possible to have
> both labels. This way, the correct label will be applied if one of the
> issues is solved and the related pattern removed.
> 

But that is simply not correct.
You could use for instance
Sublabel: wrong_output ert lyxbugs

> Günter

Kornel

signature.asc
Description: This is a digitally signed message part.


Re: toolbars Lock menu

2016-09-22 Thread Guillaume Munch

Le 22/09/2016 à 09:18, racoon a écrit :

Hi Guillaume,

Thanks a lot. I have added some comments. I tried to fix what I could. I
am a total amateur in this. I don't know what bug there should be since
it works as expected for me. It would be great if you give me further
instructions or just show me how to do the improvements. While I think
it is helpful to do exercises to learn it myself, I also need to see a
couple of times how to do it first.

On 21.09.2016 17:24, Guillaume Munch wrote:

Le 11/08/2016 à 14:56, racoon a écrit :
* I expected to find the lock toolbar option when right-clicking on the
toolbars. Do you know where to add this?


Yes, I do. But I think it should be like this:

1. There should be a LFUN for setting the icon size.
2. The four default icon sizes from the widget (LyX main window) context
menu should go to the Toolbars menu.
3. The whole Toolbars menu should appear when the widget's context menu
is opened.


I see what you mean. It really depends on how much effort you are ready 
to put into this. It might be overkill.




 GuiToolbar::GuiToolbar(ToolbarInfo const & tbinfo, GuiView & owner)
-: QToolBar(toqstr(tbinfo.gui_name), ), visibility_(0),
+: QToolBar(toqstr(tbinfo.gui_name), ), visibility_(0),
movability_(0),


I think this new variable is redundant with isMovable()/setMovable()
from qt and can be made without.


I just did a copy of the visibility for movability. I am also not sure
how to replace its functionality.


GuiToolbar inherits QToolBar::isMovable() whose value happens to
coincide with movability_ in your patch.



So does this imply that that variable is redundant too?


I quickly checked and as I can see that in GuiView::initToolbar,
setVisible and setVisibility are called differently, so I cannot
conclude that visibility_ is redundant.



 GuiToolbar * tb = toolbar(cit->name);
 if (tb && !tb->isRestored())
-initToolbar(cit->name);
+initToolbar(cit->name);


You have a strange indentation here.


I used the defaults tabs in visual studio. I think there is an option
called "Smart" indentation. Maybe it is not so smart after all to use
it. I have set it now to block. Now I have to manually start new
indentation but at least they are now all 4 spaces wide.


Ideally one wants automatic indentation, but I could only help you with
emacs.



+case LFUN_TOOLBAR_MOVABLE: {
+string const name = cmd.getArg(0);
+// use negation since locked == !movable
+if (name == "*") {
+// toolbar name * locks all toolbars
+flag.setOnOff(!toolbarsMovable);
+


There must be a bug here because it is always shown as "on" for me.


I don't understand what is always "on" here. The "Lock Toolbars
Positions" menu entry does get checked and unchecked, right?


It's always checked for me, I don't really know why. But it correctly 
switches movable status.





Actually I wonder whether it's useful to store the flag and update it
by hand, since it is not very expensive to compute it every time. Having
this flag looks like a premature optimisation.


I thought it is needed for the "Lock Toolbars Positions". Don't know how
to do without.


Instead of a member variable bool toolbarsMovable you could have a 
function bool toolbarsMovable() const, that would compute the value as 
you did previously.




Guillaume



Re: [LyX/master] ctests: found reason for "seminar" failure.

2016-09-22 Thread Scott Kostyshak
On Thu, Sep 22, 2016 at 11:54:52PM +0200, Günter Milde wrote:
> commit 11a036b87145b1fdaa216e238f0a6b1f5d36c3c0
> Author: Günter Milde 
> Date:   Thu Sep 22 23:54:18 2016 +0200
> 
> ctests: found reason for "seminar" failure.
> ---

> +#10394 Do not error on missing characters in "nullfont".
> +# "LaTeXing" seminar fails (except for LuaTeX) with 
> +#Missing character: There is no 0 in font nullfont!
> +# due to a bug in PGF (https://sourceforge.net/p/pgf/bugs/314/)

Thanks for referencing the bug report. It says it was fixed a year ago.
It did not make it into TL 2016?

Scott


signature.asc
Description: PGP signature


Re: [LyX/master] ctests: update labeling patterns.

2016-09-22 Thread Guenter Milde
On 2016-09-22, Kornel Benko wrote:
> Am Donnerstag, 22. September 2016 um 12:10:50, schrieb Günter Milde 
> 
>> commit 6b60e6811bdfe73f0e0cb05dd793b5b5267aa6cc
>> Author: Günter Milde 
>> Date:   Thu Sep 22 12:09:39 2016 +0200

>>  Sublabel: ert
>>  #
>>  # Export failures due to "raw" LaTeX use in ERT or preamble code.
>>  # "Wontfix" if demonstrating correct use and OK in the default output 
>> format.

>>  # Non-ASCII in ERT, fails with inputenc==ASCII (e.g. XeTeX with tex-fonts)
>> -export/doc/(de|es|fr)/Additional_pdf4_texF
>> +export/doc/(de|es)/Additional_pdf4_texF


> Now, export/doc/es/Additional_pdf4_texF in under label lyxbugs and under 
> label ert in invertedTests. At the same time
> in unreliableTests (mask = export/doc/es/.*_(pdf[45]|dvi3)_texF) under label 
> wrong_output.

> Which of the labels should it be? (now it is wrong_output)

Actually both, because this are independent issues:

* we know export fails currently (like for de/Additional_pdf4_texF)
  due to nonASCII in an ERT inset
  
* we know Spanish has problems with pdf[45]|dvi3)_texF leading to wrong
  output without (but not export failure).
  
  # Babel uses the "unicode" strings if it detects XeTeX or LuaTeX.
  # This is wrong for Xe/Lua with 8-bit TeX-fonts.

Please keep both patterns, even if currently it is not possible to have
both labels. This way, the correct label will be applied if one of the
issues is solved and the related pattern removed.


Günter



Re: [LyX/master] ctests: update labeling patterns.

2016-09-22 Thread Kornel Benko
Am Donnerstag, 22. September 2016 um 17:39:22, schrieb Kornel Benko 

> 
> Now, export/doc/es/Additional_pdf4_texF in under label lyxbugs and under 
> label ert in invertedTests. At the same time
> in unreliableTests (mask = export/doc/es/.*_(pdf[45]|dvi3)_texF) under label 
> wrong_output.
> 
> Which of the labels should it be? (now it is wrong_output)

Don't get me wrong, I am happy someone takes care for the tests :)

Kornel

signature.asc
Description: This is a digitally signed message part.


Re: [LyX/master] ctests: update labeling patterns.

2016-09-22 Thread Kornel Benko
Am Donnerstag, 22. September 2016 um 12:10:50, schrieb Günter Milde 

> commit 6b60e6811bdfe73f0e0cb05dd793b5b5267aa6cc
> Author: Günter Milde 
> Date:   Thu Sep 22 12:09:39 2016 +0200
> 
> ctests: update labeling patterns.
> ---
>  development/autotests/invertedTests   |9 -
>  development/autotests/unreliableTests |2 +-
>  2 files changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/development/autotests/invertedTests 
> b/development/autotests/invertedTests
> index 8dab991..f31a913 100644
> --- a/development/autotests/invertedTests
> +++ b/development/autotests/invertedTests
> @@ -93,13 +93,20 @@ export/export/WrongDfnTagHandling_xhtml
>  # contains underscores etc.
>  export/export/latex/LongestLabelWithUnderscore.*
>  
> +#9871 LyX sends invalid Unicode to iconv when converting to ASCII
> +# most probably due to BabelPreamble code (language specific headings for
> +# theorems, problems , ... are written in the language's default encoding 
> +# if they contain non-ASCII characters)
> +export/doc/(es|fr)/Additional_pdf4_texF
> +
> +
>  Sublabel: ert
>  #
>  # Export failures due to "raw" LaTeX use in ERT or preamble code.
>  # "Wontfix" if demonstrating correct use and OK in the default output format.
>  
>  # Non-ASCII in ERT, fails with inputenc==ASCII (e.g. XeTeX with tex-fonts)
> -export/doc/(de|es|fr)/Additional_pdf4_texF
> +export/doc/(de|es)/Additional_pdf4_texF


Now, export/doc/es/Additional_pdf4_texF in under label lyxbugs and under label 
ert in invertedTests. At the same time
in unreliableTests (mask = export/doc/es/.*_(pdf[45]|dvi3)_texF) under label 
wrong_output.

Which of the labels should it be? (now it is wrong_output)

Kornel


signature.asc
Description: This is a digitally signed message part.


strange behavior copying snippets from doc-settings to doc-settings

2016-09-22 Thread mn
With LyX 2.2.1 I experience a strange behavior when trying to reuse old
preamble-code in newly created documents.

Steps to reproduce.
Open a new document and then an old one,
open document settings for the old doc, mark a string in the
LaTeX-preamble, copy the string into the clipboard buffer.
Now switch to the new document, open settings and try to paste the
contents of the clipboard.

Nothing will happen.
(I made extra sure that the preamble-window-box is active and accepting
intput)

The buffer contains the copied string and it is possible to paste it in
external applications and also into the regular lyx-text-editor.

(And after pasting it into the text-editor of lyx it will also show up
when pasted again in the preamble, so this is also a workaround?
It will not be pasted into the preamble if it is only pasted in an
external application.)

This is on Mac, OS X 10.10

greetings
Mike


Re: [LyX/master] Document the new behaviour in mathed

2016-09-22 Thread Guenter Milde
On 2016-09-21, Guillaume Munch wrote:
> Le 19/09/2016 à 11:58, Enrico Forestieri a écrit :

>> When inserting a command or symbol in mathed, it is now automatically
>> wrapped in a real inset (either \text or \ensuremath) assuring the correct
>> mode, instead of being wrapped only in the output. The wrapping inset can
>> be safely dissolved, as it will be automatically inserted at export time
>> if needed, as usual.

> For people who did not follow the relevant thread: it seems that there 
> is no clear agreement on whether this is better than the old behaviour. 
> People are encouraged to test and give their feedback.

It still fails for \textdegree:

  - \textdegree in math-mode input as-is
  - \textdegree in "mathematical text" wrapped in \ensuremath{}
  
 
Both, textsymbols and mathsymbols are colored in "math" color.

Unit symbols wrong when using a fraction in \text: 

\begin_inset Formula $50\,\text{\frac{m}{s}}$
\end_inset

exported as

  $50\,\text{\ensuremath{\frac{m}{s}}}$

(upright in the GUI but italic in the output).


It works fine with \mathrm:

Fraction units with mathrm: 
\begin_inset Formula $50\,\mathrm{\frac{m}{s}}$
\end_inset

(upright in the GUI and in the output).

Günter



Re: fix math toolbars

2016-09-22 Thread Guenter Milde
On 2016-09-16, Enrico Forestieri wrote:
> On Fri, Sep 16, 2016 at 12:33:08AM +0100, Guillaume Munch wrote:
>> Le 15/09/2016 à 23:52, Enrico Forestieri a écrit :
>> >On Thu, Sep 15, 2016 at 01:41:30PM +0100, Guillaume Munch wrote:

>> >>Also, I was surprised to see that when I enter \textit,\mbox,... it gets
>> >>wrapped inside a \text environment.
>> >
>> >Both issues should be solved now.

>> Yes, I confirm. Thank you.

I suggest different keywords for

a) commands that switch to text mode, and

b) commands that only work in text mode.

How about "textmode" for a) # as before in lib/symbols
and   "textcommand" for b)? # cf. lib/unicodesymbols

>> In practice I find that one has to change one's habits when writing text
>> in math. The new behaviour seems consistent and understandable though.

> I simply hate it ;-)

I am not happy with it either...

>> I am wondering though, as I thought that the original patch was only
>> supposed to change what happens when one inserts a macro: how come does
>> the code to output to latex had to change? Did I miss something about
>> the effect of the patch?

> There are two different series of patches. 
> The one from #9742 simply adjusts things on export. The other one
> implements the desiderata from Günter so that proper real insets are
> inserted to assure the correct mode. These are orthogonal to each
> other.

...

My aims are

* keep it simple

* promote clean formula writing

* enable fast formula writing

* ensure that the content of a Formula Inset is valid LaTeX
  (as far as possible, but this is a topic for a different thread).

I appreciate the concessions. However, with the current status none of my
aims is reached.

> I really hate the automatic insertion of real insets because they are not
> practical from my point of view. They make hard navigation and selection.

> For example, if you type "\int a" in an \mbox, you now get
> "\mbox{\ensuremath{\int a}}", but if you dissolve \ensuremath, you
> get "\mbox{\ensuremath{\int}a}" at export time. This is what I think
> should be the case, as if I type \int in textmode I only want an
> integral sign in the middle of text. 

In a formula, \int is usually followed by the limits or a variable.
Both require math-mode.

When typing a mathcommand with the cursor at the last position of an
\mbox, I usually want to get out of the "mathematical text" (back to the
enclosing math-mode) not in a new inset.



> Instead, now I have to remember to move out of \ensuremath in order to
> obtain a textmode "a" (or remember to dissolve the now real
> \ensuremath).

Moving out of math-mode is fortunately simple ([Space]).
Moving out of "mathematical text" is more cumbersome.
Dissolving an inset would become simpler if LyX supported dissolving with
[Del] at the last position. 


Günter



Re: Enable View master document even if there are no child documents

2016-09-22 Thread Guillaume Munch

Le 22/09/2016 à 04:41, Richard Heck a écrit :

On 09/21/2016 06:43 PM, Guillaume Munch wrote:

Le 29/08/2016 à 17:02, Jean-Marc Lasgouttes a écrit :


This has been discussed some time ago. The command:
  command-alternative master-buffer-view; buffer-view
does what you want.


However, it would make sense to have a first-class command that just
does the right thing IMO.




The attached patch does what you want.

The only problem is that now "View/Update Master Document" is always
shown.


I suppose the thing to do is something like this: If we are the master,
then
disable LFUN_MASTER_BUFFER_VIEW and break; otherwise fall through.



I am not I understand our suggestion. Would that not disable 
master-buffer-view in even more cases than before, while we want to 
enable it even for standalone document?





Re: [LyX/master] Improve systemlyxdir handling

2016-09-22 Thread Enrico Forestieri
Richard?

On Sat, Sep 17, 2016 at 11:17:41PM +0200, Enrico Forestieri wrote:

> On Sat, Sep 17, 2016 at 10:48:08PM +0200, Enrico Forestieri wrote:
> 
> > commit ade098e2896bd9d7d87b3df1a9276661dd3f7c78
> > Author: Enrico Forestieri 
> > Date:   Sat Sep 17 22:38:27 2016 +0200
> > 
> > Improve systemlyxdir handling
> > 
> > Do not assume that the /systemlyxdir path prefix in \origin refers
> > to the system directory of the running instance, but check through
> > some heuristics what the real system dir is. In this way, a document
> > in the system dir of any other LyX installation is correctly spotted
> > and the \origin tag properly updated. For example, one can use an
> > installed version of lyx to edit a document in the lib/doc dir of a
> > git repo and obtain the same result as when running lyx in place.
> 
> Richard, I think that this most useful in stable, as Uwe seems using that
> version for editing docs in the master version.
> 
> > ---
> >  src/BufferParams.cpp |   41 ++---
> >  1 files changed, 38 insertions(+), 3 deletions(-)
> > 
> > diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp
> > index fa95e6a..eff684d 100644
> > --- a/src/BufferParams.cpp
> > +++ b/src/BufferParams.cpp
> > @@ -305,6 +305,35 @@ SpaceTranslator const & spacetranslator()
> > return translator;
> >  }
> >  
> > +
> > +bool inSystemDir(FileName const & document_dir, string & system_dir)
> > +{
> > +   // A document is assumed to be in a system LyX directory (not
> > +   // necessarily the system directory of the running instance)
> > +   // if both "configure.py" and "chkconfig.ltx" are found in
> > +   // either document_dir/../ or document_dir/../../.
> > +   // If true, the system directory path is returned in system_dir
> > +   // with a trailing path separator.
> > +
> > +   string const msg = "Checking whether document is in a system dir...";
> > +
> > +   string dir = document_dir.absFileName();
> > +
> > +   for (int i = 0; i < 2; ++i) {
> > +   dir = addPath(dir, "..");
> > +   if (!fileSearch(dir, "configure.py").empty() &&
> > +   !fileSearch(dir, "chkconfig.ltx").empty()) {
> > +   LYXERR(Debug::FILES, msg << " yes");
> > +   system_dir = addPath(FileName(dir).realPath(), "");
> > +   return true;
> > +   }
> > +   }
> > +
> > +   LYXERR(Debug::FILES, msg << " no");
> > +   system_dir = string();
> > +   return false;
> > +}
> > +
> >  } // anon namespace
> >  
> >  
> > @@ -683,8 +712,12 @@ string BufferParams::readToken(Lexer & lex, string 
> > const & token,
> > origin = lex.getString();
> > string const sysdirprefix = "/systemlyxdir/";
> > if (prefixIs(origin, sysdirprefix)) {
> > -   origin.replace(0, sysdirprefix.length() - 1,
> > -   package().system_support().absFileName());
> > +   string docsys;
> > +   if (inSystemDir(filepath, docsys))
> > +   origin.replace(0, sysdirprefix.length() - 1, 
> > docsys);
> > +   else
> > +   origin.replace(0, sysdirprefix.length() - 1,
> > +   
> > package().system_support().absFileName());
> > }
> > } else if (token == "\\begin_preamble") {
> > readPreamble(lex);
> > @@ -1028,8 +1061,10 @@ void BufferParams::writeFile(ostream & os, Buffer 
> > const * buf) const
> > // the document directory (must end with a path separator)
> > // realPath() is used to resolve symlinks, while addPath(..., "")
> > // ensures a trailing path separator.
> > +   string docsys;
> > string filepath = addPath(buf->fileName().onlyPath().realPath(), "");
> > -   string const sysdir = addPath(package().system_support().realPath(), 
> > "");
> > +   string const sysdir = inSystemDir(FileName(filepath), docsys) ? docsys
> > +   : addPath(package().system_support().realPath(), "");
> > string const relpath =
> > to_utf8(makeRelPath(from_utf8(filepath), from_utf8(sysdir)));
> > if (!prefixIs(relpath, "../") && !FileName::isAbsolute(relpath))
> 
> -- 
> Enrico

-- 
Enrico


Re: toolbars Lock menu

2016-09-22 Thread racoon

Hi Guillaume,

Thanks a lot. I have added some comments. I tried to fix what I could. I 
am a total amateur in this. I don't know what bug there should be since 
it works as expected for me. It would be great if you give me further 
instructions or just show me how to do the improvements. While I think 
it is helpful to do exercises to learn it myself, I also need to see a 
couple of times how to do it first.


On 21.09.2016 17:24, Guillaume Munch wrote:

Le 11/08/2016 à 14:56, racoon a écrit :


Hi, Thanks and sorry for the delay. Here is an updated version. (I hope
I have not forgotten to include all files in the patch.) This time the
Lock Toolbars Positions is locked if and only if each toolbar is locked.
I guess that makes more sense.



Hi Daniel,

at last, a few comments. Some general ones first:

* Although your patch has extension .patch, it is only a diff. (The best
way to produce a patch is to use the command git format-patch which
includes the author, the timestamp and the commit log.)


Well, I have to figure out how to do a proper patch then. (I just used 
git gui's "Make patch" function (Repository > Visualize master's 
History, right click on "Local changes checked in to the index but not 
committed" and choose "Make patch"). I also entered my name in git gui 
under Options. But that's about it.)



* At some point the indentation is not correct (one tab too much). Have
you set up your editor properly so that it inserts the proper amount of
indentation automatically?


I have now I think.


* I expected to find the lock toolbar option when right-clicking on the
toolbars. Do you know where to add this?


Yes, I do. But I think it should be like this:

1. There should be a LFUN for setting the icon size.
2. The four default icon sizes from the widget (LyX main window) context 
menu should go to the Toolbars menu.
3. The whole Toolbars menu should appear when the widget's context menu 
is opened.



Some more specific comments below.


Me too.


diff --git a/src/FuncCode.h b/src/FuncCode.h
index 04f1671..3fd0319 100644
--- a/src/FuncCode.h
+++ b/src/FuncCode.h
@@ -466,6 +466,7 @@ enum FuncCode
 LFUN_BUFFER_MOVE_PREVIOUS,  // skostysh 20150408
 LFUN_TABULAR_FEATURE,   // gm, 20151210
 LFUN_BRANCH_INVERT, // rgheck, 20160712
+LFUN_TOOLBAR_MOVABLE,   // daniel, 20160712
 LFUN_LASTACTION // end of the table
 };

diff --git a/src/LyXAction.cpp b/src/LyXAction.cpp
index 77864db..a974afa 100644
--- a/src/LyXAction.cpp
+++ b/src/LyXAction.cpp
@@ -2728,6 +2728,17 @@ void LyXAction::init()
  */
 { LFUN_TOOLBAR_TOGGLE, "toolbar-toggle", NoBuffer, Buffer },
 /*!
+* \var lyx::FuncCode lyx::LFUN_TOOLBAR_MOVABLE
+* \li Action: Toggles movability of a given toolbar between true/false.
+* \li Syntax: toolbar-movable 
+* \li Params: : *|standard|extra|table|math|mathmacrotemplate|\n
+minibuffer|review|view/update|math_panels|vcs|
+view-others|update-others
+* \li Origin: daniel, 12 July 2016
+* \endvar
+*/
+{ LFUN_TOOLBAR_MOVABLE, "toolbar-movable", NoBuffer, Buffer },
+/*!
  * \var lyx::FuncCode lyx::LFUN_MENU_OPEN
  * \li Action: Opens the menu given by its name.
  * \li Syntax: menu-open 
diff --git a/src/frontends/qt4/GuiToolbar.cpp
b/src/frontends/qt4/GuiToolbar.cpp
index 77471c9..56dca72 100644
--- a/src/frontends/qt4/GuiToolbar.cpp
+++ b/src/frontends/qt4/GuiToolbar.cpp
@@ -53,7 +53,7 @@ namespace lyx {
 namespace frontend {

 GuiToolbar::GuiToolbar(ToolbarInfo const & tbinfo, GuiView & owner)
-: QToolBar(toqstr(tbinfo.gui_name), ), visibility_(0),
+: QToolBar(toqstr(tbinfo.gui_name), ), visibility_(0),
movability_(0),


I think this new variable is redundant with isMovable()/setMovable()
from qt and can be made without.


I just did a copy of the visibility for movability. I am also not sure 
how to replace its functionality.


So does this imply that that variable is redundant too?


   owner_(owner), command_buffer_(0), tbinfo_(tbinfo),
filled_(false),
   restored_(false)
 {
@@ -61,8 +61,6 @@ GuiToolbar::GuiToolbar(ToolbarInfo const & tbinfo,
GuiView & owner)
 connect(, SIGNAL(iconSizeChanged(QSize)), this,
 SLOT(setIconSize(QSize)));

-// Toolbar dragging is allowed.
-setMovable(true);
 // This is used by QMainWindow::restoreState for proper main
window state
 // restauration.
 setObjectName(toqstr(tbinfo.name));
@@ -111,6 +109,13 @@ void GuiToolbar::setVisibility(int visibility)
 }


+void GuiToolbar::setMovability(bool movability)
+{
+movability_ = movability;
+}
+
+
+
 Action * GuiToolbar::addItem(ToolbarItem const & item)
 {
 QString text = toqstr(item.label_);
@@ -358,6 +363,7 @@ void GuiToolbar::saveSession() const
 {
 QSettings settings;
 settings.setValue(sessionKey() + "/visibility", visibility_);
+settings.setValue(sessionKey() + "/movability", movability_);
 }


@@ -374,6 +380,11 @@ void GuiToolbar::restoreSession()


Re: Fwd: two indexes: one has black and the other blue page numbers

2016-09-22 Thread Jürgen Spitzmüller
Am Donnerstag, den 22.09.2016, 05:08 +0200 schrieb Michael Berger:
> Dear Jürgen,
> talking to an expert always rewards - in one way or another.
> In the course of making the mini file 'less complex' I removed all 
> loaded modules except 'Linguistics'.
> And that solved the problem. Loading the module FiXme again had the 
> problem return.
> Removing FiXme in my real document solved the problem there as well.
> 
> I found 'fixme.sty ... modified 28.01.2013' - is this of relevance?

Maybe, but as long as you do not provide a real minimal example, I
cannot really help.

Jürgen

> 
> Thanks again and cheers!
> Michael

signature.asc
Description: This is a digitally signed message part