Re: Delay when closing LyX

2016-07-12 Thread Scott Kostyshak
On Mon, Jul 11, 2016 at 11:51:27AM +0100, Jean-Pierre Chrétien wrote:
> Hello,
> 
> Since 2.2.0, I get this message in the calling command window when I close LyX
> 
> QClipboard: Unable to receive an event from the clipboard manager in a
> reasonable time
> 
> It takes about 10 seconds to get the message and regain control in the
> command window if LyX des not run in background.
> 
> Debian Jessie, Qt 4.8

Hi,

Are you using a clipboard manager? If so, the issue could be related to:
https://www.mail-archive.com/search?l=mid=20160606012806.ukuvpcpckt4bgwkp%40OptiPlex-9020
I don't recommend you spending the time to read that thread. In summary,
Enrico just recently committed an improvement to master. Perhaps the
problem is solved now for you? The commit was at
cb0c881b0298ef6c54e0cc57dc6f2ef46716c7aa

If you do not use a clipboard manager, then I'm not sure what the
problem could be. You could consider trying to use Qt 5. That might
cause the problem to magically disappear.

Scott


signature.asc
Description: PGP signature


Re: [LyX/2.2.x] UI for save_transient_properties

2016-07-12 Thread Uwe Stöhr

Am 13.07.2016 um 01:30 schrieb Richard Heck:


Therefore please revert the renaming and use change tracking to
describe the new document settings option.


This was discussed on the list, and no one objected,


I hereby object. I am fine with the new feature as it was approved and 
with a description in the UserGuide I will get the docs in shape for 
2.2.1 but I am against the renaming. This is then very misleading. I 
don't see a benefit but the opposite.


regards Uwe



Re: [LyX/2.2.x] UI for save_transient_properties

2016-07-12 Thread Richard Heck
On 07/12/2016 07:07 PM, Uwe Stöhr wrote:
> Am 12.07.2016 um 15:56 schrieb Guillaume Munch:
>
>> Add a new checkbox "Save transient properties" to the "Output"
>> panel in the
>> document properties dialog (now renamed as "Format").
>
> Why was this change allowed for 2.2.1? Richard just asked the
> translators to do their work and now you are renaming and adding even
> a new feature.

I approved this. It was discusssed for a very long time, and it seemed
worth having it in 2.2.1. I'm guessing 2.2.2 may take rather longer, and
this is a feature many people who use version control really need.
Regarding the translations, I had meant to remerge strings immediately
after the commit but forgot.

> There is also no description of what this option does in the UserGuide
> section B.

This can be added.

> I could not follow the development the last days but I am opposed in
> renaming the document setting section "Output" to "Format". This
> section is about the output as the UserGuides also explains well:
>
> "Here you can define some output specifics for the current document:..."
> * Default Output Format:
> * Synchronize with Output
> * XHTML Output Options
>
> Therefore please revert the renaming and use change tracking to
> describe the new document settings option.

This was discussed on the list, and no one objected, so far as I'm
aware. It's difficult to know where to put this option, and the Output
pane is a bit of grab-bag.

Richard



Re: [LyX/master] Add missing dlls

2016-07-12 Thread Uwe Stöhr

Am 12.07.2016 um 22:49 schrieb Kornel Benko:


I don't get it. To my understanding of cmake code:
1.) The target 'LyX' creates (and should) onlyx LyX.exe
2.) The target 'package' should create a .zip file
3.) The target 'install' should  install also Qt5 dlls to 
C:\LyX\lyx-23-build\LYX_INSTALLED\bin

Does each target have an equivalent solution like LyX.sln?


CMake creates a file
INSTALL.vcxproj
When opening this file there are 4 targets, see the attached screenshot.

CMake also creates a file LyX.sln with the same targets.


Is in the build dir anything like 'package.sln' or 'install.sln'?


No.

regards Uwe


Re: [LyX/master] Document new inverted branch insets in User Guide. Also add note to RELEASE_NOTES.

2016-07-12 Thread Pavel Sanda
Richard Heck wrote:
> commit e57889ff2f38ed8e804a7e3c7e62114e31bf7715
> Author: Richard Heck 
> Date:   Tue Jul 12 00:20:27 2016 -0400
> 
> Document new inverted branch insets in User Guide. Also add note to
> RELEASE_NOTES.

https://wiki.lyx.org/LyX/NewInLyX23 :)


Re: [LyX/2.2.x] status.22x

2016-07-12 Thread Pavel Sanda
Guillaume Munch wrote:
> commit ffec1b5169646d5485844a5d524cae11a94ff89b
> Author: Guillaume Munch 
> Date:   Tue Jul 12 15:02:17 2016 +0100
> 
> status.22x
> ---
>  status.22x |4 
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/status.22x b/status.22x
> index 6681b7b..e3f539e 100644
> --- a/status.22x
> +++ b/status.22x
> @@ -16,6 +16,10 @@ What's new
>  
>  - Enable the use of LuaTeX for all polyglossia-supported languages.
>  
> +- New document parameter "Save transient properties" under Document 
> Properties >
> +  Format. (Output has been renamed into Format.) Disabling this option is 
> made
> +  to play nicer in collaborative settings. (bug 9841)
> +

Maybe paragraph into the official documentation explanainng clearly motivation
and mechanism should be added.

Pavel


