Re: LyX-Workarea: Background not shown correctly

2017-10-21 Thread Patrick De Visschere
Jean-Marc,

This works because every update is turned into a FullScreenUpdate. Right?

Isn’t this a waste of work?

Do you consider this as a permanent solution?

I’ve tried to solve the problem by using: viewport()->update(0,y,w,h) and thus 
specifying the proper coordinates.
If I pass the coordinates of the paragraph, I notice that “SingleParUpdate" 
actually means “SingleRowUpdate". Since only the current paragraph is painted 
black now, except for the current row. There is also still a problem when 
making a selection and when moving the cursor around.
Therefore I should pass the coordinates of the current row instead, to begin 
with. The selection/cursor problems might be more difficult to solve.

What’s your opinion on this?

pdv 


> On 19 Oct 2017, at 23:24, Jean-Marc Lasgouttes  wrote:
> 
> Le 19 octobre 2017 22:34:07 GMT+02:00, Patrick De Visschere 
>  a écrit :
>> This works as far as I can see.
> 
> This is very very good news. I'll commit that as soon as the rest is in a 
> good enough shape, since the two are related. Thanks a lot for the detective 
> work.
> 
> JMarc




smime.p7s
Description: S/MIME cryptographic signature


Re: compilation of LyX 2.3 fails with Python 3.6.2

2017-10-21 Thread Kornel Benko
Am Samstag, 21. Oktober 2017 um 13:17:55, schrieb Uwe Stöhr 
> El 18.10.2017 a las 15:18, Kornel Benko escribió:
> 
> > There should not be a problem.
> 
> Hello Kornel,
> 
> many thanks for the commit. However, in the 2.3.x branch I still get
> 
>  File "C:\Program Files (x86)\Python35-32\lib\encodings\cp1252.py", 
> line 23, in decode return 
> codecs.charmap_decode(input,self.errors,decoding_table)[0]
>UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in 
> position 2107: character maps to 
> 
> To solve this issue I need the attached patch (which is already in master).

I would wait for the patch from Günter.

> I don't know if this patch is also safe for Python 2.7 and cannot check 
> this at the moment.
>
> --
> 
> There is a new bug: The output of the script are LyX files with a blank 
> line in every second file line, see the attached file as example.

I don't see it on linux :(
But I see, that there are  in your attached file.
Is this from the 2.3 tree?
If yes, then the patch from Günter should fix the issue.

> regards Uwe

Kornel

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


Re: [LyX/2.3.x] Cmake doc creations: Setting environment PYTHONIOENCODING

2017-10-21 Thread Kornel Benko
Am Samstag, 21. Oktober 2017 um 11:21:24, schrieb Kornel Benko 
> commit 72122beee885decb251b1634cf4ae3cab9487e17
> Author: Kornel Benko 
> Date:   Sat Oct 21 11:18:02 2017 +0200
> 
> Cmake doc creations: Setting environment PYTHONIOENCODING
> 
> 1. This should force the python executable to use the desired encoding.
>   The command is moved to a wrapper script to be able to set the 
> environment
>   at make-run-time.
>   cherry-picked from a68ef98 and f3c8884
> 2. Python is choking on '\\'
>   cherry-picked from 65deb30
> 
> Omiting changes to ReplaceValues.py, which will be hopefully done by 
> Günter Milde

OK also for 2.2.x Richard?

Kornel

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


Re: compilation of LyX 2.3 fails with Python 3.6.2

2017-10-21 Thread Uwe Stöhr

El 18.10.2017 a las 15:18, Kornel Benko escribió:


There should not be a problem.


Hello Kornel,

many thanks for the commit. However, in the 2.3.x branch I still get

File "C:\Program Files (x86)\Python35-32\lib\encodings\cp1252.py", 
line 23, in decode return 
codecs.charmap_decode(input,self.errors,decoding_table)[0]
  UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in 
position 2107: character maps to 


To solve this issue I need the attached patch (which is already in master).

I don't know if this patch is also safe for Python 2.7 and cannot check 
this at the moment.


--

There is a new bug: The output of the script are LyX files with a blank 
line in every second file line, see the attached file as example.


regards Uwe
diff --git 
"a/C:\\Users\\Usti\\AppData\\Local\\Temp\\TortoiseGit\\ReplaceValues-72122be.001.py"
 "b/D:\\LyXGit\\2.3.x\\development\\cmake\\doc\\ReplaceValues.py"
index f07ce80bc9..ded26cb331 100644
--- 
"a/C:\\Users\\Usti\\AppData\\Local\\Temp\\TortoiseGit\\ReplaceValues-72122be.001.py"
+++ "b/D:\\LyXGit\\2.3.x\\development\\cmake\\doc\\ReplaceValues.py"
@@ -13,6 +13,7 @@ from __future__ import print_function
 
 import sys
 import re
