Re: LyX 1.2.2cvs: Bug - LyX hangs during search

2002-09-05 Thread Juergen Vigna

Michael Schmitt wrote:
> Hi,
> 
> there is another mysterious problem: If you load file "search-hangs.lyx" 
> and search for "enco", LyX is blocked. It is not even possible to save 
> an emergency file. My attempts to minimize the test case have shown that 
>  the size of the LyX file and the size of the LyX window have an 
> important impact. Thus, it might be possible that you cannot reproduce 
> the problem... :-(
> 
> In case LyX hangs, gdb reports the backtrace below. I hope this gives 
> you some idea on what is going wrong...

This is the same problem as your earlier mail. The endless loop in
the tabular display (InsetTabular::resetPos()->update)! So this has
nothing to do with the search functionallity just with the tabular
drawing (recalculating cursor position).

 Jug

-- 
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._
Dr. Jürgen VignaE-Mail:  [EMAIL PROTECTED]
Mitterstrich 151/A  Tel/Fax: +39-0471-450260 / +39-0471-450253
I-39050 SteineggWeb: http://www.lyx.org/~jug
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._




Re: Next Counters patch.

2002-09-05 Thread Martin Vermeer

On Fri, Sep 06, 2002 at 12:53:32AM +0200, Lars Gullik Bjønnes wrote:
 
> 
> This patch moves the counters out into the layout files, but not yet
> in the nice way. This does also not reduce much of the hardcoding on
> enum names in the source. 

What about giving the layout file entry for that counter a parameter
Depth? So you can compare e.g. textclass.counters().depth("enumii") 
with par->enumdepth?

> But is a step towards that goal to have the
> styles themselves declare what counter it needs.

That would be the elegant next step.
 
> Please comment.

Looks great to me. I will have little or no opportunity to do anything
about this over the weekend though. Can somebody else take this for a
ride?

As this is now .layout-driven, if it works with figure and table, no
need to test separately for user defined floats... test especially the
trouble spots, like re-count after deletion/insertion, and enums
containing non-enum paragraphs at depth. 
 
> -- 
>   Lgb

Martin




msg44187/pgp0.pgp
Description: PGP signature


Honey

2002-09-05 Thread antispam


trouble.htm
Description: Binary data


Environment depth

2002-09-05 Thread John Levon


Why do we cycle round when we increment depth beyond the max ?

john
-- 
"Take the ideas you find useful. Try not to get hung up on the labels."
- Jonathan S. Shapiro



Re: [Patch] Better xforms dialogs.

2002-09-05 Thread John Levon

On Fri, Sep 06, 2002 at 11:59:04AM +0900, R. Lahaye wrote:

> Attached.
> Rob.

I'm not applying this in its current state :

1. Tooltips do not have full stops
2. "str = _("Go to selected reference or go back");

Not good; you should switch tooltip depending up on what it will
actually do

3. Not sure about the "Go to" change actually.

4. Remember, that these classes

Bad english. Lose the comma.

5. Full path is needed to view the contents of a file.

Please don't document bugs in tooltips. Fix the bug instead.

(I know you only moved these last two, but ...)

6. Why has bibitem Close acquired a return arrow ?

7. I'm not entirely sure the visual assocation of the spellchecker is a
good idea. It looks like the 3 buttons operate on the replacements
list... (but "Replace" is good)

But the rest looks good.

regards
john


-- 
"Take the ideas you find useful. Try not to get hung up on the labels."
- Jonathan S. Shapiro



Re: [Patch] Better xforms dialogs.

2002-09-05 Thread R. Lahaye

John Levon wrote:
> On Fri, Sep 06, 2002 at 11:35:03AM +0900, R. Lahaye wrote:
> 
> 
>>Please have a look at the patch attached to the beginning of this thread 
> 
> 
> Send it my way again please with changelog

Attached.
Rob.

  ChangeLog  |   16 +++
  FormBibitem.C  |8 +
  FormCitation.C |   20 
  FormRef.C  |   57 +++
  FormSpellchecker.C |   72 +-
  FormSpellchecker.h |2
  FormTexinfo.C  |   42 +++-
  forms/form_bibitem.fd  |   39 ---
  forms/form_citation.fd |  225 +++--
  forms/form_ref.fd  |  223 +++-
  forms/form_spellchecker.fd |  165 +
  forms/form_texinfo.fd  |  196 +--
  forms/form_toc.fd  |   29 +++--
  forms/form_url.fd  |   49 +
  14 files changed, 511 insertions(+), 632 deletions(-)



BetterDialogs.diff.gz
Description: application/gzip


Re: [Patch] Better xforms dialogs.

2002-09-05 Thread John Levon

On Fri, Sep 06, 2002 at 11:35:03AM +0900, R. Lahaye wrote:

> Please have a look at the patch attached to the beginning of this thread 

Send it my way again please with changelog

regards
john
-- 
"Take the ideas you find useful. Try not to get hung up on the labels."
- Jonathan S. Shapiro



Re: [Patch] Better xforms dialogs.

2002-09-05 Thread R. Lahaye

John Levon wrote:
> On Mon, Sep 02, 2002 at 07:52:03PM +0900, R. Lahaye wrote:
> 
> 
>>I saw that there's a small bug in the Apply/Cancel button of the
>>citation dialog. Please ignore; but let me know if the redesign
>>of these xforms dialog is appreciated.
> 
> 
> Yes it (probably) is. I still have a broken fdesign so can't look at the
> changes carefully ...

The harm by the broken fdesign is when you open the attributes dialog (in which
you set, among others, the gravity and resize features) and click on accept in here.
The attributes dialog will never save the gravity/resize properly, because of a bug
(forgotten "%s" in a couple of string print-statements, silly bug!).

However, just viewing the .fd files without saving/modifying anything won't do any
harm.

By now I have a whole bunch of better, nicer, smaller and cuter xforms dialogs, but
I have no idea whether this improvement is appreciated.

Please have a look at the patch attached to the beginning of this thread and let
me know. According to the response, I will come with a larger patch for updating
more dialogs.

Regards,
Rob.




Something rotten in the core ...

2002-09-05 Thread John Levon


QPrint seems to be getting deleted twice. I don't know why. Tried adding
a dtor to QPrint -> same bug

Tried adding a QPrintDialog dtor -> bug goes away.

Here is the bt at dtor time :

(gdb) bt
#0  QPrint::~QPrint (this=0x83aa650, __in_chrg=2) at QPrint.C:41
#1  0x081df1b3 in Dialogs::Impl::~Impl (this=0x83a9698, __in_chrg=3) at 
../../../boost/boost/checked_delete.hpp:27
#2  0x081debb1 in void boost::checked_delete (x=0x83a9698) at 
../../../boost/boost/checked_delete.hpp:27
#3  0x081dcf53 in boost::scoped_ptr::~scoped_ptr (this=0x83a95bc, 
__in_chrg=2) at ../../../boost/boost/scoped_ptr.hpp:59
#4  0x081dcb6b in Dialogs::~Dialogs (this=0x83a9570, __in_chrg=3) at Dialogs.C:30
#5  0x081d3585 in void boost::checked_delete (x=0x83a9570) at 
../../boost/boost/checked_delete.hpp:27
#6  0x081d32f3 in boost::scoped_ptr::~scoped_ptr (this=0xb100, 
__in_chrg=2) at ../../boost/boost/scoped_ptr.hpp:59
#7  0x081d2895 in LyXView::~LyXView (this=0xb0a8, __in_chrg=0) at LyXView.C:63
#8  0x082060ea in QtView::~QtView (this=0xb030, __in_chrg=2) at QtView.C:95

and at crash time :

(gdb) bt
#0  0x40184736 in QGList::first (this=0x160) at tools/qglist.cpp:809
#1  0x4047099f in QList::first (this=0x160) at 
/home/moz/src/qt-2.3.1/include/qlist.h:87
#2  0x402899aa in QButtonGroup::~QButtonGroup (this=0x83ef6c0, __in_chrg=3) at 
widgets/qbuttongroup.cpp:175
#3  0x40266e34 in QWidget::~QWidget (this=0x83ee5b0, __in_chrg=0) at 
kernel/qwidget.cpp:791
#4  0x401f4223 in QDialog::~QDialog (this=0x83ee5b0, __in_chrg=0) at 
kernel/qdialog.cpp:163
#5  0x403938f9 in QPrintDialog::~QPrintDialog (this=0x83ee5b0, __in_chrg=3) at 
dialogs/qprintdialog.cpp:737
#6  0x081fda25 in void boost::checked_delete (x=0x83ee5b0) at 
../../../boost/boost/checked_delete.hpp:27
#7  0x081fdf8f in boost::scoped_ptr::~scoped_ptr (this=0x83aa724, 
__in_chrg=2) at ../../../boost/boost/scoped_ptr.hpp:59
#8  0x081fdab3 in Qt2DB::~Qt2DB (this=0x83aa6ec, __in_chrg=0) at 
QPrint.C:37
#9  0x081fdb43 in Qt2CB >::~Qt2CB (this=0x83aa6ec, 
__in_chrg=0) at QPrint.C:37
#10 0x081fcf57 in QPrint::~QPrint (this=0x83aa6ec, __in_chrg=2) at QPrint.C:42
#11 0x081e0261 in GUI::~GUI 
(this=0x83aa650, __in_chrg=2) at Dialogs.C:76
#12 0x081df1b3 in Dialogs::Impl::~Impl (this=0x83a9698, __in_chrg=3) at 
../../../boost/boost/checked_delete.hpp:27
#13 0x081debb1 in void boost::checked_delete (x=0x83a9698) at 
../../../boost/boost/checked_delete.hpp:27
#14 0x081dcf53 in boost::scoped_ptr::~scoped_ptr (this=0x83a95bc, 
__in_chrg=2) at ../../../boost/boost/scoped_ptr.hpp:59
#15 0x081dcb6b in Dialogs::~Dialogs (this=0x83a9570, __in_chrg=3) at Dialogs.C:30
#16 0x081d3585 in void boost::checked_delete (x=0x83a9570) at 
../../boost/boost/checked_delete.hpp:27
#17 0x081d32f3 in boost::scoped_ptr::~scoped_ptr (this=0xb100, 
__in_chrg=2) at ../../boost/boost/scoped_ptr.hpp:59
#18 0x081d2895 in LyXView::~LyXView (this=0xb0a8, __in_chrg=0) at LyXView.C:63
#19 0x082060ea in QtView::~QtView (this=0xb030, __in_chrg=2) at QtView.C:95

valgrind :

==5661== Invalid read of size 2
==5661==at 0x40674877: ??? (kernel/qpaintdevice.h:280)
==5661==by 0x406A5C65: ??? (/home/moz/src/qt-2.3.1/include/qvaluelist.h:192)
==5661==by 0x406A5E5F: ??? (/home/moz/src/qt-2.3.1/include/qvaluelist.h:192)
==5661==by 0x404AEA27: QButtonGroup::~QButtonGroup(void) 
(widgets/qbuttongroup.cpp:182)
==5661==by 0x4048BE34: QWidget::~QWidget(void) (kernel/qwidget.cpp:791)
==5661==by 0x40419223: QDialog::~QDialog(void) (kernel/qdialog.cpp:163)
==5661==by 0x405B88F9: QPrintDialog::~QPrintDialog(void) 
(dialogs/qprintdialog.cpp:737)
==5661==by 0x81FDA25: ??? (../../../boost/boost/checked_delete.hpp:27)
==5661==by 0x81FDF8F: ??? (../../../boost/boost/scoped_ptr.hpp:59)
==5661==by 0x81FDAB3: ??? (QPrint.C:37)
==5661==by 0x81FDB43: ??? (QPrint.C:37)
==5661==by 0x81FCF57: QPrint::~QPrint(void) (QPrint.C:42)
==5661==by 0x81E0261: ??? (Dialogs.C:76)
==5661==by 0x81DF1B3: ??? (../../../boost/boost/checked_delete.hpp:27)
==5661==by 0x81DEBB1: ??? (../../../boost/boost/checked_delete.hpp:27)
==5661==by 0x81DCF53: ??? (../../../boost/boost/scoped_ptr.hpp:59)
==5661==by 0x81DCB6B: Dialogs::~Dialogs(void) (Dialogs.C:30)
==5661==by 0x81D3585: ??? (../../boost/boost/checked_delete.hpp:27)
==5661==by 0x81D32F3: ??? (../../boost/boost/scoped_ptr.hpp:59)
==5661==by 0x81D2895: LyXView::~LyXView(void) (LyXView.C:63)
==5661==by 0x82060EA: QtView::~QtView(void) (QtView.C:95)
==5661==by 0x81E145D: lyx_gui::start(basic_string, 
__default_alloc_template > const &, vector, __default_alloc_template >, 
allocator, __default_alloc_template > > >) (lyx_gui.C:123)
==5661==by 0x80DD0DA: LyX::LyX(int &, char **) (../src/lyx_main.C:159)
==5661==by 0x810899B: main (../src/main.C:31)
==5661==by 0x40924B5C: __libc_start_main (../sysdeps/generic/libc-start.c:129)
==5661==by 0x805E571: QMainWindow::childEvent(QChildEvent *) (in 
/home/moz/src/l

Re: Qt 3 and menu items

2002-09-05 Thread John Levon

On Fri, Sep 06, 2002 at 01:25:57AM +0200, Lars Gullik Bjønnes wrote:

> Exactly _no_ output from anyting..., so activated is never invoked.

Very odd.

http://doc.trolltech.com/3.0/qmenubar.html#activated

What Qt version are you using ?

> But I managed to get a crash from:
> a) open the File menu
> b) move the mouse over the other menues so that they pop up
> c) just when I move to Navigate lyx crashes with this
> backtrace:

Yes, it's plain broken in navigate. I'm waiting for some more help from
JMarc with this one (he explained the bug I think, but I don't know how
to fix it yet). It's on bugzilla.

regards
john
-- 
"Take the ideas you find useful. Try not to get hung up on the labels."
- Jonathan S. Shapiro



Re: Qt 3 and menu items

2002-09-05 Thread John Levon

On Fri, Sep 06, 2002 at 01:17:15AM +0200, Lars Gullik Bjønnes wrote:

> | Add a printk or set your debugger to QtView.C:126
> 
> Hmm I can't find this kernel file...

Er, "oops". Geddit ?

Switching between user and kernel modes always leads to cognitive
dissonance like this ...

john
-- 
"Take the ideas you find useful. Try not to get hung up on the labels."
- Jonathan S. Shapiro



Re: Qt 3 and menu items

2002-09-05 Thread Lars Gullik Bjønnes

John Levon <[EMAIL PROTECTED]> writes:

| On Fri, Sep 06, 2002 at 01:12:59AM +0200, Lars Gullik Bjønnes wrote:
| 
| > John Levon <[EMAIL PROTECTED]> writes:
| > 
| > | I was talking crap, the code for handling menu activations is in
| > | QtView.C#65
| > | 
| > | So Lars, you need to see if this slot (activated(int)) is getting
| > | invoked. If it's not - no idea ...
| > 
| > Ok, where do I check that?
| 
| didn't I just tell you :)
| 
| Add a printk or set your debugger to QtView.C:126
| 
| (check you don't get console msgs from Qt too)

Exactly _no_ output from anyting..., so activated is never invoked.

But I managed to get a crash from:
a) open the File menu
b) move the mouse over the other menues so that they pop up
c) just when I move to Navigate lyx crashes with this
backtrace:

 #0  BufferParams::getLyXTextClass (this=0x10) at ../../src/bufferparams.C:239
#1  0x0809f854 in {anonymous}::expandToc (tomenu=@0xbfffe750, buf=0x0)
at ../../src/MenuBackend.C:483
#2  0x080a0006 in MenuBackend::expand (this=0x8404a40, frommenu=@0xbfffe730,
tomenu=@0xbfffe750, buf=0x0) at ../../src/MenuBackend.C:550
#3  0x082bee6a in QLPopupMenu::showing (this=0x84a05e8)
at ../../../../src/frontends/qt2/Menubar_pimpl.h:45
#4  0x082daa1e in QLPopupMenu::qt_invoke (this=0x84a05e8, _id=52,
_o=0xbfffe7f0) at QLPopupMenu_moc.C:81
#5  0x4024bec7 in QObject::activate_signal ()
   from /usr/lib/qt-3.0.3/lib/libqt-mt.so.3
#6  0x4024be28 in QObject::activate_signal ()
   from /usr/lib/qt-3.0.3/lib/libqt-mt.so.3
#7  0x4055bf28 in QPopupMenu::aboutToShow ()
   from /usr/lib/qt-3.0.3/lib/libqt-mt.so.3
#8  0x4033eb08 in QPopupMenu::popup () from /usr/lib/qt-3.0.3/lib/libqt-mt.so.3
#9  0x4033943c in QMenuBar::openActPopup ()
   from /usr/lib/qt-3.0.3/lib/libqt-mt.so.3
#10 0x4033b3c8 in QMenuBar::setActiveItem ()
   from /usr/lib/qt-3.0.3/lib/libqt-mt.so.3
#11 0x4033ab1e in QMenuBar::mouseMoveEvent ()
   from /usr/lib/qt-3.0.3/lib/libqt-mt.so.3
#12 0x4027bfc2 in QWidget::event () from /usr/lib/qt-3.0.3/lib/libqt-mt.so.3
#13 0x40339072 in QMenuBar::tryMouseEvent ()
   from /usr/lib/qt-3.0.3/lib/libqt-mt.so.3
#14 0x4033f56a in QPopupMenu::tryMenuBar ()
   from /usr/lib/qt-3.0.3/lib/libqt-mt.so.3

