Re: [Patch] fix grid lines in AMS arrays

2005-03-30 Thread Jean-Marc Lasgouttes
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes:

Georg> Martin Vermeer wrote:
>> Looks great, except that Jean-Marc is right: you can still in three
>> places replace
>> 
>> istringstream is(cmd.argument); string s; is >> s;
>> 
>> by simply
>> 
>> string const s = cmd.argument;

Georg> I thought the reason for using the istringstream was to get rid
Georg> of whitespace or other stuff that might be in cmd.argument
Georg> after the first word. Is that wrong? And if we get rid of it
Georg> here we should get rid of it in all the other insets, too (not
Georg> necessarily now)...

Then you can use FuncRequest::getArg(1). I am not sure it has the best
possible implementation, but at least this is a consistent interface.

JMarc


RE: Re: Towards LyX 1.3.6 [status update #1]

2005-03-30 Thread Rob Bearman
> > It should look like C:\Desktop\UserGuide.lyx, I believe.
> > 
> > Probably the ~/ part of MakeDisplayPath should only be done on Unix.
> > On windows, I guess there is some API to turn get those shorter file
> > names.
> 
> Mmmm, but this is not too important either way. Perhaps Asger 
> might know?

GetShortPathName
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/
base/getshortpathname.asp

Hope this helps
Rob


Re: [patch] new scrollbar code

2005-03-30 Thread John Levon
On Wed, Mar 30, 2005 at 09:01:02PM +0200, Alfredo Braunstein wrote:

> On your document indeed the scrollbar resizes a lot (the reason is obvious,
> we have paragraphs of very different vertical size).

OK, we need  to go to Mac-style scrollbars where the widget is of a
fixed size. It's unusable otherwise IMHO.

> Still I don't find
> it's completely broken, scrolling from top to bottom is possible (even if
> 'speed' is very variable). I don't see jumps.

I see both jumps and the document getting stuck with no progress being
made when holding down the button to continuously scroll.

regards
john


Re: [patch] new scrollbar code

2005-03-30 Thread Georg Baum
Am Mittwoch, 30. März 2005 19:51 schrieb John Levon:
> On Wed, Mar 30, 2005 at 04:28:11PM +0200, Alfredo Braunstein wrote:
> 
> > Lots of testing needed...
> 
> Dragging the scrollbar on the Qt  frontend is very broken (I tried with
> small document). It constantly resizes itself, jumps about. etc

I see this, too (also qt).

I noticed also that there is almost always a brown area below the 
document, even if the document is larger than the screen.

Resizing the main window does not work properly: The scrollbar height is 
not updated when I resize the window at the top border (see image) 
resizing at the bottom works.


Georg
<>

Re: [patch] new scrollbar code

2005-03-30 Thread Alfredo Braunstein
Alfredo Braunstein wrote:

> John Levon wrote:
> 
>> On Wed, Mar 30, 2005 at 04:28:11PM +0200, Alfredo Braunstein wrote:
>> 
>>> Lots of testing needed...
>> 
>> Dragging the scrollbar on the Qt  frontend is very broken (I tried with
>> small document). It constantly resizes itself, jumps about. etc

On your document indeed the scrollbar resizes a lot (the reason is obvious,
we have paragraphs of very different vertical size). Still I don't find
it's completely broken, scrolling from top to bottom is possible (even if
'speed' is very variable). I don't see jumps.
 
>> Indeed, this happens just clicking on the scrollbar background to move a
>> page down/up

