Re: [PATCH] minor bibitem tweaks

2005-06-06 Thread Juergen Spitzmueller
Martin Vermeer wrote:
 Yes, I know... I can live with this for 1.4.

I'll commit the minimalist version. This is clearly an improvement, everything 
else is ambiguous.

Jürgen


Re: C++ question

2005-06-06 Thread Angus Leeming

Lars Gullik Bjønnes wrote:

| I feel like a bit of an idiot asking this, but what's the C++ way to
| insert some data into an existing file?

How would you do it in any other language?

At end is easy. At start is more tricky...

If it were a memory buffer how would you do it then?
(memmove perhaps?)

You need to use some temporary (file or memory buffer)

Unless you mmap the file, then you might be able to use memmove.


Thanks, Lars. I suspected that was going to be the answer.
Angus




Re: Windows installer --- software probe

2005-06-06 Thread Carl Dr. Kleffner
 --- Ursprüngliche Nachricht ---
 Von: Asger Ottar Alstrup [EMAIL PROTECTED]
 An: unknown
 Kopie: lyx-devel@lists.lyx.org
 Betreff: Re: Windows installer --- software probe
 Datum: Thu, 02 Jun 2005 19:45:06 +0200
 
 One comment:
 
 The reason I did not install minsys was that I did not know which file 
 to download and install. There are listed hundreds on that web-site. 
 Maybe you could list what file the user should grab?
 
 Regards,
 Asger
 

I guess you mean msys - minimal gnu system:
MSYS-1.0.10.exe on http://www.mingw.org/download.shtml

BTW: I'm w/o access to my mailbox until June, 23.

Regards

Carl

-- 
Weitersagen: GMX DSL-Flatrates mit Tempo-Garantie!
Ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl


Re: Windows installer --- software probe

2005-06-06 Thread Angus Leeming

Carl Dr. Kleffner wrote:

One comment:

The reason I did not install minsys was that I did not know which file 
to download and install. There are listed hundreds on that web-site. 
Maybe you could list what file the user should grab?


Regards,
Asger



I guess you mean msys - minimal gnu system:
MSYS-1.0.10.exe on http://www.mingw.org/download.shtml


That's correct. I want the user to grab msys-1.0.x.exe which they can get 
from http://prdownloads.sf.net/mingw/ (the download.shtml page takes you to 
the sf.net pages when you select some file for download.)


I've changed the label on the radio button to:
  Download MinSYS (MSYS-1.0.X.exe)
which I trust will allow the user to grab the correct binary.

Angus



Re: Windows installer --- software probe

2005-06-06 Thread Jean-Marc Lasgouttes
 Angus == Angus Leeming [EMAIL PROTECTED] writes:

Angus Carl Dr. Kleffner wrote:
 One comment:
 
 The reason I did not install minsys was that I did not know which
 file to download and install. There are listed hundreds on that
 web-site. Maybe you could list what file the user should grab?
 
 Regards, Asger

 I guess you mean msys - minimal gnu system: MSYS-1.0.10.exe on
 http://www.mingw.org/download.shtml

Angus That's correct. I want the user to grab msys-1.0.x.exe which
Angus they can get from http://prdownloads.sf.net/mingw/ (the
Angus download.shtml page takes you to the sf.net pages when you
Angus select some file for download.)

What about this instead?
http://sourceforge.net/project/showfiles.php?group_id=2435package_id=82721release_id=158803

I think it is much simpler for newcomers. The only thing I am not sure
about is whether the release_id tag is stable with new versions.

JMarc


Re: Windows installer --- software probe

2005-06-06 Thread Angus Leeming

Jean-Marc Lasgouttes wrote:

What about this instead?
http://sourceforge.net/project/showfiles.php?group_id=2435package_id=82721release_id=158803

I think it is much simpler for newcomers. The only thing I am not sure
about is whether the release_id tag is stable with new versions.


Thanks, Jean-Marc. Let's do this for LyX 1.3.6 anyway. We can always 
reconsider for future releases.


Angus



Re: [PATCH 1.4] de.po update

2005-06-06 Thread Jean-Marc Lasgouttes
 Michael == Michael Schmitt [EMAIL PROTECTED] writes:

Michael Hello, here comes another update for de.po. Please apply.

Done.

JMarc


Re: [Patch] Re: [patch] key event queue

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

| On Wed, Jun 01, 2005 at 03:12:05PM +0300, Martin Vermeer wrote:
 On Wed, Jun 01, 2005 at 01:31:55PM +0200, Lars Gullik Bjønnes wrote:
  Martin Vermeer [EMAIL PROTECTED] writes:

| ...
|   
 OK, that settles it then for me: put in the event queue and reverse the
 new stuff in workAreaKeyPress to a simple showCursor call. Then everything
 will be consistent, if slow.
 
 I verified that this works properly using an old version of your event 
 queue patch: doesn't lose keystrokes (except formally repeated ones), 
 doesn't change their order, and doesn't produce cursor artefacts. 
 
 Please commit your current version.

| Lars?

Please beat me too it...

Too many balls in the air right now...
(send the patch here first, and I'll do a quick review)

-- 
Lgb



Re: [PATCH] Bug 961: reintroduce LFUN_BIBDB_ADD/DEL

2005-06-06 Thread Jean-Marc Lasgouttes
 Juergen == Juergen Spitzmueller [EMAIL PROTECTED] writes:

Juergen Juergen Spitzmueller wrote:
 I'm not even sure I understand what LABEL_GOTO does (or is it
 broken?)

Juergen OK, now I do. This is really odd.

Odd in which sense?

JMarc


Re: [PATCH] Bug 961: reintroduce LFUN_BIBDB_ADD/DEL

2005-06-06 Thread Jean-Marc Lasgouttes
 Juergen == Juergen Spitzmueller [EMAIL PROTECTED] writes:

Juergen Juergen Spitzmueller wrote:
  I'm not even sure I understand what LABEL_GOTO does (or is it
 broken?)
 
 OK, now I do. This is really odd.

Juergen I think this menu entry is extremely irritating. How about
Juergen the following patch, that does enable the entry only when it
Juergen actually makes sense?

Yes, definitely good, although I would write:

+   case LFUN_LABEL_GOTO: {
+   flag.enabled(!cmd.argument.empty()
+   ||getInsetByCodeInsetRef(cursor_, InsetBase::REF_CODE)); 
+   break;

JMarc


Re: Script alternative - Ch

2005-06-06 Thread Jean-Marc Lasgouttes
 Angus == Angus Leeming [EMAIL PROTECTED] writes:

Angus I really don't see why such a mini-dist would be an advantage.
Angus What will happen is what has happened with Ruurd's equivalent
Angus packaging of python. It fails to work as people add more
Angus functionality to the scripts. Moreover, it will become one
Angus more thing to maintain.

It depends on whether we can automate the process, I guess. In this
case it is just a new makefile target.

JMarc



Windows installer finished

2005-06-06 Thread Angus Leeming

Find it at http://www.devel.lyx.org/~leeming/lyx_setup_136.exe
It's 5.9MB in size.
It's fully internationalized although its messages still need to be translated.

If you're interested in doing so, you can grab the source from 
http://www.devel.lyx.org/~leeming/packaging.tar.bz2

It's 82kB in size.

Have a look at installer/lyx_languages/{french,german}.nsh which need 
translated versions of the 53 strings. Adding other languages is 
straightforward.


The archive unpacks to
packaging/
README
clean_dvi.py
package_lyxwin.sh
dtl/
README
Makefile
dt2dv.c
dt2dv.man
dtl.doc
dtl.h
dv2dt.c
dv2dt.man
dvi.doc
edited.txt
example.tex
hello.tex
man2ps
tripvdu.tex
icons/
lyx_32x32_16colors.png
lyx_32x32.png
lyx_doc_32x32_16colors.png
lyx_doc_32x32.png
lyx_doc.svg
lyx.svg
lyx_32x32.ico
lyx_doc_32x32.ico
installer/
lyx_languages/
english.nsh
french.nsh
german.nsh
abi_util_fileassoc.nsh
download.nsh
ioDownload.ini
ioSummary.ini
lyx_installer.nsi
lyx_path_prefix.C
is_user_admin.nsh
lyxfunc.nsh
strtrim.nsh

Angus



Re: Windows installer finished

2005-06-06 Thread Angus Leeming
Angus Leeming wrote:
 The archive unpacks to

I propose to add this tree as-is to development/Win32. OK?
Angus

 packaging/
  README
  clean_dvi.py
  package_lyxwin.sh
  dtl/
  README
  Makefile
  dt2dv.c
  dt2dv.man
  dtl.doc
  dtl.h
  dv2dt.c
  dv2dt.man
  dvi.doc
  edited.txt
  example.tex
  hello.tex
  man2ps
  tripvdu.tex
  icons/
  lyx_32x32_16colors.png
  lyx_32x32.png
  lyx_doc_32x32_16colors.png
  lyx_doc_32x32.png
  lyx_doc.svg
  lyx.svg
  lyx_32x32.ico
  lyx_doc_32x32.ico
  installer/
  lyx_languages/
  english.nsh
  french.nsh
  german.nsh
  abi_util_fileassoc.nsh
  download.nsh
  ioDownload.ini
  ioSummary.ini
  lyx_installer.nsi
  lyx_path_prefix.C
  is_user_admin.nsh
  lyxfunc.nsh
  strtrim.nsh




Re: [Patch] Re: [patch] key event queue

2005-06-06 Thread Martin Vermeer
On Mon, 2005-06-06 at 11:46, Lars Gullik Bjnnes wrote:
 Martin Vermeer [EMAIL PROTECTED] writes:
 
 | On Wed, Jun 01, 2005 at 03:12:05PM +0300, Martin Vermeer wrote:
  On Wed, Jun 01, 2005 at 01:31:55PM +0200, Lars Gullik Bjnnes wrote:
   Martin Vermeer [EMAIL PROTECTED] writes:
 
 | ...
 |   
  OK, that settles it then for me: put in the event queue and reverse the
  new stuff in workAreaKeyPress to a simple showCursor call. Then everything
  will be consistent, if slow.
  
  I verified that this works properly using an old version of your event 
  queue patch: doesn't lose keystrokes (except formally repeated ones), 
  doesn't change their order, and doesn't produce cursor artefacts. 
  
  Please commit your current version.
 
 | Lars?
 
 Please beat me too it...
 
 Too many balls in the air right now...
 (send the patch here first, and I'll do a quick review)

Attached.

- Martin

Index: ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v
retrieving revision 1.2193
diff -u -p -r1.2193 ChangeLog
--- ChangeLog	6 Jun 2005 08:30:19 -	1.2193
+++ ChangeLog	6 Jun 2005 11:53:47 -
@@ -1,3 +1,8 @@
+2005-06-06  Martin Vermeer  [EMAIL PROTECTED]
+
+	* BufferView_pimpl.C: revert to showCursor in connection with
+	Lars's front-end stack
+
 2005-06-06  JSpitzm [EMAIL PROTECTED]
 
 	* text.C (redoParagraph): move cursor right after a bibitem 
Index: BufferView_pimpl.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/BufferView_pimpl.C,v
retrieving revision 1.584
diff -u -p -r1.584 BufferView_pimpl.C
--- BufferView_pimpl.C	31 May 2005 14:40:23 -	1.584
+++ BufferView_pimpl.C	6 Jun 2005 11:53:48 -
@@ -520,12 +520,8 @@ void BufferView::Pimpl::workAreaKeyPress
 	 * of the cursor. Note we cannot do this inside
 	 * dispatch() itself, because that's called recursively.
 	 */
-	if (available()) {
-		screen().prepareCursor();
-		cursor_timeout.setTimeout(100);
-		cursor_timeout.restart();
-		cursor_timeout.setTimeout(400);
-	}
+	if (available())
+		screen().showCursor(*bv_);
 }
 
 
Index: frontends/qt2/ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/ChangeLog,v
retrieving revision 1.789
diff -u -p -r1.789 ChangeLog
--- frontends/qt2/ChangeLog	3 Jun 2005 09:25:45 -	1.789
+++ frontends/qt2/ChangeLog	6 Jun 2005 11:53:48 -
@@ -1,3 +1,10 @@
+2005-06-06  Lars Gullik Bjonnes  [EMAIL PROTECTED]
+	(Committed Martin Vermeer [EMAIL PROTECTED])
+
+	* QContentPane.[Ch]: implement keystroke event stack with
+	repeat key regulation. Key are not sent to LyX core faster
+	than rendering can handle. 
+
 2005-06-03  JSpitzm [EMAIL PROTECTED]
 
 	* QContentPane.[Ch]: Limit the QIM*Events to X11. They are not
Index: frontends/qt2/QContentPane.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/QContentPane.C,v
retrieving revision 1.34
diff -u -p -r1.34 QContentPane.C
--- frontends/qt2/QContentPane.C	3 Jun 2005 09:25:46 -	1.34
+++ frontends/qt2/QContentPane.C	6 Jun 2005 11:53:48 -
@@ -19,7 +19,6 @@
 
 #include qapplication.h
 #include qpainter.h
-#include qtimer.h
 
 #include boost/bind.hpp
 
@@ -90,6 +89,8 @@ QContentPane::QContentPane(QWorkArea * p
 		boost::bind(QContentPane::generateSyntheticMouseEvent,
 			this));
 
+	connect(step_timer_, SIGNAL(timeout()), SLOT(keyeventTimeout()));
+
 	setFocusPolicy(QWidget::WheelFocus);
 	setFocus();
 	setCursor(ibeamCursor);
@@ -101,6 +102,9 @@ QContentPane::QContentPane(QWorkArea * p
 	// stupid moc strikes again
 	connect(wa_-scrollbar_, SIGNAL(valueChanged(int)),
 		this, SLOT(scrollBarChanged(int)));
+
+	// Start the timer, one-shot.
+	step_timer_.start(25, true);
 }
 
 
@@ -251,9 +255,35 @@ void QContentPane::wheelEvent(QWheelEven
 
 void QContentPane::keyPressEvent(QKeyEvent * e)
 {
+	keyeventQueue_.push(boost::shared_ptrQKeyEvent(new QKeyEvent(*e)));
+}
+
+
+void QContentPane::keyeventTimeout()
+{
+	bool handle_autos = true;
+
+	while (!keyeventQueue_.empty()) {
+		boost::shared_ptrQKeyEvent ev = keyeventQueue_.front();
+
+		// We never handle more than one auto repeated
+		// char in a list of queued up events.
+		if (!handle_autos  ev-isAutoRepeat()) {
+			keyeventQueue_.pop();
+			continue;
+		}
+
 	boost::shared_ptrQLyXKeySym sym(new QLyXKeySym);
-	sym-set(e);
-	wa_-workAreaKeyPress(sym, q_key_state(e-state()));
+		sym-set(ev.get());
+
+		wa_-workAreaKeyPress(sym, q_key_state(ev-state()));
+		keyeventQueue_.pop();
+
+		handle_autos = false;
+	}
+
+	// Restart the timer.
+	step_timer_.start(25, true);
 }
 
 
Index: frontends/qt2/QContentPane.h
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/QContentPane.h,v
retrieving revision 1.16
diff -u -p -r1.16 QContentPane.h

Re: [Patch] Re: [patch] key event queue

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

I am fine with this.
(I'd better be...)

-- 
Lgb



[patch] fix bug 1665

2005-06-06 Thread Georg Baum
Attached is a tested, working 1.3 patch that fixes bug 1665, following an
idea of Jean-Marc (see http://bugzilla.lyx.org/show_bug.cgi?id=1665). I
know that this is no crash, but it is very annoying for me (because we
produce many of our documents via commandline export), so I fixed it
nevertheless.
I propose to apply this both to 1.3 and 1.4. OK?


GeorgIndex: src/mathed/ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/ChangeLog,v
retrieving revision 1.299.2.21
diff -u -p -r1.299.2.21 ChangeLog
--- src/mathed/ChangeLog	26 Apr 2005 10:00:58 -	1.299.2.21
+++ src/mathed/ChangeLog	6 Jun 2005 12:06:10 -
@@ -1,3 +1,10 @@
+2005-06-06  Georg Baum  [EMAIL PROTECTED]
+
+	* math_parser.h (latexkeys): new member requires
+	* math_factory.C (initSymbols): fill the requires field for fonts
+	* math_symbolinset.C (validate): use sym_-requires instead of
+	sym_-inset (fixes bug 1665)
+
 2005-04-26  Georg Baum  [EMAIL PROTECTED]
 
 	* math_cursor.C (interpret): treat  as special character (fixes
Index: src/mathed/math_factory.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_factory.C,v
retrieving revision 1.70.2.2
diff -u -p -r1.70.2.2 math_factory.C
--- src/mathed/math_factory.C	7 Dec 2004 10:49:53 -	1.70.2.2
+++ src/mathed/math_factory.C	6 Jun 2005 12:06:11 -
@@ -144,6 +144,12 @@ void initSymbols()
 			// tmp.inset _is_ the fontname here.
 			// create fallbacks if necessary
 
+			// store requirements as long as we can
+			if (tmp.inset == msa || tmp.inset == msb)
+tmp.requires = amssymb;
+			else if (tmp.inset == wasy)
+tmp.requires = wasysym;
+
 			// symbol font is not available sometimes
 			string symbol_font = lyxsymbol;
 
Index: src/mathed/math_parser.h
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_parser.h,v
retrieving revision 1.52.2.1
diff -u -p -r1.52.2.1 math_parser.h
--- src/mathed/math_parser.h	7 Dec 2004 10:50:01 -	1.52.2.1
+++ src/mathed/math_parser.h	6 Jun 2005 12:06:11 -
@@ -39,6 +39,8 @@ struct latexkeys {
 	string extra;
 	/// how is this called as XML entity?
 	string xmlname;
+	/// required LaTeXFeatures
+	string requires;
 };
 
 
Index: src/mathed/math_symbolinset.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_symbolinset.C,v
retrieving revision 1.52.2.4
diff -u -p -r1.52.2.4 math_symbolinset.C
--- src/mathed/math_symbolinset.C	19 Jan 2005 11:46:53 -	1.52.2.4
+++ src/mathed/math_symbolinset.C	6 Jun 2005 12:06:11 -
@@ -122,10 +122,8 @@ bool MathSymbolInset::takesLimits() cons
 
 void MathSymbolInset::validate(LaTeXFeatures  features) const
 {
-	if (sym_-inset == msa || sym_-inset == msb)
-		features.require(amssymb);
-	else if (sym_-inset == wasy)
-		features.require(wasysym);
+	if (!sym_-requires.empty())
+		features.require(sym_-requires);
 }
 
 


Re: Windows installer finished

2005-06-06 Thread Jean-Marc Lasgouttes
 Angus == Angus Leeming [EMAIL PROTECTED] writes:

Angus Angus Leeming wrote:
 The archive unpacks to

Angus I propose to add this tree as-is to development/Win32. 

Be careful with binary status of the files in cvs. Also, binary files
mean that patch-1.3.6 will not work reliably.

JMarc


Re: [patch] fix bug 1665

2005-06-06 Thread Jean-Marc Lasgouttes
 Georg == Georg Baum [EMAIL PROTECTED] writes:

Georg Attached is a tested, working 1.3 patch that fixes bug 1665,
Georg following an idea of Jean-Marc (see
Georg http://bugzilla.lyx.org/show_bug.cgi?id=1665). I know that this
Georg is no crash, but it is very annoying for me (because we produce
Georg many of our documents via commandline export), so I fixed it
Georg nevertheless. I propose to apply this both to 1.3 and 1.4. OK?

This is OK for 1.3.x.

JMarc


Re: [Patch] Re: [patch] key event queue

2005-06-06 Thread Martin Vermeer
On Mon, 2005-06-06 at 15:17, Lars Gullik Bjnnes wrote:
 Martin Vermeer [EMAIL PROTECTED] writes:
 
 I am fine with this.
 (I'd better be...)

Done.

- Martin



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


Re: [PATCH] Bug 961: reintroduce LFUN_BIBDB_ADD/DEL

2005-06-06 Thread Juergen Spitzmueller
Jean-Marc Lasgouttes wrote:
  I'm not even sure I understand what LABEL_GOTO does (or is it
  broken?)

 Juergen OK, now I do. This is really odd.

 Odd in which sense?

Let me put it like this: It's not what I would have expected (though I see its 
use).

Jürgen


Re: Windows installer finished

2005-06-06 Thread Angus Leeming
Jean-Marc Lasgouttes wrote:
 Angus I propose to add this tree as-is to development/Win32.
 
 Be careful with binary status of the files in cvs.

OK, but that warning applies only to these files in the icons directory.
   lyx_32x32_16colors.png
   lyx_32x32.png
   lyx_doc_32x32_16colors.png
   lyx_doc_32x32.png
   lyx_32x32.ico
   lyx_doc_32x32.ico

 Also, binary files mean that patch-1.3.6 will not work reliably.

I don't follow. Could you explain further?

-- 
Angus



Re: Windows installer finished

2005-06-06 Thread Jean-Marc Lasgouttes
 Angus == Angus Leeming [EMAIL PROTECTED] writes:

 Also, binary files mean that patch-1.3.6 will not work reliably.

Angus I don't follow. Could you explain further?

Binary file do not appear in patches. Therefore 
  LyX 1.3.5 + patch-1.3.6 != LyX 1.3.6

JMarc


Re: Windows installer finished

2005-06-06 Thread Lars Gullik Bjønnes
Jean-Marc Lasgouttes [EMAIL PROTECTED] writes:

 Angus == Angus Leeming [EMAIL PROTECTED] writes:

 Also, binary files mean that patch-1.3.6 will not work reliably.

| Angus I don't follow. Could you explain further?

| Binary file do not appear in patches. Therefore 
|   LyX 1.3.5 + patch-1.3.6 != LyX 1.3.6

That would require something like xdelta.

-- 
Lgb



Re: [PATCH] Bug 961: reintroduce LFUN_BIBDB_ADD/DEL

2005-06-06 Thread Juergen Spitzmueller
Jean-Marc Lasgouttes wrote:
 Yes, definitely good, although I would write:

 +   case LFUN_LABEL_GOTO: {
 +   flag.enabled(!cmd.argument.empty()
 +       ||getInsetByCodeInsetRef(cursor_,
 InsetBase::REF_CODE)); +   break;

I did so and committed.

Thanks,
Jürgen


Re: [PATCH] Bug 961: reintroduce LFUN_BIBDB_ADD/DEL

2005-06-06 Thread Juergen Spitzmueller
Juergen Spitzmueller wrote:
 http://bugzilla.lyx.org/show_bug.cgi?id=961

 The attached patch reimplements those lfuns. It also fixes
 InsetBibtex::delDatabase, which is broken in 1.3.

 The only drawback is that the lfuns are not working when the cursor sits
 behind the inset. The same applies to 1.3. The reason is that
 getInsetByCode stops at the end of the document.

Attached is a third (and IMHO final) version that fixes all drawbacks and 
additionally also fixes a problem in InsetBibtex::addDatabase, which did not 
add a database when its name was a substring of another database (e.g. 
mybib vs. mybib2).

OK to apply?

Jürgen
Index: BufferView_pimpl.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/BufferView_pimpl.C,v
retrieving revision 1.586
diff -u -r1.586 BufferView_pimpl.C
--- BufferView_pimpl.C	6 Jun 2005 13:11:29 -	1.586
+++ BufferView_pimpl.C	6 Jun 2005 13:21:07 -
@@ -51,6 +51,7 @@
 #include undo.h
 #include vspace.h
 
+#include insets/insetbibtex.h
 #include insets/insetref.h
 #include insets/insettext.h
 
@@ -128,9 +129,20 @@
 {
 	T * inset = 0;
 	DocIterator it = cur;
-	if (it.nextInset() 
-	it.nextInset()-lyxCode() == code) {
-		inset = static_castT*(it.nextInset());
+	T * first_inset = static_castT*(it.nextInset());
+	while (it) {
+		if (!it.nextInset()) {
+			// try from the beginning, but break after one loop
+			it.pit() = 0;
+			it.pos() = 0;
+			if (!it.nextInset() || it.nextInset() == first_inset)
+break;
+		}
+		if (it.nextInset()-lyxCode() == code) {
+			inset = static_castT*(it.nextInset());
+			break;
+		}
+		it.forwardInset();
 	}
 	return inset;
 }
@@ -982,6 +994,8 @@
 	case LFUN_MARK_ON:
 	case LFUN_SETMARK:
 	case LFUN_CENTER:
+	case LFUN_BIBDB_ADD:
+	case LFUN_BIBDB_DEL:
 	case LFUN_WORDS_COUNT:
 		flag.enabled(true);
 		break;
@@ -1212,6 +1226,24 @@
 	case LFUN_CENTER:
 		center();
 		break;
+
+	case LFUN_BIBDB_ADD: {
+		InsetBibtex * inset =
+			getInsetByCodeInsetBibtex(cursor_,
+			 InsetBase::BIBTEX_CODE);
+		if (inset)
+			inset-addDatabase(cmd.argument);
+		break;
+	}
+
+	case LFUN_BIBDB_DEL: {
+		InsetBibtex * inset =
+			getInsetByCodeInsetBibtex(cursor_,
+			 InsetBase::BIBTEX_CODE);
+		if (inset)
+			inset-delDatabase(cmd.argument);
+		break;
+	}
 
 	case LFUN_WORDS_COUNT: {
 		DocIterator from, to;
Index: LyXAction.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/LyXAction.C,v
retrieving revision 1.206
diff -u -r1.206 LyXAction.C
--- LyXAction.C	8 May 2005 10:02:37 -	1.206
+++ LyXAction.C	6 Jun 2005 13:21:08 -
@@ -188,6 +188,8 @@
 		{ LFUN_INSERT_LABEL, label-insert, Noop },
 		{ LFUN_INSET_OPTARG, optional-insert, Noop },
 		{ LFUN_INSERT_BIBITEM, bibitem-insert, Noop },
+		{ LFUN_BIBDB_ADD, bibtex-database-add, Noop },
+		{ LFUN_BIBDB_DEL, bibtex-database-del, Noop },
 		{ LFUN_INSERT_LINE, line-insert, Noop },
 		{ LFUN_INSERT_PAGEBREAK, pagebreak-insert, Noop },
 		{ LFUN_LANGUAGE, language, Noop },
Index: lfuns.h
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lfuns.h,v
retrieving revision 1.41
diff -u -r1.41 lfuns.h
--- lfuns.h	8 May 2005 10:02:37 -	1.41
+++ lfuns.h	6 Jun 2005 13:21:08 -
@@ -355,6 +355,8 @@
 	// 270
 	LFUN_WORDS_COUNT,
 	LFUN_OUTPUT_CHANGES, // jspitzm 20050121
+	LFUN_BIBDB_ADD,
+	LFUN_BIBDB_DEL,
 
 	LFUN_LASTACTION  // end of the table
 };
Index: insets/insetbibtex.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetbibtex.C,v
retrieving revision 1.54
diff -u -r1.54 insetbibtex.C
--- insets/insetbibtex.C	17 May 2005 11:11:45 -	1.54
+++ insets/insetbibtex.C	6 Jun 2005 13:21:13 -
@@ -271,7 +271,7 @@
 bool InsetBibtex::addDatabase(string const  db)
 {
 	string contents(getContents());
-	if (!contains(contents, db)) {
+	if (tokenPos(contents, ',', db) == -1) {
 		if (!contents.empty())
 			contents += ',';
 		setContents(contents + db);
@@ -283,16 +283,17 @@
 
 bool InsetBibtex::delDatabase(string const  db)
 {
-	if (contains(getContents(), db)) {
+	string contents(getContents());
+	if (contains(contents, db)) {
+		int const n = tokenPos(contents, ',', db);
 		string bd = db;
-		int const n = tokenPos(getContents(), ',', bd);
 		if (n  0) {
-			// Weird code, would someone care to explain this?(Lgb)
-			string tmp(, );
-			tmp += bd;
-			setContents(subst(getContents(), tmp, , ));
+			// this is not the first database
+			string tmp = ',' + bd;
+			setContents(subst(contents, tmp, ));
 		} else if (n == 0)
-			setContents(split(getContents(), bd, ','));
+			// this is the first (or only) database
+			setContents(split(contents, bd, ','));
 		else
 			return false;
 	}


Re: Windows installer finished

2005-06-06 Thread Angus Leeming
Jean-Marc Lasgouttes wrote:
 Also, binary files mean that patch-1.3.6 will not work reliably.
 Angus I don't follow. Could you explain further?
 Binary file do not appear in patches. Therefore
   LyX 1.3.5 + patch-1.3.6 != LyX 1.3.6

`diff -a` ?

That's true for more than just the files I've just added however. All of
the following are flagged as binary in the 1.3.x tree:

development/Win32/packaging/icons/lyx_32x32.ico
development/Win32/packaging/icons/lyx_32x32.png
development/Win32/packaging/icons/lyx_32x32_16colors.png
development/Win32/packaging/icons/lyx_doc_32x32.ico
development/Win32/packaging/icons/lyx_doc_32x32.png
development/Win32/packaging/icons/lyx_doc_32x32_16colors.png
development/lyxserver/perl/LyX-Client-0.01.tar.gz
development/lyxserver/perl/LyX-Polite-0.01.tar.gz
lib/images/banner.ppm

Moreover, the problem will only get worse when the 498 .xpm files in
lib/images are converted to .png format the day we drop XForms.

-- 
Angus



Re:Windows installer finished

2005-06-06 Thread Uwe Sthr

Angus Leeming wrote:

 Find it at http://www.devel.lyx.org/~leeming/lyx_setup_136.exe

Hi Angus,

first many thanks for your work. I tested it and have the following 
annotations:


- Your installer asks for several programs. If one of these are not 
present, the installer opens the download/install webpage of the 
programs but jumps to the next step without waiting until the missing 
program is installed.


- Is it really necessary to install msys, perl and phthon fully? Its 
download size is huge (23 MB for Perl + Python) for modem/ISDN users. 
Ruurd only used the executables perl.exe, python.exe and sh.exe. Is it 
possible to include them to the installer package? Because it would ease 
the installation a lot.


- While LyX reconfigures, it doesn't recognize acrobat:

+checking for acrobat... no

altough it is installed on my system. The reason is that the acrobat.exe 
istn't in the PATH but in the registry (as most of Win programs) under


HKEY_LOCAL_MACHINE\Software\Classes\Applications\

Is it possible to search the registry for this entry? Acroread under Win 
is stored in the same registry path.


- I installed LyX with admin permissions and it appeared with german 
menus like I wanted. But when I change to a user account it appeared 
with english menus. To get german ones for the user account I had to 
create a new environment variable named LANG with the value de_DE as 
described at Ruurds LyX-webpage. Is it possible to add this variable 
automatically for every user account?


- At last a crash report of your LyX 1.3.6CVS version:
Go to Edit - Preferences, choose Paths and press one of the Browse 
buttons for the working directories. Result CRASH:


lyx: SIGSEGV signal caught
Sorry, you have found a bug in LyX. Please read the bug-reporting 
instructions i

n Help-Introduction and send us a bug report, if necessary. Thanks !
Bye.

abnormal program termination


That's all for the moment.

thanks for the installer again and regards
Uwe

p.s. Please CC all replies to my email adress as I'm not on the 
lyx-devel list.


Re: Windows installer finished

2005-06-06 Thread Angus Leeming
On Monday 06 June 2005 14:38, Uwe Sthr wrote:
 Angus Leeming wrote:
   Find it at http://www.devel.lyx.org/~leeming/lyx_setup_136.exe

 Hi Angus,

 first many thanks for your work. I tested it and have the following
 annotations:

 - Your installer asks for several programs. If one of these are not
 present, the installer opens the download/install webpage of the
 programs but jumps to the next step without waiting until the
 missing program is installed.

Yes. But once you've grabbed everything it asks you to restart the LyX 
installer so that it can find your newly installed packages.

 - Is it really necessary to install msys, perl and phthon fully?

No. You need Perl only if you're going to use reLyX. I tried to 
explain that in the accompanying commentary.

 Its download size is huge (23 MB for Perl + Python) for modem/ISDN
 users. Ruurd only used the executables perl.exe, python.exe and
 sh.exe. Is it possible to include them to the installer package?

Just thinking out loud...
Perhaps:
[x] Download the official Python distribution
[ ] Install a stripped-down and maybe good enough Python.exe

But this will involve me in a lot more work with NSIS getting to grips 
with optional installation of components. I'm running out of 
LyX-time. I'm also running out of NSIS-enthusiasm.

 Because it would ease the installation a lot.

 - While LyX reconfigures, it doesn't recognize acrobat:

 +checking for acrobat... no

 altough it is installed on my system. The reason is that the
 acrobat.exe istn't in the PATH but in the registry (as most of Win
 programs) under

 HKEY_LOCAL_MACHINE\Software\Classes\Applications\

 Is it possible to search the registry for this entry? Acroread
 under Win is stored in the same registry path.

I could, but where do I stop? Acroread certainly isn't required to get 
LyX running and we already have 6 download pages and a complaint that 
we're downloading too much stuff...

It's the sort of thing that really belongs in the configure script 
(which needs to be rewritten in some other language if it is to 
understand the registry...)

 - I installed LyX with admin permissions and it appeared with
 german menus like I wanted. But when I change to a user account it
 appeared with english menus. To get german ones for the user
 account I had to create a new environment variable named LANG
 with the value de_DE as described at Ruurds LyX-webpage. Is it
 possible to add this variable automatically for every user account?

It may be possible, but I don't know how...

 - At last a crash report of your LyX 1.3.6CVS version:
 Go to Edit - Preferences, choose Paths and press one of the
 Browse buttons for the working directories. Result CRASH:

Thank you. I see it on linux too.

 That's all for the moment.

 thanks for the installer again and regards
 Uwe

 p.s. Please CC all replies to my email adress as I'm not on the
 lyx-devel list.

Angus



Re: Windows installer finished

2005-06-06 Thread Jean-Marc Lasgouttes
 Angus == Angus Leeming [EMAIL PROTECTED] writes:

 - While LyX reconfigures, it doesn't recognize acrobat:
 
 +checking for acrobat... no
 
 altough it is installed on my system. The reason is that the
 acrobat.exe istn't in the PATH but in the registry (as most of Win
 programs) under
 
 HKEY_LOCAL_MACHINE\Software\Classes\Applications\
 
 Is it possible to search the registry for this entry? Acroread
 under Win is stored in the same registry path.

Angus I could, but where do I stop? Acroread certainly isn't required
Angus to get LyX running and we already have 6 download pages and a
Angus complaint that we're downloading too much stuff...

Angus It's the sort of thing that really belongs in the configure
Angus script (which needs to be rewritten in some other language if
Angus it is to understand the registry...)

What should be done if possible is to check whether there is an
association for .pdf files. In this case, start (with appropriate
options) should be used as a viewer. Actually, it may be possible to
do that on win 2k/xp from a shell script. Does NSIS offer support for
querying such things? Another solution would be to have code in LyX
packaging to do this kind of things (and for MacOSX too).

JMarc


Re: Windows installer finished

2005-06-06 Thread Angus Leeming
On Monday 06 June 2005 14:38, Uwe Sthr wrote:
 - At last a crash report of your LyX 1.3.6CVS version:
 Go to Edit - Preferences, choose Paths and press one of the
 Browse buttons for the working directories. Result CRASH:

Fixed in 1.3.x CVS.

Angus


Re: Windows installer finished

2005-06-06 Thread Angus Leeming
On Monday 06 June 2005 14:38, you wrote:
 - Your installer asks for several programs. If one of these are not
 present, the installer opens the download/install webpage of the
 programs but jumps to the next step without waiting until the
 missing program is installed.

 - Is it really necessary to install msys, perl and phthon fully?

Also, why not point the installer to the folder containing Ruurd's 
stripped down versions? Or something equivalent.

Basically, I don't want to commit myself to creating, testing and 
maintaining these things. If some Windows user has the motivation, 
then that's great. I can certainly adapt the installer to open up a 
web page pointing to the stripped down version in addition to the 
official version.

Angus



Re: Windows installer finished

2005-06-06 Thread Uwe Sthr

Angus Leeming wrote:


Its download size is huge (23 MB for Perl + Python) for modem/ISDN
users. Ruurd only used the executables perl.exe, python.exe and
sh.exe. Is it possible to include them to the installer package?


Just thinking out loud...
Perhaps:
[x] Download the official Python distribution
[ ] Install a stripped-down and maybe good enough Python.exe


I prefer the latter one as it saves a lot of installation time and hard 
disk space. But why should it be installed? Isn't it possible to add an 
actual version of perl.exe, python.exe and sh.exe (and some dll's if 
needed) to the folder LyX\bin\ and use these files for lyxrc.defaults by 
default (as Ruurd did)? This solution shouldn't produce NSIS troubles.



Is it possible to search the registry for this entry? Acroread
under Win is stored in the same registry path.


I could, but where do I stop? Acroread certainly isn't required to get 
LyX running and we already have 6 download pages and a complaint that 
we're downloading too much stuff...


My proposal for python etc. above would reduce it to 3 download pages. 
And you don't need to ask for installing acrobat/acroread as it is 
installed on 99% of Win PC's. It is enough to check if the program is 
installed and add the excutable to the viewers for PDF in the preferences.


---

I forgot to ask you how you handle the math fonts. I didn't see that 
they were installed. Just copy them to the \Windows\Fonts directory 
isn't enough, but I don't know how to invoke the correct installation by 
the command line. So it is OK if the user has to install them manually 
before installing LyX.
Btw. Ekkehardt Schlicht created a special font package using the BaKoMa 
math fonts:


http://wiki.lyx.org/uploads/LyX/WindowsSetup/bakoma4lyx.zip

But they are not free for commercial use as written in the license.

regards Uwe


Re: Windows installer finished

2005-06-06 Thread Angus Leeming
Jean-Marc Lasgouttes wrote:
 - While LyX reconfigures, it doesn't recognize acrobat:
 
 +checking for acrobat... no
 
 altough it is installed on my system. The reason is that the
 acrobat.exe istn't in the PATH but in the registry (as most of Win
 programs) under
 
 HKEY_LOCAL_MACHINE\Software\Classes\Applications\
 
 Is it possible to search the registry for this entry? Acroread
 under Win is stored in the same registry path.
 
 Angus I could, but where do I stop? Acroread certainly isn't required
 Angus to get LyX running and we already have 6 download pages and a
 Angus complaint that we're downloading too much stuff...
 
 Angus It's the sort of thing that really belongs in the configure
 Angus script (which needs to be rewritten in some other language if
 Angus it is to understand the registry...)
 
 What should be done if possible is to check whether there is an
 association for .pdf files. In this case, start (with appropriate
 options) should be used as a viewer.

See development/Win32/packaging/installer/lyx_path_prefix.C which adds
shell code to the configure script to generate a path_prefix entry in
lyxrc.defaults and which goes on to use start to run sh.exe configure.

It would be quite simple to add more functions to this .dll. Perhaps:
  add_path_prefix()
  add_viewer()
  run_configure()

but I'm getting a little edgy about all this. It appears that the goal is 
getting wider and wider. That means more work (primarily for me, it would
appear), more chance of bugs and no great benefit AFAICS.

I also don't think that we have to do everything this time around.
Moreover, I think we're forgetting that our users are capable individuals
who can do stuff themselves too...

 Actually, it may be possible to 
 do that on win 2k/xp from a shell script. Does NSIS offer support for
 querying such things? Another solution would be to have code in LyX
 packaging to do this kind of things (and for MacOSX too).
 
 JMarc

-- 
Angus



Re: Windows installer finished

2005-06-06 Thread Jean-Marc Lasgouttes
 Angus == Angus Leeming [EMAIL PROTECTED] writes:

Angus See development/Win32/packaging/installer/lyx_path_prefix.C
Angus which adds shell code to the configure script to generate a
Angus path_prefix entry in lyxrc.defaults and which goes on to use
Angus start to run sh.exe configure.

That's evil, isn't it? ;)

As far as adding prefs for windows is concerned, one possibility is to
provide a preference file that contains everything needed by
LyX/Win32. Generating this file is probably easier than hacking
lib/configure. LyX/Mac follows this route (provide a preconfigured
preference file).

Angus but I'm getting a little edgy about all this. It appears that
Angus the goal is getting wider and wider. That means more work
Angus (primarily for me, it would appear), more chance of bugs and no
Angus great benefit AFAICS.

Yes.

Angus I also don't think that we have to do everything this time
Angus around. Moreover, I think we're forgetting that our users are
Angus capable individuals who can do stuff themselves too...

I think you have to draw a line at some point. Fell free to do it. 

JMarc


Re: Windows installer finished

2005-06-06 Thread Uwe Stöhr

Angus Leeming wrote:


- Is it really necessary to install msys, perl and phthon fully?


Also, why not point the installer to the folder containing Ruurd's 
stripped down versions? Or something equivalent.


That's a good solution.

Basically, I don't want to commit myself to creating, testing and 
maintaining these things.


I understand you.

I can certainly adapt the installer to open up a 
web page pointing to the stripped down version in addition to the 
official version.


I'll create a wiki page with all needed files.

I think we need

- perl.exe
- perlx.dll
- phython.exe
- pythonxx.dll
- sh.exe

What other files are needed?

regards Uwe


Re: Windows installer finished

2005-06-06 Thread Angus Leeming
On Monday 06 June 2005 15:54, Uwe Sthr wrote:
  I can certainly adapt the installer to open up a
  web page pointing to the stripped down version in addition to the
  official version.

 I'll create a wiki page with all needed files.

 I think we need

 - perl.exe
 - perlx.dll
 - phython.exe
 - pythonxx.dll
 - sh.exe

 What other files are needed?

That's precisely my point. I don't know. Off the top of my head:

sed, tr, cut, grep...

Angus



Re: Windows installer finished

2005-06-06 Thread Angus Leeming
On Monday 06 June 2005 15:39, Uwe Sthr wrote:
 Angus Leeming wrote:
 Its download size is huge (23 MB for Perl + Python) for
  modem/ISDN users. Ruurd only used the executables perl.exe,
  python.exe and sh.exe. Is it possible to include them to the
  installer package?
 
  Just thinking out loud...
  Perhaps:
  [x] Download the official Python distribution
  [ ] Install a stripped-down and maybe good enough Python.exe

 I prefer the latter one as it saves a lot of installation time and
 hard disk space. But why should it be installed?

I think we have a terminology confusion. To me, installed just means 
unpack it somewhere usable. The registry is a [EMAIL PROTECTED] nightmare for 
which I see little need. 

 Isn't it possible to add an actual version of perl.exe, python.exe
 and sh.exe (and some dll's if needed) to the folder LyX\bin\ and use
 these files for lyxrc.defaults by default (as Ruurd did)? This
 solution shouldn't produce NSIS troubles.

This solution will require
1. Extensive testing to ascertain which modules are needed by the 
scripts that LyX packages.
2. Ongoing maintenance.

Moreover, if I already have the official stuff installed why would I 
want to use the unoffical stuff? Adding code to NSIS to 
conditionally install something is most certainly a NSIS trouble 
that I'm keen to avoid right now.

 Is it possible to search the registry for this entry? Acroread
 under Win is stored in the same registry path.
 
  I could, but where do I stop? Acroread certainly isn't required
  to get LyX running and we already have 6 download pages and a
  complaint that we're downloading too much stuff...

 My proposal for python etc. above would reduce it to 3 download
 pages.

No it wouldn't. It would just change three of them to:

Would you prefer to use these stripped down things that people 
have been discovering don't work (see countleess reports on the 
lyx-users list), or would you prefer to use an official version which 
definitely will work but which requires a big download committment.

 And you don't need to ask for installing acrobat/acroread as 
 it is installed on 99% of Win PC's. It is enough to check if the
 program is installed and add the excutable to the viewers for PDF
 in the preferences.

I'd rather reuse the code I do have than rewrite something especially 
for acroroead...

 I forgot to ask you how you handle the math fonts. I didn't see
 that they were installed. Just copy them to the \Windows\Fonts
 directory isn't enough, but I don't know how to invoke the correct
 installation by the command line. So it is OK if the user has to
 install them manually before installing LyX.

I do nothing about math fonts. Nor do I plan to do anything about math 
fonts before LyX 1.3.6 is released. I think that we should focus on 
getting what we have to work rather than trying to get it to do more 
and more and more.

 Btw. Ekkehardt Schlicht created a special font package using the 
 BaKoMa math fonts:
 http://wiki.lyx.org/uploads/LyX/WindowsSetup/bakoma4lyx.zip
 But they are not free for commercial use as written in the license.

I seem to remember that the consencus was that the licence was too 
restrictive for us to distribute them.

Angus



Re: LyX meeting in Paris. What about July 14-18?

2005-06-06 Thread Juergen Vigna

I already bought my tickets today, so most probably we will meet up in Paris 
#:O)

~Jürgen

--
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._
Dr. Jürgen VignaE-Mail:  [EMAIL PROTECTED]
Mitterstrich 151/A
I-39050 SteineggWeb: http://www.lyx.org/~jug
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._


Re: Windows installer: NSIS vs .msi

2005-06-06 Thread Rex Dieter

Angus Leeming wrote:

But this will involve me in a lot more work with NSIS getting to grips 
with optional installation of components. I'm running out of 
LyX-time. I'm also running out of NSIS-enthusiasm.


While having any sort of installer is better than none at all, I'd 
suggest future effort re: Windows installers aim for an .msi target 
(Microsoft Installer) format.


Then, those of us in AD environments can enjoy pain-free deployment to 
(all) client machines.  (-:


-- Rex

p.s.  I'll be doing it myself for lyx-1.3.6 as a proof-of-concept (using 
the Advanced Installer tool).




Re: LyX meeting in Paris. What about July 14-18?

2005-06-06 Thread Jean-Marc Lasgouttes
 Juergen == Juergen Vigna [EMAIL PROTECTED] writes:

Juergen I already bought my tickets today, so most probably we will
Juergen meet up in Paris #:O) ~Jürgen

Great! When?

JMarc


Re: LyX meeting in Paris. What about July 14-18?

2005-06-06 Thread Juergen Vigna

What do you mean my flight dates/times?

Arrival in Paris evening the 14th, departure evening the 18th :)

I will check back with you as soon as I have all plans ready,
for the moment I just booked the flight (77 ).

~Jrgen

Jean-Marc Lasgouttes wrote:

Juergen == Juergen Vigna [EMAIL PROTECTED] writes:



Juergen I already bought my tickets today, so most probably we will
Juergen meet up in Paris #:O) ~Jrgen

Great! When?

JMarc




--
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._
Dr. Jrgen VignaE-Mail:  [EMAIL PROTECTED]
Mitterstrich 151/A
I-39050 SteineggWeb: http://www.lyx.org/~jug
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._


Re: Windows installer: NSIS vs .msi

2005-06-06 Thread Angus Leeming
Rex Dieter wrote:

 Angus Leeming wrote:
 
 But this will involve me in a lot more work with NSIS getting to grips
 with optional installation of components. I'm running out of
 LyX-time. I'm also running out of NSIS-enthusiasm.
 
 While having any sort of installer is better than none at all, I'd
 suggest future effort re: Windows installers aim for an .msi target
 (Microsoft Installer) format.

Fine. Having struggled with NSIS for the last month, I would love to see it
die :( However, I think that Asger's point that we should stick with
something that's both Open Source and actively developed.

Notice also that you might like MSI, but others think that NSIS is better:

http://www.peterprovost.org/archive/2004/01/19/1040.aspx
 I'm noticing that the install and uninstall runs so much faster than the
Installshield or VS.NET msi files that I have been using.

I mentioned NSIS a few days/weeks ago in one of my Geek Notes columns.
Because my customer was very size sensitive, the project that we shipped
last week used NSIS for its installer. The VS.NET/MSI installer we created
was almost 4MB while the NSIS installer was less than 520K. And like Matt,
I find the NSIS installers are much faster.

The downside is that these installers are not MSI based. In fact, the
reason the VS.NET installers are so big is that they bundle two copies of
the Windows Installer 2.0 (ANSI and Unicode) within the installer. If you
switch the deployment project properties from Windows Installer
bootstrapper to No bootstrapper, you can alleviate this, but you also
can only run the installer on machines that are already running Windows
Installer 2.0.

 Then, those of us in AD environments can enjoy pain-free deployment to
 (all) client machines.  (-:

At the cost of increased (quadrupled ?) download size.

Can you explain why you can't just compile the NSIS installer on your
weird windows box? How hard is

   $ path to/makensis lyx_installer.nsi

?

 p.s.  I'll be doing it myself for lyx-1.3.6 as a proof-of-concept (using
 the Advanced Installer tool).

Look forward to it.

-- 
Angus



Re: Windows installer finished

2005-06-06 Thread Lars Gullik Bjønnes
Jean-Marc Lasgouttes [EMAIL PROTECTED] writes:

| Angus I also don't think that we have to do everything this time
| Angus around. Moreover, I think we're forgetting that our users are
| Angus capable individuals who can do stuff themselves too...

| I think you have to draw a line at some point. Fell free to do it. 

Yeah. You have made the initial happen. Now pass it on to those that
actually will use it.

-- 
Lgb



Re: LyX python package

2005-06-06 Thread G. Milde
Dear Jose, dear developers,

I uploaded my (still not finally tested) LyX python package to
http://wiki.lyx.org/Tools/PyClient

Hopefully this can become a base for further discussion.


On 31.05.05, José Matos wrote:
 G. Milde wrote:
  On 20.05.05, Jose' Matos wrote:
  On Friday 20 May 2005 10:04, G. Milde wrote:
   
  Now a serious question: is this [__init__.py] a trivial (empty) file or
  do you have any initialization step going inside?

Maybe we should put some backwards compatibility code there. Currently
I am writing for Python 2.3.

  At some stage, there might be code to add a directory with user-provided
  python scripts to the packages __path__, so the package becomes
  extensible. (Remember, my main concern is a scripting support for LyX.)
 
   I am not sure if it is worth to have a local script directory. In most of
 the points below this is my main objection.

I think to reach my goal of a user-extensible lyx behaviour, such a
directory is mandatory. A user who wants e.g. a permanent history for
search-replace actions or automatic abbreviations expansion could then
write a Python function that does just (using LyX.lfuns) and place it in
a special plugins directory. Starting LyX with a python client should
then make this functions available to a keybinding (via server-notify).


 ---

 
  lyx2lyx directory:
  
I have been working on the lyx2lyx directory because cvs looses the
  history if you rename a directory. 

If I remember right, there is some strange and complicated way (described
in the CVS book) how the administrator can rename/move a directory and
preserve history. OTOH, you can also move the old one to the attic and
create a new with a bit of documentation saying that there is a
predecessor on the attic and how to get it...

  If that was not the case this
  directory would have been renamed LyX for more than a year ago.
  
So at this level, at least for me lyx2lyx == LyX
  
  In the CVS, lyx2lyx (or pyLyX) is still a more transparent name than
  lyx-cvs/devel/lib/LyX/. Once installed,  python-site-lib/LyX/ is
  preferable.
 
   I agree.

 For cvs a python directory (called python naturally seems a good bet).

My suggestion is to put it under scripts as
lyx-cvs/devel/lib/scripts/python/ so lyx-cvs/devel/lib/ doesnot
become too crowded. 
 

 
  when you say a LyX/lyx2lyx sub-module, there is no need for it, we
  already have a LyX.File that does all the work for you.
  
  With a LyX package this would become LyX.LyX.File
 
   As I have told you I would remove the need for the middle LyX

I.e. you would rename/move your LyX.py to LyX/File.py?
(I would prefer lowercase for modules.)

-
 
  So clearly what we have to do is to agree on the python api to be used.
  
  Which means class names, file names and placement of files and
  sub-directories (== sub-modules) under the site-lib/LyX/ package
  directory.
 
   Yes. :-)

   As soon as the code starts to get shape those issues will be solved
 easily. :-)

So I hope http://wiki.lyx.org/uploads/Tools/PyClient/pylyx0.1.tar.bz2
will help solving the remaining issues. It is still experimental code and
feedback is welcome.

Günter

-- 
G.Milde web.de


Re: tex2lyx + international characters = redundant braces in lyx (1.3)?

2005-06-06 Thread Andre Poenitz
On Tue, May 31, 2005 at 08:24:17PM +0200, Sven Schreiber wrote:
 Hi, I just stumbled over what I think is a little quirk in tex2lyx. When
 I convert a file that contains {\ss} latex codes, using the tex2lyx -
 lyx2lyx - lyx 1.3.5 procedure from the wiki (on windows), the braces
 appear as ERT in the final lyx file, although they are redundant.
 
 The braces don't do any harm, they're only redundant.

Now just hang on for a second and try to figure out the kind of effort
needed to prove that a certain construnct in a .tex file is redundant.

 Example: the latex input So{\ss}e should appear as Soße in the lyx file.
 (Hope the German es-zett is preserved in the mail.) What appears is:
 Soert{/ertßert}/erte.
 
 Tried to workaround with So\ss{}e, which gives
 Soßert{/ertert}/erte (still two different ert insets)

Well, why not write Soße in your .tex. Works since the end of the
previous millenium...

 So is it possible for tex2lyx to recognize a pair of braces that simply
 serves to delimit latex codes from surrounding text, and remove them in
 the lyx file? That would be great.

It is 'possible'. However, it is almost impossible in this area to get
anything right in all cases, so I am somewhat reluctant to have too many
'clever' additions to tex2lyx, especially if these additions are
specific to certain laguages only.
 
 Btw, note that all the {\ss} in the input file were caused by the WinEdt
 (very popular windows latex shell) function to automatically save
 non-ascii input as ascii-latex-codes. So I guess this (minor) problem
 may appear more often in the future when lyx on windows is more
 widespread, and many people want to import their non-English latex files
 into lyx.

As far as I am concerned this is rather ugly output of WinEdt. People
could always run the thing through  perl -e 's:{\\ss}:ß:' if they want
to have an automated conversion. Or convince the WinEdt folk to
produce 'suitable' output. 

Andre'


Re: [PATCH] bug 1890: insetoptarg triggers assertion

2005-06-06 Thread Andre Poenitz
On Wed, Jun 01, 2005 at 03:26:47PM +0200, Jean-Marc Lasgouttes wrote:
  Martin == Martin Vermeer [EMAIL PROTECTED] writes:
 
 Martin Hmmm. This
 
 Martin 43 InsetCollapsable::InsetCollapsable
 Martin 44 (BufferParams const  bp, CollapseStatus status)
 Martin 45 : InsetText(bp), label(Label), status_(status), 
 openinlined_(false)
 Martin 46 {
 
 Martin suggests that a new textinset is being created at construction
 Martin of the collapsable.
 
 I do not think so. It means ``use my InsetText personality to call the
 constructor''. 
 
 Lars, Angus anyone, would you care to comment?

That's the constructor of the base class. Since we are using single
inheritance, the address of the InsetCollapsable is the same as that
of the base class.

Andre'


Re: Graphics path with :

2005-06-06 Thread Andre Poenitz
On Tue, May 31, 2005 at 11:12:26AM +0200, Jean-Marc Lasgouttes wrote:
  Angus == Angus Leeming [EMAIL PROTECTED] writes:
 
 Angus Reading http://wiki.lyx.org/LaTeX/FilesWithSpecialChars and
 Angus http://wiki.lyx.org/uploads/LaTeX/FilesWithSpecialChars/filenames.tex,
 Angus I don't see why a ':' in a file name won't work, but you're the
 Angus one using this stuff...
 
 I guess ':' is a problem in a windows file name if it is not the drive
 separator.

'Problem' is the wrong word. They serve a purpose IIRC. Try writing and
reading to a.txt:1.

Andre'


backporting lyx2lyx to 1.3.6

2005-06-06 Thread Georg Baum
I had a look at how files with the wrong version are read in 1.4. It is
different than in 1.3, newer files are not read at all and not treated as
if the format was current. The change is here:

http://www.lyx.org/cgi-bin/viewcvs.cgi/lyx-devel/src/buffer.C.diff?r1=1.512r2=1.513

Lars, was that intended or only a side effect? If this is what we want I'll
replace lyx2lyx in 1.3 by the 1.4 version and adapt the code in buffer.C to
it, if not I am going to implement a commandline switch of lyx2lyx that
tells it to convert to the best matching format if the desired format is
not possible an use that in 1.3 and 1.4.


Georg




Re: backporting lyx2lyx to 1.3.6

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

| I had a look at how files with the wrong version are read in 1.4. It is
| different than in 1.3, newer files are not read at all and not treated as
| if the format was current. The change is here:

I think this was intended, but it would not be intended for 1.3.x.

With 1.4 we don't know of anything newer, but with 1.3 we do.

...but perhaps we should change 1.4?

-- 
Lgb



Re: Windows installer finished

2005-06-06 Thread Uwe Stöhr

Angus Leeming wrote:


What other files are needed?


That's precisely my point. I don't know. Off the top of my head:

sed, tr, cut, grep...


Looking at Ruurds Version, I know what is needed. I uploaded the files 
as .rar to


http://wiki.lyx.org/uploads/Tools/LyXWinTest/lyxutils.rar

The files are the official actual versions. Taken from MSYS, Perl, and 
Python.


 Isn't it possible to add an actual version of perl.exe, python.exe
 and sh.exe (and some dll's if needed) to the folder LyX\bin\ and use
 these files for lyxrc.defaults by default (as Ruurd did)? This
 solution shouldn't produce NSIS troubles.

 This solution will require
 1. Extensive testing to ascertain which modules are needed by the
 scripts that LyX packages.

Why extensive testing? We know which files are needed and provide the 
official actual versions (the same that are used in the actual MSYS 
version).


 2. Ongoing maintenance.

Only if some users have trouble. I remember only one problem since 
LyXWin exists.


 Moreover, if I already have the official stuff installed why would I
 want to use the unoffical stuff?

The files are the official ones. They are tested and under full support 
of the authors.


 Adding code to NSIS to conditionally install something is most
 certainly a NSIS trouble that I'm keen to avoid right now.

I don't understand why this is an NSIS topic? I would just add the files 
to the package and use them as default. Then you don't have to search 
for the path to the files as they are part of the LyXWin package.


 Would you prefer to use these stripped down things that people
 have been discovering don't work (see countleess reports on the
 lyx-users list), or would you prefer to use an official version which
 definitely will work but which requires a big download committment.

The countless reports concerned a problem with a sed.exe version. The 
solution was to replace it by a newer one. But this problem can appear 
everytime, because MSYS can also use a broken version. As the stripped 
files are taken from MSYS, installing MSYS instead of using the stripped 
files makes no difference. But we save the user from downloading and 
installing packages he don't need.
The same is for the python/perl files. For example Openoffice delivers 
the python23.dll and don't install python, so why shouldn't we do the same?


I installed your LyXWin version using the stripped files (I previously 
deinstalled python, perl, and MSYS) and it works correctly. OK I have 
not much time to test it roughly but I think it's stable.

There is now only one problem:

If I use the stripped files, the folder of the files (if you include 
them to your package it is then LyX's \bin folder) must be in the PATH. 
But that could easily be fixed.


regards Uwe


Re: backporting lyx2lyx to 1.3.6

2005-06-06 Thread Georg Baum
Lars Gullik Bjønnes wrote:

 Georg Baum [EMAIL PROTECTED]
 writes:
 
 | I had a look at how files with the wrong version are read in 1.4. It is
 | different than in 1.3, newer files are not read at all and not treated
 | as if the format was current. The change is here:
 
 I think this was intended, but it would not be intended for 1.3.x.

I can see no difference in this respect between 1.3 and 1.4 after applying
the patch that I sent earlier: The patch sends newer lyx files through
lyx2lyx, too and only refuses to load files that can't be converted. Then
LyX 1.3.6 would be able to read current 1.4 files, but not anymore if we
change the format again.
New file formats could be added by simply replacing lyx2lyx, without the
need to update the lyx executable.

 With 1.4 we don't know of anything newer, but with 1.3 we do.

Not now, but at some point in time we will.

 ...but perhaps we should change 1.4?

That was exactly my question ;-)


Georg



Re: Windows installer finished

2005-06-06 Thread Angus Leeming
Uwe Stöhr wrote:

 Angus Leeming wrote:
 
What other files are needed?
 
 That's precisely my point. I don't know. Off the top of my head:
 
 sed, tr, cut, grep...
 
 Looking at Ruurds Version, I know what is needed. I uploaded the files
 as .rar to
 
 http://wiki.lyx.org/uploads/Tools/LyXWinTest/lyxutils.rar
 
 The files are the official actual versions. Taken from MSYS, Perl, and
 Python.
 
   Isn't it possible to add an actual version of perl.exe, python.exe
   and sh.exe (and some dll's if needed) to the folder LyX\bin\ and use
   these files for lyxrc.defaults by default (as Ruurd did)? This
   solution shouldn't produce NSIS troubles.
 
   This solution will require
   1. Extensive testing to ascertain which modules are needed by the
   scripts that LyX packages.
 
 Why extensive testing? We know which files are needed and provide the
 official actual versions (the same that are used in the actual MSYS
 version).

I'm afraid that I don't believe that this is so. Several scripts have
changed since Ruurd released LyX/Win 1.3.5 and their requirements have
changed too. Witness the reports that people have been making that the
lyx2lyx packaged with tex2lyx doesn't work with Ruurd's python.

   2. Ongoing maintenance.
 
 Only if some users have trouble. I remember only one problem since
 LyXWin exists.

I remember a whole stack of reports about missing python modules...

   Moreover, if I already have the official stuff installed why would I
   want to use the unoffical stuff?
 
 The files are the official ones. They are tested and under full support
 of the authors.
 
   Adding code to NSIS to conditionally install something is most
   certainly a NSIS trouble that I'm keen to avoid right now.
 
 I don't understand why this is an NSIS topic? I would just add the files
 to the package and use them as default. Then you don't have to search
 for the path to the files as they are part of the LyXWin package.

Because I don't believe that Ruurd's stripped down versions are sufficient
and I'm not willing to create *and test* their replacement.

   Would you prefer to use these stripped down things that people
   have been discovering don't work (see countleess reports on the
   lyx-users list), or would you prefer to use an official version which
   definitely will work but which requires a big download committment.
 
 The countless reports concerned a problem with a sed.exe version.

Not really. It was a problem with the DOS line endings of the generated
chkconfig.sed. But other scripts have problems too.

 I installed your LyXWin version using the stripped files (I previously
 deinstalled python, perl, and MSYS) and it works correctly.

Ha! Scripts are by their nature dynamic. Have you tested that every single
script works? Of course not!

 OK I have not much time to test it roughly but I think it's stable.
 There is now only one problem:
 
 If I use the stripped files, the folder of the files (if you include
 them to your package it is then LyX's \bin folder) must be in the PATH.
 But that could easily be fixed.

???

Then tell the installer where to find this folder and it'll add it to the
path_prefix variable in lyxrc.defaults.

-- 
Angus



Re: Windows installer: NSIS vs .msi

2005-06-06 Thread Rex Dieter

Angus Leeming wrote:

Rex Dieter wrote:



Angus Leeming wrote:



But this will involve me in a lot more work with NSIS getting to grips
with optional installation of components. I'm running out of
LyX-time. I'm also running out of NSIS-enthusiasm.


While having any sort of installer is better than none at all, I'd
suggest future effort re: Windows installers aim for an .msi target
(Microsoft Installer) format.



Fine. Having struggled with NSIS for the last month, I would love to see it
die :( However, I think that Asger's point that we should stick with
something that's both Open Source and actively developed.


Like
http://sourceforge.net/projects/wix/
?


Notice also that you might like MSI, but others think that NSIS is better:
http://www.peterprovost.org/archive/2004/01/19/1040.aspx


I humbly disagree with these others.


 I'm noticing that the install and uninstall runs so much faster than the
Installshield or VS.NET msi files that I have been using.


True.


I mentioned NSIS a few days/weeks ago in one of my Geek Notes columns.
Because my customer was very size sensitive, the project that we shipped
last week used NSIS for its installer. The VS.NET/MSI installer we created
was almost 4MB while the NSIS installer was less than 520K.


A proper msi installer should have very little overhead.  I'd say was 
created incorrectly (probably bundling some extra crud).



The downside is that these installers are not MSI based. In fact, the
reason the VS.NET installers are so big is that they bundle two copies of
the Windows Installer 2.0 (ANSI and Unicode) within the installer. If you
switch the deployment project properties from Windows Installer
bootstrapper to No bootstrapper, you can alleviate this, but you also
can only run the installer on machines that are already running Windows
Installer 2.0.


I make .msi packages with MSI-2.0 requirements too, but they 
auto-download/install msi-2.0 from microsoft.com if not already present.



Then, those of us in AD environments can enjoy pain-free deployment to
(all) client machines.  (-:



At the cost of increased (quadrupled ?) download size.


Not in my experience.


Can you explain why you can't just compile the NSIS installer on your
weird windows box? How hard is

   $ path to/makensis lyx_installer.nsi


With software packaged as .msi's, I can deploy to my 100's of client 
machines with a few clicks with AD Group Policy.  Can't do that with any 
nsis installer (please correct me if I'm wrong).


-- Rex



Re: backporting lyx2lyx to 1.3.6

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

| Lars Gullik Bjønnes wrote:

 Georg Baum [EMAIL PROTECTED]
 writes:
 
 | I had a look at how files with the wrong version are read in 1.4. It is
 | different than in 1.3, newer files are not read at all and not treated
 | as if the format was current. The change is here:
 
 I think this was intended, but it would not be intended for 1.3.x.

| I can see no difference in this respect between 1.3 and 1.4 after applying
| the patch that I sent earlier: The patch sends newer lyx files through
| lyx2lyx, too and only refuses to load files that can't be converted. Then
| LyX 1.3.6 would be able to read current 1.4 files, but not anymore if we
| change the format again.
| New file formats could be added by simply replacing lyx2lyx, without the
| need to update the lyx executable.

 With 1.4 we don't know of anything newer, but with 1.3 we do.

| Not now, but at some point in time we will.

 ...but perhaps we should change 1.4?

| That was exactly my question ;-)

I read it the other way: make 1.3 behave like 1.4

-- 
Lgb



Re: LyX meeting in Paris. What about July 14-18?

2005-06-06 Thread Michael Schmitt

Jean-Marc Lasgouttes wrote:


Hello Michael,

Do you have a more precise idea of when you will be coming?
 

I just bought my ticket. I will arrive at Gare du Nord on 16.07. at 
13:05 and leave on 17.07. at 17:55. It is a very short visit but I think 
it's worth the effort!


Eventually, you should give me some instructions on how to get to your 
apartment. Is there an affordable hotel around the corner?


Regards, Michael


Re: backporting lyx2lyx to 1.3.6

2005-06-06 Thread Jose' Matos
On Monday 06 June 2005 17:51, Georg Baum wrote:
 I had a look at how files with the wrong version are read in 1.4. It is
 different than in 1.3, newer files are not read at all and not treated as
 if the format was current. The change is here:

 http://www.lyx.org/cgi-bin/viewcvs.cgi/lyx-devel/src/buffer.C.diff?r1=1.5
12r2=1.513

  And why should them be read if they are newer? It was me who motivated 
Lars to do this change. The argument is simple, every knowledge about the 
lyx file format should go into lyx2lyx.

 Lars, was that intended or only a side effect? If this is what we want
 I'll replace lyx2lyx in 1.3 by the 1.4 version and adapt the code in
 buffer.C to it, if not I am going to implement a commandline switch of
 lyx2lyx that tells it to convert to the best matching format if the
 desired format is not possible an use that in 1.3 and 1.4.

  I would prefer this solution. After all how do you decide the file is 
newer? Knowing the format of every file header? But then this is exactly 
the reason why lyx2lyx was created in first place, to relieve lyx from 
knowing every possible lyx format

 Georg

-- 
José Abílio


Re: Windows installer: NSIS vs .msi

2005-06-06 Thread Angus Leeming

Rex Dieter wrote:

Can you explain why you can't just compile the NSIS installer on your
weird windows box? How hard is

   $ path to/makensis lyx_installer.nsi


With software packaged as .msi's, I can deploy to my 100's of client 
machines with a few clicks with AD Group Policy.  Can't do that with any 
nsis installer (please correct me if I'm wrong).


Hey! My knowledge is the sum of four weeks graft, that's all. I look 
forward to it all being superceeded.


Angus



Prerelease of LyX 1.3.6 on WIndows?

2005-06-06 Thread Angus Leeming
JMarc, all.

I just added a page to the wiki http://wiki.lyx.org/Windows/LyX136pre 
describing a prerelease of LyX 1.3.6 on Windows.

Christian, can I get you to move the binary 
http://www.lyx.org/~leeming/lyx_setup_136.exe to the wiki upload 
area. I guess it should be moved to 
http://wiki.lyx.org/uploads/Windows/LyX136pre/lyx_setup_136.exe ?
It's too big (6MB) for me to do this myself, I believe.

Feel free to offer suggestions on how to improve the page, or just 
edit it yourself :) If you think that this thing is ready to fly, 
then I'll make an announcement on the lyx-users list.

Angus
 


Re: Windows installer finished

2005-06-06 Thread Uwe Stöhr

Angus Leeming wrote:

 Why extensive testing? We know which files are needed and provide the
 official actual versions (the same that are used in the actual MSYS
 version).

 I'm afraid that I don't believe that this is so. Several scripts have
 changed since Ruurd released LyX/Win 1.3.5 and their requirements have
 changed too. Witness the reports that people have been making that the
 lyx2lyx packaged with tex2lyx doesn't work with Ruurd's python.

That's why I don't use Ruurds versions but the actual ones.

 I would just add the
 files to the package and use them as default. Then you don't have to
 search for the path to the files as they are part of the LyXWin
 package.

 I don't believe that Ruurd's stripped down versions are
 sufficient and I'm not willing to create *and test* their replacement.

 Scripts are by their nature dynamic. Have you tested that every
 single script works? Of course not!

You are of course right that every script could cause troubles. But as I 
told, the files are the same as if the user installed the full version 
of python etc.
But as you and I don't have the time to test it roughly. I propose the 
following:


You (or I) could create a wiki page with a description of the new LyXWin 
installer version. I'm sure that after a mail to the lyx-users list many 
Win users will test it.


 If I use the stripped files, the folder of the files (if you include
 them to your package it is then LyX's \bin folder) must be in the
 PATH. But that could easily be fixed.

 ???
 Then tell the installer where to find this folder and it'll add it to
 the path_prefix variable in lyxrc.defaults.

I mean that the folder of the stripped files have to be in the system 
environment variable PATH so that every script can find them.


In my opinion it would be a good solution if the installer asks for 
ghostscript, imagemagick, and latex (in this order because imagemagick 
needs ghostscript installed!) as it does in the current version. Then 
the user chooses an install directory for LyX and the LyX-files are 
extracted there. The stripped versions of python etc. are included in 
the install package. Assuming the install directory is C:\LyX they are 
extracted in C:\LyX\bin (the same directory like the lyx.exe). Now this 
directory is added to the PATH using Win's command line command

set path=C:\LyX\bin;%path%
Now the menu language is set for all users with e.g. the comand line command
set LANG=de_DE
At last LyX is first configured and started.

(I'm not sure if the command line commands are correct. But I can ask 
Michael Schmidt who knows them.)


thanks and regards
Uwe


Re: backporting lyx2lyx to 1.3.6

2005-06-06 Thread Lars Gullik Bjønnes
Jose' Matos [EMAIL PROTECTED] writes:

| On Monday 06 June 2005 17:51, Georg Baum wrote:
 I had a look at how files with the wrong version are read in 1.4. It is
 different than in 1.3, newer files are not read at all and not treated as
 if the format was current. The change is here:

 http://www.lyx.org/cgi-bin/viewcvs.cgi/lyx-devel/src/buffer.C.diff?r1=1.5
12r2=1.513

|   And why should them be read if they are newer? It was me who motivated 
| Lars to do this change. The argument is simple, every knowledge about the 
| lyx file format should go into lyx2lyx.

Yes, that is right. Now I remember.

lyx2lyx solves that. LyX only cares about its own format.
(there should be a way to query the lyx binary about what format
version it needs)


-- 
Lgb



RE: Prerelease of LyX 1.3.6 on WIndows?

2005-06-06 Thread Alstrup, Asger Kunuk Ottar
In my book, Angus is a superstar. Angus, do not worry about all the flack. That 
is only because there is a lot of interest in a windows installer. And if the 
itch scratches enough for the whiners, they can pick up the ball and improve 
it. You've made a great contribution, and deserve some credit.
 
Regards,
Asger
 


Re: [PATCH] minor bibitem tweaks

2005-06-06 Thread Juergen Spitzmueller
Martin Vermeer wrote:
> Yes, I know... I can live with this for 1.4.

I'll commit the minimalist version. This is clearly an improvement, everything 
else is ambiguous.

Jürgen


Re: C++ question

2005-06-06 Thread Angus Leeming

Lars Gullik Bjønnes wrote:

| I feel like a bit of an idiot asking this, but what's the C++ way to
| insert some data into an existing file?

How would you do it in any other language?

At end is easy. At start is more tricky...

If it were a memory buffer how would you do it then?
(memmove perhaps?)

You need to use some temporary (file or memory buffer)

Unless you mmap the file, then you might be able to use memmove.


Thanks, Lars. I suspected that was going to be the answer.
Angus




Re: Windows installer --- software probe

2005-06-06 Thread Carl Dr. Kleffner
> --- Ursprüngliche Nachricht ---
> Von: Asger Ottar Alstrup <[EMAIL PROTECTED]>
> An: unknown
> Kopie: lyx-devel@lists.lyx.org
> Betreff: Re: Windows installer --- software probe
> Datum: Thu, 02 Jun 2005 19:45:06 +0200
> 
> One comment:
> 
> The reason I did not install minsys was that I did not know which file 
> to download and install. There are listed hundreds on that web-site. 
> Maybe you could list what file the user should grab?
> 
> Regards,
> Asger
> 

I guess you mean msys - minimal gnu system:
MSYS-1.0.10.exe on http://www.mingw.org/download.shtml

BTW: I'm w/o access to my mailbox until June, 23.

Regards

Carl

-- 
Weitersagen: GMX DSL-Flatrates mit Tempo-Garantie!
Ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl


Re: Windows installer --- software probe

2005-06-06 Thread Angus Leeming

Carl Dr. Kleffner wrote:

One comment:

The reason I did not install minsys was that I did not know which file 
to download and install. There are listed hundreds on that web-site. 
Maybe you could list what file the user should grab?


Regards,
Asger



I guess you mean msys - minimal gnu system:
MSYS-1.0.10.exe on http://www.mingw.org/download.shtml


That's correct. I want the user to grab msys-1.0.x.exe which they can get 
from http://prdownloads.sf.net/mingw/ (the download.shtml page takes you to 
the sf.net pages when you select some file for download.)


I've changed the label on the radio button to:
  Download MinSYS (MSYS-1.0.X.exe)
which I trust will allow the user to grab the correct binary.

Angus



Re: Windows installer --- software probe

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

Angus> Carl Dr. Kleffner wrote:
>>> One comment:
>>> 
>>> The reason I did not install minsys was that I did not know which
>>> file to download and install. There are listed hundreds on that
>>> web-site. Maybe you could list what file the user should grab?
>>> 
>>> Regards, Asger

>> I guess you mean msys - minimal gnu system: MSYS-1.0.10.exe on
>> http://www.mingw.org/download.shtml

Angus> That's correct. I want the user to grab msys-1.0.x.exe which
Angus> they can get from http://prdownloads.sf.net/mingw/ (the
Angus> download.shtml page takes you to the sf.net pages when you
Angus> select some file for download.)

What about this instead?
http://sourceforge.net/project/showfiles.php?group_id=2435_id=82721_id=158803

I think it is much simpler for newcomers. The only thing I am not sure
about is whether the release_id tag is stable with new versions.

JMarc


Re: Windows installer --- software probe

2005-06-06 Thread Angus Leeming

Jean-Marc Lasgouttes wrote:

What about this instead?
http://sourceforge.net/project/showfiles.php?group_id=2435_id=82721_id=158803

I think it is much simpler for newcomers. The only thing I am not sure
about is whether the release_id tag is stable with new versions.


Thanks, Jean-Marc. Let's do this for LyX 1.3.6 anyway. We can always 
reconsider for future releases.


Angus



Re: [PATCH 1.4] de.po update

2005-06-06 Thread Jean-Marc Lasgouttes
> "Michael" == Michael Schmitt <[EMAIL PROTECTED]> writes:

Michael> Hello, here comes another update for de.po. Please apply.

Done.

JMarc


Re: [Patch] Re: [patch] key event queue

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

| On Wed, Jun 01, 2005 at 03:12:05PM +0300, Martin Vermeer wrote:
>> On Wed, Jun 01, 2005 at 01:31:55PM +0200, Lars Gullik Bjønnes wrote:
>> > Martin Vermeer <[EMAIL PROTECTED]> writes:
>
| ...
|   
>> OK, that settles it then for me: put in the event queue and reverse the
>> new stuff in workAreaKeyPress to a simple showCursor call. Then everything
>> will be consistent, if slow.
>> 
>> I verified that this works properly using an old version of your event 
>> queue patch: doesn't lose keystrokes (except formally repeated ones), 
>> doesn't change their order, and doesn't produce cursor artefacts. 
>> 
>> Please commit your current version.
>
| Lars?

Please beat me too it...

Too many balls in the air right now...
(send the patch here first, and I'll do a quick review)

-- 
Lgb



Re: [PATCH] Bug 961: reintroduce LFUN_BIBDB_ADD/DEL

2005-06-06 Thread Jean-Marc Lasgouttes
> "Juergen" == Juergen Spitzmueller <[EMAIL PROTECTED]> writes:

Juergen> Juergen Spitzmueller wrote:
>> I'm not even sure I understand what LABEL_GOTO does (or is it
>> broken?)

Juergen> OK, now I do. This is really odd.

Odd in which sense?

JMarc


Re: [PATCH] Bug 961: reintroduce LFUN_BIBDB_ADD/DEL

2005-06-06 Thread Jean-Marc Lasgouttes
> "Juergen" == Juergen Spitzmueller <[EMAIL PROTECTED]> writes:

Juergen> Juergen Spitzmueller wrote:
>> > I'm not even sure I understand what LABEL_GOTO does (or is it
>> broken?)
>> 
>> OK, now I do. This is really odd.

Juergen> I think this menu entry is extremely irritating. How about
Juergen> the following patch, that does enable the entry only when it
Juergen> actually makes sense?

Yes, definitely good, although I would write:

+   case LFUN_LABEL_GOTO: {
+   flag.enabled(!cmd.argument.empty()
+   ||getInsetByCode(cursor_, InsetBase::REF_CODE)); 
+   break;

JMarc


Re: Script alternative - Ch

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

Angus> I really don't see why such a mini-dist would be an advantage.
Angus> What will happen is what has happened with Ruurd's equivalent
Angus> packaging of python. It fails to work as people add more
Angus> functionality to the scripts. Moreover, it will become "one
Angus> more thing" to maintain.

It depends on whether we can automate the process, I guess. In this
case it is just a new makefile target.

JMarc



Windows installer finished

2005-06-06 Thread Angus Leeming

Find it at http://www.devel.lyx.org/~leeming/lyx_setup_136.exe
It's 5.9MB in size.
It's fully internationalized although its messages still need to be translated.

If you're interested in doing so, you can grab the source from 
http://www.devel.lyx.org/~leeming/packaging.tar.bz2

It's 82kB in size.

Have a look at installer/lyx_languages/{french,german}.nsh which need 
translated versions of the 53 strings. Adding other languages is 
straightforward.


The archive unpacks to
packaging/
README
clean_dvi.py
package_lyxwin.sh
dtl/
README
Makefile
dt2dv.c
dt2dv.man
dtl.doc
dtl.h
dv2dt.c
dv2dt.man
dvi.doc
edited.txt
example.tex
hello.tex
man2ps
tripvdu.tex
icons/
lyx_32x32_16colors.png
lyx_32x32.png
lyx_doc_32x32_16colors.png
lyx_doc_32x32.png
lyx_doc.svg
lyx.svg
lyx_32x32.ico
lyx_doc_32x32.ico
installer/
lyx_languages/
english.nsh
french.nsh
german.nsh
abi_util_fileassoc.nsh
download.nsh
ioDownload.ini
ioSummary.ini
lyx_installer.nsi
lyx_path_prefix.C
is_user_admin.nsh
lyxfunc.nsh
strtrim.nsh

Angus



Re: Windows installer finished

2005-06-06 Thread Angus Leeming
Angus Leeming wrote:
> The archive unpacks to

I propose to add this tree as-is to development/Win32. OK?
Angus

> packaging/
>  README
>  clean_dvi.py
>  package_lyxwin.sh
>  dtl/
>  README
>  Makefile
>  dt2dv.c
>  dt2dv.man
>  dtl.doc
>  dtl.h
>  dv2dt.c
>  dv2dt.man
>  dvi.doc
>  edited.txt
>  example.tex
>  hello.tex
>  man2ps
>  tripvdu.tex
>  icons/
>  lyx_32x32_16colors.png
>  lyx_32x32.png
>  lyx_doc_32x32_16colors.png
>  lyx_doc_32x32.png
>  lyx_doc.svg
>  lyx.svg
>  lyx_32x32.ico
>  lyx_doc_32x32.ico
>  installer/
>  lyx_languages/
>  english.nsh
>  french.nsh
>  german.nsh
>  abi_util_fileassoc.nsh
>  download.nsh
>  ioDownload.ini
>  ioSummary.ini
>  lyx_installer.nsi
>  lyx_path_prefix.C
>  is_user_admin.nsh
>  lyxfunc.nsh
>  strtrim.nsh




Re: [Patch] Re: [patch] key event queue

2005-06-06 Thread Martin Vermeer
On Mon, 2005-06-06 at 11:46, Lars Gullik Bjønnes wrote:
> Martin Vermeer <[EMAIL PROTECTED]> writes:
> 
> | On Wed, Jun 01, 2005 at 03:12:05PM +0300, Martin Vermeer wrote:
> >> On Wed, Jun 01, 2005 at 01:31:55PM +0200, Lars Gullik Bjønnes wrote:
> >> > Martin Vermeer <[EMAIL PROTECTED]> writes:
> >
> | ...
> |   
> >> OK, that settles it then for me: put in the event queue and reverse the
> >> new stuff in workAreaKeyPress to a simple showCursor call. Then everything
> >> will be consistent, if slow.
> >> 
> >> I verified that this works properly using an old version of your event 
> >> queue patch: doesn't lose keystrokes (except formally repeated ones), 
> >> doesn't change their order, and doesn't produce cursor artefacts. 
> >> 
> >> Please commit your current version.
> >
> | Lars?
> 
> Please beat me too it...
> 
> Too many balls in the air right now...
> (send the patch here first, and I'll do a quick review)

Attached.

- Martin

Index: ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v
retrieving revision 1.2193
diff -u -p -r1.2193 ChangeLog
--- ChangeLog	6 Jun 2005 08:30:19 -	1.2193
+++ ChangeLog	6 Jun 2005 11:53:47 -
@@ -1,3 +1,8 @@
+2005-06-06  Martin Vermeer  <[EMAIL PROTECTED]>
+
+	* BufferView_pimpl.C: revert to showCursor in connection with
+	Lars's front-end stack
+
 2005-06-06  J�Spitzm� <[EMAIL PROTECTED]>
 
 	* text.C (redoParagraph): move cursor right after a bibitem 
Index: BufferView_pimpl.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/BufferView_pimpl.C,v
retrieving revision 1.584
diff -u -p -r1.584 BufferView_pimpl.C
--- BufferView_pimpl.C	31 May 2005 14:40:23 -	1.584
+++ BufferView_pimpl.C	6 Jun 2005 11:53:48 -
@@ -520,12 +520,8 @@ void BufferView::Pimpl::workAreaKeyPress
 	 * of the cursor. Note we cannot do this inside
 	 * dispatch() itself, because that's called recursively.
 	 */
-	if (available()) {
-		screen().prepareCursor();
-		cursor_timeout.setTimeout(100);
-		cursor_timeout.restart();
-		cursor_timeout.setTimeout(400);
-	}
+	if (available())
+		screen().showCursor(*bv_);
 }
 
 
Index: frontends/qt2/ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/ChangeLog,v
retrieving revision 1.789
diff -u -p -r1.789 ChangeLog
--- frontends/qt2/ChangeLog	3 Jun 2005 09:25:45 -	1.789
+++ frontends/qt2/ChangeLog	6 Jun 2005 11:53:48 -
@@ -1,3 +1,10 @@
+2005-06-06  Lars Gullik Bjonnes  <[EMAIL PROTECTED]>
+	(Committed Martin Vermeer <[EMAIL PROTECTED]>)
+
+	* QContentPane.[Ch]: implement keystroke event stack with
+	repeat key "regulation". Key are not sent to LyX core faster
+	than rendering can handle. 
+
 2005-06-03  J�Spitzm� <[EMAIL PROTECTED]>
 
 	* QContentPane.[Ch]: Limit the QIM*Events to X11. They are not
Index: frontends/qt2/QContentPane.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/QContentPane.C,v
retrieving revision 1.34
diff -u -p -r1.34 QContentPane.C
--- frontends/qt2/QContentPane.C	3 Jun 2005 09:25:46 -	1.34
+++ frontends/qt2/QContentPane.C	6 Jun 2005 11:53:48 -
@@ -19,7 +19,6 @@
 
 #include 
 #include 
-#include 
 
 #include 
 
@@ -90,6 +89,8 @@ QContentPane::QContentPane(QWorkArea * p
 		boost::bind(::generateSyntheticMouseEvent,
 			this));
 
+	connect(_timer_, SIGNAL(timeout()), SLOT(keyeventTimeout()));
+
 	setFocusPolicy(QWidget::WheelFocus);
 	setFocus();
 	setCursor(ibeamCursor);
@@ -101,6 +102,9 @@ QContentPane::QContentPane(QWorkArea * p
 	// stupid moc strikes again
 	connect(wa_->scrollbar_, SIGNAL(valueChanged(int)),
 		this, SLOT(scrollBarChanged(int)));
+
+	// Start the timer, one-shot.
+	step_timer_.start(25, true);
 }
 
 
@@ -251,9 +255,35 @@ void QContentPane::wheelEvent(QWheelEven
 
 void QContentPane::keyPressEvent(QKeyEvent * e)
 {
+	keyeventQueue_.push(boost::shared_ptr(new QKeyEvent(*e)));
+}
+
+
+void QContentPane::keyeventTimeout()
+{
+	bool handle_autos = true;
+
+	while (!keyeventQueue_.empty()) {
+		boost::shared_ptr ev = keyeventQueue_.front();
+
+		// We never handle more than one auto repeated
+		// char in a list of queued up events.
+		if (!handle_autos && ev->isAutoRepeat()) {
+			keyeventQueue_.pop();
+			continue;
+		}
+
 	boost::shared_ptr sym(new QLyXKeySym);
-	sym->set(e);
-	wa_->workAreaKeyPress(sym, q_key_state(e->state()));
+		sym->set(ev.get());
+
+		wa_->workAreaKeyPress(sym, q_key_state(ev->state()));
+		keyeventQueue_.pop();
+
+		handle_autos = false;
+	}
+
+	// Restart the timer.
+	step_timer_.start(25, true);
 }
 
 
Index: frontends/qt2/QContentPane.h
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/QContentPane.h,v
retrieving revision 1.16
diff -u -p -r1.16 QContentPane.h
--- 

Re: [Patch] Re: [patch] key event queue

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

I am fine with this.
(I'd better be...)

-- 
Lgb



[patch] fix bug 1665

2005-06-06 Thread Georg Baum
Attached is a tested, working 1.3 patch that fixes bug 1665, following an
idea of Jean-Marc (see http://bugzilla.lyx.org/show_bug.cgi?id=1665). I
know that this is no crash, but it is very annoying for me (because we
produce many of our documents via commandline export), so I fixed it
nevertheless.
I propose to apply this both to 1.3 and 1.4. OK?


GeorgIndex: src/mathed/ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/ChangeLog,v
retrieving revision 1.299.2.21
diff -u -p -r1.299.2.21 ChangeLog
--- src/mathed/ChangeLog	26 Apr 2005 10:00:58 -	1.299.2.21
+++ src/mathed/ChangeLog	6 Jun 2005 12:06:10 -
@@ -1,3 +1,10 @@
+2005-06-06  Georg Baum  <[EMAIL PROTECTED]>
+
+	* math_parser.h (latexkeys): new member requires
+	* math_factory.C (initSymbols): fill the requires field for fonts
+	* math_symbolinset.C (validate): use sym_->requires instead of
+	sym_->inset (fixes bug 1665)
+
 2005-04-26  Georg Baum  <[EMAIL PROTECTED]>
 
 	* math_cursor.C (interpret): treat & as special character (fixes
Index: src/mathed/math_factory.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_factory.C,v
retrieving revision 1.70.2.2
diff -u -p -r1.70.2.2 math_factory.C
--- src/mathed/math_factory.C	7 Dec 2004 10:49:53 -	1.70.2.2
+++ src/mathed/math_factory.C	6 Jun 2005 12:06:11 -
@@ -144,6 +144,12 @@ void initSymbols()
 			// tmp.inset _is_ the fontname here.
 			// create fallbacks if necessary
 
+			// store requirements as long as we can
+			if (tmp.inset == "msa" || tmp.inset == "msb")
+tmp.requires = "amssymb";
+			else if (tmp.inset == "wasy")
+tmp.requires = "wasysym";
+
 			// symbol font is not available sometimes
 			string symbol_font = "lyxsymbol";
 
Index: src/mathed/math_parser.h
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_parser.h,v
retrieving revision 1.52.2.1
diff -u -p -r1.52.2.1 math_parser.h
--- src/mathed/math_parser.h	7 Dec 2004 10:50:01 -	1.52.2.1
+++ src/mathed/math_parser.h	6 Jun 2005 12:06:11 -
@@ -39,6 +39,8 @@ struct latexkeys {
 	string extra;
 	/// how is this called as XML entity?
 	string xmlname;
+	/// required LaTeXFeatures
+	string requires;
 };
 
 
Index: src/mathed/math_symbolinset.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_symbolinset.C,v
retrieving revision 1.52.2.4
diff -u -p -r1.52.2.4 math_symbolinset.C
--- src/mathed/math_symbolinset.C	19 Jan 2005 11:46:53 -	1.52.2.4
+++ src/mathed/math_symbolinset.C	6 Jun 2005 12:06:11 -
@@ -122,10 +122,8 @@ bool MathSymbolInset::takesLimits() cons
 
 void MathSymbolInset::validate(LaTeXFeatures & features) const
 {
-	if (sym_->inset == "msa" || sym_->inset == "msb")
-		features.require("amssymb");
-	else if (sym_->inset == "wasy")
-		features.require("wasysym");
+	if (!sym_->requires.empty())
+		features.require(sym_->requires);
 }
 
 


Re: Windows installer finished

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

Angus> Angus Leeming wrote:
>> The archive unpacks to

Angus> I propose to add this tree as-is to development/Win32. 

Be careful with binary status of the files in cvs. Also, binary files
mean that patch-1.3.6 will not work reliably.

JMarc


Re: [patch] fix bug 1665

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

Georg> Attached is a tested, working 1.3 patch that fixes bug 1665,
Georg> following an idea of Jean-Marc (see
Georg> http://bugzilla.lyx.org/show_bug.cgi?id=1665). I know that this
Georg> is no crash, but it is very annoying for me (because we produce
Georg> many of our documents via commandline export), so I fixed it
Georg> nevertheless. I propose to apply this both to 1.3 and 1.4. OK?

This is OK for 1.3.x.

JMarc


Re: [Patch] Re: [patch] key event queue

2005-06-06 Thread Martin Vermeer
On Mon, 2005-06-06 at 15:17, Lars Gullik Bjønnes wrote:
> Martin Vermeer <[EMAIL PROTECTED]> writes:
> 
> I am fine with this.
> (I'd better be...)

Done.

- Martin



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


Re: [PATCH] Bug 961: reintroduce LFUN_BIBDB_ADD/DEL

2005-06-06 Thread Juergen Spitzmueller
Jean-Marc Lasgouttes wrote:
> >> I'm not even sure I understand what LABEL_GOTO does (or is it
> >> broken?)
>
> Juergen> OK, now I do. This is really odd.
>
> Odd in which sense?

Let me put it like this: It's not what I would have expected (though I see its 
use).

Jürgen


Re: Windows installer finished

2005-06-06 Thread Angus Leeming
Jean-Marc Lasgouttes wrote:
> Angus> I propose to add this tree as-is to development/Win32.
> 
> Be careful with binary status of the files in cvs.

OK, but that warning applies only to these files in the icons directory.
   lyx_32x32_16colors.png
   lyx_32x32.png
   lyx_doc_32x32_16colors.png
   lyx_doc_32x32.png
   lyx_32x32.ico
   lyx_doc_32x32.ico

> Also, binary files mean that patch-1.3.6 will not work reliably.

I don't follow. Could you explain further?

-- 
Angus



Re: Windows installer finished

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

>> Also, binary files mean that patch-1.3.6 will not work reliably.

Angus> I don't follow. Could you explain further?

Binary file do not appear in patches. Therefore 
  LyX 1.3.5 + patch-1.3.6 != LyX 1.3.6

JMarc


Re: Windows installer finished

2005-06-06 Thread Lars Gullik Bjønnes
Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:

>> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:
>
>>> Also, binary files mean that patch-1.3.6 will not work reliably.
>
| Angus> I don't follow. Could you explain further?
>
| Binary file do not appear in patches. Therefore 
|   LyX 1.3.5 + patch-1.3.6 != LyX 1.3.6

That would require something like xdelta.

-- 
Lgb



Re: [PATCH] Bug 961: reintroduce LFUN_BIBDB_ADD/DEL

2005-06-06 Thread Juergen Spitzmueller
Jean-Marc Lasgouttes wrote:
> Yes, definitely good, although I would write:
>
> +   case LFUN_LABEL_GOTO: {
> +   flag.enabled(!cmd.argument.empty()
> +       ||getInsetByCode(cursor_,
> InsetBase::REF_CODE)); +   break;

I did so and committed.

Thanks,
Jürgen


Re: [PATCH] Bug 961: reintroduce LFUN_BIBDB_ADD/DEL

2005-06-06 Thread Juergen Spitzmueller
Juergen Spitzmueller wrote:
> http://bugzilla.lyx.org/show_bug.cgi?id=961
>
> The attached patch reimplements those lfuns. It also fixes
> InsetBibtex::delDatabase, which is broken in 1.3.
>
> The only drawback is that the lfuns are not working when the cursor sits
> behind the inset. The same applies to 1.3. The reason is that
> getInsetByCode stops at the end of the document.

Attached is a third (and IMHO final) version that fixes all drawbacks and 
additionally also fixes a problem in InsetBibtex::addDatabase, which did not 
add a database when its name was a substring of another database (e.g. 
"mybib" vs. "mybib2").

OK to apply?

Jürgen
Index: BufferView_pimpl.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/BufferView_pimpl.C,v
retrieving revision 1.586
diff -u -r1.586 BufferView_pimpl.C
--- BufferView_pimpl.C	6 Jun 2005 13:11:29 -	1.586
+++ BufferView_pimpl.C	6 Jun 2005 13:21:07 -
@@ -51,6 +51,7 @@
 #include "undo.h"
 #include "vspace.h"
 
+#include "insets/insetbibtex.h"
 #include "insets/insetref.h"
 #include "insets/insettext.h"
 
@@ -128,9 +129,20 @@
 {
 	T * inset = 0;
 	DocIterator it = cur;
-	if (it.nextInset() &&
-	it.nextInset()->lyxCode() == code) {
-		inset = static_cast(it.nextInset());
+	T * first_inset = static_cast(it.nextInset());
+	while (it) {
+		if (!it.nextInset()) {
+			// try from the beginning, but break after one loop
+			it.pit() = 0;
+			it.pos() = 0;
+			if (!it.nextInset() || it.nextInset() == first_inset)
+break;
+		}
+		if (it.nextInset()->lyxCode() == code) {
+			inset = static_cast(it.nextInset());
+			break;
+		}
+		it.forwardInset();
 	}
 	return inset;
 }
@@ -982,6 +994,8 @@
 	case LFUN_MARK_ON:
 	case LFUN_SETMARK:
 	case LFUN_CENTER:
+	case LFUN_BIBDB_ADD:
+	case LFUN_BIBDB_DEL:
 	case LFUN_WORDS_COUNT:
 		flag.enabled(true);
 		break;
@@ -1212,6 +1226,24 @@
 	case LFUN_CENTER:
 		center();
 		break;
+
+	case LFUN_BIBDB_ADD: {
+		InsetBibtex * inset =
+			getInsetByCode(cursor_,
+			 InsetBase::BIBTEX_CODE);
+		if (inset)
+			inset->addDatabase(cmd.argument);
+		break;
+	}
+
+	case LFUN_BIBDB_DEL: {
+		InsetBibtex * inset =
+			getInsetByCode(cursor_,
+			 InsetBase::BIBTEX_CODE);
+		if (inset)
+			inset->delDatabase(cmd.argument);
+		break;
+	}
 
 	case LFUN_WORDS_COUNT: {
 		DocIterator from, to;
Index: LyXAction.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/LyXAction.C,v
retrieving revision 1.206
diff -u -r1.206 LyXAction.C
--- LyXAction.C	8 May 2005 10:02:37 -	1.206
+++ LyXAction.C	6 Jun 2005 13:21:08 -
@@ -188,6 +188,8 @@
 		{ LFUN_INSERT_LABEL, "label-insert", Noop },
 		{ LFUN_INSET_OPTARG, "optional-insert", Noop },
 		{ LFUN_INSERT_BIBITEM, "bibitem-insert", Noop },
+		{ LFUN_BIBDB_ADD, "bibtex-database-add", Noop },
+		{ LFUN_BIBDB_DEL, "bibtex-database-del", Noop },
 		{ LFUN_INSERT_LINE, "line-insert", Noop },
 		{ LFUN_INSERT_PAGEBREAK, "pagebreak-insert", Noop },
 		{ LFUN_LANGUAGE, "language", Noop },
Index: lfuns.h
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lfuns.h,v
retrieving revision 1.41
diff -u -r1.41 lfuns.h
--- lfuns.h	8 May 2005 10:02:37 -	1.41
+++ lfuns.h	6 Jun 2005 13:21:08 -
@@ -355,6 +355,8 @@
 	// 270
 	LFUN_WORDS_COUNT,
 	LFUN_OUTPUT_CHANGES, // jspitzm 20050121
+	LFUN_BIBDB_ADD,
+	LFUN_BIBDB_DEL,
 
 	LFUN_LASTACTION  // end of the table
 };
Index: insets/insetbibtex.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetbibtex.C,v
retrieving revision 1.54
diff -u -r1.54 insetbibtex.C
--- insets/insetbibtex.C	17 May 2005 11:11:45 -	1.54
+++ insets/insetbibtex.C	6 Jun 2005 13:21:13 -
@@ -271,7 +271,7 @@
 bool InsetBibtex::addDatabase(string const & db)
 {
 	string contents(getContents());
-	if (!contains(contents, db)) {
+	if (tokenPos(contents, ',', db) == -1) {
 		if (!contents.empty())
 			contents += ',';
 		setContents(contents + db);
@@ -283,16 +283,17 @@
 
 bool InsetBibtex::delDatabase(string const & db)
 {
-	if (contains(getContents(), db)) {
+	string contents(getContents());
+	if (contains(contents, db)) {
+		int const n = tokenPos(contents, ',', db);
 		string bd = db;
-		int const n = tokenPos(getContents(), ',', bd);
 		if (n > 0) {
-			// Weird code, would someone care to explain this?(Lgb)
-			string tmp(", ");
-			tmp += bd;
-			setContents(subst(getContents(), tmp, ", "));
+			// this is not the first database
+			string tmp = ',' + bd;
+			setContents(subst(contents, tmp, ""));
 		} else if (n == 0)
-			setContents(split(getContents(), bd, ','));
+			// this is the first (or only) database
+			setContents(split(contents, bd, ','));
 		else
 			return false;
 	}


Re: Windows installer finished

2005-06-06 Thread Angus Leeming
Jean-Marc Lasgouttes wrote:
>>> Also, binary files mean that patch-1.3.6 will not work reliably.
> Angus> I don't follow. Could you explain further?
> Binary file do not appear in patches. Therefore
>   LyX 1.3.5 + patch-1.3.6 != LyX 1.3.6

`diff -a` ?

That's true for more than just the files I've just added however. All of
the following are flagged as binary in the 1.3.x tree:

development/Win32/packaging/icons/lyx_32x32.ico
development/Win32/packaging/icons/lyx_32x32.png
development/Win32/packaging/icons/lyx_32x32_16colors.png
development/Win32/packaging/icons/lyx_doc_32x32.ico
development/Win32/packaging/icons/lyx_doc_32x32.png
development/Win32/packaging/icons/lyx_doc_32x32_16colors.png
development/lyxserver/perl/LyX-Client-0.01.tar.gz
development/lyxserver/perl/LyX-Polite-0.01.tar.gz
lib/images/banner.ppm

Moreover, the problem will only get worse when the 498 .xpm files in
lib/images are converted to .png format the day we drop XForms.

-- 
Angus



Re:Windows installer finished

2005-06-06 Thread Uwe Stöhr

Angus Leeming wrote:

> Find it at http://www.devel.lyx.org/~leeming/lyx_setup_136.exe

Hi Angus,

first many thanks for your work. I tested it and have the following 
annotations:


- Your installer asks for several programs. If one of these are not 
present, the installer opens the download/install webpage of the 
programs but jumps to the next step without waiting until the missing 
program is installed.


- Is it really necessary to install msys, perl and phthon fully? Its 
download size is huge (23 MB for Perl + Python) for modem/ISDN users. 
Ruurd only used the executables perl.exe, python.exe and sh.exe. Is it 
possible to include them to the installer package? Because it would ease 
the installation a lot.


- While LyX reconfigures, it doesn't recognize acrobat:

+checking for "acrobat"... no

altough it is installed on my system. The reason is that the acrobat.exe 
istn't in the PATH but in the registry (as most of Win programs) under


HKEY_LOCAL_MACHINE\Software\Classes\Applications\

Is it possible to search the registry for this entry? Acroread under Win 
is stored in the same registry path.


- I installed LyX with admin permissions and it appeared with german 
menus like I wanted. But when I change to a user account it appeared 
with english menus. To get german ones for the user account I had to 
create a new environment variable named "LANG" with the value "de_DE" as 
described at Ruurds LyX-webpage. Is it possible to add this variable 
automatically for every user account?


- At last a crash report of your LyX 1.3.6CVS version:
Go to Edit -> Preferences, choose "Paths" and press one of the "Browse" 
buttons for the working directories. Result CRASH:


lyx: SIGSEGV signal caught
Sorry, you have found a bug in LyX. Please read the bug-reporting 
instructions i

n Help->Introduction and send us a bug report, if necessary. Thanks !
Bye.

abnormal program termination


That's all for the moment.

thanks for the installer again and regards
Uwe

p.s. Please CC all replies to my email adress as I'm not on the 
lyx-devel list.


Re: Windows installer finished

2005-06-06 Thread Angus Leeming
On Monday 06 June 2005 14:38, Uwe Stöhr wrote:
> Angus Leeming wrote:
>  > Find it at http://www.devel.lyx.org/~leeming/lyx_setup_136.exe
>
> Hi Angus,
>
> first many thanks for your work. I tested it and have the following
> annotations:
>
> - Your installer asks for several programs. If one of these are not
> present, the installer opens the download/install webpage of the
> programs but jumps to the next step without waiting until the
> missing program is installed.

Yes. But once you've grabbed everything it asks you to restart the LyX 
installer so that it can find your newly installed packages.

> - Is it really necessary to install msys, perl and phthon fully?

No. You need Perl only if you're going to use reLyX. I tried to 
explain that in the accompanying commentary.

> Its download size is huge (23 MB for Perl + Python) for modem/ISDN
> users. Ruurd only used the executables perl.exe, python.exe and
> sh.exe. Is it possible to include them to the installer package?

Just thinking out loud...
Perhaps:
[x] Download the official Python distribution
[ ] Install a stripped-down and maybe "good enough" Python.exe

But this will involve me in a lot more work with NSIS getting to grips 
with optional installation of components. I'm running out of 
LyX-time. I'm also running out of NSIS-enthusiasm.

> Because it would ease the installation a lot.
>
> - While LyX reconfigures, it doesn't recognize acrobat:
>
> +checking for "acrobat"... no
>
> altough it is installed on my system. The reason is that the
> acrobat.exe istn't in the PATH but in the registry (as most of Win
> programs) under
>
> HKEY_LOCAL_MACHINE\Software\Classes\Applications\
>
> Is it possible to search the registry for this entry? Acroread
> under Win is stored in the same registry path.

I could, but where do I stop? Acroread certainly isn't required to get 
LyX running and we already have 6 download pages and a complaint that 
we're downloading too much stuff...

It's the sort of thing that really belongs in the configure script 
(which needs to be rewritten in some other language if it is to 
understand the registry...)

> - I installed LyX with admin permissions and it appeared with
> german menus like I wanted. But when I change to a user account it
> appeared with english menus. To get german ones for the user
> account I had to create a new environment variable named "LANG"
> with the value "de_DE" as described at Ruurds LyX-webpage. Is it
> possible to add this variable automatically for every user account?

It may be possible, but I don't know how...

> - At last a crash report of your LyX 1.3.6CVS version:
> Go to Edit -> Preferences, choose "Paths" and press one of the
> "Browse" buttons for the working directories. Result CRASH:

Thank you. I see it on linux too.

> That's all for the moment.
>
> thanks for the installer again and regards
> Uwe
>
> p.s. Please CC all replies to my email adress as I'm not on the
> lyx-devel list.

Angus



Re: Windows installer finished

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

>> - While LyX reconfigures, it doesn't recognize acrobat:
>> 
>> +checking for "acrobat"... no
>> 
>> altough it is installed on my system. The reason is that the
>> acrobat.exe istn't in the PATH but in the registry (as most of Win
>> programs) under
>> 
>> HKEY_LOCAL_MACHINE\Software\Classes\Applications\
>> 
>> Is it possible to search the registry for this entry? Acroread
>> under Win is stored in the same registry path.

Angus> I could, but where do I stop? Acroread certainly isn't required
Angus> to get LyX running and we already have 6 download pages and a
Angus> complaint that we're downloading too much stuff...

Angus> It's the sort of thing that really belongs in the configure
Angus> script (which needs to be rewritten in some other language if
Angus> it is to understand the registry...)

What should be done if possible is to check whether there is an
association for .pdf files. In this case, "start" (with appropriate
options) should be used as a viewer. Actually, it may be possible to
do that on win 2k/xp from a shell script. Does NSIS offer support for
querying such things? Another solution would be to have code in LyX
packaging to do this kind of things (and for MacOSX too).

JMarc


Re: Windows installer finished

2005-06-06 Thread Angus Leeming
On Monday 06 June 2005 14:38, Uwe Stöhr wrote:
> - At last a crash report of your LyX 1.3.6CVS version:
> Go to Edit -> Preferences, choose "Paths" and press one of the
> "Browse" buttons for the working directories. Result CRASH:

Fixed in 1.3.x CVS.

Angus


Re: Windows installer finished

2005-06-06 Thread Angus Leeming
On Monday 06 June 2005 14:38, you wrote:
> - Your installer asks for several programs. If one of these are not
> present, the installer opens the download/install webpage of the
> programs but jumps to the next step without waiting until the
> missing program is installed.
>
> - Is it really necessary to install msys, perl and phthon fully?

Also, why not point the installer to the folder containing Ruurd's 
stripped down versions? Or something equivalent.

Basically, I don't want to commit myself to creating, testing and 
maintaining these things. If some Windows user has the motivation, 
then that's great. I can certainly adapt the installer to open up a 
web page pointing to the stripped down version in addition to the 
official version.

Angus



Re: Windows installer finished

2005-06-06 Thread Uwe Stöhr

Angus Leeming wrote:


Its download size is huge (23 MB for Perl + Python) for modem/ISDN
users. Ruurd only used the executables perl.exe, python.exe and
sh.exe. Is it possible to include them to the installer package?


Just thinking out loud...
Perhaps:
[x] Download the official Python distribution
[ ] Install a stripped-down and maybe "good enough" Python.exe


I prefer the latter one as it saves a lot of installation time and hard 
disk space. But why should it be installed? Isn't it possible to add an 
actual version of perl.exe, python.exe and sh.exe (and some dll's if 
needed) to the folder LyX\bin\ and use these files for lyxrc.defaults by 
default (as Ruurd did)? This solution shouldn't produce NSIS troubles.



Is it possible to search the registry for this entry? Acroread
under Win is stored in the same registry path.


I could, but where do I stop? Acroread certainly isn't required to get 
LyX running and we already have 6 download pages and a complaint that 
we're downloading too much stuff...


My proposal for python etc. above would reduce it to 3 download pages. 
And you don't need to ask for installing acrobat/acroread as it is 
installed on 99% of Win PC's. It is enough to check if the program is 
installed and add the excutable to the viewers for PDF in the preferences.


---

I forgot to ask you how you handle the math fonts. I didn't see that 
they were installed. Just copy them to the \Windows\Fonts directory 
isn't enough, but I don't know how to invoke the correct installation by 
the command line. So it is OK if the user has to install them manually 
before installing LyX.
Btw. Ekkehardt Schlicht created a special font package using the BaKoMa 
math fonts:


http://wiki.lyx.org/uploads/LyX/WindowsSetup/bakoma4lyx.zip

But they are not free for commercial use as written in the license.

regards Uwe


Re: Windows installer finished

2005-06-06 Thread Angus Leeming
Jean-Marc Lasgouttes wrote:
>>> - While LyX reconfigures, it doesn't recognize acrobat:
>>> 
>>> +checking for "acrobat"... no
>>> 
>>> altough it is installed on my system. The reason is that the
>>> acrobat.exe istn't in the PATH but in the registry (as most of Win
>>> programs) under
>>> 
>>> HKEY_LOCAL_MACHINE\Software\Classes\Applications\
>>> 
>>> Is it possible to search the registry for this entry? Acroread
>>> under Win is stored in the same registry path.
> 
> Angus> I could, but where do I stop? Acroread certainly isn't required
> Angus> to get LyX running and we already have 6 download pages and a
> Angus> complaint that we're downloading too much stuff...
> 
> Angus> It's the sort of thing that really belongs in the configure
> Angus> script (which needs to be rewritten in some other language if
> Angus> it is to understand the registry...)
> 
> What should be done if possible is to check whether there is an
> association for .pdf files. In this case, "start" (with appropriate
> options) should be used as a viewer.

See development/Win32/packaging/installer/lyx_path_prefix.C which adds
shell code to the configure script to generate a path_prefix entry in
lyxrc.defaults and which goes on to use "start" to run "sh.exe configure".

It would be quite simple to add more functions to this .dll. Perhaps:
  add_path_prefix()
  add_viewer()
  run_configure()

but I'm getting a little edgy about all this. It appears that the goal is 
getting wider and wider. That means more work (primarily for me, it would
appear), more chance of bugs and no great benefit AFAICS.

I also don't think that we have to do everything this time around.
Moreover, I think we're forgetting that our users are capable individuals
who can do stuff themselves too...

> Actually, it may be possible to 
> do that on win 2k/xp from a shell script. Does NSIS offer support for
> querying such things? Another solution would be to have code in LyX
> packaging to do this kind of things (and for MacOSX too).
> 
> JMarc

-- 
Angus



Re: Windows installer finished

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

Angus> See development/Win32/packaging/installer/lyx_path_prefix.C
Angus> which adds shell code to the configure script to generate a
Angus> path_prefix entry in lyxrc.defaults and which goes on to use
Angus> "start" to run "sh.exe configure".

That's evil, isn't it? ;)

As far as adding prefs for windows is concerned, one possibility is to
provide a preference file that contains everything needed by
LyX/Win32. Generating this file is probably easier than hacking
lib/configure. LyX/Mac follows this route (provide a preconfigured
preference file).

Angus> but I'm getting a little edgy about all this. It appears that
Angus> the goal is getting wider and wider. That means more work
Angus> (primarily for me, it would appear), more chance of bugs and no
Angus> great benefit AFAICS.

Yes.

Angus> I also don't think that we have to do everything this time
Angus> around. Moreover, I think we're forgetting that our users are
Angus> capable individuals who can do stuff themselves too...

I think you have to draw a line at some point. Fell free to do it. 

JMarc


Re: Windows installer finished

2005-06-06 Thread Uwe Stöhr

Angus Leeming wrote:


- Is it really necessary to install msys, perl and phthon fully?


Also, why not point the installer to the folder containing Ruurd's 
stripped down versions? Or something equivalent.


That's a good solution.

Basically, I don't want to commit myself to creating, testing and 
maintaining these things.


I understand you.

I can certainly adapt the installer to open up a 
web page pointing to the stripped down version in addition to the 
official version.


I'll create a wiki page with all needed files.

I think we need

- perl.exe
- perlx.dll
- phython.exe
- pythonxx.dll
- sh.exe

What other files are needed?

regards Uwe


Re: Windows installer finished

2005-06-06 Thread Angus Leeming
On Monday 06 June 2005 15:54, Uwe Stöhr wrote:
> > I can certainly adapt the installer to open up a
> > web page pointing to the stripped down version in addition to the
> > official version.
>
> I'll create a wiki page with all needed files.
>
> I think we need
>
> - perl.exe
> - perlx.dll
> - phython.exe
> - pythonxx.dll
> - sh.exe
>
> What other files are needed?

That's precisely my point. I don't know. Off the top of my head:

sed, tr, cut, grep...

Angus



Re: Windows installer finished

2005-06-06 Thread Angus Leeming
On Monday 06 June 2005 15:39, Uwe Stöhr wrote:
> Angus Leeming wrote:
> >>Its download size is huge (23 MB for Perl + Python) for
> >> modem/ISDN users. Ruurd only used the executables perl.exe,
> >> python.exe and sh.exe. Is it possible to include them to the
> >> installer package?
> >
> > Just thinking out loud...
> > Perhaps:
> > [x] Download the official Python distribution
> > [ ] Install a stripped-down and maybe "good enough" Python.exe
>
> I prefer the latter one as it saves a lot of installation time and
> hard disk space. But why should it be installed?

I think we have a terminology confusion. To me, "installed" just means 
"unpack it somewhere usable". The registry is a [EMAIL PROTECTED] nightmare for 
which I see little need. 

> Isn't it possible to add an actual version of perl.exe, python.exe
> and sh.exe (and some dll's if needed) to the folder LyX\bin\ and use
> these files for lyxrc.defaults by default (as Ruurd did)? This
> solution shouldn't produce NSIS troubles.

This solution will require
1. Extensive testing to ascertain which modules are needed by the 
scripts that LyX packages.
2. Ongoing maintenance.

Moreover, if I already have the "official" stuff installed why would I 
want to use the "unoffical" stuff? Adding code to NSIS to 
conditionally install something is most certainly a "NSIS trouble" 
that I'm keen to avoid right now.

> >>Is it possible to search the registry for this entry? Acroread
> >>under Win is stored in the same registry path.
> >
> > I could, but where do I stop? Acroread certainly isn't required
> > to get LyX running and we already have 6 download pages and a
> > complaint that we're downloading too much stuff...
>
> My proposal for python etc. above would reduce it to 3 download
> pages.

No it wouldn't. It would just change three of them to:

Would you prefer to use these stripped down things that people 
have been discovering don't work (see countleess reports on the 
lyx-users list), or would you prefer to use an official version which 
definitely will work but which requires a big download committment.

> And you don't need to ask for installing acrobat/acroread as 
> it is installed on 99% of Win PC's. It is enough to check if the
> program is installed and add the excutable to the viewers for PDF
> in the preferences.

I'd rather reuse the code I do have than rewrite something especially 
for acroroead...

> I forgot to ask you how you handle the math fonts. I didn't see
> that they were installed. Just copy them to the \Windows\Fonts
> directory isn't enough, but I don't know how to invoke the correct
> installation by the command line. So it is OK if the user has to
> install them manually before installing LyX.

I do nothing about math fonts. Nor do I plan to do anything about math 
fonts before LyX 1.3.6 is released. I think that we should focus on 
getting what we have to work rather than trying to get it to do more 
and more and more.

> Btw. Ekkehardt Schlicht created a special font package using the 
> BaKoMa math fonts:
> http://wiki.lyx.org/uploads/LyX/WindowsSetup/bakoma4lyx.zip
> But they are not free for commercial use as written in the license.

I seem to remember that the consencus was that the licence was too 
restrictive for us to distribute them.

Angus



Re: LyX meeting in Paris. What about July 14-18?

2005-06-06 Thread Juergen Vigna

I already bought my tickets today, so most probably we will meet up in Paris 
#:O)

~Jürgen

--
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._
Dr. Jürgen VignaE-Mail:  [EMAIL PROTECTED]
Mitterstrich 151/A
I-39050 SteineggWeb: http://www.lyx.org/~jug
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._


Re: Windows installer: NSIS vs .msi

2005-06-06 Thread Rex Dieter

Angus Leeming wrote:

But this will involve me in a lot more work with NSIS getting to grips 
with optional installation of components. I'm running out of 
LyX-time. I'm also running out of NSIS-enthusiasm.


While having any sort of installer is better than none at all, I'd 
suggest future effort re: Windows installers aim for an .msi target 
(Microsoft Installer) format.


Then, those of us in AD environments can enjoy pain-free deployment to 
(all) client machines.  (-:


-- Rex

p.s.  I'll be doing it myself for lyx-1.3.6 as a proof-of-concept (using 
the Advanced Installer tool).




  1   2   >