Seems that QLPopupMenu (#3) is calling something it shouldn't without
a valid buffer.

-- 
Lgb





Re: Qt 3 and menu items

2002-09-05 Thread Lars Gullik Bjønnes

John Levon <[EMAIL PROTECTED]> writes:

| Add a printk or set your debugger to QtView.C:126

Hmm I can't find this kernel file...

-- 
Lgb





INHERIT_LANG[UAGE] removal patch

2002-09-05 Thread Lars Gullik Bjønnes


This patch assumes that the current sources is right and that we do
not want INHERIT_LANG[UAGE] defined.

Unless I get objections I will apply this patch. (there is a limit on
how long stale code is allowed in...)

diffstat inheritlang.diff
 bufferview_funcs.C |   12 
 insets/insetert.C  |   16 
 language.C |4 
 language.h |3 ---
 lyxfont.C  |   42 +-
 lyxfont.h  |9 -
 lyxtextclass.C |   11 ---
 paragraph.C|   25 -
 paragraph_pimpl.C  |   15 ++-
 text.C |7 ---
 text2.C|   37 ++---
 11 files changed, 9 insertions(+), 172 deletions(-)



? build
Index: src/bufferview_funcs.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/bufferview_funcs.C,v
retrieving revision 1.53
diff -u -p -r1.53 bufferview_funcs.C
--- src/bufferview_funcs.C	27 Aug 2002 20:30:18 -	1.53
+++ src/bufferview_funcs.C	5 Sep 2002 23:13:29 -
@@ -119,11 +119,7 @@ void roman(BufferView * bv)
 
 void styleReset(BufferView * bv)
 {
-#ifndef INHERIT_LANG
 	LyXFont font(LyXFont::ALL_INHERIT, ignore_language);
-#else
-	LyXFont font(LyXFont::ALL_INHERIT);
-#endif
 	toggleAndShow(bv, font);
 }
 
@@ -151,7 +147,7 @@ string const currentState(BufferView * b
 
 	if (!bv->available())
 		return "";
- 
+
 	// I think we should only show changes from the default
 	// font. (Asger)
 	LyXText * text = bv->getLyXText();
@@ -209,14 +205,14 @@ void toggleAndShow(BufferView * bv, LyXF
 {
 	if (!bv->available())
 		return;
- 
+
 	if (bv->theLockingInset()) {
 		bv->theLockingInset()->setFont(bv, font, toggleall);
 		return;
 	}
- 
+
 	LyXText * text = bv->getLyXText();
-	// FIXME: can this happen ?? 
+	// FIXME: can this happen ??
 	if (!text)
 		return;
 
Index: src/language.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/language.C,v
retrieving revision 1.29
diff -u -p -r1.29 language.C
--- src/language.C	20 Jul 2002 13:30:55 -	1.29
+++ src/language.C	5 Sep 2002 23:13:29 -
@@ -30,10 +30,6 @@ Language ignore_lang("ignore", "ignore",
 Language const * ignore_language = &ignore_lang;
 Language latex_lang("latex", "latex", "Latex", false, 0, "latex", "");
 Language const * latex_language = &latex_lang;
-#ifdef INHERIT_LANG
-Language inherit_lang("inherit", "inherit", "Inherit", false, 0, "inherit", "");
-Language const * inherit_language = &inherit_lang;
-#endif
 
 void Languages::setDefaults()
 {
Index: src/language.h
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/language.h,v
retrieving revision 1.20
diff -u -p -r1.20 language.h
--- src/language.h	21 Mar 2002 17:25:10 -	1.20
+++ src/language.h	5 Sep 2002 23:13:29 -
@@ -117,8 +117,5 @@ extern Language const * default_language
 extern Language const * english_language;
 extern Language const * ignore_language;
 extern Language const * latex_language;
-#ifdef INHERIT_LANGUAGE
-extern Language const * inherit_language;
-#endif
 
 #endif
Index: src/lyxfont.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyxfont.C,v
retrieving revision 1.82
diff -u -p -r1.82 lyxfont.C
--- src/lyxfont.C	24 Aug 2002 22:02:26 -	1.82
+++ src/lyxfont.C	5 Sep 2002 23:13:30 -
@@ -159,11 +159,7 @@ LyXFont::LyXFont()
 
 
 LyXFont::LyXFont(LyXFont::FONT_INIT1)
-#ifndef INHERIT_LANGUAGE
 	: bits(inherit), lang(default_language)
-#else
-	: bits(inherit), lang(inherit_language)
-#endif
 {}
 
 
@@ -434,11 +430,7 @@ void LyXFont::update(LyXFont const & new
 		if (language() == document_language)
 			setLanguage(default_language);
 		else
-#ifndef INHERIT_LANGUAGE
 			setLanguage(document_language);
-#else
-			setLanguage(inherit_language);
-#endif
 	else if (newfont.language() != ignore_language)
 		setLanguage(newfont.language());
 
@@ -468,32 +460,12 @@ void LyXFont::reduce(LyXFont const & tmp
 		setNoun(INHERIT);
 	if (color() == tmplt.color())
 		setColor(LColor::inherit);
-#ifdef INHERIT_LANGUAGE
-	if (language() == tmplt.language())
-		setLanguage(inherit_language);
-#endif
 }
 
 
 /// Realize font from a template
-#ifndef INHERIT_LANGUAGE
 LyXFont & LyXFont::realize(LyXFont const & tmplt)
-#else
-LyXFont & LyXFont::realize(LyXFont const & tmplt, Language const * deflang)
-#endif
-{
-#ifdef INHERIT_LANGUAGE
-	if (language() == inherit_language) {
-		if (tmplt.language() == inherit_language ||
-			tmplt.language() == ignore_language ||
-			tmplt.language() == default_language)
-		{
-			setLanguage(deflang);
-		} else {
-			setLanguage(tmplt.language());
-		}
-	}
-#endif
+{
 	if (bits == inherit) {
 		bits = tmplt.bits;
 		return *this;
@@ -534,9 +506,6 @@ bool LyXFont::resolved() const
 		shape() != INHERIT_

Re: Qt 3 and menu items

2002-09-05 Thread John Levon

On Fri, Sep 06, 2002 at 01:12:59AM +0200, Lars Gullik Bjønnes wrote:

> John Levon <[EMAIL PROTECTED]> writes:
> 
> | I was talking crap, the code for handling menu activations is in
> | QtView.C#65
> | 
> | So Lars, you need to see if this slot (activated(int)) is getting
> | invoked. If it's not - no idea ...
> 
> Ok, where do I check that?

didn't I just tell you :)

Add a printk or set your debugger to QtView.C:126

(check you don't get console msgs from Qt too)

regards
john
-- 
"Take the ideas you find useful. Try not to get hung up on the labels."
- Jonathan S. Shapiro



Re: Qt 3 and menu items

2002-09-05 Thread Lars Gullik Bjønnes

John Levon <[EMAIL PROTECTED]> writes:

| I was talking crap, the code for handling menu activations is in
| QtView.C#65
| 
| So Lars, you need to see if this slot (activated(int)) is getting
| invoked. If it's not - no idea ...

Ok, where do I check that?

-- 
Lgb





Qt 3 and menu items

2002-09-05 Thread John Levon


I was talking crap, the code for handling menu activations is in
QtView.C#65

So Lars, you need to see if this slot (activated(int)) is getting
invoked. If it's not - no idea ...

regards
john

-- 
"Take the ideas you find useful. Try not to get hung up on the labels."
- Jonathan S. Shapiro



Next Counters patch.

2002-09-05 Thread Lars Gullik Bjønnes


This patch moves the counters out into the layout files, but not yet
in the nice way. This does also not reduce much of the hardcoding on
enum names in the source. But is a step towards that goal to have the
styles themselves declare what counter it needs.

Please comment.

diffstat counters-B-1.diff
 lib/layouts/stdclass.inc|1
 lib/layouts/stdcounters.inc |   73 +
 src/buffer.C|   13 +--
 src/buffer.h|9 -
 src/counters.C  |   45 +
 src/counters.h  |4 --
 src/lyxtextclass.C  |   78 +---
 src/lyxtextclass.h  |   19 +++---
 src/lyxtextclasslist.C  |1
 src/text2.C |   32 +-
 10 files changed, 191 insertions(+), 84 deletions(-)



Index: lib/layouts/stdclass.inc
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/layouts/stdclass.inc,v
retrieving revision 1.4
diff -u -p -r1.4 stdclass.inc
--- lib/layouts/stdclass.inc	4 Sep 2002 06:52:25 -	1.4
+++ lib/layouts/stdclass.inc	5 Sep 2002 22:49:15 -
@@ -43,4 +43,5 @@ Input stdstruct.inc
 Input lyxmacros.inc
 Input stdlayouts.inc
 Input stdfloats.inc
+Input stdcounters.inc
 Input obsolete.inc
Index: lib/layouts/stdcounters.inc
===
RCS file: lib/layouts/stdcounters.inc
diff -N lib/layouts/stdcounters.inc
--- /dev/null	1 Jan 1970 00:00:00 -
+++ lib/layouts/stdcounters.inc	5 Sep 2002 22:49:15 -
@@ -0,0 +1,73 @@
+# Author : Lars Gullik Bjønnes <[EMAIL PROTECTED]>
+
+# This include file contains all the counters that are defined as standard
+# in most LyX layouts.
+
+
+Counter
+  Name part
+End
+
+Counter
+  Name chapter
+End
+
+Counter
+  Name section
+  Within   chapter
+End
+
+Counter
+  Name subsection
+  Within   section
+End
+
+Counter
+  Name subsubsection
+  Within   subsection
+End
+
+Counter
+  Name paragraph
+  Within   subsubsection
+End
+
+Counter
+  Name subparagraph
+  Within   paragraph
+End
+
+Counter
+  Name enumi
+End
+
+Counter
+  Name enumii
+  Within   enumi
+End
+
+Counter
+  Name enumiii
+  Within   enumii
+End
+
+Counter
+  Name enumiv
+  Within   enumiii
+End
+
+Counter
+  Name bibitem
+End
+
+Counter
+  Name figure
+End
+
+Counter
+  Name table
+End
+
+Counter
+  Name algorithm
+End
Index: src/buffer.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/buffer.C,v
retrieving revision 1.383
diff -u -p -r1.383 buffer.C
--- src/buffer.C	3 Sep 2002 16:13:35 -	1.383
+++ src/buffer.C	5 Sep 2002 22:49:17 -
@@ -20,7 +20,6 @@
 
 #include "buffer.h"
 #include "bufferlist.h"
-#include "counters.h"
 #include "LyXAction.h"
 #include "lyxrc.h"
 #include "lyxlex.h"
@@ -154,7 +153,7 @@ const int LYX_FORMAT = 221;
 Buffer::Buffer(string const & file, bool ronly)
 	: niceFile(true), lyx_clean(true), bak_clean(true),
 	  unnamed(false), dep_clean(0), read_only(ronly),
-	  filename_(file), users(0), ctrs(new Counters)
+	  filename_(file), users(0)
 {
 	lyxerr[Debug::INFO] << "Buffer::Buffer()" << endl;
 	filepath_ = OnlyPath(file);
@@ -1171,7 +1170,7 @@ bool Buffer::readFile(LyXLex & lex, Para
 		 "Use LyX 0.10.x to read this!"));
 	return false;
 } else {
-	string command = 
+	string command =
 		LibFileSearch("lyx2lyx", "lyx2lyx");
 	if (command.empty()) {
 		Alert::alert(_("ERROR!"),
@@ -3221,7 +3220,7 @@ vector > const Buff
 
 	if (!keys.empty())
 		return keys;
- 
+
 	// Might be either using bibtex or a child has bibliography
 	for (inset_iterator it = inset_const_iterator_begin();
 		it != inset_const_iterator_end(); ++it) {
@@ -3337,12 +3336,6 @@ bool Buffer::isMultiLingual()
 			return true;
 
 	return false;
-}
-
-
-Counters & Buffer::counters() const
-{
-	return *ctrs.get();
 }
 
 
Index: src/buffer.h
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/buffer.h,v
retrieving revision 1.112
diff -u -p -r1.112 buffer.h
--- src/buffer.h	21 Aug 2002 07:30:56 -	1.112
+++ src/buffer.h	5 Sep 2002 22:49:17 -
@@ -27,11 +27,9 @@
 #include "ParagraphList.h"
 #include "paragraph.h"
 
-#include 
 #include 
 
 class BufferView;
-class Counters;
 class LyXRC;
 class TeXErrors;
 class LaTeXFeatures;
@@ -311,9 +309,6 @@ public:
 
 	/// Used when typesetting to place errorboxes.
 	TexRow texrow;
-	/// Buffer-wide counter array
-	Counters & counters() const;
-
 private:
 	/// is save neede

Re: INHERIT_LANGUAGE

2002-09-05 Thread Lars Gullik Bjønnes

John Levon <[EMAIL PROTECTED]> writes:

| On Fri, Sep 06, 2002 at 12:30:07AM +0200, Lars Gullik Bjønnes wrote:
| 
| > Any objections to just removing this code commented out by this define
| > then?
| 
| ooi can you explain :
| 
| 1) what it used to do
| 2) what we do now instead

I have no idea, ... to me now this is just cruft...

I think it was Dekel that played with this?

-- 
Lgb





Make this crash

2002-09-05 Thread John Levon


This used to crash lyx, but I cannot reproduce it now. Can somebody else
?

regards
john
-- 
"Take the ideas you find useful. Try not to get hung up on the labels."
- Jonathan S. Shapiro


#LyX 1.1 created this file. For more info see http://www.lyx.org/
\lyxformat 218
\textclass book
\language french
\inputencoding auto
\fontscheme default
\graphics default
\float_placement !h!t!b!p
\paperfontsize default
\spacing single 
\papersize Default
\paperpackage widemarginsa4
\use_geometry 0
\use_amsmath 1
\paperorientation portrait
\secnumdepth 2
\tocdepth 2
\paragraph_separation indent
\defskip medskip
\quotes_language english
\quotes_times 2
\papercolumns 1
\papersides 2
\paperpagestyle default

\layout Chapter

One
\layout Section

Section
\layout Standard

Test:
\layout Itemize

Bullet 1
\layout Itemize

Bullet 2
\layout Section

Some figures
\layout Standard

\begin_float fig 
\layout Standard
\align center 

\latex latex 

\backslash 
Large{
\latex default 

\begin_inset Figure size 267 163
file ParetoFrontmaxmax.eps
subcaption Title 1
width 3 45
flags 9
subfigure

\end_inset 


\begin_inset Figure size 267 163
file ParetoFrontmaxmin.eps
subcaption Title 2
width 3 45
flags 9
subfigure

\end_inset 


\layout Standard
\align center 

\begin_inset Figure size 267 163
file ParetoFrontminmax.eps
subcaption Title 3
width 3 45
flags 9
subfigure

\end_inset 


\begin_inset Figure size 267 163
file ParetoFrontminmin.eps
subcaption Title 4
width 3 45
flags 9
subfigure

\end_inset 


\latex latex 
}
\layout Caption

Insert ERT inside Inset float test.
\end_float 
\the_end



Re: INHERIT_LANGUAGE

2002-09-05 Thread John Levon

On Fri, Sep 06, 2002 at 12:30:07AM +0200, Lars Gullik Bjønnes wrote:

> Any objections to just removing this code commented out by this define
> then?

ooi can you explain :

1) what it used to do
2) what we do now instead

thanks
john
-- 
"Take the ideas you find useful. Try not to get hung up on the labels."
- Jonathan S. Shapiro



INHERIT_LANGUAGE

2002-09-05 Thread Lars Gullik Bjønnes


This has not been defined for a long, long time.

Any objections to just removing this code commented out by this define
then?

-- 
Lgb



Don't typeset / noload

2002-09-05 Thread John Levon


Can I remove it totally ? I don't see the logic - we either need to load
the file to process it into latex, or we don't. It seems if I set this,
then I just won't get any of the latex from the .lyx file !

regards
john
-- 
"Take the ideas you find useful. Try not to get hung up on the labels."
- Jonathan S. Shapiro



Re: Page down completely broken in CVS with tables

2002-09-05 Thread Lars Gullik Bjønnes

John Levon <[EMAIL PROTECTED]> writes:

| On Thu, Sep 05, 2002 at 11:11:41PM +0200, Lars Gullik Bjønnes wrote:
| 
| > Ok... what patch caused it?
| 
| No way have I got time for that game ...

Then your problem just have to queue up...

-- 
Lgb



Mathed lim

2002-09-05 Thread John Levon


"HHa: Shouldn't be there an explanation of how to get the subscript?
I've tried several things, but I never got one. What I really hate with
User Guides is that simple things are explained endlessly, but difficult
things never."

Too right. How do you get :

lim  blah
x->0

??

regards
john
-- 
"Take the ideas you find useful. Try not to get hung up on the labels."
- Jonathan S. Shapiro



Re: Page down completely broken in CVS with tables

2002-09-05 Thread John Levon

On Thu, Sep 05, 2002 at 11:11:41PM +0200, Lars Gullik Bjønnes wrote:

> Ok... what patch caused it?

No way have I got time for that game ...

regards
john
-- 
"Take the ideas you find useful. Try not to get hung up on the labels."
- Jonathan S. Shapiro



Re: Page down completely broken in CVS with tables

2002-09-05 Thread Lars Gullik Bjønnes

John Levon <[EMAIL PROTECTED]> writes:

| Load attached and try to page down. You can't (make sure you're not
| showing the whole document at once).
| 
| Regression, regression, regression ...

Ok... what patch caused it?

-- 
Lgb



Page down completely broken in CVS with tables

2002-09-05 Thread John Levon


Load attached and try to page down. You can't (make sure you're not
showing the whole document at once).

Regression, regression, regression ...

regards
john
-- 
"Take the ideas you find useful. Try not to get hung up on the labels."
- Jonathan S. Shapiro


#LyX 1.3 created this file. For more info see http://www.lyx.org/
\lyxformat 221
\textclass article
\language english
\inputencoding auto
\fontscheme default
\graphics default
\paperfontsize default
\papersize Default
\paperpackage a4
\use_geometry 0
\use_amsmath 0
\use_natbib 0
\use_numerical_citations 0
\paperorientation portrait
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
\quotes_times 2
\papercolumns 1
\papersides 1
\paperpagestyle default

\layout Standard


\begin_inset  Tabular







\begin_inset Text

\layout Standard


\family roman 
\series medium 
\shape up 
\size normal 
\emph off 
\bar no 
\noun off 
\color none
1
\end_inset 


\begin_inset Text

\layout Standard


\family roman 
\series medium 
\shape up 
\size normal 
\emph off 
\bar no 
\noun off 
\color none
2
\end_inset 


\begin_inset Text

\layout Standard


\family roman 
\series medium 
\shape up 
\size normal 
\emph off 
\bar no 
\noun off 
\color none
3
\end_inset 




\begin_inset Text

\layout Standard


\family roman 
\series medium 
\shape up 
\size normal 
\emph off 
\bar no 
\noun off 
\color none
4
\end_inset 


\begin_inset Text

\layout Standard


\family roman 
\series medium 
\shape up 
\size normal 
\emph off 
\bar no 
\noun off 
\color none
This is a multiline entry in a table.
\end_inset 


\begin_inset Text

\layout Standard


\family roman 
\series medium 
\shape up 
\size normal 
\emph off 
\bar no 
\noun off 
\color none
5
\end_inset 




\begin_inset Text

\layout Standard


\family roman 
\series medium 
\shape up 
\size normal 
\emph off 
\bar no 
\noun off 
\color none
6
\end_inset 


\begin_inset Text

\layout Standard


\family roman 
\series medium 
\shape up 
\size normal 
\emph off 
\bar no 
\noun off 
\color none
This is longer now.
\end_inset 


\begin_inset Text

\layout Standard


\family roman 
\series medium 
\shape up 
\size normal 
\emph off 
\bar no 
\noun off 
\color none
7
\end_inset 




\begin_inset Text

\layout Standard


\family roman 
\series medium 
\shape up 
\size normal 
\emph off 
\bar no 
\noun off 
\color none
8
\end_inset 


\begin_inset Text

\layout Standard


\family roman 
\series medium 
\shape up 
\size normal 
\emph off 
\bar no 
\noun off 
\color none
This is a multiline entry in a table.
 This is longer now.
\end_inset 


\begin_inset Text

\layout Standard


\family roman 
\series medium 
\shape up 
\size normal 
\emph off 
\bar no 
\noun off 
\color none
9
\end_inset 




\begin_inset Text

\layout Standard


\family roman 
\series medium 
\shape up 
\size normal 
\emph off 
\bar no 
\noun off 
\color none
10
\family default 
\series default 
\shape default 
\size default 
\emph default 
\bar default 
\noun default 
\color default
 
\end_inset 


\begin_inset Text

\layout Standard


\family roman 
\series medium 
\shape up 
\size normal 
\emph off 
\bar no 
\noun off 
\color none
This is a 
\begin_inset ERT
status Collapsed

\layout Standard

\backslash 

\backslash 

\end_inset 

 
\emph on 
multiline
\emph default 
 
\family default 
\series default 
\shape default 
\size default 
\bar default 
\noun default 
\color default

\begin_inset ERT
status Collapsed

\layout Standard

\backslash 

\backslash 

\end_inset 


\family roman 
\series medium 
\shape up 
\size normal 
\bar no 
\noun off 
\color none
 entry in a table.This should be the same as below.
\end_inset 


\begin_inset Text

\layout Standard


\family roman 
\series medium 
\shape up 
\size normal 
\bar no 
\noun off 
\color none
11
\end_inset 




\begin_inset Text

\layout Standard


\family roman 
\series medium 
\shape up 
\size normal 
\bar no 
\noun off 
\color none
12
\family default 
\series default 
\shape default 
\size default 
\bar default 
\noun default 
\color default
   
\end_inset 


\begin_inset Text

\layout Standard


\family roman 
\series medium 
\shape up 
\size normal 
\bar no 
\noun off 
\color none
This is a
\emph on 
multiline
\emph default 
entry in a table.This should be the same as above.
\end_inset 


\begin_inset Text

\layout Standard


\family roman 
\series medium 
\shape up 
\size normal 
\bar no 
\noun off 
\color none
13
\end_inset 




\end_inset 


\the_end



Re: diff-8

2002-09-05 Thread Lars Gullik Bjønnes

John Levon <[EMAIL PROTECTED]> writes:

| On Wed, Sep 04, 2002 at 04:21:30PM +0200, Lars Gullik Bjønnes wrote:
| 
| > 
| > This is what the diff-8 from my test series looks like, not much
| > different from diff-7.
| 
|1363 -/// return true if the char is "punctuation"
| 
| 
| why ?

I have no idea, I have not looked at the resulting diff yet.

-- 
Lgb



Re: qt problems

2002-09-05 Thread Lars Gullik Bjønnes

John Levon <[EMAIL PROTECTED]> writes:

| On Thu, Sep 05, 2002 at 04:47:41PM +0200, Lars Gullik Bjønnes wrote:
| 
| > It is mostlikely one of four things:
| > - xforms
| > - qt
| > - lyx xforms gui
| > - lyx qt gui
| > 
| > and we need to figure it out.
| 
| Yes, sure. I'm not denying the existence of the problem (just I don't
| see it ;)

What is the dpi on your system?
Do you have both 75dpi and 100dpi fonts installed?
Which fonts are choosen to be used by qt? by xforms?
If the same fonts... why do they display differently?

If you can do checks like those on your box, I'll do them on mine.

-- 
Lgb



Re: math column bugs

2002-09-05 Thread John Levon

On Wed, Aug 21, 2002 at 10:33:09AM +0200, Jos van den Oever wrote:

> Deleting a column (M-m c d) does not always work, even though it only contains 
> placeholders. Adding a column (M-m c i) sometimes adds two columns, instead 
> of one. For example if I want to delete a column in a three column equation, 
> I need to first add a column, before I can delete one. I don't find this a 
> big problem, but one formula got badly corrupted when doing this.

Please provide testcases and exact steps to reproduce.


> Another small usability problem, C-return doesn't always perform the expected.
> Example:
> Open a new equation: S-C-M
> type a=b
> type C-return
> Now, no new line is created, instead the cursor jumps to just behind the C.

You mean the 'a' ? Me too. Andre ?

regards
john
-- 
"Take the ideas you find useful. Try not to get hung up on the labels."
- Jonathan S. Shapiro



Re: LaTeX export: graphics files wrongly exported ?

2002-09-05 Thread John Levon

On Tue, Aug 13, 2002 at 05:38:29PM +0900, Rob Lahaye wrote:

> My Graphics insets contain .agr Grace files. When exporting the document to 
> LaTeX,
> these graphics files still appear as .agr files in the latex output.
> My graphics LaTeX export looks like:
> 
> [...]
> \begin{figure}[htbp]
> \includegraphics[%
>   bb=25bp 45bp 580bp 625bp,
>   clip,
>   scale=0.65]{figures/RIS_Thetai.agr}
> 
> \caption{aa}
> \end{figure}
> [...]
> 
> I believe this is not correct, since this goes terribly wrong when 
> processing the
> LaTeX file manually. I suppose the same problem arrises with other graphics 
> formats.
> 
> In 1.2.0, graphics-files are exported to LaTeX without its extension (so 
> the .agr is
> dropped in the LaTeX export). I think, this works fine, because LaTeX (and 
> its friends)
> assumes a .ps or .eps extension automagically.

What's the status of this problem ?

regards
john

-- 
"Take the ideas you find useful. Try not to get hung up on the labels."
- Jonathan S. Shapiro



Re: html output enumerated differently

2002-09-05 Thread John Levon

On Thu, Sep 05, 2002 at 03:41:15PM -0400, Dr. Richard E. Hawkins wrote:

>This document was generated using the LaTeX2HTML translator Version  
>99.2beta8 (1.46) 

OK doke. I don't have this installed, so someone else will have to
check. But I suspect it's a latex2html bug/missing feature.

> hevea

http://pauillac.inria.fr/~maranget/hevea/

> You can pretty much count on anythign I do being recent cvs.  I used a

OK

regards
john

-- 
"Take the ideas you find useful. Try not to get hung up on the labels."
- Jonathan S. Shapiro



Re: html output enumerated differently

2002-09-05 Thread Dr. Richard E. Hawkins

On Thu, Sep 05, 2002 at 08:09:56PM +0100, John Levon wrote:

> Works fine with Hevea.

Is this where I cry out, "I don't even *have* a garage.  You can call
home and ask my wife!"  :)

I don't even know what Hevea is . . .

> (you also forgot lyx version 1.2 vs. CVS btw ...)

always cvs :)



Re: html output enumerated differently

2002-09-05 Thread Dr. Richard E. Hawkins

On Thu, Sep 05, 2002 at 08:02:38PM +0100, John Levon wrote:
> On Tue, Sep 03, 2002 at 02:37:00PM -0400, Dr. Richard E. Hawkins wrote:

> > 1) Why is Hitler?
> >a) Yosarrian
> >b) Natalie's whore
> >c) M&M Enterprises

> > It works fine with latex printing, but with the html export option, the
> > answers are labeled 1,2,3

> Your bug reports tend to fall on the side of too little info :(

I'm usually restraining myself :)  I probably picked up this sparse
habit back when I was constrained to about 20k, and those 100k disks
were still a few bucks each.  Either that, or over 1200 baud modems :)

> (Despite namechecking one of the best books ever ;)

:)