Scrollbar resizing, yes. But the scrolling should be exactly one fullscreen
(else it's a bug)

>> I can no longer hold the mouse on the arrows to continuously scroll a
>> line at a time

What happends when you do so? It works here.

One option is to eliminate the scrollbar size completely (i.e. make it fixed
size). We don't have that many other options if the resize is disturbing.

I'll have a look again tomorrow.

Thanks for the testing.

Alfredo




Re: The LyX licence --- a gentle nudge

2005-03-30 Thread Carl F Ollivier-Gooch

Angus Leeming wrote:
In light of all this, I'm asking whether I can have your permission to 
add your names to http://www.lyx.org/blanket-permission.txt :

"The following people hereby grant permission to licence their 
contributions to LyX under the Gnu General Public Licence, version 2 
or later."

so that we can have a permanent record of those people who have 
contributed code to LyX and who are happy for this code to be 
licenced under the GPL.
There still be a few lines of code that I wrote once upon a time that 
are in use.  If so, I'm happy for those to be distributed under GPL.

Carl
--

Dr. Carl Ollivier-Gooch, P.Eng.   Voice: +1-604-822-1854
Associate Professor Fax: +1-604-822-2403
Department of Mechanical Engineering email: [EMAIL PROTECTED]
University of British Columbia  http://www.mech.ubc.ca/~cfog
Vancouver, BC  V6T 1Z4  http://tetra.mech.ubc.ca/ANSLab/



Re: Towards LyX 1.3.6 [status update #1]

2005-03-30 Thread Angus Leeming
Jean-Marc Lasgouttes wrote:
>>> What does the windows title look like now?
> 
> Angus> LyX: ~/Desktop/UserGuide.lyx (see attached
> Angus> user_guide_win32_v1.jpg).
> 
> Angus> This file is stored at C:\Documents and
> Angus> Settings\Angus\Desktop\UserGuide.lyx
> 
> It should look like C:\Desktop\UserGuide.lyx, I believe.
> 
> Probably the ~/ part of MakeDisplayPath should only be done on Unix.
> On windows, I guess there is some API to turn get those shorter file
> names.

Mmmm, but this is not too important either way. Perhaps Asger might know?

> Angus> That's because we'd also have to change os_win32.C's
> Angus> implementation of os::external_path:
> 
> The current code is clearly bogus. You patch makes more sense, I
> believe. Does running latex still work after that?

I've just installed MikTeX. I'll have a play.

-- 
Angus



Re: [patch] new scrollbar code

2005-03-30 Thread Alfredo Braunstein
John Levon wrote:

> On Wed, Mar 30, 2005 at 04:28:11PM +0200, Alfredo Braunstein wrote:
> 
>> Lots of testing needed...
> 
> Dragging the scrollbar on the Qt  frontend is very broken (I tried with
> small document). It constantly resizes itself, jumps about. etc
> 
> Indeed, this happens just clicking on the scrollbar background to move a
> page down/up
> 
> I can no longer hold the mouse on the arrows to continuously scroll a
> line at a time
> 
> I can't really do any useful testing due to these...

Humm, can you send me your document? I don't see any of these here.

Regards, Alfredo




Re: stdmenus patch

2005-03-30 Thread =?iso-8859-1?q?Lars_Gullik_Bj=F8nnes?=
John Levon <[EMAIL PROTECTED]> writes:

| Comments ?

Looks good.

-- 
Lgb



Re: [patch] new scrollbar code

2005-03-30 Thread John Levon
On Wed, Mar 30, 2005 at 04:28:11PM +0200, Alfredo Braunstein wrote:

> Lots of testing needed...

Dragging the scrollbar on the Qt  frontend is very broken (I tried with
small document). It constantly resizes itself, jumps about. etc

Indeed, this happens just clicking on the scrollbar background to move a
page down/up

I can no longer hold the mouse on the arrows to continuously scroll a
line at a time

I can't really do any useful testing due to these...

regards
john


Re: [Patch] fix grid lines in AMS arrays

2005-03-30 Thread =?iso-8859-1?q?Lars_Gullik_Bj=F8nnes?=
Georg Baum <[EMAIL PROTECTED]> writes:

| Martin Vermeer wrote:
>
>> Looks great, except that Jean-Marc is right: you can still in three
>> places replace
>> 
>> istringstream is(cmd.argument);
>> string s;
>> is >> s;
>> 
>> by simply
>> 
>> string const s = cmd.argument;
>
| I thought the reason for using the istringstream was to get rid of
| whitespace or other stuff that might be in cmd.argument after the first
| word. Is that wrong? And if we get rid of it here we should get rid of it
| in all the other insets, too (not necessarily now)...

If that is the only reason then a trim could be used (or rtrim)

-- 
Lgb



Re: The LyX licence --- a gentle nudge

2005-03-30 Thread Angus Leeming
Hans Bausewein wrote:
> You have my permission to remove my name entirely.
> It was a very small contribution anyway and the list is
> getting huge. 

Hi, Hans.

Just to be sure I understand you:

* you contributed code to add the "Case sensitive" and "match whole 
word" checkbuttons in the XForms search dialog?

* you'd like me to remove your name from the CREDITS file?
http://www.lyx.org/cgi-bin/viewcvs.cgi/lyx-devel/lib/CREDITS?rev=1.61&content-type=text/vnd.viewcvs-markup
Equivalent URL: http://tinyurl.com/4mwtx

I see that this functionality was present when LyX 0.12 was released 
so your contribution pre-dates my involvement with LyX!

Regards,
Angus


Re: stdmenus patch

2005-03-30 Thread Angus Leeming
John Levon wrote:
> Comments ?

Look good to me.

-- 
Angus



Re: stdmenus patch

2005-03-30 Thread Martin Vermeer
On Wed, Mar 30, 2005 at 06:21:09PM +0100, John Levon wrote:
> 
> Comments ?
> 
> regards
> john
 
Makes sense.

- Martin
 
> Index: stdmenus.ui
> ===
> RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/ui/stdmenus.ui,v
> retrieving revision 1.41
> diff -u -a -p -r1.41 stdmenus.ui
> --- stdmenus.ui   14 Feb 2005 14:25:18 -  1.41
> +++ stdmenus.ui   30 Mar 2005 17:19:56 -
> @@ -388,24 +388,24 @@ Menuset
>  #
>   Menu "navigate"
>   Submenu "Bookmarks|B" "navigate_bookmarks"
> - Item "Note|N" "note-next"
> - Item "Refs|R" "reference-goto"
> + Item "Next Note|N" "note-next"
> + Item "Goto Reference|G" "reference-goto"
>   Separator
>   Toc
>   End
>  
>   Menu "navigate_bookmarks"
> - Item "Save Bookmark 1|S" "bookmark-save 1"
> - Item "Save Bookmark 2" "bookmark-save 2"
> - Item "Save Bookmark 3" "bookmark-save 3"
> - Item "Save Bookmark 4" "bookmark-save 4"
> - Item "Save Bookmark 5" "bookmark-save 5"
> - Separator
>   Item "Go to Bookmark 1|1" "bookmark-goto 1"
>   Item "Go to Bookmark 2|2" "bookmark-goto 2"
>   Item "Go to Bookmark 3|3" "bookmark-goto 3"
>   Item "Go to Bookmark 4|4" "bookmark-goto 4"
>   Item "Go to Bookmark 5|5" "bookmark-goto 5"
> + Separator
> + Item "Save Bookmark 1|S" "bookmark-save 1"
> + Item "Save Bookmark 2" "bookmark-save 2"
> + Item "Save Bookmark 3" "bookmark-save 3"
> + Item "Save Bookmark 4" "bookmark-save 4"
> + Item "Save Bookmark 5" "bookmark-save 5"
>   End
>  
>  #


pgpGKasc5jPAI.pgp
Description: PGP signature


Re: gtk spanish chars

2005-03-30 Thread Jose' Matos
On Wednesday 30 March 2005 17:51, Alfredo Braunstein wrote:
> Incidentally, in the qt frontend, when using COMPOSE+'+a I get
>
> sending IMStart with 0 chars to 0x91caac8
> sending IMEnd with 1 chars to 0x91caac8, text=Ã
>
> but nothing is inserted in lyx. Note that inserting accented chars
> directly from the keyboard work ok various accented vocals from an
> italian keyboard.

  Could this be related with bug 1830?
  I know that you don't have the im-module applied in qt, but the root of 
the problem could be the same

-- 
Josà AbÃlio


stdmenus patch

2005-03-30 Thread John Levon

Comments ?

regards
john


Index: stdmenus.ui
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/ui/stdmenus.ui,v
retrieving revision 1.41
diff -u -a -p -r1.41 stdmenus.ui
--- stdmenus.ui 14 Feb 2005 14:25:18 -  1.41
+++ stdmenus.ui 30 Mar 2005 17:19:56 -
@@ -388,24 +388,24 @@ Menuset
 #
Menu "navigate"
Submenu "Bookmarks|B" "navigate_bookmarks"
-   Item "Note|N" "note-next"
-   Item "Refs|R" "reference-goto"
+   Item "Next Note|N" "note-next"
+   Item "Goto Reference|G" "reference-goto"
Separator
Toc
End
 
Menu "navigate_bookmarks"
-   Item "Save Bookmark 1|S" "bookmark-save 1"
-   Item "Save Bookmark 2" "bookmark-save 2"
-   Item "Save Bookmark 3" "bookmark-save 3"
-   Item "Save Bookmark 4" "bookmark-save 4"
-   Item "Save Bookmark 5" "bookmark-save 5"
-   Separator
Item "Go to Bookmark 1|1" "bookmark-goto 1"
Item "Go to Bookmark 2|2" "bookmark-goto 2"
Item "Go to Bookmark 3|3" "bookmark-goto 3"
Item "Go to Bookmark 4|4" "bookmark-goto 4"
Item "Go to Bookmark 5|5" "bookmark-goto 5"
+   Separator
+   Item "Save Bookmark 1|S" "bookmark-save 1"
+   Item "Save Bookmark 2" "bookmark-save 2"
+   Item "Save Bookmark 3" "bookmark-save 3"
+   Item "Save Bookmark 4" "bookmark-save 4"
+   Item "Save Bookmark 5" "bookmark-save 5"
End
 
 #


Re: The LyX licence --- a gentle nudge

2005-03-30 Thread Albert Chin
On Wed, Mar 30, 2005 at 10:57:30AM +0100, Angus Leeming wrote:
> "The following people hereby grant permission to licence their 
> contributions to LyX under the Gnu General Public Licence, version 2 
> or later."

The Written Word, Inc. hereby grants permission to license our
contributions to LyX under the GNU General Public Licence, version 2
or later.

-- 
albert chin ([EMAIL PROTECTED])


Re: [Patch] fix grid lines in AMS arrays

2005-03-30 Thread Georg Baum
Martin Vermeer wrote:

> On Wed, Mar 30, 2005 at 05:57:02PM +0200, Georg Baum wrote:

>> I thought the reason for using the istringstream was to get rid of
>> whitespace or other stuff that might be in cmd.argument after the first
>> word. Is that wrong? And if we get rid of it here we should get rid of it
>> in all the other insets, too (not necessarily now)...
> 
> Ah, I didn't know that. What other stuff?

I don't know. Maybe somebody else does.


Georg



Re: [Patch] fix grid lines in AMS arrays

2005-03-30 Thread Martin Vermeer
On Wed, Mar 30, 2005 at 05:57:02PM +0200, Georg Baum wrote:
> Martin Vermeer wrote:
> 
> > Looks great, except that Jean-Marc is right: you can still in three
> > places replace
> > 
> > istringstream is(cmd.argument);
> > string s;
> > is >> s;
> > 
> > by simply
> > 
> > string const s = cmd.argument;
> 
> I thought the reason for using the istringstream was to get rid of
> whitespace or other stuff that might be in cmd.argument after the first
> word. Is that wrong? And if we get rid of it here we should get rid of it
> in all the other insets, too (not necessarily now)...

Ah, I didn't know that. What other stuff? These strings typically come
from bind files or menu items, i.e, they are developer controlled. There 
is of course the minibuffer...

- Martin



pgp4nEw6Wxeos.pgp
Description: PGP signature


Re: gtk spanish chars

2005-03-30 Thread Alfredo Braunstein
John Spray wrote:

> On Wed, 2005-03-30 at 11:37 -0300, Manuel Corrales wrote:
>> File -> New
>> 
>> then i type à (n with ~) and crash, the message is this:
> 
> Strange.  If I switch to a spanish layout and type Ã, then lyx gtk does
> not have a problem.  This is CVS from a couple of weeks back that IÂm
> using.

I can reproduce the crash with lyx-cvs in fc3. Here's a backtrace (no debug
symbols sorry)

#0  0x00315809 in XftGlyphExtents () from /usr/X11R6/lib/libXft.so.2
#1  0x00315cf1 in XftTextExtents32 () from /usr/X11R6/lib/libXft.so.2
#2  0x0825764f in font_metrics::width ()
#3  0x08257837 in font_metrics::width ()
#4  0x081642d1 in LyXText::singleWidth ()
#5  0x0816514b in LyXText::rowBreakPoint ()

Incidentally, in the qt frontend, when using COMPOSE+'+a I get

sending IMStart with 0 chars to 0x91caac8
sending IMEnd with 1 chars to 0x91caac8, text=Ã

but nothing is inserted in lyx. Note that inserting accented chars directly
from the keyboard work ok various accented vocals from an italian keyboard.

The xforms frontend shows also a similar problem, COMPOSE+'+a inserts a
wrong symbol (A big A with tilde), but accented chars entered directly from
the keyboard work well.

I suppose this is all some kind of encoding problem? I have really no clue.

Regards, Alfredo




Re: [patch] new scrollbar code

2005-03-30 Thread Alfredo Braunstein
Georg Baum wrote:

> Alfredo,
> 
> can you please provide frontends/WorkArea.C? Otherwise I can't try the
> patch ;-(

Ah right, sorry my bad.

Alfredo
/**
 * \file WorkArea.C
 * This file is part of LyX, the document processor.
 * Licence details can be found in the file COPYING.
 *
 * \author Alfredo Braunstein
 *
 * Full author contact details are available in file CREDITS.
 */

#include 

#include "WorkArea.h"

#include "debug.h"

using std::endl;

namespace {

static int const bignum = 100;

}


WorkArea::WorkArea() : scroll_(0), page_(0)
{}


void WorkArea::scrollDocViewInternal(int value)
{
	lyxerr << BOOST_CURRENT_FUNCTION << endl;

	int oldvalue = scroll_;
	lyxerr << "value: " << value << " oldvalue: " << oldvalue << " page: " << page_;
	if (value == oldvalue + 1) {
		scrollLineDown();
		lyxerr << " LINE DOWN"<< endl;
		return;
	}

	if (value == oldvalue - 1) {
		scrollLineUp();
		lyxerr << " LINE UP"<< endl;
		return;
	}

	if (value == oldvalue + page_) {
		scrollPageDown();
		lyxerr << " PAGE DOWN" << endl;
		return;
	}

	if (value == oldvalue - page_) {
		scrollPageUp();
		lyxerr << " PAGE UP" << endl;
		return;
	}

	scrollDocView(double(value)/bignum);
}


void WorkArea::setScrollbarParams(double height, double pos)
{
	static int const bignum = 100;
	page_ = int(height * bignum);
	BOOST_ASSERT(height >= 0);
	BOOST_ASSERT(page_ >= 0);
	scroll_ = int(pos * bignum);
	lyxerr << "setting scrollbar, page:" << page_  << " scroll: " << scroll_ << endl;
	doSetScrollbarParams(bignum, page_, scroll_, 1);
}


Re: [patch] new scrollbar code

2005-03-30 Thread Georg Baum
Alfredo,

can you please provide frontends/WorkArea.C? Otherwise I can't try the
patch ;-(


Georg




Re: [Patch] fix grid lines in AMS arrays

2005-03-30 Thread Georg Baum
Martin Vermeer wrote:

> Looks great, except that Jean-Marc is right: you can still in three
> places replace
> 
> istringstream is(cmd.argument);
> string s;
> is >> s;
> 
> by simply
> 
> string const s = cmd.argument;

I thought the reason for using the istringstream was to get rid of
whitespace or other stuff that might be in cmd.argument after the first
word. Is that wrong? And if we get rid of it here we should get rid of it
in all the other insets, too (not necessarily now)...


Georg



Re: Sources for LyX releases < 1.0?

2005-03-30 Thread Jose' Matos
On Wednesday 30 March 2005 16:31, Jean-Marc Lasgouttes wrote:
>
> All the files are now in ftp.lyx.org/pub/lyx/stable/old/
>
> I removed the extra 0.8.6 version.

  Thanks Jean-Marc, it is a pity that we don't have all the previous 
versions available. :-(

  I know that there isn't much missing now. :-)

> JMarc

-- 
José Abílio


Re: Towards LyX 1.3.6 [status update #1]

2005-03-30 Thread Bennett Helm
On Mar 29, 2005, at 4:55 PM, Angus Leeming wrote:
I seem to remember Bennett saying that LyX refused to allow him to 
load a
filename into a dialog using the Browse button if the filename (file
path?) contained spaces.
Yes -- this affects both 1.3.6 and 1.4.0. The "Browse" buttons that 
appear in the Preferences dialogs (mostly in the Paths pane, but also 
in the Spellchecker pane) are affected. It's problematic especially now 
because the location of the user's lyx folder is now in 
~/Library/Application Support/lyx -- a path with a space.

(By the way, can the user's lyx folder be changed to: 
"~/Library/Application Support/LyX" -- with proper capitalization? ... 
Mac users would expect the application name to appear in the 
"Application Support" folder.)

Bennett


Re: [pfeiffer@tiros.net: Re: subsubsubparagraph...]

2005-03-30 Thread Jean-Marc Lasgouttes
> "lyx" == lyx  <[EMAIL PROTECTED]> writes:

lyx> Anybody willing to moderate the announce list? The main
lyx> developers need to approve the person(s), so please have the
lyx> discussin on the devel list.

Since I am posting many of the announcements, I can do moderation too.

JMarc


Re: Sources for LyX releases < 1.0?

2005-03-30 Thread Jean-Marc Lasgouttes
> "Jose'" == Jose' Matos <[EMAIL PROTECTED]> writes:

Jose'> On Wednesday 30 March 2005 12:54, Angus Leeming wrote:
>>  And are any of these sources accessible from your web pages?
>> What's the URL again?

Jose'> http://www.lyx.org/~jamatos/archaeology/source

All the files are now in ftp.lyx.org/pub/lyx/stable/old/

I removed the extra 0.8.6 version.

JMarc



[pfeiffer@tiros.net: Re: subsubsubparagraph...]

2005-03-30 Thread lyx
Anybody willing to moderate the announce list?  The main developers 
need to approve the person(s), so please have the discussin on the devel
list.

Mate
- Forwarded message from Kevin Pfeiffer <[EMAIL PROTECTED]> -

Delivered-To: [EMAIL PROTECTED]
From: Kevin Pfeiffer <[EMAIL PROTECTED]>
Organization: TIROS.NET (Tiros Translations)
To: [EMAIL PROTECTED]
Subject: Re: subsubsubparagraph...
Date: Wed, 30 Mar 2005 07:25:49 +0200
User-Agent: KMail/1.7.1
In-Reply-To: <[EMAIL PROTECTED]>

Hi [EMAIL PROTECTED],

On Thursday 24 March 2005 03:30, you wrote:
> Please do not post to the announce list!   Try the lyx-users list
> instead:

(Since I've seen this a couple times already)

Why don't you simply set the announce list to moderated status (like most 
other announce lists in the world)?

-K

-- 
Kevin Pfeiffer <[EMAIL PROTECTED]>
Tiros-Translations

- End forwarded message -


Re: gtk spanish chars

2005-03-30 Thread John Spray
On Wed, 2005-03-30 at 11:37 -0300, Manuel Corrales wrote:
> File -> New
> 
> then i type ñ (n with ~) and crash, the message is this:

Strange.  If I switch to a spanish layout and type ñ, then lyx gtk does
not have a problem.  This is CVS from a couple of weeks back that I´m
using.

John




Re: Towards LyX 1.3.6 [status update #1]

2005-03-30 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:

Angus> Jean-Marc Lasgouttes wrote:
>> What does the windows title look like now?

Angus> LyX: ~/Desktop/UserGuide.lyx (see attached
Angus> user_guide_win32_v1.jpg).

Angus> This file is stored at C:\Documents and
Angus> Settings\Angus\Desktop\UserGuide.lyx

It should look like C:\Desktop\UserGuide.lyx, I believe.

Probably the ~/ part of MakeDisplayPath should only be done on Unix.
On windows, I guess there is some API to turn get those shorter file
names. 

Angus> That's because we'd also have to change os_win32.C's
Angus> implementation of os::external_path:

The current code is clearly bogus. You patch makes more sense, I
believe. Does running latex still work after that?

JMarc


Re: Towards LyX 1.3.6 [status update #1]

2005-03-30 Thread Angus Leeming
Jean-Marc Lasgouttes wrote:
What does the windows title look like now? 
LyX: ~/Desktop/UserGuide.lyx (see attached user_guide_win32_v1.jpg).
This file is stored at
C:\Documents and Settings\Angus\Desktop\UserGuide.lyx
Would it be a good idea to change MakeDisplayPath to 
use os::external_path?
Weeelll, Windows users don't know what ~ means either... but, the 
attached patch (display_path.diff) results in no change at all.

That's because we'd also have to change os_win32.C's implementation of 
os::external_path:

 string os::external_path(string const & p)
 {
-// No backslashes in LaTeX files
-string const dos_path = subst(p, '\\', '/');
+string const dos_path = subst(p, '/', '\\');
 lyxerr[Debug::LATEX]
 << " ["
 << p << "]->>["
 << dos_path << ']' << std::endl;
 return dos_path;
}
So, the question is, is the comment correct or is it a left-over from 
the Cygwin port?

Angus
<>Index: src/support/filetools.C
===
RCS file: /cvs/lyx/lyx-devel/src/support/filetools.C,v
retrieving revision 1.146.2.15
diff -u -a -u -r1.146.2.15 filetools.C
--- src/support/filetools.C 2005/02/15 18:56:13 1.146.2.15
+++ src/support/filetools.C 2005/03/30 11:37:02
@@ -1307,7 +1307,7 @@
str = subst(str, home, "~");
 
if (str.length() <= threshold)
-   return str;
+   return os::external_path(str);
 
string const prefix = ".../";
string temp;
@@ -1328,7 +1328,7 @@
str = head + "..." + tail;
}
 
-   return prefix + str;
+   return os::external_path(prefix + str);
 }
 
 


Re: Sources for LyX releases < 1.0?

2005-03-30 Thread Jose' Matos
On Wednesday 30 March 2005 12:54, Angus Leeming wrote:
>
> And are any of these sources accessible from your web pages? What's
> the URL again?

http://www.lyx.org/~jamatos/archaeology/source

> Angus

  I am trying to recover the original files via google, but the best I can 
do is:
http://www.ibiblio.org/pub/historic-linux/ftp-archives/sunsite.unc.edu/Sep-29-1996/apps/editors/

  And even so very versions available... :-(

-- 
José Abílio


gtk spanish chars

2005-03-30 Thread Manuel Corrales
I am kind of new in this, so i dont know if this problem was already
pointed.
I am Argentinian and use the Ã, and the Ã,Ã, etc.. very much. Lyx quits
(the gtk frontend) when i do this:

File -> New

then i type à (n with ~) and crash, the message is this:


virtual void InsetText::doDispatch(LCursor&, FuncRequest&) [ cmd.action
= 86]
*** LyXText::dispatch: cmd:  action: 86 arg: '\u' x: 0 y: 0
recordUndo: cur:  inset: 0x87ed98c idx: 0 par: 0 pos: 0

recordUndo: pos: 0

lyx: SIGSEGV signal caught
Sorry, you have found a bug in LyX. Please read the bug-reporting
instructions in Help->Introduction and send us a bug report, if
necessary. Thanks !
Bye.






Re: The LyX licence --- a gentle nudge

2005-03-30 Thread Edscott Wilson Garcia
Permission granted :-)

El mié, 30-03-2005 a las 10:57 +0100, Angus Leeming escribió:
> Dear all,
> 
> please excuse the personal email, but I'm trying to do something about 
> the messy state of the LyX licence and need your help.
> 
> LyX is currently licenced under the GPL with a huge hole blowing it 
> wide apart so that it could be linked against the closed source 
> XForms library. See http://www.lyx.org/about/license.php3. Legal 
> opinion has it that this exception does not apply only to the XForms 
> library. Instead, anything and everything is allowed to link against 
> the LyX source code, defeating the whole point and purpose of the 
> GPL. Moreover, the exception is no longer needed as XForms (and 
> indeed Qt) are available under the GPL.
> 
> To make a messy situation even messier, it's not even certain whether 
> the current license is valid at all, as the necessary permissions may 
> not have been obtained before the change was made to the original 
> GPL.
> 
> In light of all this, I'm asking whether I can have your permission to 
> add your names to http://www.lyx.org/blanket-permission.txt :
> 
> "The following people hereby grant permission to licence their 
> contributions to LyX under the Gnu General Public Licence, version 2 
> or later."
> 
> so that we can have a permanent record of those people who have 
> contributed code to LyX and who are happy for this code to be 
> licenced under the GPL.
> 
> Kind regards,
> Angus
> 
> ps, if you reply to lyx-devel@lists.lyx.org, we'll have a permanent 
> record of your response.
> 
-- 
Edscott Wilson Garcia <[EMAIL PROTECTED]>



[patch] new scrollbar code

2005-03-30 Thread Alfredo Braunstein
This is a proposal for the new scrollbar code, as discussed in the list. qt
and xforms seem to work, gtk compiles (doesn't work ok but I hope should be
easy to fix)

This patch does quite a lot of things, and I'm sure is still rough around
the edges, but IMO is what needs to be done to have a decent scrollbar
again. There is a couple of things that can be commited separately (once
tested):

- there is some polishing of BufferView::Pimpl::metrics to compute stricter
top and bottom paragraphs to be drawn: this may give a small speed
improvement in update (not so much because out-of screen paragraphs are
drawn with nullpainter anyway), and also makes scrollbar computations a bit
easier.

- there is a bv::update() call replaced by update(false, true) to avoid
fitting the cursor when an image has finished loading.

Main changes are:

Simplified signature of WorkArea::setScrollBarParam, now takes two doubles
(position and height, both in [0,1]). Frontends work internally with
integer values as always.

An implementation of the WorkArea class, which is no more pure virtual. This
is to allow to introduce a couple of hooks before scrollDocView and
updateScrollbarParameters calls. In particular makes doSetScrollbarParams
to follow the NVI thing. Added 4 more signals: scroll{Page,Line}{Up,Down}.

Reworking of BufferView::Pimpl::updateScrollbar.

Lots of testing needed...

Regards, Alfredo
? frontends/WorkArea.C
Index: BufferView.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/BufferView.C,v
retrieving revision 1.260
diff -u -p -u -r1.260 BufferView.C
--- BufferView.C	22 Feb 2005 11:41:19 -	1.260
+++ BufferView.C	30 Mar 2005 13:56:49 -
@@ -148,12 +148,6 @@ void BufferView::update(bool fitcursor, 
 }
 
 
-void BufferView::updateScrollbar()
-{
-	pimpl_->updateScrollbar();
-}
-
-
 void BufferView::scrollDocView(int value)
 {
 	pimpl_->scrollDocView(value);
Index: BufferView.h
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/BufferView.h,v
retrieving revision 1.185
diff -u -p -u -r1.185 BufferView.h
--- BufferView.h	22 Feb 2005 11:41:19 -	1.185
+++ BufferView.h	30 Mar 2005 13:56:49 -
@@ -85,8 +85,6 @@ public:
 	/// move the screen to fit the cursor. Only to be called with
 	/// good y coordinates (after a bv::metrics)
 	bool fitCursor();
-	/// reset the scrollbar to reflect current view position
-	void updateScrollbar();
 
 	/// FIXME
 	bool available() const;
Index: BufferView_pimpl.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/BufferView_pimpl.C,v
retrieving revision 1.580
diff -u -p -u -r1.580 BufferView_pimpl.C
--- BufferView_pimpl.C	25 Feb 2005 11:55:29 -	1.580
+++ BufferView_pimpl.C	30 Mar 2005 13:56:50 -
@@ -100,7 +100,6 @@ using std::string;
 using std::mem_fun_ref;
 using std::vector;
 
-
 extern BufferList bufferlist;
 
 
@@ -113,6 +112,10 @@ unsigned int const saved_positions_num =
 // to these connections we avoid a segfault upon startup, and also at exit.
 // (Lgb)
 
+boost::signals::connection pagedowncon;
+boost::signals::connection pageupcon;
+boost::signals::connection lineupcon;
+boost::signals::connection linedowncon;
 boost::signals::connection dispatchcon;
 boost::signals::connection timecon;
 boost::signals::connection doccon;
@@ -152,6 +155,15 @@ BufferView::Pimpl::Pimpl(BufferView & bv
 	// Setup the signals
 	doccon = workarea().scrollDocView
 		.connect(boost::bind(&BufferView::Pimpl::scrollDocView, this, _1));
+	pageupcon = workarea().scrollPageUp
+		.connect(boost::bind(&BufferView::Pimpl::scrollPageUp, this));
+
+	pagedowncon = workarea().scrollPageDown
+		.connect(boost::bind(&BufferView::Pimpl::scrollPageDown, this));
+	lineupcon = workarea().scrollLineUp
+		.connect(boost::bind(&BufferView::Pimpl::scrollLineUp, this));
+	linedowncon = workarea().scrollLineDown
+		.connect(boost::bind(&BufferView::Pimpl::scrollLineDown, this));
 	resizecon = workarea().workAreaResize
 		.connect(boost::bind(&BufferView::Pimpl::workAreaResize, this));
 	dispatchcon = workarea().dispatch
@@ -365,7 +377,6 @@ void BufferView::Pimpl::setBuffer(Buffer
 	}
 
 	update();
-	updateScrollbar();
 	owner_->updateMenubar();
 	owner_->updateToolbars();
 	owner_->updateLayoutChoice();
@@ -399,16 +410,15 @@ void BufferView::Pimpl::resizeCurrentBuf
 	// Reset the "Formatting..." message
 	owner_->clearMessage();
 
-	updateScrollbar();
 }
 
 
-void BufferView::Pimpl::updateScrollbar()
+void BufferView::Pimpl::updateScrollbar(ViewMetricsInfo const & vi)
 {
 	if (!bv_->text()) {
 		lyxerr[Debug::DEBUG] << BOOST_CURRENT_FUNCTION
  << " no text in updateScrollbar" << endl;
-		workarea().setScrollbarParams(0, 0, 0);
+		workarea().setScrollbarParams(0, 0);
 		return;
 	}
 
@@ -424,35 +434,71 @@ void BufferView::Pimpl::updateScrollbar(
 		<< " curr par: " << cursor_.bottom().pit()
 		<< " default hei

Re: Towards LyX 1.3.6 [status update #1]

2005-03-30 Thread Martin Vermeer
On Tue, 2005-03-29 at 15:39, Jean-Marc Lasgouttes wrote:
> > "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes:
> 
> Martin> I have noticed that in many of my files, the line counter for
> Martin> LaTeX lags behind and the error boxes in the file are too high
> Martin> up. I think it is due to the XFig external insets. Looking at
> Martin> insets/ExternalSupport.C there appears to be line counting
> Martin> going on, but is it done right?
> 
> Well, always returning 0 is not very nice, is it?
> 
> Does the following patch (which I am too lazy to test myself :) help?
> 
> JMarc


Jean-Marc,

I suspect that your patch, plus removing the "+ 1" from the
InsetGraphics::latex method, will fix the positioning problem for 1.3.

- Martin




signature.asc
Description: This is a digitally signed message part


Re: The LyX licence --- a gentle nudge

2005-03-30 Thread Bernard Hurley
Hi Angus,

I would be more than happy for my contribution to be licensed under the
GPL.

Regards,

Bernard


On Wed, 2005-03-30 at 10:57 +0100, Angus Leeming wrote:
> Dear all,
> 
> please excuse the personal email, but I'm trying to do something about 
> the messy state of the LyX licence and need your help.
> 
> LyX is currently licenced under the GPL with a huge hole blowing it 
> wide apart so that it could be linked against the closed source 
> XForms library. See http://www.lyx.org/about/license.php3. Legal 
> opinion has it that this exception does not apply only to the XForms 
> library. Instead, anything and everything is allowed to link against 
> the LyX source code, defeating the whole point and purpose of the 
> GPL. Moreover, the exception is no longer needed as XForms (and 
> indeed Qt) are available under the GPL.
> 
> To make a messy situation even messier, it's not even certain whether 
> the current license is valid at all, as the necessary permissions may 
> not have been obtained before the change was made to the original 
> GPL.
> 
> In light of all this, I'm asking whether I can have your permission to 
> add your names to http://www.lyx.org/blanket-permission.txt :
> 
> "The following people hereby grant permission to licence their 
> contributions to LyX under the Gnu General Public Licence, version 2 
> or later."
> 
> so that we can have a permanent record of those people who have 
> contributed code to LyX and who are happy for this code to be 
> licenced under the GPL.
> 
> Kind regards,
> Angus
> 
> ps, if you reply to lyx-devel@lists.lyx.org, we'll have a permanent 
> record of your response.
> 
-- 
Bernard Hurley <[EMAIL PROTECTED]>


Re: [Patch] fixing error message positioning

2005-03-30 Thread Jean-Marc Lasgouttes
> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes:

Martin> Patch attached. Error positioning works now perfectly even at
Martin> the end of my 300+ page production test document, containing a
Martin> mix of traditional and external material graphics.

Looks fine to me, although the int() casts are really ugly... But I
know it is not your doing.

JMarc



Re: [Patch] fix grid lines in AMS arrays

2005-03-30 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:

Angus> Jean-Marc Lasgouttes wrote: Don't use N_("...") here, use
Angus> _("...").
>> No, we do use N_() here, because we want to pass the message in
>> english to the lyxserver. Translation is done later, except that we
>> do not do it currently :) I'll send a patch later.

Angus> Ach. So if someone were to add anything to this string then
Angus> translation would break, no?

Sure, but we are not supposed to do that :)

JMarc


Re: [Patch] fix grid lines in AMS arrays

2005-03-30 Thread Jean-Marc Lasgouttes
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes:

Georg> Jean-Marc Lasgouttes wrote:
>> No, we do use N_() here, because we want to pass the message in
>> english to the lyxserver. Translation is done later, except that we
>> do not do it currently :) I'll send a patch later.

Georg> ?? Last time I asked the same question Lars answered that these
Georg> strings are part of the protocol and don't get translated at
Georg> all. What do I misunderstand?

They get translated just before going to the minibuffer, as in the
following patch. The lyxserver still sees the untranslated message.

JMarc

Index: src/lyxfunc.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyxfunc.C,v
retrieving revision 1.394.2.9
diff -u -p -r1.394.2.9 lyxfunc.C
--- src/lyxfunc.C	24 Feb 2005 11:47:33 -	1.394.2.9
+++ src/lyxfunc.C	30 Mar 2005 12:42:24 -
@@ -1539,7 +1539,7 @@ void LyXFunc::dispatch(FuncRequest const
 	} // end of switch
 
 exit_with_message:
-	sendDispatchMessage(getMessage(), ev, verbose);
+	sendDispatchMessage(_(getMessage()), ev, verbose);
 }
 
 


Re: [Patch] fix grid lines in AMS arrays

2005-03-30 Thread Martin Vermeer
On Wed, 2005-03-30 at 15:10, Georg Baum wrote:
> Martin Vermeer wrote:
> 
> > 
> > Patch attached, please review.
> 
> It looks good, except for the strange indentation of some closing braces. I
> corrected that and merged it with my infoize fixes. I think that both
> should go in.
> 
> 
> Georg


Looks great, except that Jean-Marc is right: you can still in three
places replace 

istringstream is(cmd.argument);
string s;
is >> s;

by simply

string const s = cmd.argument;

I also think this should go in.

- Martin



signature.asc
Description: This is a digitally signed message part


Re: [Patch] fix grid lines in AMS arrays

2005-03-30 Thread Georg Baum
Jean-Marc Lasgouttes wrote:

> No, we do use N_() here, because we want to pass the message in
> english to the lyxserver. Translation is done later, except that we do
> not do it currently :) I'll send a patch later.

??
Last time I asked the same question Lars answered that these strings are
part of the protocol and don't get translated at all. What do I
misunderstand?


Georg



Re: [Patch] fix grid lines in AMS arrays

2005-03-30 Thread Angus Leeming
Jean-Marc Lasgouttes wrote:
Angus> Don't use N_("...") here, use _("...").
No, we do use N_() here, because we want to pass the message in
english to the lyxserver. Translation is done later, except that we do
not do it currently :) I'll send a patch later.
Ach. So if someone were to add anything to this string then 
translation would break, no?

Angus



[Patch] fixing error message positioning

2005-03-30 Thread Martin Vermeer
On Wed, 2005-03-30 at 11:41, Jean-Marc Lasgouttes wrote: 
> > "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes:
> 
> Martin> I removed the "+ 1" from Note inset and recompiled; works
> Martin> impeccably now. I propose to do this for all insets having
> Martin> this counting statement. OK?
> 
> This looks like a very good idea.
> 
> JMarc

Patch attached. Error positioning works now perfectly even at the end of
my 300+ page production test document, containing a mix of traditional
and external material graphics.

- Martin 
Index: ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/ChangeLog,v
retrieving revision 1.1122
diff -u -r1.1122 ChangeLog
--- ChangeLog	21 Mar 2005 18:21:12 -	1.1122
+++ ChangeLog	30 Mar 2005 11:51:44 -
@@ -1,4 +1,11 @@
 
+2005-03-30  Martin Vermeer  <[EMAIL PROTECTED]>
+
+	* ExternalSupport.C (writeExternal):
+	* insetgraphics.C (latex):
+	* insetnote.C (latex, linuxdoc, docbook, plaintext): fix
+	mis-count in computing latex error location
+
 2005-03-21  Alfredo Braunstein  <[EMAIL PROTECTED]>
 
 	* insettabular.[Ch]: rename setPos -> setCursorFromCoordinates and
Index: ExternalSupport.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/ExternalSupport.C,v
retrieving revision 1.16
diff -u -r1.16 ExternalSupport.C
--- ExternalSupport.C	14 Jan 2005 19:13:17 -	1.16
+++ ExternalSupport.C	30 Mar 2005 11:51:44 -
@@ -314,7 +314,7 @@
 	str = substituteCommands(params, str, format);
 	str = substituteOptions(params, str, format);
 	os << str;
-	return int(lyx::count(str.begin(), str.end(),'\n') + 1);
+	return int(lyx::count(str.begin(), str.end(),'\n'));
 }
 
 namespace {
Index: insetgraphics.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetgraphics.C,v
retrieving revision 1.274
diff -u -r1.274 insetgraphics.C
--- insetgraphics.C	22 Feb 2005 16:57:36 -	1.274
+++ insetgraphics.C	30 Mar 2005 11:51:45 -
@@ -750,7 +750,7 @@
 	lyxerr[Debug::GRAPHICS] << "InsetGraphics::latex outputting:\n"
 << latex_str << endl;
 	// Return how many newlines we issued.
-	return int(lyx::count(latex_str.begin(), latex_str.end(),'\n') + 1);
+	return int(lyx::count(latex_str.begin(), latex_str.end(),'\n'));
 }
 
 
Index: insetnote.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetnote.C,v
retrieving revision 1.78
diff -u -r1.78 insetnote.C
--- insetnote.C	24 Nov 2004 21:58:39 -	1.78
+++ insetnote.C	30 Mar 2005 11:51:45 -
@@ -232,7 +232,7 @@
 	string const str = ss.str();
 	os << str;
 	// Return how many newlines we issued.
-	return int(lyx::count(str.begin(), str.end(),'\n') + 1);
+	return int(lyx::count(str.begin(), str.end(),'\n'));
 }
 
 
@@ -254,7 +254,7 @@
 	string const str = ss.str();
 	os << str;
 	// Return how many newlines we issued.
-	return int(lyx::count(str.begin(), str.end(),'\n') + 1);
+	return int(lyx::count(str.begin(), str.end(),'\n'));
 }
 
 
