Re: workaround to 'git reset --hard' not working because of .gitattributes

2016-06-25 Thread Richard Heck

On 06/25/2016 08:21 PM, Scott Kostyshak wrote:

Just in case anyone else has this issue:

I keep having the following situation come up:

$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
   (use "git add ..." to update what will be committed)
   (use "git checkout -- ..." to discard changes in working directory)

 modified:   3rdparty/hunspell/1.3.3/src/hunspell/hunspell.dsp
 modified:   
development/Win32/packaging/installer/information/WinLangCode.htm
 modified:   development/Win32/vld/src/crtmfcpatch.h
 modified:   development/Win32/vld/src/resource.h
 modified:   development/Win32/vld/src/vld.h

no changes added to commit (use "git add" and/or "git commit -a")
$

I think this is due to the recent fixes in .gitattributes. In any case,
git reset --hard does not fix anything. But the following does work for
me:

git rm .gitattributes
git add -A
git reset --hard


Thanks, Scott. I've also seen this problem though, oddly, only in some 
copies of the repo I have checked out. Playing with core.autocrlf does 
not seem to have helped, either.


Richard



Re: Annoying terminal messages: QXcbClipboard: SelectionRequest too old

2016-06-25 Thread Scott Kostyshak
On Sat, Jun 25, 2016 at 10:05:47AM +0200, Jürgen Spitzmüller wrote:
> Am Donnerstag, den 23.06.2016, 21:43 -0400 schrieb Scott Kostyshak:
> > Jürgen, any idea?
> 
> No.

OK I found a simple way to reproduce:

1. Open gedit (I don't think the application matters, I also tested with
gnome-terminal) on the left side of the screen.
2. Open LyX on the right-side of the screen.
3. Select something in LyX.
4. Do a middle-click on the gedit window.

The message is shown in the terminal three times and nothing is actually
pasted into the gedit window.

Important: I cannot reproduce if between 3 and 4 I first do a left-click
on the gedit window.

When I try to middle-click from other applications, I do not see this
behavior: a middle-click pastes correctly regardless of whether the
target window has the focus.

Can anyone else reproduce?

Scott


signature.asc
Description: PGP signature


workaround to 'git reset --hard' not working because of .gitattributes

2016-06-25 Thread Scott Kostyshak
Just in case anyone else has this issue:

I keep having the following situation come up:

$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
  (use "git add ..." to update what will be committed)
  (use "git checkout -- ..." to discard changes in working directory)

modified:   3rdparty/hunspell/1.3.3/src/hunspell/hunspell.dsp
modified:   
development/Win32/packaging/installer/information/WinLangCode.htm
modified:   development/Win32/vld/src/crtmfcpatch.h
modified:   development/Win32/vld/src/resource.h
modified:   development/Win32/vld/src/vld.h

no changes added to commit (use "git add" and/or "git commit -a")
$

I think this is due to the recent fixes in .gitattributes. In any case,
git reset --hard does not fix anything. But the following does work for
me:

git rm .gitattributes
git add -A
git reset --hard

source:
http://stackoverflow.com/questions/11383094/unstaged-changes-left-after-git-reset-hard

Scott


signature.asc
Description: PGP signature


Re: [LyX/master] * Math.lyx : One more take on maxima output.

2016-06-25 Thread Scott Kostyshak
On Sat, Jun 25, 2016 at 08:41:43PM +0200, Kornel Benko wrote:
> Am Samstag, 25. Juni 2016 um 20:25:47, schrieb Pavel Sanda 
> > commit 4c361a7bdfe69fbc41da53ebbd5f34a4e1ea3e1f
> > Author: Pavel Sanda 
> > Date:   Sat Jun 25 11:23:05 2016 -0700
> > 
> > * Math.lyx : One more take on maxima output.
> > 
> > https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg195130.html
> > 
> > Reported the \it behaviour to maxima bugzilla.
> > https://sourceforge.net/p/maxima/bugs/3181/
> > If they don't fix it we might want to kill this line altogether.
> 
> Or we could use/write a wrapper for maxima and correct the output.
> 
>   Kornel

Good idea. Enrico proposed a patch that corrects the output. I tested
and it works well.

There is already a response to Pavel's bug report and it seems they
would like to remove the formatting so that's good.

Scott



signature.asc
Description: PGP signature


Re: [LyX/master] Change \it to \mathit in Math.lyx

2016-06-25 Thread Scott Kostyshak
On Sat, Jun 25, 2016 at 10:54:10PM +0200, Enrico Forestieri wrote:
> On Sat, Jun 25, 2016 at 02:19:36PM -0400, Scott Kostyshak wrote:
> 
> > On Sat, Jun 25, 2016 at 12:38:14PM +0200, Enrico Forestieri wrote:
> > > On Sat, Jun 25, 2016 at 10:23:57AM +0200, Scott Kostyshak wrote:
> > > 
> > > > commit 3f9335548872c028fcc6eea9997040c500683b19
> > > > Author: Scott Kostyshak 
> > > > Date:   Sat Jun 25 03:26:16 2016 -0400
> > > > 
> > > > Change \it to \mathit in Math.lyx
> > > > 
> > > > On TeX Live 2016, Math.lyx gives an error when compiling with
> > > > pdflatex. On TeX Live 2015, Math.lyx compiles but the log gives the
> > > > following warning:
> > > > 
> > > >   Usage of deprecated font command `\it'!
> > > 
> > > Note that this is the output produced by maxima, which does use \it
> > > instead of \mathit. Moreover, the formula is wrong as log(-1) should
> > > really be log(4).
> > 
> > Ah good to know. Do you think I should contact the maxima developers to
> > make sure they are aware of the deprectation?
> 
> Pavel did that already, apparently.
> 
> > In the meantime, is the only thing we can do from a LyX perspective to
> > document this issue in the CAS section?
> 
> Please, try the attached patch, instead.

Tested and works well. I think you should commit (and add as a comment
the link to the bug report that Pavel filed:
https://sourceforge.net/p/maxima/bugs/3181/).

Thanks,

Scott

> 
> -- 
> Enrico

> diff --git a/src/mathed/MathExtern.cpp b/src/mathed/MathExtern.cpp
> index f3df8c8..b3443fa 100644
> --- a/src/mathed/MathExtern.cpp
> +++ b/src/mathed/MathExtern.cpp
> @@ -1106,7 +1106,7 @@ namespace {
>   if (tmp.size() < 2)
>   return MathData();
>  
> - out = subst(tmp[1], "\\>", string());
> + out = subst(subst(tmp[1], "\\>", string()), "{\\it ", 
> "\\mathit{");
>   lyxerr << "output: '" << out << "'" << endl;
>  
>   // Ugly code that tries to make the result prettier



signature.asc
Description: PGP signature


Re: Remove \it from math completion?

2016-06-25 Thread Scott Kostyshak
On Sat, Jun 25, 2016 at 09:44:35PM +0100, Guillaume Munch wrote:
> Le 25/06/2016 21:37, Scott Kostyshak a écrit :
> > > 
> > > I think the patch below is what you mean.
> > 
> > Ah thanks that is much better. Now I understand. Please commit your
> > version.
> 
> Please commit my diff with your commit log :)

Done at 3cecd4d. Thanks.
> 
> > 
> > Do you know (I don't want you to spend time to find out) where we would
> > remove \it so that LyX does not render it and \it is treated just like
> > math ert? I do not think we should do this, but I was curious where this
> > happens in LyX's code and could not figure it out.
> 
> See src/mathed/MathFactory.cpp, line 452.

Ah I was not paying as much attention to the 'oldfont' tag as I should
have. 

> Consequently, removing these five lines from lib/symbols is enough to
> get rid of InsetMathFontOld as you describe.

Yes looks good.

Scott


signature.asc
Description: PGP signature


Re: Combo Box for Custom Insets

2016-06-25 Thread Liviu Andronic
On Sat, Jun 25, 2016 at 11:41 PM, Richard Heck  wrote:
> On 06/25/2016 04:55 PM, Jean-Marc Lasgouttes wrote:
>> Le 25/06/2016 22:37, Guillaume Munch a écrit :
>>> Le 25/06/2016 19:15, Richard Heck a écrit :

 For now, the branch is here:
 http://git.lyx.org/?p=developers/rgheck/lyx.git;a=shortlog;h=refs/heads/features/CustomInsets



>>>
>>> If you are satisfied with it then you could commit it, I think.
>>> What is your plan?
>>
>> Another possibility would be that the Insets toolbar tag inserts a
>> series of icons. One would just have to provide the relevant icons.
>> This is a better UI that a Combox IMO. The difficulty here is not the
>> code, but providing correct icons.
>

> But then it doesn't work with non-LyX-provided insets, i.e., ones you
> make yourself. If you had a lot of such insets, this would get very
> messy, too.
>

I would agree. Also, icons would work when having only a limited
number of custom insets available --- but if using various modules the
list becomes as populated as the Styles, then icons might ultimately
prove more cumbersome. As for the availability of icons, if no icon is
present (i.e. homebrewed module) then presumably the text will be used
alternatively, and currently some custom insets have very verbose
names so screen real estate will be an issue.

Personally I like the idea of making custom insets be UI-wise as
similarly as possible to the Style combobox, since the two perform
conceptually similar functions (at least from the perspective of the
end user).

Liviu


> I'd be happy if it were done as an icon-based menu. As I've said, I just
> don't know how to do that.
>
> Richard
>


Re: Combo Box for Custom Insets

2016-06-25 Thread Liviu Andronic
On Sat, Jun 25, 2016 at 7:30 PM, Pavel Sanda  wrote:
> Liviu Andronic wrote:
>> The next patch would create the file src/frontends/qt4/InsetCombo.cpp,
>> which already exists! Assume -R? [n]
>> Apply anyway? [n]
>
> Delete new files (InsetCombo*). P

That was it, thanks.

Liviu


Re: new LyX 2.2.0 installer for Windows Vista is available

2016-06-25 Thread Richard Heck
On 06/25/2016 12:00 PM, Georg Baum wrote:
> Uwe Stöhr wrote:
>
>> Richard, could you please put it on ftp.lyx.org? Could you please also
>> write a news message that we now have a Vista installer but that this
>> installer should not be used for other Windows versions than Vista.
> This is not possible for legal reasons. Our own license forbids to 
> distribute binaries without corresponding source code. This includes the 
> build scripts (see https://www.lyx.org/License):
>
> "The source code for a work means the preferred form of the work for making 
> modifications to it. For an executable work, complete source code means all 
> the source code for all modules it contains, plus any associated interface 
> definition files, plus the scripts used to control compilation and 
> installation of the executable."
>
> I am preaching since years that every binary we distribute must be built in 
> a reproducible way from identifiable, publicy available sources (including 
> the build scripts).
>
> Currently only our own OS X build and the linux builds offered by Livio and 
> linux distributors are 100% reproducible. The windows installer is not, the 
> build instructions are incomplete and partially wrong, and a binary 
> dependency package is needed which contains unneeded stuff such as old MSVC 
> dlls. How this binary dependency package was produced is unknown and not 
> reproducible.
>
> Adding two binaries from a different source to the installer makes it even 
> more unreproducible. We need to go into the other direction. That is also 
> the reason why I spend lots of time for helping others with MSVC and cmake, 
> although I have zero benefit from it personally.

I'll ask again: What is the status of the mingw build? Last I heard, it
built our executables fine and the only issue was with building the
installer.

Richard



Re: Combo Box for Custom Insets

2016-06-25 Thread Richard Heck
On 06/25/2016 04:55 PM, Jean-Marc Lasgouttes wrote:
> Le 25/06/2016 22:37, Guillaume Munch a écrit :
>> Le 25/06/2016 19:15, Richard Heck a écrit :
>>>
>>> For now, the branch is here:
>>> http://git.lyx.org/?p=developers/rgheck/lyx.git;a=shortlog;h=refs/heads/features/CustomInsets
>>>
>>>
>>>
>>
>> If you are satisfied with it then you could commit it, I think.
>> What is your plan?
>
> Another possibility would be that the Insets toolbar tag inserts a
> series of icons. One would just have to provide the relevant icons.
> This is a better UI that a Combox IMO. The difficulty here is not the
> code, but providing correct icons.

But then it doesn't work with non-LyX-provided insets, i.e., ones you
make yourself. If you had a lot of such insets, this would get very
messy, too.

I'd be happy if it were done as an icon-based menu. As I've said, I just
don't know how to do that.

Richard



Re: using directives in headers

2016-06-25 Thread Richard Heck
On 06/25/2016 03:56 PM, Georg Baum wrote:
> I recently stumbled upon
>
> using std::shared_ptr;
>
> or
>
> lyx::support::FileName;
>
> in header files (e.g. TocBackend.h). The shared_ptr was introduced as part 
> of the lyx::shared_ptr removal (which did either point to boost or std), but 
> there are other hits as well. While I understand that in this particular 
> case the "using" statement avoided other changes in the headers, I consider 
> it dangerous to have "using" statements in header files in general:
>
> using foo::bar
>
> effectively forbids to use the name 'bar' in any other namespace in the 
> whole program, since simply adding or removing an #include of the 
> corresponding header subtly changes the name lookup. Therefore I'd like to 
> remove these using statements. OK?

+1

rh



Re: [LyX/master] Style.

2016-06-25 Thread Richard Heck
On 06/25/2016 02:24 PM, Scott Kostyshak wrote:
> On Sat, Jun 25, 2016 at 07:19:15PM +0100, José Abílio Matos wrote:
>> On Friday, June 24, 2016 10:02:30 PM WEST Richard Heck wrote:
>>> commit 92fae708aebf8d2f3bc393b29c54a4cebeafe730
>>> Author: Richard Heck 
>>> Date:   Fri Jun 24 15:03:59 2016 -0400
>>>
>>> Style.
>>> ---
>>>  lib/lyx2lyx/LyX.py |2 +-
>>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/lib/lyx2lyx/LyX.py b/lib/lyx2lyx/LyX.py
>>> index bea3d67..f1fcf2e 100644
>>> --- a/lib/lyx2lyx/LyX.py
>>> +++ b/lib/lyx2lyx/LyX.py
>>> @@ -317,7 +317,7 @@ class LyX_base:
>>>  line = trim_eol_binary(line)
>>>  decoded = line.decode('latin1')
>>>  if check_token(decoded, '\\begin_preamble'):
>>> -while 1:
>>> +while True:
>>>  line = self.input.readline()
>>>  if not line:
>>>  # eof found before end of header
>> This was a left-over from python 2.2 support. :-)
>>
>> Thank you for catching that.
> git grep 'while 1' catches more if anyone is interested.

Changed 'em.

Richard



Re: Combo Box for Custom Insets

2016-06-25 Thread Jean-Marc Lasgouttes

Le 25/06/2016 22:37, Guillaume Munch a écrit :

Le 25/06/2016 19:15, Richard Heck a écrit :


For now, the branch is here:
http://git.lyx.org/?p=developers/rgheck/lyx.git;a=shortlog;h=refs/heads/features/CustomInsets




If you are satisfied with it then you could commit it, I think.
What is your plan?


Another possibility would be that the Insets toolbar tag inserts a 
series of icons. One would just have to provide the relevant icons. This 
is a better UI that a Combox IMO. The difficulty here is not the code, 
but providing correct icons.


JMarc



Re: [LyX/master] Change \it to \mathit in Math.lyx

2016-06-25 Thread Enrico Forestieri
On Sat, Jun 25, 2016 at 02:19:36PM -0400, Scott Kostyshak wrote:

> On Sat, Jun 25, 2016 at 12:38:14PM +0200, Enrico Forestieri wrote:
> > On Sat, Jun 25, 2016 at 10:23:57AM +0200, Scott Kostyshak wrote:
> > 
> > > commit 3f9335548872c028fcc6eea9997040c500683b19
> > > Author: Scott Kostyshak 
> > > Date:   Sat Jun 25 03:26:16 2016 -0400
> > > 
> > > Change \it to \mathit in Math.lyx
> > > 
> > > On TeX Live 2016, Math.lyx gives an error when compiling with
> > > pdflatex. On TeX Live 2015, Math.lyx compiles but the log gives the
> > > following warning:
> > > 
> > >   Usage of deprecated font command `\it'!
> > 
> > Note that this is the output produced by maxima, which does use \it
> > instead of \mathit. Moreover, the formula is wrong as log(-1) should
> > really be log(4).
> 
> Ah good to know. Do you think I should contact the maxima developers to
> make sure they are aware of the deprectation?

