Re: InsetListingsParams enhancement for Bo (was [patch] Bug 3639- Sorted listing params)

2007-05-30 Thread Abdelrazak Younes
Bo Peng wrote: Sorry Bo, it is been a bit late, but I wait for all the changes for the source file settles. It can go in if you change .find() to contains(), and trim() suffix to avoid problem with '?style ' etc (if it has not been trimmed before key is passed). All these controls and string

Re: InsetListingsParams enhancement for Bo (was [patch] Bug 3639- Sorted listing params)

2007-05-30 Thread Ozgur Ugras BARAN
On 5/30/07, Abdelrazak Younes [EMAIL PROTECTED] wrote: Bo Peng wrote: Sorry Bo, it is been a bit late, but I wait for all the changes for the source file settles. It can go in if you change .find() to contains(), and trim() suffix to avoid problem with '?style ' etc (if it has not been

Re: InsetListingsParams enhancement for Bo (was [patch] Bug 3639- Sorted listing params)

2007-05-30 Thread Bo Peng
+1 I can move it to frontend after the release, if nobody objects. After 1.5.0 please. Time would be better spent on real bugs now. Bo

Re: InsetListingsParams enhancement for Bo (was [patch] Bug 3639- Sorted listing params)

2007-05-30 Thread Ozgur Ugras BARAN
Otherwise, '?something ' will not match anything. I guess, a trim is already applied. I updated the code for the situations '? something' and attached the patch. However, It does not cover the situations '?some thing'. I used trim (), but since the string is already trimmed, rtrim() is

Re: InsetListingsParams enhancement for Bo (was [patch] Bug 3639- Sorted listing params)

2007-05-30 Thread Abdelrazak Younes
Bo Peng wrote: Sorry Bo, it is been a bit late, but I wait for all the changes for the source file settles. It can go in if you change .find() to contains(), and trim() suffix to avoid problem with '?style ' etc (if it has not been trimmed before key is passed). All these controls and string

Re: InsetListingsParams enhancement for Bo (was [patch] Bug 3639- Sorted listing params)

2007-05-30 Thread Ozgur Ugras BARAN
On 5/30/07, Abdelrazak Younes <[EMAIL PROTECTED]> wrote: Bo Peng wrote: >> Sorry Bo, it is been a bit late, but I wait for all the changes for >> the source file settles. > > It can go in if you change .find() to contains(), and trim() suffix to > avoid problem with '?style ' etc (if it has not

Re: InsetListingsParams enhancement for Bo (was [patch] Bug 3639- Sorted listing params)

2007-05-30 Thread Bo Peng
> > +1 I can move it to frontend after the release, if nobody objects. After 1.5.0 please. Time would be better spent on real bugs now. Bo

Re: InsetListingsParams enhancement for Bo (was [patch] Bug 3639- Sorted listing params)

2007-05-30 Thread Ozgur Ugras BARAN
Otherwise, '?something ' will not match anything. I guess, a trim is already applied. I updated the code for the situations '? something' and attached the patch. However, It does not cover the situations '?some thing'. I used trim (), but since the string is already trimmed, rtrim() is

InsetListingsParams enhancement for Bo (was [patch] Bug 3639- Sorted listing params)

2007-05-29 Thread Ozgur Ugras BARAN
Attached is a patch for a small feature that Bo asked for. It simply filters InsetListingsParams when the text in the corresponding dialog is entered as ?string . Sorry Bo, it is been a bit late, but I wait for all the changes for the source file settles. cheers Ugras Index:

Re: InsetListingsParams enhancement for Bo (was [patch] Bug 3639- Sorted listing params)

2007-05-29 Thread Bo Peng
Sorry Bo, it is been a bit late, but I wait for all the changes for the source file settles. It can go in if you change .find() to contains(), and trim() suffix to avoid problem with '?style ' etc (if it has not been trimmed before key is passed). Thanks. Bo

InsetListingsParams enhancement for Bo (was [patch] Bug 3639- Sorted listing params)

2007-05-29 Thread Ozgur Ugras BARAN
Attached is a patch for a small feature that Bo asked for. It simply filters InsetListingsParams when the text in the corresponding dialog is entered as ? . Sorry Bo, it is been a bit late, but I wait for all the changes for the source file settles. cheers Ugras Index:

Re: InsetListingsParams enhancement for Bo (was [patch] Bug 3639- Sorted listing params)

2007-05-29 Thread Bo Peng
Sorry Bo, it is been a bit late, but I wait for all the changes for the source file settles. It can go in if you change .find() to contains(), and trim() suffix to avoid problem with '?style ' etc (if it has not been trimmed before key is passed). Thanks. Bo

Re: [Updated patch] Bug 3639- Sorted listing params

2007-05-27 Thread Jürgen Spitzmüller
Abdelrazak Younes wrote: The attached updated patch works the same and goes farther in the cleanup. I got an implicit (private) OK from Bo. Jurgen? OK. Jürgen

Re: [Updated patch] Bug 3639- Sorted listing params

2007-05-27 Thread Abdelrazak Younes
Jürgen Spitzmüller wrote: Abdelrazak Younes wrote: The attached updated patch works the same and goes farther in the cleanup. I got an implicit (private) OK from Bo. Jurgen? OK. OK, thanks, I've committed a further cleanup version where ListingsParam is a full blown class which do its own

Re: [Updated patch] Bug 3639- Sorted listing params

2007-05-27 Thread Jürgen Spitzmüller
Abdelrazak Younes wrote: > The attached updated patch works the same and goes farther in the > cleanup. I got an implicit (private) OK from Bo. Jurgen? OK. Jürgen

Re: [Updated patch] Bug 3639- Sorted listing params

2007-05-27 Thread Abdelrazak Younes
Jürgen Spitzmüller wrote: Abdelrazak Younes wrote: The attached updated patch works the same and goes farther in the cleanup. I got an implicit (private) OK from Bo. Jurgen? OK. OK, thanks, I've committed a further cleanup version where ListingsParam is a full blown class which do its own

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Alfredo Braunstein
Bo Peng wrote: Hi Bo, 1. table[idx].name is char * so != is better because no conversion would be needed. ... and then you'll be comparing pointers, which is probably not what you want... afaict the original patch was correct in this respect. Regards A/ PS: incidentally this may work

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Ozgur Ugras BARAN
5. I would appreciate it you can also implement ?xx == all parameters that contains xx. That is to say, ?placement would show floatplacement. style would show all style related parameters. You can also consider xx == all parameters that prefixIs(xx), and other parameters that contains(xx). I

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Abdelrazak Younes
Ozgur Ugras BARAN wrote: 5. I would appreciate it you can also implement ?xx == all parameters that contains xx. That is to say, ?placement would show floatplacement. style would show all style related parameters. You can also consider xx == all parameters that prefixIs(xx), and other

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Ozgur Ugras BARAN
variable that we compare with empty string is of type const char, not string.. A possible way of doing it would be: !string(listings_param_table[idx].name).empty() But it is more difficult to read, IMHO. Ugras Use string::empty() instead. Abdel.

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Abdelrazak Younes
Ozgur Ugras BARAN wrote: variable that we compare with empty string is of type const char, not string.. A possible way of doing it would be: !string(listings_param_table[idx].name).empty() Ah... OK, I didn't get the thing. Why don't you use string in the first place (in listings_param_table)

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Jürgen Spitzmüller
Abdelrazak Younes wrote: -   char const * hint; +   string hint; Can you make it a docstring instead? Jürgen

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Abdelrazak Younes
Abdelrazak Younes wrote: Ozgur Ugras BARAN wrote: variable that we compare with empty string is of type const char, not string.. A possible way of doing it would be: !string(listings_param_table[idx].name).empty() Ah... OK, I didn't get the thing. Why don't you use string in the first place

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Bo Peng
On 5/26/07, Jürgen Spitzmüller [EMAIL PROTECTED] wrote: Abdelrazak Younes wrote: -char const * hint; +string hint; Can you make it a docstring instead? In the good old days, string is considered as expensive compared to char *, and now you want to use docstring? I agree to change it to

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Bo Peng
Yes. You could as well use: if (listings_param_table[idx].name[0]) This is what lyx usually uses, and what I will do if I am awake enough not to use == . Cheers, Bo

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Ozgur Ugras BARAN
Ah... OK, I didn't get the thing. Why don't you use string in the first place (in listings_param_table) ? But it is more difficult to read, IMHO. Yes. You could as well use: if (listings_param_table[idx].name[0]) :D I guess, I remember this from hilarious web site how to write an

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Bo Peng
Indeed, I am agree with Alfredo on this issue. Therefore I have attached another patch which uses string() for comparison. Use whichever you think is best. + string suffix(name,1); + string pars; + for(pariter = parlist.begin(); pariter !=

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Abdelrazak Younes
Jürgen Spitzmüller wrote: Abdelrazak Younes wrote: - char const * hint; + string hint; Can you make it a docstring instead? OK. Abdel.

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Bo Peng
Do you like if I apply other suggestions of the web site for lyx development? :) Sure, just do not bring up the 'char const' issue. :-) Cheers, Bo

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Abdelrazak Younes
Bo Peng wrote: On 5/26/07, Jürgen Spitzmüller [EMAIL PROTECTED] wrote: Abdelrazak Younes wrote: -char const * hint; +string hint; Can you make it a docstring instead? In the good old days, string is considered as expensive compared to char *, Memory and CPU wise the overhead is minimal.

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Jürgen Spitzmüller
Bo Peng wrote: In the good old days, laudatio temporis acti ... string is considered as expensive compared to char *, and now you want to use docstring? saves us a few conversions. I agree to change it to docstring. :-) Fine. Jürgen

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Ozgur Ugras BARAN
Ah, yes I forgot contains.. I'll fix it. Shall I also make the conversion to docstring for every string and char* I use in parValidator::parValidator? ugras On 5/26/07, Bo Peng [EMAIL PROTECTED] wrote: Indeed, I am agree with Alfredo on this issue. Therefore I have attached another patch

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Abdelrazak Younes
Ozgur Ugras BARAN wrote: Ah, yes I forgot contains.. I'll fix it. Shall I also make the conversion to docstring for every string and char* I use in parValidator::parValidator? I am doing the conversion right now. Will post in a minute. Abdel. ugras On 5/26/07, Bo Peng [EMAIL PROTECTED]

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Abdelrazak Younes
Abdelrazak Younes wrote: Ozgur Ugras BARAN wrote: Ah, yes I forgot contains.. I'll fix it. Shall I also make the conversion to docstring for every string and char* I use in parValidator::parValidator? I am doing the conversion right now. Will post in a minute. Here is it. The bonus is that

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Jürgen Spitzmüller
Abdelrazak Younes wrote: +   { emptylines, , false, ALL, , from_ascii(Expect a number with an optional * before it) }, please mark this translatable as well: + { emptylines, , false, ALL, , _(Expect a number with an optional * before it) }, Jürgen

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Abdelrazak Younes
Jürgen Spitzmüller wrote: Abdelrazak Younes wrote: + { emptylines, , false, ALL, , from_ascii(Expect a number with an optional * before it) }, please mark this translatable as well: + { emptylines, , false, ALL, , _(Expect a number with an optional * before it) }, Already done

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Bo Peng
+docstring empty_hint; +docstring style_hint = _(Use \\footnotesize, \\small, \\itshape, \\ttfamily or something like that); +docstring frame_hint = _(none, leftline, topline, bottomline, lines, single, shadowbox or subset of trblTRBL); +docstring frameround_hint =_(Enter four letters

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Jürgen Spitzmüller
Abdelrazak Younes wrote: Already done ;-) merci beaucoup :-) Jürgen

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Abdelrazak Younes
Bo Peng wrote: +docstring empty_hint; +docstring style_hint = _(Use \\footnotesize, \\small, \\itshape, \\ttfamily or something like that); +docstring frame_hint = _(none, leftline, topline, bottomline, lines, single, shadowbox or subset of trblTRBL); +docstring frameround_hint =_(Enter

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Abdelrazak Younes
Abdelrazak Younes wrote: Abdelrazak Younes wrote: Ozgur Ugras BARAN wrote: Ah, yes I forgot contains.. I'll fix it. Shall I also make the conversion to docstring for every string and char* I use in parValidator::parValidator? I am doing the conversion right now. Will post in a minute.

[Alternative patch] Bug 3639- Sorted listing params

2007-05-26 Thread Abdelrazak Younes
Ozgur Ugras BARAN wrote: Attached patch sorts listings inset params, and hence solves bug 3639. Please somebody review and apply the patch. I could also sort the listings_param_table[] entries manually, but I find this way easier (and more guaranteed). I went one step further and used a map

Re: [Alternative patch] Bug 3639- Sorted listing params

2007-05-26 Thread Abdelrazak Younes
Abdelrazak Younes wrote: Ozgur Ugras BARAN wrote: Attached patch sorts listings inset params, and hence solves bug 3639. Please somebody review and apply the patch. I could also sort the listings_param_table[] entries manually, but I find this way easier (and more guaranteed). I went one

Re: [Alternative patch] Bug 3639- Sorted listing params

2007-05-26 Thread Bo Peng
On 5/26/07, Abdelrazak Younes [EMAIL PROTECTED] wrote: Abdelrazak Younes wrote: Ozgur Ugras BARAN wrote: Attached patch sorts listings inset params, and hence solves bug 3639. Please somebody review and apply the patch. I could also sort the listings_param_table[] entries manually, but I

Re: [Alternative patch] Bug 3639- Sorted listing params

2007-05-26 Thread Abdelrazak Younes
Bo Peng wrote: On 5/26/07, Abdelrazak Younes [EMAIL PROTECTED] wrote: Abdelrazak Younes wrote: Ozgur Ugras BARAN wrote: Attached patch sorts listings inset params, and hence solves bug 3639. Please somebody review and apply the patch. I could also sort the listings_param_table[] entries

Re: [Alternative patch] Bug 3639- Sorted listing params

2007-05-26 Thread Bo Peng
It is cleaner, I prefer {} initialization to a bunch of assignments. I like neither static bool firsttime, nor the fact that stylehint is repeated several times. saves code for the searching maybe. and the sorting is automatic. Why is that? You mean things in a map is ordered by

Re: [Alternative patch] Bug 3639- Sorted listing params

2007-05-26 Thread Abdelrazak Younes
Bo Peng wrote: It is cleaner, I prefer {} initialization to a bunch of assignments. I like neither static bool firsttime, nor the fact that stylehint is repeated several times. This is just cosmetic, I could have just put the initialisation code in the ParValidator constructor. saves

Re: [Alternative patch] Bug 3639- Sorted listing params

2007-05-26 Thread Bo Peng
On 5/26/07, Abdelrazak Younes [EMAIL PROTECTED] wrote: Bo Peng wrote: It is cleaner, I prefer {} initialization to a bunch of assignments. I like neither static bool firsttime, nor the fact that stylehint is repeated several times. This is just cosmetic, I could have just put the

Re: [Alternative patch] Bug 3639- Sorted listing params

2007-05-26 Thread Abdelrazak Younes
Bo Peng wrote: On 5/26/07, Abdelrazak Younes [EMAIL PROTECTED] wrote: Bo Peng wrote: It is cleaner, I prefer {} initialization to a bunch of assignments. I like neither static bool firsttime, nor the fact that stylehint is repeated several times. This is just cosmetic, I could have just

Re: [Alternative patch] Bug 3639- Sorted listing params

2007-05-26 Thread Bo Peng
I forgot to say that we need only one ParValidator. The constructor of parValidator, curently, check against this structure and throw if fail. You will have to change this to something like parValidator globalValidator; globalValidator.validate(key, value); Currently, I have

Re: [Alternative patch] Bug 3639- Sorted listing params

2007-05-26 Thread Abdelrazak Younes
Bo Peng wrote: I forgot to say that we need only one ParValidator. The constructor of parValidator, curently, check against this structure and throw if fail. You will have to change this to something like parValidator globalValidator; globalValidator.validate(key, value); Currently, I have

[Updated patch] Bug 3639- Sorted listing params

2007-05-26 Thread Abdelrazak Younes
Abdelrazak Younes wrote: Abdelrazak Younes wrote: Ozgur Ugras BARAN wrote: Attached patch sorts listings inset params, and hence solves bug 3639. Please somebody review and apply the patch. I could also sort the listings_param_table[] entries manually, but I find this way easier (and more

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Alfredo Braunstein
Bo Peng wrote: Hi Bo, > > 1. table[idx].name is char * so != "" is better because no conversion > would be needed. ... and then you'll be comparing pointers, which is probably not what you want... afaict the original patch was correct in this respect. Regards A/ PS: incidentally this may

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Ozgur Ugras BARAN
5. I would appreciate it you can also implement ?xx ==> all parameters that contains xx. That is to say, ?placement would show floatplacement. style would show all style related parameters. You can also consider xx ==> all parameters that prefixIs(xx), and other parameters that contains(xx).

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Abdelrazak Younes
Ozgur Ugras BARAN wrote: 5. I would appreciate it you can also implement ?xx ==> all parameters that contains xx. That is to say, ?placement would show floatplacement. style would show all style related parameters. You can also consider xx ==> all parameters that prefixIs(xx), and other

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Ozgur Ugras BARAN
variable that we compare with empty string is of type const char, not string.. A possible way of doing it would be: !string(listings_param_table[idx].name).empty() But it is more difficult to read, IMHO. Ugras Use string::empty() instead. Abdel.

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Abdelrazak Younes
Ozgur Ugras BARAN wrote: variable that we compare with empty string is of type const char, not string.. A possible way of doing it would be: !string(listings_param_table[idx].name).empty() Ah... OK, I didn't get the thing. Why don't you use string in the first place (in listings_param_table)

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Jürgen Spitzmüller
Abdelrazak Younes wrote: > -   char const * hint; > +   string hint; Can you make it a docstring instead? Jürgen

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Abdelrazak Younes
Abdelrazak Younes wrote: Ozgur Ugras BARAN wrote: variable that we compare with empty string is of type const char, not string.. A possible way of doing it would be: !string(listings_param_table[idx].name).empty() Ah... OK, I didn't get the thing. Why don't you use string in the first place

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Bo Peng
On 5/26/07, Jürgen Spitzmüller <[EMAIL PROTECTED]> wrote: Abdelrazak Younes wrote: > -char const * hint; > +string hint; Can you make it a docstring instead? In the good old days, string is considered as expensive compared to char *, and now you want to use docstring? I agree to change it to

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Bo Peng
Yes. You could as well use: if (listings_param_table[idx].name[0]) This is what lyx usually uses, and what I will do if I am awake enough not to use == "". Cheers, Bo

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Ozgur Ugras BARAN
Ah... OK, I didn't get the thing. Why don't you use string in the first place (in listings_param_table) ? > But it is more difficult to read, IMHO. Yes. You could as well use: if (listings_param_table[idx].name[0]) :D I guess, I remember this from hilarious web site "how to write an

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Bo Peng
Indeed, I am agree with Alfredo on this issue. Therefore I have attached another patch which uses string() for comparison. Use whichever you think is best. + string suffix(name,1); + string pars; + for(pariter = parlist.begin(); pariter !=

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Abdelrazak Younes
Jürgen Spitzmüller wrote: Abdelrazak Younes wrote: - char const * hint; + string hint; Can you make it a docstring instead? OK. Abdel.

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Bo Peng
Do you like if I apply other suggestions of the web site for lyx development? :) Sure, just do not bring up the 'char const' issue. :-) Cheers, Bo

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Abdelrazak Younes
Bo Peng wrote: On 5/26/07, Jürgen Spitzmüller <[EMAIL PROTECTED]> wrote: Abdelrazak Younes wrote: > -char const * hint; > +string hint; Can you make it a docstring instead? In the good old days, string is considered as expensive compared to char *, Memory and CPU wise the overhead is

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Jürgen Spitzmüller
Bo Peng wrote: > In the good old days, laudatio temporis acti ... > string is considered as expensive compared to > char *, and now you want to use docstring? saves us a few conversions. > I agree to change it to docstring. :-) Fine. Jürgen

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Ozgur Ugras BARAN
Ah, yes I forgot contains.. I'll fix it. Shall I also make the conversion to docstring for every string and char* I use in parValidator::parValidator? ugras On 5/26/07, Bo Peng <[EMAIL PROTECTED]> wrote: > Indeed, I am agree with Alfredo on this issue. Therefore I have > attached another

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Abdelrazak Younes
Ozgur Ugras BARAN wrote: Ah, yes I forgot contains.. I'll fix it. Shall I also make the conversion to docstring for every string and char* I use in parValidator::parValidator? I am doing the conversion right now. Will post in a minute. Abdel. ugras On 5/26/07, Bo Peng <[EMAIL PROTECTED]>

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Abdelrazak Younes
Abdelrazak Younes wrote: Ozgur Ugras BARAN wrote: Ah, yes I forgot contains.. I'll fix it. Shall I also make the conversion to docstring for every string and char* I use in parValidator::parValidator? I am doing the conversion right now. Will post in a minute. Here is it. The bonus is that

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Jürgen Spitzmüller
Abdelrazak Younes wrote: > +   { "emptylines", "", false, ALL, "", from_ascii("Expect a number > with an optional * before it") }, please mark this translatable as well: + { "emptylines", "", false, ALL, "", _("Expect a number with an optional * before it") }, Jürgen

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Abdelrazak Younes
Jürgen Spitzmüller wrote: Abdelrazak Younes wrote: + { "emptylines", "", false, ALL, "", from_ascii("Expect a number with an optional * before it") }, please mark this translatable as well: + { "emptylines", "", false, ALL, "", _("Expect a number with an optional * before it")

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Bo Peng
+docstring empty_hint; +docstring style_hint = _("Use \\footnotesize, \\small, \\itshape, \\ttfamily or something like that"); +docstring frame_hint = _("none, leftline, topline, bottomline, lines, single, shadowbox or subset of trblTRBL"); +docstring frameround_hint =_("Enter four letters

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Jürgen Spitzmüller
Abdelrazak Younes wrote: > Already done ;-) merci beaucoup :-) Jürgen

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Abdelrazak Younes
Bo Peng wrote: +docstring empty_hint; +docstring style_hint = _("Use \\footnotesize, \\small, \\itshape, \\ttfamily or something like that"); +docstring frame_hint = _("none, leftline, topline, bottomline, lines, single, shadowbox or subset of trblTRBL"); +docstring frameround_hint =