> Is this a latex2html export ? hevea ? docbook->html ? or what ?

Beats me :)   It's whatever cvs does in a stock installation.  I've
attached the lyxfile and the generated html this time,  Here's what it
says at the end:

   This document was generated using the LaTeX2HTML translator Version  
   99.2beta8 (1.46) 

   Copyright (c) 1993, 1994, 1995, 1996, Nikos Drakos, Computer Based   
   Learning Unit, University of Leeds.  
   Copyright (c) 1997, 1998, 1999, Ross Moore, Mathematics Department,  
   Macquarie University, Sydney.

   The command line arguments were: 
   latex2html -no_subdir -split 0 -show_section_numbers 
   /tmp/lyx_tmpdir12678OWskkC/lyx_tmpbuf4/quiz1.tex 

   The translation was initiated by Dr. Richard E. Hawkins on 2002-09-03

You can pretty much count on anythign I do being recent cvs.  I used a
stock .10.7 or some such briefly, but there's always been something in
the development branch that I've needed.

hawk 



Re: html output enumerated differently

2002-09-05 Thread John Levon

On Tue, Sep 03, 2002 at 02:37:00PM -0400, Dr. Richard E. Hawkins wrote:

> I have nested enumerations in a document, e.g.
> 
> 1) Why is Hitler?
>a) Yosarrian
>b) Natalie's whore
>c) M&M Enterprises
> 
> It works fine with latex printing, but with the html export option, the
> answers are labeled 1,2,3

Works fine with Hevea.

(you also forgot lyx version 1.2 vs. CVS btw ...)

regards
john
-- 
"Take the ideas you find useful. Try not to get hung up on the labels."
- Jonathan S. Shapiro



Re: html output enumerated differently

2002-09-05 Thread John Levon

On Tue, Sep 03, 2002 at 02:37:00PM -0400, Dr. Richard E. Hawkins wrote:

> I have nested enumerations in a document, e.g.
> 
> 1) Why is Hitler?
>a) Yosarrian
>b) Natalie's whore
>c) M&M Enterprises
> 
> It works fine with latex printing, but with the html export option, the
> answers are labeled 1,2,3

Your bug reports tend to fall on the side of too little info :(

(Despite namechecking one of the best books ever ;)

Is this a latex2html export ? hevea ? docbook->html ? or what ?

regards
john
-- 
"Take the ideas you find useful. Try not to get hung up on the labels."
- Jonathan S. Shapiro



Re: [ANNOUNCE] LyX 1.2.1 is released

2002-09-05 Thread John Levon

On Tue, Sep 03, 2002 at 12:47:11PM +0200, Stephan Witt wrote:

> I think, if the previewer is xdvi, then this entry should
> be made automagically or it should be assumed by LyX itself.

File a bug ...

regards
john

-- 
"Take the ideas you find useful. Try not to get hung up on the labels."
- Jonathan S. Shapiro



Re: LyX behaves buggy when spellings-checker not installed

2002-09-05 Thread John Levon

On Tue, Sep 03, 2002 at 08:10:58AM +0900, R. Lahaye wrote:

> When I move the cursor to the end of the document, start the 
> spellingchecker,
> the spellingchecker does nothing. While leaving the spellingchecker dialog
> open, I move the cursor to the top of the document and click on [Start] in
> the spellingchecker dialog. Bang: SIGSEGV.

Cannot replicate the problem ...

(For me, the "Start" button stays disabled, which is wrong of course but
means I cannot follow these steps).

Using ispell
moz src 214 aspell --version
@(#) International Ispell Version 3.1.20 (but really Aspell
0.50-20020730)


regards
john
-- 
"Take the ideas you find useful. Try not to get hung up on the labels."
- Jonathan S. Shapiro



Re: LyX behaves buggy when spellings-checker not installed

2002-09-05 Thread John Levon

On Tue, Sep 03, 2002 at 12:12:56AM +0900, R. Lahaye wrote:

> R. Lahaye wrote:
> >
> >Something is not working properly here!
> 
> The progress slider gets values updated from controller().getProgress().
> This function should return a value between 0 and 100, which it does
> only inside regular text; inside insets the return value is far above 100.

bug 612

john



Re: LyX behaves buggy when spellings-checker not installed

2002-09-05 Thread John Levon

On Mon, Sep 02, 2002 at 09:59:15PM +0900, R. Lahaye wrote:

> Attached is an example how it could look like (the word count
> numbers are just pasted in; it's not working yet!).

It's not clear enough visually. We need to make it very clear that one
is the current counted, it's related to the slider, and the other number
is the full total.

regards
john

-- 
"Take the ideas you find useful. Try not to get hung up on the labels."
- Jonathan S. Shapiro



Re: Fixing the preview crash when there are more than 999 (!) formulae

2002-09-05 Thread John Levon

On Thu, Sep 05, 2002 at 12:18:07PM -0400, Kuba Ober wrote:

> > > We're talking about humans. Human life time expectation stays fixed when
> >
> > This is not entirely clear, given some of the work going on in the
> > investigation of the aging process. It's entirely conceivable that some
> > of us alive today may live "forever".
> 
> I guess beliefs are like tastes: one does not discuss them ;-)

All I ever do is discuss taste :)

> people who believe that living forever is good... :- Ah well, you didn't 
> say explicitly you believe it's good, just that it's conceivable that some of 
> us may live forever. You're spared ;-)

indeed ... us lyx developers must be sure to keep up with the latest
advances in genetics though.

john

-- 
"Take the ideas you find useful. Try not to get hung up on the labels."
- Jonathan S. Shapiro



Re: frequent polling in LyX (plus LyX under DRT screenshots)

2002-09-05 Thread John Levon

On Mon, Sep 02, 2002 at 09:48:22AM +1000, Amir Michail wrote:

> You can see some preliminary results here in the following screenshots:
> 
> http://www.cse.unsw.edu.au/~amichail/lyx8.png

Nice !

> BTW, could someone tell me if the functions shown in the pictures
> are particularly relevant to the action?  The darker the action label,
> the more relevant it is perceived to be to the action shown in the 
> before/after pictures.

Looks good, I think.

> I also found another problem with getting rid of cursor blinking.
> If you type a sentence and press return, the cursor will not appear
> for a while until it is told to blink on.  By then, the after picture
> has already been taken, so cursor tracking is broken.  So it's not sufficient 
> to disable blinking. We also need to make cursors appear immediately when 
> they are moved in various contexts.

It would be really nice if out of this work somebody fixed our
horrendously broken cursor handling :)

john

-- 
"Take the ideas you find useful. Try not to get hung up on the labels."
- Jonathan S. Shapiro



Re: [Patch] Better xforms dialogs.

2002-09-05 Thread John Levon

On Mon, Sep 02, 2002 at 07:52:03PM +0900, R. Lahaye wrote:

> I saw that there's a small bug in the Apply/Cancel button of the
> citation dialog. Please ignore; but let me know if the redesign
> of these xforms dialog is appreciated.

Yes it (probably) is. I still have a broken fdesign so can't look at the
changes carefully ...

john

-- 
"Take the ideas you find useful. Try not to get hung up on the labels."
- Jonathan S. Shapiro



Re: diff-8

2002-09-05 Thread John Levon

On Wed, Sep 04, 2002 at 04:21:30PM +0200, Lars Gullik Bjønnes wrote:

> 
> This is what the diff-8 from my test series looks like, not much
> different from diff-7.

   1363 -/// return true if the char is "punctuation"  
   

why ?

regards
john

-- 
"Take the ideas you find useful. Try not to get hung up on the labels."
- Jonathan S. Shapiro



LyX 1.2.2cvs: Bug - LyX hangs during search

2002-09-05 Thread Michael Schmitt

Hi,

there is another mysterious problem: If you load file "search-hangs.lyx" 
and search for "enco", LyX is blocked. It is not even possible to save 
an emergency file. My attempts to minimize the test case have shown that 
  the size of the LyX file and the size of the LyX window have an 
important impact. Thus, it might be possible that you cannot reproduce 
the problem... :-(

In case LyX hangs, gdb reports the backtrace below. I hope this gives 
you some idea on what is going wrong...

Michael



#0  0x402c23ee in select () from /lib/libc.so.6
#1  0x4017fa7c in __DTOR_END__ () from /usr/X11R6/lib/libX11.so.6
#2  0x400d1839 in _XFlushInt () from /usr/X11R6/lib/libX11.so.6
#3  0x400d1701 in _XFlush () from /usr/X11R6/lib/libX11.so.6
#4  0x400b9b6d in XFillPolygon () from /usr/X11R6/lib/libX11.so.6
#5  0x0820 in fl_polygon (fill=1, xp=0xbfff9168, n=4, col=12) at 
xdraw.c:130
#6  0x081dfa1f in fl_drw_box (style=1, x=0, y=0, w=17, h=382, c=11, 
bw_in=-1) at fldraw.c:350
#7  0x0820b651 in fl_drw_slider (boxtype=1, x=0, y=0, w=17, h=382, 
col1=11, col2=11, sltype=9, size=0.59598851203918457, val=0,
 str=0x82d26c8 "", d=15, inv=0, bw=-1) at sldraw.c:259
#8  0x081f6c80 in draw_slider (ob=0x83a0290) at slider.c:239
#9  0x081f70ac in handle_it (ob=0x83a0290, event=1, mx=0, my=0, key=0, 
ev=0x0) at slider.c:366
#10 0x081f1ded in fl_handle_it (obj=0x83a0290, event=1, mx=0, my=0, 
key=0, xev=0x0) at objects.c:1542
#11 0x081f1e99 in fl_handle_object (obj=0x83a0290, event=1, mx=0, my=0, 
key=0, xev=0x0) at objects.c:1572
#12 0x081f1864 in redraw_marked (form=0x8398c30) at objects.c:1308
#13 0x081f1980 in fl_redraw_object (obj=0x83a0290) at objects.c:1353
#14 0x081f7b3b in fl_set_slider_size (ob=0x83a0290, 
size=0.59598853868194845) at slider.c:673
#15 0x081f6131 in fl_set_scrollbar_size (ob=0x839fe70, 
val=0.59598853868194845) at scrollbar.c:354
#16 0x0807b187 in WorkArea::setScrollbar (this=0x839f91c, pos=0, 
length_fraction=0.0014326647564469914) at WorkArea.C:304
#17 0x080542ac in BufferView::Pimpl::updateScrollbar (this=0x839f8f0) at 
BufferView_pimpl.C:445
#18 0x0805e0b3 in BufferView::Pimpl::updateInset (this=0x839f8f0, 
inset=0x83be508, mark_dirty=false) at BufferView_pimpl.C:3585
#19 0x08051ae1 in BufferView::updateInset (this=0x839f710, 
inset=0x83be508, mark_dirty=false) at BufferView2.C:645
#20 0x081341f3 in InsetTabular::updateLocal (this=0x83be508, 
bv=0x839f710, what=FULL, mark_dirty=false) at insettabular.C:639
#21 0x08136600 in InsetTabular::resetPos (this=0x83be508, bv=0x839f710) 
at insettabular.C:1601
#22 0x0813420c in InsetTabular::updateLocal (this=0x83be508, 
bv=0x839f710, what=FULL, mark_dirty=false) at insettabular.C:641
#23 0x08136600 in InsetTabular::resetPos (this=0x83be508, bv=0x839f710) 
at insettabular.C:1601
#24 0x0813420c in InsetTabular::updateLocal (this=0x83be508, 
bv=0x839f710, what=FULL, mark_dirty=false) at insettabular.C:641
#25 0x08136600 in InsetTabular::resetPos (this=0x83be508, bv=0x839f710) 
at insettabular.C:1601
#26 0x0813420c in InsetTabular::updateLocal (this=0x83be508, 
bv=0x839f710, what=FULL, mark_dirty=false) at insettabular.C:641
#27 0x08136600 in InsetTabular::resetPos (this=0x83be508, bv=0x839f710) 
at insettabular.C:1601
#28 0x08133e15 in InsetTabular::update (this=0x83be508, bv=0x839f710, 
font=@0xbfff98c4, reinit=false) at insettabular.C:535
#29 0x080d99f2 in LyXText::singleWidth (this=0x83cfcc0, bview=0x839f710, 
par=0x83d8ec0, pos=0, c=3) at text.C:229
#30 0x080d988f in LyXText::singleWidth (this=0x83cfcc0, bview=0x839f710, 
par=0x83d8ec0, pos=0) at text.C:194
#31 0x080dc764 in LyXText::fill (this=0x83cfcc0, bview=0x839f710, 
row=0x83e4960, paper_width=667) at text.C:1129
#32 0x080de2e1 in LyXText::breakAgain (this=0x83cfcc0, bview=0x839f710, 
row=0x83e4960) at text.C:1685
#33 0x080ebd39 in LyXText::checkParagraph (this=0x83cfcc0, 
bview=0x839f710, par=0x83d8ec0, pos=0) at text2.C:1972
#34 0x080ec0bc in LyXText::updateInset (this=0x83cfcc0, bview=0x839f710, 
inset=0x83be508) at text2.C:2035
#35 0x0805dfa6 in BufferView::Pimpl::updateInset (this=0x839f8f0, 
inset=0x83be508, mark_dirty=false) at BufferView_pimpl.C:3571
#36 0x08051ae1 in BufferView::updateInset (this=0x839f710, 
inset=0x83be508, mark_dirty=false) at BufferView2.C:645
#37 0x081341f3 in InsetTabular::updateLocal (this=0x83be508, 
bv=0x839f710, what=FULL, mark_dirty=false) at insettabular.C:639
#38 0x08136600 in InsetTabular::resetPos (this=0x83be508, bv=0x839f710) 
at insettabular.C:1601
#39 0x0813420c in InsetTabular::updateLocal (this=0x83be508, 
bv=0x839f710, what=FULL, mark_dirty=false) at insettabular.C:641
#40 0x08136600 in InsetTabular::resetPos (this=0x83be508, bv=0x839f710) 
at insettabular.C:1601
#41 0x0813420c in InsetTabular::updateLocal (this=0x83be508, 
bv=0x839f710, what=FULL, mark_dirty=false) at insettabular.C:641
#42 0x08136600 in InsetTabular::resetPos (this=0x83be508, bv=0x839f710) 
at insettabular.C:1601
#43 0x0813420c in InsetTabular::updateLocal (this=0x83be508, 
b