Re: [LyX/2.2.x] UI for save_transient_properties

2016-07-12 Thread Uwe Stöhr

Am 12.07.2016 um 15:56 schrieb Guillaume Munch:


Add a new checkbox "Save transient properties" to the "Output" panel in the
document properties dialog (now renamed as "Format").


Why was this change allowed for 2.2.1? Richard just asked the 
translators to do their work and now you are renaming and adding even a 
new feature.
There is also no description of what this option does in the UserGuide 
section B.


I could not follow the development the last days but I am opposed in 
renaming the document setting section "Output" to "Format". This section 
is about the output as the UserGuides also explains well:


"Here you can define some output specifics for the current document:..."
* Default Output Format:
* Synchronize with Output
* XHTML Output Options

Therefore please revert the renaming and use change tracking to describe 
the new document settings option.


thanks and regards
Uwe


Re: Compiling with Microsoft Visual C++

2016-07-12 Thread Georg Baum
racoon wrote:

> On 11.07.2016 17:43, racoon wrote:
>>
>> If I provide just those CMake gives me an error:
>>
>> ---
>>
>> Make Error at CMakeLists.txt:601 (find_package):
>>   By not providing "FindQt5Core.cmake" in CMAKE_MODULE_PATH this project
>> has
>>   asked CMake to find a package configuration file provided by
>> "Qt5Core", but
>>   CMake did not find one.
>>
>>   Could not find a package configuration file provided by "Qt5Core" with
>> any
>>   of the following names:
>>
>> Qt5CoreConfig.cmake
>> qt5core-config.cmake
>>
>>   Add the installation prefix of "Qt5Core" to CMAKE_PREFIX_PATH or set
>>   "Qt5Core_DIR" to a directory containing one of the above files.  If
>>   "Qt5Core" provides a separate development package or SDK, be sure it
>>   has been installed.
>>
>> ---
>>
>> Only after adding the CMAKE_PREFIX_PATH
>>
>> C:/Qt/Qt5.6.1/5.6/msvc2015/
>>
>> I get rid of the error. (Maybe I it is because Qt is missing in my PATH
>> variable?)

Did you try whether adding C:/Qt/Qt5.6.1/5.6/msvc2015/bin to PATH fixes the 
problem even if CMAKE_PREFIX_PATH is empty? I ask because the current 
installation instructions ask to add the qt dir to PATH, and if that does 
not work we'll need to change them.

>> It still gives me some other. But maybe I don't need to worry about
>> these?
>>
>> ---
>>
>> Function magic_file not found
>> Function magic_open not found
>> Function magic_load not found
>> Function magic_close not found
>> Function magic_error not found
>> Could NOT find Magic (missing:  Magic_INCLUDE_DIR Magic_LIBRARY
>> HAS_MAGIC_FUNCTIONS)
>>   * Hunspell:
>>  - include: C:/LyX/lyx-23/3rdparty/hunspell/1.3.3/src
>>  - library: hunspell
>> Could NOT find ASPELL (missing:  ASPELL_LIBRARY ASPELL_INCLUDE_DIR)
>> ASPELL not found, building without ASPELL support
>> Could NOT find ENCHANT (missing:  ENCHANT_LIBRARY ENCHANT_INCLUDE_DIR)
>> ENCHANT not found, building without Enchant support
>> Building with USE_HUNSPELL

These are expected. All these libraries are optional, libmagic is for file 
type detection and the other ones for spelling. If libmagic is not found a 
builtin fallback is used, and for spelling you can either use aspell, 
enchant or hunspell, and the latter one is included in 3rdparty.


> Okay, after compiling INSTALL I copied the dependencies and Qt dlls. In
> addition to the ones mentioned in the INSTALL.Win32 I had to copy
> 
> Qt5Widgets(d).dll
> Qt5WinExtras(d).dll

I added these to INSTALL.Win32.

However, it would be better if the automatism provided by cmake to xopy the 
needed dlls into the install location would work. I guess that the reason 
why it did not work is the missing qt directory in PATH. It would be nice if 
you could try that out.


Georg



Re: Compiling with Microsoft Visual C++

2016-07-12 Thread Georg Baum
racoon wrote:

> On 11.07.2016 16:05, racoon wrote:
>>
>> Did click on "Build" (is that the same as compile?) from the context
>> menu of "LyX" in the Solution Explorer. And it compiled with no errors.

Yes I meant build (this is the MSVc terminology).