Pavel did that already, apparently.

> In the meantime, is the only thing we can do from a LyX perspective to
> document this issue in the CAS section?

Please, try the attached patch, instead.

-- 
Enrico
diff --git a/src/mathed/MathExtern.cpp b/src/mathed/MathExtern.cpp
index f3df8c8..b3443fa 100644
--- a/src/mathed/MathExtern.cpp
+++ b/src/mathed/MathExtern.cpp
@@ -1106,7 +1106,7 @@ namespace {
if (tmp.size() < 2)
return MathData();
 
-   out = subst(tmp[1], "\\>", string());
+   out = subst(subst(tmp[1], "\\>", string()), "{\\it ", 
"\\mathit{");
lyxerr << "output: '" << out << "'" << endl;
 
// Ugly code that tries to make the result prettier


Re: Remove \it from math completion?

2016-06-25 Thread Guillaume Munch

Le 25/06/2016 21:37, Scott Kostyshak a écrit :


I think the patch below is what you mean.


Ah thanks that is much better. Now I understand. Please commit your
version.


Please commit my diff with your commit log :)



Do you know (I don't want you to spend time to find out) where we would
remove \it so that LyX does not render it and \it is treated just like
math ert? I do not think we should do this, but I was curious where this
happens in LyX's code and could not figure it out.


See src/mathed/MathFactory.cpp, line 452.

Consequently, removing these five lines from lib/symbols is enough to
get rid of InsetMathFontOld as you describe.


Guillaume



Re: Remove \it from math completion?

2016-06-25 Thread Scott Kostyshak
On Sat, Jun 25, 2016 at 08:42:01PM +0100, Guillaume Munch wrote:
> Le 25/06/2016 20:03, Scott Kostyshak a écrit :
> > Attached is a patch that removes \it from math completion, since \it has
> > been deprecated for a while, only giving a warning in TL 2015, but an
> > error in 2016.
> > 
> > I think the patch is consistent with 24d0 in the concept of removing
> > math completion but if the user insists on using it, LyX still displays
> > it with built-in support.
> > 
> > I don't think this will have much impact since \it is so short that I
> > doubt anyone uses completion to access it, but perhaps it is better than
> > nothing.
> > 
> 
> Agreed.
> 
> I think the patch below is what you mean.

Ah thanks that is much better. Now I understand. Please commit your
version.

Do you know (I don't want you to spend time to find out) where we would
remove \it so that LyX does not render it and \it is treated just like
math ert? I do not think we should do this, but I was curious where this
happens in LyX's code and could not figure it out.

Scott


> 

> diff --git a/lib/symbols b/lib/symbols
> index 279e64e..5e1e943 100644
> --- a/lib/symbols
> +++ b/lib/symbols
> @@ -133,11 +133,11 @@ cefontforcetext
>  cffontforcetext
>  
>  # old-style font commands
> -bfoldfont none
> -cal   oldfont none
> -itoldfont none
> -rmoldfont none
> -ttoldfont none
> +bfoldfont nonehiddensymbol
> +cal   oldfont nonehiddensymbol
> +itoldfont nonehiddensymbol
> +rmoldfont nonehiddensymbol
> +ttoldfont nonehiddensymbol
>  
>  # matrix environments
>  Bmatrix   matrix  none



signature.asc
Description: PGP signature


Re: Combo Box for Custom Insets

2016-06-25 Thread Guillaume Munch

Le 25/06/2016 19:15, Richard Heck a écrit :


For now, the branch is here:
http://git.lyx.org/?p=developers/rgheck/lyx.git;a=shortlog;h=refs/heads/features/CustomInsets



If you are satisfied with it then you could commit it, I think.
What is your plan?



Re: using directives in headers

2016-06-25 Thread Guillaume Munch

Le 25/06/2016 20:56, Georg Baum a écrit :

I recently stumbled upon

using std::shared_ptr;

or

lyx::support::FileName;

in header files (e.g. TocBackend.h). The shared_ptr was introduced as part
of the lyx::shared_ptr removal (which did either point to boost or std), but
there are other hits as well. While I understand that in this particular
case the "using" statement avoided other changes in the headers, I consider
it dangerous to have "using" statements in header files in general:

using foo::bar

effectively forbids to use the name 'bar' in any other namespace in the
whole program, since simply adding or removing an #include of the
corresponding header subtly changes the name lookup. Therefore I'd like to
remove these using statements. OK?



Agreed. While the only advices to avoid "using" in headers I could find
are about "using namespace", I do not see a reason either not to have as
a rule what you wrote.




using directives in headers

2016-06-25 Thread Georg Baum
I recently stumbled upon

using std::shared_ptr;

or

lyx::support::FileName;

in header files (e.g. TocBackend.h). The shared_ptr was introduced as part 
of the lyx::shared_ptr removal (which did either point to boost or std), but 
there are other hits as well. While I understand that in this particular 
case the "using" statement avoided other changes in the headers, I consider 
it dangerous to have "using" statements in header files in general:

using foo::bar

effectively forbids to use the name 'bar' in any other namespace in the 
whole program, since simply adding or removing an #include of the 
corresponding header subtly changes the name lookup. Therefore I'd like to 
remove these using statements. OK?


Georgdiff --git a/src/CutAndPaste.h b/src/CutAndPaste.h
index c332e0b..c6646f3 100644
--- a/src/CutAndPaste.h
+++ b/src/CutAndPaste.h
@@ -22,7 +22,6 @@
 
 #include 
 
-using lyx::frontend::Clipboard;
 
 namespace lyx {
 
@@ -89,11 +88,11 @@ void pasteSelection(Cursor & cur, ErrorList &);
 /// Does handle undo. Does only work in text, not mathed.
 /// \p asParagraphs is only considered if plain text is pasted.
 bool pasteClipboardText(Cursor & cur, ErrorList & errorList, bool asParagraphs,
-	Clipboard::TextType preferedType = Clipboard::LyXOrPlainTextType);
+	frontend::Clipboard::TextType preferedType = frontend::Clipboard::LyXOrPlainTextType);
 /// Replace the current selection with the clipboard contents as graphic.
 /// Does handle undo. Does only work in text, not mathed.
 void pasteClipboardGraphics(Cursor & cur, ErrorList & errorList,
-	Clipboard::GraphicsType preferedType = Clipboard::AnyGraphicsType);
+	frontend::Clipboard::GraphicsType preferedType = frontend::Clipboard::AnyGraphicsType);
 /// Replace the current selection with cut buffer \c sel_index
 /// Does handle undo. Does only work in text, not mathed.
 bool pasteFromStack(Cursor & cur, ErrorList & errorList, size_t sel_index);
diff --git a/src/Text3.cpp b/src/Text3.cpp
index 0467aa8..fea23b0 100644
--- a/src/Text3.cpp
+++ b/src/Text3.cpp
@@ -97,6 +97,7 @@ using cap::replaceSelection;
 using cap::grabAndEraseSelection;
 using cap::selClearOrDel;
 using cap::pasteSimpleText;
+using frontend::Clipboard;
 
 // globals...
 static Font freefont(ignore_font, ignore_language);
diff --git a/src/TocBackend.h b/src/TocBackend.h
index 336daf7..0671f04 100644
--- a/src/TocBackend.h
+++ b/src/TocBackend.h
@@ -26,8 +26,6 @@
 #include 
 
 
-using std::shared_ptr;
-
 namespace lyx {
 
 class Buffer;
@@ -125,7 +123,7 @@ private:
 class TocBuilder
 {
 public:
-	TocBuilder(shared_ptr const toc);
+	TocBuilder(std::shared_ptr const toc);
 	/// When entering a float
 	void pushItem(DocIterator const & dit, docstring const & s,
 	  bool output_active, bool is_captioned = false);
@@ -142,7 +140,7 @@ private:
 		bool is_captioned;
 	};
 	///
-	shared_ptr const toc_;
+	std::shared_ptr const toc_;
 	///
 	std::stack stack_;
 };
@@ -169,9 +167,9 @@ public:
 	///
 	TocList const & tocs() const { return tocs_; }
 	/// never null
-	shared_ptr toc(std::string const & type) const;
+	std::shared_ptr toc(std::string const & type) const;
 	/// never null
-	shared_ptr toc(std::string const & type);
+	std::shared_ptr toc(std::string const & type);
 	/// \return the current TocBuilder for the Toc of type \param type, or
 	/// creates one if it does not already exist.
 	TocBuilder & builder(std::string const & type);
diff --git a/src/frontends/Clipboard.h b/src/frontends/Clipboard.h
index faf4e0a..af617f5 100644
--- a/src/frontends/Clipboard.h
+++ b/src/frontends/Clipboard.h
@@ -18,8 +18,6 @@
 
 #include "support/strfwd.h"
 
-using lyx::support::FileName;
-
 namespace lyx {
 namespace frontend {
 
@@ -62,7 +60,7 @@ public:
 	/// Get the contents of the window system clipboard in any text format except LyxTextType.
 	virtual docstring const getAsText(TextType type) const = 0;
 	/// Get the contents of the window system clipboard as graphics file.
-	virtual FileName getAsGraphics(Cursor const & cur, GraphicsType type) const = 0;
+	virtual support::FileName getAsGraphics(Cursor const & cur, GraphicsType type) const = 0;
 
 	/**
 	 * Fill the system clipboard. The format of \p lyx is as written in
diff --git a/src/frontends/qt4/GuiClipboard.h b/src/frontends/qt4/GuiClipboard.h
index 9e9ae7b..4514eb2 100644
--- a/src/frontends/qt4/GuiClipboard.h
+++ b/src/frontends/qt4/GuiClipboard.h
@@ -68,7 +68,7 @@ public:
 	 */
 	//@{
 	std::string const getAsLyX() const;
-	FileName getAsGraphics(Cursor const & cur, GraphicsType type) const;
+	support::FileName getAsGraphics(Cursor const & cur, GraphicsType type) const;
 	docstring const getAsText(TextType type) const;
 	void put(std::string const & text) const;
 	void put(std::string const & lyx, docstring const & html, docstring const & text);
@@ -79,7 +79,7 @@ public:
 	bool empty() const;
 	//@}
 
-	FileName getPastedGraphicsFileName(Cursor const & cur,
+	support::FileName getPastedGraphicsFileName(Cursor const & cur,
 		Cli

Re: Remove \it from math completion?

2016-06-25 Thread Guillaume Munch

Le 25/06/2016 20:03, Scott Kostyshak a écrit :

Attached is a patch that removes \it from math completion, since \it has
been deprecated for a while, only giving a warning in TL 2015, but an
error in 2016.

I think the patch is consistent with 24d0 in the concept of removing
math completion but if the user insists on using it, LyX still displays
it with built-in support.

I don't think this will have much impact since \it is so short that I
doubt anyone uses completion to access it, but perhaps it is better than
nothing.



Agreed.

I think the patch below is what you mean.

diff --git a/lib/symbols b/lib/symbols
index 279e64e..5e1e943 100644
--- a/lib/symbols
+++ b/lib/symbols
@@ -133,11 +133,11 @@ cefontforcetext
 cffontforcetext
 
 # old-style font commands
-bfoldfont none
-cal   oldfont none
-itoldfont none
-rmoldfont none
-ttoldfont none
+bfoldfont nonehiddensymbol
+cal   oldfont nonehiddensymbol
+itoldfont nonehiddensymbol
+rmoldfont nonehiddensymbol
+ttoldfont nonehiddensymbol
 
 # matrix environments
 Bmatrix   matrix  none


Remove \it from math completion?

2016-06-25 Thread Scott Kostyshak
Attached is a patch that removes \it from math completion, since \it has
been deprecated for a while, only giving a warning in TL 2015, but an
error in 2016.

I think the patch is consistent with 24d0 in the concept of removing
math completion but if the user insists on using it, LyX still displays
it with built-in support.

I don't think this will have much impact since \it is so short that I
doubt anyone uses completion to access it, but perhaps it is better than
nothing.

Scott
From 4d7e5edf8753e237467bfdaac79cd3c376e7310f Mon Sep 17 00:00:00 2001
From: Scott Kostyshak 
Date: Sat, 25 Jun 2016 04:49:02 -0400
Subject: [PATCH] Remove \it from math completion

\it is deprecated and \mathit should be used instead. \it can lead
to a warning in TeX Live 2015 and an error in TeX Live 2016.

Note that with this commit only affects completion, so LyX still
supports displaying \it in math if the user enters it without
completion.

This is consistent with 24d0.
---
 src/mathed/InsetMathNest.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/mathed/InsetMathNest.cpp b/src/mathed/InsetMathNest.cpp
index d1c413b..843deb1 100644
--- a/src/mathed/InsetMathNest.cpp
+++ b/src/mathed/InsetMathNest.cpp
@@ -2216,7 +2216,9 @@ MathCompletionList::MathCompletionList(Cursor const & cur)
for (it2 = words.begin(); it2 != words.end(); ++it2) {
if (it2->second.inset != "macro" && !it2->second.hidden) {
// macros are already read from 
MacroTable::globalMacros()
-   globals.push_back('\\' + it2->first);
+   // \it is deprecated in math (should use \mathit)
+   if (it2->first != "it")
+   globals.push_back('\\' + it2->first);
//lyxerr << '\\' + it2->first << ' ';
}
}
-- 
2.7.4



signature.asc
Description: PGP signature


Re: [LyX/master] * Math.lyx : One more take on maxima output.

2016-06-25 Thread Scott Kostyshak
On Sat, Jun 25, 2016 at 08:25:47PM +0200, Pavel Sanda wrote:

> Reported the \it behaviour to maxima bugzilla.
> https://sourceforge.net/p/maxima/bugs/3181/

Thanks.

Scott


signature.asc
Description: PGP signature


Re: [LyX/master] Change \it to \mathit in Math.lyx

2016-06-25 Thread Scott Kostyshak
On Sat, Jun 25, 2016 at 11:27:19AM -0700, Pavel Sanda wrote:

> > Thanks for the reminder, Uwe. I will do that once we figure out if the
> > changes I made were indeed correct (see the other messages in this
> > thread).
> 
> No need to port the fixes, these have not yet made it to other manuals. P

OK.

Scott


signature.asc
Description: PGP signature


Re: [LyX/master] Change \it to \mathit in Math.lyx

2016-06-25 Thread Pavel Sanda
Scott Kostyshak wrote:
> On Sat, Jun 25, 2016 at 10:55:24AM +0200, Uwe Stöhr wrote:
> > Am 25.06.2016 um 10:23 schrieb Scott Kostyshak:
> > 
> > > commit 3f9335548872c028fcc6eea9997040c500683b19
> > > 
> > > Change \it to \mathit in Math.lyx
> > 
> > Hello Scott,
> > 
> > please do such changes for all languages of Math.lyx: French, Spanish,
> > German, Japanese, English
> 
> Thanks for the reminder, Uwe. I will do that once we figure out if the
> changes I made were indeed correct (see the other messages in this
> thread).

No need to port the fixes, these have not yet made it to other manuals. P


Re: [LyX/master] Style.

2016-06-25 Thread Scott Kostyshak
On Sat, Jun 25, 2016 at 07:19:15PM +0100, José Abílio Matos wrote:
> On Friday, June 24, 2016 10:02:30 PM WEST Richard Heck wrote:
> > commit 92fae708aebf8d2f3bc393b29c54a4cebeafe730
> > Author: Richard Heck 
> > Date:   Fri Jun 24 15:03:59 2016 -0400
> > 
> > Style.
> > ---
> >  lib/lyx2lyx/LyX.py |2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/lib/lyx2lyx/LyX.py b/lib/lyx2lyx/LyX.py
> > index bea3d67..f1fcf2e 100644
> > --- a/lib/lyx2lyx/LyX.py
> > +++ b/lib/lyx2lyx/LyX.py
> > @@ -317,7 +317,7 @@ class LyX_base:
> >  line = trim_eol_binary(line)
> >  decoded = line.decode('latin1')
> >  if check_token(decoded, '\\begin_preamble'):
> > -while 1:
> > +while True:
> >  line = self.input.readline()
> >  if not line:
> >  # eof found before end of header
> 
> This was a left-over from python 2.2 support. :-)
> 
> Thank you for catching that.

git grep 'while 1' catches more if anyone is interested.

Scott


signature.asc
Description: PGP signature


Re: [LyX/master] Change \it to \mathit in Math.lyx

2016-06-25 Thread Scott Kostyshak
On Sat, Jun 25, 2016 at 12:38:14PM +0200, Enrico Forestieri wrote:
> On Sat, Jun 25, 2016 at 10:23:57AM +0200, Scott Kostyshak wrote:
> 
> > commit 3f9335548872c028fcc6eea9997040c500683b19
> > Author: Scott Kostyshak 
> > Date:   Sat Jun 25 03:26:16 2016 -0400
> > 
> > Change \it to \mathit in Math.lyx
> > 
> > On TeX Live 2016, Math.lyx gives an error when compiling with
> > pdflatex. On TeX Live 2015, Math.lyx compiles but the log gives the
> > following warning:
> > 
> >   Usage of deprecated font command `\it'!
> 
> Note that this is the output produced by maxima, which does use \it
> instead of \mathit. Moreover, the formula is wrong as log(-1) should
> really be log(4).

Ah good to know. Do you think I should contact the maxima developers to
make sure they are aware of the deprectation?

In the meantime, is the only thing we can do from a LyX perspective to
document this issue in the CAS section?

Scott


> 
> > This commit amends 67e45aa3.
> > ---
> >  lib/doc/Math.lyx |2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/lib/doc/Math.lyx b/lib/doc/Math.lyx
> > index e60a960..4b37933 100644
> > --- a/lib/doc/Math.lyx
> > +++ b/lib/doc/Math.lyx
> > @@ -34254,7 +34254,7 @@ One can also use standard commands known to CAS:
> >  \begin_layout Itemize
> >  
> >  \change_inserted 5863208 1465782942
> > -\begin_inset Formula 
> > $powerseries\left(-\log\left(5-x\right),x,1\right)=\sum_{{\it 
> > i_{1}}=0}^{\infty}{\frac{4^{-{\it i_{1}}-1}\,\left(x-1\right)^{{\it 
> > i_{1}}+1}}{{\it i_{1}}+1}}-\log\left(-1\right)$
> > +\begin_inset Formula 
> > $powerseries\left(-\log\left(5-x\right),x,1\right)=\sum_{{\mathit 
> > i_{1}}=0}^{\infty}{\frac{4^{-{\mathit i_{1}}-1}\,\left(x-1\right)^{{\mathit 
> > i_{1}}+1}}{{\mathit i_{1}}+1}}-\log\left(-1\right)$
> >  \end_inset
> >  
> >  
> 
> -- 
> Enrico


signature.asc
Description: PGP signature


Re: [LyX/master] Style.

2016-06-25 Thread José Abílio Matos
On Friday, June 24, 2016 10:02:30 PM WEST Richard Heck wrote:
> commit 92fae708aebf8d2f3bc393b29c54a4cebeafe730
> Author: Richard Heck 
> Date:   Fri Jun 24 15:03:59 2016 -0400
> 
> Style.
> ---
>  lib/lyx2lyx/LyX.py |2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/lib/lyx2lyx/LyX.py b/lib/lyx2lyx/LyX.py
> index bea3d67..f1fcf2e 100644
> --- a/lib/lyx2lyx/LyX.py
> +++ b/lib/lyx2lyx/LyX.py
> @@ -317,7 +317,7 @@ class LyX_base:
>  line = trim_eol_binary(line)
>  decoded = line.decode('latin1')
>  if check_token(decoded, '\\begin_preamble'):
> -while 1:
> +while True:
>  line = self.input.readline()
>  if not line:
>  # eof found before end of header

This was a left-over from python 2.2 support. :-)

Thank you for catching that.
-- 
José Abílio


Re: Combo Box for Custom Insets

2016-06-25 Thread Richard Heck
On 06/25/2016 01:36 PM, Guillaume Munch wrote:
> Le 25/06/2016 17:00, Richard Heck a écrit :
>> On 06/25/2016 02:58 AM, Liviu Andronic wrote:
>>> On Sat, Jun 25, 2016 at 12:23 AM, Richard Heck  wrote:
 Attached please find a patch that implements a combo box for custom
 insets, much like the layout box. This is a very simple version. More
 complicated ones might also have an InsetLayout tag that governed
 whether an inset would appear here. It would also be very easy to
 adapt
 this also to give us a combo for charstyles.

>>> Looks good. Couple of comments:
>>> - since unlike styles we don't always have a "default" chunk, probably
>>> the first item in the list should be something like: >> Inset>. This will also make the UI more intuitive.
>>> - using the knitr module, while I can insert Chunks without trouble,
>>> for S/R expression and Sweave Opts I get "undefined" inset
>>
>> I've fixed both these issues with the attached.
>>
>
> Hi Richard, thank you for the patch.
>
> I have:
>   warning: 4 space error ignored
>   warning: 9 lines have caused space errors
>
>
> Like Jean-Marc I think a button with an icon would be better suited
> (even though I mentioned a combo box myself at some point without
> thinking enough). This may however require some work as the current
> implementation of LayoutBox you rely on relies on a hack instead of
> defining a model for the contents of the combo box. Re-using LayoutBox
> is nice since it will make it easier to sort by categories of custom
> insets in the future.

It probably wouldn't be that hard for someone who knows what they're
doing with Qt to reimplement this as an icon with a menu. As I said,
though, I wouldn't know where to start.

For now, the branch is here:
http://git.lyx.org/?p=developers/rgheck/lyx.git;a=shortlog;h=refs/heads/features/CustomInsets

> The problem mentioned by Liviu is solved, e.g. some insets became
> "undefined" with the previous patch, e.g. Beamer notes,  but now it
> works.

The problem was that there are spaces in those inset names, so they have
to be quoted when passed as arguments to dispatch.

I removed the delete.

Richard



Re: Joining LyX development team

2016-06-25 Thread Pavel Sanda
Josh Hieronymus wrote:
> I haven't had much extra time on my hands lately, but I'd like to keep
> working on the epub export as well. I could also help with some of the
> Python issues and the occasional XHTML export bug. Scott suggested the
> latter a little while back, but I made the mistake of checking my email
> when I didn't have time to write out a response and forgot about it until
> now. - Josh

Even if you don't have time to work on it, you could perhps give instruction
what to start/what is missing? P


Re: [LyX/master] Change \it to \mathit in Math.lyx

2016-06-25 Thread Scott Kostyshak
On Sat, Jun 25, 2016 at 10:55:24AM +0200, Uwe Stöhr wrote:
> Am 25.06.2016 um 10:23 schrieb Scott Kostyshak:
> 
> > commit 3f9335548872c028fcc6eea9997040c500683b19
> > 
> > Change \it to \mathit in Math.lyx
> 
> Hello Scott,
> 
> please do such changes for all languages of Math.lyx: French, Spanish,
> German, Japanese, English

Thanks for the reminder, Uwe. I will do that once we figure out if the
changes I made were indeed correct (see the other messages in this
thread).

Scott

> 
> thanks and regards
> Uwe


signature.asc
Description: PGP signature


Re: Joining LyX development team

2016-06-25 Thread Scott Kostyshak
On Sat, Jun 25, 2016 at 01:30:18AM -0500, Josh Hieronymus wrote:
> On Jun 25, 2016 1:09 AM, "Dima Ruinskiy"  wrote:
> >
> > Richard Heck  lyx.org> writes:
> >
> > > Is there something specific you'd like to work on?
> > >
> > Nothing specific, except maybe focus on Windows-specific issues. So far
> the
> > only thing I did was modify the CMake configuration a bit to make 2.2.0
> work
> > on Vista again. See discussion here:
> > http://www.lyx.org/trac/ticket/10186
> >
> > I'd like to see it make into an official build eventually, instead of just
> > being a private patch / separate release.
> >
> > Pavel Sanda  lyx.org> writes:
> >
> > > Yes, We need someone to finish epub export :) Pavel
> > >
> > What is this? Can I have some more details? :)
> >
> I haven't had much extra time on my hands lately, but I'd like to keep
> working on the epub export as well. I could also help with some of the
> Python issues and the occasional XHTML export bug. Scott suggested the
> latter a little while back, but I made the mistake of checking my email
> when I didn't have time to write out a response and forgot about it until
> now. - Josh

Great! No worries about lack of time. Everyone understand that.

Scott


signature.asc
Description: PGP signature


Re: Joining LyX development team

2016-06-25 Thread Scott Kostyshak
On Sat, Jun 25, 2016 at 04:16:16PM +0100, Guillaume Munch wrote:
> Le 25/06/2016 12:53, Jean-Marc Lasgouttes a écrit :
> > Le 25/06/2016 10:53, Uwe Stöhr a écrit :
> > > Am 24.06.2016 um 08:43 schrieb Dima Ruinskiy:
> > > 
> > > > Hi. My name is Dima Ruinskiy, and I would like to join the LyX
> > > > development team.
> > 
> > Hi Dima, welcome on lyx-devel!
> 
> same
> 
> > 
> > > For the others on this list: Dima volunteered to help LyX with compiling
> > > it on Windows, provide support for Win Vista builds (which I cannot do),
> > > to have a look at the Hebrew translation and therefore also to
> > > right-to-left (a.k.a. BiDi writing).
> > 
> > I have to warn that the Bidi code is a bit scary an overly complicated.
> > I have made some changes in 2.2 that touch Bidi and probably introduced
> > bugs there...
> > 
> 
> 
> It would surely not hurt to have somebody who knows how it should be in
> the first place.
> 
> My advice in general is to start with something that you think is easy
> to fix and that bothers you personally. More ambitious yet realistic
> changes come naturally after being acquainted with the code.

Agreed. Work on something that is fun for you.

Since you mentioned Windows specific issues, you can take a look at
bugs with the component "windows-installer":
http://www.lyx.org/trac/query?status=accepted&status=assigned&status=new&status=reopened&summary=~&component=windows-installer
and bugs with the keyword "os=windows":
http://www.lyx.org/trac/query?status=accepted&status=assigned&status=new&status=reopened&keywords=~os%3Dwindows

Scott


signature.asc
Description: PGP signature


Re: Combo Box for Custom Insets

2016-06-25 Thread Richard Heck
On 06/25/2016 12:23 PM, Liviu Andronic wrote:
> On Sat, Jun 25, 2016 at 6:00 PM, Richard Heck  wrote:
>> I've fixed both these issues with the attached.
>>
> I have trouble applying this patch. I've tried everything from patch
> -p1 < filename.patch to git apply filename.patch on a clean tree and
> it fails.

Try this one. I've rebased against current master.

Richard

>From fe86ed4936fc36b9e00c826ce46de3bdc8c76025 Mon Sep 17 00:00:00 2001
From: Richard Heck 
Date: Fri, 24 Jun 2016 17:47:30 -0400
Subject: [PATCH] Initial work for inset toolbar combo.

---
 lib/ui/stdtoolbars.inc   |   2 +
 src/frontends/qt4/GuiToolbar.cpp |   9 ++
 src/frontends/qt4/GuiView.cpp|  24 -
 src/frontends/qt4/GuiView.h  |   3 +
 src/frontends/qt4/InsetCombo.cpp | 207 +++
 src/frontends/qt4/InsetCombo.h   |  56 +++
 src/frontends/qt4/Makefile.am|   2 +
 src/frontends/qt4/Toolbars.cpp   |   9 +-
 src/frontends/qt4/Toolbars.h |   4 +-
 9 files changed, 312 insertions(+), 4 deletions(-)
 create mode 100644 src/frontends/qt4/InsetCombo.cpp
 create mode 100644 src/frontends/qt4/InsetCombo.h

diff --git a/lib/ui/stdtoolbars.inc b/lib/ui/stdtoolbars.inc
index d375afa..c504e4a 100644
--- a/lib/ui/stdtoolbars.inc
+++ b/lib/ui/stdtoolbars.inc
@@ -95,6 +95,8 @@ ToolbarSet
 		Item "Toggle outline" "dialog-toggle toc"
 		Item "Toggle math toolbar" "toolbar-toggle math"
 		Item "Toggle table toolbar" "toolbar-toggle table"
+		Separator
+		Insets
 	End
 
 	Toolbar "view/update" "View/Update"
diff --git a/src/frontends/qt4/GuiToolbar.cpp b/src/frontends/qt4/GuiToolbar.cpp
index 77471c9..8958813 100644
--- a/src/frontends/qt4/GuiToolbar.cpp
+++ b/src/frontends/qt4/GuiToolbar.cpp
@@ -23,6 +23,7 @@
 #include "GuiView.h"
 #include "IconPalette.h"
 #include "InsertTableWidget.h"
+#include "InsetCombo.h"
 #include "LayoutBox.h"
 #include "qt_helpers.h"
 #include "Toolbars.h"
@@ -277,6 +278,14 @@ void GuiToolbar::add(ToolbarItem const & item)
 		action->setVisible(true);
 		break;
 	}
+	case ToolbarItem::INSETS: {
+		InsetCombo * insets = owner_.getInsetCombo();
+		QObject::connect(this, SIGNAL(iconSizeChanged(QSize)),
+			insets, SLOT(setIconSize(QSize)));
+		QAction * action = addWidget(insets);
+		action->setVisible(true);
+		break;
+	}
 	case ToolbarItem::MINIBUFFER:
 		command_buffer_ = new GuiCommandBuffer(&owner_);
 		addWidget(command_buffer_);
diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp
index 429def5..cc93382 100644
--- a/src/frontends/qt4/GuiView.cpp
+++ b/src/frontends/qt4/GuiView.cpp
@@ -27,6 +27,7 @@
 #include "GuiToolbar.h"
 #include "GuiWorkArea.h"
 #include "GuiProgress.h"
+#include "InsetCombo.h"
 #include "LayoutBox.h"
 #include "Menus.h"
 #include "TocModel.h"
@@ -277,7 +278,7 @@ class GuiView::GuiViewPrivate
 public:
 	GuiViewPrivate(GuiView * gv)
 		: gv_(gv), current_work_area_(0), current_main_work_area_(0),
-		layout_(0), autosave_timeout_(5000),
+		layout_(0), insets_(0), autosave_timeout_(5000),
 		in_show_(false)
 	{
 		// hardcode here the platform specific icon size
@@ -328,6 +329,7 @@ public:
 		delete splitter_;
 		delete bg_widget_;
 		delete stack_widget_;
+		delete insets_;
 	}
 
 	QMenu * toolBarPopup(GuiView * parent)
@@ -462,6 +464,7 @@ public:
 	 * to only one dialog.
 	 */
 	LayoutBox * layout_;
+	InsetCombo * insets_;
 
 	///
 	map dialogs_;
@@ -808,6 +811,7 @@ void GuiView::constructToolbars()
 	d.layout_ = new LayoutBox(*this);
 	d.stack_widget_->addWidget(d.layout_);
 	d.layout_->move(0,0);
+	d.insets_ = new InsetCombo(*this);
 
 	// extracts the toolbars from the backend
 	Toolbars::Infos::iterator cit = guiApp->toolbars().begin();
@@ -1344,7 +1348,8 @@ void GuiView::setBusy(bool busy)
 		return;
 	}
 	QApplication::restoreOverrideCursor();
-	updateLayoutList();	
+	updateLayoutList();
+	updateInsetCombo();
 }
 
 
@@ -1535,6 +1540,12 @@ LayoutBox * GuiView::getLayoutDialog() const
 }
 
 
+InsetCombo * GuiView::getInsetCombo() const
+{
+	return d.insets_;
+}
+
+
 void GuiView::updateLayoutList()
 {
 	if (d.layout_)
@@ -1542,6 +1553,13 @@ void GuiView::updateLayoutList()
 }
 
 
+void GuiView::updateInsetCombo()
+{
+	if (d.insets_)
+		d.insets_->updateContents(false);
+}
+
+
 void GuiView::updateToolbars()
 {
 	ToolbarMap::iterator end = d.toolbars_.end();
@@ -4218,6 +4236,7 @@ void GuiView::resetDialogs()
 	constructToolbars();
 	guiApp->menus().fillMenuBar(menuBar(), this, false);
 	d.layout_->updateContents(true);
+	d.insets_->updateContents(true);
 	// Now update controls with current buffer.
 	guiApp->setCurrentView(this);
 	restoreLayout();
@@ -4355,6 +4374,7 @@ void GuiView::updateDialogs()
 	}
 	updateToolbars();
 	updateLayoutList();
+	updateInsetCombo();
 }
 
 Dialog * createDialog(GuiView & lv, string const & name);
diff --git a/src/frontends/qt4/GuiView.h b/src/frontends/qt4/GuiView.h
index c3ccdbd..e11db90 100644
--- a/src/frontends/qt4/GuiView.h
+++ b/src/frontends/qt4/GuiView.h
@@ -46,6 +46,7 @@ c

Re: Combo Box for Custom Insets

2016-06-25 Thread Guillaume Munch

Le 25/06/2016 18:36, Guillaume Munch a écrit :


 > @@ -328,6 +329,7 @@ public:
 >   delete splitter_;
 >   delete bg_widget_;
 >   delete stack_widget_;
 > +delete insets_;
 >   }

This is incorrect. The pointer is not owned by GuiView::GuiViewPrivate
but by Qt (by passing *this to the constructor of the object pointed to
by insets_).



Small correction: It is not owned by Qt from the start (the custom
constructor does not specify an owning widget). However, as explained in
the comment below, the GuiToolBar takes possession of the InsetCombo
later, when it is inserted in the toolbar. Yes, this is tricky and not
done like that usually.

Also, I should have written what is the correct version for clarity. Do
not delete it there.



 >/**
 > * \warning Don't Delete! The layout box is actually owned by
 > * whichever toolbar contains it. All the GuiView class needs is a
 > * means of accessing it.
 > *
 > * FIXME: replace that with a proper model so that we are not limited
 > * to only one dialog.
 > */





Re: [LyX/master] Change \it to \mathit in Math.lyx

2016-06-25 Thread Pavel Sanda
Enrico Forestieri wrote:
> > commit 3f9335548872c028fcc6eea9997040c500683b19
> > Author: Scott Kostyshak 
> > Date:   Sat Jun 25 03:26:16 2016 -0400
> > 
> > Change \it to \mathit in Math.lyx
> > 
> > On TeX Live 2016, Math.lyx gives an error when compiling with
> > pdflatex. On TeX Live 2015, Math.lyx compiles but the log gives the
> > following warning:
> > 
> >   Usage of deprecated font command `\it'!
> 
> Note that this is the output produced by maxima, which does use \it
> instead of \mathit. Moreover, the formula is wrong as log(-1) should
> really be log(4).

This is the new stuff I put in. Don't even ask how that happen :) P


Re: Combo Box for Custom Insets

2016-06-25 Thread Guillaume Munch

Le 25/06/2016 17:01, Richard Heck a écrit :


I'd be happy for someone else to make it into a menu, but I do not know
enough about Qt to do it myself. I mostly stole this from LayoutBox.



Yes, looks like it is not immediate.




Re: Compiling with Microsoft Visual C++

2016-06-25 Thread Georg Baum
racoon wrote:

> On 25.06.2016 18:16, Georg Baum wrote:
>>
>> You could also send me (privately please) the file C:\Program Files
>> 
(x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\Win32\PlatformToolsets\v140\Toolset.targets,
>> maybe I have then an idea about possible causes for the error message you
>> are seeing.
> 
> I don't have a folder "Microsoft.Cpp" in
> 
> C:\Program Files (x86)\MSBuild\
> 
> I have a "Microsoft" folder there. But that does not contain any "v4.0"
> folder only "Windows Workflow Foundation".

This is strange. This file created the error in the CMakeError.log you sent 
some days ago. Maybe this directory does not exist anymore after you 
reinstalled the SDK? If the current CMakeError.log looks different than the 
one you sent already please send this one, maybe the platform SDK error is 
fixed and we see a different one now.


Georg



Re: Combo Box for Custom Insets

2016-06-25 Thread Guillaume Munch

Le 25/06/2016 17:00, Richard Heck a écrit :

On 06/25/2016 02:58 AM, Liviu Andronic wrote:

On Sat, Jun 25, 2016 at 12:23 AM, Richard Heck  wrote:

Attached please find a patch that implements a combo box for custom
insets, much like the layout box. This is a very simple version. More
complicated ones might also have an InsetLayout tag that governed
whether an inset would appear here. It would also be very easy to adapt
this also to give us a combo for charstyles.


Looks good. Couple of comments:
- since unlike styles we don't always have a "default" chunk, probably
the first item in the list should be something like: . This will also make the UI more intuitive.
- using the knitr module, while I can insert Chunks without trouble,
for S/R expression and Sweave Opts I get "undefined" inset


I've fixed both these issues with the attached.



Hi Richard, thank you for the patch.

I have:
  warning: 4 space error ignored
  warning: 9 lines have caused space errors


Like Jean-Marc I think a button with an icon would be better suited 
(even though I mentioned a combo box myself at some point without 
thinking enough). This may however require some work as the current 
implementation of LayoutBox you rely on relies on a hack instead of 
defining a model for the contents of the combo box. Re-using LayoutBox 
is nice since it will make it easier to sort by categories of custom 
insets in the future.


I would place the icon at the left of the layouts box and hide it when 
there are no custom insets.



The problem mentioned by Liviu is solved, e.g. some insets became 
"undefined" with the previous patch, e.g. Beamer notes,  but now it works.



In addition:

> @@ -328,6 +329,7 @@ public:
>delete splitter_;
>delete bg_widget_;
>delete stack_widget_;
> +  delete insets_;
>}

This is incorrect. The pointer is not owned by GuiView::GuiViewPrivate
but by Qt (by passing *this to the constructor of the object pointed to
by insets_).

In fact this is mentioned just above:

>/**
> * \warning Don't Delete! The layout box is actually owned by
> * whichever toolbar contains it. All the GuiView class needs is a
> * means of accessing it.
> *
> * FIXME: replace that with a proper model so that we are not limited
> * to only one dialog.
> */

The FIXME refers to the fact that the complete widget is stored in
GuiView instead of only a model, which is a bit weird. This used to be
responsible for the weird window appearing when saving preferences.

Independently, now that we have unique_ptr, shared_ptr, and the Qt smart
pointers, I think a good rule of thumb is that we no longer need to
introduce any new¹ or delete in the code. Instead, any owning pointers
should be encapsulated into a smater pointer that takes care handles the
deletion. (¹Actually, new is still necessary for Qt pointers, e.g. when
creating widgets, though one should make sure that the parent is
properly specified and not null.)


Guillaume



Re: Combo Box for Custom Insets

2016-06-25 Thread Pavel Sanda
Liviu Andronic wrote:
> The next patch would create the file src/frontends/qt4/InsetCombo.cpp,
> which already exists! Assume -R? [n]
> Apply anyway? [n]

Delete new files (InsetCombo*). P


Re: Combo Box for Custom Insets

2016-06-25 Thread Kornel Benko
Am Samstag, 25. Juni 2016 um 18:34:14, schrieb Liviu Andronic 
> On Sat, Jun 25, 2016 at 6:29 PM, Kornel Benko  wrote:
> > Am Samstag, 25. Juni 2016 um 18:23:03, schrieb Liviu Andronic 
> > 
> >> On Sat, Jun 25, 2016 at 6:00 PM, Richard Heck  wrote:
> >> > I've fixed both these issues with the attached.
> >> >
> >> I have trouble applying this patch. I've tried everything from patch
> >> -p1 < filename.patch to git apply filename.patch on a clean tree and
> >> it fails.
> >
> > I had no problems with this in master branch. The only difference was
> > patching file src/frontends/qt4/GuiView.cpp
> > Hunk #9 succeeded at 4236 (offset 5 lines).
> > Hunk #10 succeeded at 4374 (offset 5 lines).
> >
> 
> I also get this, but the patch doesn't seem to apply cleanly:
> 
> sh>patch -p1 < "0001-Initial-work-for-inset-toolbar-combo2.patch" (7483)
> (Stripping trailing CRs from patch; use --binary to disable.)

I do not see ANY CR in this file (with 'od -x'), each line is delimited with LF 
here.
Are you on Windows?
You may need to convert the line endings first it that is the case.

Kornel

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


Re: Compiling with Microsoft Visual C++

2016-06-25 Thread racoon

On 25.06.2016 18:16, Georg Baum wrote:

racoon wrote:


Thanks for the sustained support!


You are welcome! I do it because building LyX on windows should be as easy
as it is on unix. Unfortunately this is not yet the case, and your help in
trying out different tests is appreciated as well.


On 21.06.2016 22:02, Georg Baum wrote:

The standalone SDK should be installed below C:\Program Files\Microsoft
SDKs\ or C:\Program Files (x86)\Windows Kits\. If there is nothing below
one of these folders then it is probably not installed.


Have the C:\Program Files (x86)\Windows Kits\ folder with content.


Unfortunately the SDK stuff is quite confusing. Sometimes the SDK is
included with MSVC, sometimes you need a standalone version. After some
googling it looks like MSVC 2015 comes with a newer SDK that should be
used, but the installion is optional. Some more things you could try:

- Make sure the MSVC included SDK is installed, as described at
http://stackoverflow.com/questions/31619296/cmake-does-not-find-visual-c-compiler.
Then create the MSVC project files with cmake again.


Tried (but also had the cl.exe before). Did not help.


- In contrast to my earlier advice, select MSVC 2010 in cmake as
generator, and have MSVC convert the projects during loading (this would
help in case there is a MSVC 2015 related bug in cmake).


Still same error.


Sorry, then I am out of ides for now. Kornel sent a message in another
thread pointing to
http://comments.gmane.org/gmane.comp.programming.tools.cmake.user/55645. Did
you see it? Maybe asking on the cmake list gets some usable answers.

You could also send me (privately please) the file C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\Win32\PlatformToolsets\v140\Toolset.targets,
maybe I have then an idea about possible causes for the error message you
are seeing.


I don't have a folder "Microsoft.Cpp" in

C:\Program Files (x86)\MSBuild\

I have a "Microsoft" folder there. But that does not contain any "v4.0" 
folder only "Windows Workflow Foundation".


Daniel




Re: Combo Box for Custom Insets

2016-06-25 Thread Liviu Andronic
On Sat, Jun 25, 2016 at 6:29 PM, Kornel Benko  wrote:
> Am Samstag, 25. Juni 2016 um 18:23:03, schrieb Liviu Andronic 
> 
>> On Sat, Jun 25, 2016 at 6:00 PM, Richard Heck  wrote:
>> > I've fixed both these issues with the attached.
>> >
>> I have trouble applying this patch. I've tried everything from patch
>> -p1 < filename.patch to git apply filename.patch on a clean tree and
>> it fails.
>
> I had no problems with this in master branch. The only difference was
> patching file src/frontends/qt4/GuiView.cpp
> Hunk #9 succeeded at 4236 (offset 5 lines).
> Hunk #10 succeeded at 4374 (offset 5 lines).
>

I also get this, but the patch doesn't seem to apply cleanly:

sh>patch -p1 < "0001-Initial-work-for-inset-toolbar-combo2.patch" (7483)
(Stripping trailing CRs from patch; use --binary to disable.)
patching file lib/ui/stdtoolbars.inc
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/frontends/qt4/GuiToolbar.cpp
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/frontends/qt4/GuiView.cpp
Hunk #9 succeeded at 4236 (offset 5 lines).
Hunk #10 succeeded at 4374 (offset 5 lines).
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/frontends/qt4/GuiView.h
The next patch would create the file src/frontends/qt4/InsetCombo.cpp,
which already exists! Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored
The next patch would create the file src/frontends/qt4/InsetCombo.h,
which already exists! Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/frontends/qt4/Makefile.am
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/frontends/qt4/Toolbars.cpp
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/frontends/qt4/Toolbars.h
sh>patch -p1 < ... 1-Initial-work-for-inset-toolbar-combo2.patch"
(7483) returned '1'


Liviu


>> >git apply "0001-Initial-work-for-inset-toolbar-combo2.patch" (7324)
>> 0001-Initial-work-for-inset-toolbar-combo2.patch:28: trailing whitespace.
>> Separator0001-Initial-work-for-inset-toolbar-combo2.patch:29: trailing
>> whitespace.
>> Insets0001-Initial-work-for-inset-toolbar-combo2.patch:41: trailing 
>> whitespace.
>> #include "InsetCombo.h"0001-Initial-work-for-inset-toolbar-combo2.patch:49:
>> trailing whitespace.
>> case ToolbarItem::INSETS:
>> {0001-Initial-work-for-inset-toolbar-combo2.patch:50: trailing
>> whitespace.
>> InsetCombo * insets = owner_.getInsetCombo();fatal: git apply: bad
>> git-diff - expected /dev/null on line 187
>> >git apply "0001-Initial-work-for-inset-toolbar-combo2.patch" (7324) 
>> >returned '128'
>>
>>
>> Any pointers?
>>
>> Thanks,
>> Liviu
>>
>>
>> > Richard
>
> Kornel


Re: Combo Box for Custom Insets

2016-06-25 Thread Kornel Benko
Am Samstag, 25. Juni 2016 um 18:23:03, schrieb Liviu Andronic 
> On Sat, Jun 25, 2016 at 6:00 PM, Richard Heck  wrote:
> > I've fixed both these issues with the attached.
> >
> I have trouble applying this patch. I've tried everything from patch
> -p1 < filename.patch to git apply filename.patch on a clean tree and
> it fails.

I had no problems with this in master branch. The only difference was
patching file src/frontends/qt4/GuiView.cpp
Hunk #9 succeeded at 4236 (offset 5 lines).
Hunk #10 succeeded at 4374 (offset 5 lines).

> >git apply "0001-Initial-work-for-inset-toolbar-combo2.patch" (7324)
> 0001-Initial-work-for-inset-toolbar-combo2.patch:28: trailing whitespace.
> Separator0001-Initial-work-for-inset-toolbar-combo2.patch:29: trailing
> whitespace.
> Insets0001-Initial-work-for-inset-toolbar-combo2.patch:41: trailing 
> whitespace.
> #include "InsetCombo.h"0001-Initial-work-for-inset-toolbar-combo2.patch:49:
> trailing whitespace.
> case ToolbarItem::INSETS:
> {0001-Initial-work-for-inset-toolbar-combo2.patch:50: trailing
> whitespace.
> InsetCombo * insets = owner_.getInsetCombo();fatal: git apply: bad
> git-diff - expected /dev/null on line 187
> >git apply "0001-Initial-work-for-inset-toolbar-combo2.patch" (7324) returned 
> >'128'
> 
> 
> Any pointers?
> 
> Thanks,
> Liviu
> 
> 
> > Richard

Kornel

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


Re: Combo Box for Custom Insets

2016-06-25 Thread Liviu Andronic
On Sat, Jun 25, 2016 at 6:00 PM, Richard Heck  wrote:
> I've fixed both these issues with the attached.
>
I have trouble applying this patch. I've tried everything from patch
-p1 < filename.patch to git apply filename.patch on a clean tree and
it fails.

>git apply "0001-Initial-work-for-inset-toolbar-combo2.patch" (7324)
0001-Initial-work-for-inset-toolbar-combo2.patch:28: trailing whitespace.
Separator0001-Initial-work-for-inset-toolbar-combo2.patch:29: trailing
whitespace.
Insets0001-Initial-work-for-inset-toolbar-combo2.patch:41: trailing whitespace.
#include "InsetCombo.h"0001-Initial-work-for-inset-toolbar-combo2.patch:49:
trailing whitespace.
case ToolbarItem::INSETS:
{0001-Initial-work-for-inset-toolbar-combo2.patch:50: trailing
whitespace.
InsetCombo * insets = owner_.getInsetCombo();fatal: git apply: bad
git-diff - expected /dev/null on line 187
>git apply "0001-Initial-work-for-inset-toolbar-combo2.patch" (7324) returned 
>'128'


Any pointers?

Thanks,
Liviu


> Richard
>


Re: Combo Box for Custom Insets

2016-06-25 Thread Richard Heck
On 06/25/2016 05:29 AM, Jean-Marc Lasgouttes wrote:
> That means that we probably shouldn't use a x but a kind of menu, maybe 
> attached to an icon

Try the latest version.

I'd be happy for someone else to make it into a menu, but I do not know
enough about Qt to do it myself. I mostly stole this from LayoutBox.

Richard


>
> JMarc 
>
> Le 25 juin 2016 08:58:57 GMT+02:00, Liviu Andronic  a écrit 
> :
>> On Sat, Jun 25, 2016 at 12:23 AM, Richard Heck  wrote:
>> Looks good. Couple of comments:
>> - since unlike styles we don't always have a "default" chunk, probably
>> the first item in the list should be something like: > Inset>. This will also make the UI more intuitive.



Re: new LyX 2.2.0 installer for Windows Vista is available

2016-06-25 Thread Georg Baum
Uwe Stöhr wrote:

> Richard, could you please put it on ftp.lyx.org? Could you please also
> write a news message that we now have a Vista installer but that this
> installer should not be used for other Windows versions than Vista.

This is not possible for legal reasons. Our own license forbids to 
distribute binaries without corresponding source code. This includes the 
build scripts (see https://www.lyx.org/License):

"The source code for a work means the preferred form of the work for making 
modifications to it. For an executable work, complete source code means all 
the source code for all modules it contains, plus any associated interface 
definition files, plus the scripts used to control compilation and 
installation of the executable."

I am preaching since years that every binary we distribute must be built in 
a reproducible way from identifiable, publicy available sources (including 
the build scripts).

Currently only our own OS X build and the linux builds offered by Livio and 
linux distributors are 100% reproducible. The windows installer is not, the 
build instructions are incomplete and partially wrong, and a binary 
dependency package is needed which contains unneeded stuff such as old MSVC 
dlls. How this binary dependency package was produced is unknown and not 
reproducible.

Adding two binaries from a different source to the installer makes it even 
more unreproducible. We need to go into the other direction. That is also 
the reason why I spend lots of time for helping others with MSVC and cmake, 
although I have zero benefit from it personally.

> Thus please keep use welcome new people and encouraging to join the LyX
> developer team. LyX need manpower and I am happy about every new
> developer. We also need people developing on Windows.

Please stop implying that you are the only one welcoming new people. 
Everybody welcomes new contributors, especially those who help to get a 
better windows build.


Georg



Re: Combo Box for Custom Insets

2016-06-25 Thread Richard Heck
On 06/25/2016 02:58 AM, Liviu Andronic wrote:
> On Sat, Jun 25, 2016 at 12:23 AM, Richard Heck  wrote:
>> Attached please find a patch that implements a combo box for custom
>> insets, much like the layout box. This is a very simple version. More
>> complicated ones might also have an InsetLayout tag that governed
>> whether an inset would appear here. It would also be very easy to adapt
>> this also to give us a combo for charstyles.
>>
> Looks good. Couple of comments:
> - since unlike styles we don't always have a "default" chunk, probably
> the first item in the list should be something like:  Inset>. This will also make the UI more intuitive.
> - using the knitr module, while I can insert Chunks without trouble,
> for S/R expression and Sweave Opts I get "undefined" inset

I've fixed both these issues with the attached.

Richard

>From 001716da6eb23aff6f38fdbb8cc07d2c5d900498 Mon Sep 17 00:00:00 2001
From: Richard Heck 
Date: Fri, 24 Jun 2016 17:47:30 -0400
Subject: [PATCH] Initial work for inset toolbar combo.

---
 lib/ui/stdtoolbars.inc   |   2 +
 src/frontends/qt4/GuiToolbar.cpp |   9 ++
 src/frontends/qt4/GuiView.cpp|  24 -
 src/frontends/qt4/GuiView.h  |   3 +
 src/frontends/qt4/InsetCombo.cpp | 207 +++
 src/frontends/qt4/InsetCombo.h   |  56 +++
 src/frontends/qt4/Makefile.am|   2 +
 src/frontends/qt4/Toolbars.cpp   |   9 +-
 src/frontends/qt4/Toolbars.h |   4 +-
 9 files changed, 312 insertions(+), 4 deletions(-)
 create mode 100644 src/frontends/qt4/InsetCombo.cpp
 create mode 100644 src/frontends/qt4/InsetCombo.h

diff --git a/lib/ui/stdtoolbars.inc b/lib/ui/stdtoolbars.inc
index d375afa..c504e4a 100644
--- a/lib/ui/stdtoolbars.inc
+++ b/lib/ui/stdtoolbars.inc
@@ -95,6 +95,8 @@ ToolbarSet
 		Item "Toggle outline" "dialog-toggle toc"
 		Item "Toggle math toolbar" "toolbar-toggle math"
 		Item "Toggle table toolbar" "toolbar-toggle table"
+		Separator
+		Insets
 	End
 
 	Toolbar "view/update" "View/Update"
diff --git a/src/frontends/qt4/GuiToolbar.cpp b/src/frontends/qt4/GuiToolbar.cpp
index 77471c9..8958813 100644
--- a/src/frontends/qt4/GuiToolbar.cpp
+++ b/src/frontends/qt4/GuiToolbar.cpp
@@ -23,6 +23,7 @@
 #include "GuiView.h"
 #include "IconPalette.h"
 #include "InsertTableWidget.h"
+#include "InsetCombo.h"
 #include "LayoutBox.h"
 #include "qt_helpers.h"
 #include "Toolbars.h"
@@ -277,6 +278,14 @@ void GuiToolbar::add(ToolbarItem const & item)
 		action->setVisible(true);
 		break;
 	}
+	case ToolbarItem::INSETS: {
+		InsetCombo * insets = owner_.getInsetCombo();
+		QObject::connect(this, SIGNAL(iconSizeChanged(QSize)),
+			insets, SLOT(setIconSize(QSize)));
+		QAction * action = addWidget(insets);
+		action->setVisible(true);
+		break;
+	}
 	case ToolbarItem::MINIBUFFER:
 		command_buffer_ = new GuiCommandBuffer(&owner_);
 		addWidget(command_buffer_);
diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp
index 87ee553..34da998 100644
--- a/src/frontends/qt4/GuiView.cpp
+++ b/src/frontends/qt4/GuiView.cpp
@@ -27,6 +27,7 @@
 #include "GuiToolbar.h"
 #include "GuiWorkArea.h"
 #include "GuiProgress.h"
+#include "InsetCombo.h"
 #include "LayoutBox.h"
 #include "Menus.h"
 #include "TocModel.h"
@@ -277,7 +278,7 @@ class GuiView::GuiViewPrivate
 public:
 	GuiViewPrivate(GuiView * gv)
 		: gv_(gv), current_work_area_(0), current_main_work_area_(0),
-		layout_(0), autosave_timeout_(5000),
+		layout_(0), insets_(0), autosave_timeout_(5000),
 		in_show_(false)
 	{
 		// hardcode here the platform specific icon size
@@ -328,6 +329,7 @@ public:
 		delete splitter_;
 		delete bg_widget_;
 		delete stack_widget_;
+		delete insets_;
 	}
 
 	QMenu * toolBarPopup(GuiView * parent)
@@ -462,6 +464,7 @@ public:
 	 * to only one dialog.
 	 */
 	LayoutBox * layout_;
+	InsetCombo * insets_;
 
 	///
 	map dialogs_;
@@ -808,6 +811,7 @@ void GuiView::constructToolbars()
 	d.layout_ = new LayoutBox(*this);
 	d.stack_widget_->addWidget(d.layout_);
 	d.layout_->move(0,0);
+	d.insets_ = new InsetCombo(*this);
 
 	// extracts the toolbars from the backend
 	Toolbars::Infos::iterator cit = guiApp->toolbars().begin();
@@ -1344,7 +1348,8 @@ void GuiView::setBusy(bool busy)
 		return;
 	}
 	QApplication::restoreOverrideCursor();
-	updateLayoutList();	
+	updateLayoutList();
+	updateInsetCombo();
 }
 
 
@@ -1535,6 +1540,12 @@ LayoutBox * GuiView::getLayoutDialog() const
 }
 
 
+InsetCombo * GuiView::getInsetCombo() const
+{
+	return d.insets_;
+}
+
+
 void GuiView::updateLayoutList()
 {
 	if (d.layout_)
@@ -1542,6 +1553,13 @@ void GuiView::updateLayoutList()
 }
 
 
+void GuiView::updateInsetCombo()
+{
+	if (d.insets_)
+		d.insets_->updateContents(false);
+}
+
+
 void GuiView::updateToolbars()
 {
 	ToolbarMap::iterator end = d.toolbars_.end();
@@ -4213,6 +4231,7 @@ void GuiView::resetDialogs()
 	constructToolbars();
 	guiApp->menus().fillMenuBar(menuBar(), this, false);
 	d.layout_->updateContents(true);
+	d.insets_->updateContents(t

Re: Joining LyX development team

2016-06-25 Thread Kornel Benko
Am Samstag, 25. Juni 2016 um 17:30:24, schrieb Georg Baum 

> Hi Dima,
> 
> welcome from me as well! We can always need some helping hands, and as you 
> might have found out already especially windows build procedure needs help.
> 
> Dima Ruinskiy wrote:
> 
> > Richard Heck  lyx.org> writes:
> > 
> >> Is there something specific you'd like to work on?
> >> 
> > Nothing specific, except maybe focus on Windows-specific issues. So far
> > the only thing I did was modify the CMake configuration a bit to make
> > 2.2.0 work on Vista again. See discussion here:
> > http://www.lyx.org/trac/ticket/10186
> > 
> > I'd like to see it make into an official build eventually, instead of just
> > being a private patch / separate release.
> 
> That would be great! Could you provide your modifications as a patch please? 
> I read your description in text form, but having a patch ensures that there 
> are no misunderstandings. If you did not yet use git to get the sources I 
> suggest you do that now (you will need it anyway if you plan to contribute 
> more), then it will be easy to produce a patch.
> 
> You might have seen the thread "Compiling with Microsoft Visual C++", where 
> racoon has trouble to build with MSVC 2015. Maybe you have an idea how for 
> troubleshooting?
> 
> 
> Georg
> 

+1 to all what Georg said

Kornel


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


Re: Joining LyX development team

2016-06-25 Thread Georg Baum
Hi Dima,

welcome from me as well! We can always need some helping hands, and as you 
might have found out already especially windows build procedure needs help.

Dima Ruinskiy wrote:

> Richard Heck  lyx.org> writes:
> 
>> Is there something specific you'd like to work on?
>> 
> Nothing specific, except maybe focus on Windows-specific issues. So far
> the only thing I did was modify the CMake configuration a bit to make
> 2.2.0 work on Vista again. See discussion here:
> http://www.lyx.org/trac/ticket/10186
> 
> I'd like to see it make into an official build eventually, instead of just
> being a private patch / separate release.

That would be great! Could you provide your modifications as a patch please? 
I read your description in text form, but having a patch ensures that there 
are no misunderstandings. If you did not yet use git to get the sources I 
suggest you do that now (you will need it anyway if you plan to contribute 
more), then it will be easy to produce a patch.

You might have seen the thread "Compiling with Microsoft Visual C++", where 
racoon has trouble to build with MSVC 2015. Maybe you have an idea how for 
troubleshooting?


Georg




Re: new LyX 2.2.0 installer for Windows Vista is available

2016-06-25 Thread Georg Baum
Jean-Marc Lasgouttes wrote:

> I am not completely sure why we are having this surreal discussion. Uwe,
> what is wrong with the following?
> 1/ Dima provides a patch that makes a Vista compatible build
> 2/ Kornel checks that the cmake part good enough for inclusion
> 3/ Uwe does his usual builds using this new code (the build are still OK
> on modern windows, right?)
> 4/ Dima gets to check the binaries before we distribute it

I would like to see this procedure.


Georg



Re: Compiling with Microsoft Visual C++

2016-06-25 Thread Georg Baum
racoon wrote:

> Thanks for the sustained support!

You are welcome! I do it because building LyX on windows should be as easy 
as it is on unix. Unfortunately this is not yet the case, and your help in 
trying out different tests is appreciated as well.

> On 21.06.2016 22:02, Georg Baum wrote:
>> The standalone SDK should be installed below C:\Program Files\Microsoft
>> SDKs\ or C:\Program Files (x86)\Windows Kits\. If there is nothing below
>> one of these folders then it is probably not installed.
> 
> Have the C:\Program Files (x86)\Windows Kits\ folder with content.
> 
>> Unfortunately the SDK stuff is quite confusing. Sometimes the SDK is
>> included with MSVC, sometimes you need a standalone version. After some
>> googling it looks like MSVC 2015 comes with a newer SDK that should be
>> used, but the installion is optional. Some more things you could try:
>>
>> - Make sure the MSVC included SDK is installed, as described at
>> http://stackoverflow.com/questions/31619296/cmake-does-not-find-visual-c-compiler.
>> Then create the MSVC project files with cmake again.
> 
> Tried (but also had the cl.exe before). Did not help.
> 
>> - In contrast to my earlier advice, select MSVC 2010 in cmake as
>> generator, and have MSVC convert the projects during loading (this would
>> help in case there is a MSVC 2015 related bug in cmake).
> 
> Still same error.

Sorry, then I am out of ides for now. Kornel sent a message in another 
thread pointing to 
http://comments.gmane.org/gmane.comp.programming.tools.cmake.user/55645. Did 
you see it? Maybe asking on the cmake list gets some usable answers.

You could also send me (privately please) the file C:\Program Files 
(x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\Win32\PlatformToolsets\v140\Toolset.targets,
 
maybe I have then an idea about possible causes for the error message you 
are seeing.


Georg



Re: Joining LyX development team

2016-06-25 Thread Guillaume Munch

Le 25/06/2016 12:53, Jean-Marc Lasgouttes a écrit :

Le 25/06/2016 10:53, Uwe Stöhr a écrit :

Am 24.06.2016 um 08:43 schrieb Dima Ruinskiy:


Hi. My name is Dima Ruinskiy, and I would like to join the LyX
development team.


Hi Dima, welcome on lyx-devel!


same




For the others on this list: Dima volunteered to help LyX with compiling
it on Windows, provide support for Win Vista builds (which I cannot do),
to have a look at the Hebrew translation and therefore also to
right-to-left (a.k.a. BiDi writing).


I have to warn that the Bidi code is a bit scary an overly complicated.
I have made some changes in 2.2 that touch Bidi and probably introduced
bugs there...




It would surely not hurt to have somebody who knows how it should be in
the first place.

My advice in general is to start with something that you think is easy
to fix and that bothers you personally. More ambitious yet realistic
changes come naturally after being acquainted with the code.


Guillaume




Re: new LyX 2.2.0 installer for Windows Vista is available

2016-06-25 Thread Jean-Marc Lasgouttes

Le 25/06/2016 16:45, Richard Heck a écrit :

There is a discussion about this topic in the bug tracker that I
cannot understand. Scott and Richard are concerned that Dima'S build
contains malware. This is not fair. Dima invested some spare time to
fiddle around with Qt to prepare a Vista build and to test it. To
presume that a new contributor is not trustworthy is not the way we
should welcome new people!


This is a complete misunderstanding of what Scott and I were saying. We
think that our officially releasing a LyX binary on the LyX website,
especially one signed with the LyX key, means that we are making certain
sorts of guarantees to people. We cannot make those guarantees if the
binary has been built by someone we do not at all know.


I am not completely sure why we are having this surreal discussion. Uwe, 
what is wrong with the following?

1/ Dima provides a patch that makes a Vista compatible build
2/ Kornel checks that the cmake part good enough for inclusion
3/ Uwe does his usual builds using this new code (the build are still OK 
on modern windows, right?)

4/ Dima gets to check the binaries before we distribute it

This is not rocket science, is it? Why make it so dramatic?

JMarc

PS: BTW, did we drop XP support already?




Re: new LyX 2.2.0 installer for Windows Vista is available

2016-06-25 Thread Richard Heck
On 06/25/2016 05:13 AM, Uwe Stöhr wrote:
> Dear LyXers,
>
> there is a new Windows installer available that provides support for
> Windows Vista:
> http://ftp.lyx.de/LyX%202.2.0/LyX-220-Installer-Vista-3.exe
>
> Dima kindly prepared the binary from the 2.2.0 tarball, I checked it
> against viruses and malware using commercial antivirus software, I
> created the installer with it and Dima tested that everything works
> fine on Vista.
>
> Richard, could you please put it on ftp.lyx.org? Could you please also
> write a news message that we now have a Vista installer but that this
> installer should not be used for other Windows versions than Vista.
>
> ---
>
> There is a discussion about this topic in the bug tracker that I
> cannot understand. Scott and Richard are concerned that Dima'S build
> contains malware. This is not fair. Dima invested some spare time to
> fiddle around with Qt to prepare a Vista build and to test it. To
> presume that a new contributor is not trustworthy is not the way we
> should welcome new people!

This is a complete misunderstanding of what Scott and I were saying. We
think that our officially releasing a LyX binary on the LyX website,
especially one signed with the LyX key, means that we are making certain
sorts of guarantees to people. We cannot make those guarantees if the
binary has been built by someone we do not at all know.

People don't even get commit rights until they've submitted a number of
patches and proved themselves capable.

> I checked Dima's build wit the anti-virus software at work (the
> installer only contains the lyx.exe and tex2lyx.exe from Dima, all
> other LyX files are identic with the other installers I released for
> 2.2.0.
> However, in general, if we don't trust new people investing their
> spare time, we will be lost. To dramatize: Some of you have never seen
> me, nobody knows my build system and could cross-check if I don't add
> spyware to the Win installers. So you have to trust me too.

You have been around here rather a long time.

> Thus please keep use welcome new people and encouraging to join the
> LyX developer team. LyX need manpower and I am happy about every new
> developer. We also need people developing on Windows.

Obviously. No one is saying we should not encourage Dima to submit
patches and ultimately gain commit rights. This is an entirely different
issue.

Richard



Re: Joining LyX development team

2016-06-25 Thread Jean-Marc Lasgouttes

Le 25/06/2016 10:53, Uwe Stöhr a écrit :

Am 24.06.2016 um 08:43 schrieb Dima Ruinskiy:


Hi. My name is Dima Ruinskiy, and I would like to join the LyX
development team.


Hi Dima, welcome on lyx-devel!


For the others on this list: Dima volunteered to help LyX with compiling
it on Windows, provide support for Win Vista builds (which I cannot do),
to have a look at the Hebrew translation and therefore also to
right-to-left (a.k.a. BiDi writing).


I have to warn that the Bidi code is a bit scary an overly complicated. 
I have made some changes in 2.2 that touch Bidi and probably introduced 
bugs there...


JMarc


Re: [LyX/master] Change \it to \mathit in Math.lyx

2016-06-25 Thread Enrico Forestieri
On Sat, Jun 25, 2016 at 10:23:57AM +0200, Scott Kostyshak wrote:

> commit 3f9335548872c028fcc6eea9997040c500683b19
> Author: Scott Kostyshak 
> Date:   Sat Jun 25 03:26:16 2016 -0400
> 
> Change \it to \mathit in Math.lyx
> 
> On TeX Live 2016, Math.lyx gives an error when compiling with
> pdflatex. On TeX Live 2015, Math.lyx compiles but the log gives the
> following warning:
> 
>   Usage of deprecated font command `\it'!

Note that this is the output produced by maxima, which does use \it
instead of \mathit. Moreover, the formula is wrong as log(-1) should
really be log(4).

> This commit amends 67e45aa3.
> ---
>  lib/doc/Math.lyx |2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/lib/doc/Math.lyx b/lib/doc/Math.lyx
> index e60a960..4b37933 100644
> --- a/lib/doc/Math.lyx
> +++ b/lib/doc/Math.lyx
> @@ -34254,7 +34254,7 @@ One can also use standard commands known to CAS:
>  \begin_layout Itemize
>  
>  \change_inserted 5863208 1465782942
> -\begin_inset Formula 
> $powerseries\left(-\log\left(5-x\right),x,1\right)=\sum_{{\it 
> i_{1}}=0}^{\infty}{\frac{4^{-{\it i_{1}}-1}\,\left(x-1\right)^{{\it 
> i_{1}}+1}}{{\it i_{1}}+1}}-\log\left(-1\right)$
> +\begin_inset Formula 
> $powerseries\left(-\log\left(5-x\right),x,1\right)=\sum_{{\mathit 
> i_{1}}=0}^{\infty}{\frac{4^{-{\mathit i_{1}}-1}\,\left(x-1\right)^{{\mathit 
> i_{1}}+1}}{{\mathit i_{1}}+1}}-\log\left(-1\right)$
>  \end_inset
>  
>  

-- 
Enrico


Re: Combo Box for Custom Insets

2016-06-25 Thread Jean-Marc Lasgouttes
That means that we probably shouldn't use a x but a kind of menu, maybe 
attached to an icon

JMarc 

Le 25 juin 2016 08:58:57 GMT+02:00, Liviu Andronic  a écrit :
>On Sat, Jun 25, 2016 at 12:23 AM, Richard Heck  wrote:
>Looks good. Couple of comments:
>- since unlike styles we don't always have a "default" chunk, probably
>the first item in the list should be something like: Inset>. This will also make the UI more intuitive.



Re: #10206: Problem installing Lyx 2.2

2016-06-25 Thread Jürgen Spitzmüller
Am Samstag, den 25.06.2016, 11:15 +0200 schrieb Uwe Stöhr:
> I am wondering that you take this personally.

Then think twice.

Jürgen

> 
> regards Uwe


Re: #10206: Problem installing Lyx 2.2

2016-06-25 Thread Uwe Stöhr

Am 25.06.2016 um 11:01 schrieb Jürgen Spitzmüller:

Am Samstag, den 25.06.2016, 10:59 +0200 schrieb Uwe Stöhr:

;-) This was no offense to you.


It was an offense to everybody working hard in academia. Decorating it
with a smiley afterwards does not make it better. Think twice before
you post such nonsense.


Come on, it was an offense to Paul who blamed me that my installer 
stopped him from being productive since he is so busy.


I am wondering that you take this personally.

regards Uwe


new LyX 2.2.0 installer for Windows Vista is available

2016-06-25 Thread Uwe Stöhr

Dear LyXers,

there is a new Windows installer available that provides support for 
Windows Vista:

http://ftp.lyx.de/LyX%202.2.0/LyX-220-Installer-Vista-3.exe

Dima kindly prepared the binary from the 2.2.0 tarball, I checked it 
against viruses and malware using commercial antivirus software, I 
created the installer with it and Dima tested that everything works fine 
on Vista.


Richard, could you please put it on ftp.lyx.org? Could you please also 
write a news message that we now have a Vista installer but that this 
installer should not be used for other Windows versions than Vista.


---

There is a discussion about this topic in the bug tracker that I cannot 
understand. Scott and Richard are concerned that Dima'S build contains 
malware. This is not fair. Dima invested some spare time to fiddle 
around with Qt to prepare a Vista build and to test it. To presume that 
a new contributor is not trustworthy is not the way we should welcome 
new people!
I checked Dima's build wit the anti-virus software at work (the 
installer only contains the lyx.exe and tex2lyx.exe from Dima, all other 
LyX files are identic with the other installers I released for 2.2.0.
However, in general, if we don't trust new people investing their spare 
time, we will be lost. To dramatize: Some of you have never seen me, 
nobody knows my build system and could cross-check if I don't add 
spyware to the Win installers. So you have to trust me too.


Thus please keep use welcome new people and encouraging to join the LyX 
developer team. LyX need manpower and I am happy about every new 
developer. We also need people developing on Windows.


many thanks and regards
Uwe


Re: #10206: Problem installing Lyx 2.2

2016-06-25 Thread Jürgen Spitzmüller
Am Samstag, den 25.06.2016, 10:59 +0200 schrieb Uwe Stöhr:
> ;-) This was no offense to you.

It was an offense to everybody working hard in academia. Decorating it
with a smiley afterwards does not make it better. Think twice before
you post such nonsense.

Jürgen


Re: #10206: Problem installing Lyx 2.2

2016-06-25 Thread Uwe Stöhr

Am 25.06.2016 um 10:38 schrieb Jürgen Spitzmüller:


Are you joking, you are at a university. When you will leave it for
a job you will find out what busy means.


It does not help to counter ignorance with ignorance. Ah well ...


;-) This was no offense to you.

Btw. I still cannot reproduce what the people report about MiKTeX 64 
bit. It works well on my test machines. Maybe it was only a bug in 
MiKTeX that has been fixed in the meantime.


regards Uwe


Re: [LyX/master] Change \it to \mathit in Math.lyx

2016-06-25 Thread Uwe Stöhr

Am 25.06.2016 um 10:23 schrieb Scott Kostyshak:


commit 3f9335548872c028fcc6eea9997040c500683b19

Change \it to \mathit in Math.lyx


Hello Scott,

please do such changes for all languages of Math.lyx: French, Spanish, 
German, Japanese, English


thanks and regards
Uwe


Re: Joining LyX development team

2016-06-25 Thread Uwe Stöhr

Am 24.06.2016 um 08:43 schrieb Dima Ruinskiy:


Hi. My name is Dima Ruinskiy, and I would like to join the LyX development team.

I hereby permit to use my contributions to LyX under the license of the GPL
version 2 or later.


Hello Dima,

welcome on board!

For the others on this list: Dima volunteered to help LyX with compiling 
it on Windows, provide support for Win Vista builds (which I cannot do), 
to have a look at the Hebrew translation and therefore also to 
right-to-left (a.k.a. BiDi writing).


Dima, while we are at it, There are some open BiDi bugs in LyX:

http://www.lyx.org/trac/query?status=accepted&status=assigned&status=new&status=reopened&summary=~&component=BiDi+Support&description=~&reporter=~&col=id&col=summary&col=reporter&col=status&col=type&col=severity&col=keywords&desc=1&order=id

Maybe you can fix one or two of it if you like. This would help LyX and 
you would be more familiar with lyX's code structure.
In my opinion LyX has a high potential in the Arabic-, Hebrew- and 
Persian-speaking world but our BiDi support could be better. For Arabic 
we need some more translations. Maybe you know anybody who wants to help 
LyX with e.g. Arabic translation?


Don't get me wrong, of course you can work on whatever you like. It was 
just a pointer of a possible start. Since you are an experiences LyX 
users you surely have found your own corner cases in which you might 
improve LyX.


best regards
Uwe


Re: #10206: Problem installing Lyx 2.2

2016-06-25 Thread Jürgen Spitzmüller
Am Donnerstag, den 09.06.2016, 03:29 +0200 schrieb Uwe Stöhr:
> Are you joking, you are at a university. When you will leave it for
> a 
> job you will find out what busy means.

It does not help to counter ignorance with ignorance. Ah well ... 

Jürgen

> 
> regards Uwe


Re: Annoying terminal messages: QXcbClipboard: SelectionRequest too old

2016-06-25 Thread Jürgen Spitzmüller
Am Donnerstag, den 23.06.2016, 21:43 -0400 schrieb Scott Kostyshak:
> Jürgen, any idea?

No.

Jürgen