Re: [patch] bug 3226: labels in caption insets don't have a prefix

2007-03-16 Thread Jürgen Spitzmüller
Abdelrazak Younes wrote:
 With my last patch we don't need to check explicitly for the
 LABEL_SENSITIVE because everything within a float (or a wrap) will get
 the label prefix, LABEL_SENSITIVE or not.

I don't think that's a good idea. There might be other things than the caption 
inside floats that need a different prettyref prefix, anything with a 
counter. 

I think only captions should get the fig/tab/alg prefix.

Jürgen


Re: [patch] bug 3226: labels in caption insets don't have a prefix

2007-03-16 Thread Jean-Marc Lasgouttes
 Jürgen == Jürgen Spitzmüller [EMAIL PROTECTED] writes:

Jürgen Abdelrazak Younes wrote:
 With my last patch we don't need to check explicitly for the
 LABEL_SENSITIVE because everything within a float (or a wrap) will
 get the label prefix, LABEL_SENSITIVE or not.

Jürgen I don't think that's a good idea. There might be other things
Jürgen than the caption inside floats that need a different prettyref
Jürgen prefix, anything with a counter.

Jürgen I think only captions should get the fig/tab/alg prefix.

+1

JMarc


Re: crash in TocBackend::updateItem

2007-03-16 Thread Jean-Marc Lasgouttes
 Bernhard == Bernhard Roider [EMAIL PROTECTED] writes:

 By the way 3: typing return at the beginning of a theorem does not
 behave like in section, is this normal?

Bernhard Are environment layouts handled different from paragraph
Bernhard layouts?

Yes.

Bernhard By the way: I would prefer if consecutive paragraphs with
Bernhard the same environment layout would _not_ be merged into one
Bernhard environment. I'm not happy with putting a separator
Bernhard paragraph in between two subsequent definitions,
Bernhard theorems,... . If an environment should contain more than
Bernhard one paragraph then it's IMO better to make them paragraphs
Bernhard with standard layout and increase the environment depth.

I now tend to think we should do that indeed, but it is a file format
change. The only case where it really makes sense is for lists.

JMarc


Re: About Date inset in the external dialog

2007-03-16 Thread Jean-Marc Lasgouttes
 Uwe == Uwe Stöhr [EMAIL PROTECTED] writes:

Uwe As described in bug 3339
Uwe http://bugzilla.lyx.org/show_bug.cgi?id=3339 we have two Date
Uwe input methods that should be merged. I don't have a good idea how
Uwe but something should be done as it's confusing: I'm currently
Uwe writing a new part of the docs describing the date stuff but
Uwe whatever I write the reader would be confused.

THese are two different things (I believe that you know the stuff below...):

- date-insert was meant originally to add a date at the beginning of a
  note; it is the date at the time where the thing is written

- the date external inset template is the date at the time of creating
  the latex file; it as created as a fun way to show of the then new
  external inset.

All in all, I think that none of these two uses has been thoroughly
thought out, and it shows.

JMarc


Re: Should --with-qt-dir be removed?

2007-03-16 Thread Jean-Marc Lasgouttes
 Bo == Bo Peng [EMAIL PROTECTED] writes:

Bo Dear all, To check depends.py, I run ./configure today but
Bo --with-qt-dir does not recognize my qt4.2.2 distribution. It
Bo turned out that --with-qt4-dir is the correct option. Because qt3
Bo is no longer supported, I would suggest that we remove
Bo --with-qt-dir option, or make it equivalent to --with-qt4-dir.

There is no --with-qt-dir option actually. It happens that configure
will silently accept any bogus option that you feed it with (there is a
reason for that actually).

The fact is that config/qt.m4 is still there, but it is unused and
shall be removed. And INSTALL shall be updated.

JMarc


Re: Autotools fail.

2007-03-16 Thread Jean-Marc Lasgouttes
 Bo == Bo Peng [EMAIL PROTECTED] writes:

Bo Dear list, As I have mentioned, I am running autotools to test
Bo depends.py. I can not proceed because of the following error after
Bo successful ./configure. Note that scons works fine and
Bo --disable-stdlib-debug lead to the same error.

What you show here is a compiler bug, so it is not really autotools
fault. What we need to know is probably what different flags are
passed to gcc (on command line and in config.h).

JMarc



Re: r17450 - in /lyx-devel/trunk: lib/external_templates src/...

2007-03-16 Thread Georg Baum
[EMAIL PROTECTED] wrote:

http://www.lyx.org/trac/file/lyx-devel/trunk/lib/external_templates?rev=17450

==
 --- lyx-devel/trunk/lib/external_templates (original) +++
 lyx-devel/trunk/lib/external_templates Thu Mar 15 22:22:02 2007 @@ -99,10
 +99,10 @@
  TemplateEnd
  
  
 -Template XFig
 - GuiName XFig: $$AbsOrRelPathParent$$Basename
 - HelpText
 - An XFig figure.
 +Template Xfig
 + GuiName Xfig: $$AbsOrRelPathParent$$Basename
 + HelpText
 + An Xfig figure.

The new template name is a fileformat change. Please revert this part. Of
course you can do this change, but only if the needed lyx2lyx stuff comes
in the same commit.


Georg



Re: [patch] fix bug 3235 (and a bit more)

2007-03-16 Thread Georg Baum
Dov Feldstern wrote:

 Regarding 1820 --- I started looking at it a while ago, and I think that
 the problem stems from this: in TeXOnePar, previous_language is set to
 the language of the previous paragraph, or to the document language if
 this is the first paragraph. Then, if the new paragraph's language is
 different from the previous language, the language command is inserted,
 otherwise it isn't.
 
 The problem is that inside an inset (such as a footnote), the paragraphs
 are numbered from 0 again. So the first paragraph in the footnote is
 identified as the first, and therefore the previous_language is set to
 the document language, namely English (say it's an English document).

That (and the proposed solution below) makes a lot of sense. I don't have
time now to investigate, maybe you can put this analysis into bugzilla so
that it does not get forgotten?


Georg



Re: Thought about the file format

2007-03-16 Thread Georg Baum
Andre Poenitz wrote:

 On Thu, Mar 15, 2007 at 10:51:24PM +0100,
 [EMAIL PROTECTED] wrote:
 Metadata repository and search possibilities like Nepomuk are coming on
 the Linux Desktop. I think it will be important that LyX files can be
 easily indexed in these new systems. Therefore, we should add metadata
 fields. For privacy obsessed people maybe we can add an option to include
 dummy values for metadata.
 
 I have no problems with that as long as this is a concious decision of
 the user. However, having things like my user name and modification/access
 date dumped silently into the file is no option.

Exactly. And I don't consider that privacy obsessed.


Georg



Re: SVN is down

2007-03-16 Thread Lars Gullik Bjønnes
Andre Poenitz [EMAIL PROTECTED] writes:

| On Thu, Mar 15, 2007 at 02:48:00PM +0100, Lars Gullik Bjønnes wrote:
|  Abdelrazak Younes [EMAIL PROTECTED] writes:
|  
|  |  but I am curious about what happened?
|  
|  I have no idea. Was fixed before I had a chance to look.
|  
|  Andre, do you have any info?
| 
| I contacted Matthias and he in turn contacted the IT staff in Oslo which
| in turn was seemingly able to get the server up again.
| 
| I don't know either what the situation looked like nor how it was
| resolved.

Ok.

| A remaining issue is the time on the server (seems off by an hour) but I
| guess that's something that's fixable without physical access.

For some reason ntp was not started on boot. Fixed now.

-- 
Lgb


Re: [patch] fix bugs 3305 and 3172

2007-03-16 Thread Jürgen Spitzmüller
Jürgen Spitzmüller wrote:
  I will commit the rest, can you take
  care of this please?

 Yes. Since bugzilla is down, I sent the attached patch to Uwe for testing.

I'm gonna commit this now. There are still remeining problems, but those are 
separate.

Jürgen


Re: [patch] fix bug 3235 (and a bit more)

2007-03-16 Thread Dov Feldstern


That (and the proposed solution below) makes a lot of sense. I don't have
time now to investigate, maybe you can put this analysis into bugzilla so
that it does not get forgotten?

I already added a comment saying that there is a thread in the mailing 
list with such-and-such a title on such-and-such a date. Is that enough, 
or should I also add a link to the mailing list (how?) or the actual 
text of this message?




Re: problems running 1.5beta

2007-03-16 Thread Edwin Leuven

Enrico Forestieri wrote:

On Thu, Mar 15, 2007 at 10:10:25AM +0100, Edwin Leuven wrote:


this is windows and the official installer (the one that bo made available)

i have no administrator rights and installed lyx on my network share.

i get the following error message:

LyX: reconfiguring user directory
CMD.EXE a ‚t‚ d‚marr‚ avec '\\ulysse\users\edwin.leuven\AppData\lyx15beta1' en tant que chemin 
d'accŠs de r‚pertoire en

cours. Les chemins d'accŠs UNC ne sont pas prise en charge. Utilisation du
r‚pertoire Windows par d‚faut.
Traceback (most recent call last):
  File W:/programs/LyX15/Resources/./configure.py, line 775, in module
log = open(logfile, 'w')
IOError: [Errno 13] Permission denied: 'configure.log'
LyX: Done!
LyXTextClassList::Read: unable to find textclass file  `'. Exiting.
Completed



any clues what is going on (and how to repair it)?



I think this is due to the fact that you use an UNC path. It is simply
ridiculous that cmd.exe cannot deal with them. I think that you could
try mapping the UNC path to a drive letter using the following syntax:

net use x: \\host\share /USER:username password

in this way, you can access \\host\share as x:\. Maybe you don't
even need to specify the username and password.

After doing that, I think that you have to accordingly update some ENV
variable or registry entry, but I am not sure which one (I really use
cygwin rather than windows...).


it is already mapped to w:

but somehow i don't think that cmd.exe is the problem

can someone tell me how to find out where configure.py tries to write 
configure.log ?






Freeze on Accept All (1.4.4svn)

2007-03-16 Thread John McCabe-Dansted

Hi, I have a crash with data loss with the latest 1.4.x SVN.  Open
 http://www.csse.uwa.edu.au/~john/lyx/modal_MF2.lyx
in lyx. Do an accept all. LyX will lock up, it will not write an
.emergency file, unless you go to the console and press Cntl-C. Even
then, LyX will not exit.

Also, accepting changes in the file
 http://www.csse.uwa.edu.au/~john/lyx/modal_MF.cannot.accept3.lyx
will cause a crash. (Less serious since at least it writes an emergency file).

--
John C. McCabe-Dansted
PhD Student
University of Western Australia


Re: Usability and the insert graphics dialog

2007-03-16 Thread Abdelrazak Younes

John Pye wrote:

Hi all

The following are some usability comments from my use of the LyX
Graphics dialog. It's not user-support stuff, so I'm hoping it's
appropriate to send it here. If these have been reported already, or
have even been fixed (I am using 1.4.3 in Ubuntu 6.10) please disregard.
I realise that this is open source software and that sometimes these
sorts of things can be slow moving, so no offence here; I just want to
pass on these thoughts on usability in the hope that some relatively
small GUI changes might make a big difference for some end users.


Hi John,

Everything you say makes sense. Unfortunately we are rather short on Qt 
developers and we are mainly focusing right now on finishing 1.5.0. I 
suggest that you test the beta1 version because the dialog has been 
redesigned there. Hopefully there would be less problem but if the 
issues are still relevant, maybe you could try to modify the related Qt 
Designer file? This is an easy task that don't require C++ knowledge.


Cheers,
Abdel.



Re: Wow!

2007-03-16 Thread Georg Baum
[EMAIL PROTECTED] wrote:

 On Fri, 16 Mar 2007,
 [EMAIL PROTECTED] wrote:
 
 http://wiki.lyx.org/Devel.Captions
 
 Btw, I was doubly impressed that you even used
 
  LyxBug:3209

I copied it from somewhere. But of course you know that it is misspelled?


Georg



Re: [patch] fix bug 3235 (and a bit more)

2007-03-16 Thread Jean-Marc Lasgouttes
 Dov == Dov Feldstern [EMAIL PROTECTED] writes:

  That (and the proposed solution below) makes a lot of sense. I
 don't have time now to investigate, maybe you can put this analysis
 into bugzilla so that it does not get forgotten?
 
Dov I already added a comment saying that there is a thread in the
Dov mailing list with such-and-such a title on such-and-such a date.
Dov Is that enough, or should I also add a link to the mailing list
Dov (how?) or the actual text of this message?

I propose tha you copy your longer message and add a link to the
thread using for example gmane:
http://thread.gmane.org/gmane.editors.lyx.devel/79113/focus=79256

JMarc


Re: Unified title and toolbar on Mac OS X

2007-03-16 Thread Abdelrazak Younes

Jan Peters wrote:

Will that make it into 1.5? It looks so gorgeous :)


Yes, it's already in... Some bugs remain though.

Abdel.



Re: [patch] bug 3226: labels in caption insets don't have a prefix

2007-03-16 Thread Abdelrazak Younes

Jürgen Spitzmüller wrote:

Abdelrazak Younes wrote:

With my last patch we don't need to check explicitly for the
LABEL_SENSITIVE because everything within a float (or a wrap) will get
the label prefix, LABEL_SENSITIVE or not.


I don't think that's a good idea. There might be other things than the caption 
inside floats that need a different prettyref prefix, anything with a 
counter. 


I think only captions should get the fig/tab/alg prefix.


I am fine with this. I've done it because that's the current behaviour 
in 1.4.x. So shall I commit only the caption part?


Abdel.



Re: [patch] bug 3226: labels in caption insets don't have a prefix

2007-03-16 Thread Abdelrazak Younes

Jürgen Spitzmüller wrote:

Abdelrazak Younes wrote:

With my last patch we don't need to check explicitly for the
LABEL_SENSITIVE because everything within a float (or a wrap) will get
the label prefix, LABEL_SENSITIVE or not.


I don't think that's a good idea. There might be other things than the caption 
inside floats that need a different prettyref prefix, anything with a 
counter. 


I think only captions should get the fig/tab/alg prefix.


Hum, thinking about it a bit more. This is a default behaviour, we can 
always overwrite the prefix after the float check.


Abdel.



Re: Unified title and toolbar on Mac OS X

2007-03-16 Thread Jean-Marc Lasgouttes
 Abdelrazak == Abdelrazak Younes [EMAIL PROTECTED] writes:

Abdelrazak Jan Peters wrote:
 Will that make it into 1.5? It looks so gorgeous :)

Abdelrazak Yes, it's already in... Some bugs remain though.

What is already in?



Re: [patch] bug 3226: labels in caption insets don't have a prefix

2007-03-16 Thread Abdelrazak Younes

Andre Poenitz wrote:

On Thu, Mar 15, 2007 at 06:36:15PM +0100, Abdelrazak Younes wrote:
My point is that is not equivalent. A tree-like approach will inevitably 
lead to cleaner and shorter code, I am 100% sure of that. Besides, I 
still have difficulty to grasp the cursor slice concept. Make a poll in 
the list and you will realise that close to nobody really understand the 
 cursor and cursor slice related code. For example I still don't know 
how to select a text between two Cursors...


Asking might help.


I've done that, many times may I add. Even Michael has asked many times 
and I believe he managed to find the solution by himself at the end 
(which I don't remember).




Create a new cursor (or reuse one of the two you got) with the
DocIterator part being the DocIterator part of the first cursor and the
anchor_ part being the DocIterator part of the second.

Of course there are restrictions. The DocIterator part may not be nested
further than the anchor_ part.


I've tried that. Problem is I didn't manage to make it work for any kind 
of selection. If you could write for me a method that will save the 
current selection state so that it can be restored afterwards it would 
help me a lot for some experiment I've done related to scrolling.




The reason is obvious: the Cursor approach hides the internal memory 
structure. It is complicated because it does not have a simple mental model.


It surely has. In the main inset go down to cell slice[0].cell, walk
down to paragraph slice[0].pit, go to pos slice[0].pos, Take the inset
there. Go to its cell slice[1].cell, paragraph slice[1].pit, position
slice[1].pos. And so on. Ordinary text insets have a single cell only,
tables and a lot of math insets may have more than one.


Am I the only one who think this is not simple?




IMO, the Cursor (the DocIterator really) should only be used to move
the cursor logically within the document and nothing else.


The dociterator is a pretty stable method to access a position in a
document independent of the actual memory layout. It can, e.g., be
readily dumped into a .lyx file. This is not immediately possible with
the pointer approach.


I agree. And as I say the dociterator is very nice for this use-case.




And I reckon that the code in DocIterator.C will be dramatically
simplified if we had access to the parent (because there is only one)
and children in an easy way.


Not really. We had the parent way for about ten years, yet no way to
iterate over the document. So implementing it was obviously not trivial
as having no way to iterate over a document hurt a lot...


Come on, look at DocIterator::forwardPos() and backwardPos(), I am 
pretty sure this could be simplified by having access to the tree 
information.





The only difference is that the recursive parent code is not
implemented, but the code to scan a cursor is already here.

Sure, three lines of code is really difficult to implement ;-)


There are more implications. You need to fix up stuff when copying
things as you lose value semantics.

I am not saying the parent approach is wrong.  However, it has a lot of
implications. A whole lot.


As I said, I am not advocating a complete switch to the parent approach.

Anyway, as Georg said, we have other matters at hand right now.

Abdel.



Re: problems running 1.5beta

2007-03-16 Thread Edwin Leuven

Edwin Leuven wrote:

it is already mapped to w:

but somehow i don't think that cmd.exe is the problem

can someone tell me how to find out where configure.py tries to write 
configure.log ?


when i change this

-logfile = 'configure.log'
+logfile = '//ulysse/users/edwin.leuven/configure.log'

then the script continues until it stumbles here:

LyX: reconfiguring user directory
CMD.EXE a ‚t‚ d‚marr‚ avec '\\ulysse\users\edwin.leuven\AppData\lyx15beta1' en tant que chemin 
d'accŠs de r‚pertoire en

cours. Les chemins d'accŠs UNC ne sont pas prise en charge. Utilisation du
r‚pertoire Windows par d‚faut.
Failed to create directory  bind
LyX: Done!
LyXTextClassList::Read: unable to find textclass file  `'. Exiting.
Completed


perhaps the double backslash causes trouble?

groping in the dark...


Re: Unified title and toolbar on Mac OS X

2007-03-16 Thread Abdelrazak Younes

Jean-Marc Lasgouttes wrote:

Abdelrazak == Abdelrazak Younes [EMAIL PROTECTED] writes:


Abdelrazak Jan Peters wrote:

Will that make it into 1.5? It looks so gorgeous :)