>> Pressed F5, got a message about outdated files. Choose "Yes" to build
>> them. Got an error message (attached).
> 
> I guess I have to set LyX as my startup project (in the Solution
> Explorer from the context menu of "LyX" choose "Set as StartUp
> Project"). Before "ALL_BUILD" was the startup project.

Yes, LyX should be the startup project.

> Okay. After pressing F5 I get an error message for a missing Qt library
> (attached) and LyX won't run...

This should be fixable as well by adding C:/Qt/Qt5.6.1/5.6/msvc2015/bin to 
the PATH.


Georg



Re: Compiling with Microsoft Visual C++

2016-07-12 Thread Georg Baum
Richard Heck wrote:

> If you're running LyX from a terminal, you should get some output
> explaining why reconfiguration is failing.

Unfortunately this is more complicated on windows than on other operating 
systems. An application is either a console application (with 
stdin/stdout/stderr and usually without GUI windows), or a GUI application 
(without stdin/stdout/stderr and usually with GUI windows). If you start a 
console application it will always open a terminal window, and this is the 
reason why one usually does not want this for an application that creates 
GUI windows.

See also the big comment in src/support/os_win32.cpp. By default, LyX is 
compiled as GUI app, meaning any stuff sent to stderr or stdout will vanish 
in a black hole, and nobody will ever see it. LyX can be compiled as a 
console app by calling cmake with CONSOLE=FORCE.


Georg




Re: Compiling with Microsoft Visual C++

2016-07-12 Thread Georg Baum
racoon wrote:

> On 12.07.2016 16:48, Richard Heck wrote:
>>
>> The python executable is not being found. Is it in your path? I would
>> guess that this is something the installer usually takes care of.
> 
> Thanks. The python path was actually not in my path variable.  Now it
> works. I don't know why these paths are not added by default...

Please don't forget that you are walking on new ground: To my knowledge, 
nobody did run LyX on windows without using the installer up to now. Even 
Uwe (who builds the windows executables since many years) creates all needed 
settings with the installer, and copies newly built executables into the 
installation for testing.

Therefore, the only place where the python executable could be put into the 
PATH would be when you run the python installer. IIRC it has an option to 
update PATH, which you can select or not.


Georg



Re: Compiling with Microsoft Visual C++

2016-07-12 Thread Georg Baum
racoon wrote:

> Final warnings I get are of the following form:
> 
> 3>  Generating LyX2.3.pot
> 3>CUSTOMBUILD : cygwin warning :
> 3>MS-DOS style path detected: C:/LyX/lyx-23-build/po/POTFILES.in
> 3>Preferred POSIX equivalent is:
> /cygdrive/c/LyX/lyx-23-build/po/POTFILES.in
> 3>CYGWIN environment variable option "nodosfilewarning" turns off
> this warning.
> 3>Consult the user's guide for more details about POSIX paths:
> 3>  http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
> 
> Since these are only warning, I am not sure whether I should bother.

You have a cygwin python in your PATH environment variable. This might work, 
but it would be more safe to put a native windows python into the path in 
front of the cygwin one.


Georg



Re: How to create a patch with git gui

2016-07-12 Thread Georg Baum
racoon wrote:

> On 12.07.2016 14:58, Stephan Witt wrote:
>>
>>> Am 12.07.2016 um 14:20 schrieb racoon :
>>>
>>> I really don't like the windows command line.

The native cmd.exe is indeed too limited. IMHO it does not matter whether 
you use git via a gui or from command line. This is to a high degree a 
matter of personal preferences.

>> You may consider using SourceTree from Atlassian.
>> I’m using it on Mac and it’s available for Windows too.
> 
> Thanks for the suggestion. I'll check it out.

AFAIK https://tortoisegit.org/ is a popular git gui client on windows.


Georg



Re: Compiling with Microsoft Visual C++

2016-07-12 Thread racoon

Final warnings I get are of the following form:

3>  Generating LyX2.3.pot
3>CUSTOMBUILD : cygwin warning :
3>MS-DOS style path detected: C:/LyX/lyx-23-build/po/POTFILES.in
3>Preferred POSIX equivalent is: 
/cygdrive/c/LyX/lyx-23-build/po/POTFILES.in
3>CYGWIN environment variable option "nodosfilewarning" turns off 
this warning.

3>Consult the user's guide for more details about POSIX paths:
3>  http://cygwin.com/cygwin-ug-net/using.html#using-pathnames

Since these are only warning, I am not sure whether I should bother.

Daniel



Re: Compiling with Microsoft Visual C++

2016-07-12 Thread racoon

On 12.07.2016 16:48, Richard Heck wrote:

On 07/12/2016 01:54 AM, Daniel wrote:

On 12.07.2016 00:16, Richard Heck wrote:

OK. Try opening the messages pane: View> Messages Pane. Then
reconfigure.


Okay. Here is the full log:

[snip]

07:53:18.990: Running configure...
07:53:19.039: The process failed to start. Either the invoked program
is missing, or you may have insufficient permissions to invoke the
program.
07:53:19.076: Reloading configuration...LyX: reconfiguring user directory
C:\LyX\lyx-23\src\support\Systemcall.cpp (260): Systemcall: 'python
-tt "C:/LyX/lyx-23/lib/configure.py"
--binary-dir="C:/LyX/lyx-23-build/LYX_INSTALLED/bin/"' did not start!
C:\LyX\lyx-23\src\support\Systemcall.cpp (261): error The process
failed to start. Either the invoked program is missing, or you may
have insufficient permissions to invoke the program.


The python executable is not being found. Is it in your path? I would
guess that this is something the installer usually takes care of.


Thanks. The python path was actually not in my path variable.  Now it 
works. I don't know why these paths are not added by default...


Daniel




Re: How to create a patch with git gui

2016-07-12 Thread racoon

On 12.07.2016 14:58, Stephan Witt wrote:



Am 12.07.2016 um 14:20 schrieb racoon :

On 12.07.2016 12:20, Guillaume Munch wrote:

[...] patches with detailed commit log are better.


What is a "commit log"?


Honestly, I think most people use git from the command line. It would be
easier for you to find guides on the internet and for us to help you. In
this case the command is git format-patch master (assuming you commit to
a separate branch which you should).


I really don't like the windows command line.


You may consider using SourceTree from Atlassian.
I’m using it on Mac and it’s available for Windows too.


Thanks for the suggestion. I'll check it out.

Daniel




Re: LyX Wiki Password?

2016-07-12 Thread Joel Kulesza
Sounds good, thanks.  I just wanted to make sure I wasn't stepping out of
turn.  Perhaps I boldly charged ahead (and read more clearly) last time.

On Tue, Jul 12, 2016 at 9:05 AM, Richard Heck  wrote:

> On 07/12/2016 10:34 AM, Joel Kulesza wrote:
> > LyX Developers:
> >
> > I previously posted some "walkthrough" steps about compiling hunspell
> > into LyX at https://wiki.lyx.org/Devel/Hunspell.  I wanted to edit it
> > to clarify something; however, now it is requesting a password.
> >
> > Is this a recent change?  Regardless, can I be granted access to
> > modify what I previously wrote (thinking the wiki was open to public
> > editing)?
>
> The password it wants is actually shown above the password dialog. This
> is just to prevent bots from spamming us.
>
> Richard
>
>


Re: LyX Wiki Password?

2016-07-12 Thread Richard Heck
On 07/12/2016 10:34 AM, Joel Kulesza wrote:
> LyX Developers:
>
> I previously posted some "walkthrough" steps about compiling hunspell
> into LyX at https://wiki.lyx.org/Devel/Hunspell.  I wanted to edit it
> to clarify something; however, now it is requesting a password. 
>
> Is this a recent change?  Regardless, can I be granted access to
> modify what I previously wrote (thinking the wiki was open to public
> editing)?

The password it wants is actually shown above the password dialog. This
is just to prevent bots from spamming us.

Richard



Re: How to create a patch with git gui

2016-07-12 Thread Richard Heck
On 07/12/2016 08:20 AM, racoon wrote:
> On 12.07.2016 12:20, Guillaume Munch wrote:
>> [...] patches with detailed commit log are better.
>
> What is a "commit log"?

He just means the message you write when you commit.

>
>> Honestly, I think most people use git from the command line. It would be
>> easier for you to find guides on the internet and for us to help you. In
>> this case the command is git format-patch master (assuming you commit to
>> a separate branch which you should).
>
> I really don't like the windows command line.

I'm not sure anyone does. You might try installing cygwin. Some info here
   
http://stackoverflow.com/questions/15692890/running-git-through-cygwin-from-windows
on using it with git.

It takes a bit of doing to get used to git. One piece of advice is:
create a new
branch for everything you do. Branches are cheap in git, easily merged,
etc. So
then you can easily keep everything separated. So you could make one branch
for the toolbar stuff and another for the icon stuff.

Richard



Re: [LyX/master] Document new inverted branch insets in User Guide. Also add note to RELEASE_NOTES.

2016-07-12 Thread Richard Heck
On 07/12/2016 05:31 AM, José Abílio Matos wrote:
> On Tuesday, July 12, 2016 6:20:38 AM WEST Richard Heck wrote:
>> commit e57889ff2f38ed8e804a7e3c7e62114e31bf7715
>> Author: Richard Heck 
>> Date:   Tue Jul 12 00:20:27 2016 -0400
>>
>> Document new inverted branch insets in User Guide. Also add note to
>> RELEASE_NOTES.
> Since we are at the begin of the development cycle I would like to propose 
> the addition of new tests for the lyx upgrade format with the purpose of 
> having the lyx2lyx format equal to the format the lyx reads and writes.

There was some discussion of this last cycle, too, and I think everyone
generally thinks it is a good idea. Exactly how to do it is less clear.
I had thought about having, for each format change, test files that
could be used to verify the forward and backward conversions for each
format, but you are right that checking what happens with the User Guide
(and for that matter our other documents) would be a good idea.

> So given this motivation the method that I propose is the following:
>
> In order to simplify the explanation let us take this file format as an 
> example (upgrade to file format 511).
>
> In order to improve the test stage we need to keep a version of the UserGuide 
> of the last stable version around, in this case, UserGuide-22.lyx.
>
> The test consists then on three steps:
>
> 1) lyx2lyx -o UserGuide-23.lyx  UserGuide-22.lyx
>
> 2) loads the resulting file UserGuide-23.lyx and forces write with lyx, 
> something like (I did not test the result):
>
> src/lyx -x 'command-sequence buffer-write-as UserGuide.lyx; lyx-quit' \ 
> UserGuide-23.lyx

