Ridiculous...

2002-03-13 Thread Adam Fowler

Hullo all,

I regard the following scenario which has occurred to me as ridiculous.
Any help would be appreciated.

I had an old CVS version of lyx installed, so I nuked the directory,
binary, and user .lyx directories before upgrading - just to be on the
safe side. (No that the following worked before)

Then I got the latest 1.2.0 cvs snapshot, compiled, did a make, make
install-strip. I then downloaded db2lyx 0.1.4 (As 0.1.5 completely died
- although I did try it first just to make sure. It had issues finding
the DocBook XSL directories, even though the classpaths, other paths etc
were EXACTLY THE SAME as I was using a script, and renaming the
directories - e.g. mv db2lyx-015 db2lyx). I also downloaded xt.jar,
xp.jar, the catalog jars, and mml and put them in:-
/usr/share/mml
/usr/share/catalog
/usr/share/docbook-xml
/usr/share/docbook-xsl/1.49

I setup a catalog file to reflect these (attached). I made a script to
alleviate the problem of classpaths (I don't want to change the system
classpath just for one program) which calls config_xml. This file is
called doit.sh (attached) and resides in /usr/local/share/lyx. I then
edited the patched configure script (attached) to call doit.sh instead
of config_xml.

I now run doit.sh and it works fine (well, doesn't error at least).

On starting lyx it also runs doit.sh (obviously), the output of which is
attached also. Surprise surprise it doesn't work :/

I clicked reconfigure in lyx, then restarted and low and behold the
old freeze-on-splash-screen-when-the-user-has-a-.lyx-directory bug
strikes again! This SURELY can't just be happening to me!?!

The files are attached anyway. If someone could figure out what the hell
is going on it would be much appreciated. I can give more info if you
need it.

Cheers,

Adam.

-- 

|  Adam Fowler |
| Third year undergraduate  | TomcatBook Project   |
| Computer Science  | Author and Administrator |
| University of Wales, Aberystwyth  | http://tomcatbook.sourceforge.net|
| Web: http://users.aber.ac.uk/aff9 | [EMAIL PROTECTED]   |




PUBLIC -//OASIS//DTD DocBook XML V4.1.2//EN 
   file:///usr/share/docbook-xml/docbookx.dtd
  
PUBLIC -//DB2LyX//Norman Walsh's XSL Stylesheet Directory//EN 
   file:///usr/share/docbook-xsl/1.49
 
PUBLIC -//DB2LyX//MathML ISO Entities Directory//EN 
   file:///home/share/mml
   


#! /bin/sh
# This script is a hand-made configure script. It contains a lot of
# code stolen from GNU autoconf. I removed all the code that was not
# useful for configuring a LyX installation.







some configuration variables
outfile=lyxrc.defaults
rc_entries=
lyx_check_config=yes
lyx_keep_temps=no
srcdir=
lyx_suffix=

 Parse the command line
for ac_option do
  case $ac_option in
-help | --help | -h)
  cat  EOF
Usage: configure [options] 
Options: 
  --help   show this help lines
  --keep-temps keep temporary files (for debug. purposes)
  --without-latex-config   do not run LaTeX to determine configuration
  --with-lyx-suffix=suffix suffix of binary installed files
EOF
  exit 0;;
--without-latex-config)
  lyx_check_config=no ;;
--keep-temps)
  lyx_keep_temps=yes ;;
--with-lyx-suffix*)
  lyx_suffix=`echo $ac_option | sed 's,--with-lyx-suffix=,,;s,^,-,'`
  esac 
done


 Checking for some echo oddities
if (echo testing\c; echo 1,2,3) | grep c /dev/null; then
  # Stardent Vistra SVR4 grep lacks -e, says [EMAIL PROTECTED]
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn /dev/null; then
ac_n= ac_c='
' ac_t='	'
  else
ac_n=-n ac_c= ac_t=
  fi
else
  ac_n= ac_c='\c' ac_t=
fi


 I do not really know why this is useful, but we might as well keep it.
# NLS nuisances.
# Only set these to C if already set.  These must not be set unconditionally
# because not all systems understand e.g. LANG=C (notably SCO).
# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
# Non-C LC_CTYPE values break the ctype check.
if test ${LANG+set}   = set; then LANG=C;   export LANG;   fi
if test ${LC_ALL+set} = set; then LC_ALL=C; export LC_ALL; fi
if test ${LC_MESSAGES+set} = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
if test ${LC_CTYPE+set}= set; then LC_CTYPE=C;export LC_CTYPE;fi


 Guess the directory in which configure is located.
ac_prog=$0
srcdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` 
srcdir=`echo ${srcdir} | sed 's%\([^/]\)/*$%\1%'`
test x$srcdir = x$ac_prog  srcdir=.
if test ! -r ${srcdir}/chkconfig.ltx ; then
  echo configure: error: cannot find chkconfig.ltx script
  exit 1
fi

 Adjust PATH for Win32 (Cygwin)
if test x$OSTYPE = xcygwin; then
  echo configure: cygwin detected; path correction
  srcdir=`cygpath -w 

Re: proposed cursor patch

2002-03-13 Thread Angus Leeming

On Tuesday 12 March 2002 8:51 pm, John Levon wrote:
 On Tue, Mar 12, 2002 at 08:33:07PM +0100, Lars Gullik Bjønnes wrote:
 
  | Any objections if I apply it? (and strip the associated X11 stuff from 
  | BufferView::pimpl).
  
  I object. This is guii work and we shoulc not do this now.
 
 Besides, I am some of the way through a major upheaval, so any unnecessary
 patches in this area make my life harder

Fine. I'll just put in the stuff in the xforms frontend which fixes (hides) 
the Bad Window message and which sets the color of all four cursors that we 
use, not just two of them. That _is_ a bug fix, albeit a minor one.

I'll also enquire of the xforms list why FL_ObjWin(o) can return 0.

Angus



Re: getFontSettings optimization

2002-03-13 Thread Jean-Marc Lasgouttes

 Lars == Lars Gullik Bjønnes [EMAIL PROTECTED] writes:

Lars I think this is a better algorithm for font lookup. (at least
Lars gprof tells me so)

This is probably true, since there are very few font changes in a
typical paragraph. What are the getFontSettings numbers down to?

I've been wanting to work on getFontSetting after 1.2.0, so I would
like to see whether this very simple approach is enough.

JMarc




Re: math-macro-arg does not work

2002-03-13 Thread Jean-Marc Lasgouttes

 Andre == Andre Poenitz [EMAIL PROTECTED] writes:

Andre On Tue, Mar 12, 2002 at 06:15:31PM +0100, Jean-Marc Lasgouttes
Andre wrote: I guess this has not found much testing lately since the
Andre same effect is obtained by 'self-insert \#1' or directly typing
Andre '#1' in the formula.
  I tried that, and I get in my file:
 
 \begin_inset FormulaMacro \newcommand{\ind}{\mathbb{1}_{\{#1\}}}

Andre Hm... of course the macro has to be created with the right
Andre number of args from the beginning (M-x math-macro ind 1) ...
Andre but LyX should not crash. This is a bug.

Ahh, you did not tell me that I could give the number of args second
argument as second argument... I see now. LyX should even not let me
enter #1 if the macro has no arguments.

JMarc



Re: guii patch

2002-03-13 Thread Angus Leeming

On Wednesday 13 March 2002 12:38 am, John Levon wrote:
 Here :
 
 http://www.movement.uklinux.net/q1.diff.gz

File not found
A



Re: math-macro-arg does not work

2002-03-13 Thread Andre Poenitz

On Wed, Mar 13, 2002 at 10:19:57AM +0100, Jean-Marc Lasgouttes wrote:
 Andre Hm... of course the macro has to be created with the right
 Andre number of args from the beginning (M-x math-macro ind 1) ...
 Andre but LyX should not crash. This is a bug.
 
 Ahh, you did not tell me that I could give the number of args second
 argument as second argument... I see now. LyX should even not let me
 enter #1 if the macro has no arguments.

I am currently trying to fix that...

Andre'

-- 
André Pönitz .. [EMAIL PROTECTED]



Re: lyxtextclass optimization

2002-03-13 Thread Jean-Marc Lasgouttes

 Lars == Lars Gullik Bjønnes [EMAIL PROTECTED] writes:

Lars With the patch below:

Lars Flat profile:

Excellent. 

JMarc



Re: cut paste from e-mail

2002-03-13 Thread Jean-Marc Lasgouttes

 Vitaly == Vitaly Lipatov [EMAIL PROTECTED] writes:

Vitaly I do a similar converter for my own needs. I thought I can
Vitaly found such converter anywhere, but I can't. Did you hear about
Vitaly similar projects?

I think I did, but I can't remember now.

JMarc



Re: makefile patch

2002-03-13 Thread Jean-Marc Lasgouttes

 Lars == Lars Gullik Bjønnes [EMAIL PROTECTED] writes:

Lars This is a think I have been planning to do with the makefiles
Lars for a long time. I am sure there are details that can be
Lars imporved, but this should make sure that the Makefile.am's are a
Lars lot more uniform.

Lars Please comment.

I'm not sure I like the contents of your include file.

+AUTOMAKE_OPTIONS = foreign 1.5
+

So you want to force automake 1.5? Can't this wait for 1.3.0cvs?

+DISTCLEANFILES= -r *.orig *.rej *~ *.bak lyx.1 core libintl.h config.h config.status 
+config.cache config.log \
+   $(srcdir)/sourcedoc/*~ \
+   $(srcdir)/sourcedoc/html $(srcdir)/sourcedoc/latex \
+   $(srcdir)/sourcedoc/man $(srcdir)/sourcedoc/Doxyfile

Most of the files there can only exist in _some_ directory (toplevel
or src). It does not make sense to mention them in a file included
everywhere. I don't like that.

+MAINTAINERCLEANFILES = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
+   $(srcdir)/aclocal.m4 \
+   $(srcdir)/configure $(srcdir)/development/lyx.spec \
+   $(srcdir)/acinclude.m4 $(srcdir)/sourcedoc/Doxyfile

Here also, only $(srcdir)/Makefile.in is generic and should be here.

JMarc



Re: getFontSettings optimization

2002-03-13 Thread Andre Poenitz

On Wed, Mar 13, 2002 at 11:00:30AM +0100, Jean-Marc Lasgouttes wrote:
 Andre Concerning the excessive memory consumption: I believe that one
 Andre could reduce it significantly by converting parts 'far from the
 Andre cursor' (i.e not the same word or the same line or paragraph)
 Andre to some more compact form where chars of the same font are
 Andre collected in some kind of 'string inset'...
 
 Are you speaking about the normal paragraph structure? I do not see
 what could be more compact than the FontTable approach.

'Excessive memory consumption when using mathed's approach without any
change'. The current FontTable approach is indeed pretty compact, but I
have the suspicion that it is more code involved than necessary for the
task as such...

Andre'

-- 
André Pönitz .. [EMAIL PROTECTED]



read access to Painter::owner

2002-03-13 Thread Andre Poenitz


Can I have a read accessor to painter::owner (or something else that allows
me to retrieve the size of the 'interesting' area on screen)?

Andre'

-- 
André Pönitz .. [EMAIL PROTECTED]



Re: lfuncore.diff

2002-03-13 Thread Jean-Marc Lasgouttes

 John == John Levon [EMAIL PROTECTED] writes:

John can someone apply lfun_core.diff please ?

Done in my local tree.

JMarc



Re: getFontSettings optimization

2002-03-13 Thread Jean-Marc Lasgouttes

 Andre == Andre Poenitz [EMAIL PROTECTED] writes:

Andre On Wed, Mar 13, 2002 at 11:00:30AM +0100, Jean-Marc Lasgouttes
Andre wrote: Concerning the excessive memory consumption: I believe
Andre that one could reduce it significantly by converting parts 'far
Andre from the cursor' (i.e not the same word or the same line or
Andre paragraph) to some more compact form where chars of the same
Andre font are collected in some kind of 'string inset'...
  Are you speaking about the normal paragraph structure? I do not
 see what could be more compact than the FontTable approach.

Andre 'Excessive memory consumption when using mathed's approach
Andre without any change'. The current FontTable approach is indeed
Andre pretty compact, but I have the suspicion that it is more code
Andre involved than necessary for the task as such...

In fact, a cursor (or rather an iterator over a paragraph) could 
maintain an index in the fonttable for the current cur position.

JMarc



RE: read access to Painter::owner

2002-03-13 Thread Juergen Vigna


On 13-Mar-2002 Andre Poenitz wrote:
 
 Can I have a read accessor to painter::owner (or something else that allows
 me to retrieve the size of the 'interesting' area on screen)?

Well the painters owner should be the BufferView and you have access to
it. In which function do you need this?

   Jug

--
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._
Dr. Jürgen VignaE-Mail:  [EMAIL PROTECTED]
Italienallee 13/N   Tel/Fax: +39-0471-450260 / +39-0471-450253
I-39100 Bozen   Web: http://www.sad.it/~jug
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._

Documentation:
Instructions translated from Swedish by Japanese for English
speaking persons.




Re: read access to Painter::owner

2002-03-13 Thread Andre Poenitz

On Wed, Mar 13, 2002 at 11:26:49AM +0100, Juergen Vigna wrote:
 Well the painters owner should be the BufferView and you have access to
 it. In which function do you need this?

MathXArray::draw(). I just want to skip any work for cell outside the
visible workarea.

Andre'

-- 
André Pönitz .. [EMAIL PROTECTED]



figinset cruft

2002-03-13 Thread Angus Leeming

This is cruft from the figinset. It should go, go , go!

Angus

Index: src/WorkArea.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/WorkArea.C,v
retrieving revision 1.62
diff -u -p -r1.62 WorkArea.C
--- src/WorkArea.C  28 Feb 2002 14:06:17 -  1.62
+++ src/WorkArea.C  13 Mar 2002 10:42:47 -
 -39,8 +39,6  using std::endl;
 using std::abs;
 using std::hex;
 
-FL_OBJECT * figinset_canvas;
-
 namespace {
 
 inline
 -84,8 +82,6  WorkArea::WorkArea(int xpos, int ypos, i
 {
fl_freeze_all_forms();
 
-   figinset_canvas = 0;
-
if (lyxerr.debugging(Debug::WORKAREA))
lyxerr  Creating work area: +
xpos  '+'  ypos  ' '
 -93,14 +89,6  WorkArea::WorkArea(int xpos, int ypos, i
//
FL_OBJECT * obj;
int const bw = int(abs(fl_get_border_width()));
-
-   // We really want to get rid of figinset_canvas.
-   ::figinset_canvas = figinset_canvas = obj =
- fl_add_canvas(FL_NORMAL_CANVAS,
-   xpos + 1, ypos + 1, 1, 1, );
-   fl_set_object_boxtype(obj, FL_NO_BOX);
-   fl_set_object_resize(obj, FL_RESIZE_ALL);
-   fl_set_object_gravity(obj, NorthWestGravity, NorthWestGravity);
 
// a box
if (lyxerr.debugging(Debug::WORKAREA))
Index: src/WorkArea.h
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/WorkArea.h,v
retrieving revision 1.29
diff -u -p -r1.29 WorkArea.h
--- src/WorkArea.h  7 Feb 2002 16:43:53 -   1.29
+++ src/WorkArea.h  13 Mar 2002 10:42:47 -
 -151,8 +151,6  private:
Pixmap workareapixmap;
///
Painter painter_;
-   ///
-   FL_OBJECT * figinset_canvas;
/// if we call redraw with true needed for locking-insets
bool screen_cleared;
 };



Re: read access to Painter::owner

2002-03-13 Thread Juergen Vigna


On 13-Mar-2002 Andre Poenitz wrote:

 MathXArray::draw(). I just want to skip any work for cell outside the
 visible workarea.

Have a look at InsetTabular::draw I'll do that there too.

  Jug

--
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._
Dr. Jürgen VignaE-Mail:  [EMAIL PROTECTED]
Italienallee 13/N   Tel/Fax: +39-0471-450260 / +39-0471-450253
I-39100 Bozen   Web: http://www.sad.it/~jug
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._

The Hollywood tradition I like best is called sucking up to the stars.
-- Johnny Carson




Re: getFontSettings optimization

2002-03-13 Thread Jean-Marc Lasgouttes

 Lars == Lars Gullik Bjønnes [EMAIL PROTECTED] writes:


Lars Each sample counts as 0.01 seconds. 
[...]

getFontSettings is down to .23ms/call from 0.89. This is good.

Lars | I've been wanting to work on getFontSetting after 1.2.0, so I
Lars would | like to see whether this very simple approach is enough.

Lars I have done the same change to other functions that used matchFT
Lars and lowerbound.

Looks like you create common code that should be factored in some
helper function.

JMarc



Re: read access to Painter::owner

2002-03-13 Thread Andre Poenitz

On Wed, Mar 13, 2002 at 11:52:55AM +0100, Juergen Vigna wrote:
  MathXArray::draw(). I just want to skip any work for cell outside the
  visible workarea.
 
 Have a look at InsetTabular::draw I'll do that there too.

Ah... PainterBase::paperHeight() and ...Width() seem to do the trick.

Andre'

-- 
André Pönitz .. [EMAIL PROTECTED]



small stuff

2002-03-13 Thread Andre Poenitz


* whitespace changes
* member var with trailing underscore
* one-line comments changed to ///

Ok to apply (together with ChangeLog entry)?

Andre'

-- 
André Pönitz .. [EMAIL PROTECTED]


Index: Painter.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/Painter.C,v
retrieving revision 1.32
diff -u -p -r1.32 Painter.C
--- Painter.C   27 Feb 2002 09:59:48 -  1.32
+++ Painter.C   13 Mar 2002 11:27:41 -
@@ -48,7 +48,7 @@ Painter::Painter(WorkArea  wa)
 
 PainterBase  Painter::point(int x, int y, LColor::color c)
 {
-   XDrawPoint(display, owner.getPixmap(),
+   XDrawPoint(display, owner_.getPixmap(),
   lyxColorHandler-getGCForeground(c), x, y);
return *this;
 }
@@ -59,7 +59,7 @@ PainterBase  Painter::line(int x1, int 
enum line_style ls,
enum line_width lw)
 {
-   XDrawLine(display, owner.getPixmap(), 
+   XDrawLine(display, owner_.getPixmap(), 
  lyxColorHandler-getGCLinepars(ls, lw, col),
  x1, y1, x2, y2);
return *this;
@@ -78,7 +78,7 @@ PainterBase  Painter::lines(int const *
points[i].y = yp[i];
}
 
-XDrawLines(display, owner.getPixmap(),
+XDrawLines(display, owner_.getPixmap(),
   lyxColorHandler-getGCLinepars(ls, lw, col), 
   points.get(), np, CoordModeOrigin);
 
@@ -91,7 +91,7 @@ PainterBase  Painter::rectangle(int x, 
 enum line_style ls,
 enum line_width lw)
 {
-   XDrawRectangle(display, owner.getPixmap(),
+   XDrawRectangle(display, owner_.getPixmap(),
   lyxColorHandler-getGCLinepars(ls, lw, col), 
   x, y, w, h);
return *this;
@@ -101,7 +101,7 @@ PainterBase  Painter::rectangle(int x, 
 PainterBase  Painter::fillRectangle(int x, int y, int w, int h,
 LColor::color col)
 {
-   XFillRectangle(display, owner.getPixmap(),
+   XFillRectangle(display, owner_.getPixmap(),
   lyxColorHandler-getGCForeground(col), x, y, w, h);
return *this;
 }
@@ -117,7 +117,7 @@ PainterBase  Painter::fillPolygon(int c
points[i].y = yp[i];
}
 
-   XFillPolygon(display, owner.getPixmap(),
+   XFillPolygon(display, owner_.getPixmap(),
 lyxColorHandler-getGCForeground(col), points.get(), np, 
 Nonconvex, CoordModeOrigin);
 
@@ -129,7 +129,7 @@ PainterBase  Painter::arc(int x, int y,
  unsigned int w, unsigned int h,
  int a1, int a2, LColor::color col)
 {
-XDrawArc(display, owner.getPixmap(),
+XDrawArc(display, owner_.getPixmap(),
 lyxColorHandler-getGCForeground(col),
  x, y, w, h, a1, a2);
return *this;
@@ -150,7 +150,7 @@ PainterBase  Painter::segments(int cons
s[i].x2 = x2[i];
s[i].y2 = y2[i];
}
-   XDrawSegments(display, owner.getPixmap(),
+   XDrawSegments(display, owner_.getPixmap(),
  lyxColorHandler-getGCLinepars(ls, lw, col),
  s.get(), ns);
 
@@ -162,9 +162,9 @@ PainterBase  Painter::pixmap(int x, int
 {
XGCValues val;
val.function = GXcopy;
-   GC gc = XCreateGC(display, owner.getPixmap(),
+   GC gc = XCreateGC(display, owner_.getPixmap(),
  GCFunction, val);
-   XCopyArea(display, bitmap, owner.getPixmap(), gc,
+   XCopyArea(display, bitmap, owner_.getPixmap(), gc,
  0, 0, w, h, x, y);
XFreeGC(display, gc);
return *this;
@@ -217,7 +217,7 @@ PainterBase  Painter::text(int x, int y
GC gc = lyxColorHandler-getGCForeground(f.realColor());
if (f.realShape() != LyXFont::SMALLCAPS_SHAPE) {
lyxfont::XSetFont(display, gc, f);
-   XDrawString(display, owner.getPixmap(), gc, x, y, s, ls);
+   XDrawString(display, owner_.getPixmap(), gc, x, y, s, ls);
} else {
LyXFont smallfont(f);
smallfont.decSize().decSize().setShape(LyXFont::UP_SHAPE);
@@ -226,12 +226,12 @@ PainterBase  Painter::text(int x, int y
char const c = uppercase(s[i]);
if (c != s[i]) {
lyxfont::XSetFont(display, gc, smallfont);
-   XDrawString(display, owner.getPixmap(), gc,
+   XDrawString(display, owner_.getPixmap(), gc,
tmpx, y, c, 1);
tmpx += lyxfont::XTextWidth(smallfont, c, 1);
} else {
lyxfont::XSetFont(display, gc, f);
-   

proposed cursor patch try 2

2002-03-13 Thread Angus Leeming

Gives us a well behaved and configurable cursor in the main window as well as 
in the dialogs (fixes bug #73).
Angus

Index: src/BufferView_pimpl.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/BufferView_pimpl.C,v
retrieving revision 1.212
diff -u -p -r1.212 BufferView_pimpl.C
--- src/BufferView_pimpl.C  12 Mar 2002 13:27:49 -  1.212
+++ src/BufferView_pimpl.C  13 Mar 2002 11:27:11 -
 -107,20 +107,6  void waitForX()
XSync(fl_get_display(), 0);
 }
 
-
-void SetXtermCursor(Window win)
-{
-   static Cursor cursor;
-   static bool cursor_undefined = true;
-   if (cursor_undefined) {
-   cursor = XCreateFontCursor(fl_get_display(), XC_xterm);
-   XFlush(fl_get_display());
-   cursor_undefined = false;
-   }
-   XDefineCursor(fl_get_display(), win, cursor);
-   XFlush(fl_get_display());
-}
-
 } // anon namespace
 
 
 -773,7 +759,7  void BufferView::Pimpl::selectionLost()
 void BufferView::Pimpl::enterView()
 {
if (active()  available()) {
-   SetXtermCursor(workarea_.getWin());
+   fl_set_cursor(workarea_.getWin(), XC_xterm);
using_xterm_cursor = true;
}
 }
 -782,7 +768,9  void BufferView::Pimpl::enterView()
 void BufferView::Pimpl::leaveView()
 {
if (using_xterm_cursor) {
-   XUndefineCursor(fl_get_display(), workarea_.getWin());
+   Cursor const cursor = Dialogs::tooltipsEnabled() ? 
+XC_question_arrow : FL_DEFAULT_CURSOR;
+fl_set_cursor(workarea_.getWin(), cursor);
using_xterm_cursor = false;
}
 }



Re: small stuff

2002-03-13 Thread Angus Leeming

On Wednesday 13 March 2002 11:35 am, Lars Gullik Bjønnes wrote:
 Andre Poenitz [EMAIL PROTECTED] writes:
 
 | * whitespace changes
 | * member var with trailing underscore
 
 I try to stay with the rule that only private class variables get the
 trailing underscore.
 
 How hard is it to make owner_ private?

If you're modifying Painter, then perhaps you could merge image() and 
pixmap() as we no longer have a figinset.

Angus



Re: small stuff

2002-03-13 Thread Andre Poenitz

On Wed, Mar 13, 2002 at 12:35:06PM +0100, Lars Gullik Bjønnes wrote:
 How hard is it to make owner_ private?

It is only use a couple of times to call a single function:

   owner_.getPixmap()

So we could have
   a private 'owner_' and a protected 'getPixmap'
or 
   a protected 'owner() const' 

Your call.

Andre'

-- 
André Pönitz .. [EMAIL PROTECTED]



Re: small stuff

2002-03-13 Thread Andre Poenitz

On Wed, Mar 13, 2002 at 11:41:59AM +, Angus Leeming wrote:
  How hard is it to make owner_ private?
 
 If you're modifying Painter, then perhaps you could merge image() and 
 pixmap() as we no longer have a figinset.

Uh.. it was just trivial stuff that caught my eye when hunting for
'paperHeight()'.

Andre'

-- 
André Pönitz .. [EMAIL PROTECTED]



Re: small stuff

2002-03-13 Thread Angus Leeming

On Wednesday 13 March 2002 11:45 am, Andre Poenitz wrote:
 On Wed, Mar 13, 2002 at 11:41:59AM +, Angus Leeming wrote:
   How hard is it to make owner_ private?
  
  If you're modifying Painter, then perhaps you could merge image() and 
  pixmap() as we no longer have a figinset.
 
 Uh.. it was just trivial stuff that caught my eye when hunting for
 'paperHeight()'.

Well this is just trivial cruft too...
A



Re: small stuff

2002-03-13 Thread Angus Leeming

On Wednesday 13 March 2002 11:43 am, Andre Poenitz wrote:
 On Wed, Mar 13, 2002 at 12:35:06PM +0100, Lars Gullik Bjønnes wrote:
  How hard is it to make owner_ private?
 
 It is only use a couple of times to call a single function:
 
owner_.getPixmap()
 
 So we could have
a private 'owner_' and a protected 'getPixmap'

Removes Painter.C's dependency on WorkArea...

 or 
a protected 'owner() const' 
 
 Your call.
 
 Andre'



Re: small stuff

2002-03-13 Thread Angus Leeming

On Wednesday 13 March 2002 11:50 am, Lars Gullik Bjønnes wrote:
 Andre Poenitz [EMAIL PROTECTED] writes:
 
 | On Wed, Mar 13, 2002 at 12:35:06PM +0100, Lars Gullik Bjønnes wrote:
  How hard is it to make owner_ private?
 
 | It is only use a couple of times to call a single function:
 
 |owner_.getPixmap()
 
 | So we could have
 |a private 'owner_' and a protected 'getPixmap'
 
 a protected getPixmap is then probably best.

Incidentally, these are historical cruft too by the look of things...

aleem@pneumon:src- grep -n dummy Painter*.[Ch]
PainterBase.C:21:int PainterBase::dummy1 = 0;
PainterBase.C:22:int PainterBase::dummy2 = 0;
PainterBase.C:23:int PainterBase::dummy3 = 0;
PainterBase.h:41:   static int dummy1;
PainterBase.h:43:   static int dummy2;
PainterBase.h:45:   static int dummy3;

Angus



Re: small stuff

2002-03-13 Thread Andre Poenitz

On Wed, Mar 13, 2002 at 12:50:25PM +0100, Lars Gullik Bjønnes wrote:
 | So we could have
 |a private 'owner_' and a protected 'getPixmap'
 
 a protected getPixmap is then probably best.

Uh... I just see we need Pixmap defined...
We do not to #include X11/X.h for that, do we?

 | or 
 |a protected 'owner() const' 

The better way than?

Andre'

-- 
André Pönitz .. [EMAIL PROTECTED]



Re: small stuff

2002-03-13 Thread Andre Poenitz

On Wed, Mar 13, 2002 at 11:59:32AM +, Angus Leeming wrote:
 Incidentally, these are historical cruft too by the look of things...
 
 aleem@pneumon:src- grep -n dummy Painter*.[Ch]
 PainterBase.C:21:int PainterBase::dummy1 = 0;
 PainterBase.C:22:int PainterBase::dummy2 = 0;
 PainterBase.C:23:int PainterBase::dummy3 = 0;
 PainterBase.h:41:   static int dummy1;
 PainterBase.h:43:   static int dummy2;
 PainterBase.h:45:   static int dummy3;

Ok. I think just removing these and doing the whitespace changes without
the variable renaming is uncontroversial and can be done right now?

Andre'

-- 
André Pönitz .. [EMAIL PROTECTED]



Re: small stuff

2002-03-13 Thread Angus Leeming

On Wednesday 13 March 2002 11:58 am, Andre Poenitz wrote:
 On Wed, Mar 13, 2002 at 12:50:25PM +0100, Lars Gullik Bjønnes wrote:
  | So we could have
  |a private 'owner_' and a protected 'getPixmap'
  
  a protected getPixmap is then probably best.
 
 Uh... I just see we need Pixmap defined...
 We do not to #include X11/X.h for that, do we?

it's just a long int isn't it? Here at least.

Angus



Re: small stuff

2002-03-13 Thread Jean-Marc Lasgouttes

 Angus == Angus Leeming [EMAIL PROTECTED] writes:

Angus On Wednesday 13 March 2002 11:50 am, Lars Gullik Bjønnes wrote:
 Andre Poenitz [EMAIL PROTECTED] writes:
 
 | On Wed, Mar 13, 2002 at 12:35:06PM +0100, Lars Gullik Bjønnes wrote:
  How hard is it to make owner_ private?
 
 | It is only use a couple of times to call a single function:
 
 | owner_.getPixmap()
 
 | So we could have | a private 'owner_' and a protected 'getPixmap'
 
 a protected getPixmap is then probably best.

Angus Incidentally, these are historical cruft too by the look of
Angus things...

Indeed, it looks like it is.

JMArc



Re: figinset cruft

2002-03-13 Thread Jean-Marc Lasgouttes

 Angus == Angus Leeming [EMAIL PROTECTED] writes:

Angus This is cruft from the figinset. It should go, go , go! Angus

Go ahead.

JMarc



Re: makefile patch

2002-03-13 Thread Jean-Marc Lasgouttes

 Lars == Lars Gullik Bjønnes [EMAIL PROTECTED] writes:

Lars I just saw that we used foreign 1.4 in a couple of files, I'll
Lars be happy with just foreign

OK.

Lars It makes things easier, and although we get some clutter and
Lars unwanted stuff in include.am, we get a much nicer Makefile.am.

I think it is better to add the clutter in the Makefiles.am that need
it. Isn't it possible to do
VAR += foo bar
in Makefiles?

JMarc



Re: small stuff

2002-03-13 Thread Andre Poenitz

On Wed, Mar 13, 2002 at 01:05:13PM +0100, Lars Gullik Bjønnes wrote:
 I am stil for the getPixmap solution, but leave the includes as is.
 Then it should work right?

No, if we have  Pixmap getPixmap()  we need a full definition for Pixmap
(which is a typedef to some XID, so it can't even be sensible passed as
reference). The definition sits in X11/X.h withi has 700 lines. Apart
from that PainterBase should be completely ignorant of X...

Andre'

-- 
André Pönitz .. [EMAIL PROTECTED]



Re: small stuff

2002-03-13 Thread Andre Poenitz

On Wed, Mar 13, 2002 at 12:07:46PM +, Angus Leeming wrote:
  Uh... I just see we need Pixmap defined...
  We do not to #include X11/X.h for that, do we?
 
 it's just a long int isn't it? Here at least.

Depends on architecture after reading X11/X.h. I would not simply use a
'long'...

Andre'

-- 
André Pönitz .. [EMAIL PROTECTED]



Re: configure question

2002-03-13 Thread Jean-Marc Lasgouttes

 Angus == Angus Leeming [EMAIL PROTECTED] writes:

Angus Having just updated my tree, JMarc's change to configure.in
Angus triggered an automatic rerun of configure. In the past this has
Angus failed to run correctly, because configure has insisted on
Angus using g++ rather than deccxx. I have, therefore, had to run the
Angus configure script as CXX=deccxx configure etc

If you upgrade to autoconf 2.5x, you will be able to write
  configure CXX=deccxx
and configure will remember this value when reconfiguring.

Angus I have, however, one query. Here is a section of the configure
Angus messages:

Angus checking for a good enough C++ compiler... g++  
Angus checking for c++... (cached) deccxx 
Angus checking whether the C++ compiler (deccxx ) works... yes

Angus why does it check for g++ at all in this case?

Could you try the following patch?

JMarc




pa-conf
Description: Binary data


Re: Painter diff

2002-03-13 Thread Angus Leeming

On Wednesday 13 March 2002 12:25 pm, Lars Gullik Bjønnes wrote:

 Index: Painter.h
 ===
  private:
 + /// For the figinset
 + PainterBase  pixmap(int x, int y, int w, int h, Pixmap bitmap);
 + 

Errr, why? Helper functions are fine if they're used by more than one 
function but this is just daft. You've already proved to yourself that pixmap 
is used only with Painter.C, so now's the time to dump it.

Angus


PainterBase  Painter::pixmap(int x, int y, int w, int h, Pixmap bitmap)
{
XGCValues val;
val.function = GXcopy;
GC gc = XCreateGC(display, owner.getPixmap(),
  GCFunction, val);
XCopyArea(display, bitmap, owner.getPixmap(), gc,
  0, 0, w, h, x, y);
XFreeGC(display, gc);
return *this;
}


PainterBase  Painter::image(int x, int y, int w, int h,
grfx::GImage const  image)
{
return pixmap(x, y, w, h, image.getPixmap());
}





Re: math-macro-arg does not work

2002-03-13 Thread Jean-Marc Lasgouttes

 Andre == Andre Poenitz [EMAIL PROTECTED] writes:

Andre On Tue, Mar 12, 2002 at 02:39:11PM +0100, Jean-Marc Lasgouttes
Andre wrote:
 I get a message `a truly unknown func' with math-macro-arg, whereas
 math-macro works well.

Andre I guess this has not found much testing lately since the same
Andre effect is obtained by 'self-insert \#1' or directly typing '#1'
Andre in the formula.

Andre Should we just remove the LFUN?

OK, I think you should just remove the lfun. 

BTW, there are some metrics problems with macros. Example attached.

JMarc




newfile1.lyx
Description: Binary data


Re: configure question

2002-03-13 Thread Angus Leeming

On Wednesday 13 March 2002 12:28 pm, Jean-Marc Lasgouttes wrote:
 Angus Having just updated my tree, JMarc's change to configure.in
 Angus triggered an automatic rerun of configure. In the past this has
 Angus failed to run correctly, because configure has insisted on
 Angus using g++ rather than deccxx. I have, therefore, had to run the
 Angus configure script as CXX=deccxx configure etc
 
 If you upgrade to autoconf 2.5x, you will be able to write
   configure CXX=deccxx
 and configure will remember this value when reconfiguring.
 
 Angus I have, however, one query. Here is a section of the configure
 Angus messages:
 
 Angus checking for a good enough C++ compiler... g++  
 Angus checking for c++... (cached) deccxx 
 Angus checking whether the C++ compiler (deccxx ) works... yes
 
 Angus why does it check for g++ at all in this case?
 
 Could you try the following patch?
 
 JMarc

Thanks for the info, JMarc. I will try it. Incidentally, I found that, in 
order to get the configure test to run properly:
LYX_USE_XFORMS_IMAGE_LOADER

I had to define 
CPPFLAGS=-I/usr/local/include 
rather than 
configure --extra-includes=...

My configure script is currently:

#!/bin/sh

HOMEDIR=/usr/users/aleem/OTHERS_CODE/lyx/devel
export HOMEDIR
echo HOMEDIR is ${HOMEDIR}

CPP=cpp
export CPP
echo CPP is ${CPP}

CPPFLAGS=-I/usr/local/include
export CPPFLAGS
echo CPPFLAGS is ${CPPFLAGS}

CC=deccc
export CC
echo CC is ${CC}

CFLAGS=-O2
export CFLAGS
echo CFLAGS is ${CFLAGS}

CXX=deccxx
export CXX
echo CXX is ${CXX}

CXXFLAGS=-msg_display_number -msg_disable 11,193,236,261,401,611 -w0 -ptr 
${HOMEDIR}/lyx_cxx_repository -O2
export CXXFLAGS
echo CXXFLAGS is ${CXXFLAGS}

CONFIGURE=./configure --prefix=/usr/local --with-version-suffix 
--with-included-gettext -with-frontend=xforms

${CONFIGURE}




Re: guii patch

2002-03-13 Thread John Levon

On Wed, Mar 13, 2002 at 12:38:17AM +, John Levon wrote:

 http://www.movement.uklinux.net/q1.diff.gz

q1.diff.bz2

john



Re: Painter diff

2002-03-13 Thread Angus Leeming

On Wednesday 13 March 2002 12:55 pm, Lars Gullik Bjønnes wrote:
 [EMAIL PROTECTED] (Lars Gullik Bjønnes) writes:
 
 | Angus Leeming [EMAIL PROTECTED] writes:
 
 | | On Wednesday 13 March 2002 12:25 pm, Lars Gullik Bjønnes wrote:
 
  Index: Painter.h
  ===
   private:
  + /// For the figinset
  + PainterBase  pixmap(int x, int y, int w, int h, Pixmap bitmap);
  + 
 
 | | Errr, why? Helper functions are fine if they're used by more than one 
 | | function.
 
 | In general I strongly disagree with that statement.

Well of course I do too. In general. I chose my words poorly.

 | | but this is just daft. You've already proved to yourself that pixmap 
 | | is used only with Painter.C, so now's the time to dump it.
 
 so you are more happy with this patch then:

Yes. In this case I think that the helper function isn't a help.

Angus



Re: [Devel] Bug list update again

2002-03-13 Thread Angus Leeming

On Wednesday 13 March 2002 12:40 pm, Jean-Marc Lasgouttes wrote:
  Herbert == Herbert Voss [EMAIL PROTECTED] writes:
 
  - Citation labels should reflect their content, i.e. if only the
  year is chosen in the citation dialog, then the label should show
  the year afterwards. (#114)
 
 
 Herbert attached a patch which fixes a bug.
 
 Herbert - now the choice_style also changes when changing the bibkey
 
 And now multiple citations are not taken in account anymore, if I read
 the patch correctly.

Oops... I hadn't noticed this. Sorry, Herbert!

I'm afraid I agree with Jean-Marc.

+   // we save the combination after|label
string const after  = fl_get_input(dialog_-input_after);
-   controller().params().setOptions(after);
+   controller().params().setOptions(after+
+   '|'+strip(frontStrip(
+   fl_get_choice_text(dialog_-choice_style;

This is a fudge. I had something like this very temporarily and then ditched 
it. The proper fix is to have insetcitation support multiple options. Anyway, 
this shouldn't go in FormCitation but in ControlCitation.

The insetcitation stuff is also nasty. I think that the real thing to do is 
to create a BibTeX cache, analogous to the graphics cache and to do such 
BibTeX stuff there. I plan to use BibTeX itself to parse the .bib files in 
1.3.0. We get such stuff for free then.

Try the attached demo code (which I'm sure I've sent to you in the past!)

Angus




trial2.C.bz2
Description: BZip2 compressed data


q1.diff.bz2

2002-03-13 Thread Asger K. Alstrup Nielsen

Hi,

I read the patch quickly, and it looks fine to me.

Of course, a ChangeLog would be nice, because it is practically
impossible to see what changes you have done to files that were
moved.

Greets,

Asger




Re: [Devel] Bug list update again

2002-03-13 Thread Herbert Voss

On Wed, 13 Mar 2002, Angus Leeming wrote:

 On Wednesday 13 March 2002 12:40 pm, Jean-Marc Lasgouttes wrote:
   Herbert == Herbert Voss [EMAIL PROTECTED] writes:
 
   - Citation labels should reflect their content, i.e. if only the
   year is chosen in the citation dialog, then the label should show
   the year afterwards. (#114)
 
 
  Herbert attached a patch which fixes a bug.
 
  Herbert - now the choice_style also changes when changing the bibkey
 
  And now multiple citations are not taken in account anymore, if I read
  the patch correctly.

 Oops... I hadn't noticed this. Sorry, Herbert!

 I'm afraid I agree with Jean-Marc.

I can not follow. Why are multiple citations no more possible??

Herbert

 This is a fudge. I had something like this very temporarily and then ditched
 it. The proper fix is to have insetcitation support multiple options. Anyway,
 this shouldn't go in FormCitation but in ControlCitation.

this is another question ...

 Try the attached demo code (which I'm sure I've sent to you in the past!)

again: the patch makes some people happy who like more wysiwyg.
And the argument of JMarc that a cryptic key is more
useful than the real output, is not an argument!
that is all! When you rewrite the citation stuff, you can
delete what you want, what has this to do with this patch?


Herbert




Re: guii patch

2002-03-13 Thread Angus Leeming

On Wednesday 13 March 2002 12:55 pm, John Levon wrote:
 On Wed, Mar 13, 2002 at 12:38:17AM +, John Levon wrote:
 
  http://www.movement.uklinux.net/q1.diff.gz
 
 q1.diff.bz2

Thank you.

One tiny thing on the #include front: you don't need WorkArea.h in 
BufferView_pimpl.h anymore.

As Asger says, it's hard to see what is changed and what is just moved into 
frontends. Am I right in saying that you've changed little here other than 
move files into the frontends? The odd method rather than member variable. An 
#included the correct Painter.h.

One final thing: why not create a frontends/X11 dir for Painter etc that 
don't depend explicitly on xforms and have a USE_RAW_X11 variable in the 
frontends Makefile.am.

1.3 is going to be fun!

Angus









Re: [Devel] Bug list update again

2002-03-13 Thread Angus Leeming

On Wednesday 13 March 2002 1:19 pm, Herbert Voss wrote:
 again: the patch makes some people happy who like more wysiwyg.
 And the argument of JMarc that a cryptic key is more
 useful than the real output, is not an argument!
 that is all! When you rewrite the citation stuff, you can
 delete what you want, what has this to do with this patch?

It's a nasty fudge. Ask Lars what he thinks of nasty fudges.
Angus



Re: makefile patch

2002-03-13 Thread Jean-Marc Lasgouttes

 Lars == Lars Gullik Bjønnes [EMAIL PROTECTED] writes:

Lars Ok, does this patch taste better?

Definitely. We have to be sure though that it works for `reasonable'
non-GNU makes. But we'll find out soon enough...

A small nit: I do not like the name include.am. I'd rather have
something like Make.rules or Makefile.common, or whatever. 

Of course, .am is used by automake for makefile snippets, so maybe you
are right.

JMarc



Re: [Devel] Bug list update again

2002-03-13 Thread Jean-Marc Lasgouttes

 Herbert == Herbert Voss [EMAIL PROTECTED] writes:

Herbert again: the patch makes some people happy who like more
Herbert wysiwyg. And the argument of JMarc that a cryptic key is more
Herbert useful than the real output, is not an argument! that is all!

Hmm, this is the kind of argument that is difficult to discuss :)

To express things differently, I am not sure that showing everything
wysiwyg is a panacea. For example, I would hate to see equation
numbers in mathed showed as just numbers instead of labels. But may is
it just because I am used to give meaningful names to my labels.

And for citations, seeing [1] in the lyx window instead of [Key] is
certainly not a plus, forgetting for now that I do not get anything.

JMarc



Re: makefile patch

2002-03-13 Thread Jean-Marc Lasgouttes

 Lars == Lars Gullik Bjønnes [EMAIL PROTECTED] writes:

Lars Jean-Marc Lasgouttes [EMAIL PROTECTED] writes:
 Lars == Lars Gullik Bjønnes [EMAIL PROTECTED] writes:

Lars | Lars Ok, does this patch taste better?

Lars | Definitely. We have to be sure though that it works for
Lars `reasonable' | non-GNU makes. But we'll find out soon enough...

Lars | A small nit: I do not like the name include.am. I'd rather
Lars have | something like Make.rules or Makefile.common, or
Lars whatever.

Lars | Of course, .am is used by automake for makefile snippets, so
Lars maybe you | are right.

Lars would common.am be better?

Yes.

JMarc



Re: [Devel] Bug list update again

2002-03-13 Thread Herbert Voss

Jean-Marc Lasgouttes wrote:

 To express things differently, I am not sure that showing everything
 wysiwyg is a panacea. For example, I would hate to see equation

 numbers in mathed showed as just numbers instead of labels. But may is
 it just because I am used to give meaningful names to my labels.


we are talking about citations and natbib.


 And for citations, seeing [1] in the lyx window instead of [Key] is
 certainly not a plus, forgetting for now that I do not get anything.


did I ever said, that you'll see [1] as label?? I suppose that
you don't tried the patch but give arguments against ...


we are talking about natbib and not the plain version
of an bst-file.

Herbert



-- 
http://www.lyx.org/help/




Re: guii patch

2002-03-13 Thread John Levon

On Wed, Mar 13, 2002 at 01:34:49PM +, Angus Leeming wrote:

 One tiny thing on the #include front: you don't need WorkArea.h in 
 BufferView_pimpl.h anymore.

indeed !

 As Asger says, it's hard to see what is changed and what is just moved into 
 frontends. Am I right in saying that you've changed little here other than 
 move files into the frontends? The odd method rather than member variable. An 
 #included the correct Painter.h.

yes everything is pretty much the same except WorkArea, screen got
virtualised. And of course PainterBase became Painter :)

I can do diffs against individual files if you like...

 One final thing: why not create a frontends/X11 dir for Painter etc that 
 don't depend explicitly on xforms and have a USE_RAW_X11 variable in the 
 frontends Makefile.am.

I'm not sure of the point of this - are you planning on writing a pure
Xlib frontend ?

 1.3 is going to be fun!

I suppose my next step is a proof of concept qt2...

john

-- 
I am a complete moron for forgetting about endianness. May I be
forever marked as such.



Re: Painter diff

2002-03-13 Thread John Levon

On Wed, Mar 13, 2002 at 01:25:14PM +0100, Lars Gullik Bjønnes wrote:

 These are the changes I have in my tree now:
 
 Index: PainterBase.C

I can't help but think that you committed this thoroughly
cosmetic patch just to make my life harder.

john

-- 
I am a complete moron for forgetting about endianness. May I be
forever marked as such.



Re: guii patch

2002-03-13 Thread Angus Leeming

On Wednesday 13 March 2002 2:37 pm, John Levon wrote:
 I'm not sure of the point of this - are you planning on writing a pure
 Xlib frontend ?

Not me. But that't not the point. xforms in xforms, qt2 in qt2 and X11 in 
X11. It costs us nothing and leads to improved clarity.

  1.3 is going to be fun!
 
 I suppose my next step is a proof of concept qt2...

That will indeed be fun. Have you made any more progress in understanding 
KLyX or was it too a hack?

Angus



Re: Painter diff

2002-03-13 Thread Angus Leeming

On Wednesday 13 March 2002 2:42 pm, John Levon wrote:
 On Wed, Mar 13, 2002 at 01:25:14PM +0100, Lars Gullik Bjønnes wrote:
 
  These are the changes I have in my tree now:
  
  Index: PainterBase.C
 
 I can't help but think that you committed this thoroughly
 cosmetic patch just to make my life harder.
 
 john

Along the same lines, can you try my BufferView_pimpl.C patch in your tree 
proposed cursor patch try 2. Presumably those fl_set_cursor calls should 
become calls to a new WorkArea method? 

Thoughts?

Angus



Compilation error

2002-03-13 Thread Dekel Tsur

Once again, my compiler (egcs 1.1.2) refuses to compile lyx:

g++ -DHAVE_CONFIG_H -I. -I. -I../../../src -I../../../images -I../../../src/
-I../../../src/frontends/ -I../../../src/frontends/controllers -I../../..
-I../../.. -I../../../boost -isystem /usr/X11R6/include -O -fno-rtti
-fno-exceptions -W -Wall -Wp,-MD,.deps/FormPreferences.pp -c FormPreferences.C
FormBaseDeprecated.h: In method void FormPreferences::Colors::build()':
FormBaseDeprecated.h:113: static void
FormBaseDeprecated::setPrehandler(struct FL_OBJECT *)' is protected
FormPreferences.C:492: within this context
FormBaseDeprecated.h:113: static void
FormBaseDeprecated::setPrehandler(struct FL_OBJECT *)' is protected

etc.



Re: Painter diff

2002-03-13 Thread John Levon

On Wed, Mar 13, 2002 at 03:47:33PM +0100, Lars Gullik Bjønnes wrote:

 Yup.

OK

-- 
I am a complete moron for forgetting about endianness. May I be
forever marked as such.



Re: Painter diff

2002-03-13 Thread John Levon

On Wed, Mar 13, 2002 at 02:50:41PM +, Angus Leeming wrote:

 Along the same lines, can you try my BufferView_pimpl.C patch in your tree 
 proposed cursor patch try 2. Presumably those fl_set_cursor calls should 
 become calls to a new WorkArea method? 

I suspect so, but I'm not sure what yet. For now that stuff is just #if
0'd out. I don't think it's a great idea to have te cursor stuff in
screen either ...

But this obviously isn't the time to be able to maintain a separate
tree. I don't really mind it's only a couple of hours work wasted :)

john

-- 
I am a complete moron for forgetting about endianness. May I be
forever marked as such.



Re: guii patch

2002-03-13 Thread John Levon

On Wed, Mar 13, 2002 at 02:44:55PM +, Angus Leeming wrote:

  I'm not sure of the point of this - are you planning on writing a pure
  Xlib frontend ?
 
 Not me. But that't not the point. xforms in xforms, qt2 in qt2 and X11 in 
 X11. It costs us nothing and leads to improved clarity.

I guess you are probably right. Doesn't xforms have drawing functions ?
Why aren't we using them ?

  I suppose my next step is a proof of concept qt2...
 
 That will indeed be fun. Have you made any more progress in understanding 
 KLyX or was it too a hack?

I haven't looked more yet.

The current situation is that BV manages the scrollbar. This is OK but
prevents the use of e.g. QScrollArea. This is not a big problem as we
can easily have a custom widget that includes a QScrollBar, and do the
manipulation ourselves. Later on the interface can be improved further
so Qt can manage the scrollbar itself...

john

-- 
I am a complete moron for forgetting about endianness. May I be
forever marked as such.



Re: Painter diff

2002-03-13 Thread Angus Leeming

On Wednesday 13 March 2002 3:41 pm, John Levon wrote:
 On Wed, Mar 13, 2002 at 02:50:41PM +, Angus Leeming wrote:
 
  Along the same lines, can you try my BufferView_pimpl.C patch in your 
tree 
  proposed cursor patch try 2. Presumably those fl_set_cursor calls 
should 
  become calls to a new WorkArea method? 
 
 I suspect so, but I'm not sure what yet. For now that stuff is just #if
 0'd out. I don't think it's a great idea to have te cursor stuff in
 screen either ...
 
 But this obviously isn't the time to be able to maintain a separate
 tree. I don't really mind it's only a couple of hours work wasted :)
 
 john

Sure it is. This stuff _should_  go in a branch. Then we can hack away 
happily.

Angus



Re: Painter diff

2002-03-13 Thread John Levon

On Wed, Mar 13, 2002 at 03:59:11PM +, Angus Leeming wrote:

 Sure it is. This stuff _should_  go in a branch. Then we can hack away 
 happily.

Yeah but I don't want to spend ages merging. You had enough trouble with
that during MVC branch, from the sounds of it.

Of course the branch will have to cope with all the queued 1.3 patches
coming as well. Hopefully these are mostly core code and shouldn't hit
us too badly.

So perhaps we should make a branch now yes. Especially as I appear to
have exhausted my supply of 1.2 bugfixes...

I expect the branch will last 6 months or so before the interfaces are
good enough to hit the main tree but I suppose that depends on whether
you hit one of your massive coding sessions in the mean time :)

regards
john

-- 
I am a complete moron for forgetting about endianness. May I be
forever marked as such.



Re: Compilation error

2002-03-13 Thread Angus Leeming

On Wednesday 13 March 2002 3:36 pm, Dekel Tsur wrote:
 Once again, my compiler (egcs 1.1.2) refuses to compile lyx:
 
 g++ -DHAVE_CONFIG_H -I. -I. -I../../../src -I../../../images -I../../../src/
 -I../../../src/frontends/ -I../../../src/frontends/controllers -I../../..
 -I../../.. -I../../../boost -isystem /usr/X11R6/include -O -fno-rtti
 -fno-exceptions -W -Wall -Wp,-MD,.deps/FormPreferences.pp -c 
FormPreferences.C
 FormBaseDeprecated.h: In method void FormPreferences::Colors::build()':
 FormBaseDeprecated.h:113: static void
 FormBaseDeprecated::setPrehandler(struct FL_OBJECT *)' is protected
 FormPreferences.C:492: within this context
 FormBaseDeprecated.h:113: static void
 FormBaseDeprecated::setPrehandler(struct FL_OBJECT *)' is protected

... and it's problem is what exactly?

class FormBaseDeprecated {
protected:
static void setPrehandler(FL_OBJECT * ob);
};
class FormBaseBI : public FormBaseDeprecated {
};
class FormPreferences : public FormBaseBI {
};

Sigh... Patches welcome of course.
Angus




Re: [Devel] Bug list update again

2002-03-13 Thread Angus Leeming

On Wednesday 13 March 2002 4:11 pm, Herbert Voss wrote:
 Jean-Marc Lasgouttes wrote:
 
 Herbert == Herbert Voss [EMAIL PROTECTED] writes:
 
  
  Herbert why should they get an empty button?? I thought you tried
  Herbert it??
  
  I tried it. I sent an example file. I can even add a screeshot if you
  do not believe me.
 
 
 you forget to add your chosen bibentry from the bibfile
 into the left browser (in the citation gui) ...
 you always get an empty label, with and without my patch
 because it has nothing to do with that!
 
 Herbert

;-) However, I don't think the key is empty on screen in such a situation. 
Doesn't it have brackets []? ... Yup.

Angus




Re: Painter diff

2002-03-13 Thread John Levon

On Wed, Mar 13, 2002 at 05:13:56PM +0100, Lars Gullik Bjønnes wrote:

 Especially not for stuff that is main tasks for the next development
 round.

hmm. This would mean you would have to accept patches that are not
perfect.

I've tried to look for ways to do the Andre thing of small gradual
changes but I can't see an easy way: there will always be some point
where a big fat patch has to happen as far as I can see. But then, I'm
lame...

john

-- 
I am a complete moron for forgetting about endianness. May I be
forever marked as such.



Re: guii patch

2002-03-13 Thread John Levon

On Wed, Mar 13, 2002 at 05:07:15PM +0100, Lars Gullik Bjønnes wrote:

 I have said this before, and  I am sure you have seen it, but you have
 probaly not understood the implications:
 
 We are using xforms wrong.
 
 We are not calling xforms functions as a result some events all the
 time, this confuses xforms internal completely. Some time ago we did
 all the drawing with xforms native functions (no direct X11
 functions), this resulted in spurious lines, colors etc. all over the
 lyx window.

In fact we are using /X11/ wrong. We should only ever draw in response
to an expose event indeed. I suspect this is something that is going to
have to get fixed for GUII (good !).

So in fact then we can go back to using its drawing routines if it makes
sense.

thanks
john

-- 
I am a complete moron for forgetting about endianness. May I be
forever marked as such.



Re: [patch] (html)URL - inset

2002-03-13 Thread Jean-Marc Lasgouttes

 Herbert == Herbert Voss [EMAIL PROTECTED] writes:

Back to this one... Believe it or not, I would like to resolve it
before 1.2.0.

Herbert Jean-Marc Lasgouttes wrote:
 To rephrase myself: could this html check button produce code using
 hyperref \href instead of html.sty version? Would that work with
 latex2html? Answering to my own question, it seems that the macros
 in html.sty are mostly wrappers around hyperref's \href. I'd rather
 force the use of hyperref (which is somewhat standard) than force
 people to convert to html using latex2html.

Herbert If you want to leran a lot of latex than use package
Herbert hyperref. You can be sure, that something doesn't work when
Herbert using a lot of other packages ...

I know there are lot of problems in interactions between hyperref and
other packages. I hoped that the situation was better today than a few
years back. 

A way to avoid these incompatibility would be to use the draft option
of hyperref, but latex2html does not understand hyperref anyway :(

Herbert the html package supports hyperref, so it's no problem to
Herbert start with this html and have a look what users really need.

To summarize we do not have many choices:

1/ the patch you propose: use html.sty, which will only work for
latex2html. The reason I am reluctant to do so is that I know that
people favor other converters wrt latex2html, and we will basically
break support for these converters.

2/ using hyperref in some nice way. We will need hyperref support for
pdf, anyway. So this may be a longterm solution, but not viable right
now since latex2html just ignores it.

3/ tweaking the latex generation code to produce latex suitable for
such or such use (latex2html, whatever). This would be the best, but
even more longterm.

So it seems we are left with your approach :)

I have a question on the patch, though: the functions LFUN_URL,
LFUN_HTML and LFUN_HTMLURL seems to all do the same thing after your
change? Do you mean that we shall remove all of the except one? Does
someone know what were the differences between them?

Also it would be nice if the patch did not try to remove double LF
btween methods and change tab-indentation to 4char indentation :) But
this is secondary.

I cannot really comment on the interface changes, since this is not
what I know best.

JMarc



C++ question

2002-03-13 Thread Angus Leeming

If I have a mapkey, value some_map, can I create a vector of the keys also, 
vectorkey const  ref_vec? I can create a vectorkey const * ptr_vec.

I'm thinking of my Bibtex data base of course.

/** All Bibliography keys derive from this base class, and need only define
 *  code() to be instantiated.
 */
class BibKey {
public:
enum Code {
BIBLIO_CODE,
BIBTEX_CODE
};

virtual ~BibKey() {}
virtual BibKey::Code code() const = 0;
std::string const  get() const { return key_; }
private:
std::string key_;
};


class BibtexKey : public BibKey {
public:
BibKey::Code code() const { return BibKey::BIBTEX_CODE; }
};


/** The BibTeX database stores a map of the data so,
 *   where Bibitem is the info
 */
typedef std::mapBibtexKey, Bibitem BMap;
///
BMap data_;

/** But it also stores a vector of the keys to pass back to the
 *   citation dialog. Note that the citation dialog gets a vector of Bibkeys,
 *   not BibtexKeys or BiblioKeys.
 */
std::vectorBibKey const * keys_;

Once I have the data, I can create the keys_, so:

keys_.resize(data_.size());
std::vectorBibKey const *::iterator key_it = keys_.begin();

BMap::const_iterator map_it  = data_.begin();
BMap::const_iterator map_end = data_.end();
for (; map_it != map_end; ++map_it, ++key_it) {
*key_it = map_it-first;
}

But I can't do it if the keys_ is a vector of references, not pointers. Is 
this impossible?

Angus



Re: C++ question

2002-03-13 Thread Angus Leeming

On Wednesday 13 March 2002 6:08 pm, Lars Gullik Bjønnes wrote:
 Angus Leeming [EMAIL PROTECTED] writes:
 
 | If I have a mapkey, value some_map, can I create a vector of the keys 
also, 
 | vectorkey const  ref_vec? I can create a vectorkey const * ptr_vec.
 
 | I'm thinking of my Bibtex data base of course.
 
 You cannot reset an reference;
 
 string a(Hello There!);
 string  b = a;
 string c(How are you?);
 b = c; // error
 
 Then ponder about what the problem with vectorType const  is.

Gotcha! I create a vector of references and then I try to set their value.
Thank you.
A



Keyboard handling

2002-03-13 Thread John Levon


ouch !

Klyx punts the issue by not using Qt's key event structure.

I think we need a buffer view slot :

void, string const  text, unsigned int count, LKeySym

where LKeySym is our own enum/class for all the special keys like
F1, Up, PageDown etc.

The reason I don't want to use X key events in the Qt frontend is
mainly so we can use setKeyCompression(true). It can be a significant
benefit to be able to squish 2 or 3 characters together as one event.

I've got a little Qt prog for receiving key events, and it looks like
compression will work even in the presence of composing LyX funcs. Of
course for real compose, Qt should be doing this for us already.

Of course there are the things like getiso() and stuff which really need
to be fixed. Can we do anything usefel with the unicode inside the
QString from the Qt event ?

thanks
john

-- 
I am a complete moron for forgetting about endianness. May I be
forever marked as such.



Re: Keyboard handling

2002-03-13 Thread John Levon

On Wed, Mar 13, 2002 at 09:44:55PM +, John Levon wrote:

 

stupid question, but how do normal keypresses like 'a' end up 
so that a lookup() in the kbmap returns LFUN_INSERT ???

thanks
john

-- 
I am a complete moron for forgetting about endianness. May I be
forever marked as such.



[PATCH] Lar's optimisation font patch broken

2002-03-13 Thread John Levon


Load Intro.lyx and look at the You tell LyX what you're doing.

A fencepost error, but they accumulate in the saved version.

The fix is attached. I don't know/care if it's right.

thanks
john

-- 
I am a complete moron for forgetting about endianness. May I be
forever marked as such.


Index: src/ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v
retrieving revision 1.622
diff -u -r1.622 ChangeLog
--- src/ChangeLog   13 Mar 2002 18:23:38 -  1.622
+++ src/ChangeLog   13 Mar 2002 22:26:47 -
@@ -1,3 +1,8 @@
+2002-03-13  John Levon  [EMAIL PROTECTED]
+
+   * paragraph.C: fix fencepost error in getFontSettings() from
+ last patch
+ 
 2002-03-13  Lars Gullik Bjønnes  [EMAIL PROTECTED]
 
* paragraph.C: change several algorithm to be more appripriate for
Index: src/paragraph.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/paragraph.C,v
retrieving revision 1.197
diff -u -r1.197 paragraph.C
--- src/paragraph.C 13 Mar 2002 18:23:37 -  1.197
+++ src/paragraph.C 13 Mar 2002 22:26:51 -
@@ -595,7 +595,7 @@
Pimpl::FontList::const_iterator cit = pimpl_-fontlist.begin();
Pimpl::FontList::const_iterator end = pimpl_-fontlist.end();
for (; cit != end; ++cit) {
-   if (cit-pos()  pos)
+   if (cit-pos() = pos)
break;
}
 
@@ -1690,6 +1690,7 @@
}
if (moving_arg)
os  \\protect ;
+ 
os  \n;
}
texrow.newline();



Re: [PATCH] Lar's optimisation font patch broken

2002-03-13 Thread John Levon

On Wed, Mar 13, 2002 at 11:54:53PM +0100, Lars Gullik Bjønnes wrote:

 This fix should be applied to all places where I did this change then.


OK, I'll let you do that because I don't know how :)

