Re: tabular woes

2002-07-26 Thread John Levon

On Fri, Jul 26, 2002 at 03:14:08PM +0200, Jean-Marc Lasgouttes wrote:

 The reason I meantion it is that I do not understand how a test like
   if (ev-xmotion.x != x_old ||
   ev-xmotion.y != y_old ||
   fl_get_scrollbar_value(area-scrollbar) != scrollbar_value_old
 
 can make sense since one is comparing a double with an int.

It undoubtedly can't ...

 John, can you make sure the logic is right? (I am especially wary of 1.2.1).

Now you're making a double comparison without an epsilon ... that's not
reliable. We have a float_equals somewhere

regards
john



Re: Counters work

2002-07-26 Thread Martin Vermeer

On Wed, Jul 17, 2002 at 11:25:26AM +0100, Angus Leeming wrote:
 
 On Tuesday 16 July 2002 9:12 pm, Martin Vermeer wrote:
  Let me make this perfectly clear: this just compiles. And looks
  beautiful (doesn't it?). And is believed to be politically correct.
  Thanks... I'm slowly getting this C++ philosophy :-)
 
 ;-) Well make it useful then!

Slowly, slowly...
 
 What about this comment? Do you plan to address it?

Not at this stage. As Lars commented, at some point this should
become layout-driven. Addressing the problem in the proper way.

 +Counters::Counters()
  {
 + // Ehh, should this take a textclass arg?
 +
 + // Sectioning counters:
 + newCounter(part);
 + newCounter(chapter);
 + newCounter(section, chapter);
 + newCounter(subsection, section);
 + newCounter(subsubsection, subsection);
 + newCounter(paragraph, subsubsection);
 + newCounter(subparagraph, paragraph);
 +
 + // Enumeration counters:
 + newCounter(emumi);
 + newCounter(emumii, enumi);
 + newCounter(enumiii, enumii);
 + newCounter(enumiv, enumiii);
 +
 + // Float counters:
 + newCounter(figure);
 + newCounter(table);
  }
 
 If you did, then the ugliness that is numberlabel might become less horrible 
 and more beauiful. 

Actually it's better already. Don't see how it could be *much* better,
given that the full syntax of printed headers must be described.
Actually I think it could be more general... but yes, that would add
ugliness. Wonder if this is something to describe/parametrize in the
layout file as well. Not at this stage though, let's get this working 
first.

 A suitable guest indeed at your summer cottage.

The beautiful days are over again... nothing to clear the mind like
wood-chopping and bird-watching. And a wood-fired sauna... would be
some place for a LyX developers meeting. Only thing lacking is
internet access. (And electicity. And running water.) But that's a 
detail!

 Angus
 
Martin




msg41895/pgp0.pgp
Description: PGP signature


Re: [PATCH] Win32 native support II

2002-07-26 Thread Ruurd Reitsma

Kuba Ober [EMAIL PROTECTED] wrote

 Do you have your VS updated with the latest service pack? I imagine some
 things that you patch might be VC++ quirks that might have got fixed in
SP's.

I imagine i would have never gotten this far without the service packs...and
even then.
I'm not using the compiler anyway, just the IDE. The intel compiler 6.0
compiler is quite complaint.

Ruurd







Re: [PATCH] Win32 native support II

2002-07-26 Thread Andre Poenitz

On Fri, Jul 26, 2002 at 02:28:34PM +0200, Ruurd Reitsma wrote:
 Well, it could. However, most _WIN32 #ifdefs outside of support are one-time
 issues that would need very specific helper functions. Anyway, the __EMX__
 stuff is also still there.

So that should probably be moved, too.

  +++ src/graphics/GraphicsParams.h 2002/07/26 10:11:41
   -19,6 +19,9 
  #include GraphicsTypes.h
  #include LString.h
 
  +#ifndef uint
  +typedef unsigned int uint;
  +#endif
 
 
  Why is that needed?
 
 GraphicsImageXPM.C needs it. It should move elsewhere, I agree.

Its not really needed, line 562 there should be something like

  return static_castunsigned int(i);

  #include cstdlib
  #include csignal
 
  +#include support/os.h
  +
  using std::vector;
  using std::endl;
 
 
 
  Why?
 
 Os.h throws in some POSIX signal defs if it detects _SIGNAL_H_

Headers should be self-contained, shouldn't they? So I thnik the proper way
to do it is to include csignal in support/os.h.

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: INSET Float bug (was Re: Float patch bug)

2002-07-26 Thread Juergen Spitzmueller

Dekel Tsur wrote:
  You're right, it is document defaults, which I was not aware of and which
  leads me to a question: shouldn't we distinguish between (1) individual
  float placement, (2) document default (set in Documents - Extras)
  AND (3) float defaults? Currently (3) is not chosable.

 Again, no!
 This will just complicate things, and really not needed.

But the user has to be able to use a \begin{float} without options in ANY 
case, which he can't currently.

  E.g.: If the user has set !p in Document Extras, he will get
  \begin{figure}[!p] both if he choses defaults or if he selects nothing
  in the dialog. He's not able to create a simple \begin{figure}. Thats
  because of

 That is because the code for setting document default placement is stupid.
 it should just \def{\fps@figure}{..} and then use \begin{figure} in all
 floats (that use the default placement).

So default should be float default (i.e. no options) instead of document 
defaults? Then the Layout-Document-Extras-Float Placement can be deleted 
because it is totally useless (which is fine with me).

Jürgen.




Re: tabular woes

2002-07-26 Thread Jean-Marc Lasgouttes

 John == John Levon [EMAIL PROTECTED] writes:

John On Wed, Jul 24, 2002 at 07:34:20PM +0200, Edwin Leuven wrote:
 what I do is the following 1. start lyx 2. insert 5x5 table 3a.
 click left mouse button and keep it pressed for ca 5 secs

John Try the below. Same goes for 1.2.x

When trying to apply to 1.2.x, I saw I needed the attached patch to
avoid a warning

The reason I meantion it is that I do not understand how a test like
if (ev-xmotion.x != x_old ||
ev-xmotion.y != y_old ||
fl_get_scrollbar_value(area-scrollbar) != scrollbar_value_old

can make sense since one is comparing a double with an int.

John, can you make sure the logic is right? (I am especially wary of 1.2.1).

JMarc

Index: src/frontends/xforms/ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/ChangeLog,v
retrieving revision 1.498
diff -u -p -r1.498 ChangeLog
--- src/frontends/xforms/ChangeLog  25 Jul 2002 18:15:33 -  1.498
+++ src/frontends/xforms/ChangeLog  26 Jul 2002 12:37:45 -
@@ -1,3 +1,8 @@
+2002-07-26  Jean-Marc Lasgouttes  [EMAIL PROTECTED]
+
+   * XWorkArea.C (work_area_handler): change type of
+   scrollbar_value_old to double
+
 2002-07-25  John Levon  [EMAIL PROTECTED]
 
* lyx_gui.C:
Index: src/frontends/xforms/XWorkArea.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/XWorkArea.C,v
retrieving revision 1.17
diff -u -p -r1.17 XWorkArea.C
--- src/frontends/xforms/XWorkArea.C25 Jul 2002 18:15:33 -  1.17
+++ src/frontends/xforms/XWorkArea.C26 Jul 2002 12:37:45 -
@@ -332,7 +332,7 @@ int XWorkArea::work_area_handler(FL_OBJE
 {
static int x_old = -1;
static int y_old = -1;
-   static long scrollbar_value_old = -1;
+   static double scrollbar_value_old = -1;
 
XEvent * ev = static_castXEvent*(xev);
XWorkArea * area = static_castXWorkArea*(ob-u_vdata);



Re: INSET Float bug (was Re: Float patch bug)

2002-07-26 Thread John Levon

On Fri, Jul 26, 2002 at 05:41:40PM +0300, Dekel Tsur wrote:

 On Fri, Jul 26, 2002 at 09:24:43AM +0200, Juergen Spitzmueller wrote:
  
  You're right, it is document defaults, which I was not aware of and which 
  leads me to a question: shouldn't we distinguish between (1) individual 
  float placement, (2) document default (set in Documents - Extras) AND 
  (3) float defaults? Currently (3) is not chosable.
 
 Again, no!
 This will just complicate things, and really not needed.

I agree: the user has specifically chosen a document default set, so if
they /don't/ want that for a particular float, they /must/ have an idea
of what they do want. So having an option for float defaults is
unnecessary

regards
john
-- 
The new WinFix 4.3 is a very effective way to improve the reliability of
 Windows, because it makes Windows fault-tolerant and self-repairing. And
 WinFix is very safe, because it operates completely independent of Windows.
- Spam



Re: tabular woes

2002-07-26 Thread John Levon

On Fri, Jul 26, 2002 at 03:14:08PM +0200, Jean-Marc Lasgouttes wrote:

> The reason I meantion it is that I do not understand how a test like
>   if (ev->xmotion.x != x_old ||
>   ev->xmotion.y != y_old ||
>   fl_get_scrollbar_value(area->scrollbar) != scrollbar_value_old
> 
> can make sense since one is comparing a double with an int.

It undoubtedly can't ...

> John, can you make sure the logic is right? (I am especially wary of 1.2.1).

Now you're making a double comparison without an epsilon ... that's not
reliable. We have a float_equals<> somewhere

regards
john



Re: "Counters" work

2002-07-26 Thread Martin Vermeer

On Wed, Jul 17, 2002 at 11:25:26AM +0100, Angus Leeming wrote:
 
> On Tuesday 16 July 2002 9:12 pm, Martin Vermeer wrote:
> > Let me make this perfectly clear: this just compiles. And looks
> > beautiful (doesn't it?). And is believed to be politically correct.
> > Thanks... I'm slowly getting this C++ philosophy :-)
> 
> ;-) Well make it useful then!

Slowly, slowly...
 
> What about this comment? Do you plan to address it?

Not at this stage. As Lars commented, at some point this should
become layout-driven. Addressing the problem in the proper way.

> +Counters::Counters()
>  {
> + // Ehh, should this take a textclass arg?
> +
> + // Sectioning counters:
> + newCounter("part");
> + newCounter("chapter");
> + newCounter("section", "chapter");
> + newCounter("subsection", "section");
> + newCounter("subsubsection", "subsection");
> + newCounter("paragraph", "subsubsection");
> + newCounter("subparagraph", "paragraph");
> +
> + // Enumeration counters:
> + newCounter("emumi");
> + newCounter("emumii", "enumi");
> + newCounter("enumiii", "enumii");
> + newCounter("enumiv", "enumiii");
> +
> + // Float counters:
> + newCounter("figure");
> + newCounter("table");
>  }
> 
> If you did, then the ugliness that is numberlabel might become less horrible 
> and more beauiful. 

Actually it's better already. Don't see how it could be *much* better,
given that the full syntax of printed headers must be described.
Actually I think it could be more general... but yes, that would add
ugliness. Wonder if this is something to describe/parametrize in the
layout file as well. Not at this stage though, let's get this working 
first.

> A suitable guest indeed at your summer cottage.

The beautiful days are over again... nothing to clear the mind like
wood-chopping and bird-watching. And a wood-fired sauna... would be
some place for a LyX developers meeting. Only thing lacking is
internet access. (And electicity. And running water.) But that's a 
detail!

> Angus
 
Martin




msg41895/pgp0.pgp
Description: PGP signature


Re: [PATCH] Win32 native support II

2002-07-26 Thread Ruurd Reitsma

"Kuba Ober" <[EMAIL PROTECTED]> wrote

> Do you have your VS updated with the latest service pack? I imagine some
> things that you patch might be VC++ quirks that might have got fixed in
SP's.

I imagine i would have never gotten this far without the service packs...and
even then.
I'm not using the compiler anyway, just the IDE. The intel compiler 6.0
compiler is quite complaint.

Ruurd







Re: [PATCH] Win32 native support II

2002-07-26 Thread Andre Poenitz

On Fri, Jul 26, 2002 at 02:28:34PM +0200, Ruurd Reitsma wrote:
> Well, it could. However, most _WIN32 #ifdefs outside of support are one-time
> issues that would need very specific helper functions. Anyway, the __EMX__
> stuff is also still there.

So that should probably be moved, too.

> > +++ src/graphics/GraphicsParams.h 2002/07/26 10:11:41
> > @@ -19,6 +19,9 @@
> > #include "GraphicsTypes.h"
> > #include "LString.h"
> >
> > +#ifndef uint
> > +typedef unsigned int uint;
> > +#endif
> >
> >
> > Why is that needed?
> 
> GraphicsImageXPM.C needs it. It should move elsewhere, I agree.

Its not really needed, line 562 there should be something like

  return static_cast(i);

> > #include 
> > #include 
> >
> > +#include "support/os.h"
> > +
> > using std::vector;
> > using std::endl;
> >
> >
> >
> > Why?
> 
> Os.h throws in some POSIX signal defs if it detects _SIGNAL_H_

Headers should be self-contained, shouldn't they? So I thnik the proper way
to do it is to include  in support/os.h.

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: INSET Float bug (was Re: Float patch bug)

2002-07-26 Thread Juergen Spitzmueller

Dekel Tsur wrote:
> > You're right, it is document defaults, which I was not aware of and which
> > leads me to a question: shouldn't we distinguish between (1) "individual
> > float placement", (2) "document default" (set in Documents -> Extras")
> > AND (3) "float defaults"? Currently (3) is not chosable.
>
> Again, no!
> This will just complicate things, and really not needed.

But the user has to be able to use a \begin{float} without options in ANY 
case, which he can't currently.

> > E.g.: If the user has set !p in Document Extras, he will get
> > \begin{figure}[!p] both if he choses "defaults" or if he selects nothing
> > in the dialog. He's not able to create a simple \begin{figure}. Thats
> > because of
>
> That is because the code for setting document default placement is stupid.
> it should just \def{\fps@figure}{..} and then use \begin{figure} in all
> floats (that use the default placement).

So "default" should be "float default" (i.e. no options) instead of "document 
defaults"? Then the Layout->Document->Extras->Float Placement can be deleted 
because it is totally useless (which is fine with me).

Jürgen.




Re: tabular woes

2002-07-26 Thread Jean-Marc Lasgouttes

> "John" == John Levon <[EMAIL PROTECTED]> writes:

John> On Wed, Jul 24, 2002 at 07:34:20PM +0200, Edwin Leuven wrote:
>> what I do is the following 1. start lyx 2. insert 5x5 table 3a.
>> click left mouse button and keep it pressed for ca 5 secs

John> Try the below. Same goes for 1.2.x

When trying to apply to 1.2.x, I saw I needed the attached patch to
avoid a warning

The reason I meantion it is that I do not understand how a test like
if (ev->xmotion.x != x_old ||
ev->xmotion.y != y_old ||
fl_get_scrollbar_value(area->scrollbar) != scrollbar_value_old

can make sense since one is comparing a double with an int.

John, can you make sure the logic is right? (I am especially wary of 1.2.1).

JMarc

Index: src/frontends/xforms/ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/ChangeLog,v
retrieving revision 1.498
diff -u -p -r1.498 ChangeLog
--- src/frontends/xforms/ChangeLog  25 Jul 2002 18:15:33 -  1.498
+++ src/frontends/xforms/ChangeLog  26 Jul 2002 12:37:45 -
@@ -1,3 +1,8 @@
+2002-07-26  Jean-Marc Lasgouttes  <[EMAIL PROTECTED]>
+
+   * XWorkArea.C (work_area_handler): change type of
+   scrollbar_value_old to double
+
 2002-07-25  John Levon  <[EMAIL PROTECTED]>
 
* lyx_gui.C:
Index: src/frontends/xforms/XWorkArea.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/XWorkArea.C,v
retrieving revision 1.17
diff -u -p -r1.17 XWorkArea.C
--- src/frontends/xforms/XWorkArea.C25 Jul 2002 18:15:33 -  1.17
+++ src/frontends/xforms/XWorkArea.C26 Jul 2002 12:37:45 -
@@ -332,7 +332,7 @@ int XWorkArea::work_area_handler(FL_OBJE
 {
static int x_old = -1;
static int y_old = -1;
-   static long scrollbar_value_old = -1;
+   static double scrollbar_value_old = -1;
 
XEvent * ev = static_cast(xev);
XWorkArea * area = static_cast(ob->u_vdata);



Re: INSET Float bug (was Re: Float patch bug)

2002-07-26 Thread John Levon

On Fri, Jul 26, 2002 at 05:41:40PM +0300, Dekel Tsur wrote:

> On Fri, Jul 26, 2002 at 09:24:43AM +0200, Juergen Spitzmueller wrote:
> > 
> > You're right, it is document defaults, which I was not aware of and which 
> > leads me to a question: shouldn't we distinguish between (1) "individual 
> > float placement", (2) "document default" (set in Documents -> Extras") AND 
> > (3) "float defaults"? Currently (3) is not chosable.
> 
> Again, no!
> This will just complicate things, and really not needed.

I agree: the user has specifically chosen a document default set, so if
they /don't/ want that for a particular float, they /must/ have an idea
of what they do want. So having an option for float defaults is
unnecessary

regards
john
-- 
"The new WinFix 4.3 is a very effective way to improve the reliability of
 Windows, because it makes Windows fault-tolerant and self-repairing. And
 WinFix is very safe, because it operates completely independent of Windows."
- Spam