Re: [patch] Some fixes for listings

2008-09-09 Thread Jürgen Spitzmüller
Vincent van Ravesteijn - TNW wrote: > OK... Let's see if I can check out and compile LyX 1.5 (again)... That would be excellent. I think we do not need the gui changes, but the other changes would probably be fine. Jürgen

RE: [patch] Some fixes for listings

2008-09-08 Thread Vincent van Ravesteijn - TNW
> I committed it. Thank you. > Could you please backport the following things to LyX 1.5 branch > as requested by Jürgen if possible: > - It prevents that the package "listings" is included twice. > - The color package is now automatically included. (when necessary) > - checking for unmatched u

Re: [patch] Some fixes for listings

2008-09-08 Thread Uwe Stöhr
This could go in soon I think. I committed it. Could you please backport the following things to LyX 1.5 branch as requested by Jürgen if possible: > - It prevents that the package "listings" is included twice. > > - The color package is now automatically included. (when necessary) - checking

Re: [patch] Some fixes for listings

2008-09-08 Thread Uwe Stöhr
> + if (par.find("\\color",0) != string::npos) > space I added this and committed the patch: http://www.lyx.org/trac/changeset/26341 regards Uwe

Re: [patch] Some fixes for listings

2008-09-08 Thread Pavel Sanda
Uwe Stöhr wrote: > Vincent van Ravesteijn - TNW schrieb: > >> New in this patch: - allowing escaped braces in parameters >> - checking for unmatched unescaped braces during validation >> - added a missing button policy to bc() of the GuiListings dialog >> (otherwise validation does not make sens

Re: [patch] Some fixes for listings

2008-09-08 Thread Richard Heck
Vincent van Ravesteijn - TNW wrote: - Each randomly chosen set of integers has a gcd, But 1 isn't much of a GCD rh

RE: [patch] Some fixes for listings

2008-09-08 Thread Vincent van Ravesteijn - TNW
>>> Vincent wrote: >>> >>> I am afraid I will raise the issue of , (since I missed >>> the discussion about this completely). >>> >>> >> Bo wrote: >> >> If you insist, there are this wiki page that records part of the >> debates http://wiki.lyx.org/Devel/??Suggestions, and a com

Re: [patch] Some fixes for listings

2008-09-08 Thread Richard Heck
Bo Peng wrote: I am afraid I will raise the issue of embedding (since I missed the discussion about this completely). If you insist, there are this wiki page that records part of the debates http://wiki.lyx.org/Devel/BundleSuggestions, and a complete but outdated patch in http://www.lyx.

Re: [patch] Some fixes for listings

2008-09-07 Thread Uwe Stöhr
Vincent van Ravesteijn - TNW schrieb: New in this patch: - allowing escaped braces in parameters - checking for unmatched unescaped braces during validation - added a missing button policy to bc() of the GuiListings dialog (otherwise validation does not make sense) This could go in soon I

RE: [patch] Some fixes for listings

2008-09-07 Thread Vincent van Ravesteijn - TNW
> The patch contains now the following: > > - It prevents that the package "listings" is included twice. > - Adjusted parsing of the Listings settings. > - The widgets in Document Settings->Listings Settings are switched. > - I gave both the InsetListing Settings UI and the Document Settings >

Re: [patch] Some fixes for listings

2008-09-07 Thread Uwe Stöhr
> I would have preferred to see and discuss the patch before We did. The patch is OK but Vincent will build in support for \{ then it will go in. > (i.e., whether we backport only this part or also the other changes from the patch). Sorry, I misunderstood you. I thought that the from_utf8 par

Re: [patch] Some fixes for listings

2008-09-07 Thread Jürgen Spitzmüller
Uwe Stöhr wrote: > > This patch could also be backported to 1.5.7svn. At least the from_ascii > > -> > >  > from_utf8 part should. > > I did this: > http://www.lyx.org/trac/changeset/26325 I would have preferred to see and discuss the patch before (i.e., whether we backport only this part or also

Re: [patch] Some fixes for listings

2008-09-07 Thread Uwe Stöhr
> This patch could also be backported to 1.5.7svn. At least the from_ascii -> > from_utf8 part should. I did this: http://www.lyx.org/trac/changeset/26325 I don't know if to mention it in the status15 file - i leave this to you. regards Uwe

Re: [patch] Some fixes for listings

2008-09-07 Thread Jürgen Spitzmüller
Vincent van Ravesteijn - TNW wrote: > I reworked some things which resulted in this new patch. >   > The patch contains now the following: This patch could also be backported to 1.5.7svn. At least the from_ascii -> from_utf8 part should. Jürgen

RE: [patch] Some fixes for listings

2008-09-06 Thread Vincent van Ravesteijn - TNW
>>> - Corrected parsing of the Listings settings. When the following setting was >>> parsed: 'backgroundcolor=\color{red}'; the last brace wasn't counted, which >>> lead to the conversion errors and the '\n' error (solving part of bug 4884). >> >> How about a title 'Error caused by brace ( } )' ? I

Re: [patch] Some fixes for listings

2008-09-06 Thread Uwe Stöhr
Bo schrieb: >> - Corrected parsing of the Listings settings. When the following setting was >> parsed: 'backgroundcolor=\color{red}'; the last brace wasn't counted, which >> lead to the conversion errors and the '\n' error (solving part of bug 4884). > > How about a title 'Error caused by brace (

Re: [patch] Some fixes for listings

2008-09-06 Thread Pavel Sanda
Vincent van Ravesteijn - TNW wrote: > > Although, this was quite tough for a rookie. The tabbing and copy-pasting was > easy, painting of such a tabbed piece of text was more difficult. Well, > you'll see the result when it is sort of finished. > > For the meantime, try tabbing in a tabular .

Re: [patch] Some fixes for listings

2008-09-06 Thread Uwe Stöhr
Vincent van Ravesteijn - TNW schrieb: I can't give you a patch to test, have to finish up, clean the code, > check whether the style is ok, etc. OK, no need to hurry. When you have the patch ready, I'll test it. Attached is a screenshot, I hope this is what you had in mind. As you can see,

RE: [patch] Some fixes for listings

2008-09-06 Thread Vincent van Ravesteijn - TNW
>>> What I still miss in our listings support is this: >>> http://bugzilla.lyx.org/show_bug.cgi?id=3629 >> >> Consider it done. >> Although, this was quite tough for a rookie. The tabbing and copy-pasting >> was easy, painting of such a tabbed piece of text was more difficult. Well, >> you'll se

Re: [patch] Some fixes for listings

2008-09-06 Thread Uwe Stöhr
For the meantime, try tabbing in a tabular .. adding > "if( completer_->popupVisible() )" to GuiWorkArea.cpp:line > 850 would help. Is this OK ? This work. I can see no drawbacks in adding this, so I've put it in: http://www.lyx.org/trac/changeset/26320 That TAB didn't work in tables was

Re: [patch] Some fixes for listings

2008-09-06 Thread Uwe Stöhr
Vincent van Ravesteijn - TNW schrieb: What I still miss in our listings support is this: http://bugzilla.lyx.org/show_bug.cgi?id=3629 Consider it done. Although, this was quite tough for a rookie. The tabbing and copy-pasting > was easy, painting of such a tabbed piece of text was more diffi

Re: [patch] Some fixes for listings

2008-09-06 Thread Bo Peng
> I am afraid I will raise the issue of embedding (since I missed the > discussion about this completely). > If you insist, there are this wiki page that records part of the debates http://wiki.lyx.org/Devel/BundleSuggestions, and a complete but outdated patch in http://www.lyx.org/~bpeng/lyx-emb

RE: [patch] Some fixes for listings

2008-09-06 Thread Vincent van Ravesteijn - TNW
>What I still miss in our listings support is this: >http://bugzilla.lyx.org/show_bug.cgi?id=3629 >That you cannot use tabulators inside listings makes listings quite unusable >for programming languages like C++, Delphi, and the like. So while you are >working at listings, you perhaps know a way

Re: [patch] Some fixes for listings

2008-09-05 Thread Bo Peng
> - Corrected parsing of the Listings settings. When the following setting was > parsed: 'backgroundcolor=\color{red}'; the last brace wasn't counted, which > lead to the conversion errors and the '\n' error (solving part of bug 4884). How about a title 'Error caused by brace ( } )' ? I mean non-p

RE: [patch] Some fixes for listings

2008-09-05 Thread Uwe Stöhr
> I reworked some things which resulted in this new patch. > > The patch contains now the following: This is a huge step forward! What I still miss in our listings support is this: http://bugzilla.lyx.org/show_bug.cgi?id=3629 That you cannot use tabulators inside listings makes listings quite unu

RE: [patch] Some fixes for listings

2008-09-05 Thread Vincent van Ravesteijn - TNW
Hi, I reworked some things which resulted in this new patch. The patch contains now the following: - It prevents that the package "listings" is included twice. - Corrected parsing of the Listings settings. When the following setting was parsed: 'backgroundcolor=\color{red}'; the last brace

RE: [patch] Some fixes for listings

2008-09-05 Thread Vincent van Ravesteijn - TNW
>Bo Peng wrote: >> - First, Entering "backgroundcolor=\color{red}" into the Listings >> settings box will result in "backgroundcolor={\color{red}}" in the >> output file. This makes the latex file uncompilable. To solve this I >> just used the already defined, but unused, function "getParamValue

Re: [patch] Some fixes for listings

2008-09-04 Thread Bo Peng
> - First, Entering "backgroundcolor=\color{red}" into the Listings settings > box will result in "backgroundcolor={\color{red}}" in the output file. This > makes the latex file uncompilable. To solve this I just used the already > defined, but unused, function "getParamValue" in InsetListingsParam

Re: [patch] Some fixes for listings

2008-09-04 Thread Bo Peng
> - Second, after removing the {}'s, the file is still not compilable because > the color package is not loaded. Since LyX enthusiastically tells the user > to specify the colors in the settings, I think we should require the package > color when a color is specified. Will color package be added o

[patch] Some fixes for listings

2008-09-04 Thread Vincent van Ravesteijn - TNW
Hi, This patch fixes some problems when using listings : - First, Entering "backgroundcolor=\color{red}" into the Listings settings box will result in "backgroundcolor={\color{red}}" in the output file. This makes the latex file uncompilable. To solve this I just used the already defined, b