Currently you the first characeter of a word is not getting set to
a font change either. Oh and you can't change the dummy position's font,
OR apply a font change from the dialog to a selection...

If you're quick, this might only get reported 4 or 5 times :)

regards
john

-- 
I am a complete moron for forgetting about endianness. May I be
forever marked as such.



Re: [PATCH] Lar's optimisation font patch broken

2002-03-13 Thread John Levon

On Thu, Mar 14, 2002 at 12:08:35AM +0100, Lars Gullik Bjønnes wrote:

 btw. My name is not Lar...

Ha ! And my name isn't Levon. So I suppose we are equal

 (on a side note: Is that a name anywhere?)

My English skills are inversely proportional to the speed of my internet
connection ...

For some reason I choose to write all my email via a ssh connection.

building with your patch,
john

-- 
I am a complete moron for forgetting about endianness. May I be
forever marked as such.



Re: [PATCH] Lar's optimisation font patch broken

2002-03-13 Thread John Levon

On Thu, Mar 14, 2002 at 12:00:12AM +0100, Lars Gullik Bjønnes wrote:

 This should fix this and the rest of them, please test.

It fixes the problems Ive mentioned, but there is another: the '!' icon
is broken.

Apply Italic font change via the dialog to the current cursor position,
and it changes, but the icon doesn't. Perhaps this is one of my changes
?

