Re: [patch] fix bug 2026

2005-12-29 Thread Jose' Matos
On Wednesday 28 December 2005 15:18, Jean-Marc Lasgouttes wrote:
 As I wrote in the bug, I am not sure we need to enforce Standard
 paragraphs. Note that g-brief will probably use Letter (the default
 layout) in ERT anyway. This is very bad, but it happens because we
 have no notion of a 'naked style' (not defaultLayout, but some layout
 that would have all characteristics set to default).

  Notice also that the same happens inside table cells without fixed size. We 
have been able to get away with it because para in latex translates to 
nothing. Those tables inset text are another good candidate for the naked 
layouts.

 Implementing such 
 a style in textclass would not be difficult (it does not need to be
 declared in layout files actually), and code relying on
 forceDefaultParagraph should rely on this new nakedLayout() instead of
 defaultLayout(). This is not difficult to do, but more work that just
 adding a Standard entry to g-brief-en.

 As I have told yesterday I agree with Jean-Marc that those layouts don't 
belong to textclasses, the same way that we don't declare the insets inset a 
text class file.

 JMarc

-- 
José Abílio


Re: [patch] fix bug 2153

2005-12-29 Thread Georg Baum
On Wednesday 28 December 2005 14:52, Lars Gullik Bjønnes wrote:
 Ok, didn't realize that. Please try to get someone to test it (and
 comment), we should try to get this fixed before 1.3.

I need volunteers please!


Georg



Re: [patch] fix bug 2026

2005-12-29 Thread Georg Baum
On Thursday 29 December 2005 09:28, Jose' Matos wrote:
   Notice also that the same happens inside table cells without fixed size.
 We have been able to get away with it because para in latex translates to
 nothing. Those tables inset text are another good candidate for the naked
 layouts.

Yes. Meanwhile I propose the attached patch to get rid of the hardcoded 
Standard layout (which I introduced recently because I did not know of the 
default layout). Removing a fixed column width now creates the same layout as 
is created for new cells.
OK to commit?


Georg
Index: src/ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v
retrieving revision 1.2345
diff -u -p -r1.2345 ChangeLog
--- src/ChangeLog	23 Dec 2005 12:19:56 -	1.2345
+++ src/ChangeLog	29 Dec 2005 09:19:55 -
@@ -1,3 +1,8 @@
+2005-12-29  Georg Baum  [EMAIL PROTECTED]
+
+	* tabular.C (toggleFixedWidth): Use default layout of text class
+	instead of hardcoded Standard
+
 2005-12-22  Jean-Marc Lasgouttes  [EMAIL PROTECTED]
 
 	* lyxfunc.C (dispatch): do not call getStatus again to determine
Index: src/tabular.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/tabular.C,v
retrieving revision 1.228
diff -u -p -r1.228 tabular.C
--- src/tabular.C	28 Nov 2005 11:52:01 -	1.228
+++ src/tabular.C	29 Dec 2005 09:19:58 -
@@ -896,7 +896,9 @@ void toggleFixedWidth(LCursor  cur, Ins
 
 	// reset layout
 	cur.push(*inset);
-	inset-getText(0)-setLayout(0, cur.lastpit() + 1, Standard);
+	// undo information has already been recorded
+	inset-getText(0)-setLayout(0, cur.lastpit() + 1,
+			bp.getLyXTextClass().defaultLayoutName());
 	cur.pop();
 }
 


Re: [patch] fix bug 2026

2005-12-29 Thread Lars Gullik Bjønnes
Georg Baum [EMAIL PROTECTED] writes:

| On Thursday 29 December 2005 09:28, Jose' Matos wrote:
|Notice also that the same happens inside table cells without fixed size.
|  We have been able to get away with it because para in latex translates to
|  nothing. Those tables inset text are another good candidate for the naked
|  layouts.
| 
| Yes. Meanwhile I propose the attached patch to get rid of the hardcoded 
| Standard layout (which I introduced recently because I did not know of the 
| default layout). Removing a fixed column width now creates the same layout as 
| is created for new cells.
| OK to commit?

ok

-- 
Lgb



Re: [Cvslog] lyx-devel po/: ChangeLog pl.po lib/: CREDITS

2005-12-29 Thread Lars Gullik Bjønnes
Tomasz Luczak [EMAIL PROTECTED] writes:

| Lars Gullik Bjønnes wrote:
|  Thomasz, can you send a new patch against generate_contributions.py?
| 
| You can find in attachment patch to generate_contributions.py

ok, added.

-- 
Lgb



Re: New LyX with Grammar Checker Prototype (v0.3)

2005-12-29 Thread Juergen Spitzmueller
[EMAIL PROTECTED] wrote:
 Um... do you mean the wiki or the user's list?  (The latter makes sense to
 me for getting testers...)

I mean: Add a decription page on the wiki and announce it on the users list.

Jürgen


Re: Updated pl.pl

2005-12-29 Thread Lars Gullik Bjønnes
Tomasz Luczak [EMAIL PROTECTED] writes:

| Hi
| 
| I send updated to 1.4.0rc3 polish translation of pl.po file.
| kbabel reports:
| fuzzy: 3
| untranslated: 371

Ok, committed.

-- 
Lgb



Re: OT: automake woes

2005-12-29 Thread Angus Leeming
Lars Gullik Bjønnes wrote:
 I think the only way to do this with automake is to have the targets
 for generating the files and using explict dependencies:
 
 *.$(OBJEXT): kvsprefs.cpp kvsprefs.h prefs.cpp prefs.h
 
 kvsprefs.h: kvsprefs.cpp
 
 kvsprefs.cpp: kviewshell.kcfg kvsprefs.kcfgc
  $(CONFIG_COMPILER) $(srcdir)/kviewshell.kcfg
  $(srcdir)/kvsprefs.kcfgc
 
 
 prefs.h: prefs.cpp
 
 prefs.cpp: kdvi.kcfg prefs.kcfgc
  $(CONFIG_COMPILER) $(srcdir)/kdvi.kcfg $(srcdir)/prefs.kcfgc

Many, many thanks for the pointers, Lars. I'll try it out and let you know.

-- 
Angus



[New layout] SVMult.cls

2005-12-29 Thread Koji Yokota

Hi,

I have a layout file for SVMult.cls which is for manuscript of a contributed book from Springer Verlag (http://www.springer.com/sgw/cda/frontpage/0,,5-40020-2-71415-0,00.html).

Is it possible to merge the layout file to an appropriate LyX version?

-- 
Koji Yokota ([EMAIL PROTECTED])
Otaru University of Commerce
#% Do not delete the line below; configure depends on this
#  \DeclareLaTeXClass[svmult]{article (SVMult)}
# Author: Koji Yokota [EMAIL PROTECTED]
# based on amsart.layout

# Input general definitions
Input svmultclass.inc

ClassOptions
  PageStyle  
  FontSize   10
End  

# There are no chapters in an article.
NoStyle Part
NoStyle Part*
NoStyle Chapter
NoStyle Chapter*

MaxCounter  Counter_Chapter
SecNumDepth 4
TocDepth4

# The AMS documentclasses use the package amsmath and provide the
# functionality of makeidx.sty.
ProvidesAmsmath 1
ProvidesMakeidx 1

Preamble
  \usepackage{amsmath}
EndPreamble


### Now the title stuff. We copy do not use stdstruct.inc to keep
### things in the right order
### Styles available
#Title
#Title*
#TOC Title
#Title in Running Head
#TOC Author
#Author
#Author in Running Head
#Date
#Abstract 
#Address
#Current_Address
#Institute
#URL
#Keywords
#Thanks
#Dedicatory
#Translator
#Subjectclass
#Bibliography
#List of Abbreviations  Symbols
#Petit

# Abstract style definition
Style Abstract 
  MarginFirst_Dynamic
  LatexType Environment
  InTitle   1
  LatexName abstract
  LeftMarginMMM
  LabelIndent   MMM
  RightMargin   MMM
  ParIndent MM
  TopSep0.7
  BottomSep 0.7
  Align Block
  AlignPossible Block
  LabelType Static
  LabelString   Abstract.
  LabelSep  M

  # standard font definition
  Font 
SizeSmall
  EndFont

  # label font definition
  LabelFont
Shape   Smallcaps
  EndFont
End 

# Institute style definition
Style Institute
  MarginFirst_Dynamic
  LatexType Command
  InTitle   1
  LatexName institute
  ParSkip   0.4
  BottomSep 1.5
  ParSep1.5
  Align Left
  AlignPossible Block, Left, Right, Center
  LabelType Static
  labelString   Institute and e-mail: 
  LabelFont
Shape   Italic
  EndFont
End

# Keywords style definition
Style Keywords
  MarginDynamic
  LatexType Command
  InTitle   1
  LatexName keywords
  ParSkip   0.4
  BottomSep 1.5
  ParSep1.5
  Align Left
  AlignPossible Block, Left, Right, Center
  LabelType Static
  LabelString   Key words and phrases: 
  # label font definition
  LabelFont
Shape   Italic
  EndFont
End  

# Thanks style definition
Style Thanks
  MarginDynamic
  LatexType Command
  InTitle   1
  LatexName thanks
  ParSkip   0.4
  BottomSep 1.5
  ParSep1.5
  Align Left
  AlignPossible Block, Left, Right, Center
  LabelType Static
  LabelString   Thanks: 
  # label font definition
  LabelFont
Shape   Italic
  EndFont
End  

# Bibliography style definition
Style Bibliography
  MarginFirst_Dynamic
  LatexType Item_Environment
  LatexName thebibliography
  NextNoIndent  1
  LeftMarginMM
  ParSkip   0.4
  ItemSep   0
  TopSep0.7
  BottomSep 0.7
  ParSep0.5
  Align Block
  AlignPossible Block, Left
  LabelType Bibliography
  LabelString   References
  LabelBottomSep0.7

  # standard font definition
  Font
SizeSmall
  EndFont

  # label font definition
  LabelFont
SizeNormal
Shape   Smallcaps
  EndFont
End

Style List of Abbreviations  Symbols
  CopyStyle Description
  LatexName abbrsymblist
End

Style Petit
  CopyStyle Standard
  LatexType Environment
  LatexName petit
  LeftMarginMMM
  RightMargin   MMM
  Font
SizeSmall
  FontEnd
End

# Including the maths stuff
Input svmultmaths.inc
# Author : David L. Johnson [EMAIL PROTECTED]
# Probably broken by Jean-Marc Lasgouttes [EMAIL PROTECTED]
# modified and modularized by Emmanuel GUREGHIAN [EMAIL PROTECTED]
# Further modified for SVMult by Koji Yokota [EMAIL PROTECTED]
# This version has Theorems and other results numbered in one sequence, and all
# numbered environments (figures as well) containing the section number.
# (Themorem (1.1), Corollary (1.2) 

Re: [Cvslog] lyx-devel po/: ChangeLog pl.po lib/: CREDITS

2005-12-29 Thread Tomasz Luczak

Lars Gullik Bjønnes wrote:

Tomasz Luczak [EMAIL PROTECTED] writes:

| Lars Gullik Bjønnes wrote:
|  Thomasz, can you send a new patch against generate_contributions.py?
| 
| You can find in attachment patch to generate_contributions.py

ok, added.

Very thanks

Best regards
Tomasz
--
  Tomasz Łuczak

 TECHNODAT Sp. z o.o.tel +48 32 2382337
 ul. Kościuszki 1c   tel +48 32 3314484
 44-100 Gliwice, PL  mob +48 602 524713
 http://www.technodat.com.pl http://www.emrm.pl


Bugs

2005-12-29 Thread Pedro Nucci

Hi, using the windows version, i think i've found two bugs:

FIRST:

started a new blank document, and inserted the title. The title contained  
a line break (ctrl+enter).
I've selected the title's first line, and changed the following Character  
properties:


Family: Sans Serif

pressed Apply - ok, changed

Series: bold

pressed Apply - ok, changed

Shape: italic

pressed Apply - ok, changed

Shape: No Changes

pressed Apply - remains Italic and Bold on Lyx's screen AND the .dvi too

The .lyx file has \series bold and not \shape italic

SECOND:

with Lyx opened, by default its language is English. So i changed it in  
Preferences window to Brazilian Portuguese. When i started a new document,  
its language was English. Just when i restarted Lyx, the new documents got  
the correct language;





anyway you've done a great work on Lyx, it's being a pleasure writing on it


hope it helps, sorry for bad english
Pedro Nucci





___ 
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB 
http://mail.yahoo.it




Re: New LyX with Grammar Checker Prototype (v0.3)

2005-12-29 Thread christian . ridderstrom
On Thu, 29 Dec 2005, Juergen Spitzmueller wrote:

 [EMAIL PROTECTED] wrote:
  Um... do you mean the wiki or the user's list?  (The latter makes sense to
  me for getting testers...)
 
 I mean: Add a decription page on the wiki and announce it on the users list.