Abdelrazak Yes, it's already in... Some bugs remain though.

What is already in?


The Toc dock widget? Or was he asking about the drawer?

Abdel.




Re: [patch] bug 3226: labels in caption insets don't have a prefix

2007-03-16 Thread Jürgen Spitzmüller
Abdelrazak Younes wrote:
 I am fine with this. I've done it because that's the current behaviour
 in 1.4.x. 

Only partially. If you put a section in a tabular float and insert a label, 
you get the sec: prefix (as it should be).

 So shall I commit only the caption part? 

But that does not solve the nested inset problem, does it?

Jürgen


[patch] fix bug 3305 (again)

2007-03-16 Thread Georg Baum
See http://bugzilla.lyx.org/show_bug.cgi?id=3305. This patch fixes two
problems:

- char() == 0, so a string with an embedded 0 character could be created.
This is not what was intended.

- fs::exists was called for a filename that was not checked with fs::native,
so an excpetion could be thrown.

This is going in now.

BTW I don't like this test for max path length:


if (token.length()  255) {
// string too long. Cut off.
int r = token.length() - 250;
string ntoken = token.substr(r, token.length());
token = ntoken;
}

Nobody knows where the 255 comes from. I believe that this test is no longer
needed (the fs::native check should catch these cases, can anybody confirm
this?), but if it is, then something like this should be used:


int const max_windows_path_length = 255;
if (token.length()  max_windows_path_length ) {
// string too long. Cut off.
int r = token.length() - max_windows_path_length + 5;
token = token.substr(r, token.length());
}