regards
john



Re: [PATCH] Lar's optimisation font patch broken

2002-03-13 Thread John Levon

On Thu, Mar 14, 2002 at 12:21:09AM +0100, Lars Gullik Bjønnes wrote:

 If I just move the cursor over some '!' text, the toolbar button gets
 pressed.

Yes this works OK for me, but just typing after changes doesn't i.e.
the icons don't represent what the next char will look like

john

-- 
I am a complete moron for forgetting about endianness. May I be
forever marked as such.



Re: [PATCH] Lar's optimisation font patch broken

2002-03-13 Thread John Levon

On Thu, Mar 14, 2002 at 12:35:58AM +0100, Lars Gullik Bjønnes wrote:

 Either I do not understand what you mean, or I don't have the problem.

Actually this might be on older bug, it happens on an older 1.2 build
...

start new doc.

type some text.

change character dialog to italic and apply

(no change in button)

type some text (italic)

BUT the emph button is not on. 

Now press emph button (to select it) and type some text. Note something
odd ? The button is the exact opposite in operation to what you would
expect !

regards
john

-- 
I am a complete moron for forgetting about endianness. May I be
forever marked as such.



Re: [PATCH] Lar's optimisation font patch broken

2002-03-13 Thread John Levon

On Thu, Mar 14, 2002 at 12:50:29AM +0100, Lars Gullik Bjønnes wrote:

 cursor in front of 1: icon on