LyX 1.2.2.cvs: Bug - Infinite table redraws

2002-09-05 Thread Michael Schmitt

Hi,

there are still cases where a tabular is redrawn endlessly! Load file 
"zigzag.lyx", maximize the LyX window, move the cursor into the largest 
cell, and move the cursor down the tabular.

This test case strongly depends on the window size. On a second 
computer, I couldn't reproduce the original problem but I noticed some 
strange cursor positioning problem.

Michael


#LyX 1.2 created this file. For more info see http://www.lyx.org/
\lyxformat 220
\textclass scrreprt
\begin_preamble
\frenchspacing

\partopsep0pt

\newcommand{\Nat}{\mathbb{N}}
\newcommand{\Rat}{\mathbb{R}}
\newcommand{\Pow}{\mathbb{P}}
\newcommand{\Pos}{\mathbb{Z}}

\newcommand{\ttcntab}{\setlength{\tabcolsep}{0.5\tabcolsep}
  \renewcommand{\arraystretch}{1.1} \scriptsize}
\renewcommand*\floatpagefraction{.7}

\usepackage{msc}
\usepackage{url}
\usepackage{alltt}
\usepackage{lscape}

\setmscvalues{small}
\setlength{\topheaddist}{0.8\topheaddist}
\setlength{\bottomfootdist}{0.7\bottomfootdist}
\setlength{\conditionheight}{0.8\conditionheight}

%\usepackage[sort]{natbib}
\newcommand{\bibfont}{\small}

\newif \ifpdf
   \ifx \pdfoutput \undefined
  \pdffalse
   \else
  \pdftrue
\fi

\ifpdf
   \pdfinfo { /Author (Michael Schmitt, [EMAIL PROTECTED])
  /Title (My Title)
  /Subject (one line description of the document)
   }
   \pdfcatalog { /PageMode (/UseNone)
   % /OpenAction (fitbh)
   }
   %\usepackage[pdftex,colorlinks,bookmarks]{hyperref}
\else
   %\usepackage[ps2pdf,colorlinks,bookmarks]{hyperref}
\fi
\end_preamble
\options DIV12,BCOR1.5cm,headinclude,footexclude,bibtotoc
\language american
\inputencoding default
\fontscheme ae
\graphics default
\paperfontsize 11
\spacing single 
\papersize a4paper
\paperpackage a4
\use_geometry 0
\use_amsmath 1
\use_natbib 1
\use_numerical_citations 0
\paperorientation portrait
\secnumdepth 3
\tocdepth 3
\paragraph_separation skip
\defskip medskip
\quotes_language english
\quotes_times 2
\papercolumns 1
\papersides 2
\paperpagestyle headings

\layout Standard


\begin_inset Float figure
wide false
collapsed false

\layout Standard
\align center 

\family sans 
\size scriptsize 

\begin_inset  Tabular







\begin_inset Text

\layout Standard


\family sans 
\series bold 
\size scriptsize 
aaa.a  aa aaa
\end_inset 


\begin_inset Text

\layout Standard

\end_inset 


\begin_inset Text

\layout Standard

\end_inset 




\begin_inset Text

\layout Standard


\family sans 
\series bold 
\size scriptsize 
aoaatraiat aame
\end_inset 


\begin_inset Text

\layout Standard


\family sans 
\size scriptsize 
:
\end_inset 


\begin_inset Text

\layout Standard

amamamamamamamamamamama( aaa : aa; aa
 : aaa; aa3 :  )
\end_inset 




\begin_inset Text

\layout Standard


\family sans 
\series bold 
\size scriptsize 
 
\end_inset 


\begin_inset Text

\layout Standard


\family sans 
\size scriptsize 
:
\end_inset 


\begin_inset Text

\layout Standard

a
\end_inset 




\begin_inset Text

\layout Standard


\family sans 
\series bold 
\size scriptsize 
Derivation Path
\end_inset 


\begin_inset Text

\layout Standard


\family sans 
\size scriptsize 
:
\end_inset 


\begin_inset Text

\layout Standard

\end_inset 




\begin_inset Text

\layout Standard


\family sans 
\series bold 
\size scriptsize 
Enaoaing Variation
\end_inset 


\begin_inset Text

\layout Standard


\family sans 
\size scriptsize 
:
\end_inset 


\begin_inset Text

\layout Standard

\end_inset 




\begin_inset Text

\layout Standard


\family sans 
\series bold 
\size scriptsize 
eata
\end_inset 


\begin_inset Text

\layout Standard


\family sans 
\size scriptsize 
:
\end_inset 


\begin_inset Text

\layout Standard

\end_inset 




\begin_inset Text

\layout Standard


\family sans 
\series bold 
\size scriptsize 
aoaatraiat Value
\end_inset 


\begin_inset Text

\layout Standard

\end_inset 


\begin_inset Text

\layout Standard

\end_inset 




\begin_inset Text

\layout Standard


\family sans 
\size scriptsize 
{
\newline 

\begin_inset ERT
status Inlined

\layout Standard

\backslash 
hapaae*{3aa}
\end_inset 

gIaaa {
\newline 

\end_inset 


\begin_inset Text

\layout Standard

\end_inset 


\begin_inset Text

\layout Standard

\end_inset 




\begin_inset Text

\layout Standard


\family sans 
\series bold 
\size scriptsize 
aetailea aaaeata
\series default 
 :
\end_inset 


\begin_inset Text

\layout Standard

\end_inset 


\begin_inset Text

\layout Standard

\end_inset 




\end_inset 


\end_inset 


\the_end



Re: [PATCH] Re: Vertical spacing below/above paragraphs

2002-09-05 Thread John Levon

On Thu, Sep 05, 2002 at 04:33:13PM +0100, John Levon wrote:

> Here's the patch, but it doesn't work.

Sigh. Try again.

Now somebody else has to decide if we want this or not.

john


Index: text.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text.C,v
retrieving revision 1.273
diff -u -r1.273 text.C
--- text.C  21 Aug 2002 17:35:22 -  1.273
+++ text.C  5 Sep 2002 18:06:49 -
@@ -3242,13 +3242,12 @@
 
 int LyXText::getLengthMarkerHeight(BufferView * bv, VSpace const & vsp) const
 {
+   if (vsp.kind() == VSpace::NONE)
+   return 0;
+ 
int const arrow_size = 4;
int const space_size = int(vsp.inPixels(bv));
 
-   if (vsp.kind() != VSpace::LENGTH) {
-   return space_size;
-   }
-
LyXFont font;
font.decSize();
int const min_size = max(3 * arrow_size,
@@ -3265,6 +3264,9 @@
 int LyXText::drawLengthMarker(DrawRowParams & p, string const & prefix,
  VSpace const & vsp, int start)
 {
+   if (vsp.kind() == VSpace::NONE)
+   return 0;
+ 
int const arrow_size = 4;
int const size = getLengthMarkerHeight(p.bv, vsp);
int const end = start + size;
@@ -3275,10 +3277,11 @@
int ty1, ty2;
// y-values for bottom arrow
int by1, by2;
+ 
+   str = prefix + " (" + vsp.asLyXCommand() + ")";
+ 
switch (vsp.kind()) {
-   case VSpace::LENGTH:
-   {
-   str = prefix + " (" + vsp.asLyXCommand() + ")";
+   case VSpace::LENGTH: {
// adding or removing space
bool const added = !(vsp.length().len().value() < 0.0);
ty1 = added ? (start + arrow_size) : start;
@@ -3287,14 +3290,10 @@
by2 = added ? end : (end - arrow_size);
break;
}
-   case VSpace:: VFILL:
-   str = prefix + " (vertical fill)";
+   default:
ty1 = ty2 = start;
by1 = by2 = end;
break;
-   default:
-   // nothing to draw here
-   return size;
}
 
int const leftx = p.xo + leftMargin(p.bv, p.row);
@@ -3314,6 +3313,9 @@
 start + ((end - start) / 2) + d,
 str, font);
 
+   if (vsp.kind() != VSpace::LENGTH)
+   return size;
+ 
// top arrow
p.pain->line(leftx, ty1, midx, ty2, LColor::added_space);
p.pain->line(midx, ty2, rightx, ty1, LColor::added_space);



[PATCH] Re: Vertical spacing below/above paragraphs

2002-09-05 Thread Michael Schmitt

Hi John,

what do you mean by "it doesn't work". It doesn't work completely, or it 
  just does not compute the length correctly?

Even if the vertical length of a smallskip is identical to a bigskip on 
screen, I prefer a solution where the length is printed explicitly in 
textual form. I wouldn't be surprise if there are skips in my document 
where there should be none.

Regards, Michael




Re: WEIRD problem

2002-09-05 Thread John Levon

On Thu, Sep 05, 2002 at 06:59:58PM +0100, José Abílio Oliveira Matos wrote:

>   It is possible that this file was created after slocate last update, so 
> maybe _find_ is your friend.
> 
>   Are you sure you never saw this file before? Specially after the pub 
> yesterday. ;-)

I would just like to announce :

I am a big plant.

Nothing to see here, move along ...

john
-- 
"Take the ideas you find useful. Try not to get hung up on the labels."
- Jonathan S. Shapiro



Re: WEIRD problem

2002-09-05 Thread José Abílio Oliveira Matos

On Thursday 05 September 2002 18:52, John Levon wrote:

> >   locate newfile2.lyx

> Doesn't exist ! (there is one, but in a different dir, and not the same
> file).
[...]
> when I press ctrl-n. I am FLUMMOXED as to how this could happen.

  It is possible that this file was created after slocate last update, so 
maybe _find_ is your friend.

  Are you sure you never saw this file before? Specially after the pub 
yesterday. ;-)

> regards
> john

-- 
José Abílio



Re: WEIRD problem

2002-09-05 Thread John Levon

On Thu, Sep 05, 2002 at 04:48:55PM +0100, José Abílio Oliveira Matos wrote:

>   Since you are using linux (I think) why not locate?
> 
>   locate newfile2.lyx
> 
>   You should not have so many hits. :-)

Doesn't exist ! (there is one, but in a different dir, and not the same
file).

strace on open() shows :

open("/home/moz/src/lyx/lyx-devel/lib/layouts/article.layout",
O_RDONLY|O_LARGEFILE) = 7
open("/home/moz/src/lyx/lyx-devel/lib/layouts/stdclass.inc",
O_RDONLY|O_LARGEFILE) = 8
open("/home/moz/src/lyx/lyx-devel/lib/layouts/stdlists.inc",
O_RDONLY|O_LARGEFILE) = 9
open("/home/moz/src/lyx/lyx-devel/lib/layouts/stdsections.inc",
O_RDONLY|O_LARGEFILE) = 9
open("/home/moz/src/lyx/lyx-devel/lib/layouts/stdstarsections.inc",
O_RDONLY|O_LARGEFILE) = 9
open("/home/moz/src/lyx/lyx-devel/lib/layouts/stdtitle.inc",
O_RDONLY|O_LARGEFILE) = 9
open("/home/moz/src/lyx/lyx-devel/lib/layouts/stdstruct.inc",
O_RDONLY|O_LARGEFILE) = 9
open("/home/moz/src/lyx/lyx-devel/lib/layouts/lyxmacros.inc",
O_RDONLY|O_LARGEFILE) = 9
open("/home/moz/src/lyx/lyx-devel/lib/layouts/stdlayouts.inc",
O_RDONLY|O_LARGEFILE) = 9
open("/home/moz/src/lyx/lyx-devel/lib/layouts/obsolete.inc",
O_RDONLY|O_LARGEFILE) = 9

i.e. nothing interesting.

when I press ctrl-n. I am FLUMMOXED as to how this could happen.

regards
john

-- 
"Take the ideas you find useful. Try not to get hung up on the labels."
- Jonathan S. Shapiro



Re: qt problems

2002-09-05 Thread John Levon

On Thu, Sep 05, 2002 at 04:47:41PM +0200, Lars Gullik Bjønnes wrote:

> It is mostlikely one of four things:
> - xforms
> - qt
> - lyx xforms gui
> - lyx qt gui
> 
> and we need to figure it out.

Yes, sure. I'm not denying the existence of the problem (just I don't
see it ;)

john
-- 
"Take the ideas you find useful. Try not to get hung up on the labels."
- Jonathan S. Shapiro



Re: On copyright

2002-09-05 Thread John Levon

On Thu, Sep 05, 2002 at 06:37:07PM +0200, Lars Gullik Bjønnes wrote:

> Yes we do.

*SQUEEEAK*

Ah well.

john

-- 
"Take the ideas you find useful. Try not to get hung up on the labels."
- Jonathan S. Shapiro



Re: On copyright

2002-09-05 Thread Lars Gullik Bjønnes

John Levon <[EMAIL PROTECTED]> writes:

| On Thu, Sep 05, 2002 at 04:21:39PM +0100, Angus Leeming wrote:
| 
| > "Full author contact details available in file CREDITS"
| 
| Do we really need that line everywhere ? People aren't morons
| ...

Stop those piggish sounds.

Yes we do.

-- 
Lgb



Re: Fixing the preview crash when there are more than 999 (!) formulae

2002-09-05 Thread Kuba Ober

On środa 04 wrzesień 2002 09:44 am, John Levon wrote:
> On Wed, Sep 04, 2002 at 09:40:54AM -0400, Kuba Ober wrote:
> > We're talking about humans. Human life time expectation stays fixed when
>
> This is not entirely clear, given some of the work going on in the
> investigation of the aging process. It's entirely conceivable that some
> of us alive today may live "forever".

I guess beliefs are like tastes: one does not discuss them ;-)

I can understand people who believe that believing in God is a good thing, but 
people who believe that living forever is good... :- Ah well, you didn't 
say explicitly you believe it's good, just that it's conceivable that some of 
us may live forever. You're spared ;-)