@@ -276,7 +276,7 @@
 	string const str = ss.str();
 	os << str;
 	// Return how many newlines we issued.
-	return int(lyx::count(str.begin(), str.end(),'\n') + 1);
+	return int(lyx::count(str.begin(), str.end(),'\n'));
 }
 
 
@@ -294,7 +294,7 @@
 	string const str = ss.str();
 	os << str;
 	// Return how many newlines we issued.
-	return int(lyx::count(str.begin(), str.end(),'\n') + 1);
+	return int(lyx::count(str.begin(), str.end(),'\n'));
 }
 
 


signature.asc
Description: This is a digitally signed message part


Re: [Patch] fix grid lines in AMS arrays

2005-03-30 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:

Angus> Martin Vermeer wrote:
>> Patch attached, please review. + flag.message(bformat( + N_("Can't
>> add vertical grid lines in '%1$s'"), + name_));

Angus> Don't use N_("...") here, use _("...").

No, we do use N_() here, because we want to pass the message in
english to the lyxserver. Translation is done later, except that we do
not do it currently :) I'll send a patch later.

JMarc



Re: [Patch] fix grid lines in AMS arrays

2005-03-30 Thread Georg Baum
Martin Vermeer wrote:

> 
> Patch attached, please review.

It looks good, except for the strange indentation of some closing braces. I
corrected that and merged it with my infoize fixes. I think that both
should go in.


GeorgIndex: src/mathed/ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/ChangeLog,v
retrieving revision 1.480
diff -u -p -r1.480 ChangeLog
--- src/mathed/ChangeLog	30 Mar 2005 09:05:30 -	1.480
+++ src/mathed/ChangeLog	30 Mar 2005 11:59:58 -
@@ -1,3 +1,16 @@
+2005-03-30  Georg Baum  <[EMAIL PROTECTED]>
+
+	* math_amsarrayinset.[Ch], math_tabularinset.[Ch],
+	math_splitinset.[Ch] (infoize): implement
+	* math_arrayinset.C (infoize): generalize
+
+2005-03-30  Martin Vermeer  <[EMAIL PROTECTED]>
+
+	* math_amsarrayinset.[Ch] (getStatus):
+	* math_splitinset.[Ch] (getStatus):
+	* math_substackinset.[Ch]: suppress output of vertical gridlines
+	where appropriate 
+
 2005-03-27  Georg Baum  <[EMAIL PROTECTED]>
 
 	* math_amsarrayinset.[Ch] (validate): new, require amsmath
Index: src/mathed/math_amsarrayinset.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_amsarrayinset.C,v
retrieving revision 1.26
diff -u -p -r1.26 math_amsarrayinset.C
--- src/mathed/math_amsarrayinset.C	30 Mar 2005 09:05:30 -	1.26
+++ src/mathed/math_amsarrayinset.C	30 Mar 2005 11:59:58 -
@@ -17,8 +17,20 @@
 #include "math_streamstr.h"
 #include "math_support.h"
+
+#include "funcrequest.h"
+#include "FuncStatus.h"
+#include "gettext.h"
+
+#include "support/lstrings.h"
+#include "support/std_ostream.h"
+
+#include 
+
 
 using std::string;
+using std::istringstream;
 using std::auto_ptr;
+using lyx::support::bformat;
 
 
 MathAMSArrayInset::MathAMSArrayInset(string const & name, int m, int n)
@@ -90,11 +104,42 @@ void MathAMSArrayInset::draw(PainterInfo
 }
 
 
+bool MathAMSArrayInset::getStatus(LCursor & cur, FuncRequest const & cmd,
+		FuncStatus & flag) const
+{
+	switch (cmd.action) {
+	case LFUN_TABULAR_FEATURE: {
+		istringstream is(cmd.argument);
+		string s;
+		is >> s;
+		if (s == "add-vline-left" || s == "add-vline-right") {
+			flag.message(bformat(
+			N_("Can't add vertical grid lines in '%1$s'"),
+name_));
+			flag.enabled(false);
+			return true;
+		}
+		return MathGridInset::getStatus(cur, cmd, flag);
+	}
+	default:
+		return MathGridInset::getStatus(cur, cmd, flag);
+}
+}
+
+
 void MathAMSArrayInset::write(WriteStream & os) const
 {
 	os << "\\begin{" << name_ << '}';
 	MathGridInset::write(os);
 	os << "\\end{" << name_ << '}';
+}
+
+
+void MathAMSArrayInset::infoize(std::ostream & os) const
+{
+	string name = name_;
+	name[0] = lyx::support::uppercase(name[0]);
+	os << name << ' ';
 }
 
 
Index: src/mathed/math_amsarrayinset.h
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_amsarrayinset.h,v
retrieving revision 1.19
diff -u -p -r1.19 math_amsarrayinset.h
--- src/mathed/math_amsarrayinset.h	30 Mar 2005 09:05:30 -	1.19
+++ src/mathed/math_amsarrayinset.h	30 Mar 2005 11:59:58 -
@@ -32,7 +32,12 @@ public:
 	MathAMSArrayInset const * asAMSArrayInset() const { return this; }
 
 	///
+	bool getStatus(LCursor & cur, FuncRequest const & cmd,
+		FuncStatus & flag) const;
+	///
 	void write(WriteStream & os) const;
+	///
+	void infoize(std::ostream & os) const;
 	///
 	void normalize(NormalStream &) const;
 	///
Index: src/mathed/math_arrayinset.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_arrayinset.C,v
retrieving revision 1.56
diff -u -p -r1.56 math_arrayinset.C
--- src/mathed/math_arrayinset.C	30 Mar 2005 09:05:30 -	1.56
+++ src/mathed/math_arrayinset.C	30 Mar 2005 11:59:58 -
@@ -17,6 +17,8 @@
 #include "math_mathmlstream.h"
 #include "math_streamstr.h"
 
+#include "support/lstrings.h"
+
 #include 
 #include 
 
@@ -113,7 +115,9 @@ void MathArrayInset::write(WriteStream &
 
 void MathArrayInset::infoize(std::ostream & os) const
 {
-	os << "Array";
+	string name = name_;
+	name[0] = lyx::support::uppercase(name[0]);
+	os << name << ' ';
 }
 
 
Index: src/mathed/math_splitinset.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_splitinset.C,v
retrieving revision 1.15
diff -u -p -r1.15 math_splitinset.C
--- src/mathed/math_splitinset.C	23 Nov 2004 23:04:52 -	1.15
+++ src/mathed/math_splitinset.C	30 Mar 2005 11:59:59 -
@@ -15,7 +15,18 @@
 #include "math_mathmlstream.h"
 #include "math_streamstr.h"
 
+#include "funcrequest.h"
+#include "FuncStatus.h"
+#include "gettext.h"
+
+#include "support/lstrings.h"
+#include "support/std_ostream.h"
 
+#include 
+
+
+using std::istringstream;
+using lyx::support::bformat;
 using std::string;
 using std::auto_ptr;
 
@@ -47,6 +59,29 @@ char 

Re: [Patch] fix grid lines in AMS arrays

2005-03-30 Thread Angus Leeming
Martin Vermeer wrote:
Patch attached, please review.
+   flag.message(bformat(
+   N_("Can't add vertical grid lines in '%1$s'"),
+   name_));
Don't use N_("...") here, use _("...").
N_("...") expands to "...". I.e., no translation is performed at all. 
It is used to enable the awk script in po/Makefile.in.in to extract 
these strings into the po files for subsequent translation.

_("...") is also used as a marker but actually calls the gettext 
translation services. Perhaps this code snippet will make things clear:

char const * const foo = _("...");
int main() {
// Initialise gettext database
init_gettext();
// This string will be untranslated because the gettext
// database was not instantiated when foo was created.
std::cout << foo << std::endl;
// This string will be translated.
std::cout << _(foo) << std::endl;
// This string will also be translated.
// This is your usage.
std::cout << _("whoo!") << std::endl;
return 0;
}


Re: [Patch] fix grid lines in AMS arrays

2005-03-30 Thread Jean-Marc Lasgouttes
> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes:

Martin> Patch attached, please review.

Why do you need an istringstream instead of just using the argument?

JMarc


Re: Sources for LyX releases < 1.0?

2005-03-30 Thread Jean-Marc Lasgouttes
> "Jose'" == Jose' Matos <[EMAIL PROTECTED]> writes:

Jose'> On Wednesday 30 March 2005 13:06, Angus Leeming wrote:
>> I've got
>> http://www.devel.lyx.org/~leeming/www-user/archaeology/source/X for
>> X == lyx-0.7p4-d3.tar.gz, lyx-0.8.6.tar.gz
>> 
>> But what about: LyX 0.10.7 released on 1996/10/30 LyX 0.12.0
>> released on 1998/02/10

Jose'> I have:

I can put them on the ftp site if you tell me where they are.

JMarc



Scrolling problems in yesterday's cvs

2005-03-30 Thread Helge Hafting
I often press the down arrow on the scroll bar, as that yields smoother 
scrolling
than the down arrow on the keyboard. (When there are paragraph breaks,
headings and such.)

Lyx 1.4cvs tends to get stuck though, even with only text paragraphs and
headings in the visible portion of the document.  Giving up and pressing
down arrow on the keyboard then produce a rather large jump of about
70% of the screen, while I expected a single line of text.
Thanks for great work by the way.  I now find lyx 1.4 more useable than 1.3,
thanks to the much improved user interface.  Nice toolbars, well 
organized menus,
nicer ERT boxes that don't use up the whole line. :-)

Helge Hafting


Re: Sources for LyX releases < 1.0?

2005-03-30 Thread Angus Leeming
Edwin Leuven wrote:
http://www1.fee.uva.nl/scholar/mdw/leuven/data/lyx-0.12.0.tar.gz
Thanks, Ed.
Angus



Re: Sources for LyX releases < 1.0?

2005-03-30 Thread Angus Leeming
Jose' Matos wrote:
But what about:
LyX 0.10.7 released on 1996/10/30
LyX 0.12.0 released on 1998/02/10

I have:
[snip José's various sources]
  That I was able to retrieve from an ancient Turkish sunsite mirror, that 
was not updated for a long time. I don't have any other sources for 
pre-1.0.0 sources. :-(
And are any of these sources accessible from your web pages? What's 
the URL again?

Angus



[Patch] fix grid lines in AMS arrays

2005-03-30 Thread Martin Vermeer

Patch attached, please review.

- Martin
Index: ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/ChangeLog,v
retrieving revision 1.480
diff -u -r1.480 ChangeLog
--- ChangeLog	30 Mar 2005 09:05:30 -	1.480
+++ ChangeLog	30 Mar 2005 11:29:02 -
@@ -1,3 +1,10 @@
+2005-03-30  Martin Vermeer  <[EMAIL PROTECTED]>
+
+	* math_amsarrayinset.[Ch] (getStatus):
+	* math_splitinset.[Ch] (getStatus):
+	* math_substackinset.[Ch]: suppress output of vertical gridlines
+	where appropriate 
+
 2005-03-27  Georg Baum  <[EMAIL PROTECTED]>
 
 	* math_amsarrayinset.[Ch] (validate): new, require amsmath
Index: math_amsarrayinset.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_amsarrayinset.C,v
retrieving revision 1.26
diff -u -r1.26 math_amsarrayinset.C
--- math_amsarrayinset.C	30 Mar 2005 09:05:30 -	1.26
+++ math_amsarrayinset.C	30 Mar 2005 11:29:02 -
@@ -17,8 +17,18 @@
 #include "math_streamstr.h"
 #include "math_support.h"
 
+#include "funcrequest.h"
+#include "FuncStatus.h"
+#include "gettext.h"
+
+#include "support/lstrings.h"
+
+#include 
+
 using std::string;
+using std::istringstream;
 using std::auto_ptr;
+using lyx::support::bformat;
 
 
 MathAMSArrayInset::MathAMSArrayInset(string const & name, int m, int n)
@@ -87,6 +97,29 @@
 	mathed_draw_deco(pi, x + 1, yy, 5, dim_.height(), name_left());
 	mathed_draw_deco(pi, x + dim_.width() - 6, yy, 5, dim_.height(), name_right());
 	setPosCache(pi, x, y);
+}
+
+
+bool MathAMSArrayInset::getStatus(LCursor & cur, FuncRequest const & cmd,
+		FuncStatus & flag) const
+{
+	switch (cmd.action) {
+	case LFUN_TABULAR_FEATURE: {
+		istringstream is(cmd.argument);
+		string s;
+		is >> s;
+		if (s == "add-vline-left" || s == "add-vline-right") {
+			flag.message(bformat(
+			N_("Can't add vertical grid lines in '%1$s'"),
+name_));
+			flag.enabled(false);
+			return true;
+		}
+		return MathGridInset::getStatus(cur, cmd, flag);	
+		}
+	default:
+		return MathGridInset::getStatus(cur, cmd, flag);
+}
 }
 
 
Index: math_amsarrayinset.h
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_amsarrayinset.h,v
retrieving revision 1.19
diff -u -r1.19 math_amsarrayinset.h
--- math_amsarrayinset.h	30 Mar 2005 09:05:30 -	1.19
+++ math_amsarrayinset.h	30 Mar 2005 11:29:02 -
@@ -32,6 +32,9 @@
 	MathAMSArrayInset const * asAMSArrayInset() const { return this; }
 
 	///
+	bool getStatus(LCursor & cur, FuncRequest const & cmd,
+		FuncStatus & flag) const;
+	///
 	void write(WriteStream & os) const;
 	///
 	void normalize(NormalStream &) const;
Index: math_splitinset.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_splitinset.C,v
retrieving revision 1.15
diff -u -r1.15 math_splitinset.C
--- math_splitinset.C	23 Nov 2004 23:04:52 -	1.15
+++ math_splitinset.C	30 Mar 2005 11:29:02 -
@@ -15,7 +15,16 @@
 #include "math_mathmlstream.h"
 #include "math_streamstr.h"
 
+#include "funcrequest.h"
+#include "FuncStatus.h"
+#include "gettext.h"
 
+#include "support/lstrings.h"
+
+#include 
+
+using std::istringstream;
+using lyx::support::bformat;
 using std::string;
 using std::auto_ptr;
 
@@ -44,6 +53,29 @@
 	if (name_ == "alignedat")
 		return (col & 1) ? 'l' : 'r';
 	return 'l';
+}
+
+
+bool MathSplitInset::getStatus(LCursor & cur, FuncRequest const & cmd,
+		FuncStatus & flag) const
+{
+	switch (cmd.action) {
+	case LFUN_TABULAR_FEATURE: {
+		istringstream is(cmd.argument);
+		string s;
+		is >> s;
+		if (s == "add-vline-left" || s == "add-vline-right") {
+			flag.message(bformat(
+			N_("Can't add vertical grid lines in '%1$s'"),
+name_));
+			flag.enabled(false);
+			return true;
+		}
+		return MathGridInset::getStatus(cur, cmd, flag);
+		}
+	default:
+		return MathGridInset::getStatus(cur, cmd, flag);
+	}
 }
 
 
Index: math_splitinset.h
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_splitinset.h,v
retrieving revision 1.13
diff -u -r1.13 math_splitinset.h
--- math_splitinset.h	23 Nov 2004 23:04:52 -	1.13
+++ math_splitinset.h	30 Mar 2005 11:29:02 -
@@ -19,7 +19,11 @@
 public:
 	///
 	explicit MathSplitInset(std::string const & name);
+
 	///
+	bool getStatus(LCursor & cur, FuncRequest const & cmd,
+		FuncStatus & flag) const;
+
 	void write(WriteStream & os) const;
 	///
 	int defaultColSpace(col_type) { return 0; }
Index: math_substackinset.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_substackinset.C,v
retrieving revision 1.19
diff -u -r1.19 math_substackinset.C
--- math_substackinset.C	30 Mar 2005 09:05:30 -	1.19
+++ math_substackinset.C	30 Mar 2005 11:29:02 -
@@ -16,6 +16,

Re: Sources for LyX releases < 1.0?

2005-03-30 Thread Jose' Matos
On Wednesday 30 March 2005 13:06, Angus Leeming wrote:
> I've got
> http://www.devel.lyx.org/~leeming/www-user/archaeology/source/X
> for X == lyx-0.7p4-d3.tar.gz, lyx-0.8.6.tar.gz
>
> But what about:
> LyX 0.10.7 released on 1996/10/30
> LyX 0.12.0 released on 1998/02/10

I have:

0.8:
lyx-0.8.4.tar.gz
lyx-0.8.5.tar.gz
lyx-0.8.6.tar.gz
lyx-0.8a.lsm.gz
lyx-0.8a-srcbin.tar.gz

0.10:
lyx-0.10.0.tar.gz
lyx-0.10.1.tar.gz
lyx-0.10.2.tar.gz
lyx-0.10.3.tar.gz
lyx-0.10.5.tar.gz
lyx-0.10.6.tar.gz
lyx-0.10.7.tar.gz
patch-0.10.0.gz
patch-0.10.1.gz
patch-0.10.2.gz
patch-0.10.3.gz
patch-0.10.4.gz
patch-0.10.6.gz
patch-0.10.7.gz
snap0927960100.tar.gz

0.12:
lyx-0.12.0.tar.gz
lyx-0.12.1.tar.bz2

  That I was able to retrieve from an ancient Turkish sunsite mirror, that 
was not updated for a long time. I don't have any other sources for 
pre-1.0.0 sources. :-(

-- 
José Abílio


Re: Sources for LyX releases < 1.0?

2005-03-30 Thread Edwin Leuven
http://www1.fee.uva.nl/scholar/mdw/leuven/data/lyx-0.12.0.tar.gz
regards, ed.


Re: Towards LyX 1.3.6 [status update #1]

2005-03-30 Thread Angus Leeming
Jean-Marc Lasgouttes wrote:
> Angus> I seem to remember Bennett saying that LyX refused to allow him
> Angus> to load a filename into a dialog using the Browse button if the
> Angus> filename (file path?) contained spaces.
> 
> Yes, this is due to frontends/controllers/helper_funcs.C:browseFile,
> which does
> 
> if (result.second.find_first_of("#~$% ") == string::npos)
> break;
> 
> Alert::alert(_("Filename can't contain any "
> "of these characters:"),
> _("space, '#', '~', '$' or '%'."));
> 
> I am not sure what we shall do there. Obviously this test only makes
> sense for file names that are going to be passed to LaTeX. Currently
> it also applies to bind files, for example. This is silly.
> 
> I tend to think that we should just remove this code. How useful is it
> really?

I don't think that it is useful at all. The warning, if any, should come
when the user tries to compile the LaTeX:

No compilation is possible.
Your version of LaTeX is insufficiently smart to be able to
handle file paths containing spaces.
  

-- 
Angus



Sources for LyX releases < 1.0?

2005-03-30 Thread Angus Leeming
I've got
http://www.devel.lyx.org/~leeming/www-user/archaeology/source/X
for X == lyx-0.7p4-d3.tar.gz, lyx-0.8.6.tar.gz

But what about:
LyX 0.10.7 released on 1996/10/30
LyX 0.12.0 released on 1998/02/10   

-- 
Angus



Re: Polish translation 1.4cvs

2005-03-30 Thread Jean-Marc Lasgouttes
> "Tomasz" == Tomasz Luczak <[EMAIL PROTECTED]> writes:

Tomasz> Hi I send updated translation pl.po into polish for 1.4.0cvs
Tomasz> version

Thanks a lot Tomasz. It is in now.

JMarc


Re: Towards LyX 1.3.6 [status update #1]

2005-03-30 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:

Angus> Jean-Marc Lasgouttes wrote:
>> So, everybody, please tell me what is missing in 1.3.6cvs,
>> according to you...

Angus> I seem to remember Bennett saying that LyX refused to allow him
Angus> to load a filename into a dialog using the Browse button if the
Angus> filename (file path?) contained spaces.

Yes, this is due to frontends/controllers/helper_funcs.C:browseFile,
which does

if (result.second.find_first_of("#~$% ") == string::npos)
break;

Alert::alert(_("Filename can't contain any "
"of these characters:"),
_("space, '#', '~', '$' or '%'."));

I am not sure what we shall do there. Obviously this test only makes
sense for file names that are going to be passed to LaTeX. Currently
it also applies to bind files, for example. This is silly.

I tend to think that we should just remove this code. How useful is it
really?

JMarc


Re: Towards LyX 1.3.6 [status update #1]

2005-03-30 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:

Angus> In order to open a file with LyX by clicking on the file in
Angus> Windows Explorer, I need to copy a couple of dlls to the
Angus> directory containing the LyX executable. Ie a working
Angus> installation requires:

Angus> $ make install $ cd J:/Programs/LyX/bin $ cp
Angus> ~/qt3/lib/qt-mt3.dll . $ cp J:/mingw/bin/mingwm10.dll .

Either that, or a static compilation.

Also, one should bundle in LyX the necessary stuff like ruurd does
now. 

JMarc


Re: Towards LyX 1.3.6 [status update #1]

2005-03-30 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:

Angus> I think that the first step is to get something that compiles
Angus> and runs on Windows. Thereafter, asynchronous child processes
Angus> will be an added bonus.

OK.

Angus> In order to compile LyX 1.3.x using MinGW/MinSYS, one must
Angus> first apply development/Win32/win32_kludge.diff. Should I begin
Angus> by merging this into the tree? (I don't mean to add os_win32.h.
Angus> Rather I'd add some nasty #ifdef _WIN32 stuff to the .C files.)
Angus> If I find time, then I'll replace it with something cleaner.

That would be OK for 1.3.x, I think.

JMarc


Re: Towards LyX 1.3.6 [status update #1]

2005-03-30 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:

Angus> I dug. The attached patches cure the problem. I'll commit soon.

What does the windows title look like now? Would it be a good idea to
change MakeDisplayPath to use os::external_path?

JMarc


Re: Towards LyX 1.3.6 [status update #1]

2005-03-30 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:

Angus> I dug. The attached patches cure the problem. I'll commit soon.

Very good. Thanks.

JMarc


Re: Towards LyX 1.3.6 [status update #1]

2005-03-30 Thread =?iso-8859-1?q?Lars_Gullik_Bj=F8nnes?=
Angus Leeming <[EMAIL PROTECTED]> writes:

| Jean-Marc Lasgouttes wrote:
>> Angus> return int(lyx::count(str.begin(), str.end(),'\n') + 1);
>> Angus> How many lines in: "foo\nbar\nbaz" ?
>> 
>> Two (that is, two new lines have been created). It is not the lines
>> that are counted, but the carriage returns.
>
| Ahhh. Thank you.

Note that it is the number of lines written to the latex file that
matters. so envirs (etc) must be taken into account.

-- 
Lgb



Re: The LyX licence --- a gentle nudge

2005-03-30 Thread Hans Bausewein
On Wed, Mar 30, 2005 at 10:57:30AM +0100, Angus Leeming wrote:
> Dear all,
> 
> please excuse the personal email, but I'm trying to do something about 
> the messy state of the LyX licence and need your help.
> 
> LyX is currently licenced under the GPL with a huge hole blowing it 
> wide apart so that it could be linked against the closed source 
> XForms library. See http://www.lyx.org/about/license.php3. Legal 
> opinion has it that this exception does not apply only to the XForms 
> library. Instead, anything and everything is allowed to link against 
> the LyX source code, defeating the whole point and purpose of the 
> GPL. Moreover, the exception is no longer needed as XForms (and 
> indeed Qt) are available under the GPL.
> 
> To make a messy situation even messier, it's not even certain whether 
> the current license is valid at all, as the necessary permissions may 
> not have been obtained before the change was made to the original 
> GPL.
> 
> In light of all this, I'm asking whether I can have your permission to 
> add your names to http://www.lyx.org/blanket-permission.txt :
> 
> "The following people hereby grant permission to licence their 
> contributions to LyX under the Gnu General Public Licence, version 2 
> or later."
> 
> so that we can have a permanent record of those people who have 
> contributed code to LyX and who are happy for this code to be 
> licenced under the GPL.
> 
> Kind regards,
> Angus
> 
> ps, if you reply to lyx-devel@lists.lyx.org, we'll have a permanent 
> record of your response.

You have my permission to remove my name entirely.
It was a very small contribution anyway and the list is getting huge.

Hans
-- 
Jabber IM: [EMAIL PROTECTED]


Re: Suffixes in included/inputted/verbatiminputted files

2005-03-30 Thread Georg Baum
Jean-Pierre Chrétien wrote:

> It seems that tex2lyx barfs with «File not readable» if I \include
> without the tex suffix, which is the required syntax in my latex distro
> (texlive-2004).

Yes. This is a bug. Note that relative paths are interpreted incorrectly,
too.

> So tex2lyx should add the .tex suffix for \included files,
> or check existence if some distributions are not sensitive to its
> presence.

Yes. It does so already for graphics files, so it is simply a matter of 
reusing existing code. However, I can't work on that in the next days, but
it is on the TODO list.


Georg



Re: Towards LyX 1.3.6 [status update #1]

2005-03-30 Thread Jean-Marc Lasgouttes
> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes:

Martin> I removed the "+ 1" from Note inset and recompiled; works
Martin> impeccably now. I propose to do this for all insets having
Martin> this counting statement. OK?

This looks like a very good idea.

JMarc


Re: Towards LyX 1.3.6 [status update #1]

2005-03-30 Thread Angus Leeming
Jean-Marc Lasgouttes wrote:
> Angus> return int(lyx::count(str.begin(), str.end(),'\n') + 1);
> Angus> How many lines in: "foo\nbar\nbaz" ?
> 
> Two (that is, two new lines have been created). It is not the lines
> that are counted, but the carriage returns.

Ahhh. Thank you.

-- 
Angus



Re: Towards LyX 1.3.6 [status update #1]

2005-03-30 Thread Martin Vermeer
On Wed, Mar 30, 2005 at 10:12:01AM +0200, Jean-Marc Lasgouttes wrote:
> > "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:
> 
> Angus> Martin Vermeer wrote:
> >>> Do you have problems with 1.4.0cvs? The counting code seems
> >>> reasonable there (although there is a +1 I am not sure to
> >>> understand).
> >>  I was wondering about that too. Angus should know.
> 
> Angus> return int(lyx::count(str.begin(), str.end(),'\n') + 1);
> 
> Angus> How many lines in: "foo\nbar\nbaz" ?
> 
> Two (that is, two new lines have been created). It is not the lines
> that are counted, but the carriage returns.

Yes, I agree. "foo" is appended to an existing line.
 
> JMarc

I removed the "+ 1" from Note inset and recompiled; works impeccably now. 
I propose to do this for all insets having this counting statement. OK?

- Martin



pgpFXuJJ652v2.pgp
Description: PGP signature


Re: Towards LyX 1.3.6 [status update #1]

2005-03-30 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:

Angus> Martin Vermeer wrote:
>>> Do you have problems with 1.4.0cvs? The counting code seems
>>> reasonable there (although there is a +1 I am not sure to
>>> understand).
>>  I was wondering about that too. Angus should know.

Angus> return int(lyx::count(str.begin(), str.end(),'\n') + 1);

Angus> How many lines in: "foo\nbar\nbaz" ?

Two (that is, two new lines have been created). It is not the lines
that are counted, but the carriage returns.


JMarc


Re: Towards LyX 1.3.6 [status update #1]

2005-03-30 Thread Martin Vermeer
On Tue, Mar 29, 2005 at 03:58:50PM +0200, Jean-Marc Lasgouttes wrote:
> > "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes:
> 
> >> Does the following patch (which I am too lazy to test myself :)
> >> help?
> 
> Martin> Eh, I'm sorry but I don't have a 1.3 tree checked out :-(
> 
> Do you have problems with 1.4.0cvs? The counting code seems reasonable
> there (although there is a +1 I am not sure to understand).
> 
> What am I supposed to do to test it?
> 
> JMarc

On 1.4.0cvs, the following test results:

1) The _first_ graphic inset or external material inset appears OK.

2) The _second_ such inset (they appear to behave
interchangably) counts one (unit == single-word paragraph's worth of
LaTeX) too many.

3) The third inset counts OK.

4) The fourth inset counts one (unit) too many... now we're two (units)
off.

5) The fifth counts OK again...

6) Insets in this category that I have identified are graphic, external, 
greyedout, comment (but _not_ Note!). Graphic and external do not have
to be inside a float (but may be).

Does this pattern ring a bell, anyone? It does to me... doing

grep "lyx::count" *.C

in the insets directory turns up a number of statements like

return int(lyx::count(str.begin(), str.end(),'\n') + 1);

precisely for the inset types under suspicion.

I suspect the "+ 1" at the end is wrong.

Comments?

- Martin



pgpC6kgFj6PxW.pgp
Description: PGP signature