hmm are you sure that the icon becomes selected when you click apply
from the dialog ?

If you're moving the cursor with arrow keys then the problem won't be
seen.

Another problem (UserGuide as usual bring out all the nasty bugs) :

#6  0x80c4d38 in Paragraph::size (this=0x0) at paragraph.C:2119
#7  0x80e9cb1 in LyXText::selectionAsString (this=0x8518870, buffer=0x83891c0, 
label=false) at text2.C:1012
#8  0x8058d6f in BufferView::Pimpl::selectionRequested (this=0x83c0330) at 
BufferView_pimpl.C:752

so tmpcur.par() is 0. Ideas ??

john

-- 
I am a complete moron for forgetting about endianness. May I be
forever marked as such.



Re: [PATCH] Lar's optimisation font patch broken

2002-03-13 Thread John Levon

On Thu, Mar 14, 2002 at 01:12:53AM +0100, Lars Gullik Bjønnes wrote:

 | hmm are you sure that the icon becomes selected when you click apply
 | from the dialog ?
 
 Dialog? You said nothing about using a dialog...

Well apart from the two or three times I mentioned using it, including
the step by step :P

 How should I move it then? mouse?

don't move it at all !

new doc

type a

apply dialog italic

type b

-- icon doesn't change

press emph icon (so it becomes on)

type c

-- c is in normal text but icon says otherwise

 no, not now must sleep brain say god night now

God Night !

john

-- 
I am a complete moron for forgetting about endianness. May I be
forever marked as such.



Re: [PATCH] Lar's optimisation font patch broken

2002-03-13 Thread John Levon

On Wed, Mar 13, 2002 at 08:36:20PM -0400, Garst R. Reese wrote:

 You mean from Layout-Character I presume. When I do that the dialog
 remains up and I have to close it.

You have to close it ?? Why ?

 But yes, I see the problem also. The

OK thanks

 toggle on the icon gets out of step with reality. Let's hope Lars gets a
 good night's sleep.

Or a god night's sleep, even better

john

-- 
I am a complete moron for forgetting about endianness. May I be
forever marked as such.



Re: [PATCH] Lar's optimisation font patch broken

2002-03-13 Thread John Levon

On Wed, Mar 13, 2002 at 09:24:25PM -0400, Garst R. Reese wrote:

 Well, apply leaves it up and in the way and it's easier to close than
 switch views.
 Maybe this is not a problem with more pixels.

Or you could just press alt-tab or whatever your WM does to switch
window stacking order...

regards
john

-- 
I am a complete moron for forgetting about endianness. May I be
forever marked as such.



Re: [PATCH] Lar's optimisation font patch broken

2002-03-13 Thread John Levon

On Wed, Mar 13, 2002 at 09:37:33PM -0400, Garst R. Reese wrote:

  I am a complete moron.

hey we can form a club !

You have to say so in your signature too though, or you can't join :)

john
-- 
I am a complete moron for forgetting about endianness. May I be
forever marked as such.



Re: Lyx

2002-03-13 Thread Allan Rae

On Thu, 14 Mar 2002, Marianne Doyle wrote:

 Dear Dr Rae,

I'm still only a mister :(  but I'm working on it!

 Ian Mortimer from the physics dept said you may be able to help me with a
 lyx problem.

 Is there any way to overcome the problem of not being able to use the
 number key pad inside tables.  At the moment if you use the number key
 pad the number appear outside the table.

There is a fix for this problem in the sources for the up-coming 1.2.0
release.  That release is still a few weeks (a month, maybe two?) away
though and it is probably a bit too volatile for you to consider
using the bleeding edge for your work (I am, but I also help write
it).

Jürgen, is this an easy fix you could backport to 1.1.6?

Allan. (ARRae)




[] lyx-devel ?

2002-03-13 Thread
Title: emailsale
















 


 [lyx-devel´ÔÀÇ ¸ÞÀÏÁÖ¼Ò´Â 
ÀÌ À¥ÆäÀÌÁö¿¡¼­ º¸°í ¹ß¼ÛÇß½À´Ï´Ù. Ç÷¯½º ³ëºí·¹½º(www.Plusnoblesse.com) 
¿¡¼­´Â ¸íÇ° °¡°ÝÀÎÇÏ µî À¯¿ëÇÑ Á¤º¸¸¦ Á¦°øÇÒ ¿¹Á¤À̳ª ¼ö½ÅÀ» ¿øÄ¡ 
¾ÊÀ¸½Ã¸é ´Ù½Ã ¿î¿µÀÚÀÇ ¸ÞÀÏÀ» ¹Þ°Ô µÇ´Â ÀÏÀÌ ¾øµµ·Ï ÇÏ°Ú½À´Ï´Ù.]
 





 

Re: Tooltips revamp

2002-03-13 Thread Allan Rae

On 11 Mar 2002, Jean-Marc Lasgouttes wrote:

  Allan == Allan Rae [EMAIL PROTECTED] writes:

  Oops not so easy. I'll need another static signal in Dialogs.h
  static bool SigC::Signal0bool Dialogs::tooltipsEnabled;

 Allan Why? The tooltips should have a lyxrc entry and you can toggle
 Allan based on that value instead. Otherwise someone who wants/hates
 Allan tooltips has to turn them on/off in every session!

 No, because the tooltips are designed to be lengthy, helpful and
 annoying when you do not need them. So it is reasonable to turn them
 off by default.

I don't see a problem.  Sure, some of the tooltips are long but you
have to have your mouse over a button for them to appear.  I have no
problem with this.

The thing I do have a problem with is that it is not really a What's
this? mechanism.  The new cursor shape implies that I should click on
something that I'm asking about -- as learned by using KDE just once.

AFAIAC we should just allow enable/disable of the tooltips and leave
the cursor alone.  The code that is in CVS works fine otherwise (ie.
get rid of the ? cursor and all is excellent).


 BTW, we will need an icon for this toggle, since operating tooltips is
 a mouse-based thing.

Seems to be getting more and more complicated.

BTW, I'm inclined to think that if we must have a menu entry for this
then is should be Edit-Tooltips [] (located near the preferences
stuff perhaps).  As it is now it looks like it is a part of the
documentation and worse yet the proximity and similarity to the
Documents menu had me wondering if it wasn't an indicator of a file I
had opened.