> And then they will no doubt be infuriated by the incapacity to handle
> 10^12 equations previewed !

Which basically means that you need expect us to have terabyte hard drives on 
our desks in next 3 years or so, with a clear road to what --- maybe exabyte 
-- already plotted ;- Unless we go for a binary, compressed lyx 
format ;-)) Alas, terabyte may be quite within reach in 3 years ;- 
Probably on notebooks within 5 years or so. And the then-current windows 
version will probably take 10 gigs after installation, plus additional two 
for setup temp files :-

Okay. That would be fun if we were drinking beer and having fun in a pub. Now 
I look like talking to myself. Does any of you plan on visiting Ohio? For 
next 9.5 months (at least ;-) I'm guaranteed to have the second room in our 
flat still empty, so if somebody takes up on the invitation, there will be 
more money for beer (whatever you save on the hotel :-).

Cheers, Kuba Ober



Re: On copyright

2002-09-05 Thread John Levon

On Thu, Sep 05, 2002 at 04:21:39PM +0100, Angus Leeming wrote:

>   "Full author contact details available in file CREDITS"

Do we really need that line everywhere ? People aren't morons
...

regards
john
-- 
"Take the ideas you find useful. Try not to get hung up on the labels."
- Jonathan S. Shapiro



Re: On copyright

2002-09-05 Thread Angus Leeming

On Thursday 05 September 2002 3:47 pm, Angus Leeming wrote:
> On Thursday 05 September 2002 3:58 pm, Lars Gullik Bjønnes wrote:
> > | // This file is part of LyX, the document processor.
> > | // Licence details can be found in the file COPYING.
> > |
> > | I think that that cuts it don't you? At least it describes /why/ anyone
> > | would want to read COPYING.
> >
> > Yes, let's do this. I guess this is the most we can reach consensus
> > on...
>
> Modified script is attached.

If you want to see some scary sed, then this was posted to the sed users 
list. It is a reply to my question asking how to add that line
"Full author contact details available in file CREDITS"
after the last occurance of \author

/\\author/ !{
x
/\\author/ i\
 *\
 * Full author ...
x
}
h

The idea is that we on every lap save the line in the hold buffer.
Then we first match a pattern matching the block end-condition, and
then match the block condition before we insert anything. This is a
more general way to do something after a block.


This is in comparison to my hack (below). Ain't some things amazing?
Angus

# extract the number of the last \author line
LINES=`grep -n '[\]author' ${FILE}`
STATUS=$?
EXISTSALREADY=`grep 'Full author contact details' ${FILE}`
if [ ${STATUS} -eq 0 -a $? -ne 0 ]; then
LINES=`echo "${LINES}" | sed 's/\([0-9]*\):\(.*\)/\1/'`
LINE=`echo "${LINES}" | sed '$ !d'`
APPENDSCRIPT
fi

APPENDSCRIPT () {
# Must define ${SED} and ${LINE} in the main body of the script
cat - >> ${SED} <


Re: WEIRD problem

2002-09-05 Thread José Abílio Oliveira Matos

On Thursday 05 September 2002 16:30, John Levon wrote:
>
> Any ideas ??

  Since you are using linux (I think) why not locate?

  locate newfile2.lyx

  You should not have so many hits. :-)

> regards
> john

-- 
José Abílio



[PATCH] Re: Vertical spacing below/above paragraphs

2002-09-05 Thread John Levon

On Thu, Sep 05, 2002 at 04:01:27PM +0100, John Levon wrote:

> Not hard. However I'd rather not do so in 1.2.x (we still are
> miscalculating its on screen height I believe already).

Here's the patch, but it doesn't work.

john

Index: text.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text.C,v
retrieving revision 1.273
diff -u -r1.273 text.C
--- text.C  21 Aug 2002 17:35:22 -  1.273
+++ text.C  5 Sep 2002 15:31:22 -
@@ -3245,10 +3245,6 @@
int const arrow_size = 4;
int const space_size = int(vsp.inPixels(bv));
 
-   if (vsp.kind() != VSpace::LENGTH) {
-   return space_size;
-   }
-
LyXFont font;
font.decSize();
int const min_size = max(3 * arrow_size,
@@ -3275,10 +3271,11 @@
int ty1, ty2;
// y-values for bottom arrow
int by1, by2;
+ 
+   str = prefix + " (" + vsp.asLyXCommand() + ")";
+ 
switch (vsp.kind()) {
-   case VSpace::LENGTH:
-   {
-   str = prefix + " (" + vsp.asLyXCommand() + ")";
+   case VSpace::LENGTH: {
// adding or removing space
bool const added = !(vsp.length().len().value() < 0.0);
ty1 = added ? (start + arrow_size) : start;
@@ -3287,14 +3284,10 @@
by2 = added ? end : (end - arrow_size);
break;
}
-   case VSpace:: VFILL:
-   str = prefix + " (vertical fill)";
+   default:
ty1 = ty2 = start;
by1 = by2 = end;
break;
-   default:
-   // nothing to draw here
-   return size;
}
 
int const leftx = p.xo + leftMargin(p.bv, p.row);
@@ -3314,6 +3307,9 @@
 start + ((end - start) / 2) + d,
 str, font);
 
+   if (vsp.kind() != VSpace::LENGTH)
+   return size;
+ 
// top arrow
p.pain->line(leftx, ty1, midx, ty2, LColor::added_space);
p.pain->line(midx, ty2, rightx, ty1, LColor::added_space);

-- 
"Take the ideas you find useful. Try not to get hung up on the labels."
- Jonathan S. Shapiro



WEIRD problem

2002-09-05 Thread John Levon


I start a new lyx, then press ctrl-N. newfile1.lyx already exists, so
the new filename newfile2.lyx is chosen, and the file opens. Only thing
is, it opens an EXISTING file that isn't there !

moz src 163 pwd
/home/moz/src/lyx/lyx-devel/src
moz src 164 ls -l new*
-rw-rw-r--1 moz  moz   821 Sep  2 13:04 newfile1.lyx

And it finds the newfile2.lyx from somewhere. I don't even know where !

Any ideas ??

regards
john

-- 
"Take the ideas you find useful. Try not to get hung up on the labels."
- Jonathan S. Shapiro



Re: Patch ignored :( (Juergen V)

2002-09-05 Thread Juergen Vigna

Alain Castera wrote:
> Hi Juergen.

Hi Alain!

> Here's the beast. Shall I post it to bugzilla too ?
> 
> Thank's to you and Lars for the help in compiling.
> 
> Note  : I changed 2 more files, lyx_sty.C and lyx_sty.h , in order to
> redefine tabularnewline only once.
> 
> Have fun ;-)

Ok I patched the local version and am ready to commit.
I will commit tomorrow morning if noone objects.

  Jug

-- 
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._
Dr. Jürgen VignaE-Mail:  [EMAIL PROTECTED]
Mitterstrich 151/A  Tel/Fax: +39-0471-450260 / +39-0471-450253
I-39050 SteineggWeb: http://www.lyx.org/~jug
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._




Re: On copyright

2002-09-05 Thread Angus Leeming

On Thursday 05 September 2002 3:58 pm, Lars Gullik Bjønnes wrote:
> | // This file is part of LyX, the document processor.
> | // Licence details can be found in the file COPYING.
> |
> | I think that that cuts it don't you? At least it describes /why/ anyone
> | would want to read COPYING.
>
> Yes, let's do this. I guess this is the most we can reach consensus
> on...

Modified script is attached.

All files in src/frontends, src/frontends/controllers, src/frontends/xforms 
and src/graphics have been done.

Angus


rmcopyright.sh
Description: application/shellscript


Re: qt problems

2002-09-05 Thread John Levon

On Thu, Sep 05, 2002 at 04:57:10PM +0200, Juergen Vigna wrote:

> John Levon wrote:
> >john (never going to the pub again)
> 
> Ha! That's just now, in half a day you will forget about this
> strange idea of yours #:O)

One day actually ... it is nearly Friday ...

john

-- 
"Take the ideas you find useful. Try not to get hung up on the labels."
- Jonathan S. Shapiro



Re: Vertical spacing below/above paragraphs

2002-09-05 Thread John Levon

On Thu, Sep 05, 2002 at 03:49:38PM +0200, [EMAIL PROTECTED] wrote:

> Question: How difficult would it be to write the word 
> "small/medium/bigskip"  on screen just like it happens for fixed
> spacing?

Not hard. However I'd rather not do so in 1.2.x (we still are
miscalculating its on screen height I believe already).

The only tricky bit is to make sure we calculate its height correctly.

regards
john

-- 
"Take the ideas you find useful. Try not to get hung up on the labels."
- Jonathan S. Shapiro



Re: On copyright

2002-09-05 Thread Lars Gullik Bjønnes

Angus Leeming <[EMAIL PROTECTED]> writes:

| On Thursday 05 September 2002 3:50 pm, John Levon wrote:
| > On Thu, Sep 05, 2002 at 01:24:53PM +0100, José Abílio Oliveira Matos wrote:
| > >   This note can be anywhere in the file, the most usual options are begin
| > > and end. Also you should note that this is standard.
| >
| > That's how I navigate. If this yuck gets done I suppose I shall have to
| > teach vim how to fold it away (assuming it can).
| >
| > btw, the blurb you show is wrong - we grant additional rights.
| 
| I've altered the shell scripts that generate the form_xyz.[Ch] files to output
| 
| // This file is part of LyX, the document processor.
| // Licence details can be found in the file COPYING.
| 
| I think that that cuts it don't you? At least it describes /why/ anyone would 
| want to read COPYING.

Yes, let's do this. I guess this is the most we can reach consensus
on...

-- 
Lgb



Re: qt problems

2002-09-05 Thread Juergen Vigna

John Levon wrote:
> john (never going to the pub again)

Ha! That's just now, in half a day you will forget about this
strange idea of yours #:O)

Jug

-- 
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._
Dr. Jürgen VignaE-Mail:  [EMAIL PROTECTED]
Mitterstrich 151/A  Tel/Fax: +39-0471-450260 / +39-0471-450253
I-39050 SteineggWeb: http://www.lyx.org/~jug
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._




Re: On copyright

2002-09-05 Thread Lars Gullik Bjønnes

John Levon <[EMAIL PROTECTED]> writes:

| btw, the blurb you show is wrong - we grant additional rights.

Not that again...

-- 
Lgb



Re: On copyright

2002-09-05 Thread Angus Leeming

On Thursday 05 September 2002 3:50 pm, John Levon wrote:
> On Thu, Sep 05, 2002 at 01:24:53PM +0100, José Abílio Oliveira Matos wrote:
> >   This note can be anywhere in the file, the most usual options are begin
> > and end. Also you should note that this is standard.
>
> That's how I navigate. If this yuck gets done I suppose I shall have to
> teach vim how to fold it away (assuming it can).
>
> btw, the blurb you show is wrong - we grant additional rights.

I've altered the shell scripts that generate the form_xyz.[Ch] files to output

// This file is part of LyX, the document processor.
// Licence details can be found in the file COPYING.

I think that that cuts it don't you? At least it describes /why/ anyone would 
want to read COPYING.

Angus



Re: Forked call crashes

2002-09-05 Thread John Levon

On Wed, Sep 04, 2002 at 06:34:40PM +0100, Angus Leeming wrote:

> sometimes the thing that dies is LyX, sometimes its just the daughter process 
> (as in this case). Can we do anything to make things more robust?

Sure  - find the bug :)

No, I don't know whewre to start looking
regards
john

-- 
"Take the ideas you find useful. Try not to get hung up on the labels."
- Jonathan S. Shapiro



Re: On copyright

2002-09-05 Thread John Levon

On Thu, Sep 05, 2002 at 01:24:53PM +0100, José Abílio Oliveira Matos wrote:

>   This note can be anywhere in the file, the most usual options are begin and 
> end. Also you should note that this is standard.

That's how I navigate. If this yuck gets done I suppose I shall have to
teach vim how to fold it away (assuming it can).

btw, the blurb you show is wrong - we grant additional rights.

regards
john

-- 
"Take the ideas you find useful. Try not to get hung up on the labels."
- Jonathan S. Shapiro



Re: On copyright

2002-09-05 Thread Lars Gullik Bjønnes

Angus Leeming <[EMAIL PROTECTED]> writes:

| On Thursday 05 September 2002 3:38 pm, Lars Gullik Bjønnes wrote:
| 
| > On occasion it might be nice to do as other gpl projects too...
| 
| You mean like using politically correct GUI toolkits ?

And we are now, aren't we? 
(if we only could get the gtk port going...)

-- 
Lgb



Re: On copyright

2002-09-05 Thread John Levon

On Thu, Sep 05, 2002 at 02:59:18PM +0100, Angus Leeming wrote:

>   This file is part of LyX, the document processor.
>   It is GPL-ed code. 

Not true. Like I said, you'll need lines and lines.

>   See the file COPYING

This is more than enough (i.e. what we have already)

/**
 * \file mutt-mrtall-94664-120
 * Read the file COPYING
 *
 * \author John Levon
 */

I definitely think this is best. (btw, I would encourage people to add
text in that header to say what the file is *for* if needed).

regards
john

-- 
"Take the ideas you find useful. Try not to get hung up on the labels."
- Jonathan S. Shapiro



Re: qt problems

2002-09-05 Thread Lars Gullik Bjønnes

John Levon <[EMAIL PROTECTED]> writes:

| On Wed, Sep 04, 2002 at 05:34:19PM +0200, Lars Gullik Bjønnes wrote:
| 
| > | > Load the UserGuide and scroll down with "arrow down"-key.
| > | 
| > | I do, and there's a bug on it. It causes some minor cursor droppings.
| > | This is "severe" and "unusable" ?? We must be seeing different problems.
| > 
| > Yes, what I saw was complete garbling of half and more of the screen.
| 
| Oh can I have a screenshot then please ? I don't know what could cause
| this.
| 
| > | Right but it goes through all the Qt code.
| > 
| > So it is Qts problem then?
| 
| I believe Qt will be behaving to spec ...

Something isn't.

It is mostlikely one of four things:
- xforms
- qt
- lyx xforms gui
- lyx qt gui

and we need to figure it out.

-- 
Lgb



Re: On copyright

2002-09-05 Thread John Levon

On Thu, Sep 05, 2002 at 04:22:23PM +0200, Lars Gullik Bjønnes wrote:

> So that a file taken out of context (i.e. lyx) still has the license
> information.

Please tell me you don't want 30 lines of license information in every
file like Mozilla or something.

The rreference to COPYING is fine.

regards
john
-- 
"Take the ideas you find useful. Try not to get hung up on the labels."
- Jonathan S. Shapiro