Which he just de... :-)

/C

-- 
Christian Ridderström, +46-8-768 39 44   http://www.md.kth.se/~chr




Re: Bugs

2005-12-29 Thread Juergen Spitzmueller
Pedro Nucci wrote:
 Shape: No Changes

 pressed Apply - remains Italic and Bold on Lyx's screen AND the .dvi too

That's correct. You're looking for Shape: Reset

Jürgen


Re: New LyX with Grammar Checker Prototype (v0.3)

2005-12-29 Thread christian . ridderstrom
On Thu, 29 Dec 2005 [EMAIL PROTECTED] wrote:

 On Thu, 29 Dec 2005, Juergen Spitzmueller wrote:
 
  [EMAIL PROTECTED] wrote:
   Um... do you mean the wiki or the user's list?  (The latter makes sense to
   me for getting testers...)
  
  I mean: Add a decription page on the wiki and announce it on the users list.
 
 Which he just de... :-)

*sigh*... That should be: Which he just did... :-)

/C

-- 
Christian Ridderström, +46-8-768 39 44   http://www.md.kth.se/~chr




Re: lyx-1.4.0 and Qt-4.1

2005-12-29 Thread Abdel

Hello,

Judging from the absence of answer, I suppose this matter is not 
interesting to you :-(
It's OK, I understand that you are all very busy with the release of 
1.4.0. I have worked some more on the port so if there is any interest 
in the future, just let me know. FYI, the changes from Qt3 to Qt4 are 
quite big and I think it's worth keeping both version in parallel. I 
will try to keep my port in sync with the qt2 frontend.
Right now, I am having big headache on QWorkarea and QContentpane widget 
dimensions... At this point I am wasting time so I think I will just 
give up.


Regards,
Abdel.


Abdel a écrit :

Dear developpers,

I could not sleep last night so I tried as an exercise to see if lyx 
could be ported easily to the fresh Qt-4.1. As you might guess it was 
more difficult than I originally thought. But after much work it 
compiles and loads!
There is a problem QImage which doesn't support any image format. I 
suspect the Painter is not correctly started. Because of that, the 
program could not load any document (more on that later). But the 
menubar, the Browse file dialog and the about box are functional.


I don't know if this is interesting to you and if you planned already to 
port to Qt4.1 sometimes in the future. If so, I am willing to help 
completing this port if someone more knowledgeable than me take lead. If 
not, it was fun anyway and I learned a bit about Qt4 in the process. IMO 
it is much cleaner that Qt3 (Disclaimer: I knew close to nothing on 
these two before yesterday). I could send my qt4 directory to anyone 
interested in any case.


What I did:

1) copy src/frontends/qt2 to src/frontends/qt4
2) launch qt3to4 porting tool to all .C and .h
3) replace uic with uic3 in all Makefiles
4) remove -tr qt_ from UICFLAGS in  all Makefiles
5) compile and fix...

I know nothing about the auto-tools so I just modified the Makefile, 
sorry about that.


The big remaining problem is with QPicture. In order to let lyx start, I 
had to comment line src/graphics/GraphicsCacheItem.C:340


// There must be a format to load from.
BOOST_ASSERT(!formats.empty());

I have attached my modified src/frontends/qt4/Qimage.C. Please find 
below, the output of lyx -dbg graphics.


Thanks,
Abdel.