Can we set the marker for the current buffer in the documents menu to
a different colour or shape so it doesn't look like a toggle?

Allan. (ARRae)




lyx-1.1.6fix4 bug: can't use cite.sty

2002-03-13 Thread Ulrich Gnther

I am trying to use cite.sty in lyx.  Unfortunately thje packages lsiterd in 
the latex preamble of lyx are inserted after everything else.  If cite shows 
up after babel is is ignored!
Any ideas how to fix this?  

Ulrich



Re: [Devel] Bug list update again

2002-03-13 Thread Allan Rae

On Wed, 13 Mar 2002, Herbert Voss wrote:

 Jean-Marc Lasgouttes wrote:

  To express things differently, I am not sure that showing everything
  wysiwyg is a panacea. For example, I would hate to see equation

  numbers in mathed showed as just numbers instead of labels. But may is
  it just because I am used to give meaningful names to my labels.


 we are talking about citations and natbib.

The analogy is still valid though.

  And for citations, seeing [1] in the lyx window instead of [Key] is
  certainly not a plus, forgetting for now that I do not get anything.

 did I ever said, that you'll see [1] as label?? I suppose that
 you don't tried the patch but give arguments against ...

He sent a screen shot didn't he?

 we are talking about natbib and not the plain version
 of an bst-file.

What about non-natbib, regular old numbered citations like JMarc and I
use?  I haven't tested your patch but if JMarc is able to provide
screenshots which don't show anything useful for a citation then I'm
also going to be annoyed.

I certainly don't want a [1].  I'd much rather have a [Key].

Will you answer this challenge then if I ask it instead of JMarc?
What do you get if you turn off natbib?
What do the citations appear as?

I've just spent half the day catching up on 500 emails from the last
two days and gotten to this conversation last so please excuse my lack
of time to test your patch today -- I've only just finished absorbing
most of the major changes in CVS.

Allan. (ARRae)




[PATCH] Fix GNOME compilation Part 1

2002-03-13 Thread Michael Koziarski

Hey guys,

I've just spent some time getting the gtkmm frontend to compile
again.  I don't quite know how to work the build system so I've split
the task into two.

The attached patch fixes the compilation problems, please review and
apply.   

However, linking still fails, John Levon tells me I need something
like src/frontends/qt2/xforms but I'm having trouble getting that to
work. If I haven't got it going by this time tommorow I'll post my
work to date and ask for help.

Cheers for now



-- 

| Michael Koziarski   |Conventional wisdom is often   |
| Data Engineer, Linux user   | long on convention and short   |
|  Objectivist.  | on wisdom --  |
| http://www.koziarski.com| Warren E. Buffett, BRK.A   |




hmpf

2002-03-13 Thread Michael Koziarski

I think I do this more than anyone else


-- 

| Michael Koziarski   |Conventional wisdom is often   |
| Data Engineer, Linux user   | long on convention and short   |
|  Objectivist.  | on wisdom --  |
| http://www.koziarski.com| Warren E. Buffett, BRK.A   |


Index: ChangeLog
===
RCS file: /cvs/lyx/lyx-devel/ChangeLog,v
retrieving revision 1.823
diff -u -r1.823 ChangeLog
--- ChangeLog   2002/03/13 13:24:48 1.823
+++ ChangeLog   2002/03/14 07:35:02
@@ -1,3 +1,8 @@
+2002-03-14  Michael A. Koziarski  [EMAIL PROTECTED]
+
+   * configure.in: First stage of fixing the gnome compile problems.
+   Linking problems to be fixed next.
+
 2002-03-12  Jean-Marc Lasgouttes  [EMAIL PROTECTED]
 