+import codecs
 
 Subst = {}  # map of desired substitutions
 prog = re.compile("")
@@ -33,7 +34,7 @@ def SubstituteDataInLine(line):
 
 
 def SubstituteDataInFile(InFile):
-for line in open(InFile):
+for line in codecs.open(InFile, 'r', 'utf-8'):
 print(SubstituteDataInLine(line[:-1]))
 
 ##


Formula-numbering.lyx
Description: application/lyx


Re: [LyX/2.3.x] Cmake doc creations: Setting environment PYTHONIOENCODING

2017-10-21 Thread Uwe Stöhr

El 21.10.2017 a las 11:29, Kornel Benko escribió:


OK also for 2.2.x Richard?


There are issues with this, see my recent post. With LyX 2.2.x we rely 
on python 2.x and we don't have a problem. Therefore I opt to keep the 
2.2.x branch as it is.


regards Uwe


Re: List of notes not in beta1

2017-10-21 Thread racoon

On 21.10.2017 10:28, Jean-Marc Lasgouttes wrote:

Le 20 octobre 2017 23:37:53 GMT+02:00, racoon  a écrit :

Thanks. Well, I guess there must be something wrong with my
configuration then...


Did you customize your layout file(s) related to notes?


Thanks. Yes, I did. And now that I removed the layout file it works.

However, the exact same layout file works in LyX 2.2. Now I have to 
figure out what's going on.


Daniel



Re: List of notes not in beta1

2017-10-21 Thread Jürgen Spitzmüller
Am Samstag, den 21.10.2017, 11:12 +0300 schrieb racoon:
> On 21.10.2017 10:28, Jean-Marc Lasgouttes wrote:
> > Le 20 octobre 2017 23:37:53 GMT+02:00, racoon  a
> > écrit :
> > > Thanks. Well, I guess there must be something wrong with my
> > > configuration then...
> > 
> > Did you customize your layout file(s) related to notes?
> 
> Thanks. Yes, I did. And now that I removed the layout file it works.
> 
> However, the exact same layout file works in LyX 2.2. Now I have to 
> figure out what's going on.

You probably miss these two lines in your own definition of notes:

AddToToc  note
IsTocCaption  true

Jürgen

> 
> Daniel
> 

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


Re: Windows: bring window to front

2017-10-21 Thread Enrico Forestieri
On Sat, Oct 21, 2017 at 12:44:39AM +0300, racoon wrote:
> On 17.10.2017 14:07, Enrico Forestieri wrote:
> > 
> > It works for me. Make sure that you have "Single Instance" checked and
> > "LyXServer pipe" defined in the preferences.
> 
> I have it checked and defined, respectively. (Though I am wondering why
> "Single instance" should make a difference at all and "LyXServer pipe" at
> least for opening documents from the explorer.)

When "Single Instance" is checked, LyX opens documents in an already
running instance, communicating with it through the "LyXServer pipe".
Lacking the one or the other, LyX opens documents in a new instance.

If the problem that you experience is that the LyX window is not brought
to front even when no other instance is already running, then this is
not covered by the patch you reference and must be a quirk of Windows.

> But it doesn't work. Just to be sure, you tested on Windows beta1, right?

Yep.

-- 
Enrico


Re: List of notes not in beta1

2017-10-21 Thread Jean-Marc Lasgouttes
Le 20 octobre 2017 23:37:53 GMT+02:00, racoon  a écrit :
>Thanks. Well, I guess there must be something wrong with my 
>configuration then...

Did you customize your layout file(s) related to notes?

JMarc



Re: List of notes not in beta1

2017-10-21 Thread Jean-Marc Lasgouttes
Le 21 octobre 2017 10:31:31 GMT+02:00, "Jürgen Spitzmüller"  a 
écrit .
>You probably miss these two lines in your own definition of notes:
>
>   AddToToc  note
>   IsTocCaption  true

Why doesn't layout2layout do that for Note:xxx layouts ?

JMarc


Re: compilation of LyX 2.3 fails with Python 3.6.2

2017-10-21 Thread Guenter Milde
On 2017-10-21, Kornel Benko wrote:
> Am Samstag, 21. Oktober 2017 um 13:17:55, schrieb Uwe Stöhr 
>> El 18.10.2017 a las 15:18, Kornel Benko escribió:

>> To solve this issue I need the attached patch (which is already in
>> master).

> I would wait for the patch from Günter.

It is in the 2.3 branch now. Should work with both, Python 2 and 3.

>> There is a new bug: The output of the script are LyX files with a blank 
>> line in every second file line, see the attached file as example.

> I don't see it on linux :(
> But I see, that there are  in your attached file.
> Is this from the 2.3 tree?
> If yes, then the patch from Günter should fix the issue.


Uwe, it would be nice, if you could test it under Windows
(with/without utf8 locale). I these tests pass, I suggest the patch also
for master.

Thanks,

Günter