GeorgIndex: src/LaTeX.C
===
--- src/LaTeX.C	(Revision 17451)
+++ src/LaTeX.C	(Arbeitskopie)
@@ -833,13 +833,12 @@ bool handleFoundFile(string const  ff, 
 		if (exists)
 			// everything o.k.
 			break;
-		else {
+		else if (contains(foundfile, '')) {
 			// files with spaces are often enclosed in quotation
-			// marks; those have to be removed
-			string unquoted = subst(foundfile, '', char());
+			// marks; remove those and try again
+			string unquoted = subst(foundfile, \, );
 			absname = makeAbsPath(unquoted);
-			if (fs::exists(absname.toFilesystemEncoding()))
-break;
+		} else {
 			// strip off part after last space and try again
 			string strippedfile;
 			string const stripoff =


Re: [patch] bug 3226: labels in caption insets don't have a prefix

2007-03-16 Thread Abdelrazak Younes

Jürgen Spitzmüller wrote:

Abdelrazak Younes wrote:

I am fine with this. I've done it because that's the current behaviour
in 1.4.x. 


Only partially. If you put a section in a tabular float and insert a label, 
you get the sec: prefix (as it should be).


So shall I commit only the caption part? 


But that does not solve the nested inset problem, does it?


It does.

Abdel.



Re: Math fonts -- Win vs Mac

2007-03-16 Thread Enrico Forestieri
On Thu, Mar 15, 2007 at 11:09:39PM +0100, Andre Poenitz wrote:
 On Thu, Mar 15, 2007 at 02:15:43PM -0700, Jan Peters wrote:
  Note, however, that sticking too closely to the TeX rules gives fairly
  dense formulas which are more difficult to navigate,
  
  I believe that SWP is very close to TeX here.
 
 This might be true.

With the attached patch LyX is also closer to TeX, at least for
super/subscript placement. I implemented the rules from 18a to 18f
in appendix G of the TeXbook.

I also attach here two screenshots showing a formula before and after the
patch. As you can see, the patch solves the problem of accent placement
in math, too. The remaining problems are the too thin delimiters and the
fact that the accents are not scaled when changing the zoom factor.
However, I will not have enough free time in the near future to also
tackle that, though :(

Comments are welcome.

-- 
Enrico
Index: src/mathed/InsetMathScript.C
===
--- src/mathed/InsetMathScript.C(revisione 17450)
+++ src/mathed/InsetMathScript.C(copia locale)
@@ -146,6 +146,43 @@
 }
 
 
+int InsetMathScript::dy01(int asc, int des, int what) const
+{
+   int dasc = 0;
+   int sdrop = 0;
+   if (hasDown()) {
+   sdrop = down().minasc();
+   int mindes = nuc().size() ? nuc().mindes() : 0;
+   int desdrop = des + sdrop;
+   dasc = down().ascent();
+   int ascdrop = dasc - sdrop;
+   des = max(desdrop, ascdrop);
+   des = max(mindes, des);
+   }
+   if (hasUp()) {
+   int minasc = nuc().size() ? nuc().minasc() : 0;
+   int uminasc = up().minasc();
+   int ascdrop = asc - uminasc;
+   int udes = up().descent();
+   asc = udes + uminasc - up().mindes();
+   asc = max(ascdrop, asc);
+   asc = max(minasc, asc);
+   if (hasDown()) {
+   int del = asc - udes - dasc;
+   if (del + des = 2) {
+   des = 2 - del;
+   del = udes - asc + sdrop;
+   if (del  0) {
+   asc += del;
+   des -= del;
+   }
+   }
+   }
+   }
+   return what ? asc : des;
+}
+
+
 int InsetMathScript::dy0() const
 {
int nd = ndes();
@@ -154,8 +191,10 @@
int des = down().ascent();
if (hasLimits())
des += nd + 2;
-   else
-   des = max(des, nd);
+   else {
+   int na = nasc();
+   des = dy01(na, nd, 0);
+   }
return des;
 }
 
@@ -168,8 +207,10 @@
int asc = up().descent();
if (hasLimits())
asc += na + 2;
-   else
-   asc = max(asc, na);
+   else {
+   int nd = ndes();
+   asc = dy01(na, nd, 1);
+   }
asc = max(asc, 5);
return asc;
 }
@@ -235,8 +276,18 @@
dim.wid = max(dim.wid, down().width());
dim.wid += nwid();
}
-   dim.asc = dy1() + (hasUp() ? up().ascent() : 0);
-   dim.des = dy0() + (hasDown() ? down().descent() : 0);
+   int na = nasc();
+   if (hasUp()) {
+   int asc = dy1() + up().ascent();
+   dim.asc = max(na, asc);
+   } else
+   dim.asc = na;
+   int nd = ndes();
+   if (hasDown()) {
+   int des = dy0() + down().descent();
+   dim.des = max(nd, des);
+   } else
+   dim.des = nd;
metricsMarkers(dim);
if (dim_ == dim)
return false;
Index: src/mathed/MathData.C
===
--- src/mathed/MathData.C   (revisione 17450)
+++ src/mathed/MathData.C   (copia locale)
@@ -243,10 +243,13 @@
 void MathArray::metrics(MetricsInfo  mi) const
 {
dim_ = theFontMetrics(mi.base.font).dimension('I');
+   minasc_ = theFontMetrics(mi.base.font).dimension('x').ascent();
+   mindes_ = (3 * minasc_) / 4;
 
if (empty())
return;
 
+   dim_.asc = 0;
dim_.wid = 0;
Dimension d;
//BufferView  bv  = *mi.base.bv;
Index: src/mathed/InsetMathScript.h
===
--- src/mathed/InsetMathScript.h(revisione 17450)
+++ src/mathed/InsetMathScript.h(copia locale)
@@ -110,6 +110,8 @@
int dxx() const;
/// returns width of nucleus if any
int nwid() const;
+   /// returns y offset for either superscript or subscript
+   int dy01(int asc, int des, int what) const;
/// returns y offset for superscript
int dy0() const;
/// returns y offset for subscript
Index: 

Re: problems running 1.5beta

2007-03-16 Thread Edwin Leuven

Edwin Leuven wrote:

perhaps the double backslash causes trouble?

groping in the dark...


after calling lyx with the userdir option as follows

W:\programs\LyX15\binlyxc -userdir w:/AppData/LyX15beta1

the configure script runs and lyx start

seems like there is a problem with finding the appdata dir

note that %APPDATA% is fine here:

W:\programs\LyX15\binecho %APPDATA%
\\ulysse\users\edwin.leuven\AppData







Re: [patch] fix bug 3305 (again)

2007-03-16 Thread Jürgen Spitzmüller
Georg Baum wrote:
 - char() == 0, so a string with an embedded 0 character could be created.
 This is not what was intended.

I see. However, I remember I got some error when I tried the  variant.

 - fs::exists was called for a filename that was not checked with
 fs::native, so an excpetion could be thrown.

OK. However, note that, if the string without quotation marks is no valid file 
name, I proceeded _with_ the quotation marks (because they might very well be 
part of the file name). I think your version removes them forwever, which is 
wrong.

 This is going in now.

 BTW I don't like this test for max path length:


 if (token.length()  255) {
 // string too long. Cut off.
 int r = token.length() - 250;
 string ntoken = token.substr(r, token.length());
 token = ntoken;
 }

 Nobody knows where the 255 comes from. I believe that this test is no
 longer needed (the fs::native check should catch these cases, can anybody
 confirm this?), but if it is, then something like this should be used:

It is needed. We need to strip of the string, else it is getting endless.

 int const max_windows_path_length = 255;
 if (token.length()  max_windows_path_length ) {
 // string too long. Cut off.
 int r = token.length() - max_windows_path_length + 5;
 token = token.substr(r, token.length());
 }

Even better: use the value of MAX_PATH (or PATH_MAX on unix). I would have 
done this, but I failed.

 Georg

Jürgen


Re: [patch] bug 3226: labels in caption insets don't have a prefix

2007-03-16 Thread Jürgen Spitzmüller
Abdelrazak Younes wrote:
  But that does not solve the nested inset problem, does it?

 It does.

OK, fine with me then.

Jürgen


Re: Thought about the file format

2007-03-16 Thread Helge Hafting

Andre Poenitz wrote:

I have no problems with that as long as this is a concious decision of
the user. However, having things like my user name and modification/access
date dumped silently into the file is no option.
  

Lyx already have tools-preferences-identity.
Currently, you may enter a name and an email address there - or
use a pseudonym or leave them blank. Change tracking uses this
field - PDF metadata could also use this page.  It is then up to the user
to fill out the settings with whatever they like.

The username is not a good idea anyway - there are times when the
username don't match the real name very well anyway.

Helge Hafting





Re: [patch] fix bug 3305 (again)

2007-03-16 Thread Georg Baum
Jürgen Spitzmüller wrote:

 Georg Baum wrote:
 - char() == 0, so a string with an embedded 0 character could be created.
 This is not what was intended.
 
 I see. However, I remember I got some error when I tried the  variant.

You probably tried the char version. This one needs always a replacement
char, but with the const char * version you can also use  as replacement.

 - fs::exists was called for a filename that was not checked with
 fs::native, so an excpetion could be thrown.
 
 OK. However, note that, if the string without quotation marks is no valid
 file name, I proceeded _with_ the quotation marks (because they might very
 well be part of the file name). I think your version removes them
 forwever, which is wrong.

OK, I did not notice that. What about the attached version? This is your
original one, with the missing test added.

 BTW I don't like this test for max path length:


 if (token.length()  255) {
 // string too long. Cut off.
 int r = token.length() - 250;
 string ntoken = token.substr(r, token.length());
 token = ntoken;
 }

 Nobody knows where the 255 comes from. I believe that this test is no
 longer needed (the fs::native check should catch these cases, can anybody
 confirm this?), but if it is, then something like this should be used:
 
 It is needed. We need to strip of the string, else it is getting endless.

Ah, so the 255 was both for windows max path and because the string must not
grow endlessly. In that case I would prefer a suitable name for this
constant. MAX_PATH or PATH_MAX are misleading, since it implies that the
length is limited by an OS constant, but was is really used here is a more
or less arbitrary length limit rfor parsing purposes.


GeorgIndex: src/LaTeX.C
===
--- src/LaTeX.C	(Revision 17452)
+++ src/LaTeX.C	(Arbeitskopie)
@@ -802,7 +802,7 @@ bool handleFoundFile(string const  ff, 
 			while (contains(strippedfile,  )) {
 // files with spaces are often enclosed in quotation
 // marks; those have to be removed
-string unquoted = subst(strippedfile, '', char());
+string unquoted = subst(strippedfile, \, );
 absname.set(unquoted);
 if (insertIfExists(absname, head))
 	return true;
@@ -833,12 +833,20 @@ bool handleFoundFile(string const  ff, 
 		if (exists)
 			// everything o.k.
 			break;
-		else if (contains(foundfile, '')) {
+		else {
 			// files with spaces are often enclosed in quotation
-			// marks; remove those and try again
+			// marks; those have to be removed
 			string unquoted = subst(foundfile, \, );
 			absname = makeAbsPath(unquoted);
-		} else {
+			exists = fs::native(absname.toFilesystemEncoding());
+			if (exists)
+exists = fs::exists(absname.toFilesystemEncoding());
+			else
+lyxerr[Debug::DEPEND]  '`'
+	 absname.absFilename()
+	 ' is no valid file name.  endl;
+			if (exists)
+break;
 			// strip off part after last space and try again
 			string strippedfile;
 			string const stripoff =
@@ -982,9 +990,7 @@ void LaTeX::deplog(DepTable  head)
 			token = lastline + token;
 		if (token.length()  255) {
 			// string too long. Cut off.
-			int r = token.length() - 250;
-			string ntoken = token.substr(r, token.length());
-			token = ntoken;
+			token.erase(0, token.length() - 251);
 		}
 
 		smatch sub;


Re: problems running 1.5beta

2007-03-16 Thread Enrico Forestieri
On Fri, Mar 16, 2007 at 11:30:08AM +0100, Edwin Leuven wrote:
 Edwin Leuven wrote:
  perhaps the double backslash causes trouble?
  
  groping in the dark...
 
 after calling lyx with the userdir option as follows
 
 W:\programs\LyX15\binlyxc -userdir w:/AppData/LyX15beta1
 
 the configure script runs and lyx start
 
 seems like there is a problem with finding the appdata dir
 
 note that %APPDATA% is fine here:
 
 W:\programs\LyX15\binecho %APPDATA%
 \\ulysse\users\edwin.leuven\AppData

No, it is not fine. As I said, you had to appropriately change some
ENV variable and/or registry setting. Try with

set APPDATA=W:\AppData

and also check for other ENV vars.

-- 
Enrico


Re: [patch] fix bug 3305 (again)

2007-03-16 Thread Jürgen Spitzmüller
Georg Baum wrote:
 You probably tried the char version. This one needs always a replacement
 char, but with the const char * version you can also use  as replacement.

Yes, probably.

 OK, I did not notice that. What about the attached version? This is your
 original one, with the missing test added.

Looks good (also the erase part; I just didn't think of that).

  It is needed. We need to strip of the string, else it is getting endless.

 Ah, so the 255 was both for windows max path and because the string must
 not grow endlessly. In that case I would prefer a suitable name for this
 constant. MAX_PATH or PATH_MAX are misleading, since it implies that the
 length is limited by an OS constant, but was is really used here is a more
 or less arbitrary length limit rfor parsing purposes.

The idea is the following: if the string exceeds MAX_PATH, then we know for 
sure that it is not the _part_ of a filename where we have to look further in 
the next lines, so we can cut off (it still can contain the part of a file 
name, but the chunk we are cutting cannot be part of that). Furthermore, we 
avoid a boost exception, because boost::fs obviously also checks for the 
length and compares with MAX_PATH.

Ideally, this should indeed be bound to the OS, since on Linux (and some 
Windows variants IIRC) the path can very well be longer than 255 chars, and 
boost::fs should not throw in such cases (and it doesn't on Linux indeed).

 Georg

Jürgen


Re: Unified title and toolbar on Mac OS X

2007-03-16 Thread Jean-Marc Lasgouttes
 Abdelrazak == Abdelrazak Younes [EMAIL PROTECTED] writes:

Abdelrazak Jean-Marc Lasgouttes wrote:
 Abdelrazak == Abdelrazak Younes [EMAIL PROTECTED] writes:

Abdelrazak Jan Peters wrote:
 Will that make it into 1.5? It looks so gorgeous :)

Abdelrazak Yes, it's already in... Some bugs remain though.
  What is already in?

Abdelrazak The Toc dock widget? Or was he asking about the drawer?

No, like the title says, Unified title and toolbar on Mac OS X.

JMarc


Re: [patch] bug 3226: labels in caption insets don't have a prefix

2007-03-16 Thread Abdelrazak Younes

Jürgen Spitzmüller wrote:

Abdelrazak Younes wrote:

But that does not solve the nested inset problem, does it?

It does.


OK, fine with me then.


OK, I committed a cleanup version that will allow to add more types easily.

I am wondering, for subsection, wouldn't it be better to use ssec for 
example and sssec: for subsubsection?


Abdel.

Author: younes
Date: Fri Mar 16 12:36:36 2007
New Revision: 17453

URL: http://www.lyx.org/trac/changeset/17453
Log:
Fix bug 3226:

* text.C
  - LyXText::getPossibleLabel(): cleanup and add the caption case.

Modified:
lyx-devel/trunk/src/text.C

Modified: lyx-devel/trunk/src/text.C
URL: http://www.lyx.org/trac/file/lyx-devel/trunk/src/text.C?rev=17453
==
--- lyx-devel/trunk/src/text.C (original)
+++ lyx-devel/trunk/src/text.C Fri Mar 16 12:36:36 2007
@@ -56,6 +56,7 @@

 #include insets/insettext.h
 #include insets/insetbibitem.h
+#include insets/insetcaption.h
 #include insets/insethfill.h
 #include insets/insetline.h
 #include insets/insetnewline.h
@@ -1734,37 +1735,7 @@

LyXLayout_ptr layout = pars_[pit].layout();

-   if (layout-latextype == LATEX_PARAGRAPH  pit != 0) {
-   LyXLayout_ptr const  layout2 = pars_[pit - 1].layout();
-   if (layout2-latextype != LATEX_PARAGRAPH) {
-   --pit;
-   layout = layout2;
-   }
-   }
-
-   docstring name = from_ascii(layout-latexname());
-
-   // for captions, we want the abbreviation of the float type
-   if (layout-labeltype == LABEL_SENSITIVE) {
-   // Search for the first float or wrap inset in the iterator
-   for (int i = cur.depth(); --i = 0; ) {
-   InsetBase * const in = cur[i].inset();
-   if (in-lyxCode() == InsetBase::FLOAT_CODE
-   || in-lyxCode() == InsetBase::WRAP_CODE) {
-   name = in-getInsetName();
-   break;
-   }
-   }
-   }
-
-   docstring text = name.substr(0, 3);
-   if (name == theorem)
-   text = from_ascii(thm); // Create a correct prefix for 
prettyref
-
-   text += ':';
-   if (layout-latextype == LATEX_PARAGRAPH || lyxrc.label_init_length  0)
-   text.erase();
-
+   docstring text;
docstring par_text = pars_[pit].asString(cur.buffer(), false);
for (int i = 0; i  lyxrc.label_init_length; ++i) {
if (par_text.empty())
@@ -1777,6 +1748,46 @@
text += head;
}

+   // No need for a prefix if the user said so.
+   if (lyxrc.label_init_length = 0)
+   return text;
+
+   // Will contain the label type.
+   docstring name;
+
+   // For section, subsection, etc...
+   if (layout-latextype == LATEX_PARAGRAPH  pit != 0) {
+   LyXLayout_ptr const  layout2 = pars_[pit - 1].layout();
+   if (layout2-latextype != LATEX_PARAGRAPH) {
+   --pit;
+   layout = layout2;
+   }
+   }
+   if (layout-latextype != LATEX_PARAGRAPH)
+   name = from_ascii(layout-latexname());
+
+   // for captions, we just take the caption type
+   InsetBase * caption_inset = 
cur.innerInsetOfType(InsetBase::CAPTION_CODE);
+   if (caption_inset)
+   name = from_ascii(static_castInsetCaption 
*(caption_inset)-type());
+
+   // Inside floats or wraps, if none of the above worked
+   // we want by default the abbreviation of the float type.
+   if (name.empty()) {
+   InsetBase * float_inset = 
cur.innerInsetOfType(InsetBase::FLOAT_CODE);
+   if (!float_inset)
+   float_inset = 
cur.innerInsetOfType(InsetBase::WRAP_CODE);
+   if (float_inset)
+   name = float_inset-getInsetName();
+   }
+
+   // Create a correct prefix for prettyref
+   if (name == theorem)
+   name = from_ascii(thm);
+
+   if (!name.empty())
+   text = name.substr(0, 3) + ':' + text;
+
return text;
 }






Re: [patch] bug 3226: labels in caption insets don't have a prefix

2007-03-16 Thread Jürgen Spitzmüller
Abdelrazak Younes wrote:
 I am wondering, for subsection, wouldn't it be better to use ssec for
 example and sssec: for subsubsection?

That could be configurable, but by default, no. Prettyref only supports 
the sec prefix (by default), and I would not refer to Subsection x.x in 
text, but rather to Section x.x.

Jürgen


Re: [GSoC] LyX not accepted as mentoring org?

2007-03-16 Thread Martin Vermeer
On Thu, 2007-03-15 at 13:26 +0100, Bernhard Reiter wrote:
 LyX isn't listed on http://code.google.com/soc - does that mean it
 wasn't accepted as mentoring organisation or does that have to do with
 the recently unreachable server?
 
 Bernhard

I haven't heard anything from them. Wouldn't they inform the applicant
first? This is strange.

- Martin




Re: [patch] bug 3226: labels in caption insets don't have a prefix

2007-03-16 Thread Jean-Marc Lasgouttes
 Jürgen == Jürgen Spitzmüller [EMAIL PROTECTED] writes:

Jürgen Abdelrazak Younes wrote:
 I am wondering, for subsection, wouldn't it be better to use ssec
 for example and sssec: for subsubsection?

Jürgen That could be configurable, but by default, no. Prettyref only
Jürgen supports the sec prefix (by default), and I would not refer
Jürgen to Subsection x.x in text, but rather to Section x.x.

Agreed.

JMarc


Re: [GSoC] LyX not accepted as mentoring org?

2007-03-16 Thread Georg Baum
Martin Vermeer wrote:

 I haven't heard anything from them. Wouldn't they inform the applicant
 first? This is strange.

The accepted orgs got an email - LyX is not accepted. The good side of
this: It saves a lot of time of everybody who would be involved in
mentoring and administriva.


Georg



Re: [patch] bug 3226: labels in caption insets don't have a prefix

2007-03-16 Thread Abdelrazak Younes

Jürgen Spitzmüller wrote:

Abdelrazak Younes wrote:

I am wondering, for subsection, wouldn't it be better to use ssec for
example and sssec: for subsubsection?


That could be configurable, but by default, no. Prettyref only supports 
the sec prefix (by default), and I would not refer to Subsection x.x in 
text, but rather to Section x.x.


I'd do that also but this is not about what is on printed text. This is 
about easy finding of the wanted reference. Distinguishing between 
subsection and subsubsection helps when both have the same 
Introduction text for example.


Are you saying that the chosen prefix (sub: in this case) is used by 
Prettyref?


Abdel.



Re: [patch] fix bug 3305 (again)

2007-03-16 Thread Georg Baum
Jürgen Spitzmüller wrote:

 Looks good (also the erase part; I just didn't think of that).

Then I am going to commit it.

 The idea is the following: if the string exceeds MAX_PATH, then we know
 for sure that it is not the _part_ of a filename where we have to look
 further in the next lines, so we can cut off (it still can contain the
 part of a file name, but the chunk we are cutting cannot be part of that).

OK.

 Furthermore, we avoid a boost exception, because boost::fs obviously also
 checks for the length and compares with MAX_PATH.

This should not happen anymore, since fs::native should catch these cases.

 Ideally, this should indeed be bound to the OS, since on Linux (and some
 Windows variants IIRC) the path can very well be longer than 255 chars,
 and boost::fs should not throw in such cases (and it doesn't on Linux
 indeed).

Then the correct solution would be to introduce a os::max_path() function
that would give us the os dependant value.


Georg



Re: [patch] bug 3226: labels in caption insets don't have a prefix

2007-03-16 Thread Georg Baum
Abdelrazak Younes wrote:

 Are you saying that the chosen prefix (sub: in this case) is used by
 Prettyref?

Yes. That is the main reason to use these prefixes. So this _is_ about what
is on printed text. Of course it would be nice if it would be possible to
distinguish further. But that means to

- replace prettyref by something else (license problems)
- implement a configuration interface, because not everybody wants to go to
subsubection level
- lyx2lyx changes
- maybe more

This is definitely not for now. For now we should stick to the prettyref
defaults.


Georg



Re: problems running 1.5beta

2007-03-16 Thread Edwin Leuven

Enrico Forestieri wrote:

On Fri, Mar 16, 2007 at 11:30:08AM +0100, Edwin Leuven wrote:


Edwin Leuven wrote:


perhaps the double backslash causes trouble?

groping in the dark...


after calling lyx with the userdir option as follows

W:\programs\LyX15\binlyxc -userdir w:/AppData/LyX15beta1

the configure script runs and lyx start

seems like there is a problem with finding the appdata dir

note that %APPDATA% is fine here:

W:\programs\LyX15\binecho %APPDATA%
\\ulysse\users\edwin.leuven\AppData



No, it is not fine. As I said, you had to appropriately change some
ENV variable and/or registry setting. Try with

set APPDATA=W:\AppData


Microsoft Windows 2000 [Version 5.00.2195]
(C) Copyright 1985-2000 Microsoft Corp.

W:\set APPDATA=w:\AppData

W:\lyxc
LyX: Creating directory //ulysse/users/edwin.leuven/AppData/lyx15beta1/
LyX: reconfiguring user directory
CMD.EXE a été démarré avec '\\ulysse\users\edwin.leuven\AppData\lyx15beta1' en t
ant que chemin d'accès de répertoire en
cours. Les chemins d'accès UNC ne sont pas prise en charge. Utilisation du
répertoire Windows par défaut.
Failed to create directory  bind
LyX: Done!
LyXTextClassList::Read: unable to find textclass file  `'. Exiting.


as i wrote earlier, when changing this

-logfile = 'configure.log'
+logfile = '//ulysse/users/edwin.leuven/configure.log'

then configure.py writes configure.log in w:\

so why should this work, but stumble elsewhere?

so i still think that the problem is with the script, not with my environment...

edwin


PS here are my environment vars:

W:\set
ALLUSERSPROFILE=C:\Documents and Settings\All Users
APPDATA=w:\AppData
CommonProgramFiles=C:\Program Files\Fichiers communs
COMPUTERNAME=PC1292
ComSpec=C:\WINNT\system32\cmd.exe
HOMEDRIVE=W:
HOMEPATH=\
HOMESHARE=\\ulysse\users\edwin.leuven
LM_PROJECT=MATLABNORMAL
LOGONSERVER=\\ENKIDU
NUMBER_OF_PROCESSORS=1
OS=Windows_NT
Os2LibPath=C:\WINNT\system32\os2\dll;
Path=C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;w:\programs\lyx15\bin;w:\
programs\lyx15\python;m:\miktex\v-2.4\texmf\miktex\bin;w:\programs\msys-1.0;w:\p
rograms\msys-1.0\bin;M:\python\V2.3.4;C:\Program Files\Ghostgum\gs8.51\bin;
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 1, GenuineIntel
PROCESSOR_LEVEL=15
PROCESSOR_REVISION=0401
ProgramFiles=C:\Program Files
PROMPT=$P$G
SystemDrive=C:
SystemRoot=C:\WINNT
TEMP=C:\DOCUME~1\EDWIN~1.LEU\LOCALS~1\Temp
TMP=C:\DOCUME~1\EDWIN~1.LEU\LOCALS~1\Temp
USERDNSDOMAIN=ensae.fr
USERDOMAIN=ENSAE
USERNAME=edwin.leuven
USERPROFILE=C:\Documents and Settings\edwin.leuven
windir=C:\WINNT



Re: [patch] bug 3226: labels in caption insets don't have a prefix

2007-03-16 Thread Abdelrazak Younes

Georg Baum wrote:

Abdelrazak Younes wrote:


Are you saying that the chosen prefix (sub: in this case) is used by
Prettyref?


Yes. That is the main reason to use these prefixes. So this _is_ about what
is on printed text. Of course it would be nice if it would be possible to
distinguish further. But that means to

- replace prettyref by something else (license problems)
- implement a configuration interface, because not everybody wants to go to
subsubection level
- lyx2lyx changes
- maybe more


OK thanks. Maybe we should start to put such ideas in the Wiki so that 
it doesn't get lost...




This is definitely not for now. For now we should stick to the prettyref
defaults.


Sure.

Abdel.



Re: About Date inset in the external dialog

2007-03-16 Thread Uwe Stöhr

Jean-Marc Lasgouttes schrieb:

 These are two different things...


All in all, I think that none of these two uses has been thoroughly
thought out, and it shows.


I know the differences but it is confusing for the user that they are in different menus and look 
different. So for later LyX versions it would perhaps be good to have ONE date inset with a menu 
where the user can select beween the three different date input methods:


- date-external
- date-insert
- LaTeX's \today command

Would this be a good solution?

In the meantime I skip the exact description in the docs.

regards Uwe


Re: [patch] fix bug 3305 (again)

2007-03-16 Thread Jürgen Spitzmüller
Georg Baum wrote:
 Then the correct solution would be to introduce a os::max_path() function
 that would give us the os dependant value.

Yes.

Jürgen


Re: [patch] bug 3226: labels in caption insets don't have a prefix

2007-03-16 Thread Abdelrazak Younes

Jürgen Spitzmüller wrote:

Abdelrazak Younes wrote:

I am fine with this. I've done it because that's the current behaviour
in 1.4.x. 


Only partially. If you put a section in a tabular float and insert a label, 
you get the sec: prefix (as it should be).


So shall I commit only the caption part? 


But that does not solve the nested inset problem, does it?


He he... I've checked LyX-1.4 and the situation is worse there (nested 
inset are not supported).


Abdel.



Re: Thought about the file format

2007-03-16 Thread John McCabe-Dansted

On 3/16/07, Andre Poenitz [EMAIL PROTECTED] wrote:

On Thu, Mar 15, 2007 at 10:51:24PM +0100, [EMAIL PROTECTED] wrote:
I have no problems with that as long as this is a concious decision of
the user. However, having things like my user name and modification/access
date dumped silently into the file is no option.


An alternative would be to support an RCS format where everything is
explicitly saved forever, so e.g. you not only know when the document
was printed, but also can revert to the version for which pdflatex was
run successfully. This would have saved me many times from  latex
producing some unintelligible error with no indication of how to fix
it or which change caused it.

This should allow you to not only tell if one document is newer than
another, but also if they are forked, and if they are forked how to
merge the changes.


--
John C. McCabe-Dansted
PhD Student
University of Western Australia


Re: r17450 - in /lyx-devel/trunk: lib/external_templates src/...

2007-03-16 Thread José Matos
On Friday 16 March 2007 9:01:09 am Georg Baum wrote:

 The new template name is a fileformat change. Please revert this part. Of
 course you can do this change, but only if the needed lyx2lyx stuff comes
 in the same commit.

  I agree with Georg, if the change remains then we need a new format, and the 
corresponding lyx2lyx converter and reverter.

 Georg

-- 
José Abílio


Re: crash in TocBackend::updateItem

2007-03-16 Thread José Matos
On Friday 16 March 2007 8:41:02 am Jean-Marc Lasgouttes wrote:
 I now tend to think we should do that indeed, but it is a file format
 change. The only case where it really makes sense is for lists.

  And even for lists it helps to be able to insert something before. I am 
thinking about the case where we change the counter before starting with the 
items.

 JMar

-- 
José Abílio


Re: problems running 1.5beta

2007-03-16 Thread Enrico Forestieri
On Fri, Mar 16, 2007 at 01:29:12PM +0100, Edwin Leuven wrote:
 Enrico Forestieri wrote:
  On Fri, Mar 16, 2007 at 11:30:08AM +0100, Edwin Leuven wrote:
  
 Edwin Leuven wrote:
 
 perhaps the double backslash causes trouble?
 
 groping in the dark...
 
 after calling lyx with the userdir option as follows
 
 W:\programs\LyX15\binlyxc -userdir w:/AppData/LyX15beta1
 
 the configure script runs and lyx start
 
 seems like there is a problem with finding the appdata dir
 
 note that %APPDATA% is fine here:
 
 W:\programs\LyX15\binecho %APPDATA%
 \\ulysse\users\edwin.leuven\AppData
  
  
  No, it is not fine. As I said, you had to appropriately change some
  ENV variable and/or registry setting. Try with
  
  set APPDATA=W:\AppData
 
 Microsoft Windows 2000 [Version 5.00.2195]
 (C) Copyright 1985-2000 Microsoft Corp.
 
 W:\set APPDATA=w:\AppData
 
 W:\lyxc
 LyX: Creating directory //ulysse/users/edwin.leuven/AppData/lyx15beta1/

This means that LyX still thinks that your home dir is in //ulysse/users/...
and this is no good, see below.

 LyX: reconfiguring user directory
 CMD.EXE a été démarré avec '\\ulysse\users\edwin.leuven\AppData\lyx15beta1' 
 en t
 ant que chemin d'accès de répertoire en
 cours. Les chemins d'accès UNC ne sont pas prise en charge. Utilisation du
 répertoire Windows par défaut.
 Failed to create directory  bind
 LyX: Done!
 LyXTextClassList::Read: unable to find textclass file  `'. Exiting.
 
 
 as i wrote earlier, when changing this
 
 -logfile = 'configure.log'
 +logfile = '//ulysse/users/edwin.leuven/configure.log'
 
 then configure.py writes configure.log in w:\
 
 so why should this work, but stumble elsewhere?

It is known that cmd.exe cannot deal with UNC paths. You cannot change the
current directory using UNC paths, for example. If you try the following:

C:\ cd \\ulysse\users\edwin.leuven\AppData

you should get the same error you report above. Now try:

C:\ cd W:\AppData
C:\ W:
W:\AppData

Do you understand now? You should arrange things such that LyX thinks
that your home dir is in W:\ rather than //ulysse/users/edwin.leuven
and things should then work. This is Windows, I need not say more...

 so i still think that the problem is with the script, not with my 
 environment...

The problem *is* with your environment.

-- 
Enrico


Re: Thought about the file format

2007-03-16 Thread Stephan Witt
John McCabe-Dansted wrote:
 On 3/16/07, Andre Poenitz [EMAIL PROTECTED] wrote:
 On Thu, Mar 15, 2007 at 10:51:24PM +0100, [EMAIL PROTECTED] wrote:
 I have no problems with that as long as this is a concious decision of
 the user. However, having things like my user name and
 modification/access
 date dumped silently into the file is no option.
 
 An alternative would be to support an RCS format where everything is
 explicitly saved forever, so e.g. you not only know when the document
 was printed, but also can revert to the version for which pdflatex was
 run successfully. This would have saved me many times from  latex
 producing some unintelligible error with no indication of how to fix
 it or which change caused it.
 
 This should allow you to not only tell if one document is newer than
 another, but also if they are forked, and if they are forked how to
 merge the changes.
 

I do this for most of my documents. The preamble needs one additional line:
\usepackage{rcs}

Then you start your document with something like the following:

ERT{
\RCS $Revision: 1.3 $
\RCS $Date: 2003/09/23 07:24:45 $
\RCS $RCSfile: MyFilename.lyx,v $
\RCS $State: Exp $}

Then you may add somewhere ERT{\RCSDate{}}, ERT{\RCSRCSfile{}} or
ERT{\RCSRevision{}} to get the values printed there.

Hope this helps,

Stephan

PS: Of course you have to install the package rcs.sty if not already
present on your system.


Re: problems running 1.5beta

2007-03-16 Thread Edwin Leuven

Enrico Forestieri wrote:

It is known that cmd.exe cannot deal with UNC paths. You cannot change the
current directory using UNC paths, for example. If you try the following:

C:\ cd \\ulysse\users\edwin.leuven\AppData

you should get the same error you report above. Now try:

C:\ cd W:\AppData
C:\ W:
W:\AppData

Do you understand now?


yes


You should arrange things such that LyX thinks
that your home dir is in W:\ rather than //ulysse/users/edwin.leuven
and things should then work. 


how?

the strange thing is that (line 779 in configure.py)

srcdir = os.path.dirname(sys.argv[0])
print 'srcdir:', srcdir

spits out:

srcdir: W:/programs/LyX15/Resources/.

so i don't know where things go wrong (ie where lyx looks for and finds my 
userdir)

 This is Windows, I need not say more...

i know, it sucks, but still, it is reality at work...


so i still think that the problem is with the script, not with my environment...


The problem *is* with your environment.


you convinced me. the question is how to get around this problem. as i wrote before, my network 
share is bound to w: and i can't imagine that my setup is very atypical from a lot of other windows 
shops...


:(







Re: r17418 - in /lyx-devel/trunk/src/frontends/qt4: DockView....

2007-03-16 Thread Abdelrazak Younes

Jürgen Spitzmüller wrote:

Abdelrazak Younes wrote:

By the way, could you check bug 3152:


With std-lib-debug enabled, trying to open the TOC crashes LyX:


And now?

I have just committed a cleanup of the controller.


Another (separate) problem:

in the LOT and LOF, always the very last item is highlighted, even if clicking 
on another item jumps to the appropriate position (in the TOC, everything 
looks OK).


The next one in my list.

Abdel.



Re: r17418 - in /lyx-devel/trunk/src/frontends/qt4: DockView....

2007-03-16 Thread Jürgen Spitzmüller
Abdelrazak Younes wrote:
  With std-lib-debug enabled, trying to open the TOC crashes LyX:

 And now?

Still the same crash, unfortunately.

Jürgen


Re: r17418 - in /lyx-devel/trunk/src/frontends/qt4: DockView....

2007-03-16 Thread Abdelrazak Younes

Jürgen Spitzmüller wrote:

Abdelrazak Younes wrote:

With std-lib-debug enabled, trying to open the TOC crashes LyX:

And now?


Still the same crash, unfortunately.


backtrace?



Re: FollowUp: Multiple bib entries selection (same author, and more...)

2007-03-16 Thread Abdelrazak Younes

Marco Bravi wrote:

Dear Abdel,
  


Hi Marco, putting the developer list in copy...


I would stress even more what I said the other day about the selection
of multiple bib entries with same author.

The problem with this regressed behaviour is, potentially, much more
serious. Consider this:

- the default behaviour of pybliographic when you add article entries by
hand is to generate the key from the sequence of the initial letters of
the last names of all the authors, so that the key is by no means
related to the first author last name. I have a few files keyed by
myself generated this way and which I cannot use anymore (often, the
first author is... the least known of the group!)

- you may happen to find/receive/share bibliography files created by
other people, who have their own habits in choosing the keys (which,
after all, are hashes...).

At this point, I really think that the current behaviour can not only
limit the power of the Insert citation dialog, but even render it
useless.
  


I understand.


Suggestion:

I think the new behaviour (automatic selection of the matching records)
is perfectly ok. However, all the records matching the typed string in
any part of it (authors, title, journal... just if it were a single
string) should be matched.

If the record info is divided into multiple internal memory fields
(which I think it is), an idea could be to just have LyX search all of
these fields.
  
That would be quite easy to implement I guess. But I am worried about 
performance because this is search as you type. Could you please check 
if performance is OK with this patch?


Anybody who is using big Bibtex databases? Jurgen? Georg? I need testers...



The real power search could be, later, to add some limitation (search
only among author names, or article/book titles...). For now, I think
that a general search is satisfactory and leaves current users of LyX
without being scared of the new version if they have a good amount of
bibliography files with strangely generated hashes laying around.
  


That would be for later...

Abdel.


Best regards from

Marco



  


Index: QCitation.C
===
--- QCitation.C (revision 17419)
+++ QCitation.C (working copy)
@@ -113,8 +113,20 @@
 
 void QCitation::findKey(QString const  str)
 {
-   QStringList sl = available_keys_.stringList().filter(str, 
Qt::CaseInsensitive);
-   found_keys_.setStringList(sl);
+   QStringList keys = available_keys_.stringList();
+   QStringList result;
+
+   // First search within the key info:
+   for (int i = 0; i  keys.size(); ++i) {
+   QString info = getKeyInfo(keys[i]);
+   if (info.contains(str, Qt::CaseInsensitive))
+   result += keys[i];
+   }
+
+   // Then add also the matching keys:
+   result += keys.filter(str, Qt::CaseInsensitive);
+
+   found_keys_.setStringList(result);
 }
 
 


Current SVN: linking error

2007-03-16 Thread Abdelrazak Younes

Any idea someone?

LaTeX.obj : error LNK2019: unresolved external symbol bool __cdecl 
boost::filesystem::native(class std::basic_stringchar,struct 
std::char_traitschar,class std::allocatorchar  const ) 
([EMAIL PROTECTED]@boost@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@@[EMAIL PROTECTED]@2@@std@@@Z) 
referenced in function bool __cdecl lyx::`anonymous 
namespace'::insertIfExists(class lyx::support::FileName const ,class 
lyx::DepTable ) 
([EMAIL PROTECTED]@lyx@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@2@@Z)
D:\devel\lyx\trunk\development\cmake\bin\Release\lyx-qt4.exe : fatal 
error LNK1120: 1 unresolved externals




Re: what about the patch for lyxlex / bug 3293?

2007-03-16 Thread José Matos
On Thursday 15 March 2007 6:27:13 pm Georg Baum wrote:
 The LyXLex internals were always a secret to me, so I can't say much about
 the patch other than this: Bernhards explanations make sense, and it seems
 that he knows what he is talking about. Therefore this patch is OK with
 me, but it will need some testing (which I can't do due to lack of time).

  That is fair.

  Jean-Marc, any comment about this patch?

 Georg

-- 
José Abílio


Re: problems running 1.5beta

2007-03-16 Thread Enrico Forestieri
On Fri, Mar 16, 2007 at 03:07:27PM +0100, Edwin Leuven wrote:
 Enrico Forestieri wrote:
  You should arrange things such that LyX thinks
  that your home dir is in W:\ rather than //ulysse/users/edwin.leuven
  and things should then work. 
 
 how?

Good question. LyX should use %USERPROFILE% for the home dir and given
that USERPROFILE is set to C:\Documents and Settings\edwin.leuven
for you, I don't understand why it insists on //ulysse/users/edwin.leuven.
Maybe some kind of translation takes place behind the scenes. You could
try explicitly setting USEPROFILE to W:

 the strange thing is that (line 779 in configure.py)
 
  srcdir = os.path.dirname(sys.argv[0])
  print 'srcdir:', srcdir
 
 spits out:
 
 srcdir: W:/programs/LyX15/Resources/.

So the system dir is correctly picked.

   This is Windows, I need not say more...
 
 i know, it sucks, but still, it is reality at work...

I can bear Windows only because of Cygwin...

 so i still think that the problem is with the script, not with my
 environment...
  
  The problem *is* with your environment.
 
 you convinced me. the question is how to get around this problem. as i
 wrote before, my network 
 share is bound to w: and i can't imagine that my setup is very atypical
 from a lot of other windows 
 shops...

I think that asking on the users list may help. I only use the Windows
version of LyX for testing purposes.

-- 
Enrico


Re: Current SVN: linking error

2007-03-16 Thread Abdelrazak Younes

Abdelrazak Younes wrote:

Any idea someone?


It's corrected now.



Re: FollowUp: Multiple bib entries selection (same author, and more...)

2007-03-16 Thread Abdelrazak Younes

Abdelrazak Younes wrote:

Marco Bravi wrote:

Suggestion:

I think the new behaviour (automatic selection of the matching records)
is perfectly ok. However, all the records matching the typed string in
any part of it (authors, title, journal... just if it were a single
string) should be matched.

If the record info is divided into multiple internal memory fields
(which I think it is), an idea could be to just have LyX search all of
these fields.
  
That would be quite easy to implement I guess. But I am worried about 
performance because this is search as you type. Could you please 
check if performance is OK with this patch?


The attached patch performs *much* better. I've loaded all bibtex files 
of the Miktex distribution and it works fine.


Objection?

Abdel.

Index: QCitation.C
===
--- QCitation.C (revision 17455)
+++ QCitation.C (working copy)
@@ -113,8 +113,21 @@
 
 void QCitation::findKey(QString const  str)
 {
-   QStringList sl = available_keys_.stringList().filter(str, 
Qt::CaseInsensitive);
-   found_keys_.setStringList(sl);
+   QStringList keys = (str.size()  1)?
+   found_keys_.stringList() : available_keys_.stringList();
+   QStringList result;
+
+   // First search within the key info:
+   for (int i = 0; i  keys.size(); ++i) {
+   QString info = getKeyInfo(keys[i]);
+   if (info.contains(str, Qt::CaseInsensitive))
+   result += keys[i];
+   }
+
+   // Then add also the matching keys:
+   result += keys.filter(str, Qt::CaseInsensitive);
+
+   found_keys_.setStringList(result);
 }
 
 


Re: FollowUp: Multiple bib entries selection (same author, and more...)

2007-03-16 Thread Abdelrazak Younes

Marco Bravi wrote:

Il giorno ven, 16/03/2007 alle 16.10 +0100, Marco Bravi ha scritto:
  

I will try the patch in the next couple of days or so. However, I tend
to work with 3-4 databases at once but not so big (overall, there may be
some hundreds of references inside, not more).



There is an annoying delay in simple typing speed, as you anticipated. I
think the solution below might be workable and (almost) elegant. You
don't search until the user has not stopped typing for a certain amount
of time. I think 500 ms might be a good starting value. You do not
experience typing delays, and could still search fast.
  


Please try my newer patch (attached) and report back.


  

It could be replaced by simply sensing the writer stopping typing for a
 short time (say, 0.5 to 1 sec), and assuming that he wants to update
 the search results; after all, if you have to press Next, you must
 have to leave the keyboard for at least as much time as that...



There is one bug in the patch, as one matching record is found twice (I
think you are counting the second match on the key!).
  


Indeed, I'll correct that.

Abdel.

PS: please try to keep the development list in copy.

Index: QCitation.C
===
--- QCitation.C (revision 17455)
+++ QCitation.C (working copy)
@@ -113,8 +113,21 @@
 
 void QCitation::findKey(QString const  str)
 {
-   QStringList sl = available_keys_.stringList().filter(str, 
Qt::CaseInsensitive);
-   found_keys_.setStringList(sl);
+   QStringList keys = (str.size()  1)?
+   found_keys_.stringList() : available_keys_.stringList();
+   QStringList result;
+
+   // First search within the key info:
+   for (int i = 0; i  keys.size(); ++i) {
+   QString info = getKeyInfo(keys[i]);
+   if (info.contains(str, Qt::CaseInsensitive))
+   result += keys[i];
+   }
+
+   // Then add also the matching keys:
+   result += keys.filter(str, Qt::CaseInsensitive);
+
+   found_keys_.setStringList(result);
 }
 
 


Re: Current SVN: linking error

2007-03-16 Thread Bo Peng

On 3/16/07, Abdelrazak Younes [EMAIL PROTECTED] wrote:

Abdelrazak Younes wrote:
 Any idea someone?

It's corrected now.


I was wondering why I linked fine. :-)

Bo


Re: Wow!

2007-03-16 Thread christian . ridderstrom

On Fri, 16 Mar 2007, Georg Baum wrote:


[EMAIL PROTECTED] wrote:


On Fri, 16 Mar 2007,
[EMAIL PROTECTED] wrote:


http://wiki.lyx.org/Devel.Captions


Btw, I was doubly impressed that you even used

 LyxBug:3209


I copied it from somewhere. But of course you know that it is misspelled?


Yes, I know... probably for some historic reason related to how 'LyXBug' 
would have been interpreted as markup in very old versions of PmWiki.


I changed the page

http://wiki.lyx.org/Site/InterMap

so that all of the following work

LyxBug:   http://bugzilla.lyx.org/show_bug.cgi?id=$1
LyXBug:   http://bugzilla.lyx.org/show_bug.cgi?id=$1
bug:  http://bugzilla.lyx.org/show_bug.cgi?id=$1
Bug:  http://bugzilla.lyx.org/show_bug.cgi?id=$1

In addition, I added so that all prefixes like

LyxDevelThread:

can now be written either 'LyXDevelThread:' or  'LyxDevelThread:'.

Someday later on I could remove 'LyxDevelThread', but that involves 
changing all the old references...


/Christian

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

Re: what about the patch for lyxlex / bug 3293?

2007-03-16 Thread Jean-Marc Lasgouttes
 José == José Matos [EMAIL PROTECTED] writes:

José On Thursday 15 March 2007 6:27:13 pm Georg Baum wrote:
 The LyXLex internals were always a secret to me, so I can't say
 much about the patch other than this: Bernhards explanations make
 sense, and it seems that he knows what he is talking about.
 Therefore this patch is OK with me, but it will need some testing
 (which I can't do due to lack of time).

José   That is fair.

José   Jean-Marc, any comment about this patch?

I think as Georg (who is always right, as everybody knows by now).

JMarc


Re: r17418 - in /lyx-devel/trunk/src/frontends/qt4: DockView....

2007-03-16 Thread Jürgen Spitzmüller
Abdelrazak Younes wrote:
 backtrace?

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 47702543013056 (LWP 24788)]
lyx::InsetCommandMailer::string2params ([EMAIL PROTECTED], [EMAIL PROTECTED],
[EMAIL PROTECTED]) at /usr/include/c++/4.1.2/bits/basic_string.h:591
591   { return _M_rep()-_M_length; }
(gdb) bt
#0  lyx::InsetCommandMailer::string2params ([EMAIL PROTECTED],
[EMAIL PROTECTED], [EMAIL PROTECTED])
at /usr/include/c++/4.1.2/bits/basic_string.h:591
#1  0x00c5f8c3 in lyx::frontend::ControlCommand::initialiseParams (
this=value optimized out, [EMAIL PROTECTED]) at ControlCommand.C:35
#2  0x00c92810 in lyx::frontend::ControlToc::initialiseParams (
this=0x7fff124878d0, [EMAIL PROTECTED]) at ControlToc.C:54
#3  0x00c0d42e in lyx::frontend::Dialog::show (this=0x1f7a1b0,
[EMAIL PROTECTED]) at Dialog.C:80
#4  0x00a36e13 in lyx::Dialogs::show (this=0x1477020,
[EMAIL PROTECTED], [EMAIL PROTECTED], inset=0x0) at Dialogs.C:118
#5  0x006f3085 in lyx::LyXFunc::dispatch (this=0x141d8d0,
[EMAIL PROTECTED]) at lyxfunc.C:1102
#6  0x006bf364 in lyx::dispatch ([EMAIL PROTECTED]) at lyx_main.C:1450
#7  0x00a3ebb6 in lyx::LyXView::dispatch (this=0x15e2098,
[EMAIL PROTECTED]) at LyXView.C:441
#8  0x00bf830f in lyx::frontend::Action::action (
this=value optimized out) at Action.C:98
#9  0x00bf834a in lyx::frontend::Action::qt_metacall (this=0x1f5b670,
_c=QMetaObject::InvokeMetaMethod, _id=0, _a=value optimized out)
at Action_moc.cpp:64
#10 0x2b629a99b45b in QMetaObject::activate (sender=0x1f5b670,
from_signal_index=5, to_signal_index=6, argv=0x1f8e7d8)
---Type return to continue, or q return to quit---
at kernel/qobject.cpp:2940
#11 0x2b629899d897 in QAction::triggered (this=0x7fff124878d0, _t1=false)
at .moc/release-shared/moc_qaction.cpp:208
#12 0x2b629899e33d in QAction::activate (this=0x1f5b670,
event=value optimized out) at kernel/qaction.cpp:1070
#13 0x2b6298c629d0 in QMenuPrivate::activateAction (this=0x15378b0,
action=0x1f5b670, action_e=QAction::Trigger) at widgets/qmenu.cpp:751
#14 0x2b62989e8178 in QWidget::event (this=0x1537fa0, 
event=0x7fff1248a700)
at kernel/qwidget.cpp:5698
#15 0x2b6298c6024b in QMenu::event (this=0x1537fa0, e=0x7fff1248a700)
at widgets/qmenu.cpp:1896
#16 0x2b62989a353c in QApplicationPrivate::notify_helper (this=0x1421b20,
receiver=0x1537fa0, e=0x7fff1248a700) at kernel/qapplication.cpp:3434
#17 0x2b62989a5ad1 in QApplication::notify (this=0x1423290,
receiver=0x1537fa0, e=0x7fff1248a700) at kernel/qapplication.cpp:3133
#18 0x2b62989f8151 in QETWidget::translateMouseEvent (this=0x1537fa0,
event=value optimized out)
at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:186
#19 0x2b62989f672a in QApplication::x11ProcessEvent (this=0x136,
event=0x7fff1248abd0) at kernel/qapplication_x11.cpp:2850
#20 0x2b6298a17e65 in x11EventSourceDispatch (s=0x1429af0, callback=0,
user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:122
#21 0x2b629ac5df94 in g_main_context_dispatch ()
---Type return to continue, or q return to quit---
   from /opt/gnome/lib64/libglib-2.0.so.0
#22 0x2b629ac60dc5 in g_main_context_prepare ()
   from /opt/gnome/lib64/libglib-2.0.so.0
#23 0x2b629ac612ee in g_main_context_iteration ()
   from /opt/gnome/lib64/libglib-2.0.so.0
#24 0x2b629a9abc30 in QEventDispatcherGlib::processEvents (this=0x1427910,
flags=value optimized out) at kernel/qeventdispatcher_glib.cpp:363
#25 0x2b6298a17c7f in QGuiEventDispatcherGlib::processEvents (
this=0x7fff124878d0, flags=value optimized out)
at kernel/qguieventdispatcher_glib.cpp:178
#26 0x2b629a98a6b8 in QEventLoop::processEvents (
this=value optimized out, flags=value optimized out)
at kernel/qeventloop.cpp:126
#27 0x2b629a98a7c9 in QEventLoop::exec (this=0x7fff1248af50,
[EMAIL PROTECTED]) at kernel/qeventloop.cpp:172
#28 0x2b629a98c9c0 in QCoreApplication::exec ()
at kernel/qcoreapplication.cpp:727
#29 0x00ae1c09 in lyx::frontend::GuiApplication::exec (
this=value optimized out) at GuiApplication.C:152
#30 0x006cda78 in lyx::LyX::exec (this=0x7fff1248c160,
argc=value optimized out, argv=value optimized out) at lyx_main.C:462
#31 0x00429fef in main (argc=1, argv=0x7fff1248c278) at main.C:48


Jürgen


Re: [patch] bug 3226: labels in caption insets don't have a prefix

2007-03-16 Thread Andre Poenitz
On Fri, Mar 16, 2007 at 10:46:57AM +0100, Abdelrazak Younes wrote:
 It surely has. In the main inset go down to cell slice[0].cell, walk
 down to paragraph slice[0].pit, go to pos slice[0].pos, Take the inset
 there. Go to its cell slice[1].cell, paragraph slice[1].pit, position
 slice[1].pos. And so on. Ordinary text insets have a single cell only,
 tables and a lot of math insets may have more than one.
 
 Am I the only one who think this is not simple?

Don't know. What would be the alternative?

 Not really. We had the parent way for about ten years, yet no way to
 iterate over the document. So implementing it was obviously not trivial
 as having no way to iterate over a document hurt a lot...
 
 Come on, look at DocIterator::forwardPos() and backwardPos(), I am 
 pretty sure this could be simplified by having access to the tree 
 information.

Could be. It is pretty well encapsulated, though, so I wonder why
saving a dozen lines of some implementation detail makes so much
of a difference in your eyes.

 I am not saying the parent approach is wrong.  However, it has a lot of
 implications. A whole lot.
 
 As I said, I am not advocating a complete switch to the parent approach.

Anythiung inbetween doesn't make much sense maintanance-wise.

Andre'


Re: Thought about the file format

2007-03-16 Thread Andre Poenitz
On Fri, Mar 16, 2007 at 10:03:14PM +0900, John McCabe-Dansted wrote:
 On 3/16/07, Andre Poenitz [EMAIL PROTECTED] wrote:
 On Thu, Mar 15, 2007 at 10:51:24PM +0100, [EMAIL PROTECTED] wrote:
 I have no problems with that as long as this is a concious decision of
 the user. However, having things like my user name and modification/access
 date dumped silently into the file is no option.
 
 An alternative would be to support an RCS format where everything is
 explicitly saved forever, so e.g. you not only know when the document
 was printed, but also can revert to the version for which pdflatex was
 run successfully. This would have saved me many times from  latex
 producing some unintelligible error with no indication of how to fix
 it or which change caused it.

You mean that kind of stuff when you sent out a contract proposal
as .lyx file and the recipient is able to read all earlier versions
when he looks on the file with a text viewer?

I like this idea. This reminds me pretty much of the only reason why
I like receiving .doc files...

Andre'


Re: r17418 - in /lyx-devel/trunk/src/frontends/qt4: DockView....

2007-03-16 Thread Abdelrazak Younes

Jürgen Spitzmüller wrote:

Abdelrazak Younes wrote:

backtrace?


Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 47702543013056 (LWP 24788)]
lyx::InsetCommandMailer::string2params ([EMAIL PROTECTED], [EMAIL PROTECTED],
[EMAIL PROTECTED]) at /usr/include/c++/4.1.2/bits/basic_string.h:591
591   { return _M_rep()-_M_length; }
(gdb) bt
#0  lyx::InsetCommandMailer::string2params ([EMAIL PROTECTED],
[EMAIL PROTECTED], [EMAIL PROTECTED])
at /usr/include/c++/4.1.2/bits/basic_string.h:591
#1  0x00c5f8c3 in lyx::frontend::ControlCommand::initialiseParams (
this=value optimized out, [EMAIL PROTECTED]) at ControlCommand.C:35
#2  0x00c92810 in lyx::frontend::ControlToc::initialiseParams (
this=0x7fff124878d0, [EMAIL PROTECTED]) at ControlToc.C:54


I wonder why data is suddenly wrong whereas it is fine there:


#3  0x00c0d42e in lyx::frontend::Dialog::show (this=0x1f7a1b0,
[EMAIL PROTECTED]) at Dialog.C:80


I suspect a gcc bug here... please copy data to a temporary data2 here 
and pass it to ControlCommand::initialiseParams(). If there is no crash 
gcc is at fault here. Maybe we've reached the maximum number of const 
reference allowable?


Abdel.


#4  0x00a36e13 in lyx::Dialogs::show (this=0x1477020,
[EMAIL PROTECTED], [EMAIL PROTECTED], inset=0x0) at Dialogs.C:118
#5  0x006f3085 in lyx::LyXFunc::dispatch (this=0x141d8d0,
[EMAIL PROTECTED]) at lyxfunc.C:1102
#6  0x006bf364 in lyx::dispatch ([EMAIL PROTECTED]) at lyx_main.C:1450
#7  0x00a3ebb6 in lyx::LyXView::dispatch (this=0x15e2098,
[EMAIL PROTECTED]) at LyXView.C:441
#8  0x00bf830f in lyx::frontend::Action::action (
this=value optimized out) at Action.C:98
#9  0x00bf834a in lyx::frontend::Action::qt_metacall (this=0x1f5b670,
_c=QMetaObject::InvokeMetaMethod, _id=0, _a=value optimized out)
at Action_moc.cpp:64
#10 0x2b629a99b45b in QMetaObject::activate (sender=0x1f5b670,
from_signal_index=5, to_signal_index=6, argv=0x1f8e7d8)
---Type return to continue, or q return to quit---
at kernel/qobject.cpp:2940
#11 0x2b629899d897 in QAction::triggered (this=0x7fff124878d0, _t1=false)
at .moc/release-shared/moc_qaction.cpp:208
#12 0x2b629899e33d in QAction::activate (this=0x1f5b670,
event=value optimized out) at kernel/qaction.cpp:1070
#13 0x2b6298c629d0 in QMenuPrivate::activateAction (this=0x15378b0,
action=0x1f5b670, action_e=QAction::Trigger) at widgets/qmenu.cpp:751
#14 0x2b62989e8178 in QWidget::event (this=0x1537fa0, 
event=0x7fff1248a700)

at kernel/qwidget.cpp:5698
#15 0x2b6298c6024b in QMenu::event (this=0x1537fa0, e=0x7fff1248a700)
at widgets/qmenu.cpp:1896
#16 0x2b62989a353c in QApplicationPrivate::notify_helper (this=0x1421b20,
receiver=0x1537fa0, e=0x7fff1248a700) at kernel/qapplication.cpp:3434
#17 0x2b62989a5ad1 in QApplication::notify (this=0x1423290,
receiver=0x1537fa0, e=0x7fff1248a700) at kernel/qapplication.cpp:3133
#18 0x2b62989f8151 in QETWidget::translateMouseEvent (this=0x1537fa0,
event=value optimized out)
at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:186
#19 0x2b62989f672a in QApplication::x11ProcessEvent (this=0x136,
event=0x7fff1248abd0) at kernel/qapplication_x11.cpp:2850
#20 0x2b6298a17e65 in x11EventSourceDispatch (s=0x1429af0, callback=0,
user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:122
#21 0x2b629ac5df94 in g_main_context_dispatch ()
---Type return to continue, or q return to quit---
   from /opt/gnome/lib64/libglib-2.0.so.0
#22 0x2b629ac60dc5 in g_main_context_prepare ()
   from /opt/gnome/lib64/libglib-2.0.so.0
#23 0x2b629ac612ee in g_main_context_iteration ()
   from /opt/gnome/lib64/libglib-2.0.so.0
#24 0x2b629a9abc30 in QEventDispatcherGlib::processEvents (this=0x1427910,
flags=value optimized out) at kernel/qeventdispatcher_glib.cpp:363
#25 0x2b6298a17c7f in QGuiEventDispatcherGlib::processEvents (
this=0x7fff124878d0, flags=value optimized out)
at kernel/qguieventdispatcher_glib.cpp:178
#26 0x2b629a98a6b8 in QEventLoop::processEvents (
this=value optimized out, flags=value optimized out)
at kernel/qeventloop.cpp:126
#27 0x2b629a98a7c9 in QEventLoop::exec (this=0x7fff1248af50,
[EMAIL PROTECTED]) at kernel/qeventloop.cpp:172
#28 0x2b629a98c9c0 in QCoreApplication::exec ()
at kernel/qcoreapplication.cpp:727
#29 0x00ae1c09 in lyx::frontend::GuiApplication::exec (
this=value optimized out) at GuiApplication.C:152
#30 0x006cda78 in lyx::LyX::exec (this=0x7fff1248c160,
argc=value optimized out, argv=value optimized out) at lyx_main.C:462
#31 0x00429fef in main (argc=1, argv=0x7fff1248c278) at main.C:48


Jürgen





Re: r17418 - in /lyx-devel/trunk/src/frontends/qt4: DockView....

2007-03-16 Thread Abdelrazak Younes

Jürgen Spitzmüller wrote:

Abdelrazak Younes wrote:

With std-lib-debug enabled, trying to open the TOC crashes LyX:

And now?


Still the same crash, unfortunately.


And now?




Re: degree symbol in LyX on Linux with Compose key

2007-03-16 Thread John Pye
Hi again,

FWIW Ignacio García pointed out on lyx-users that, in Ubuntu, the
sequence Compose o o works, and I checked it and that's right.

The big question now is why does that sequence work in LyX when in all
my other programs Compose ^ 0 is the one???

By the way, I note that Compose o o works in K3B, another Qt-based
program. So it looks like Qt and GTK perhaps maintain their own separate
key-binding settings?

Cheers
JP

John Pye wrote:
 Andreas Vox wrote:
   
 John Pye [EMAIL PROTECTED] writes:

   
 
 Hi all

 Over on the user's list we've run out of ideas on this one. Can anyone
 here offer any suggestions?

 http://article.gmane.org/gmane.editors.lyx.general/37022

 I note that as well as the degree symbol (°) then joined up a-and-e also
 doesn't work (æ).
 
   
 This looks very much like the infamous Qt3-immodule patch on Ubuntu bug.
 Scribus has the same problem: http://bugs.scribus.net/view.php?id=1908

 Try another LyX frontend if possible or compile a Qt3 without the immodule 
 patch.
 It might also help to set the IM configuration to XIM, ymmv.

 HTH

 /Andreas

   
 
 Sounds like this bug might be a possibility. I don't think I can afford
 to recompile LyX right now (thesis in the works) but I can report that
 in K3B (a KDE app) I tried typing accents and discovered that all is not
 equal. In K3B, my keystroke r-alt ^ 0 results in a superscript zero, not
 a degree symbol.

 I wasn't able to type a degree symbol in K3B but that was just that I
 didn't know the sequence, I think.

 In K3B at least it displays *something* for the r-alt ^ 0 sequence.
 Whereas LyX displays nothing. Does this give us more information?

 Cheers
 JP
   


Re: marc.theaimsgroup.com got renamed to marc.info

2007-03-16 Thread Uwe Stöhr

 Someone should update the mailing list page on www.lyx.org and also update
 generate_contributions.py.

I did this:
http://www.lyx.org/trac/changeset/17458
http://www.lyx.org/trac/changeset/17459
http://www.lyx.org/trac/changeset/17460

I hope I got everything.

regards Uwe


Re: Math fonts -- Win vs Mac

2007-03-16 Thread Uwe Stöhr

 With the attached patch LyX is also closer to TeX, at least for
 super/subscript placement. I implemented the rules from 18a to 18f
 in appendix G of the TeXbook.

 I also attach here two screenshots showing a formula before and after the
 patch.

This improves the on screen layout a lot! I would say please put it in.

regards Uwe


Re: [patch] bug 3226: labels in caption insets don't have a prefix

2007-03-16 Thread Jürgen Spitzmüller
Abdelrazak Younes wrote:
> With my last patch we don't need to check explicitly for the
> LABEL_SENSITIVE because everything within a float (or a wrap) will get
> the label prefix, LABEL_SENSITIVE or not.

I don't think that's a good idea. There might be other things than the caption 
inside floats that need a different prettyref prefix, anything with a 
counter. 

I think only captions should get the fig/tab/alg prefix.

Jürgen


Re: [patch] bug 3226: labels in caption insets don't have a prefix

2007-03-16 Thread Jean-Marc Lasgouttes
> "Jürgen" == Jürgen Spitzmüller <[EMAIL PROTECTED]> writes:

Jürgen> Abdelrazak Younes wrote:
>> With my last patch we don't need to check explicitly for the
>> LABEL_SENSITIVE because everything within a float (or a wrap) will
>> get the label prefix, LABEL_SENSITIVE or not.

Jürgen> I don't think that's a good idea. There might be other things
Jürgen> than the caption inside floats that need a different prettyref
Jürgen> prefix, anything with a counter.

Jürgen> I think only captions should get the fig/tab/alg prefix.

+1

JMarc


Re: crash in TocBackend::updateItem

2007-03-16 Thread Jean-Marc Lasgouttes
> "Bernhard" == Bernhard Roider <[EMAIL PROTECTED]> writes:

>> By the way 3: typing return at the beginning of a theorem does not
>> behave like in section, is this normal?

Bernhard> Are environment layouts handled different from paragraph
Bernhard> layouts?

Yes.

Bernhard> By the way: I would prefer if consecutive paragraphs with
Bernhard> the same environment layout would _not_ be merged into one
Bernhard> environment. I'm not happy with putting a separator
Bernhard> paragraph in between two subsequent definitions,
Bernhard> theorems,... . If an environment should contain more than
Bernhard> one paragraph then it's IMO better to make them paragraphs
Bernhard> with standard layout and increase the environment depth.

I now tend to think we should do that indeed, but it is a file format
change. The only case where it really makes sense is for lists.

JMarc


Re: About Date inset in the external dialog

2007-03-16 Thread Jean-Marc Lasgouttes
> "Uwe" == Uwe Stöhr <[EMAIL PROTECTED]> writes:

Uwe> As described in bug 3339
Uwe> http://bugzilla.lyx.org/show_bug.cgi?id=3339 we have two Date
Uwe> input methods that should be merged. I don't have a good idea how
Uwe> but something should be done as it's confusing: I'm currently
Uwe> writing a new part of the docs describing the date stuff but
Uwe> whatever I write the reader would be confused.

THese are two different things (I believe that you know the stuff below...):

- date-insert was meant originally to add a date at the beginning of a
  note; it is the date at the time where the thing is written

- the date external inset template is the date at the time of creating
  the latex file; it as created as a fun way to show of the then new
  external inset.

All in all, I think that none of these two uses has been thoroughly
thought out, and it shows.

JMarc


Re: Should --with-qt-dir be removed?

2007-03-16 Thread Jean-Marc Lasgouttes
> "Bo" == Bo Peng <[EMAIL PROTECTED]> writes:

Bo> Dear all, To check depends.py, I run ./configure today but
Bo> --with-qt-dir does not recognize my qt4.2.2 distribution. It
Bo> turned out that --with-qt4-dir is the correct option. Because qt3
Bo> is no longer supported, I would suggest that we remove
Bo> --with-qt-dir option, or make it equivalent to --with-qt4-dir.

There is no --with-qt-dir option actually. It happens that configure
will silently accept any bogus option that you feed it with (there is a
reason for that actually).

The fact is that config/qt.m4 is still there, but it is unused and
shall be removed. And INSTALL shall be updated.

JMarc


Re: Autotools fail.

2007-03-16 Thread Jean-Marc Lasgouttes
> "Bo" == Bo Peng <[EMAIL PROTECTED]> writes:

Bo> Dear list, As I have mentioned, I am running autotools to test
Bo> depends.py. I can not proceed because of the following error after
Bo> successful ./configure. Note that scons works fine and
Bo> --disable-stdlib-debug lead to the same error.

What you show here is a compiler bug, so it is not really autotools
fault. What we need to know is probably what different flags are
passed to gcc (on command line and in config.h).

JMarc



Re: r17450 - in /lyx-devel/trunk: lib/external_templates src/...

2007-03-16 Thread Georg Baum
[EMAIL PROTECTED] wrote:

http://www.lyx.org/trac/file/lyx-devel/trunk/lib/external_templates?rev=17450
>
==
> --- lyx-devel/trunk/lib/external_templates (original) +++
> lyx-devel/trunk/lib/external_templates Thu Mar 15 22:22:02 2007 @@ -99,10
> +99,10 @@
>  TemplateEnd
>  
>  
> -Template XFig
> - GuiName "XFig: $$AbsOrRelPathParent$$Basename"
> - HelpText
> - An XFig figure.
> +Template Xfig
> + GuiName "Xfig: $$AbsOrRelPathParent$$Basename"
> + HelpText
> + An Xfig figure.

The new template name is a fileformat change. Please revert this part. Of
course you can do this change, but only if the needed lyx2lyx stuff comes
in the same commit.


Georg



Re: [patch] fix bug 3235 (and a bit more)

2007-03-16 Thread Georg Baum
Dov Feldstern wrote:

> Regarding 1820 --- I started looking at it a while ago, and I think that
> the problem stems from this: in TeXOnePar, previous_language is set to
> the language of the previous paragraph, or to the document language if
> this is the first paragraph. Then, if the new paragraph's language is
> different from the previous language, the language command is inserted,
> otherwise it isn't.
> 
> The problem is that inside an inset (such as a footnote), the paragraphs
> are numbered from 0 again. So the first paragraph in the footnote is
> identified as the "first", and therefore the previous_language is set to
> the document language, namely English (say it's an English document).

That (and the proposed solution below) makes a lot of sense. I don't have
time now to investigate, maybe you can put this analysis into bugzilla so
that it does not get forgotten?


Georg



Re: Thought about the file format

2007-03-16 Thread Georg Baum
Andre Poenitz wrote:

> On Thu, Mar 15, 2007 at 10:51:24PM +0100,
> [EMAIL PROTECTED] wrote:
>> Metadata repository and search possibilities like Nepomuk are coming on
>> the Linux Desktop. I think it will be important that LyX files can be
>> easily indexed in these new systems. Therefore, we should add metadata
>> fields. For privacy obsessed people maybe we can add an option to include
>> dummy values for metadata.
> 
> I have no problems with that as long as this is a concious decision of
> the user. However, having things like my user name and modification/access
> date dumped silently into the file is no option.

Exactly. And I don't consider that "privacy obsessed".


Georg



Re: SVN is down

2007-03-16 Thread Lars Gullik Bjønnes
Andre Poenitz <[EMAIL PROTECTED]> writes:

| On Thu, Mar 15, 2007 at 02:48:00PM +0100, Lars Gullik Bjønnes wrote:
| > Abdelrazak Younes <[EMAIL PROTECTED]> writes:
| > 
| > | > but I am curious about what happened?
| > 
| > I have no idea. Was fixed before I had a chance to look.
| > 
| > Andre, do you have any info?
| 
| I contacted Matthias and he in turn contacted the IT staff in Oslo which
| in turn was seemingly able to get the server up again.
| 
| I don't know either what the situation looked like nor how it was
| resolved.

Ok.

| A remaining issue is the time on the server (seems off by an hour) but I
| guess that's something that's fixable without physical access.

For some reason ntp was not started on boot. Fixed now.

-- 
Lgb


Re: [patch] fix bugs 3305 and 3172

2007-03-16 Thread Jürgen Spitzmüller
Jürgen Spitzmüller wrote:
> > I will commit the rest, can you take
> > care of this please?
>
> Yes. Since bugzilla is down, I sent the attached patch to Uwe for testing.

I'm gonna commit this now. There are still remeining problems, but those are 
separate.

Jürgen


Re: [patch] fix bug 3235 (and a bit more)

2007-03-16 Thread Dov Feldstern


That (and the proposed solution below) makes a lot of sense. I don't have
time now to investigate, maybe you can put this analysis into bugzilla so
that it does not get forgotten?

I already added a comment saying that there is a thread in the mailing 
list with such-and-such a title on such-and-such a date. Is that enough, 
or should I also add a link to the mailing list (how?) or the actual 
text of this message?




Re: problems running 1.5beta

2007-03-16 Thread Edwin Leuven

Enrico Forestieri wrote:

On Thu, Mar 15, 2007 at 10:10:25AM +0100, Edwin Leuven wrote:


this is windows and the official installer (the one that bo made available)

i have no administrator rights and installed lyx on my network share.

i get the following error message:

LyX: reconfiguring user directory
CMD.EXE a ‚t‚ d‚marr‚ avec '\\ulysse\users\edwin.leuven\AppData\lyx15beta1' en tant que chemin 
d'accŠs de r‚pertoire en

cours. Les chemins d'accŠs UNC ne sont pas prise en charge. Utilisation du
r‚pertoire Windows par d‚faut.
Traceback (most recent call last):
  File "W:/programs/LyX15/Resources/./configure.py", line 775, in 
log = open(logfile, 'w')
IOError: [Errno 13] Permission denied: 'configure.log'
LyX: Done!
LyXTextClassList::Read: unable to find textclass file  `'. Exiting.
Completed



any clues what is going on (and how to repair it)?



I think this is due to the fact that you use an UNC path. It is simply
ridiculous that cmd.exe cannot deal with them. I think that you could
try mapping the UNC path to a drive letter using the following syntax:

net use x: \\host\share /USER:username password

in this way, you can access \\host\share as x:\. Maybe you don't
even need to specify the username and password.

After doing that, I think that you have to accordingly update some ENV
variable or registry entry, but I am not sure which one (I really use
cygwin rather than windows...).


it is already mapped to w:

but somehow i don't think that cmd.exe is the problem

can someone tell me how to find out where configure.py tries to write 
configure.log ?






Freeze on "Accept All" (1.4.4svn)

2007-03-16 Thread John McCabe-Dansted

Hi, I have a crash with data loss with the latest 1.4.x SVN.  Open
 http://www.csse.uwa.edu.au/~john/lyx/modal_MF2.lyx
in lyx. Do an "accept all". LyX will lock up, it will not write an
".emergency" file, unless you go to the console and press Cntl-C. Even
then, LyX will not exit.

Also, accepting changes in the file
 http://www.csse.uwa.edu.au/~john/lyx/modal_MF.cannot.accept3.lyx
will cause a crash. (Less serious since at least it writes an emergency file).

--
John C. McCabe-Dansted
PhD Student
University of Western Australia


Re: Usability and the "insert graphics" dialog

2007-03-16 Thread Abdelrazak Younes

John Pye wrote:

Hi all

The following are some usability comments from my use of the LyX
Graphics dialog. It's not user-support stuff, so I'm hoping it's
appropriate to send it here. If these have been reported already, or
have even been fixed (I am using 1.4.3 in Ubuntu 6.10) please disregard.
I realise that this is open source software and that sometimes these
sorts of things can be slow moving, so no offence here; I just want to
pass on these thoughts on usability in the hope that some relatively
small GUI changes might make a big difference for some end users.


Hi John,

Everything you say makes sense. Unfortunately we are rather short on Qt 
developers and we are mainly focusing right now on finishing 1.5.0. I 
suggest that you test the beta1 version because the dialog has been 
redesigned there. Hopefully there would be less problem but if the 
issues are still relevant, maybe you could try to modify the related Qt 
Designer file? This is an easy task that don't require C++ knowledge.


Cheers,
Abdel.



Re: Wow!

2007-03-16 Thread Georg Baum
[EMAIL PROTECTED] wrote:

> On Fri, 16 Mar 2007,
> [EMAIL PROTECTED] wrote:
> 
>> http://wiki.lyx.org/Devel.Captions
> 
> Btw, I was doubly impressed that you even used
> 
>  LyxBug:3209

I copied it from somewhere. But of course you know that it is misspelled?


Georg



Re: [patch] fix bug 3235 (and a bit more)

2007-03-16 Thread Jean-Marc Lasgouttes
> "Dov" == Dov Feldstern <[EMAIL PROTECTED]> writes:

>>  That (and the proposed solution below) makes a lot of sense. I
>> don't have time now to investigate, maybe you can put this analysis
>> into bugzilla so that it does not get forgotten?
>> 
Dov> I already added a comment saying that there is a thread in the
Dov> mailing list with such-and-such a title on such-and-such a date.
Dov> Is that enough, or should I also add a link to the mailing list
Dov> (how?) or the actual text of this message?

I propose tha you copy your longer message and add a link to the
thread using for example gmane:
http://thread.gmane.org/gmane.editors.lyx.devel/79113/focus=79256

JMarc


Re: Unified title and toolbar on Mac OS X

2007-03-16 Thread Abdelrazak Younes

Jan Peters wrote:

Will that make it into 1.5? It looks so gorgeous :)


Yes, it's already in... Some bugs remain though.

Abdel.



Re: [patch] bug 3226: labels in caption insets don't have a prefix

2007-03-16 Thread Abdelrazak Younes

Jürgen Spitzmüller wrote:

Abdelrazak Younes wrote:

With my last patch we don't need to check explicitly for the
LABEL_SENSITIVE because everything within a float (or a wrap) will get
the label prefix, LABEL_SENSITIVE or not.


I don't think that's a good idea. There might be other things than the caption 
inside floats that need a different prettyref prefix, anything with a 
counter. 


I think only captions should get the fig/tab/alg prefix.


I am fine with this. I've done it because that's the current behaviour 
in 1.4.x. So shall I commit only the caption part?


Abdel.



Re: [patch] bug 3226: labels in caption insets don't have a prefix

2007-03-16 Thread Abdelrazak Younes

Jürgen Spitzmüller wrote:

Abdelrazak Younes wrote:

With my last patch we don't need to check explicitly for the
LABEL_SENSITIVE because everything within a float (or a wrap) will get
the label prefix, LABEL_SENSITIVE or not.


I don't think that's a good idea. There might be other things than the caption 
inside floats that need a different prettyref prefix, anything with a 
counter. 


I think only captions should get the fig/tab/alg prefix.


Hum, thinking about it a bit more. This is a default behaviour, we can 
always overwrite the prefix after the float check.


Abdel.



Re: Unified title and toolbar on Mac OS X

2007-03-16 Thread Jean-Marc Lasgouttes
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes:

Abdelrazak> Jan Peters wrote:
>> Will that make it into 1.5? It looks so gorgeous :)

Abdelrazak> Yes, it's already in... Some bugs remain though.

What is already in?



Re: [patch] bug 3226: labels in caption insets don't have a prefix

2007-03-16 Thread Abdelrazak Younes

Andre Poenitz wrote:

On Thu, Mar 15, 2007 at 06:36:15PM +0100, Abdelrazak Younes wrote:
My point is that is not equivalent. A tree-like approach will inevitably 
lead to cleaner and shorter code, I am 100% sure of that. Besides, I 
still have difficulty to grasp the cursor slice concept. Make a poll in 
the list and you will realise that close to nobody really understand the 
 cursor and cursor slice related code. For example I still don't know 
how to select a text between two Cursors...


Asking might help.


I've done that, many times may I add. Even Michael has asked many times 
and I believe he managed to find the solution by himself at the end 
(which I don't remember).




Create a new cursor (or reuse one of the two you got) with the
DocIterator part being the DocIterator part of the first cursor and the
anchor_ part being the DocIterator part of the second.

Of course there are restrictions. The DocIterator part may not be nested
further than the anchor_ part.


I've tried that. Problem is I didn't manage to make it work for any kind 
of selection. If you could write for me a method that will save the 
current selection state so that it can be restored afterwards it would 
help me a lot for some experiment I've done related to scrolling.




The reason is obvious: the Cursor approach hides the internal memory 
structure. It is complicated because it does not have a simple mental model.


It surely has. In the main inset go down to cell slice[0].cell, walk
down to paragraph slice[0].pit, go to pos slice[0].pos, Take the inset
there. Go to its cell slice[1].cell, paragraph slice[1].pit, position
slice[1].pos. And so on. Ordinary text insets have a single cell only,
tables and a lot of math insets may have more than one.


Am I the only one who think this is not simple?




IMO, the Cursor (the DocIterator really) should only be used to move
the cursor logically within the document and nothing else.


The dociterator is a pretty stable method to access a position in a
document independent of the actual memory layout. It can, e.g., be
readily dumped into a .lyx file. This is not immediately possible with
the pointer approach.


I agree. And as I say the dociterator is very nice for this use-case.




And I reckon that the code in DocIterator.C will be dramatically
simplified if we had access to the parent (because there is only one)
and children in an easy way.


Not really. We had the parent way for about ten years, yet no way to
iterate over the document. So implementing it was obviously not trivial
as having no way to iterate over a document hurt a lot...


Come on, look at DocIterator::forwardPos() and backwardPos(), I am 
pretty sure this could be simplified by having access to the tree 
information.





The only difference is that the recursive parent code is not
implemented, but the code to scan a cursor is already here.

Sure, three lines of code is really difficult to implement ;-)


There are more implications. You need to fix up stuff when copying
things as you lose value semantics.

I am not saying the parent approach is wrong.  However, it has a lot of
implications. A whole lot.


As I said, I am not advocating a complete switch to the parent approach.

Anyway, as Georg said, we have other matters at hand right now.

Abdel.



Re: problems running 1.5beta

2007-03-16 Thread Edwin Leuven

Edwin Leuven wrote:

it is already mapped to w:

but somehow i don't think that cmd.exe is the problem

can someone tell me how to find out where configure.py tries to write 
configure.log ?


when i change this

-logfile = 'configure.log'
+logfile = '//ulysse/users/edwin.leuven/configure.log'

then the script continues until it stumbles here:

LyX: reconfiguring user directory
CMD.EXE a ‚t‚ d‚marr‚ avec '\\ulysse\users\edwin.leuven\AppData\lyx15beta1' en tant que chemin 
d'accŠs de r‚pertoire en

cours. Les chemins d'accŠs UNC ne sont pas prise en charge. Utilisation du
r‚pertoire Windows par d‚faut.
Failed to create directory  bind
LyX: Done!
LyXTextClassList::Read: unable to find textclass file  `'. Exiting.
Completed


perhaps the double backslash causes trouble?

groping in the dark...


Re: Unified title and toolbar on Mac OS X

2007-03-16 Thread Abdelrazak Younes

Jean-Marc Lasgouttes wrote:

"Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes:


Abdelrazak> Jan Peters wrote:

Will that make it into 1.5? It looks so gorgeous :)


Abdelrazak> Yes, it's already in... Some bugs remain though.

What is already in?


The Toc dock widget? Or was he asking about the drawer?

Abdel.




  1   2   >