Re: [patch] Bug 3639- Sorted listing params

2007-05-26 Thread Abdelrazak Younes
Abdelrazak Younes wrote: Abdelrazak Younes wrote: Ozgur Ugras BARAN wrote: Ah, yes I forgot contains.. I'll fix it. Shall I also make the conversion to docstring for every string and char* I use in parValidator::parValidator? I am doing the conversion right now. Will post in a minute.

[Alternative patch] Bug 3639- Sorted listing params

2007-05-26 Thread Abdelrazak Younes
Ozgur Ugras BARAN wrote: Attached patch sorts listings inset params, and hence solves bug 3639. Please somebody review and apply the patch. I could also sort the listings_param_table[] entries manually, but I find this way easier (and more guaranteed). I went one step further and used a map

Re: [Alternative patch] Bug 3639- Sorted listing params

2007-05-26 Thread Abdelrazak Younes
Abdelrazak Younes wrote: Ozgur Ugras BARAN wrote: Attached patch sorts listings inset params, and hence solves bug 3639. Please somebody review and apply the patch. I could also sort the listings_param_table[] entries manually, but I find this way easier (and more guaranteed). I went one

Re: [Alternative patch] Bug 3639- Sorted listing params

2007-05-26 Thread Bo Peng
On 5/26/07, Abdelrazak Younes <[EMAIL PROTECTED]> wrote: Abdelrazak Younes wrote: > Ozgur Ugras BARAN wrote: >> Attached patch sorts listings inset params, and hence solves bug 3639. >> Please somebody review and apply the patch. >> >> I could also sort the listings_param_table[] entries