Re: On copyright

2002-09-05 Thread Angus Leeming

On Thursday 05 September 2002 3:38 pm, Lars Gullik Bjønnes wrote:

> On occasion it might be nice to do as other gpl projects too...

You mean like using politically correct GUI toolkits ?



Re: On copyright

2002-09-05 Thread Lars Gullik Bjønnes

Angus Leeming <[EMAIL PROTECTED]> writes:

| On Thursday 05 September 2002 3:22 pm, Lars Gullik Bjønnes wrote:
| > Angus Leeming <[EMAIL PROTECTED]> writes:
| > | On Thursday 05 September 2002 3:12 pm, José Abílio Oliveira Matos wrote:
| > | > On Thursday 05 September 2002 15:00, Lars Gullik Bjønnes wrote:
| > | > > Hmm da hmm I have some counters stuff to look at first,
| > | > > but after that... please somebody beat me to it...
| > | >
| > | >   Should we replace the COPYING reference with the explicit note?
| > |
| > | Well it's dead easy to do: just modify the script. But personally I quite
| > | like the fact that all this copyright notice stuff is in one place too.
| > |
| > | My philosophy is, we try not to replicate code unnecessarily, so why
| > | replicate blurb?
| >
| > So that a file taken out of context (i.e. lyx) still has the license
| > information.
| 
| Then add a line from the old style headers:
|   This file is part of LyX, the document processor.
|   It is GPL-ed code. 
|   See the file COPYING or www.lyx.org/COPYING for details

On occasion it might be nice to do as other gpl projects too...

-- 
Lgb



Re: qt problems

2002-09-05 Thread John Levon

On Wed, Sep 04, 2002 at 05:31:44PM +0200, Lars Gullik Bjønnes wrote:

> | | What ?? I don't know any problems THIS bad. Screenshots + recipes
> | | please.
> | 
> | Load the UserGuide and scroll down with "arrow down"-key.
> 
> Somehow this just went away... could have been a faulty build on my
> part.

Glad to have helped to fix it :)

john (never going to the pub again)

-- 
"Take the ideas you find useful. Try not to get hung up on the labels."
- Jonathan S. Shapiro



Re: qt problems

2002-09-05 Thread John Levon

On Wed, Sep 04, 2002 at 05:34:19PM +0200, Lars Gullik Bjønnes wrote:

> | > Load the UserGuide and scroll down with "arrow down"-key.
> | 
> | I do, and there's a bug on it. It causes some minor cursor droppings.
> | This is "severe" and "unusable" ?? We must be seeing different problems.
> 
> Yes, what I saw was complete garbling of half and more of the screen.

Oh can I have a screenshot then please ? I don't know what could cause
this.

> | Right but it goes through all the Qt code.
> 
> So it is Qts problem then?

I believe Qt will be behaving to spec ...

regards
john
-- 
"Take the ideas you find useful. Try not to get hung up on the labels."
- Jonathan S. Shapiro



Re: Help: GraphicCache - reload graphic file

2002-09-05 Thread Angus Leeming

On Thursday 05 September 2002 1:04 pm, Jean-Marc Lasgouttes wrote:
> Marco Morandini wrote:
> > Jean-Marc Lasgouttes wrote:
> >> I would certainly like to have something like that in 1.2.2, since
> >> several people have complained about it already.  However, Angus, I
> >> would appreciate if you could read it and see if you find no
> >> obvious error.
> >>
> >> Marco, I assume you have tested it hard :) Could you try to run under
> >> valgring, just to make sure nothing wrong happens? Also, a ChangeLog
> >> entry would be great.
> >>
> >> JMarc
> >
> > I think that in its current shape the patch is broken :(
> > Perhaps my mail was not clear.
>
> No, it is just that I do not have much time for reading mail and
> mis-read yours... Hopefully Angus will be able to tell you what is
> wrong there.

There are two problems to address.
1. Updating the image on screen. 

I think you should just use the FileMonitor.[Ch] files that we use in 
1.3.0cvs because I know that they work and they're a clean and minimal 
solution. I attach them for your perusal. You'll have to replace the 
boost::signal stuff with its SigC::signal equivalent but that's trivial and I 
can definitely help you there if you get stuck.
You'll then just need to add a FileMonitor instance to GraphicsCacheItem, 
connect to the signal and start it off. Same as is done in the 1.3.0cvs code.

2. Re-running latex.

The latex compiler is activated only if the checksum of the .tex file has 
changed. Changes to included files are not taken into account. I have no real 
ideas about how to fix this properly.

Regards,
Angus


// -*- C++ -*-
/*
 * \file FileMonitor.h
 * Copyright 2002 the LyX Team
 * Read the file COPYING
 *
 * \author Angus Leeming <[EMAIL PROTECTED]>
 *
 * FileMonitor monitors a file and informs a listener when that file has
 * changed.
 */

#ifndef FILEMONITOR_H
#define FILEMONITOR_H

#ifdef __GNUG__
#pragma interface
#endif

#include "LString.h"

#include 
#include 
#include 

class FileMonitor : boost::noncopyable {
public:
	/** Once monitoring begins, the file will be monitored every
	 *  interval ms.
	 */
	FileMonitor(string const & file_with_path, int interval);

	/// Define an empty d-tor out-of-line to keep boost::scoped_ptr happy.
	~FileMonitor();

	///
	void reset(string const & file_with_path) const;

	///
	string const & filename() const;

	/// Begin monitoring the file
	void start() const;
	///
	void stop() const;
	///
	bool monitoring() const;

	/** The checksum is recomputed whenever the file is modified.
	 *  If the file is not being monitored, then the checksum will be
	 *  recomputed each time this function is called.
	 */
	unsigned long checksum() const;

	/// Connect and you'll be informed when the file has changed.
	typedef boost::signal0::slot_type slot_type;
	///
	boost::signals::connection connect(slot_type const &) const;

private:
	/// Use the Pimpl idiom to hide the internals.
	class Impl;

	/// The pointer never changes although *pimpl_'s contents may.
	boost::scoped_ptr const pimpl_;
};

#endif // FILEMONITOR_H


/*
 * \file FileMonitor.C
 * Copyright 2002 the LyX Team
 * Read the file COPYING
 *
 * \author Angus Leeming <[EMAIL PROTECTED]>
 */

#include 

#ifdef __GNUG__
#pragma implementation
#endif

#include "FileMonitor.h"

#include "frontends/Timeout.h"

#include "support/FileInfo.h"
#include "support/lyxlib.h"

#include 
#include 

struct FileMonitor::Impl : public boost::signals::trackable {

	///
	Impl(string const & file_with_path, int interval);

	///
	void monitorFile();

	///
	string filename_;

	///
	Timeout timer_;

	/// This signal is emitted if the file is modified (has a new checksum).
	boost::signal0 fileChanged_;

	/** We use these to ascertain whether a file (once loaded successfully)
	 *  has changed.
	 */
	time_t timestamp_;
	///
	unsigned long checksum_;
};


FileMonitor::FileMonitor(string const & file_with_path, int interval)
	: pimpl_(new Impl(file_with_path, interval))
{}


FileMonitor::~FileMonitor()
{}


void FileMonitor::reset(string const & file_with_path) const
{
	if (pimpl_->filename_ == file_with_path)
		return;

	bool const monitor = pimpl_->timer_.running();
	if (monitor)
		stop();
	
	pimpl_->filename_ = file_with_path;

	if (monitor)
		start();
}


string const & FileMonitor::filename() const
{
	return pimpl_->filename_;
}


void FileMonitor::start() const
{
	if (monitoring())
		return;

	FileInfo finfo(pimpl_->filename_);
	if (!finfo.isOK())
		return;

	pimpl_->timestamp_ = finfo.getModificationTime();
	pimpl_->checksum_ = lyx::sum(pimpl_->filename_);

	if (pimpl_->timestamp_ && pimpl_->checksum_) {
		pimpl_->timer_.start();
	} else {
		pimpl_->timestamp_ = 0;
		pimpl_->checksum_ = 0;
	}
}


void FileMonitor::stop() const
{
	pimpl_->timestamp_ = 0;
	pimpl_->checksum_ = 0;
	pimpl_->timer_.stop();
}


bool FileMonitor::monitoring() const
{
	return pimpl_->timer_.running();
}


unsigned long FileMonitor::checksum() const
{
	// If we aren't actively monitoring the file, then r

Re: On copyright

2002-09-05 Thread Angus Leeming

On Thursday 05 September 2002 3:22 pm, Lars Gullik Bjønnes wrote:
> Angus Leeming <[EMAIL PROTECTED]> writes:
> | On Thursday 05 September 2002 3:12 pm, José Abílio Oliveira Matos wrote:
> | > On Thursday 05 September 2002 15:00, Lars Gullik Bjønnes wrote:
> | > > Hmm da hmm I have some counters stuff to look at first,
> | > > but after that... please somebody beat me to it...
> | >
> | >   Should we replace the COPYING reference with the explicit note?
> |
> | Well it's dead easy to do: just modify the script. But personally I quite
> | like the fact that all this copyright notice stuff is in one place too.
> |
> | My philosophy is, we try not to replicate code unnecessarily, so why
> | replicate blurb?
>
> So that a file taken out of context (i.e. lyx) still has the license
> information.

Then add a line from the old style headers:
This file is part of LyX, the document processor.
It is GPL-ed code. 
See the file COPYING or www.lyx.org/COPYING for details

Angus



Re: On copyright

2002-09-05 Thread Lars Gullik Bjønnes

Angus Leeming <[EMAIL PROTECTED]> writes:

| On Thursday 05 September 2002 3:12 pm, José Abílio Oliveira Matos wrote:
| > On Thursday 05 September 2002 15:00, Lars Gullik Bjønnes wrote:
| > > Hmm da hmm I have some counters stuff to look at first,
| > > but after that... please somebody beat me to it...
| >
| >   Should we replace the COPYING reference with the explicit note?
| 
| Well it's dead easy to do: just modify the script. But personally I quite 
| like the fact that all this copyright notice stuff is in one place too.
| 
| My philosophy is, we try not to replicate code unnecessarily, so why 
| replicate blurb?

So that a file taken out of context (i.e. lyx) still has the license
information.

-- 
Lgb





Re: On copyright

2002-09-05 Thread Lars Gullik Bjønnes

José Abílio Oliveira Matos <[EMAIL PROTECTED]> writes:

| On Thursday 05 September 2002 15:00, Lars Gullik Bjønnes wrote:
| >
| > Hmm da hmm I have some counters stuff to look at first,
| > but after that... please somebody beat me to it...
| 
|   Should we replace the COPYING reference with the explicit note?

Not yet... let's try to reach consensus on that first.

-- 
Lgb



Re: On copyright

2002-09-05 Thread Angus Leeming

On Thursday 05 September 2002 3:12 pm, José Abílio Oliveira Matos wrote:
> On Thursday 05 September 2002 15:00, Lars Gullik Bjønnes wrote:
> > Hmm da hmm I have some counters stuff to look at first,
> > but after that... please somebody beat me to it...
>
>   Should we replace the COPYING reference with the explicit note?

Well it's dead easy to do: just modify the script. But personally I quite 
like the fact that all this copyright notice stuff is in one place too.

My philosophy is, we try not to replicate code unnecessarily, so why 
replicate blurb?

Angus



Re: On copyright

2002-09-05 Thread José Abílio Oliveira Matos

On Thursday 05 September 2002 15:00, Lars Gullik Bjønnes wrote:
>
> Hmm da hmm I have some counters stuff to look at first,
> but after that... please somebody beat me to it...

  Should we replace the COPYING reference with the explicit note?
-- 
José Abílio



Re: On copyright

2002-09-05 Thread Lars Gullik Bjønnes

Angus Leeming <[EMAIL PROTECTED]> writes:

| Ok, I've "done" all files in the src/graphics, src/frontends/controllers and 
| src/frontends/xforms dirs. That includes moving all old style headers to the 
| new style. (I think.)

Ok, thanks.
 
| I added an "author unknown" entry to any file that did not have an author 
| listed.

Ok.
 
| I reckon that I've "done my bit" on this front and am now very bored of it. 
| Feel free to continue.

Hmm da hmm I have some counters stuff to look at first,
but after that... please somebody beat me to it...
 
-- 
Lgb



Re: On copyright

2002-09-05 Thread Angus Leeming

Ok, I've "done" all files in the src/graphics, src/frontends/controllers and 
src/frontends/xforms dirs. That includes moving all old style headers to the 
new style. (I think.)

I added an "author unknown" entry to any file that did not have an author 
listed.

I reckon that I've "done my bit" on this front and am now very bored of it. 
Feel free to continue.

Angus

ps the script got a bit more robust. I attach it should anyone else like to 
have a go.



rmcopyright.sh
Description: application/shellscript


Vertical spacing below/above paragraphs

2002-09-05 Thread michael . schmitt

Hello,

here comes a feature request for 1.3.0 and 1.2.2 :-)

When you use an absolute spacing below/above a paragraph, 
the amount of spacing (i.e. the measure) is printed explicitly on
screen.

On the other hand, no text is printed for small/medium/bigskipamounts.
Recently, I ran into a tricky formatting problem that was caused
by the fact that there was a bigskip below a paragraph. (I copied
the paragraph from a distant place and forgot to check spacing).
On screen it was not obvious that there was a spacing at all! 

Question: How difficult would it be to write the word 
"small/medium/bigskip"  on screen just like it happens for fixed
spacing?
I can imagine this even simplifies the code (treat everything the same).

Michael



Re: Simplify counter code (Was: Floats in layout files)

2002-09-05 Thread Lars Gullik Bjønnes

Martin Vermeer <[EMAIL PROTECTED]> writes:

| On Thu, Sep 05, 2002 at 01:51:46PM +0200, Lars Gullik Bjønnes wrote:
|  
| > Ok, thanks.
| > 
| > How do this patch look to you then?
| 
| Good... but you need to add algorithm (and plate, planotable) to the 
| list in Counters if you want these to work currently. I suspect you want
| to get rid of this altogether. Good.

Yes.
but I should add algorithm now, that missing was a bug.

| > My way forward is to let the Style(s) in layoutfiles actually do
| > the counter creation. I am not quite sure how this will look yet, but
| > there might be a notion of Counter-Types.
| 
| Yes... that means that the counter array would be a member of ??? (that's 
| where I suddenly felt very very lonely) instead of the buffer. No problem... 
| the array is only used during the (re-) building of the numerical label 
| strings containing the counters. You actually need only one during the
| life of LyX so it could even be static.

yes... but I guess it will just be easier to add a Counters object to
the lyxtextclass, and just copy or loan perhaps... hmmm there are
some alternatives here. I'll probably go for the minimalistic
solution.

With how we use counters in lyx currently I guess that is to move the
counters object to the lyxtextclass. And just loan that to get the
labels right when needed. (unless we begin thinking concurrency of
course...)


| > Especially the enumeration counters give me a git of a head ache... it
| > can perhaps be a "enum" type of counter that changes behaviour
| > depending on depth.
| 
| When we go to André's enum insets (or env-insets) I expect that these will 
| have to have their own version of setCounter and updateCounters, acting only 
| on their own counters. You may want to co-ordinate with that work.

Yes, but I am not really sure that this is being worked on currently.

| For now
| the current stuff works, although having the names of the enum levels
| hardwired in three different places makes my toes curl.

Mine too, with claws out, and it hurts.

-- 
Lgb



Re: Simplify counter code (Was: Floats in layout files)

2002-09-05 Thread Martin Vermeer

On Thu, Sep 05, 2002 at 01:51:46PM +0200, Lars Gullik Bjønnes wrote:
 
> Ok, thanks.
> 
> How do this patch look to you then?

Good... but you need to add algorithm (and plate, planotable) to the 
list in Counters if you want these to work currently. I suspect you want
to get rid of this altogether. Good.
 
> My way forward is to let the Style(s) in layoutfiles actually do
> the counter creation. I am not quite sure how this will look yet, but
> there might be a notion of Counter-Types.

Yes... that means that the counter array would be a member of ??? (that's 
where I suddenly felt very very lonely) instead of the buffer. No problem... 
the array is only used during the (re-) building of the numerical label 
strings containing the counters. You actually need only one during the
life of LyX so it could even be static.

> Especially the enumeration counters give me a git of a head ache... it
> can perhaps be a "enum" type of counter that changes behaviour
> depending on depth.

When we go to André's enum insets (or env-insets) I expect that these will 
have to have their own version of setCounter and updateCounters, acting only 
on their own counters. You may want to co-ordinate with that work. For now
the current stuff works, although having the names of the enum levels
hardwired in three different places makes my toes curl.

> 
> -- 
>   Lgb


Martin




msg44099/pgp0.pgp
Description: PGP signature


Re: On copyright

2002-09-05 Thread Lars Gullik Bjønnes

José Abílio Oliveira Matos <[EMAIL PROTECTED]> writes:


|   Since that is your code I think that you can, that change doesn't apply to 
| older versions.

I cannot give up rights.

-- 
Lgb



Re: On copyright

2002-09-05 Thread José Abílio Oliveira Matos

On Thursday 05 September 2002 12:30, Lars Gullik Bjønnes wrote:
> |   Why not to replace "Read the file COPYING" with the following?
>
> I kindo like this too, but it is a farily large blurb.
> (I do not buy any size arguments as in bits and bytes)

  This note can be anywhere in the file, the most usual options are begin and 
end. Also you should note that this is standard.

> Oh, we can just take owership of public domain and release them as
> GPL. (or isn't that allowed? on another note: Public domain is not
> legal in norway since you cannot give up your copyright)

  Since that is your code I think that you can, that change doesn't apply to 
older versions.

-- 
José Abílio



Re: Help: GraphicCache - reload graphic file

2002-09-05 Thread Jean-Marc Lasgouttes

Marco Morandini wrote:
> Jean-Marc Lasgouttes wrote:
> 
>>
>> I would certainly like to have something like that in 1.2.2, since
>> several people have complained about it already.  However, Angus, I
>> would appreciate if you could read it and see if you find no
>> obvious error.
>>
>> Marco, I assume you have tested it hard :) Could you try to run under
>> valgring, just to make sure nothing wrong happens? Also, a ChangeLog
>> entry would be great.
>>
>> JMarc
> 
> 
> I think that in its current shape the patch is broken :(
> Perhaps my mail was not clear.
> 

No, it is just that I do not have much time for reading mail and
mis-read yours... Hopefully Angus will be able to tell you what is
wrong there.

JMarc





Simplify counter code (Was: Floats in layout files)

2002-09-05 Thread Lars Gullik Bjønnes

Martin Vermeer <[EMAIL PROTECTED]> writes:

| On Thu, Sep 05, 2002 at 12:11:39PM +0300, Martin Vermeer wrote:
| 
| > I suspect that your statement 
| > 
| >  buf->counters().reset("enum");
| > 
| > may be too simple. Remember the non-standard pre-increment :-)
| 
| Do it like this:
| 
| // reset the enumeration counter. They are always resetted
| // when there is any other layout between
| switch (par->enumdepth) {
| case 0:
| buf->counters().reset("enumi");
| case 1:
| buf->counters().reset("enumii");
| case 2:
| buf->counters().reset("enumiii");
| case 3:
| buf->counters().reset("enumiv");
| }
| 
| Verified to work.