This actually exposes a different bug: Since the export happens in the
background, we will immediately call lyx-quit. But we could fix that
bug, or else modify the call.

Richard



Re: Compiling with Microsoft Visual C++

2016-07-12 Thread Richard Heck
On 07/12/2016 01:54 AM, Daniel wrote:
> On 12.07.2016 00:16, Richard Heck wrote:
>> OK. Try opening the messages pane: View> Messages Pane. Then
>> reconfigure.
>
> Okay. Here is the full log:
>
> [snip]
>
> 07:53:18.990: Running configure...
> 07:53:19.039: The process failed to start. Either the invoked program
> is missing, or you may have insufficient permissions to invoke the
> program.
> 07:53:19.076: Reloading configuration...LyX: reconfiguring user directory
> C:\LyX\lyx-23\src\support\Systemcall.cpp (260): Systemcall: 'python
> -tt "C:/LyX/lyx-23/lib/configure.py"
> --binary-dir="C:/LyX/lyx-23-build/LYX_INSTALLED/bin/"' did not start!
> C:\LyX\lyx-23\src\support\Systemcall.cpp (261): error The process
> failed to start. Either the invoked program is missing, or you may
> have insufficient permissions to invoke the program.

The python executable is not being found. Is it in your path? I would
guess that this is something the installer usually takes care of.