Re: [Alternative patch] Bug 3639- Sorted listing params

2007-05-26 Thread Abdelrazak Younes
Bo Peng wrote: On 5/26/07, Abdelrazak Younes <[EMAIL PROTECTED]> wrote: Abdelrazak Younes wrote: > Ozgur Ugras BARAN wrote: >> Attached patch sorts listings inset params, and hence solves bug 3639. >> Please somebody review and apply the patch. >> >> I could also sort the

Re: [Alternative patch] Bug 3639- Sorted listing params

2007-05-26 Thread Bo Peng
It is cleaner, I prefer {} initialization to a bunch of assignments. I like neither static bool firsttime, nor the fact that stylehint is repeated several times. saves code for the searching maybe. and the sorting is automatic. Why is that? You mean things in a map is ordered by

Re: [Alternative patch] Bug 3639- Sorted listing params

2007-05-26 Thread Abdelrazak Younes
Bo Peng wrote: It is cleaner, I prefer {} initialization to a bunch of assignments. I like neither static bool firsttime, nor the fact that stylehint is repeated several times. This is just cosmetic, I could have just put the initialisation code in the ParValidator constructor. saves

Re: [Alternative patch] Bug 3639- Sorted listing params

2007-05-26 Thread Bo Peng
On 5/26/07, Abdelrazak Younes <[EMAIL PROTECTED]> wrote: Bo Peng wrote: >> It is cleaner, > > I prefer {} initialization to a bunch of assignments. I like neither > static bool firsttime, nor the fact that stylehint is repeated several > times. This is just cosmetic, I could have just put the