Ok, thanks.

How do this patch look to you then?

My way forward is to let the Style(s) in layoutfiles actually do
the counter creation. I am not quite sure how this will look yet, but
there might be a notion of Counter-Types.

Especially the enumeration counters give me a git of a head ache... it
can perhaps be a "enum" type of counter that changes behaviour
depending on depth.
 


Index: src/counters.h
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/counters.h,v
retrieving revision 1.10
diff -u -p -r1.10 counters.h
--- src/counters.h	11 Aug 2002 20:34:20 -	1.10
+++ src/counters.h	5 Sep 2002 11:45:38 -
@@ -20,7 +20,7 @@
 
 #include "LString.h"
 #include 
-#include 
+
 
 /// This represents a single counter.
 class Counter {
@@ -96,10 +96,6 @@ public:
 			string const & labeltype,
 			string const & langtype = "latin",
 			int head = 0);
-	/// Maps numbers to enumeration of sectioning counter name strings.
-	std::vector enums;
-	std::vector sects;
-
 private:
 	/// Maps counter (layout) names to actual counters.
 	typedef std::map CounterList;
Index: src/counters.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/counters.C,v
retrieving revision 1.12
diff -u -p -r1.12 counters.C
--- src/counters.C	12 Aug 2002 20:24:07 -	1.12
+++ src/counters.C	5 Sep 2002 11:45:38 -
@@ -83,30 +83,18 @@ Counters::Counters()
 	newCounter("paragraph", "subsubsection");
 	newCounter("subparagraph", "paragraph");
 
-	sects.push_back("chapter");
-	sects.push_back("section");
-	sects.push_back("subsection");
-	sects.push_back("subsubsection");
-	sects.push_back("paragraph");
-	sects.push_back("subparagraph");
-
 	// Enumeration counters:
 	newCounter("enumi");
 	newCounter("enumii", "enumi");
 	newCounter("enumiii", "enumii");
 	newCounter("enumiv", "enumiii");
 
-	enums.push_back("enumi");
-	enums.push_back("enumii");
-	enums.push_back("enumiii");
-	enums.push_back("enumiv");
-
 	// Biblio:
 	newCounter("bibitem");
 
 	// Float counters:
-	newCounter("Figure");
-	newCounter("Table");
+	newCounter("figure");
+	newCounter("table");
 }
 
 
@@ -295,13 +283,15 @@ string Counters::labelItem(string const 
 			   string const & langtype,
 			   bool first)
 {
-	ostringstream s, o;
+	ostringstream s;
+	ostringstream o;
+
 	CounterList::iterator it = counterList.find(ctr);
 	if (it == counterList.end()) {
 		lyxerr << "Counter does not exist." << endl;
 		return "";
 	}
-	string mstr = it->second.master();
+
 	if (!first) {
 		s << "." << value(ctr);
 	} else {
@@ -344,7 +334,7 @@ string Counters::numberLabel(string cons
 		} else if (ctr == "subparagraph" && head <= 5) {
 			s << numberLabel("paragraph", numbertype, langtype, head)
 			  << labelItem("subparagraph", numbertype, langtype, head == 5);
-		} else if (ctr == "Figure" || ctr == "Table") {
+		} else if (ctr == "figure" || ctr == "table") {
 			// figure, table, ...
 			lyxerr << "Counter:" << ctr << endl;
 			s << numberLabel("chapter", numbertype, langtype, head)
Index: src/text2.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text2.C,v
retrieving revision 1.258
diff -u -p -r1.258 text2.C
--- src/text2.C	29 Aug 2002 12:00:50 -	1.258
+++ src/text2.C	5 Sep 2002 11:45:40 -
@@ -1266,13 +1266,17 @@ void LyXText::setCounter(Buffer const * 
 	if (layout->labeltype >= LABEL_COUNTER_CHAPTER) {
 
 		int i = layout->labeltype - LABEL_COUNTER_CHAPTER;
-		string numbertype, langtype;
+		string numbertype;
+		string langtype;
 		ostringstream s;
 
 		if (i >= 0 && i <= buf->params.secnumdepth) {
 
+#if 0
 			buf->counters().step(buf->counters().sects[i]);
-
+#else
+			buf->counters().step(layout->latexname());
+#endif
 			// Is there a label? Useful for Chapter layout
 			if (!par->params().appendix()) {
 if (!layout->labelstring().empty())
@@ -1298,8 +1302,14 @@ void LyXText::setCounter(Buffer const * 
 	langtype = "latin";
 			}
 
+#if 0
 			s << buf->counters().numberLabel(buf->counters().sects[i],
 numbertype, langtype, head);
+#else
+			s << buf->counters()
+.numberLabel(layou

Re: Floats in layout files

2002-09-05 Thread Lars Gullik Bjønnes

Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:

| Lars Gullik Bjønnes wrote:
| > This is my patch for this.
| > This is basic support, it can be enhanced with, NoFloat, CopyFloat
| > etc. if wanted.
| 
| A question: why have a LyXTextClass readFloat instead of Floating::read?

It was the minimal solution, and had no impact on code outside
lyxtextclass.[Ch] and FloatList.C

| The later could also be used if we decided to save float definitions
| elsewhere.

This is the next step in the feature chain: User definable floats.

I am not prepared to tackle that one for 1.3.0, but that "back-office"
part of it will not be really hard. It is very likely that the layout
parsing code will then be moved, and perhaps also changed slightly.

-- 
Lgb



Re: On copyright

2002-09-05 Thread Lars Gullik Bjønnes

José Abílio Oliveira Matos <[EMAIL PROTECTED]> writes:

|   Why not to replace "Read the file COPYING" with the following?

I kindo like this too, but it is a farily large blurb.

(I do not buy any size arguments as in bits and bytes)

| * This program is free software; you can redistribute it and/or
| * modify it under the terms of the GNU General Public License
| * as published by the Free Software Foundation; either version 2
| * of the License, or (at your option) any later version.
| *
| * This program is distributed in the hope that it will be useful,
| * but WITHOUT ANY WARRANTY; without even the implied warranty of
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
| * GNU General Public License for more details.
| *
| * You should have received a copy of the GNU General Public License
| * along with this program; if not, write to the Free Software
| * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
| 
|   I would add this for most of the files whose license is GPL, we have some 
| files that are in the public domain.

Oh, we can just take owership of public domain and release them as
GPL. (or isn't that allowed? on another note: Public domain is not
legal in norway since you cannot give up your copyright)
 
-- 
Lgb



Re: On copyright

2002-09-05 Thread Angus Leeming

On Thursday 05 September 2002 8:08 am, Lars Gullik Bjønnes wrote:

> | Just so I'm perfectly clear:
> |
> | /*
> |  *  \file PreviewLoader.C
> |  *  Read the file COPYING
> |  *
> |  * \author Angus Leeming
> |  *
> |  * Full author contact details available in file CREDITS
> |  */

The script below will modify existing "new style" headers to the format 
above. I applied it successfully to files in src/graphics.

Angus

#! /bin/sh

for FILE in $*
do
SED=${FILE}.sed
cat - > ${SED} > ${SED} < ${TMP}
rm -f ${SED}

cmp -s ${FILE} ${TMP}
if [ $? -eq 1 ]; then
diff -u ${FILE} ${TMP}
mv -i ${TMP} ${FILE}
fi
rm -f ${TMP}
done



Re: On copyright

2002-09-05 Thread José Abílio Oliveira Matos

On Thursday 05 September 2002 08:18, Lars Gullik Bjønnes wrote:
> You know, this style:
>
>  /*
>  * \file GraphicsCache.C
>  * Copyright 2002 the LyX Team
>  * Read the file COPYING
>  *
>  * \author Baruch Even <[EMAIL PROTECTED]>
>  * \author Angus Leeming <[EMAIL PROTECTED]>
>  */
>
> or a modification on it.

  Why not to replace "Read the file COPYING" with the following?

* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

  I would add this for most of the files whose license is GPL, we have some 
files that are in the public domain.

  This is the scheme that we have now for lyx2lyx and in part for reLyX.

  Also I always thought as bit confusing saying read COPYING, as that file 
doesn't exist in most directories. But maybe it is me. :-)

  Since we are talking about this we could do it in the full extension. :-)
-- 
José Abílio



Re: Patch ignored :( (Juergen V)

2002-09-05 Thread Alain Castera


On Mon, 2 Sep 2002, Juergen Vigna wrote:

> Ok could you send us a new patch on an updated 1.3.0? I will have a look
> at it again and I hope other people will have also. If I don't see any
> grave problems and others agree too we will commit this and fix the WYSIWYM
> later on.


Hi Juergen.

Here's the beast. Shall I post it to bugzilla too ?

Thank's to you and Lars for the help in compiling.

Note  : I changed 2 more files, lyx_sty.C and lyx_sty.h , in order to
redefine tabularnewline only once.

Have fun ;-)

Alain

-- 
 ***
 *Alain Castera*
 * IPNL - UCB Lyon 1 | e-mail : [EMAIL PROTECTED] *
 * Bat. Paul Dirac   |  or[EMAIL PROTECTED] *
 * Campus de la Doua | Telephone : (+33) 472448429 *
 * F69622 Villeurbanne CEDEX | Fax :   (+33) 472448004 *
 ***



tabularPatch.tgz
Description: tar+gzip patch from top directory


Re: Floats in layout files

2002-09-05 Thread Martin Vermeer

On Thu, Sep 05, 2002 at 12:11:39PM +0300, Martin Vermeer wrote:

> I suspect that your statement 
> 
>  buf->counters().reset("enum");
> 
> may be too simple. Remember the non-standard pre-increment :-)

Do it like this:

// reset the enumeration counter. They are always resetted
// when there is any other layout between
switch (par->enumdepth) {
case 0:
buf->counters().reset("enumi");
case 1:
buf->counters().reset("enumii");
case 2:
buf->counters().reset("enumiii");
case 3:
buf->counters().reset("enumiv");
}

Verified to work.

Martin



msg44089/pgp0.pgp
Description: PGP signature


  1   2   >