Note that not finding python will cause all kinds of other problems, too.

Richard



LyX Wiki Password?

2016-07-12 Thread Joel Kulesza
LyX Developers:

I previously posted some "walkthrough" steps about compiling hunspell into
LyX at https://wiki.lyx.org/Devel/Hunspell.  I wanted to edit it to clarify
something; however, now it is requesting a password.

Is this a recent change?  Regardless, can I be granted access to modify
what I previously wrote (thinking the wiki was open to public editing)?

Thank you,
Joel


Re: How to create a patch with git gui

2016-07-12 Thread Stephan Witt

> Am 12.07.2016 um 14:20 schrieb racoon :
> 
> On 12.07.2016 12:20, Guillaume Munch wrote:
>> [...] patches with detailed commit log are better.
> 
> What is a "commit log"?
> 
>> Honestly, I think most people use git from the command line. It would be
>> easier for you to find guides on the internet and for us to help you. In
>> this case the command is git format-patch master (assuming you commit to
>> a separate branch which you should).
> 
> I really don't like the windows command line.

You may consider using SourceTree from Atlassian.
I’m using it on Mac and it’s available for Windows too.

Stephan



Re: toolbars Lock menu

2016-07-12 Thread racoon
I have attached a first attempt at implementing a toolbar lock. 
(Unfortunately, it is a bit intermingled with a lfun implementation for 
changing the icon-size.)


Toolbars can be (un)locked individually via the lfun command

toolbar-movable , e.g. toolbar-movable standard

Toolbars can be (un)locked altogether via the lfun command

toolbar-movable *

or via the menu

View > Toolbars > Lock Toolbars Positions

The toolbar's locked state is saved per toolbar via QSettings.

I save the state of "all toolbars locked" in an extra QSetting. But 
probably this would just better derived from the state of individual 
toolbars, i.e. Lock Toolbars Position is checked iff all toolbar 
positions are locked.


I must confess that I was not always 100% certain what I was doing. I am 
happy for any critical comments. :)


