Re: Rob's patch: the next installment

2002-10-24 Thread Andre Poenitz
On Thu, Oct 24, 2002 at 12:13:41PM +0200, Jean-Marc Lasgouttes wrote: > John> We have lots of code that needs to know characteristics of the > John> inset its looking at. Many of these are simple true/fase > John> characterisations. It would be nice to avoid all the code > John> handling these trai

Re: Rob's patch: the next installment

2002-10-24 Thread Jean-Marc Lasgouttes
> "John" == John Levon <[EMAIL PROTECTED]> writes: John> On Wed, Oct 23, 2002 at 04:52:23PM +0100, Angus Leeming wrote: >> Go on, I'll bite. Care to give us an outline of the idea? John> We have lots of code that needs to know characteristics of the John> inset its looking at. Many of these a

Re: Rob's patch: the next installment

2002-10-23 Thread Andre Poenitz
On Wed, Oct 23, 2002 at 08:02:40PM +0100, John Levon wrote: > Not true. Adding a new trait currently requires recompile of every inset > file. Ah - in form of a new virtual function? Then you are right of course. Nevertheless, even "full recompiles" could be faster if structures are simpler...

Re: Rob's patch: the next installment

2002-10-23 Thread John Levon
On Wed, Oct 23, 2002 at 08:36:48PM +0200, Andre Poenitz wrote: > > Can you not see this is a massive readability improvement already ? > > No. 100 == 100 in my universe. Care to swap your 100 euros for my 100 argentinian pesos ? regards john -- "This is playing, not work, therefore it's not

Re: Rob's patch: the next installment

2002-10-23 Thread John Levon
On Wed, Oct 23, 2002 at 08:35:51PM +0200, Andre Poenitz wrote: > Go for lyxtext.h first if you want to scrap something. That will take months. > I am not sure. I thought you were offering something better. No I was stating C++ isn't good enough... > Not when using the "virtual function" way. R

Re: Rob's patch: the next installment

2002-10-23 Thread Andre Poenitz
On Wed, Oct 23, 2002 at 07:21:18PM +0100, John Levon wrote: > > the current code which moves the responsibility of "behaving nicely" from > > An even worse solution. > > what's your point ? Discussion worse solutions is a waste of time. Andre' -- Those who desire to give up Freedom in order t

Re: Rob's patch: the next installment

2002-10-23 Thread Andre Poenitz
On Wed, Oct 23, 2002 at 07:03:14PM +0100, John Levon wrote: > Indeed. And every other method I've thought of (virtual traits traits() > const method, inheritance of traits class) don't work in C++ either. > > > - does not solve our problem. Instead of 100 functions in the inset base > >class

Re: Rob's patch: the next installment

2002-10-23 Thread Andre Poenitz
On Wed, Oct 23, 2002 at 07:01:24PM +0100, John Levon wrote: > > It scales to the size we need. What exactly is not scalable? > > The size and scope of the inset.h header. Go for lyxtext.h first if you want to scrap something. > > I know no better solution. > > Wasn't that my original point ;)

Re: Rob's patch: the next installment

2002-10-23 Thread John Levon
On Wed, Oct 23, 2002 at 08:19:14PM +0200, Andre Poenitz wrote: > > We have lots of code that needs to know characteristics of the inset its > > looking at. Many of these are simple true/fase characterisations. It > > would be nice to avoid all the code handling these traits via virtual > > functio

Re: Rob's patch: the next installment

2002-10-23 Thread Andre Poenitz
On Wed, Oct 23, 2002 at 06:07:39PM +0100, John Levon wrote: > We have lots of code that needs to know characteristics of the inset its > looking at. Many of these are simple true/fase characterisations. It > would be nice to avoid all the code handling these traits via virtual > functions, if we co

Re: Rob's patch: the next installment

2002-10-23 Thread John Levon
On Wed, Oct 23, 2002 at 06:59:11PM +0200, Andre Poenitz wrote: > - is technically inappropriate as we don't have static types but pass >around inset by base class pointers, Indeed. And every other method I've thought of (virtual traits traits() const method, inheritance of traits class) don

Re: Rob's patch: the next installment