D:\msys\home\yns\src\lyx-devel\src.\lyx-qt -dbg graphics
Setting debug level to graphics
Debugging `graphics' (Graphics conversion and loading)
LoaderQueue:  priority set to 10 images at a time, 100 milliseconds 
between calls

Recognised Fileformat: agr
filetools(getFormatFromContents)
Couldn't find a known format!
Ignoring obsolete use_tempdir flag.
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
File type not recognised before EOF!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
Language code:C
Setting new locale for Qt:C
LoaderQueue: waking up
QPainter::begin(), paintdevice returned engine == 0, type: 3

QPainter::end: Painter is not active, aborted
QPainter::begin(), paintdevice returned engine == 0, type: 2

Painter started successfully.
QColor::setNamedColor: unknown color name 'grey40'
QPainter::end: Painter is not active, aborted
QPainter::begin(), paintdevice returned engine == 0, type: 3

QPainter::end: Painter is not active, aborted
lyx: Disabling LyX socket.
LoaderQueue: 1 items in the queue
QPainter::begin(), paintdevice returned engine == 0, type: 2

Painter started successfully.
QPainter::end: Painter is not active, aborted
Recognised Fileformat: ppm
[GrahicsCacheItem::convertToDisplayFormat]
Attempting to convert image file: 
D:/msys/home/yns/src/lyx-devel/lib/images/banner.ppm
with displayed filename: 
D:\msys\home\yns\src\lyx-devel\lib\images\banner.ppm

Recognised Fileformat: ppm

The file contains ppm format data.

The image loader can load the following directly:

Qt4 Problem: No Format available!

Of these, LyX recognises the following formats:


Converting it to  format.
Converter c-tor:
from_file: D:/msys/home/yns/src/lyx-devel/lib/images/banner.ppm
to_file_base: C:/Documents and Settings/yns.ERC.000/Local 
Settings/Temp/lyx_tmpdir2128a03208/banner2128

a03208
from_format:  ppm
to_format:
build_script ... ready 

Re: lyx-1.4.0 and Qt-4.1

2005-12-29 Thread Lars Gullik Bjønnes
Abdel [EMAIL PROTECTED] writes:

| Hello,
| 
| Judging from the absence of answer, I suppose this matter is not
| interesting to you :-(

Oh it is, but as you rightly suspect: not right now.

| It's OK, I understand that you are all very busy with the release of
| 1.4.0. I have worked some more on the port so if there is any interest
| in the future, just let me know. FYI, the changes from Qt3 to Qt4 are
| quite big and I think it's worth keeping both version in parallel. I
| will try to keep my port in sync with the qt2 frontend.
| Right now, I am having big headache on QWorkarea and QContentpane
| widget dimensions... At this point I am wasting time so I think I will
| just give up.

Please don't forget completely about this. This will be more important
in the next development round.

Thanks a lot for looking at this.

-- 
Lgb



Latest patch (Re: Mac speed, profiling)

2005-12-29 Thread Martin Vermeer
On Thu, Dec 22, 2005 at 06:23:26PM +0100, Jean-Marc Lasgouttes wrote:
  David == David Green [EMAIL PROTECTED] writes:
 
 David On 12/22/05 7:41 AM, Jean-Marc Lasgouttes
 David [EMAIL PROTECTED]
 David wrote:
 
  Martin == Martin Vermeer [EMAIL PROTECTED] writes:
 
 Martin Is crc32 invariant for character transposition?
   Sure.
 
 David Erm, crc32 should produce a different result when characters
 David are transposed.
 
 Yes, that's what I meant, sorry.
 
 So my answer was supposed to be of course not.

That is what I wanted to hear...

Attached, finally, the corrected version of the patch using crc32. Turns
out y isn't needed here after all.

- Martin

Index: RowList_fwd.h
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/RowList_fwd.h,v
retrieving revision 1.6
diff -u -p -r1.6 RowList_fwd.h
--- RowList_fwd.h   31 Jan 2005 16:29:38 -  1.6
+++ RowList_fwd.h   29 Dec 2005 20:58:34 -
@@ -15,6 +15,7 @@
 #include lyxrow.h
 
 #include vector
+#include map
 
 /**
  * Each paragraph is broken up into a number of rows on the screen.
@@ -22,5 +23,7 @@
  * downwards.
  */
 typedef std::vectorRow RowList;
+///
+typedef std::maplyx::size_type, lyx::size_type RowSignature;
 
 #endif
Index: paragraph.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/paragraph.C,v
retrieving revision 1.417
diff -u -p -r1.417 paragraph.C
--- paragraph.C 25 Nov 2005 14:40:34 -  1.417
+++ paragraph.C 29 Dec 2005 20:58:35 -
@@ -81,7 +81,8 @@ Paragraph::Paragraph()
 Paragraph::Paragraph(Paragraph const  par)
:   itemdepth(par.itemdepth), insetlist(par.insetlist),
dim_(par.dim_),
-   rows_(par.rows_), layout_(par.layout_),
+   rows_(par.rows_), rowSignature_(par.rowSignature_), 
+   layout_(par.layout_),
text_(par.text_), begin_of_body_(par.begin_of_body_),
  pimpl_(new Paragraph::Pimpl(*par.pimpl_, this))
 {
@@ -107,6 +108,7 @@ Paragraph  Paragraph::operator=(Paragra
 
rows_ = par.rows_;
dim_ = par.dim_;
+   rowSignature_ = par.rowSignature_;
layout_ = par.layout();
text_ = par.text_;
begin_of_body_ = par.begin_of_body_;
Index: paragraph.h
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/paragraph.h,v
retrieving revision 1.157
diff -u -p -r1.157 paragraph.h
--- paragraph.h 7 Sep 2005 10:36:59 -   1.157
+++ paragraph.h 29 Dec 2005 20:58:35 -
@@ -391,7 +391,9 @@ public:
RowList  rows() { return rows_; }
/// The painter and others use this
RowList const  rows() const { return rows_; }
-
+   ///
+   RowSignature  rowSignature() const { return rowSignature_; }
+   
/// LyXText::redoParagraph updates this
Dimension  dim() { return dim_; }
 
@@ -408,6 +410,9 @@ private:
 
///
mutable RowList rows_;
+   ///
+   mutable RowSignature rowSignature_;
+
///
LyXLayout_ptr layout_;
/**
Index: rowpainter.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/rowpainter.C,v
retrieving revision 1.160
diff -u -p -r1.160 rowpainter.C
--- rowpainter.C17 Dec 2005 15:03:39 -  1.160
+++ rowpainter.C29 Dec 2005 20:58:36 -
@@ -40,6 +40,8 @@
 
 #include support/textutils.h
 
+#include boost/crc.hpp
+
 using lyx::pos_type;
 using lyx::pit_type;
 
@@ -717,7 +719,8 @@ void RowPainter::paintText()
 
 
 void paintPar
-   (PainterInfo  pi, LyXText const  text, pit_type pit, int x, int y)
+   (PainterInfo  pi, LyXText const  text, pit_type pit, int x, int y,
+bool repaintAll)
 {
 // lyxerrpaintPar: pit:   pit   at y:   y  endl;
static NullPainter nop;
@@ -731,22 +734,67 @@ void paintPar
theCoords.parPos()[text][pit] = Point(x, y);
 
y -= rb-ascent();
-   for (RowList::const_iterator rit = rb; rit != re; ++rit) {
+   lyx::size_type rowno(0);
+   for (RowList::const_iterator rit = rb; rit != re; ++rit, ++rowno) {
y += rit-ascent();
bool const inside = (y + rit-descent() = 0
y - rit-ascent()  ww);
RowPainter rp(inside ? pi : nullpi, text, pit, *rit, x, y);
 
y += rit-descent();
-   rp.paintAppendix();
-   rp.paintDepthBar();
-   rp.paintChangeBar();
-   if (rit == rb)
-   rp.paintFirst();
-   if (rit + 1 == re)
-   rp.paintLast();
-   rp.paintText();
+
+   // Row signature; has row changed since last paint?
+   boost::crc_32_type crc;
+   for (lyx::pos_type i = 

Re: [PATCH] Re: Mathinset b ehavior (André?)

2005-12-29 Thread Martin Vermeer
On Wed, Dec 28, 2005 at 05:24:27PM +0100, Jean-Marc Lasgouttes wrote:
  Andre == Andre Poenitz [EMAIL PROTECTED] writes:
 
  So, what do you propose? I guess I could keep mathMacroClose as it
  was,
 
 Andre Yes.
 
  and put the cursor inside the new inset only when space was
  pressed?
 
 What about that one?
 
 JMarc
 

I am getting lots of math errors when loading the User Guide, like
unusual contents found from math_parser.C. Could this come from this
patch? Current CVS.

- Martin



pgphPSvQ262DQ.pgp
Description: PGP signature


Re: lyx-1.4.0 and Qt-4.1

2005-12-29 Thread Georg Baum
On Thursday 29 December 2005 20:51, Abdel wrote:
 Hello,

 Judging from the absence of answer, I suppose this matter is not
 interesting to you :-(
 It's OK, I understand that you are all very busy with the release of
 1.4.0. I have worked some more on the port so if there is any interest
 in the future, just let me know. FYI, the changes from Qt3 to Qt4 are
 quite big and I think it's worth keeping both version in parallel. I
 will try to keep my port in sync with the qt2 frontend.

I suggest a little different approach: Don't create a copy of the qt2 
frontend, but modify the qt2 frontend in place. You'll need a second tree if 
you want a clean qt3 compile, but the advantage is that you can simply do a 
cvs diff in the qt2 dir to get the differences to the current sources.
Then I'd suggest that you create a bug Implement qt4 frontend, and attach 
the diff to it.
Then others can take your work up. I am sure that it will be appreciated when 
the time comes (probably for 1.5 or even later)


Georg



Re: lyx-1.4.0 and Qt-4.1

2005-12-29 Thread Abdel

Lars Gullik Bjønnes a écrit :

Abdel [EMAIL PROTECTED] writes:

| Hello,
| 
| Judging from the absence of answer, I suppose this matter is not

| interesting to you :-(

Oh it is, but as you rightly suspect: not right now.

| It's OK, I understand that you are all very busy with the release of
| 1.4.0. I have worked some more on the port so if there is any interest
| in the future, just let me know. FYI, the changes from Qt3 to Qt4 are
| quite big and I think it's worth keeping both version in parallel. I
| will try to keep my port in sync with the qt2 frontend.
| Right now, I am having big headache on QWorkarea and QContentpane
| widget dimensions... At this point I am wasting time so I think I will
| just give up.

Please don't forget completely about this. This will be more important
in the next development round.

Thanks a lot for looking at this.


Word taken, thank you. I might bother you after 1.4 is released to help 
me understand the inner working of lyx.


Bye,
Abdel.



Re: [patch] Packaging of LyX

2005-12-29 Thread Georg Baum
On Wednesday 28 December 2005 17:41, Juergen Spitzmueller wrote:
 Lars Gullik Bjønnes wrote:
  | where exactly? I tried to add it to AM_INIT_AUTOMAKE, but that didn't
  | work.
 
  That is the right spot.

 This does not compile:

But this one does. Can you please test whether it works for you? Can it go in 
if yes?


Georg
Index: ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/ChangeLog,v
retrieving revision 1.1040
diff -u -p -r1.1040 ChangeLog
--- ChangeLog	28 Dec 2005 10:47:00 -	1.1040
+++ ChangeLog	29 Dec 2005 22:52:54 -
@@ -1,3 +1,7 @@
+2005-12-29  Georg Baum  [EMAIL PROTECTED]
+
+	* configure.ac: fix version-suffix
+
 2005-12-28  Georg Baum  [EMAIL PROTECTED]
 
 	* autogen.sh: require automake 1.9
Index: configure.ac
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/configure.ac,v
retrieving revision 1.72
diff -u -p -r1.72 configure.ac
--- configure.ac	28 Dec 2005 10:47:00 -	1.72
+++ configure.ac	29 Dec 2005 22:52:54 -
@@ -13,7 +13,6 @@ AC_CANONICAL_TARGET
 
 # Check how the files should be packaged
 LYX_USE_PACKAGING
-LYX_VERSION_SUFFIX
 
 dnl default maintainer mode to true for development versions
 if test ${enable_maintainer_mode+set} != set; then
@@ -22,6 +21,7 @@ fi
 AM_MAINTAINER_MODE
 
 AM_INIT_AUTOMAKE([foreign dist-bzip2 tar-ustar 1.9])
+LYX_VERSION_SUFFIX
 
 ### Set the execute permissions of the various scripts correctly
 for file in config/install-sh config/mkinstalldirs lib/configure ; do


Re: lyx-1.4.0 and Qt-4.1

2005-12-29 Thread Abdel

Georg Baum a écrit :

On Thursday 29 December 2005 20:51, Abdel wrote:

Hello,

Judging from the absence of answer, I suppose this matter is not
interesting to you :-(
It's OK, I understand that you are all very busy with the release of
1.4.0. I have worked some more on the port so if there is any interest
in the future, just let me know. FYI, the changes from Qt3 to Qt4 are
quite big and I think it's worth keeping both version in parallel. I
will try to keep my port in sync with the qt2 frontend.


I suggest a little different approach: Don't create a copy of the qt2 
frontend, but modify the qt2 frontend in place. You'll need a second tree if 
you want a clean qt3 compile, but the advantage is that you can simply do a 
cvs diff in the qt2 dir to get the differences to the current sources.


I'll think about that, thanks for the suggestion.

Then I'd suggest that you create a bug Implement qt4 frontend, and attach 
the diff to it.


Why not create a qt4 directory (same as xform or gtk) along qt2 in the 
cvs repository once 1.5cvs is opened? But I can certainly do what you 
suggest once I have something that can load a document without crashing.


Then others can take your work up. I am sure that it will be appreciated when 
the time comes (probably for 1.5 or even later)


Good night,
Abdel.




Georg






Re: lyx-1.4.0 and Qt-4.1

2005-12-29 Thread Georg Baum
On Thursday 29 December 2005 23:36, Abdel wrote:
 Why not create a qt4 directory (same as xform or gtk) along qt2 in the
 cvs repository once 1.5cvs is opened?

Yes, why not. But that would work with the diff approach, too:
- create qt4 directory as copy of qt2 directory
- apply your patch to the qt4 directory


Georg



Re: lyx-1.4.0 and Qt-4.1

2005-12-29 Thread Lars Gullik Bjønnes
Abdel [EMAIL PROTECTED] writes:

|  Then I'd suggest that you create a bug Implement qt4 frontend, and
|  attach the diff to it.
| 
| Why not create a qt4 directory (same as xform or gtk) along qt2 in the
| cvs repository once 1.5cvs is opened? But I can certainly do what you
| suggest once I have something that can load a document without
| crashing.

The qt2 dir is misnamed as it is now, it is supposed to be called
qt. After 1.4.0 is release we will switch to subversion for the
source repository, that will make dir renaming a bit easier.

When the actuall porting to qt4 begin is suspect that a lot of the
files in the (now) qt2 dir can stay as is. So the there might be some
separate implementations for qt4 perhaps a subdir, perhaps just single
files. We will see when that work is begun in ernest.
(But it will be located under frontends/qt/

-- 
Lgb



Re: Latest patch (Re: Mac speed, profiling)

2005-12-29 Thread Lars Gullik Bjønnes
Martin Vermeer [EMAIL PROTECTED] writes:

| Attached, finally, the corrected version of the patch using crc32. Turns
| out y isn't needed here after all.

Any noticble speed difference?

| Index: rowpainter.C
| ===
| RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/rowpainter.C,v
| retrieving revision 1.160
| diff -u -p -r1.160 rowpainter.C
| --- rowpainter.C  17 Dec 2005 15:03:39 -  1.160
| +++ rowpainter.C  29 Dec 2005 20:58:36 -
| @@ -40,6 +40,8 @@
|  
|  #include support/textutils.h
|  
| +#include boost/crc.hpp
| +
|  using lyx::pos_type;
|  using lyx::pit_type;
|  
| @@ -717,7 +719,8 @@ void RowPainter::paintText()
|  
|  
|  void paintPar
| - (PainterInfo  pi, LyXText const  text, pit_type pit, int x, int y)
| + (PainterInfo  pi, LyXText const  text, pit_type pit, int x, int y,
| +  bool repaintAll)
|  {
|  //   lyxerrpaintPar: pit:   pit   at y:   y  endl;
|   static NullPainter nop;
| @@ -731,22 +734,67 @@ void paintPar
|   theCoords.parPos()[text][pit] = Point(x, y);
|  
|   y -= rb-ascent();
| - for (RowList::const_iterator rit = rb; rit != re; ++rit) {
| + lyx::size_type rowno(0);
| + for (RowList::const_iterator rit = rb; rit != re; ++rit, ++rowno) {
|   y += rit-ascent();
|   bool const inside = (y + rit-descent() = 0
|   y - rit-ascent()  ww);
|   RowPainter rp(inside ? pi : nullpi, text, pit, *rit, x, y);
|  
|   y += rit-descent();
| - rp.paintAppendix();
| - rp.paintDepthBar();
| - rp.paintChangeBar();
| - if (rit == rb)
| - rp.paintFirst();
| - if (rit + 1 == re)
| - rp.paintLast();
| - rp.paintText();
| +
| + // Row signature; has row changed since last paint?
| + boost::crc_32_type crc;
| + for (lyx::pos_type i = rit-pos(); i  rit-endpos(); ++i) {
| + const unsigned char b[] = { par.getChar(i) };
| + crc.process_bytes(b, 1);
| + }   
| + lyx::size_type const row_sig = crc.checksum();

Please refactor a bit:

lyx::size_type calculateRowSignature(Row const  row)
{
boost::crc_32_type crc;
for (lyx::pos_type i = row.pos(); i  row.endpos(); ++i) {
const unsigned char b[] = { par.getChar(i) };
crc.process_bytes(b, 1);
}   
return crc.checksum();
}

lyx::size_type const row_sig = calculateRowSignagure(*rit);

| +
| + // The following code figures out if the cursor is inside
| + // an inset _on this row_.
| + bool cur_in_inset_in_row(false);
| + InsetList::const_iterator ii = par.insetlist.begin();
| + InsetList::const_iterator iend = par.insetlist.end();
| + for ( ; ii != iend; ++ii) {
| + if (ii-pos = rit-pos()  ii-pos  rit-endpos()
| +  ii-inset-isTextInset() 
| +  pi.base.bv-cursor().isInside(ii-inset))
| + cur_in_inset_in_row = true;
| + break;
| + }

This one as well.

bool isCursorInInsetInRow(...)
{
...
}

bool cur_in_inset_in_row = isCursorInInsetInRow(...);

(something)


-- 
Lgb



Re: lyx-1.4.0 and Qt-4.1

2005-12-29 Thread Abdel

Lars Gullik Bjønnes a écrit :

Abdel [EMAIL PROTECTED] writes:

|  Then I'd suggest that you create a bug Implement qt4 frontend, and
|  attach the diff to it.
| 
| Why not create a qt4 directory (same as xform or gtk) along qt2 in the

| cvs repository once 1.5cvs is opened? But I can certainly do what you
| suggest once I have something that can load a document without
| crashing.

The qt2 dir is misnamed as it is now, it is supposed to be called
qt. After 1.4.0 is release we will switch to subversion for the
source repository, that will make dir renaming a bit easier.

When the actuall porting to qt4 begin is suspect that a lot of the
files in the (now) qt2 dir can stay as is. So the there might be some
separate implementations for qt4 perhaps a subdir, perhaps just single
files. We will see when that work is begun in ernest.
(But it will be located under frontends/qt/


Hum, I've read that qt3 was quite source compatible with qt2. This is 
not the case for qt4. The qt3to4 porting tool renames a lot of classes 
and variables to their Q3XXX equivalents in the Q3Support package.
I have begun already to port to the real Qt4 classes that are IMO 
cleaner and more intuitive. I have not touched the ui files for now but 
I guess that it would be better to convert them to Qt4 format as well.


We can re-discuss this anyway when the time comes.

Abdel.

 --
Lgb




Re: [patch] Packaging of LyX

2005-12-29 Thread Lars Gullik Bjønnes
Georg Baum [EMAIL PROTECTED] writes:

| On Wednesday 28 December 2005 17:41, Juergen Spitzmueller wrote:
|  Lars Gullik Bjønnes wrote:
|   | where exactly? I tried to add it to AM_INIT_AUTOMAKE, but that didn't
|   | work.
|  
|   That is the right spot.
| 
|  This does not compile:
| 
| But this one does. Can you please test whether it works for you? Can it go in 
| if yes?

Ah... can you also try to move the LYX_USE_PACKAGING after the
AM_INIT_AUTOMAKE? 

I am ok with that change if it works.

-- 
Lgb



Re: [patch] Packaging of LyX

2005-12-29 Thread Georg Baum
On Friday 30 December 2005 00:02, Lars Gullik Bjønnes wrote:
 Ah... can you also try to move the LYX_USE_PACKAGING after the
 AM_INIT_AUTOMAKE?

Seems to work for me.


Georg
Index: ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/ChangeLog,v
retrieving revision 1.1040
diff -u -p -r1.1040 ChangeLog
--- ChangeLog	28 Dec 2005 10:47:00 -	1.1040
+++ ChangeLog	30 Dec 2005 00:16:38 -
@@ -1,3 +1,7 @@
+2005-12-29  Georg Baum  [EMAIL PROTECTED]
+
+	* configure.ac: fix version-suffix
+
 2005-12-28  Georg Baum  [EMAIL PROTECTED]
 
 	* autogen.sh: require automake 1.9
Index: configure.ac
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/configure.ac,v
retrieving revision 1.72
diff -u -p -r1.72 configure.ac
--- configure.ac	28 Dec 2005 10:47:00 -	1.72
+++ configure.ac	30 Dec 2005 00:16:38 -
@@ -11,10 +11,6 @@ AC_CONFIG_AUX_DIR(config)
 LYX_CHECK_VERSION
 AC_CANONICAL_TARGET
 
-# Check how the files should be packaged
-LYX_USE_PACKAGING
-LYX_VERSION_SUFFIX
-
 dnl default maintainer mode to true for development versions
 if test ${enable_maintainer_mode+set} != set; then
   enable_maintainer_mode=$lyx_devel_version
@@ -23,6 +19,10 @@ AM_MAINTAINER_MODE
 
 AM_INIT_AUTOMAKE([foreign dist-bzip2 tar-ustar 1.9])
 
+# Check how the files should be packaged
+LYX_USE_PACKAGING
+LYX_VERSION_SUFFIX
+
 ### Set the execute permissions of the various scripts correctly
 for file in config/install-sh config/mkinstalldirs lib/configure ; do
   chmod 755 ${srcdir}/${file}


Re: [patch] Packaging of LyX

2005-12-29 Thread Lars Gullik Bjønnes
Georg Baum [EMAIL PROTECTED] writes:

| On Friday 30 December 2005 00:02, Lars Gullik Bjønnes wrote:
|  Ah... can you also try to move the LYX_USE_PACKAGING after the
|  AM_INIT_AUTOMAKE?
| 
| Seems to work for me.

I think this is ok.
I bet J-M will chime in if he has objections.

-- 
Lgb



Re: [patch] fix bug 2026

2005-12-29 Thread Jose' Matos
On Wednesday 28 December 2005 15:18, Jean-Marc Lasgouttes wrote:
> As I wrote in the bug, I am not sure we need to enforce Standard
> paragraphs. Note that g-brief will probably use Letter (the default
> layout) in ERT anyway. This is very bad, but it happens because we
> have no notion of a 'naked style' (not defaultLayout, but some layout
> that would have all characteristics set to default).

  Notice also that the same happens inside table cells without fixed size. We 
have been able to get away with it because  in latex translates to 
nothing. Those tables inset text are another good candidate for the naked 
layouts.

> Implementing such 
> a style in textclass would not be difficult (it does not need to be
> declared in layout files actually), and code relying on
> forceDefaultParagraph should rely on this new nakedLayout() instead of
> defaultLayout(). This is not difficult to do, but more work that just
> adding a Standard entry to g-brief-en.

 As I have told yesterday I agree with Jean-Marc that those layouts don't 
belong to textclasses, the same way that we don't declare the insets inset a 
text class file.

> JMarc

-- 
José Abílio


Re: [patch] fix bug 2153

2005-12-29 Thread Georg Baum
On Wednesday 28 December 2005 14:52, Lars Gullik Bjønnes wrote:
> Ok, didn't realize that. Please try to get someone to test it (and
> comment), we should try to get this fixed before 1.3.

I need volunteers please!


Georg



Re: [patch] fix bug 2026

2005-12-29 Thread Georg Baum
On Thursday 29 December 2005 09:28, Jose' Matos wrote:
>   Notice also that the same happens inside table cells without fixed size.
> We have been able to get away with it because  in latex translates to
> nothing. Those tables inset text are another good candidate for the naked
> layouts.

Yes. Meanwhile I propose the attached patch to get rid of the hardcoded 
"Standard" layout (which I introduced recently because I did not know of the 
default layout). Removing a fixed column width now creates the same layout as 
is created for new cells.
OK to commit?


Georg
Index: src/ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v
retrieving revision 1.2345
diff -u -p -r1.2345 ChangeLog
--- src/ChangeLog	23 Dec 2005 12:19:56 -	1.2345
+++ src/ChangeLog	29 Dec 2005 09:19:55 -
@@ -1,3 +1,8 @@
+2005-12-29  Georg Baum  <[EMAIL PROTECTED]>
+
+	* tabular.C (toggleFixedWidth): Use default layout of text class
+	instead of hardcoded "Standard"
+
 2005-12-22  Jean-Marc Lasgouttes  <[EMAIL PROTECTED]>
 
 	* lyxfunc.C (dispatch): do not call getStatus again to determine
Index: src/tabular.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/tabular.C,v
retrieving revision 1.228
diff -u -p -r1.228 tabular.C
--- src/tabular.C	28 Nov 2005 11:52:01 -	1.228
+++ src/tabular.C	29 Dec 2005 09:19:58 -
@@ -896,7 +896,9 @@ void toggleFixedWidth(LCursor & cur, Ins
 
 	// reset layout
 	cur.push(*inset);
-	inset->getText(0)->setLayout(0, cur.lastpit() + 1, "Standard");
+	// undo information has already been recorded
+	inset->getText(0)->setLayout(0, cur.lastpit() + 1,
+			bp.getLyXTextClass().defaultLayoutName());
 	cur.pop();
 }
 


Re: [patch] fix bug 2026

2005-12-29 Thread Lars Gullik Bjønnes
Georg Baum <[EMAIL PROTECTED]> writes:

| On Thursday 29 December 2005 09:28, Jose' Matos wrote:
| >   Notice also that the same happens inside table cells without fixed size.
| > We have been able to get away with it because  in latex translates to
| > nothing. Those tables inset text are another good candidate for the naked
| > layouts.
| 
| Yes. Meanwhile I propose the attached patch to get rid of the hardcoded 
| "Standard" layout (which I introduced recently because I did not know of the 
| default layout). Removing a fixed column width now creates the same layout as 
| is created for new cells.
| OK to commit?

ok

-- 
Lgb



Re: [Cvslog] lyx-devel po/: ChangeLog pl.po lib/: CREDITS

2005-12-29 Thread Lars Gullik Bjønnes
Tomasz Luczak <[EMAIL PROTECTED]> writes:

| Lars Gullik Bjønnes wrote:
| > Thomasz, can you send a new patch against generate_contributions.py?
| >
| You can find in attachment patch to generate_contributions.py

ok, added.

-- 
Lgb



Re: New "LyX with Grammar Checker" Prototype (v0.3)

2005-12-29 Thread Juergen Spitzmueller
[EMAIL PROTECTED] wrote:
> Um... do you mean the wiki or the user's list?  (The latter makes sense to
> me for getting testers...)

I mean: Add a decription page on the wiki and announce it on the users list.

Jürgen


Re: Updated pl.pl

2005-12-29 Thread Lars Gullik Bjønnes
Tomasz Luczak <[EMAIL PROTECTED]> writes:

| Hi
| 
| I send updated to 1.4.0rc3 polish translation of pl.po file.
| kbabel reports:
| fuzzy: 3
| untranslated: 371

Ok, committed.

-- 
Lgb



Re: OT: automake woes

2005-12-29 Thread Angus Leeming
Lars Gullik Bjønnes wrote:
> I think the only way to do this with automake is to have the targets
> for generating the files and using explict dependencies:
> 
> *.$(OBJEXT): kvsprefs.cpp kvsprefs.h prefs.cpp prefs.h
> 
> kvsprefs.h: kvsprefs.cpp
> 
> kvsprefs.cpp: kviewshell.kcfg kvsprefs.kcfgc
>  $(CONFIG_COMPILER) $(srcdir)/kviewshell.kcfg
>  $(srcdir)/kvsprefs.kcfgc
> 
> 
> prefs.h: prefs.cpp
> 
> prefs.cpp: kdvi.kcfg prefs.kcfgc
>  $(CONFIG_COMPILER) $(srcdir)/kdvi.kcfg $(srcdir)/prefs.kcfgc

Many, many thanks for the pointers, Lars. I'll try it out and let you know.

-- 
Angus



[New layout] SVMult.cls

2005-12-29 Thread Koji Yokota

Hi,

I have a layout file for SVMult.cls which is for manuscript of a contributed book from Springer Verlag (http://www.springer.com/sgw/cda/frontpage/0,,5-40020-2-71415-0,00.html).

Is it possible to merge the layout file to an appropriate LyX version?

-- 
Koji Yokota ([EMAIL PROTECTED])
Otaru University of Commerce
#% Do not delete the line below; configure depends on this
#  \DeclareLaTeXClass[svmult]{article (SVMult)}
# Author: Koji Yokota <[EMAIL PROTECTED]>
# based on amsart.layout

# Input general definitions
Input svmultclass.inc

ClassOptions
  PageStyle  ""
  FontSize   10
End  

# There are no chapters in an article.
NoStyle Part
NoStyle Part*
NoStyle Chapter
NoStyle Chapter*

MaxCounter  Counter_Chapter
SecNumDepth 4
TocDepth4

# The AMS documentclasses use the package amsmath and provide the
# functionality of makeidx.sty.
ProvidesAmsmath 1
ProvidesMakeidx 1

Preamble
  \usepackage{amsmath}
EndPreamble


### Now the title stuff. We copy do not use stdstruct.inc to keep
### things in the right order
### Styles available
#Title
#Title*
#TOC Title
#Title in Running Head
#TOC Author
#Author
#Author in Running Head
#Date
#Abstract 
#Address
#Current_Address
#Institute
#URL
#Keywords
#Thanks
#Dedicatory
#Translator
#Subjectclass
#Bibliography
#List of Abbreviations & Symbols
#Petit

# Abstract style definition
Style Abstract 
  MarginFirst_Dynamic
  LatexType Environment
  InTitle   1
  LatexName abstract
  LeftMarginMMM
  LabelIndent   MMM
  RightMargin   MMM
  ParIndent MM
  TopSep0.7
  BottomSep 0.7
  Align Block
  AlignPossible Block
  LabelType Static
  LabelString   Abstract.
  LabelSep  M

  # standard font definition
  Font 
SizeSmall
  EndFont

  # label font definition
  LabelFont
Shape   Smallcaps
  EndFont
End 

# Institute style definition
Style Institute
  MarginFirst_Dynamic
  LatexType Command
  InTitle   1
  LatexName institute
  ParSkip   0.4
  BottomSep 1.5
  ParSep1.5
  Align Left
  AlignPossible Block, Left, Right, Center
  LabelType Static
  labelString   "Institute and e-mail: "
  LabelFont
Shape   Italic
  EndFont
End

# Keywords style definition
Style Keywords
  MarginDynamic
  LatexType Command
  InTitle   1
  LatexName keywords
  ParSkip   0.4
  BottomSep 1.5
  ParSep1.5
  Align Left
  AlignPossible Block, Left, Right, Center
  LabelType Static
  LabelString   "Key words and phrases: "
  # label font definition
  LabelFont
Shape   Italic
  EndFont
End  

# Thanks style definition
Style Thanks
  MarginDynamic
  LatexType Command
  InTitle   1
  LatexName thanks
  ParSkip   0.4
  BottomSep 1.5
  ParSep1.5
  Align Left
  AlignPossible Block, Left, Right, Center
  LabelType Static
  LabelString   "Thanks: "
  # label font definition
  LabelFont
Shape   Italic
  EndFont
End  

# Bibliography style definition
Style Bibliography
  MarginFirst_Dynamic
  LatexType Item_Environment
  LatexName thebibliography
  NextNoIndent  1
  LeftMarginMM
  ParSkip   0.4
  ItemSep   0
  TopSep0.7
  BottomSep 0.7
  ParSep0.5
  Align Block
  AlignPossible Block, Left
  LabelType Bibliography
  LabelString   References
  LabelBottomSep0.7

  # standard font definition
  Font
SizeSmall
  EndFont

  # label font definition
  LabelFont
SizeNormal
Shape   Smallcaps
  EndFont
End

Style "List of Abbreviations & Symbols"
  CopyStyle Description
  LatexName abbrsymblist
End

Style Petit
  CopyStyle Standard
  LatexType Environment
  LatexName petit
  LeftMarginMMM
  RightMargin   MMM
  Font
SizeSmall
  FontEnd
End

# Including the maths stuff
Input svmultmaths.inc
# Author : David L. Johnson <[EMAIL PROTECTED]>
# Probably broken by Jean-Marc Lasgouttes <[EMAIL PROTECTED]>
# modified and modularized by Emmanuel GUREGHIAN <[EMAIL PROTECTED]>
# Further modified for SVMult by Koji Yokota <[EMAIL PROTECTED]>
# This version has Theorems and other results numbered in one sequence, and all
# numbered environments (figures as well) containing the section number.
# (Themorem 

Re: [Cvslog] lyx-devel po/: ChangeLog pl.po lib/: CREDITS

2005-12-29 Thread Tomasz Luczak

Lars Gullik Bjønnes wrote:

Tomasz Luczak <[EMAIL PROTECTED]> writes:

| Lars Gullik Bjønnes wrote:
| > Thomasz, can you send a new patch against generate_contributions.py?
| >
| You can find in attachment patch to generate_contributions.py

ok, added.

Very thanks

Best regards
Tomasz
--
  Tomasz Łuczak

 TECHNODAT Sp. z o.o.tel +48 32 2382337
 ul. Kościuszki 1c   tel +48 32 3314484
 44-100 Gliwice, PL  mob +48 602 524713
 http://www.technodat.com.pl http://www.emrm.pl


Bugs

2005-12-29 Thread Pedro Nucci

Hi, using the windows version, i think i've found two bugs:

FIRST:

started a new blank document, and inserted the title. The title contained  
a line break (ctrl+enter).
I've selected the title's first line, and changed the following Character  
properties:


Family: Sans Serif

pressed Apply - ok, changed

Series: bold

pressed Apply - ok, changed

Shape: italic

pressed Apply - ok, changed

Shape: No Changes

pressed Apply - remains Italic and Bold on Lyx's screen AND the .dvi too

The .lyx file has \series bold and not \shape italic

SECOND:

with Lyx opened, by default its language is English. So i changed it in  
Preferences window to Brazilian Portuguese. When i started a new document,  
its language was English. Just when i restarted Lyx, the new documents got  
the correct language;





anyway you've done a great work on Lyx, it's being a pleasure writing on it


hope it helps, sorry for bad english
Pedro Nucci





___ 
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB 
http://mail.yahoo.it




Re: New "LyX with Grammar Checker" Prototype (v0.3)

2005-12-29 Thread christian . ridderstrom
On Thu, 29 Dec 2005, Juergen Spitzmueller wrote:

> [EMAIL PROTECTED] wrote:
> > Um... do you mean the wiki or the user's list?  (The latter makes sense to
> > me for getting testers...)
> 
> I mean: Add a decription page on the wiki and announce it on the users list.

Which he just de... :-)

/C

-- 
Christian Ridderström, +46-8-768 39 44   http://www.md.kth.se/~chr




Re: Bugs

2005-12-29 Thread Juergen Spitzmueller
Pedro Nucci wrote:
> Shape: No Changes
>
> pressed Apply - remains Italic and Bold on Lyx's screen AND the .dvi too

That's correct. You're looking for Shape: Reset

Jürgen


Re: New "LyX with Grammar Checker" Prototype (v0.3)

2005-12-29 Thread christian . ridderstrom
On Thu, 29 Dec 2005 [EMAIL PROTECTED] wrote:

> On Thu, 29 Dec 2005, Juergen Spitzmueller wrote:
> 
> > [EMAIL PROTECTED] wrote:
> > > Um... do you mean the wiki or the user's list?  (The latter makes sense to
> > > me for getting testers...)
> > 
> > I mean: Add a decription page on the wiki and announce it on the users list.
> 
> Which he just de... :-)

*sigh*... That should be: Which he just did... :-)

/C

-- 
Christian Ridderström, +46-8-768 39 44   http://www.md.kth.se/~chr




Re: lyx-1.4.0 and Qt-4.1

2005-12-29 Thread Abdel

Hello,

Judging from the absence of answer, I suppose this matter is not 
interesting to you :-(
It's OK, I understand that you are all very busy with the release of 
1.4.0. I have worked some more on the port so if there is any interest 
in the future, just let me know. FYI, the changes from Qt3 to Qt4 are 
quite big and I think it's worth keeping both version in parallel. I 
will try to keep my port in sync with the qt2 frontend.
Right now, I am having big headache on QWorkarea and QContentpane widget 
dimensions... At this point I am wasting time so I think I will just 
give up.


Regards,
Abdel.


Abdel a écrit :

Dear developpers,

I could not sleep last night so I tried as an exercise to see if lyx 
could be ported easily to the fresh Qt-4.1. As you might guess it was 
more difficult than I originally thought. But after much work it 
compiles and loads!
There is a problem QImage which doesn't support any image format. I 
suspect the Painter is not correctly started. Because of that, the 
program could not load any document (more on that later). But the 
menubar, the "Browse file" dialog and the about box are functional.


I don't know if this is interesting to you and if you planned already to 
port to Qt4.1 sometimes in the future. If so, I am willing to help 
completing this port if someone more knowledgeable than me take lead. If 
not, it was fun anyway and I learned a bit about Qt4 in the process. IMO 
it is much cleaner that Qt3 (Disclaimer: I knew close to nothing on 
these two before yesterday). I could send my qt4 directory to anyone 
interested in any case.


What I did:

1) copy "src/frontends/qt2" to "src/frontends/qt4"
2) launch qt3to4 porting tool to all .C and .h
3) replace uic with uic3 in all Makefiles
4) remove "-tr qt_" from UICFLAGS in  all Makefiles
5) compile and fix...

I know nothing about the auto-tools so I just modified the Makefile, 
sorry about that.


The big remaining problem is with QPicture. In order to let lyx start, I 
had to comment line "src/graphics/GraphicsCacheItem.C":340


// There must be a format to load from.
BOOST_ASSERT(!formats.empty());

I have attached my modified "src/frontends/qt4/Qimage.C". Please find 
below, the output of lyx -dbg graphics.


Thanks,
Abdel.


D:\msys\home\yns\src\lyx-devel\src>.\lyx-qt -dbg graphics
Setting debug level to graphics
Debugging `graphics' (Graphics conversion and loading)
LoaderQueue:  priority set to 10 images at a time, 100 milliseconds 
between calls