Daniel
diff --git a/src/FuncCode.h b/src/FuncCode.h
index 40ec9d3..36c5ea5 100644
--- a/src/FuncCode.h
+++ b/src/FuncCode.h
@@ -362,6 +362,8 @@ enum FuncCode
LFUN_LISTING_INSERT,// Herbert 2000, bpeng 20070502
// 275
LFUN_TOOLBAR_TOGGLE,// Edwin 20070521
+   LFUN_TOOLBAR_MOVABLE,   // Daniel, 20160712
+   LFUN_ICON_SIZE, // Daniel, 20160712
LFUN_BUFFER_WRITE_ALL,  // rgh, gpothier 200707XX
LFUN_PARAGRAPH_PARAMS,
LFUN_LAYOUT_MODULES_CLEAR,
diff --git a/src/LyXAction.cpp b/src/LyXAction.cpp
index 3702810..9594699 100644
--- a/src/LyXAction.cpp
+++ b/src/LyXAction.cpp
@@ -2728,6 +2728,26 @@ void LyXAction::init()
  */
{ LFUN_TOOLBAR_TOGGLE, "toolbar-toggle", NoBuffer, Buffer },
 /*!
+* \var lyx::FuncCode lyx::LFUN_TOOLBAR_MOVABLE
+* \li Action: Toggles movability of a given toolbar between true/false.
+* \li Syntax: toolbar-toggle 
+* \li Params: : standard|extra|table|math|mathmacrotemplate|\n
+minibuffer|review|view/update|math_panels|vcs|
+view-others|update-others
+* \li Origin: 11 July 2016
+* \endvar
+*/
+   { LFUN_TOOLBAR_MOVABLE, "toolbar-movable", NoBuffer, Buffer },
+/*!
+* \var lyx::FuncCode lyx::LFUN_ICON_SIZE
+* \li Action: Sets icon size of toolbars.
+* \li Syntax: icon-size 
+* \li Params: : int
+* \li Origin: 11 July 2016
+* \endvar
+*/
+   { LFUN_ICON_SIZE, "icon-size", NoBuffer, Buffer },
+/*!
  * \var lyx::FuncCode lyx::LFUN_MENU_OPEN
  * \li Action: Opens the menu given by its name.
  * \li Syntax: menu-open 
diff --git a/src/frontends/qt4/GuiToolbar.cpp b/src/frontends/qt4/GuiToolbar.cpp
index 77471c9..abba387 100644
--- a/src/frontends/qt4/GuiToolbar.cpp
+++ b/src/frontends/qt4/GuiToolbar.cpp
@@ -53,7 +53,7 @@ namespace lyx {
 namespace frontend {
 
 GuiToolbar::GuiToolbar(ToolbarInfo const & tbinfo, GuiView & owner)
-   : QToolBar(toqstr(tbinfo.gui_name), ), visibility_(0),
+   : QToolBar(toqstr(tbinfo.gui_name), ), visibility_(0), 
movability_(0),
  owner_(owner), command_buffer_(0), tbinfo_(tbinfo), filled_(false),
  restored_(false)
 {
@@ -61,8 +61,6 @@ GuiToolbar::GuiToolbar(ToolbarInfo const & tbinfo, GuiView & 
owner)
connect(, SIGNAL(iconSizeChanged(QSize)), this,
SLOT(setIconSize(QSize)));
 
-   // Toolbar dragging is allowed.
-   setMovable(true);
// This is used by QMainWindow::restoreState for proper main window 
state
// restauration.
setObjectName(toqstr(tbinfo.name));
@@ -110,6 +108,11 @@ void GuiToolbar::setVisibility(int visibility)
visibility_ = visibility;
 }
 
+void GuiToolbar::setMovability(bool movability)
+{
+   movability_ = movability;
+}
+
 
 Action * GuiToolbar::addItem(ToolbarItem const & item)
 {
@@ -358,6 +361,7 @@ void GuiToolbar::saveSession() const
 {
QSettings settings;
settings.setValue(sessionKey() + "/visibility", visibility_);
+   settings.setValue(sessionKey() + "/movability", movability_);
 }
 
 
@@ -374,6 +378,12 @@ void GuiToolbar::restoreSession()

guiApp->toolbars().defaultVisibility(fromqstr(objectName()));
}
setVisibility(visibility);
+
+   // restore movability
+   bool movability =
+   settings.value(sessionKey() + "/movability", false).toBool();
+   setMovability(movability);
+   setMovable(movability);
 }
 
 
@@ -409,6 +419,20 @@ void GuiToolbar::toggle()
qstring_to_ucs4(windowTitle()), state));
 }
 
+void GuiToolbar::movable()
+{
+   setMovability(!isMovable());
+   setMovable(!isMovable());
+   docstring state;
+   if (isMovable()) {
+   state = _("movable");
+   } else {
+   state = _("immovable");
+   }
+   owner_.message(bformat(_("Toolbar \"%1$s\" state set to %2$s"),
+   qstring_to_ucs4(windowTitle()), state));
+}
+
 } // namespace frontend
 } // namespace lyx
 
diff --git a/s

Re: How to create a patch with git gui

2016-07-12 Thread racoon

On 12.07.2016 12:20, Guillaume Munch wrote:

[...] patches with detailed commit log are better.


What is a "commit log"?


Honestly, I think most people use git from the command line. It would be
easier for you to find guides on the internet and for us to help you. In
this case the command is git format-patch master (assuming you commit to
a separate branch which you should).


I really don't like the windows command line.


Also, playing around with LFUNs I did to kinds of changes in the patch

1) a LFUN for locking the position of toolbars
2) a LFUN for setting custom icon sizes

Since they are unrelated, I guess it would be good to keep them in
patches apart, right?


Yes, please


I'll try to figure that out next when time permits.

Daniel



Re: How to create a patch with git gui

2016-07-12 Thread Guillaume Munch

Le 12/07/2016 07:11, Daniel a écrit :

Thanks. I think it worked (patch and screenshot of gitk attached).

On 12.07.2016 00:10, Richard Heck wrote:

[...] Then right-click on the commit for which you want to
make the patch.
You will have the option "Make patch". Choose that and then choose where
to save it.


Should I try to commit the patch before making the patch?


Yes, and patches with detailed commit log are better.

Honestly, I think most people use git from the command line. It would be 
easier for you to find guides on the internet and for us to help you. In 
this case the command is git format-patch master (assuming you commit to 
a separate branch which you should).




Also, playing around with LFUNs I did to kinds of changes in the patch

1) a LFUN for locking the position of toolbars
2) a LFUN for setting custom icon sizes

Since they are unrelated, I guess it would be good to keep them in
patches apart, right?


Yes, please



But I can't find where to tell gitk to add only parts of the "local"
changes.



From the command line again, you can commit files separately (git 
commit file1 file2 ...) or you can select changes more precisely (git 
commit --patch).





Re: [LyX/master] Document new inverted branch insets in User Guide. Also add note to RELEASE_NOTES.

2016-07-12 Thread José Abílio Matos
On Tuesday, July 12, 2016 6:20:38 AM WEST Richard Heck wrote:
> commit e57889ff2f38ed8e804a7e3c7e62114e31bf7715
> Author: Richard Heck 
> Date:   Tue Jul 12 00:20:27 2016 -0400
> 
> Document new inverted branch insets in User Guide. Also add note to
> RELEASE_NOTES.

Since we are at the begin of the development cycle I would like to propose the 
addition of new tests for the lyx upgrade format with the purpose of having 
the lyx2lyx format equal to the format the lyx reads and writes.

My main motivation comes from this bug:
lyx2lyx roundtrip fails with templates/IEEEtran-Journal.lyx
http://www.lyx.org/trac/ticket/9909

Honestly I am not sure if we should spend more time with bug and if we should 
get the lessons from it to improve the convertion to future formats.

In short the problem occurs applying iteratively a convertion to file written 
by lyx on older version. In the case of this bug we have:

lyx -e lyx16 IEEEtran-Journal.lyx

LyX loads the original file and uses lyx2lyx to converted it to 1.6 format.

Then it becomes the funny part:

lyx -e lyx16 IEEEtran-Journal.16.lyx

there are 3 steps here:

1) lyx loads the IEEEtran-Journal.16.lyx file and notices that it is in an 
older and (politely) requests lyx2lyx to convert to the only format it 
understands;

2) lyx loads the file converted by lyx2lyx and creates a temporary file, let 
us call it for convenience IEEEtran-Journal.22.lyx ;

3) lyx asks again politely to lyx2lyx to convert the IEEEtran-Journal.22.lyx 
file to IEEEtran-Journal.16.16.lyx;

So effectively we are testing a roundtrip conversion here with 3 steps.

One possible solution here would be for lyx to recognise lyx?? as a special 
format and to pass it the original file. In this case lyx2lyx understands that 
the initial and the final formats are the same and it says that there is 
nothing to be done.
This option is correct but it does not fix the underlying problem with the 
file format convertion.


So given this motivation the method that I propose is the following:

In order to simplify the explanation let us take this file format as an 
example (upgrade to file format 511).

In order to improve the test stage we need to keep a version of the UserGuide 
of the last stable version around, in this case, UserGuide-22.lyx.

The test consists then on three steps:

1) lyx2lyx -o UserGuide-23.lyx  UserGuide-22.lyx

2) loads the resulting file UserGuide-23.lyx and forces write with lyx, 
something like (I did not test the result):

src/lyx -x 'command-sequence buffer-write-as UserGuide.lyx; lyx-quit' \ 
UserGuide-23.lyx

3) compare the diff of UserGuide-23.lyx and UserGuide.lyx to insure that it is 
empty.


As an example I noticed that either in my tests or in this patch we get:

diff --git a/lib/doc/UserGuide.lyx b/lib/doc/UserGuide.lyx
index 23b126b..7bb603f 100644
--- a/lib/doc/UserGuide.lyx
+++ b/lib/doc/UserGuide.lyx
@@ -1,5 +1,5 @@
-#LyX 2.2 created this file. For more info see http://www.lyx.org/
-\lyxformat 508
+#LyX 2.3 created this file. For more info see http://www.lyx.org/
+\lyxformat 511
 \begin_document
 \begin_header
 \save_transient_properties true
@@ -68,6 +68,7 @@ enumitem
 \font_osf false
 \font_sf_scale 100 100
 \font_tt_scale 100 100
+\use_microtype false
 \graphics default
 \default_output_format pdf2
 \output_sync 0
@@ -134,11 +135,12 @@ enumitem
 \papercolumns 1
 \papersides 2
 \paperpagestyle default
-\tracking_changes false
+\tracking_changes true
 \output_changes false
 \html_math_output 0
 \html_css_as_file 0
 \html_be_strict true
+\author 424524441 "rgheck"
 \end_header
...

This is OK.

...
@@ -8310,14 +8312,12 @@ Verbatim
 \end_layout
 
 \begin_layout Verbatim
-
 This is Verbatim.
 \end_layout
 
 \begin_layout Verbatim
 \noindent
 \align block
-
 The following 2 lines are empty:
 \end_layout
...

This is not OK. Why is lyx deleting an empty line? It should not, or then 
lyx2lyx should not add it. If we read the development/FORMATS file there is 
none there that relates to this change.

Note that although I am using the convertion 510->511 as an example this 
problem occured before so it was no introduced with this patch.

Note also that in this case the change is harmless since in most cases neither 
lyx or lyx2lyx care about empty lines near the begin_layout.

The point is that we can only or less guarantee a good reversion process if 
the forward upgrade is perfect.

What do you think?

Regards,
-- 
José Abílio


Re: [LyX/master] We do not need to enter the format numbers for 2.3 at this time. The code just below fills thiss automatically.

2016-07-12 Thread José Abílio Matos
On Tuesday, July 12, 2016 4:49:21 AM WEST Richard Heck wrote:
> commit ed87044d91e39daf2c079ba4582603add299d667
> Author: Richard Heck 
> Date:   Mon Jul 11 22:48:04 2016 -0400
> 
> We do not need to enter the format numbers for 2.3 at this time.
> The code just below fills thiss automatically.

True. But it gets even better than that. If you need to output to the latest 
development format directly from lyx2lyx it is enough to call it as:

lyx2lyx -V 2.3 -o output_file.lyx input_file.lyx

or even easier

lyx2lyx -o output_file.lyx input_file.lyx

since if it is not passed lyx2lyx always assumes the last supported format as 
the final destination.

-- 
José Abílio


Re: How to create a patch with git gui

2016-07-12 Thread Daniel

Thanks. I think it worked (patch and screenshot of gitk attached).

On 12.07.2016 00:10, Richard Heck wrote:

[...] Then right-click on the commit for which you want to
make the patch.
You will have the option "Make patch". Choose that and then choose where
to save it.


Should I try to commit the patch before making the patch?

Also, playing around with LFUNs I did to kinds of changes in the patch

1) a LFUN for locking the position of toolbars
2) a LFUN for setting custom icon sizes

Since they are unrelated, I guess it would be good to keep them in 
patches apart, right?


But I can't find where to tell gitk to add only parts of the "local" 
changes.


Daniel
diff --git a/src/FuncCode.h b/src/FuncCode.h
index 40ec9d3..3404a0c 100644
--- a/src/FuncCode.h
+++ b/src/FuncCode.h
@@ -362,6 +362,8 @@ enum FuncCode
LFUN_LISTING_INSERT,// Herbert 2000, bpeng 20070502
// 275
LFUN_TOOLBAR_TOGGLE,// Edwin 20070521
+   LFUN_TOOLBAR_MOVABLE,   // 20160711
+   LFUN_ICON_SIZE, // 20160711
LFUN_BUFFER_WRITE_ALL,  // rgh, gpothier 200707XX
LFUN_PARAGRAPH_PARAMS,
LFUN_LAYOUT_MODULES_CLEAR,
diff --git a/src/LyXAction.cpp b/src/LyXAction.cpp
index 3702810..9594699 100644
--- a/src/LyXAction.cpp
+++ b/src/LyXAction.cpp
@@ -2728,6 +2728,26 @@ void LyXAction::init()
  */
{ LFUN_TOOLBAR_TOGGLE, "toolbar-toggle", NoBuffer, Buffer },
 /*!
+* \var lyx::FuncCode lyx::LFUN_TOOLBAR_MOVABLE
+* \li Action: Toggles movability of a given toolbar between true/false.
+* \li Syntax: toolbar-toggle 
+* \li Params: : standard|extra|table|math|mathmacrotemplate|\n
+minibuffer|review|view/update|math_panels|vcs|
+view-others|update-others
+* \li Origin: 11 July 2016
+* \endvar
+*/
+   { LFUN_TOOLBAR_MOVABLE, "toolbar-movable", NoBuffer, Buffer },
+/*!
+* \var lyx::FuncCode lyx::LFUN_ICON_SIZE
+* \li Action: Sets icon size of toolbars.
+* \li Syntax: icon-size 
+* \li Params: : int
+* \li Origin: 11 July 2016
+* \endvar
+*/
+   { LFUN_ICON_SIZE, "icon-size", NoBuffer, Buffer },
+/*!
  * \var lyx::FuncCode lyx::LFUN_MENU_OPEN
  * \li Action: Opens the menu given by its name.
  * \li Syntax: menu-open 
diff --git a/src/frontends/qt4/GuiToolbar.cpp b/src/frontends/qt4/GuiToolbar.cpp
index 77471c9..f9c8167 100644
--- a/src/frontends/qt4/GuiToolbar.cpp
+++ b/src/frontends/qt4/GuiToolbar.cpp
@@ -409,6 +409,16 @@ void GuiToolbar::toggle()
qstring_to_ucs4(windowTitle()), state));
 }
 
+void GuiToolbar::movable()
+{
+   setMovable(!isMovable());
+
+   docstring state = _("test");
+
+   owner_.message(bformat(_("Toolbar \"%1$s\" state set to %2$s"),
+   qstring_to_ucs4(windowTitle()), state));
+}
+
 } // namespace frontend
 } // namespace lyx
 
diff --git a/src/frontends/qt4/GuiToolbar.h b/src/frontends/qt4/GuiToolbar.h
index caad355..ded027a 100644
--- a/src/frontends/qt4/GuiToolbar.h
+++ b/src/frontends/qt4/GuiToolbar.h
@@ -98,6 +98,9 @@ public:
void toggle();
 
///
+   void movable();
+
+   ///
GuiCommandBuffer * commandBuffer() { return command_buffer_; }
 
///
diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp
index b94625b..3504b7e 100644
--- a/src/frontends/qt4/GuiView.cpp
+++ b/src/frontends/qt4/GuiView.cpp
@@ -731,14 +731,14 @@ bool GuiView::restoreLayout()
//code below is skipped when when ~/.config/LyX is (re)created
QSize icon_size = settings.value(icon_key).toSize();
// Check whether session size changed.
-   if (icon_size.width() != int(d.smallIconSize) &&
+   /*if (icon_size.width() != int(d.smallIconSize) &&
icon_size.width() != int(d.normalIconSize) &&
icon_size.width() != int(d.bigIconSize) &&
icon_size.width() != int(d.hugeIconSize) &&
icon_size.width() != int(d.giantIconSize)) {
icon_size.setWidth(d.normalIconSize);
icon_size.setHeight(d.normalIconSize);
-   }
+   }*/
setIconSize(icon_size);
 
 #if defined(Q_WS_X11) || defined(QPA_XCB)
@@ -1096,7 +1096,6 @@ void GuiView::updateStatusBarMessage(QString const & str)
d.statusbar_timer_.start(3000);
 }
 
-
 void GuiView::smallSizedIcons()
 {
setIconSize(QSize(d.smallIconSize, d.smallIconSize));
@@ -1892,6 +1891,23 @@ bool GuiView::getStatus(FuncRequest const & cmd, 
FuncStatus & flag)
break;
}
 
+   case LFUN_TOOLBAR_MOVABLE: {
+   string const name = cmd.getArg(0);
+   if (GuiToolbar * t = toolbar(name))
+   flag.setOnOff(t->isMovable());
+   else {
+   enable = false;
+   docstring const msg =
+   bformat(_("Unknown toolbar \"%1$s\""), 
from_utf8(name));
+   flag.message(msg);
+   }
+