2002-10-23 Thread John Levon
On Wed, Oct 23, 2002 at 07:56:31PM +0200, Andre Poenitz wrote: > Basically using some wrapper template like > > template > void do_it(Func what, base * p) > { Ugggh. > Anyway: in simple words: It would not work at all. So, basically you haven't come up with a solution that C++ can handle :)

Re: Rob's patch: the next installment

2002-10-23 Thread Andre Poenitz
On Wed, Oct 23, 2002 at 05:29:40PM +0100, John Levon wrote: > > I don't see much that's worth the extra complexity, _especially_ if you > > want to access that with base class pointers/references as this basically > > ends up implementing something like vtables. The compiler is better at > > that.

Re: Rob's patch: the next installment

2002-10-23 Thread Dekel Tsur
On Tue, Oct 22, 2002 at 06:06:22PM +0100, John Levon wrote: > On Tue, Oct 22, 2002 at 07:03:46PM +0200, Juergen Spitzmueller wrote: > > > BTW: What about the math matrix dialog? Is this missing? I could have a go at > > Sure. I was a bit dubious about creating it, but I suppose we need it. > >

Re: Rob's patch: the next installment

2002-10-23 Thread John Levon
On Wed, Oct 23, 2002 at 04:52:23PM +0100, Angus Leeming wrote: > Go on, I'll bite. Care to give us an outline of the idea? We have lots of code that needs to know characteristics of the inset its looking at. Many of these are simple true/fase characterisations. It would be nice to avoid all the c

Re: Rob's patch: the next installment

2002-10-23 Thread Andre Poenitz
On Wed, Oct 23, 2002 at 04:52:23PM +0100, Angus Leeming wrote: > > I was kind of hoping you'd embarrass me by showing how easy it > > is to do inset_traits, actually. Oh well. > > Go on, I'll bite. Care to give us an outline of the idea? Something like the following? The "base traits cla

Re: Rob's patch: the next installment

2002-10-23 Thread John Levon
On Wed, Oct 23, 2002 at 06:11:08PM +0200, Andre Poenitz wrote: > You mean something like > > template > struct inset_traits { >bool shouldBeUsedInTocList = false; > }; > > template <> > struct inset_traits { >bool shouldBeUsedInTocList = true; > }; > I don't see much that's worth the

Re: Rob's patch: the next installment

2002-10-23 Thread Andre Poenitz
On Wed, Oct 23, 2002 at 03:49:43PM +0100, John Levon wrote: > > Look. I maintain a hierarchy of about 40 or 50 insets with a base class > > I was kind of hoping you'd embarrass me by showing how easy it is to do > inset_traits, actually. Oh well. You mean something like template struct inset_tr

Re: Rob's patch: the next installment

2002-10-23 Thread Angus Leeming
On Wednesday 23 October 2002 3:49 pm, John Levon wrote: > On Wed, Oct 23, 2002 at 04:46:58PM +0200, Andre Poenitz wrote: > > > Sure, add *another* one. I'm unable to convince C++ to do > > > a decent inset_traits. > > > > Look. I maintain a hierarchy of about 40 or 50 insets with a > > base class >

Re: Rob's patch: the next installment

2002-10-23 Thread Andre Poenitz
On Wed, Oct 23, 2002 at 04:35:31PM +0200, Jean-Marc Lasgouttes wrote: > Actually, I thin that the problem is to define the various uses we > have for asString() in terms of their meanings (what makes an inset > desirable in ascii output but not TOC?). Then the API itself will get > cleaner. By hav

Re: Rob's patch: the next installment

2002-10-23 Thread John Levon
On Wed, Oct 23, 2002 at 04:46:58PM +0200, Andre Poenitz wrote: > > Sure, add *another* one. I'm unable to convince C++ to do a decent > > inset_traits. > > Look. I maintain a hierarchy of about 40 or 50 insets with a base class I was kind of hoping you'd embarrass me by showing how easy it is to

Re: Rob's patch: the next installment

2002-10-23 Thread Andre Poenitz
On Wed, Oct 23, 2002 at 02:50:11PM +0100, John Levon wrote: > > Oh I really hate that guessing which combination of what magic codes should > > be used. Why isn't this knowledge put in the insets (aka "virtual > > function")? > > Sure, add *another* one. I'm unable to convince C++ to do a decent >

Re: Rob's patch: the next installment

2002-10-23 Thread Jean-Marc Lasgouttes
> "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes: Andre> I don't like the extra parameter more than the extra virtual Andre> function. There are too many parameters already in some places Andre> (Windows API anyone?) and nobody is going to weed them out. If Andre> there is a seperate func

Re: Rob's patch: the next installment

2002-10-23 Thread Andre Poenitz
On Wed, Oct 23, 2002 at 03:43:13PM +0200, Jean-Marc Lasgouttes wrote: > Andre> Oh I really hate that guessing which combination of what magic > Andre> codes should be used. Why isn't this knowledge put in the > Andre> insets (aka "virtual function")? > > like > bool Inset::wantedAsASCIIInTOC()

Re: Rob's patch: the next installment

2002-10-23 Thread John Levon
On Wed, Oct 23, 2002 at 02:59:44PM +0200, Andre Poenitz wrote: > > use getInset(i)->lyxCode() == Inset::SPECIALCHAR_CODE ? > > > > ->isSpace() and isLetter() still doesn't work as intended for some cases > > so we can't use that. > > Oh I really hate that guessing which combination of what magic

Re: Rob's patch: the next installment

2002-10-23 Thread Jean-Marc Lasgouttes
> "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes: Andre> Oh I really hate that guessing which combination of what magic Andre> codes should be used. Why isn't this knowledge put in the Andre> insets (aka "virtual function")? like bool Inset::wantedAsASCIIInTOC() const; ?? The pr

Re: Rob's patch: the next installment

2002-10-23 Thread Andre Poenitz
On Tue, Oct 22, 2002 at 08:12:34PM +0100, John Levon wrote: > > Replace by > >else if (c == META_INSET && > > getInset(i)->lyxCode() != Inset::LABEL_CODE) > > > > The reason is that you don't want to see labels in the navigate window. > > Not good enough (what about footnotes) > > us

Re: Rob's patch: the next installment

2002-10-23 Thread Jean-Marc Lasgouttes
> "John" == John Levon <[EMAIL PROTECTED]> writes: >> 599: Don't know how to do this. John> Make xpm's for the missing icons, add to lib/images/math/, and John> add some code to transform the names that qt looks up... Also we still have math icons with names like |.xpm or with case problems

Re: Rob's patch: the next installment

2002-10-22 Thread John Levon
On Tue, Oct 22, 2002 at 08:49:42PM +0200, Dekel Tsur wrote: > Replace by >else if (c == META_INSET && > getInset(i)->lyxCode() != Inset::LABEL_CODE) > > The reason is that you don't want to see labels in the navigate window. Not good enough (what about footnotes) use getInset(i)->

Re: Rob's patch: the next installment

2002-10-22 Thread Dekel Tsur
On Tue, Oct 22, 2002 at 07:55:43PM +0200, Andre Poenitz wrote: > if (IsPrintable(c)) > s += c; > - else if (c == META_INSET && > - getInset(i)->lyxCode() == Inset::MATH_CODE) { > - ostringstream ost; > -

Re: Rob's patch: the next installment

2002-10-22 Thread Juergen Spitzmueller
Andre Poenitz wrote: > This is not really that important I think. Math arrays can be fairly easyly > manipulated using the menus or plain keyboard Probably (especially for me as I'll never use it), but it is the only one that fits into my schedule now. Jürgen.

Re: Rob's patch: the next installment

2002-10-22 Thread Andre Poenitz
On Tue, Oct 22, 2002 at 07:58:08PM +0200, Juergen Spitzmueller wrote: > John Levon wrote: > > btw if you do this Juergen you should be able to use the emptytable > > widget similar to how tabular insert dialog does it > > OK. I think I'll copy the tabular create dialog and add the additional > w

Re: Rob's patch: the next installment

2002-10-22 Thread Andre Poenitz
On Tue, Oct 22, 2002 at 06:31:41PM +0100, John Levon wrote: > new file > choose Section > type "A_B" where _ is protected space (control space) > view->navigate > observe AB not A B Fixed by attached patch. Ok to apply? Andre' -- Those who desire to give up Freedom in order to gain Security, w

Re: Rob's patch: the next installment

2002-10-22 Thread Juergen Spitzmueller
John Levon wrote: > btw if you do this Juergen you should be able to use the emptytable > widget similar to how tabular insert dialog does it OK. I think I'll copy the tabular create dialog and add the additional widgets. Jürgen.

Re: Rob's patch: the next installment

2002-10-22 Thread Andre Poenitz
On Tue, Oct 22, 2002 at 06:31:41PM +0100, John Levon wrote: > new file > choose Section > type "A_B" where _ is protected space (control space) > view->navigate > observe AB not A B Ok. My fault, I had a real underscore there... Andre' -- Those who desire to give up Freedom in order to gain Sec

Re: Rob's patch: the next installment

2002-10-22 Thread Andre Poenitz
On Tue, Oct 22, 2002 at 06:24:48PM +0100, John Levon wrote: > Could you fix qt too ? QMathDialog.C I think QDelimiterDialog, but this looks ok. I am off now... Andre' -- Those who desire to give up Freedom in order to gain Security, will not have, nor do they deserve, either one. (T. Jefferson

Re: Rob's patch: the next installment

2002-10-22 Thread John Levon
On Tue, Oct 22, 2002 at 07:29:24PM +0200, Andre Poenitz wrote: > Maybe I simply doid not understand the instructions... new file choose Section type "A_B" where _ is protected space (control space) view->navigate observe AB not A B john -- "This is mindless pedantism up with which I will not p

Re: Rob's patch: the next installment

2002-10-22 Thread Andre Poenitz
On Tue, Oct 22, 2002 at 06:24:48PM +0100, John Levon wrote: > > 617: I don't see this. > > You don't ?? Maybe I simply doid not understand the instructions... > > [Ok to apply patch?] > > Could you fix qt too ? QMathDialog.C I think Yes. Andre' -- Those who desire to give up Freedom in orde

Re: Rob's patch: the next installment

2002-10-22 Thread John Levon
On Tue, Oct 22, 2002 at 07:25:30PM +0200, Andre Poenitz wrote: > But I certainly won't try to stop you btw if you do this Juergen you should be able to use the emptytable widget similar to how tabular insert dialog does it john -- "This is mindless pedantism up with which I will not put."

Re: Rob's patch: the next installment

2002-10-22 Thread Andre Poenitz
On Tue, Oct 22, 2002 at 07:21:48PM +0200, Juergen Spitzmueller wrote: > I'll see what is possible. First, I'll have a go at math-matrix. This is not really that important I think. Math arrays can be fairly easyly manipulated using the menus or plain keyboard But I certainly won't try to stop

Re: Rob's patch: the next installment

2002-10-22 Thread John Levon
On Tue, Oct 22, 2002 at 07:13:19PM +0200, Andre Poenitz wrote: > 544: Did I mention that I do not share Trolltech's opinion on what makes decent > C++ code? o I dno not share the lyx source's opinion of what makes decent C++ code either ;) I still manage to fix things ergardless :) > 618: Nestin

Re: Rob's patch: the next installment

2002-10-22 Thread Juergen Spitzmueller
Andre Poenitz wrote: > Could you setup the framework at least? I.e. the files which are needed > etc? I'll see what is possible. First, I'll have a go at math-matrix. Jürgen

Re: Rob's patch: the next installment

2002-10-22 Thread Andre Poenitz
On Tue, Oct 22, 2002 at 06:51:39PM +0200, Juergen Spitzmueller wrote: > Unfortunately I cannot help on the two big remaining dialogs, due to lacking > skills and limited time, but I can probably help fixing/finishing the tiny > bits. Could you setup the framework at least? I.e. the files which a

Re: Rob's patch: the next installment

2002-10-22 Thread Andre Poenitz
On Tue, Oct 22, 2002 at 05:47:02PM +0100, John Levon wrote: > There are loads. e.g. > > bug 544 bug 618 bug 552 bug 660 bug 664 bug 668 bug 617 bug 599 as just > a random selection of bugs that don't require significant surgery. > > > through the spaghetti pile certainly takes time. > > Of cour

Re: Rob's patch: the next installment

2002-10-22 Thread John Levon
On Tue, Oct 22, 2002 at 07:03:46PM +0200, Juergen Spitzmueller wrote: > BTW: What about the math matrix dialog? Is this missing? I could have a go at Sure. I was a bit dubious about creating it, but I suppose we need it. btw, you can also design UI files for the other "big two" (prefs needs to

Re: Rob's patch: the next installment

2002-10-22 Thread Juergen Spitzmueller
John Levon wrote: > I expect I will have time to do these two before christmas. It would be > nice if all the other problems were resolved by that point too, and I > can have my xmas present. That'd be cool indeed. I see if I can solve a few of the problems in the dialogs (e.g. graphics), but I'l

Re: Rob's patch: the next installment

2002-10-22 Thread John Levon
On Tue, Oct 22, 2002 at 06:51:39PM +0200, Juergen Spitzmueller wrote: > Unfortunately I cannot help on the two big remaining dialogs, due to lacking I expect I will have time to do these two before christmas. It would be nice if all the other problems were resolved by that point too, and I can h

Re: Rob's patch: the next installment

2002-10-22 Thread Juergen Spitzmueller
John Levon wrote: > > Or, more interesting "future plans for the current month" or "year". > No idea ... Unfortunately I cannot help on the two big remaining dialogs, due to lacking skills and limited time, but I can probably help fixing/finishing the tiny bits. Of course it would be good to kno

Re: Rob's patch: the next installment

2002-10-22 Thread John Levon
On Tue, Oct 22, 2002 at 06:40:19PM +0200, Andre Poenitz wrote: > Without serious structural changes? I don't believe so. There are loads. e.g. bug 544 bug 618 bug 552 bug 660 bug 664 bug 668 bug 617 bug 599 as just a random selection of bugs that don't require significant surgery. > through t

Re: Rob's patch: the next installment

2002-10-22 Thread Andre Poenitz
On Tue, Oct 22, 2002 at 05:37:21PM +0100, John Levon wrote: > On Tue, Oct 22, 2002 at 06:35:42PM +0200, Andre Poenitz wrote: > > > That would not help the project much, would it? > > Well if that's what you want to do, there's plenty of core bugs that can > be fixed ! Without serious structural

Re: Rob's patch: the next installment

2002-10-22 Thread John Levon
On Tue, Oct 22, 2002 at 06:35:42PM +0200, Andre Poenitz wrote: > That would not help the project much, would it? Well if that's what you want to do, there's plenty of core bugs that can be fixed ! john -- "Lots of companies would love to be in our hole." - Scott McNealy

Re: Rob's patch: the next installment

2002-10-22 Thread Andre Poenitz
On Tue, Oct 22, 2002 at 05:26:32PM +0100, John Levon wrote: > I know you want to start hacking again, but why not look at some of the > mathed bugs on bugzilla ... Oh, I do from time to time. But I really to not want to put too much effort into temporary workarounds. Most of the bugs there are in

Re: Rob's patch: the next installment

2002-10-22 Thread John Levon
On Tue, Oct 22, 2002 at 06:24:44PM +0200, Andre Poenitz wrote: > As in "the current week". > > Or, more interesting "future plans for the current month" or "year". No idea ... I know you want to start hacking again, but why not look at some of the mathed bugs on bugzilla ... Or just branch a n

Re: Rob's patch: the next installment

2002-10-22 Thread Andre Poenitz
On Tue, Oct 22, 2002 at 05:22:40PM +0100, John Levon wrote: > > I was not asking about "recently" but "currently". > > How current is current ... As in "the current week". Or, more interesting "future plans for the current month" or "year". Andre' -- Those who desire to give up Freedom in ord

Re: Rob's patch: the next installment

2002-10-22 Thread John Levon
On Tue, Oct 22, 2002 at 06:12:49PM +0200, Andre Poenitz wrote: > I was not asking about "recently" but "currently". How current is current ... john -- "Lots of companies would love to be in our hole." - Scott McNealy

Re: Rob's patch: the next installment

2002-10-22 Thread Andre Poenitz
On Tue, Oct 22, 2002 at 05:09:47PM +0100, John Levon wrote: > > Is there currently anybody actively working on the Qt port? > > Huh ? HAven't you been reading the mailing list ? > > There have been several important Qt fixes recently, and Juergen S > implemented two new dialogs, and Edwin did mos

Re: Rob's patch: the next installment

2002-10-22 Thread Angus Leeming
On Tuesday 22 October 2002 4:58 pm, Lars Gullik Bjønnes wrote: > | Incidentally, shall I continue posting all these bits to the > | list or can I just apply the 'trivial' bits? > > I think it nice to see them, but you could perhaps make the > bits larger if that is more convenient for you. Ok. >

Re: Rob's patch: the next installment

2002-10-22 Thread John Levon
On Tue, Oct 22, 2002 at 05:40:49PM +0200, Andre Poenitz wrote: > Is there currently anybody actively working on the Qt port? Huh ? HAven't you been reading the mailing list ? There have been several important Qt fixes recently, and Juergen S implemented two new dialogs, and Edwin did most of the

Re: Rob's patch: the next installment

2002-10-22 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | This patch contains the remaining "miscellaneous" changes | in Rob's patch. > | It changes the "apparent" semantics of both RadioButtonGroup. and | xforms_helper's getString() | I say "apparent", because the practical effect is nil; it's a clean-up, |

Re: Rob's patch: the next installment

2002-10-22 Thread Andre Poenitz
On Tue, Oct 22, 2002 at 04:35:30PM +0100, Angus Leeming wrote: > Incidentally, shall I continue posting all these bits to the list or can I > just apply the 'trivial' bits? I would not mind you applying the 'trivial' bits On a related issue: Is there currently anybody actively working on th