* README: add bulgarian
Index: configure.in
===
RCS file: /cvs/lyx/lyx-devel/configure.in,v
retrieving revision 1.97
diff -u -r1.97 configure.in
--- configure.in2002/03/12 11:32:24 1.97
+++ configure.in2002/03/14 07:35:11
@@ -198,6 +198,8 @@
 `
;;
   gnome)
+LYX_PATH_XPM
+LYX_PATH_XFORMS
 AM_PATH_GTKMM(1.2.1,,
 AC_MSG_ERROR(Cannot find GTK--: Please install Version 1.2.1+))
 AM_PATH_GNOMEMM
@@ -217,8 +219,8 @@
 FRONTEND=xforms gnome
 FRONTEND_GUILIB=gnome/*.lo
 FRONTEND_LDFLAGS=\$(GNOMEMM_LIBDIR)
-FRONTEND_INCLUDES=-I\${srcdir}/gnome \$(GNOMEMM_INCLUDEDIR) \$(GTKMM_CFLAGS) 
`gnome-config --cflags libglade gnomeui`
-FRONTEND_LIBS=\$(GNOMEMM_LIBS) \$(GTKMM_LIBS) `gnome-config --libs libglade 
gnomeui`;;
+FRONTEND_INCLUDES=-I\${srcdir}/gnome -I\${srcdir}/xforms \$(GNOMEMM_INCLUDEDIR) 
+\$(GTKMM_CFLAGS) `gnome-config --cflags libglade gnomeui`
+FRONTEND_LIBS=@XPM_LIB@ @XFORMS_LIB@ \$(GNOMEMM_LIBS) \$(GTKMM_LIBS) 
+`gnome-config --libs libglade gnomeui`;;
   qt2)
LYX_PATH_XPM
LYX_PATH_XFORMS
Index: po/POTFILES.in
===
RCS file: /cvs/lyx/lyx-devel/po/POTFILES.in,v
retrieving revision 1.268
diff -u -r1.268 POTFILES.in
--- po/POTFILES.in  2002/03/13 18:24:42 1.268
+++ po/POTFILES.in  2002/03/14 07:35:24
@@ -9,7 +9,6 @@
 src/CutAndPaste.C
 src/debug.C
 src/exporter.C
-src/ext_l10n.h
 src/FontLoader.C
 src/frontends/controllers/biblio.C
 src/frontends/controllers/ButtonController.h
Index: src/frontends/gnome/ChangeLog
===
RCS file: /cvs/lyx/lyx-devel/src/frontends/gnome/ChangeLog,v
retrieving revision 1.38
diff -u -r1.38 ChangeLog
--- src/frontends/gnome/ChangeLog   2002/03/11 22:47:40 1.38
+++ src/frontends/gnome/ChangeLog   2002/03/14 07:35:32
@@ -1,3 +1,10 @@
+2002-03-14  Michael A. Koziarski  [EMAIL PROTECTED]
+
+   * Timeout_pimpl.C
+   * Timeout_pimpl.h: implemented running to fix compilation, linking 
+   fix still to come 
+   
+
 2002-03-11  Lars Gullik Bjønnes  [EMAIL PROTECTED]
 
* docygen fixes.
Index: src/frontends/gnome/Timeout_pimpl.C
===
RCS file: /cvs/lyx/lyx-devel/src/frontends/gnome/Timeout_pimpl.C,v
retrieving revision 1.2
diff -u -r1.2 Timeout_pimpl.C
--- src/frontends/gnome/Timeout_pimpl.C 2002/03/11 22:47:40 1.2
+++ src/frontends/gnome/Timeout_pimpl.C 2002/03/14 07:35:33
@@ -4,6 +4,7 @@
  * Read COPYING
  *
  * \author Baruch Even
+ * \author Michael Koziarski
  */
 
 #include config.h
@@ -28,7 +29,11 @@
stop();
 }
 
-
+bool Timeout::Pimpl::running() const
+{
+return running_;
+}
+ 
 void Timeout::Pimpl::start()
 {
if (conn_.connected()) {
@@ -40,12 +45,14 @@
 SigC::slot(this, Timeout::Pimpl::timeoutEvent),
 owner_-timeout_ms
);
+   running_ = true;
 }
 
 
 void Timeout::Pimpl::stop()
 {
conn_.disconnect();
+   running_ = false;
 }
 
 
Index: src/frontends/gnome/Timeout_pimpl.h
===
RCS file: /cvs/lyx/lyx-devel/src/frontends/gnome/Timeout_pimpl.h,v
retrieving revision 1.4
diff -u -r1.4 Timeout_pimpl.h
--- src/frontends/gnome/Timeout_pimpl.h 2002/03/11 22:47:40 1.4
+++ src/frontends/gnome/Timeout_pimpl.h 2002/03/14 07:35:33
@@ -31,7 +31,10 @@
/// stop the timer
void stop();
/// reset
-   void reset();
+void reset();
+/// Is the timer running?
+bool running() const;
+  
 
 public:
/// The timeout signal, this gets called when the timeout passed.
@@ -41,6 +44,8 @@
Timeout * owner_;
/// Timer connection
SigC::Connection conn_;
+/// Used for running as 

Re: makefile patch

2002-03-13 Thread Lars Gullik Bjønnes

Jean-Marc Lasgouttes [EMAIL PROTECTED] writes:

 Lars == Lars Gullik Bjønnes [EMAIL PROTECTED] writes:

| Lars This is a think I have been planning to do with the makefiles
| Lars for a long time. I am sure there are details that can be
| Lars imporved, but this should make sure that the Makefile.am's are a
| Lars lot more uniform.

| Lars Please comment.

| I'm not sure I like the contents of your include file.

| +AUTOMAKE_OPTIONS = foreign 1.5
| +

| So you want to force automake 1.5? Can't this wait for 1.3.0cvs?

I just saw that we used foreign 1.4 in a couple of files, I'll be
happy with just foreign

| +DISTCLEANFILES= -r *.orig *.rej *~ *.bak lyx.1 core libintl.h config.h 
|config.status config.cache config.log \
| + $(srcdir)/sourcedoc/*~ \
| + $(srcdir)/sourcedoc/html $(srcdir)/sourcedoc/latex \
| + $(srcdir)/sourcedoc/man $(srcdir)/sourcedoc/Doxyfile

| Most of the files there can only exist in _some_ directory (toplevel
| or src). It does not make sense to mention them in a file included
| everywhere. I don't like that.

That is true, but it just makes things easier.

| +MAINTAINERCLEANFILES = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
| + $(srcdir)/aclocal.m4 \
| + $(srcdir)/configure $(srcdir)/development/lyx.spec \
| + $(srcdir)/acinclude.m4 $(srcdir)/sourcedoc/Doxyfile

| Here also, only $(srcdir)/Makefile.in is generic and should be here.

It makes things easier, and although we get some clutter and unwanted
stuff in include.am, we get a much nicer Makefile.am.

-- 
Lgb



Re: getFontSettings optimization

2002-03-13 Thread Lars Gullik Bjønnes

Jean-Marc Lasgouttes [EMAIL PROTECTED] writes:

 Lars == Lars Gullik Bjønnes [EMAIL PROTECTED] writes:

| Lars I think this is a better algorithm for font lookup. (at least
| Lars gprof tells me so)

| This is probably true, since there are very few font changes in a
| typical paragraph. What are the getFontSettings numbers down to?

Each sample counts as 0.01 seconds.
  %   cumulative   self  self total
 time   seconds   secondscalls  us/call  us/call  name
  7.52  0.31 0.31  2043074 0.15 0.29  
LyXTextClass::operator[](std::string const) const
  6.80  0.59 0.28  1397195 0.20 1.31  LyXText::getFont(Buffer const*, 
Paragraph*, int) const
  6.31  0.85 0.26  1401073 0.19 0.23  
Paragraph::getFontSettings(BufferParams const, int) const


| I've been wanting to work on getFontSetting after 1.2.0, so I would
| like to see whether this very simple approach is enough.

I have done the same change to other functions that used matchFT and
lowerbound.



Index: paragraph.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/paragraph.C,v
retrieving revision 1.196
diff -u -p -r1.196 paragraph.C
--- paragraph.C	7 Mar 2002 10:51:45 -	1.196
+++ paragraph.C	13 Mar 2002 09:23:46 -
@@ -581,11 +581,21 @@ LyXFont const Paragraph::getFontSettings
  pos_type pos) const
 {
 	lyx::Assert(pos = size());
-	
+
+#if 0	
 	Pimpl::FontTable search_font(pos, LyXFont());
 	Pimpl::FontList::const_iterator cit = lower_bound(pimpl_-fontlist.begin(),
 		   pimpl_-fontlist.end(),
 		   search_font, Pimpl::matchFT());
+#else
+	Pimpl::FontList::const_iterator cit = pimpl_-fontlist.begin();
+	Pimpl::FontList::const_iterator end = pimpl_-fontlist.end();
+	for (; cit != end; ++cit) {
+		if (cit-pos()  pos)
+			break;
+	}
+#endif
+	
 	LyXFont retfont;
 	if (cit != pimpl_-fontlist.end()) {
 		retfont = cit-font();
@@ -680,20 +690,36 @@ Paragraph::highestFontInRange(pos_type s
 		return def_size;
 
 	LyXFont::FONT_SIZE maxsize = LyXFont::SIZE_TINY;
+#if 0
 	Pimpl::FontTable end_search(endpos, LyXFont());
 	Pimpl::FontList::const_iterator end_it =
 		lower_bound(pimpl_-fontlist.begin(),
 		pimpl_-fontlist.end(),
 		end_search, Pimpl::matchFT());
+#else
+	Pimpl::FontList::const_iterator end_it = pimpl_-fontlist.begin();
+	Pimpl::FontList::const_iterator end = pimpl_-fontlist.end();
+	for (; end_it != end; ++end_it) {
+		if (end_it-pos()  endpos)
+			break;
+	}
+#endif
 	if (end_it != pimpl_-fontlist.end())
 		++end_it;
 
+#if 0
 	Pimpl::FontTable start_search(startpos, LyXFont());
 	Pimpl::FontList::const_iterator cit =
 		lower_bound(pimpl_-fontlist.begin(),
 			pimpl_-fontlist.end(),
 			start_search, Pimpl::matchFT());
-	
+#else
+	Pimpl::FontList::const_iterator cit = pimpl_-fontlist.begin();
+	for (; cit != end; ++cit) {
+		if (cit-pos()  startpos)
+			break;
+	}
+#endif
 	for (; cit != end_it; ++cit) {
 		LyXFont::FONT_SIZE size = cit-font().size();
 		if (size == LyXFont::INHERIT_SIZE)
@@ -757,13 +783,23 @@ void Paragraph::setFont(pos_type pos, Ly
 	// in a new kernel. (Asger)
 	// Next search font table
 
+#if 0
 	Pimpl::FontTable search_font(pos, LyXFont());
 	Pimpl::FontList::iterator it = lower_bound(pimpl_-fontlist.begin(),
 	pimpl_-fontlist.end(),
 	search_font, Pimpl::matchFT());
 	unsigned int i = it - pimpl_-fontlist.begin();
 	bool notfound = it == pimpl_-fontlist.end();
-
+#else
+	Pimpl::FontList::iterator it = pimpl_-fontlist.begin();
+	Pimpl::FontList::iterator endit = pimpl_-fontlist.end();
+	for (; it != endit; ++it) {
+		if (it-pos()  pos)
+			break;
+	}
+	unsigned int i = std::distance(pimpl_-fontlist.begin(), it);
+	bool notfound = (it == endit);
+#endif
 	if (!notfound  pimpl_-fontlist[i].font() == font)
 		return;
 



-- 
Lgb



Re: getFontSettings optimization

2002-03-13 Thread Lars Gullik Bjønnes

Jean-Marc Lasgouttes [EMAIL PROTECTED] writes:

 Lars == Lars Gullik Bjønnes [EMAIL PROTECTED] writes:


| Lars Each sample counts as 0.01 seconds. 
| [...]

| getFontSettings is down to .23ms/call from 0.89. This is good.

| Lars | I've been wanting to work on getFontSetting after 1.2.0, so I
| Lars would | like to see whether this very simple approach is enough.

| Lars I have done the same change to other functions that used matchFT
| Lars and lowerbound.

| Looks like you create common code that should be factored in some
| helper function.

Perhaps, but I am not going to do that now.

-- 
Lgb



Re: small stuff

2002-03-13 Thread Lars Gullik Bjønnes

Andre Poenitz [EMAIL PROTECTED] writes:

| * whitespace changes
| * member var with trailing underscore

I try to stay with the rule that only private class variables get the
trailing underscore.

How hard is it to make owner_ private?

-- 
Lgb



Re: small stuff

2002-03-13 Thread Lars Gullik Bjønnes

Andre Poenitz [EMAIL PROTECTED] writes:

| On Wed, Mar 13, 2002 at 12:35:06PM +0100, Lars Gullik Bjønnes wrote:
 How hard is it to make owner_ private?

| It is only use a couple of times to call a single function:

|owner_.getPixmap()

| So we could have
|a private 'owner_' and a protected 'getPixmap'

a protected getPixmap is then probably best.

| or 
|a protected 'owner() const' 

| Your call.

| Andre'

| -- 
| André Pönitz .. [EMAIL PROTECTED]


-- 
Lgb



Re: small stuff

2002-03-13 Thread Lars Gullik Bjønnes

Andre Poenitz [EMAIL PROTECTED] writes:

| On Wed, Mar 13, 2002 at 12:50:25PM +0100, Lars Gullik Bjønnes wrote:
 | So we could have
 |a private 'owner_' and a protected 'getPixmap'
 
 a protected getPixmap is then probably best.

| Uh... I just see we need Pixmap defined...
| We do not to #include X11/X.h for that, do we?

 | or 
 |a protected 'owner() const' 

| The better way than?

I am stil for the getPixmap solution, but leave the includes as is.
Then it should work right?

-- 
Lgb



Re: makefile patch

2002-03-13 Thread Lars Gullik Bjønnes

Jean-Marc Lasgouttes [EMAIL PROTECTED] writes:

 Lars == Lars Gullik Bjønnes [EMAIL PROTECTED] writes:

| Lars I just saw that we used foreign 1.4 in a couple of files, I'll
| Lars be happy with just foreign

| OK.

| Lars It makes things easier, and although we get some clutter and
| Lars unwanted stuff in include.am, we get a much nicer Makefile.am.

| I think it is better to add the clutter in the Makefiles.am that need
| it. Isn't it possible to do
| VAR += foo bar
| in Makefiles?

Remember that Makefile.am is not a makefile...
I have no idea if it works or not.

-- 
Lgb



Painter diff

2002-03-13 Thread Lars Gullik Bjønnes


These are the changes I have in my tree now:

Index: PainterBase.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/PainterBase.C,v
retrieving revision 1.10
diff -u -p -r1.10 PainterBase.C
--- PainterBase.C   30 Jul 2001 11:55:47 -  1.10
+++ PainterBase.C   13 Mar 2002 12:23:00 -
 -18,9 +18,6 
 #include WorkArea.h
 #include font.h
 
-int PainterBase::dummy1 = 0;
-int PainterBase::dummy2 = 0;
-int PainterBase::dummy3 = 0;
 
 int PainterBase::paperMargin() const
 {
 -67,23 +64,23  PainterBase  PainterBase::buttonFrame(i
 {
//  Width of a side of the button
int d = 2;
-
+   
fillRectangle(x, y, w, d, LColor::top);
fillRectangle(x, (y+h-d), w, d, LColor::bottom);
- 
+   
// Now a couple of trapezoids
int x1[4], y1[4];
- 
-   x1[0] = x+d;   y1[0] = y+d;
-   x1[1] = x+d;   y1[1] = (y+h-d);
-   x1[2] = x; y1[2] = y+h;
+   
+   x1[0] = x + d;   y1[0] = y + d;
+   x1[1] = x + d;   y1[1] = (y + h - d);
+   x1[2] = x; y1[2] = y + h;
x1[3] = x; y1[3] = y;
fillPolygon(x1, y1, 4, LColor::left);
 
-   x1[0] = (x+w-d); y1[0] = y+d;
-   x1[1] = (x+w-d); y1[1] = (y+h-d);
-   x1[2] = x+w; y1[2] = (y+h-d);
-   x1[3] = x+w; y1[3] = y;
+   x1[0] = (x + w - d); y1[0] = y + d;
+   x1[1] = (x + w - d); y1[1] = (y + h - d);
+   x1[2] = x + w; y1[2] = (y + h - d);
+   x1[3] = x + w; y1[3] = y;
fillPolygon(x1, y1, 4, LColor::right);
 
return *this;
Index: PainterBase.h
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/PainterBase.h,v
retrieving revision 1.17
diff -u -p -r1.17 PainterBase.h
--- PainterBase.h   27 Feb 2002 09:59:49 -  1.17
+++ PainterBase.h   13 Mar 2002 12:23:00 -
 -36,13 +36,6  namespace grfx {
  
  */
 class PainterBase {
-protected:
-///
-   static int dummy1;
-   ///
-   static int dummy2;
-   ///
-   static int dummy3;
 public:
///
enum line_width {
 -51,7 +44,7  public:
///
line_thick
};
-
+   
///
enum line_style {
///
 -61,13 +54,13  public:
///
line_onoffdash
};
-
+   
///
explicit PainterBase(WorkArea  wa) : owner(wa) {}

///
virtual ~PainterBase() {}
-
+   
/* Screen geometry */
///
int paperMargin() const;
 -82,7 +75,7  public:
LColor::color = LColor::foreground,
enum line_style = line_solid,
enum line_width = line_thin) = 0;
-
+   
/** Draw the lines between the lines in xp and yp.
xp and yp are arrays of points, and np is the
number of them. */
 -91,13 +84,13  public:
LColor::color = LColor::foreground,
enum line_style = line_solid,
enum line_width = line_thin) = 0;
-
+   
/// Here xp and yp are arrays of points
virtual PainterBase  fillPolygon(
int const * xp, int const * yp,
int np,
LColor::color = LColor::foreground) = 0;
-
+   
/// Draw lines from x1,y1 to x2,y2. They are arrays
 virtual PainterBase  segments(
int const * x1, int const * y1, 
 -117,7 +110,7  public:
virtual PainterBase  circle(
int x, int y, unsigned int d,
LColor::color = LColor::foreground);
-
+   
/// Draw an ellipse
virtual PainterBase  ellipse(
int x, int y,
 -143,7 +136,7  public:

/// A filled rectangle with the shape of a 3D button
virtual PainterBase  button(int x, int y, int w, int h);
-
+   
/// 
 virtual PainterBase  buttonFrame(int x, int y, int w, int h);

 -155,22 +148,22  public:
/// Draw a string at position x, y (y is the baseline)
virtual PainterBase  text(int x, int y,
   string const  str, LyXFont const  f) = 0;
-
+   
/** Draw a string at position x, y (y is the baseline)
This is just for fast drawing */
virtual PainterBase  text(int x, int y, char const * str, size_t l,
-  LyXFont const  f) = 0;
-
+  LyXFont const  f) = 0;
+   
/// Draw a char at position x, y (y is the baseline)
virtual PainterBase  text(int x, int y, char c, LyXFont const  f)=0;
-
+   
/** Draws a string and encloses it inside a rectangle. */
PainterBase  rectText(int x, int baseline, 
   string const  string, 
   LyXFont const  font,
   LColor::color back,
   

Re: Painter diff

2002-03-13 Thread Lars Gullik Bjønnes

Angus Leeming [EMAIL PROTECTED] writes:

| On Wednesday 13 March 2002 12:25 pm, Lars Gullik Bjønnes wrote:

 Index: Painter.h
 ===
  private:
 +/// For the figinset
 +PainterBase  pixmap(int x, int y, int w, int h, Pixmap bitmap);
 +

| Errr, why? Helper functions are fine if they're used by more than one 
| function.

In general I strongly disagree with that statement.

| but this is just daft. You've already proved to yourself that pixmap 
| is used only with Painter.C, so now's the time to dump it.

It is used in image... and the minimal change is this one.


| Angus

|   
| PainterBase  Painter::pixmap(int x, int y, int w, int h, Pixmap bitmap)
| {
|   XGCValues val;
|   val.function = GXcopy;
|   GC gc = XCreateGC(display, owner.getPixmap(),
| GCFunction, val);
|   XCopyArea(display, bitmap, owner.getPixmap(), gc,
| 0, 0, w, h, x, y);
|   XFreeGC(display, gc);
|   return *this;
| }


| PainterBase  Painter::image(int x, int y, int w, int h,
|   grfx::GImage const  image)
| {
|   return pixmap(x, y, w, h, image.getPixmap());
| }




-- 
Lgb



Re: Painter diff

2002-03-13 Thread Lars Gullik Bjønnes

[EMAIL PROTECTED] (Lars Gullik Bjønnes) writes:

| Angus Leeming [EMAIL PROTECTED] writes:

| | On Wednesday 13 March 2002 12:25 pm, Lars Gullik Bjønnes wrote:

 Index: Painter.h
 ===
  private:
 +   /// For the figinset
 +   PainterBase  pixmap(int x, int y, int w, int h, Pixmap bitmap);
 +   

| | Errr, why? Helper functions are fine if they're used by more than one 
| | function.

| In general I strongly disagree with that statement.

| | but this is just daft. You've already proved to yourself that pixmap 
| | is used only with Painter.C, so now's the time to dump it.

so you are more happy with this patch then:



Index: PainterBase.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/PainterBase.C,v
retrieving revision 1.10
diff -u -p -r1.10 PainterBase.C
--- PainterBase.C	30 Jul 2001 11:55:47 -	1.10
+++ PainterBase.C	13 Mar 2002 12:54:44 -
@@ -18,9 +18,6 @@
 #include WorkArea.h
 #include font.h
 
-int PainterBase::dummy1 = 0;
-int PainterBase::dummy2 = 0;
-int PainterBase::dummy3 = 0;
 
 int PainterBase::paperMargin() const
 {
@@ -67,23 +64,23 @@ PainterBase  PainterBase::buttonFrame(i
 {
 	//  Width of a side of the button
 	int d = 2;
-
+	
 	fillRectangle(x, y, w, d, LColor::top);
 	fillRectangle(x, (y+h-d), w, d, LColor::bottom);
- 
+	
 	// Now a couple of trapezoids
 	int x1[4], y1[4];
- 
-	x1[0] = x+d;   y1[0] = y+d;
-	x1[1] = x+d;   y1[1] = (y+h-d);
-	x1[2] = x; y1[2] = y+h;
+	
+	x1[0] = x + d;   y1[0] = y + d;
+	x1[1] = x + d;   y1[1] = (y + h - d);
+	x1[2] = x; y1[2] = y + h;
 	x1[3] = x; y1[3] = y;
 	fillPolygon(x1, y1, 4, LColor::left);
 
-	x1[0] = (x+w-d); y1[0] = y+d;
-	x1[1] = (x+w-d); y1[1] = (y+h-d);
-	x1[2] = x+w; y1[2] = (y+h-d);
-	x1[3] = x+w; y1[3] = y;
+	x1[0] = (x + w - d); y1[0] = y + d;
+	x1[1] = (x + w - d); y1[1] = (y + h - d);
+	x1[2] = x + w; y1[2] = (y + h - d);
+	x1[3] = x + w; y1[3] = y;
 	fillPolygon(x1, y1, 4, LColor::right);
 
 	return *this;
Index: PainterBase.h
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/PainterBase.h,v
retrieving revision 1.17
diff -u -p -r1.17 PainterBase.h
--- PainterBase.h	27 Feb 2002 09:59:49 -	1.17
+++ PainterBase.h	13 Mar 2002 12:54:44 -
@@ -36,13 +36,6 @@ namespace grfx {
  
  */
 class PainterBase {
-protected:
-///
-	static int dummy1;
-	///
-	static int dummy2;
-	///
-	static int dummy3;
 public:
 	///
 	enum line_width {
@@ -51,7 +44,7 @@ public:
 		///
 		line_thick
 	};
-
+	
 	///
 	enum line_style {
 		///
@@ -61,13 +54,13 @@ public:
 		///
 		line_onoffdash
 	};
-
+	
 	///
 	explicit PainterBase(WorkArea  wa) : owner(wa) {}
 	
 	///
 	virtual ~PainterBase() {}
-
+	
 	/* Screen geometry */
 	///
 	int paperMargin() const;
@@ -82,7 +75,7 @@ public:
 		LColor::color = LColor::foreground,
 		enum line_style = line_solid,
 		enum line_width = line_thin) = 0;
-
+	
 	/** Draw the lines between the lines in xp and yp.
 	xp and yp are arrays of points, and np is the
 	number of them. */
@@ -91,13 +84,13 @@ public:
 		LColor::color = LColor::foreground,
 		enum line_style = line_solid,
 		enum line_width = line_thin) = 0;
-
+	
 	/// Here xp and yp are arrays of points
 	virtual PainterBase  fillPolygon(
 		int const * xp, int const * yp,
 		int np,
 		LColor::color = LColor::foreground) = 0;
-
+	
 	/// Draw lines from x1,y1 to x2,y2. They are arrays
 virtual PainterBase  segments(
 		int const * x1, int const * y1, 
@@ -117,7 +110,7 @@ public:
 	virtual PainterBase  circle(
 		int x, int y, unsigned int d,
 		LColor::color = LColor::foreground);
-
+	
 	/// Draw an ellipse
 	virtual PainterBase  ellipse(
 		int x, int y,
@@ -143,7 +136,7 @@ public:
 	
 	/// A filled rectangle with the shape of a 3D button
 	virtual PainterBase  button(int x, int y, int w, int h);
-
+	
 	/// 
 virtual PainterBase  buttonFrame(int x, int y, int w, int h);
 	
@@ -155,22 +148,22 @@ public:
 	/// Draw a string at position x, y (y is the baseline)
 	virtual PainterBase  text(int x, int y,
    string const  str, LyXFont const  f) = 0;
-
+	
 	/** Draw a string at position x, y (y is the baseline)
 	This is just for fast drawing */
 	virtual PainterBase  text(int x, int y, char const * str, size_t l,
-		   LyXFont const  f) = 0;
-
+   LyXFont const  f) = 0;
+	
 	/// Draw a char at position x, y (y is the baseline)
 	virtual PainterBase  text(int x, int y, char c, LyXFont const  f)=0;
-
+	
 	/** Draws a string and encloses it inside a rectangle. */
 	PainterBase  rectText(int x, int baseline, 
 			   string const  string, 
 			   LyXFont const  font,
 			   LColor::color back,
 			   LColor::color frame);
-
+	
 	/** Draw a string and encloses it inside a button frame. */
 	PainterBase  buttonText(int x, int baseline, string const  s,
  LyXFont const  font);
Index: Painter.C

Re: Painter diff

2002-03-13 Thread Lars Gullik Bjønnes

Angus Leeming [EMAIL PROTECTED] writes:

| Yes. In this case I think that the helper function isn't a help.

I have yet another patch for you too look at, the thing missing now is
to get rid of the XChar2b stuff. We want to use wchar_t in interfaces.
(and if wchar_t is not supported, then we should not support XChar2b
stuff either...)



Index: PainterBase.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/PainterBase.C,v
retrieving revision 1.10
diff -u -p -r1.10 PainterBase.C
--- PainterBase.C	30 Jul 2001 11:55:47 -	1.10
+++ PainterBase.C	13 Mar 2002 13:10:48 -
@@ -18,9 +18,6 @@
 #include WorkArea.h
 #include font.h
 
-int PainterBase::dummy1 = 0;
-int PainterBase::dummy2 = 0;
-int PainterBase::dummy3 = 0;
 
 int PainterBase::paperMargin() const
 {
@@ -67,23 +64,23 @@ PainterBase  PainterBase::buttonFrame(i
 {
 	//  Width of a side of the button
 	int d = 2;
-
+	
 	fillRectangle(x, y, w, d, LColor::top);
 	fillRectangle(x, (y+h-d), w, d, LColor::bottom);
- 
+	
 	// Now a couple of trapezoids
 	int x1[4], y1[4];
- 
-	x1[0] = x+d;   y1[0] = y+d;
-	x1[1] = x+d;   y1[1] = (y+h-d);
-	x1[2] = x; y1[2] = y+h;
+	
+	x1[0] = x + d;   y1[0] = y + d;
+	x1[1] = x + d;   y1[1] = (y + h - d);
+	x1[2] = x; y1[2] = y + h;
 	x1[3] = x; y1[3] = y;
 	fillPolygon(x1, y1, 4, LColor::left);
 
-	x1[0] = (x+w-d); y1[0] = y+d;
-	x1[1] = (x+w-d); y1[1] = (y+h-d);
-	x1[2] = x+w; y1[2] = (y+h-d);
-	x1[3] = x+w; y1[3] = y;
+	x1[0] = (x + w - d); y1[0] = y + d;
+	x1[1] = (x + w - d); y1[1] = (y + h - d);
+	x1[2] = x + w; y1[2] = (y + h - d);
+	x1[3] = x + w; y1[3] = y;
 	fillPolygon(x1, y1, 4, LColor::right);
 
 	return *this;
Index: PainterBase.h
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/PainterBase.h,v
retrieving revision 1.17
diff -u -p -r1.17 PainterBase.h
--- PainterBase.h	27 Feb 2002 09:59:49 -	1.17
+++ PainterBase.h	13 Mar 2002 13:10:48 -
@@ -36,13 +36,6 @@ namespace grfx {
  
  */
 class PainterBase {
-protected:
-///
-	static int dummy1;
-	///
-	static int dummy2;
-	///
-	static int dummy3;
 public:
 	///
 	enum line_width {
@@ -51,7 +44,7 @@ public:
 		///
 		line_thick
 	};
-
+	
 	///
 	enum line_style {
 		///
@@ -61,13 +54,13 @@ public:
 		///
 		line_onoffdash
 	};
-
+	
 	///
 	explicit PainterBase(WorkArea  wa) : owner(wa) {}
 	
 	///
 	virtual ~PainterBase() {}
-
+	
 	/* Screen geometry */
 	///
 	int paperMargin() const;
@@ -82,7 +75,7 @@ public:
 		LColor::color = LColor::foreground,
 		enum line_style = line_solid,
 		enum line_width = line_thin) = 0;
-
+	
 	/** Draw the lines between the lines in xp and yp.
 	xp and yp are arrays of points, and np is the
 	number of them. */
@@ -91,13 +84,13 @@ public:
 		LColor::color = LColor::foreground,
 		enum line_style = line_solid,
 		enum line_width = line_thin) = 0;
-
+	
 	/// Here xp and yp are arrays of points
 	virtual PainterBase  fillPolygon(
 		int const * xp, int const * yp,
 		int np,
 		LColor::color = LColor::foreground) = 0;
-
+	
 	/// Draw lines from x1,y1 to x2,y2. They are arrays
 virtual PainterBase  segments(
 		int const * x1, int const * y1, 
@@ -117,7 +110,7 @@ public:
 	virtual PainterBase  circle(
 		int x, int y, unsigned int d,
 		LColor::color = LColor::foreground);
-
+	
 	/// Draw an ellipse
 	virtual PainterBase  ellipse(
 		int x, int y,
@@ -143,7 +136,7 @@ public:
 	
 	/// A filled rectangle with the shape of a 3D button
 	virtual PainterBase  button(int x, int y, int w, int h);
-
+	
 	/// 
 virtual PainterBase  buttonFrame(int x, int y, int w, int h);
 	
@@ -155,22 +148,22 @@ public:
 	/// Draw a string at position x, y (y is the baseline)
 	virtual PainterBase  text(int x, int y,
    string const  str, LyXFont const  f) = 0;
-
+	
 	/** Draw a string at position x, y (y is the baseline)
 	This is just for fast drawing */
 	virtual PainterBase  text(int x, int y, char const * str, size_t l,
-		   LyXFont const  f) = 0;
-
+   LyXFont const  f) = 0;
+	
 	/// Draw a char at position x, y (y is the baseline)
 	virtual PainterBase  text(int x, int y, char c, LyXFont const  f)=0;
-
+	
 	/** Draws a string and encloses it inside a rectangle. */
 	PainterBase  rectText(int x, int baseline, 
 			   string const  string, 
 			   LyXFont const  font,
 			   LColor::color back,
 			   LColor::color frame);
-
+	
 	/** Draw a string and encloses it inside a button frame. */
 	PainterBase  buttonText(int x, int baseline, string const  s,
  LyXFont const  font);
Index: Painter.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/Painter.C,v
retrieving revision 1.32
diff -u -p -r1.32 Painter.C
--- Painter.C	27 Feb 2002 09:59:48 -	1.32
+++ Painter.C	13 Mar 2002 13:10:48 -
@@ -34,13 +34,26 @@
 
 #include cmath
 
+
 using std::endl;
 using std::max;
 

Re: makefile patch

2002-03-13 Thread Lars Gullik Bjønnes

Jean-Marc Lasgouttes [EMAIL PROTECTED] writes:

 Lars == Lars Gullik Bjønnes [EMAIL PROTECTED] writes:

| Lars This is a think I have been planning to do with the makefiles
| Lars for a long time. I am sure there are details that can be
| Lars imporved, but this should make sure that the Makefile.am's are a
| Lars lot more uniform.

| Lars Please comment.

| I'm not sure I like the contents of your include file.

Ok, does this patch taste better?

Index: Makefile.am
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/Makefile.am,v
retrieving revision 1.28
diff -u -p -r1.28 Makefile.am
--- Makefile.am 11 Mar 2002 23:02:03 -  1.28
+++ Makefile.am 13 Mar 2002 13:38:48 -
@@ -1,19 +1,20 @@
-AUTOMAKE_OPTIONS = foreign
-DISTCLEANFILES = -r *.orig *.rej *~ *.bak lyx.1 core \
-   config.status config.cache config.log \
+include $(top_srcdir)/config/include.am
+
+DISTCLEANFILES += lyx.1 config.status config.cache config.log \
$(srcdir)/sourcedoc/*~ \
$(srcdir)/sourcedoc/html $(srcdir)/sourcedoc/latex \
$(srcdir)/sourcedoc/man $(srcdir)/sourcedoc/Doxyfile
-MAINTAINERCLEANFILES = $(srcdir)/Makefile.in $(srcdir)/aclocal.m4 \
+
+MAINTAINERCLEANFILES += $(srcdir)/aclocal.m4 \
$(srcdir)/configure $(srcdir)/development/lyx.spec \
$(srcdir)/acinclude.m4 $(srcdir)/sourcedoc/Doxyfile
+
 SUBDIRS = intl po sigc++ boost src lib
 
 EXTRA_DIST = ANNOUNCE INSTALL.OS2 INSTALL.autoconf README.OS2 \
UPGRADING lyx.man acconfig.h autogen.sh \
config development images sourcedoc
 
-#ETAGS_ARGS = --language-force=c++
 man_MANS = lyx.1
 
 ## Needed by bindist
@@ -57,10 +58,6 @@ bindist:
 doxydoc: sourcedoc/Doxyfile
cd sourcedoc; \
doxygen ./Doxyfile
-
-#sourcedoc/Doxyfile: sourcedoc/Doxyfile.in config.status
-#  cd $(top_builddir) \
-#   CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
 
 lgbtags:
etags --totals=yes --recurse=yes -o TAGS $(top_srcdir)/*
Index: config/include.am
===
RCS file: config/include.am
diff -N config/include.am
--- /dev/null   1 Jan 1970 00:00:00 -
+++ config/include.am   13 Mar 2002 13:38:48 -
@@ -0,0 +1,10 @@
+AUTOMAKE_OPTIONS = foreign
+
+DISTCLEANFILES= -r *.orig *.rej *~ *.bak core
+
+MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
+
+ETAGS_ARGS = --lang=c++
+
+BOOST_INCLUDES = -I$(top_srcdir)/boost
+SIGC_INCLUDES = -I$(top_srcdir) -I$(top_builddir)
Index: src/Makefile.am
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/Makefile.am,v
retrieving revision 1.113
diff -u -p -r1.113 Makefile.am
--- src/Makefile.am 12 Mar 2002 17:15:44 -  1.113
+++ src/Makefile.am 13 Mar 2002 13:38:49 -
@@ -1,7 +1,11 @@
-AUTOMAKE_OPTIONS = foreign
+include $(top_srcdir)/config/include.am
+
+DISTCLEANFILES += config.h libintl.h
+
+MAINTAINERCLEANFILES += $(srcdir)/config.h.in
+
 SUBDIRS = mathed insets graphics support frontends
-DISTCLEANFILES= *.orig *.rej *~ *.bak core libintl.h config.h
-MAINTAINERCLEANFILES = $(srcdir)/Makefile.in $(srcdir)/config.h.in
+
 bin_PROGRAMS = lyx
 
 lyx_DEPENDENCIES = mathed/libmathed.o insets/libinsets.o \
@@ -22,9 +26,7 @@ EXTRA_DIST = config.h.in stamp-h.in chea
Variables.h \
counters.C \
counters.h
- 
-ETAGS_ARGS = --lang=c++
-BOOST_INCLUDES = -I$(top_srcdir)/boost
+
 INCLUDES = $(SIGC_CFLAGS) $(BOOST_INCLUDES) $(PSPELL_INCLUDES)
 localedir = $(datadir)/locale
 BUILT_SOURCES = version.C
@@ -66,7 +68,6 @@ lyx_SOURCES = \
LyXAction.h \
LyXView.C \
LyXView.h \
-   Makefile.in \
MenuBackend.C \
MenuBackend.h \
Painter.C \
Index: src/frontends/Makefile.am
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/Makefile.am,v
retrieving revision 1.26
diff -u -p -r1.26 Makefile.am
--- src/frontends/Makefile.am   1 Mar 2002 15:08:12 -   1.26
+++ src/frontends/Makefile.am   13 Mar 2002 13:38:49 -
@@ -1,15 +1,10 @@
-AUTOMAKE_OPTIONS = foreign 1.4
-DISTCLEANFILES= *.orig *.rej *~ *.bak core
-MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
-# xforms has to be fixed here as we still need object files in this directory
-# for the compilation of other frontends, so until that we have to let this
-# here.
+include $(top_srcdir)/config/include.am
+
 SUBDIRS = controllers @FRONTEND@
-ETAGS_ARGS = --lang=c++
-BOOST_INCLUDES = -I$(top_srcdir)/boost
-INCLUDES = $(FRONTEND_INCLUDES) -I$(srcdir)/..  $(SIGC_CFLAGS) $(BOOST_INCLUDES)
-LIBS =
+
 noinst_LTLIBRARIES = libfrontends.la
+
+INCLUDES = $(FRONTEND_INCLUDES) -I$(srcdir)/..  $(SIGC_CFLAGS) $(BOOST_INCLUDES)
 
 libfrontends_la_LIBADD= @FRONTEND_GUILIB@ \
controllers/*.lo
Index: src/frontends/xforms/Makefile.am
===
RCS file: 

Re: [Devel] Bug list update again

2002-03-13 Thread Lars Gullik Bjønnes

Angus Leeming [EMAIL PROTECTED] writes:

| On Wednesday 13 March 2002 1:19 pm, Herbert Voss wrote:
 again: the patch makes some people happy who like more wysiwyg.
 And the argument of JMarc that a cryptic key is more
 useful than the real output, is not an argument!
 that is all! When you rewrite the citation stuff, you can
 delete what you want, what has this to do with this patch?

| It's a nasty fudge. Ask Lars what he thinks of nasty fudges.

fudge? Isn't that some kind of dessert?

-- 
Lgb



  1   2   3   >