Re: #10481: Hardening LyX against potential misuse

2016-12-06 Thread Enrico Forestieri
On Tue, Dec 06, 2016 at 10:57:56PM +0100, Tommaso Cucinotta wrote:
> On 06/12/2016 20:44, Enrico Forestieri wrote:
> > > From 8f157f2d3beb48ae87f9dcd07d59ee062a7a7da0 Mon Sep 17 00:00:00 2001
> > > From: Tommaso Cucinotta 
> > > Date: Mon, 28 Nov 2016 00:31:46 +0100
> > > Subject: [PATCH] Converters Prefs UI layout clarification.
> > [...]
> > > -
> > > - Converter Definitions
> > > -
> > > -
> > > - convertersLW
> > > -
> > 
> > Please, note that you removed this "buddy", so that the Converters
> > Definitions section is not accessible by shortcut anymore.
> 
> right ... couldn't find a way to restore the shortcut, other than ...
> rollback :(, and apply a different UI clarification fix, would look like
> the attached, how would u see that?

What about the attached, instead?

-- 
Enrico
>From bb1d89aafaf9c8aefdafeac3f638f2e9097cfaea Mon Sep 17 00:00:00 2001
From: Enrico Forestieri 
Date: Wed, 7 Dec 2016 00:46:00 +0100
Subject: [PATCH 1/2] Revert "Converters Prefs UI layout clarification."

This reverts commit f0f555b5be8cf5eefcb716a53a5632c7c608b216.
---
 src/frontends/qt4/ui/PrefConvertersUi.ui | 28 +++-
 1 file changed, 23 insertions(+), 5 deletions(-)

diff --git a/src/frontends/qt4/ui/PrefConvertersUi.ui 
b/src/frontends/qt4/ui/PrefConvertersUi.ui
index f9c02a8..7e4a1b3 100644
--- a/src/frontends/qt4/ui/PrefConvertersUi.ui
+++ b/src/frontends/qt4/ui/PrefConvertersUi.ui
@@ -22,7 +22,7 @@

 
  
-  Converter Definitions
+  
  
  
   
@@ -31,7 +31,7 @@
   
6
   
-  
+  

 
  
@@ -43,7 +43,7 @@
 

   
-  
+  

 
  0
@@ -99,7 +99,7 @@
 

   
-  
+  

 
  0
@@ -173,7 +173,7 @@
 

   
-  
+  

 
  0
@@ -225,6 +225,24 @@
 

   
+  
+   
+
+ 
+  1
+  5
+  0
+  0
+ 
+
+
+ Converter Definitions
+
+
+ convertersLW
+
+   
+  
  
 

-- 
2.8.3

>From 8e080433031e34f7341b81c37846a1930f692961 Mon Sep 17 00:00:00 2001
From: Enrico Forestieri 
Date: Wed, 7 Dec 2016 01:07:46 +0100
Subject: [PATCH 2/2] Real Converters Prefs UI clarification

---
 src/frontends/qt4/ui/PrefConvertersUi.ui | 54 ++--
 1 file changed, 51 insertions(+), 3 deletions(-)

diff --git a/src/frontends/qt4/ui/PrefConvertersUi.ui 
b/src/frontends/qt4/ui/PrefConvertersUi.ui
index 7e4a1b3..6c0490e 100644
--- a/src/frontends/qt4/ui/PrefConvertersUi.ui
+++ b/src/frontends/qt4/ui/PrefConvertersUi.ui
@@ -21,6 +21,9 @@


 
+ 
+  QGroupBox{border:1px solid 
gray;border-radius:5px;margin-top:0.5ex;}
+ 
  
   
  
@@ -226,7 +229,7 @@

   
   
-   
+   
 
  
   1
@@ -235,6 +238,9 @@
   0
  
 
+
+ font-weight: bold;
+
 
  Converter Definitions
 
@@ -248,8 +254,11 @@


 
+ 
+  QGroupBox{border:1px solid 
gray;border-radius:5px;margin-top:0.5ex;}
+ 
  
-  Converter File Cache
+  
  
  
   
@@ -259,6 +268,24 @@
6
   
   
+   
+
+ 
+  1
+  5
+  0
+  0
+ 
+
+
+ font-weight: bold;
+
+
+ Converter File Cache
+
+   
+  
+  

 
  0
@@ -306,8 +333,11 @@


 
+ 
+  QGroupBox{border:1px solid 
gray;border-radius:5px;margin-top:0.5ex;}
+ 
  
-  Security
+  
  
  
   
@@ -317,6 +347,24 @@
6
   
   
+   
+
+ 
+  1
+  5
+  0
+  0
+ 
+
+
+ font-weight: bold;
+
+
+ Security
+
+   
+  
+  

 
  0
-- 
2.8.3



compilation error with current master

2016-12-06 Thread Uwe Stöhr

With today's master I get this compilation error:

Encoding.cpp
D:\LyXGit\Master\src\Encoding.cpp(267): error C3861: 'back_inserter': 
identifier not found [D:\LyXGit\Master\compile-2015\src\LyX.vcxproj]


regards Uwe


Re: LyX 2.2 slowness

2016-12-06 Thread Scott Kostyshak
On Tue, Dec 06, 2016 at 11:12:56PM +0100, Tommaso Cucinotta wrote:
> Hi there,
> 
> I just used LyX 2.2 (from Ubuntu) today to take some notes, and noticed also
> this terrible slowness on a very small document, without any pane open, just
> showing up while typing up to a ~3-4 lines paragraph without breaks, with the
> slowness also just for moving cursor, to the point that I had to point and
> click, in order to be faster than the usual Ctrl+.

I haven't seen this, and I use LyX 2.2 on Ubuntu daily. Which Qt version
are you using? The only thing I've noticed regarding slowness is that
starting up LyX with Qt 4 is snappier than with Qt 5.

> I'll try to profile later, unless others made progress on this already.

This would be good I think. Also, are you able to reproduce the slowness
with e.g. LyX 2.1 compiled with the same version of Qt? If not, then
maybe a git bisect would be worth it.

Scott


signature.asc
Description: PGP signature


Re: #10481: Hardening LyX against potential misuse

2016-12-06 Thread Tommaso Cucinotta

On 06/12/2016 22:57, Tommaso Cucinotta wrote:

right ... couldn't find a way to restore the shortcut, other than ...
rollback :(, and apply a different UI clarification fix, would look like
the attached, how would u see that?


as we're at it, there was a clash in shortcuts for the new two security 
checkboxes, could be removed by this

diff --git a/src/frontends/qt4/ui/PrefConvertersUi.ui 
b/src/frontends/qt4/ui/PrefConvertersUi.ui
index 87abef57..efd23abd 100644
--- a/src/frontends/qt4/ui/PrefConvertersUi.ui
+++ b/src/frontends/qt4/ui/PrefConvertersUi.ui
@@ -327,7 +327,7 @@
 
  
   
-   Forbid use of needauth converters
+   Forbid use of needauth converters
   
   
When enabled, use of converters with the 'needauth' option is 
forbidden.
@@ -337,7 +337,7 @@
 
  
   
-   Use needauth option
+   Use needauth option
   
   
When enabled, ask user before launching any external converter 
with the 'needauth' option.

objections?

Thanks,

T.


Re: LyX 2.2 slowness

2016-12-06 Thread Tommaso Cucinotta

Hi there,

I just used LyX 2.2 (from Ubuntu) today to take some notes, and noticed also
this terrible slowness on a very small document, without any pane open, just
showing up while typing up to a ~3-4 lines paragraph without breaks, with the
slowness also just for moving cursor, to the point that I had to point and
click, in order to be faster than the usual Ctrl+.

I'll try to profile later, unless others made progress on this already.

Thanks,

T.

On 29/08/2016 12:07, Jean-Marc Lasgouttes wrote:

Le 29/08/2016 à 12:04, racoon a écrit :

LyX 2.2 is very slow compared to LyX 2.1.4 (on Windows). (I have only a
meager dual core processor though.)

For example, if I open a long document like the Users Guide and make a
text selection bigger or smaller 2.2 stutters a lot (up to not reacting)
while 2.1.4 works fine. I am not sure this is just the CPU load because
there is "only" a 10 percent difference (50 vs. 40 %).


What Qt version is in use? I guess it is Qt5.x.

Is it only when the document is long?

Do you have any way to run a profiler?

JMarc






Re: #10481: Hardening LyX against potential misuse

2016-12-06 Thread Tommaso Cucinotta

On 06/12/2016 20:44, Enrico Forestieri wrote:

From 8f157f2d3beb48ae87f9dcd07d59ee062a7a7da0 Mon Sep 17 00:00:00 2001
From: Tommaso Cucinotta 
Date: Mon, 28 Nov 2016 00:31:46 +0100
Subject: [PATCH] Converters Prefs UI layout clarification.

[...]

-
- Converter Definitions
-
-
- convertersLW
-


Please, note that you removed this "buddy", so that the Converters
Definitions section is not accessible by shortcut anymore.


right ... couldn't find a way to restore the shortcut, other than ...
rollback :(, and apply a different UI clarification fix, would look like
the attached, how would u see that?

Thanks,

T.
>From 0fbddf986305cd8a8c6e056bc4ebef024cc83aa8 Mon Sep 17 00:00:00 2001
From: Tommaso Cucinotta 
Date: Tue, 6 Dec 2016 22:50:45 +0100
Subject: [PATCH 1/2] Revert "Converters Prefs UI layout clarification."

This reverts commit f0f555b5be8cf5eefcb716a53a5632c7c608b216.
---
 src/frontends/qt4/ui/PrefConvertersUi.ui | 28 +++-
 1 file changed, 23 insertions(+), 5 deletions(-)

diff --git a/src/frontends/qt4/ui/PrefConvertersUi.ui b/src/frontends/qt4/ui/PrefConvertersUi.ui
index f9c02a86..7e4a1b32 100644
--- a/src/frontends/qt4/ui/PrefConvertersUi.ui
+++ b/src/frontends/qt4/ui/PrefConvertersUi.ui
@@ -22,7 +22,7 @@

 
  
-  Converter Definitions
+  
  
  
   
@@ -31,7 +31,7 @@
   
6
   
-  
+  

 
  
@@ -43,7 +43,7 @@
 

   
-  
+  

 
  0
@@ -99,7 +99,7 @@
 

   
-  
+  

 
  0
@@ -173,7 +173,7 @@
 

   
-  
+  

 
  0
@@ -225,6 +225,24 @@
 

   
+  
+   
+
+ 
+  1
+  5
+  0
+  0
+ 
+
+
+ Converter Definitions
+
+
+ convertersLW
+
+   
+  
  
 

-- 
2.9.3

>From 5685d8357864658aeae5163ab9e827bc10c81b79 Mon Sep 17 00:00:00 2001
From: Tommaso Cucinotta 
Date: Tue, 6 Dec 2016 22:54:21 +0100
Subject: [PATCH 2/2] Real Converters Prefs UI clarification.

---
 src/frontends/qt4/ui/PrefConvertersUi.ui | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/frontends/qt4/ui/PrefConvertersUi.ui b/src/frontends/qt4/ui/PrefConvertersUi.ui
index 7e4a1b32..87abef57 100644
--- a/src/frontends/qt4/ui/PrefConvertersUi.ui
+++ b/src/frontends/qt4/ui/PrefConvertersUi.ui
@@ -22,7 +22,7 @@

 
  
-  
+  Edit converters
  
  
   
-- 
2.9.3



Re: LyX and (ancient) Hebrew

2016-12-06 Thread Scott Kostyshak
On Sun, Dec 04, 2016 at 10:04:10PM +0200, Guy Rutenberg wrote:

> XeTeX is by far the best option today to typeset Hebrew and LyX should
> default to it. Culmus-latex and ivritex (the old ways to get Hebrew
> working) are no longer actively maintained as they are inferior in almost
> any sense.
> 
> A while a go I wrote a simple tutorial to get an Hebrew document working
> using LyX and XeTeX.
> 
> https://www.guyrutenberg.com/2015/03/21/creating-a-hebrew-document-in-lyx-2-1-with-xetex/

Thanks for this comment, Guy.

Scott


signature.asc
Description: PGP signature


Re: Patch to make it possible to open empty files

2016-12-06 Thread Jan Niklas Hasse
On Mon, 28 Nov 2016, at 20:54, Richard Heck wrote:
> On 11/28/2016 07:12 AM, Jan Niklas Hasse wrote:
> > Hi!
> >
> > I've created a patch for ticket #9198 which makes it possible to open empty 
> > (0 bytes) files:
> >
> > http://www.lyx.org/trac/attachment/ticket/9198/0001-Create-a-new-buffer-when-opening-an-empty-.lyx-file.patch
> >
> > Can someone review it? Thanks in advance :)
> 
> At the bug
> 
> Richard

Hi,

I've updated the bug, please have a look :)

Jan


Re: #10481: Hardening LyX against potential misuse

2016-12-06 Thread Enrico Forestieri
On Mon, Nov 28, 2016 at 12:42:31AM +0100, Tommaso Cucinotta wrote:

> From 8f157f2d3beb48ae87f9dcd07d59ee062a7a7da0 Mon Sep 17 00:00:00 2001
> From: Tommaso Cucinotta 
> Date: Mon, 28 Nov 2016 00:31:46 +0100
> Subject: [PATCH] Converters Prefs UI layout clarification.
[...]
> -
> - Converter Definitions
> -
> -
> - convertersLW
> -

Please, note that you removed this "buddy", so that the Converters
Definitions section is not accessible by shortcut anymore.

-- 
Enrico


Re: #10481: Hardening LyX against potential misuse

2016-12-06 Thread Scott Kostyshak
On Tue, Dec 06, 2016 at 06:10:52PM +0100, Enrico Forestieri wrote:
> On Tue, Dec 06, 2016 at 05:37:40PM +0100, Tommaso Cucinotta wrote:
> > 
> > Creating a separate prefs tab might be meaningful if we had more security
> > settings not related exclusively to converters, but keeping things
> > together within a single converters pane has the advantage of linking
> > clearly the security checkboxes tooltips to the 'needauth' options that
> > can be set within each converter's individual settings mask. So I'd be in
> > favor of leaving all into a single converters prefs pane as it is now.
> 
> I concur with you. This preference has been like that since version 1.5
> and nobody complained that it is confusing (apart from its quirks, which
> are unrelated to this issue). Until this recent addition, at least.

True, I don't remember any complaints either. We should always look for
opportunities to improve clarity though.

I think the idea bout a thicker border is good. Perhaps we could also
have a label just stating "global options".

Scott


signature.asc
Description: PGP signature


Re: [patch] remove unsupported encodings

2016-12-06 Thread Jürgen Spitzmüller
Am Mittwoch, den 30.11.2016, 12:28 + schrieb Guenter Milde:
> File format change?

definitely.

> IMV, this cannot be improved with a file format change, hence we
> don't
> need one.

Well, you need at least to replace the removed encodings with something
sensible on conversion. Without a file format change, you'll get a
parsing error.

Jürgen

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


Re: #10481: Hardening LyX against potential misuse

2016-12-06 Thread Enrico Forestieri
On Tue, Dec 06, 2016 at 05:37:40PM +0100, Tommaso Cucinotta wrote:
> 
> Creating a separate prefs tab might be meaningful if we had more security
> settings not related exclusively to converters, but keeping things
> together within a single converters pane has the advantage of linking
> clearly the security checkboxes tooltips to the 'needauth' options that
> can be set within each converter's individual settings mask. So I'd be in
> favor of leaving all into a single converters prefs pane as it is now.

I concur with you. This preference has been like that since version 1.5
and nobody complained that it is confusing (apart from its quirks, which
are unrelated to this issue). Until this recent addition, at least.

-- 
Enrico


Re: #10481: Hardening LyX against potential misuse

2016-12-06 Thread Tommaso Cucinotta

On 05/12/2016 23:44, Scott Kostyshak wrote:

With the "Converter Definitions" label now at the same highlight/logical level
as "Converter File Cache" and "Security" ones, I think there is no more the
confusionabout which options in the dialog are specific to a single converter.


I still think it is confusing. What do you think about Guillaume's idea
of placing the global options above the converter definitions?


I tried that as well first, but then realized that the actual problem was the
"Converter Definitions" text showing up as a QLabel within the content of the
converters definitions section; "promoting" it to becoming the title of the
section fixed the issue, because now with my style the "Converters Definition"
shows up left-aligned, boldface and unindented, identically to "Converter File
Cache"and "Security",and in Enrico's Qt style, those 3 show up as framing the
corresponding sections. The contents of said 3 sections show up as indented
in my style, and inside the corresponding frames in Enrico's, so it seems quite
clear that the cache and security settings won't refer to the selected converter
inside the first section.

That said, I don't have objections to reordering these 3 sections.

Creating a separate prefs tab might be meaningful if we had more security 
settings
not related exclusively to converters, but keeping things together within a 
single
converters pane has the advantage of linking clearly the security checkboxes 
tooltips
to the 'needauth' options that can be set within each converter's individual 
settings
mask. So I'd be in favor of leaving all into a single converters prefs pane as 
it is
now.

Thanks,

T.



Re: [PATCHES] is there a reason why I should not do that?

2016-12-06 Thread Richard Heck
On 12/05/2016 11:46 AM, Jean-Marc Lasgouttes wrote:
> Dear all,
>
> The following pair of patches get rid of the setPosCache and
> setDimCache methods that have been added over the years all over the
> inset and mathed code. The idea is that these code are not needed,
> since the only callers of draw and metrics are either
> * the drawing/metrics code in MathRow (for math)
> TextMetrics/RowPainter (for text)
> * the metrics/draw methods of child classes of given inset.
>
> The idea is that the cache should be set by the real caller of these
> methods, which is already done in today's code.
>
> Is there something I am missing, or should I just push the code to
> master and fix the fallout (which should be small at worst, IIUC what
> is going on)?

Go for it.

Richard



Re: #10481: Hardening LyX against potential misuse

2016-12-06 Thread Jean-Marc Lasgouttes

Le 06/12/2016 à 14:16, Enrico Forestieri a écrit :

I still think it is confusing. What do you think about Guillaume's idea
of placing the global options above the converter definitions?


Note that the appearance also depends on the used Qt style. In the attached
you can see that a frame is drawn around the options, clearly separating
them. I don't think placing the global options above makes it any clearer.
Rather I think it would be more confusing.
Maybe a border frame can be placed around the options whatever the used
Qt style?


I would propose to add a new "General" pane that contains these options.

JMarc



Re: #10481: Hardening LyX against potential misuse

2016-12-06 Thread Enrico Forestieri
On Mon, Dec 05, 2016 at 05:44:46PM -0500, Scott Kostyshak wrote:

> On Mon, Dec 05, 2016 at 08:53:58AM +0100, Tommaso Cucinotta wrote:
> 
> > With the "Converter Definitions" label now at the same highlight/logical 
> > level
> > as "Converter File Cache" and "Security" ones, I think there is no more the
> > confusionabout which options in the dialog are specific to a single 
> > converter.
> 
> I still think it is confusing. What do you think about Guillaume's idea
> of placing the global options above the converter definitions?

Note that the appearance also depends on the used Qt style. In the attached
you can see that a frame is drawn around the options, clearly separating
them. I don't think placing the global options above makes it any clearer.
Rather I think it would be more confusing.
Maybe a border frame can be placed around the options whatever the used
Qt style?

-- 
Enrico