Re: [Alternative patch] Bug 3639- Sorted listing params

2007-05-26 Thread Abdelrazak Younes
Bo Peng wrote: On 5/26/07, Abdelrazak Younes <[EMAIL PROTECTED]> wrote: Bo Peng wrote: >> It is cleaner, > > I prefer {} initialization to a bunch of assignments. I like neither > static bool firsttime, nor the fact that stylehint is repeated several > times. This is just cosmetic, I could

Re: [Alternative patch] Bug 3639- Sorted listing params

2007-05-26 Thread Bo Peng
I forgot to say that we need only one ParValidator. The constructor of parValidator, curently, check against this structure and throw if fail. You will have to change this to something like parValidator globalValidator; globalValidator.validate(key, value); Currently, I have

Re: [Alternative patch] Bug 3639- Sorted listing params

2007-05-26 Thread Abdelrazak Younes
Bo Peng wrote: I forgot to say that we need only one ParValidator. The constructor of parValidator, curently, check against this structure and throw if fail. You will have to change this to something like parValidator globalValidator; globalValidator.validate(key, value); Currently, I have

[Updated patch] Bug 3639- Sorted listing params

2007-05-26 Thread Abdelrazak Younes
Abdelrazak Younes wrote: Abdelrazak Younes wrote: Ozgur Ugras BARAN wrote: Attached patch sorts listings inset params, and hence solves bug 3639. Please somebody review and apply the patch. I could also sort the listings_param_table[] entries manually, but I find this way easier (and more

[patch] Bug 3639- Sorted listing params

2007-05-25 Thread Ozgur Ugras BARAN
Attached patch sorts listings inset params, and hence solves bug 3639. Please somebody review and apply the patch. I could also sort the listings_param_table[] entries manually, but I find this way easier (and more guaranteed). regards, ugras Index: insets/InsetListingsParams.cpp

Re: [patch] Bug 3639- Sorted listing params

2007-05-25 Thread Bo Peng
On 5/25/07, Ozgur Ugras BARAN [EMAIL PROTECTED] wrote: Attached patch sorts listings inset params, and hence solves bug 3639. Please somebody review and apply the patch. 1. table[idx].name is char * so != is better because no conversion would be needed. 2. you used both std::string and

Re: [patch] Bug 3639- Sorted listing params

2007-05-25 Thread Ozgur Ugras BARAN
On 5/25/07, Bo Peng [EMAIL PROTECTED] wrote: On 5/25/07, Ozgur Ugras BARAN [EMAIL PROTECTED] wrote: Attached patch sorts listings inset params, and hence solves bug 3639. Please somebody review and apply the patch. 1. table[idx].name is char * so != is better because no conversion would be

[patch] Bug 3639- Sorted listing params

2007-05-25 Thread Ozgur Ugras BARAN
Attached patch sorts listings inset params, and hence solves bug 3639. Please somebody review and apply the patch. I could also sort the listings_param_table[] entries manually, but I find this way easier (and more guaranteed). regards, ugras Index: insets/InsetListingsParams.cpp

Re: [patch] Bug 3639- Sorted listing params

2007-05-25 Thread Bo Peng
On 5/25/07, Ozgur Ugras BARAN <[EMAIL PROTECTED]> wrote: Attached patch sorts listings inset params, and hence solves bug 3639. Please somebody review and apply the patch. 1. table[idx].name is char * so != "" is better because no conversion would be needed. 2. you used both std::string and

Re: [patch] Bug 3639- Sorted listing params

2007-05-25 Thread Ozgur Ugras BARAN
On 5/25/07, Bo Peng <[EMAIL PROTECTED]> wrote: On 5/25/07, Ozgur Ugras BARAN <[EMAIL PROTECTED]> wrote: > Attached patch sorts listings inset params, and hence solves bug 3639. > Please somebody review and apply the patch. 1. table[idx].name is char * so != "" is better because no conversion