Recognised Fileformat: agr
filetools(getFormatFromContents)
Couldn't find a known format!
Ignoring obsolete use_tempdir flag.
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
File type not recognised before EOF!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
Language code:C
Setting new locale for Qt:C
LoaderQueue: waking up
QPainter::begin(), paintdevice returned engine == 0, type: 3

QPainter::end: Painter is not active, aborted
QPainter::begin(), paintdevice returned engine == 0, type: 2

Painter started successfully.
QColor::setNamedColor: unknown color name 'grey40'
QPainter::end: Painter is not active, aborted
QPainter::begin(), paintdevice returned engine == 0, type: 3

QPainter::end: Painter is not active, aborted
lyx: Disabling LyX socket.
LoaderQueue: 1 items in the queue
QPainter::begin(), paintdevice returned engine == 0, type: 2

Painter started successfully.
QPainter::end: Painter is not active, aborted
Recognised Fileformat: ppm
[GrahicsCacheItem::convertToDisplayFormat]
Attempting to convert image file: 
D:/msys/home/yns/src/lyx-devel/lib/images/banner.ppm
with displayed filename: 
D:\msys\home\yns\src\lyx-devel\lib\images\banner.ppm

Recognised Fileformat: ppm

The file contains ppm format data.

The image loader can load the following directly:

Qt4 Problem: No Format available!

Of these, LyX recognises the following formats:


Converting it to  format.
Converter c-tor:
from_file: D:/msys/home/yns/src/lyx-devel/lib/images/banner.ppm
to_file_base: C:/Documents and Settings/yns.ERC.000/Local 
Settings/Temp/lyx_tmpdir2128a03208/banner2128

a03208
from_format:  ppm
to_format:
build_script ... 

Re: lyx-1.4.0 and Qt-4.1

2005-12-29 Thread Lars Gullik Bjønnes
Abdel <[EMAIL PROTECTED]> writes:

| Hello,
| 
| Judging from the absence of answer, I suppose this matter is not
| interesting to you :-(

Oh it is, but as you rightly suspect: not right now.

| It's OK, I understand that you are all very busy with the release of
| 1.4.0. I have worked some more on the port so if there is any interest
| in the future, just let me know. FYI, the changes from Qt3 to Qt4 are
| quite big and I think it's worth keeping both version in parallel. I
| will try to keep my port in sync with the qt2 frontend.
| Right now, I am having big headache on QWorkarea and QContentpane
| widget dimensions... At this point I am wasting time so I think I will
| just give up.

Please don't forget completely about this. This will be more important
in the next development round.

Thanks a lot for looking at this.

-- 
Lgb



Latest patch (Re: Mac speed, profiling)

2005-12-29 Thread Martin Vermeer
On Thu, Dec 22, 2005 at 06:23:26PM +0100, Jean-Marc Lasgouttes wrote:
> > "David" == David Green <[EMAIL PROTECTED]> writes:
> 
> David> On 12/22/05 7:41 AM, "Jean-Marc Lasgouttes"
> David> <[EMAIL PROTECTED]>
> David> wrote:
> 
> >>> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes:
> >>
> Martin> Is crc32 invariant for character transposition?
> >>  Sure.
> 
> David> Erm, crc32 should produce a different result when characters
> David> are transposed.
> 
> Yes, that's what I meant, sorry.
> 
> So my answer was supposed to be "of course not."

That is what I wanted to hear...

Attached, finally, the corrected version of the patch using crc32. Turns
out y isn't needed here after all.

- Martin

Index: RowList_fwd.h
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/RowList_fwd.h,v
retrieving revision 1.6
diff -u -p -r1.6 RowList_fwd.h
--- RowList_fwd.h   31 Jan 2005 16:29:38 -  1.6
+++ RowList_fwd.h   29 Dec 2005 20:58:34 -
@@ -15,6 +15,7 @@
 #include "lyxrow.h"
 
 #include 
+#include 
 
 /**
  * Each paragraph is broken up into a number of rows on the screen.
@@ -22,5 +23,7 @@
  * downwards.
  */
 typedef std::vector RowList;
+///
+typedef std::map RowSignature;
 
 #endif
Index: paragraph.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/paragraph.C,v
retrieving revision 1.417
diff -u -p -r1.417 paragraph.C
--- paragraph.C 25 Nov 2005 14:40:34 -  1.417
+++ paragraph.C 29 Dec 2005 20:58:35 -
@@ -81,7 +81,8 @@ Paragraph::Paragraph()
 Paragraph::Paragraph(Paragraph const & par)
:   itemdepth(par.itemdepth), insetlist(par.insetlist),
dim_(par.dim_),
-   rows_(par.rows_), layout_(par.layout_),
+   rows_(par.rows_), rowSignature_(par.rowSignature_), 
+   layout_(par.layout_),
text_(par.text_), begin_of_body_(par.begin_of_body_),
  pimpl_(new Paragraph::Pimpl(*par.pimpl_, this))
 {
@@ -107,6 +108,7 @@ Paragraph & Paragraph::operator=(Paragra
 
rows_ = par.rows_;
dim_ = par.dim_;
+   rowSignature_ = par.rowSignature_;
layout_ = par.layout();
text_ = par.text_;
begin_of_body_ = par.begin_of_body_;
Index: paragraph.h
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/paragraph.h,v
retrieving revision 1.157
diff -u -p -r1.157 paragraph.h
--- paragraph.h 7 Sep 2005 10:36:59 -   1.157
+++ paragraph.h 29 Dec 2005 20:58:35 -
@@ -391,7 +391,9 @@ public:
RowList & rows() { return rows_; }
/// The painter and others use this
RowList const & rows() const { return rows_; }
-
+   ///
+   RowSignature & rowSignature() const { return rowSignature_; }
+   
/// LyXText::redoParagraph updates this
Dimension & dim() { return dim_; }
 
@@ -408,6 +410,9 @@ private:
 
///
mutable RowList rows_;
+   ///
+   mutable RowSignature rowSignature_;
+
///
LyXLayout_ptr layout_;
/**
Index: rowpainter.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/rowpainter.C,v
retrieving revision 1.160
diff -u -p -r1.160 rowpainter.C
--- rowpainter.C17 Dec 2005 15:03:39 -  1.160
+++ rowpainter.C29 Dec 2005 20:58:36 -
@@ -40,6 +40,8 @@
 
 #include "support/textutils.h"
 
+#include 
+
 using lyx::pos_type;
 using lyx::pit_type;
 
@@ -717,7 +719,8 @@ void RowPainter::paintText()
 
 
 void paintPar
-   (PainterInfo & pi, LyXText const & text, pit_type pit, int x, int y)
+   (PainterInfo & pi, LyXText const & text, pit_type pit, int x, int y,
+bool repaintAll)
 {
 // lyxerr << "  paintPar: pit: " << pit << " at y: " << y << endl;
static NullPainter nop;
@@ -731,22 +734,67 @@ void paintPar
theCoords.parPos()[][pit] = Point(x, y);
 
y -= rb->ascent();
-   for (RowList::const_iterator rit = rb; rit != re; ++rit) {
+   lyx::size_type rowno(0);
+   for (RowList::const_iterator rit = rb; rit != re; ++rit, ++rowno) {
y += rit->ascent();
bool const inside = (y + rit->descent() >= 0
   && y - rit->ascent() < ww);
RowPainter rp(inside ? pi : nullpi, text, pit, *rit, x, y);
 
y += rit->descent();
-   rp.paintAppendix();
-   rp.paintDepthBar();
-   rp.paintChangeBar();
-   if (rit == rb)
-   rp.paintFirst();
-   if (rit + 1 == re)
-   rp.paintLast();
-   rp.paintText();
+
+   // Row signature; has row changed since last paint?
+   

Re: [PATCH] Re: Mathinset b ehavior (André?)

2005-12-29 Thread Martin Vermeer
On Wed, Dec 28, 2005 at 05:24:27PM +0100, Jean-Marc Lasgouttes wrote:
> > "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes:
> 
> >> So, what do you propose? I guess I could keep mathMacroClose as it
> >> was,
> 
> Andre> Yes.
> 
> >> and put the cursor inside the new inset only when space was
> >> pressed?
> 
> What about that one?
> 
> JMarc
> 

I am getting lots of math errors when loading the User Guide, like
"unusual contents found" from math_parser.C. Could this come from this
patch? Current CVS.

- Martin



pgphPSvQ262DQ.pgp
Description: PGP signature


Re: lyx-1.4.0 and Qt-4.1

2005-12-29 Thread Georg Baum
On Thursday 29 December 2005 20:51, Abdel wrote:
> Hello,
>
> Judging from the absence of answer, I suppose this matter is not
> interesting to you :-(
> It's OK, I understand that you are all very busy with the release of
> 1.4.0. I have worked some more on the port so if there is any interest
> in the future, just let me know. FYI, the changes from Qt3 to Qt4 are
> quite big and I think it's worth keeping both version in parallel. I
> will try to keep my port in sync with the qt2 frontend.

I suggest a little different approach: Don't create a copy of the qt2 
frontend, but modify the qt2 frontend in place. You'll need a second tree if 
you want a clean qt3 compile, but the advantage is that you can simply do a 
cvs diff in the qt2 dir to get the differences to the current sources.
Then I'd suggest that you create a bug "Implement qt4 frontend", and attach 
the diff to it.
Then others can take your work up. I am sure that it will be appreciated when 
the time comes (probably for 1.5 or even later)


Georg



Re: lyx-1.4.0 and Qt-4.1

2005-12-29 Thread Abdel

Lars Gullik Bjønnes a écrit :

Abdel <[EMAIL PROTECTED]> writes:

| Hello,
| 
| Judging from the absence of answer, I suppose this matter is not

| interesting to you :-(

Oh it is, but as you rightly suspect: not right now.

| It's OK, I understand that you are all very busy with the release of
| 1.4.0. I have worked some more on the port so if there is any interest
| in the future, just let me know. FYI, the changes from Qt3 to Qt4 are
| quite big and I think it's worth keeping both version in parallel. I
| will try to keep my port in sync with the qt2 frontend.
| Right now, I am having big headache on QWorkarea and QContentpane
| widget dimensions... At this point I am wasting time so I think I will
| just give up.

Please don't forget completely about this. This will be more important
in the next development round.

Thanks a lot for looking at this.


Word taken, thank you. I might bother you after 1.4 is released to help 
me understand the inner working of lyx.


Bye,
Abdel.



Re: [patch] Packaging of LyX

2005-12-29 Thread Georg Baum
On Wednesday 28 December 2005 17:41, Juergen Spitzmueller wrote:
> Lars Gullik Bjønnes wrote:
> > | where exactly? I tried to add it to AM_INIT_AUTOMAKE, but that didn't
> > | work.
> >
> > That is the right spot.
>
> This does not compile:

But this one does. Can you please test whether it works for you? Can it go in 
if yes?


Georg
Index: ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/ChangeLog,v
retrieving revision 1.1040
diff -u -p -r1.1040 ChangeLog
--- ChangeLog	28 Dec 2005 10:47:00 -	1.1040
+++ ChangeLog	29 Dec 2005 22:52:54 -
@@ -1,3 +1,7 @@
+2005-12-29  Georg Baum  <[EMAIL PROTECTED]>
+
+	* configure.ac: fix version-suffix
+
 2005-12-28  Georg Baum  <[EMAIL PROTECTED]>
 
 	* autogen.sh: require automake 1.9
Index: configure.ac
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/configure.ac,v
retrieving revision 1.72
diff -u -p -r1.72 configure.ac
--- configure.ac	28 Dec 2005 10:47:00 -	1.72
+++ configure.ac	29 Dec 2005 22:52:54 -
@@ -13,7 +13,6 @@ AC_CANONICAL_TARGET
 
 # Check how the files should be packaged
 LYX_USE_PACKAGING
-LYX_VERSION_SUFFIX
 
 dnl default maintainer mode to true for development versions
 if test "${enable_maintainer_mode+set}" != set; then
@@ -22,6 +21,7 @@ fi
 AM_MAINTAINER_MODE
 
 AM_INIT_AUTOMAKE([foreign dist-bzip2 tar-ustar 1.9])
+LYX_VERSION_SUFFIX
 
 ### Set the execute permissions of the various scripts correctly
 for file in config/install-sh config/mkinstalldirs lib/configure ; do


Re: lyx-1.4.0 and Qt-4.1

2005-12-29 Thread Abdel

Georg Baum a écrit :

On Thursday 29 December 2005 20:51, Abdel wrote:

Hello,

Judging from the absence of answer, I suppose this matter is not
interesting to you :-(
It's OK, I understand that you are all very busy with the release of
1.4.0. I have worked some more on the port so if there is any interest
in the future, just let me know. FYI, the changes from Qt3 to Qt4 are
quite big and I think it's worth keeping both version in parallel. I
will try to keep my port in sync with the qt2 frontend.


I suggest a little different approach: Don't create a copy of the qt2 
frontend, but modify the qt2 frontend in place. You'll need a second tree if 
you want a clean qt3 compile, but the advantage is that you can simply do a 
cvs diff in the qt2 dir to get the differences to the current sources.


I'll think about that, thanks for the suggestion.

Then I'd suggest that you create a bug "Implement qt4 frontend", and attach 
the diff to it.


Why not create a qt4 directory (same as xform or gtk) along qt2 in the 
cvs repository once 1.5cvs is opened? But I can certainly do what you 
suggest once I have something that can load a document without crashing.


Then others can take your work up. I am sure that it will be appreciated when 
the time comes (probably for 1.5 or even later)


Good night,
Abdel.




Georg






Re: lyx-1.4.0 and Qt-4.1

2005-12-29 Thread Georg Baum
On Thursday 29 December 2005 23:36, Abdel wrote:
> Why not create a qt4 directory (same as xform or gtk) along qt2 in the
> cvs repository once 1.5cvs is opened?

Yes, why not. But that would work with the diff approach, too:
- create qt4 directory as copy of qt2 directory
- apply your patch to the qt4 directory


Georg



Re: lyx-1.4.0 and Qt-4.1

2005-12-29 Thread Lars Gullik Bjønnes
Abdel <[EMAIL PROTECTED]> writes:

| > Then I'd suggest that you create a bug "Implement qt4 frontend", and
| > attach the diff to it.
| 
| Why not create a qt4 directory (same as xform or gtk) along qt2 in the
| cvs repository once 1.5cvs is opened? But I can certainly do what you
| suggest once I have something that can load a document without
| crashing.

The qt2 dir is misnamed as it is now, it is supposed to be called
"qt". After 1.4.0 is release we will switch to subversion for the
source repository, that will make dir renaming a bit easier.

When the actuall porting to qt4 begin is suspect that a lot of the
files in the (now) qt2 dir can stay as is. So the there might be some
separate implementations for qt4 perhaps a subdir, perhaps just single
files. We will see when that work is begun in ernest.
(But it will be located under "frontends/qt/"

-- 
Lgb



Re: Latest patch (Re: Mac speed, profiling)

2005-12-29 Thread Lars Gullik Bjønnes
Martin Vermeer <[EMAIL PROTECTED]> writes:

| Attached, finally, the corrected version of the patch using crc32. Turns
| out y isn't needed here after all.

Any noticble speed difference?

| Index: rowpainter.C
| ===
| RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/rowpainter.C,v
| retrieving revision 1.160
| diff -u -p -r1.160 rowpainter.C
| --- rowpainter.C  17 Dec 2005 15:03:39 -  1.160
| +++ rowpainter.C  29 Dec 2005 20:58:36 -
| @@ -40,6 +40,8 @@
|  
|  #include "support/textutils.h"
|  
| +#include 
| +
|  using lyx::pos_type;
|  using lyx::pit_type;
|  
| @@ -717,7 +719,8 @@ void RowPainter::paintText()
|  
|  
|  void paintPar
| - (PainterInfo & pi, LyXText const & text, pit_type pit, int x, int y)
| + (PainterInfo & pi, LyXText const & text, pit_type pit, int x, int y,
| +  bool repaintAll)
|  {
|  //   lyxerr << "  paintPar: pit: " << pit << " at y: " << y << endl;
|   static NullPainter nop;
| @@ -731,22 +734,67 @@ void paintPar
|   theCoords.parPos()[][pit] = Point(x, y);
|  
|   y -= rb->ascent();
| - for (RowList::const_iterator rit = rb; rit != re; ++rit) {
| + lyx::size_type rowno(0);
| + for (RowList::const_iterator rit = rb; rit != re; ++rit, ++rowno) {
|   y += rit->ascent();
|   bool const inside = (y + rit->descent() >= 0
|  && y - rit->ascent() < ww);
|   RowPainter rp(inside ? pi : nullpi, text, pit, *rit, x, y);
|  
|   y += rit->descent();
| - rp.paintAppendix();
| - rp.paintDepthBar();
| - rp.paintChangeBar();
| - if (rit == rb)
| - rp.paintFirst();
| - if (rit + 1 == re)
| - rp.paintLast();
| - rp.paintText();
| +
| + // Row signature; has row changed since last paint?
| + boost::crc_32_type crc;
| + for (lyx::pos_type i = rit->pos(); i < rit->endpos(); ++i) {
| + const unsigned char b[] = { par.getChar(i) };
| + crc.process_bytes(b, 1);
| + }   
| + lyx::size_type const row_sig = crc.checksum();

Please refactor a bit:

lyx::size_type calculateRowSignature(Row const & row)
{
boost::crc_32_type crc;
for (lyx::pos_type i = row.pos(); i < row.endpos(); ++i) {
const unsigned char b[] = { par.getChar(i) };
crc.process_bytes(b, 1);
}   
return crc.checksum();
}

lyx::size_type const row_sig = calculateRowSignagure(*rit);

| +
| + // The following code figures out if the cursor is inside
| + // an inset _on this row_.
| + bool cur_in_inset_in_row(false);
| + InsetList::const_iterator ii = par.insetlist.begin();
| + InsetList::const_iterator iend = par.insetlist.end();
| + for ( ; ii != iend; ++ii) {
| + if (ii->pos >= rit->pos() && ii->pos < rit->endpos()
| + && ii->inset->isTextInset() 
| + && pi.base.bv->cursor().isInside(ii->inset))
| + cur_in_inset_in_row = true;
| + break;
| + }

This one as well.

bool isCursorInInsetInRow(...)
{
...
}

bool cur_in_inset_in_row = isCursorInInsetInRow(...);

(something)


-- 
Lgb



Re: lyx-1.4.0 and Qt-4.1

2005-12-29 Thread Abdel

Lars Gullik Bjønnes a écrit :

Abdel <[EMAIL PROTECTED]> writes:

| > Then I'd suggest that you create a bug "Implement qt4 frontend", and
| > attach the diff to it.
| 
| Why not create a qt4 directory (same as xform or gtk) along qt2 in the

| cvs repository once 1.5cvs is opened? But I can certainly do what you
| suggest once I have something that can load a document without
| crashing.

The qt2 dir is misnamed as it is now, it is supposed to be called
"qt". After 1.4.0 is release we will switch to subversion for the
source repository, that will make dir renaming a bit easier.

When the actuall porting to qt4 begin is suspect that a lot of the
files in the (now) qt2 dir can stay as is. So the there might be some
separate implementations for qt4 perhaps a subdir, perhaps just single
files. We will see when that work is begun in ernest.
(But it will be located under "frontends/qt/"


Hum, I've read that qt3 was quite source compatible with qt2. This is 
not the case for qt4. The qt3to4 porting tool renames a lot of classes 
and variables to their Q3XXX equivalents in the Q3Support package.
I have begun already to port to the real Qt4 classes that are IMO 
cleaner and more intuitive. I have not touched the ui files for now but 
I guess that it would be better to convert them to Qt4 format as well.


We can re-discuss this anyway when the time comes.

Abdel.

> --
>Lgb




Re: [patch] Packaging of LyX

2005-12-29 Thread Lars Gullik Bjønnes
Georg Baum <[EMAIL PROTECTED]> writes:

| On Wednesday 28 December 2005 17:41, Juergen Spitzmueller wrote:
| > Lars Gullik Bjønnes wrote:
| > > | where exactly? I tried to add it to AM_INIT_AUTOMAKE, but that didn't
| > > | work.
| > >
| > > That is the right spot.
| >
| > This does not compile:
| 
| But this one does. Can you please test whether it works for you? Can it go in 
| if yes?

Ah... can you also try to move the LYX_USE_PACKAGING after the
AM_INIT_AUTOMAKE? 

I am ok with that change if it works.

-- 
Lgb



Re: [patch] Packaging of LyX

2005-12-29 Thread Georg Baum
On Friday 30 December 2005 00:02, Lars Gullik Bjønnes wrote:
> Ah... can you also try to move the LYX_USE_PACKAGING after the
> AM_INIT_AUTOMAKE?

Seems to work for me.


Georg
Index: ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/ChangeLog,v
retrieving revision 1.1040
diff -u -p -r1.1040 ChangeLog
--- ChangeLog	28 Dec 2005 10:47:00 -	1.1040
+++ ChangeLog	30 Dec 2005 00:16:38 -
@@ -1,3 +1,7 @@
+2005-12-29  Georg Baum  <[EMAIL PROTECTED]>
+
+	* configure.ac: fix version-suffix
+
 2005-12-28  Georg Baum  <[EMAIL PROTECTED]>
 
 	* autogen.sh: require automake 1.9
Index: configure.ac
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/configure.ac,v
retrieving revision 1.72
diff -u -p -r1.72 configure.ac
--- configure.ac	28 Dec 2005 10:47:00 -	1.72
+++ configure.ac	30 Dec 2005 00:16:38 -
@@ -11,10 +11,6 @@ AC_CONFIG_AUX_DIR(config)
 LYX_CHECK_VERSION
 AC_CANONICAL_TARGET
 
-# Check how the files should be packaged
-LYX_USE_PACKAGING
-LYX_VERSION_SUFFIX
-
 dnl default maintainer mode to true for development versions
 if test "${enable_maintainer_mode+set}" != set; then
   enable_maintainer_mode=$lyx_devel_version
@@ -23,6 +19,10 @@ AM_MAINTAINER_MODE
 
 AM_INIT_AUTOMAKE([foreign dist-bzip2 tar-ustar 1.9])
 
+# Check how the files should be packaged
+LYX_USE_PACKAGING
+LYX_VERSION_SUFFIX
+
 ### Set the execute permissions of the various scripts correctly
 for file in config/install-sh config/mkinstalldirs lib/configure ; do
   chmod 755 ${srcdir}/${file}


Re: [patch] Packaging of LyX

2005-12-29 Thread Lars Gullik Bjønnes
Georg Baum <[EMAIL PROTECTED]> writes:

| On Friday 30 December 2005 00:02, Lars Gullik Bjønnes wrote:
| > Ah... can you also try to move the LYX_USE_PACKAGING after the
| > AM_INIT_AUTOMAKE?
| 
| Seems to work for me.

I think this is ok.
I bet J-M will chime in if he has objections.

-- 
Lgb