Re: [patch for [Bug 1656] command gnome-session-save kills lyx!]

2007-08-27 Thread Stephan Witt

Abdelrazak Younes schrieb:

Stephan Witt wrote:

Abdelrazak Younes schrieb:
I am OK with the patch but I would like to know first if there are 
any drawbacks, I am not on X11.


I tested this patch with Qt 4.1.2 and it is working without drawbacks.
AFAIK older Qt versions are not supported anymore were I had problems 
with the popping up of the dialog asking the user to confirm the file 
save operation. So two years ago the patch did not work (with Qt 3.x).


OK, thanks for the clarification.


I cannot tell anything about the behaviour on Windows.


I'll try without the #ifdef to test it out.


Do you need a new patch from me or will you change it yourself?


No, that's fine, I'll do it.


Thank you!

Stephan


Re: r19813 - in /lyx-devel/trunk: lib/layouts/stdinsets.inc s...

2007-08-27 Thread Martin Vermeer
On Sun, 26 Aug 2007 16:57:16 -0500
Bo Peng [EMAIL PROTECTED] wrote:

 On 8/26/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
  Author: vermeer
  Date: Sun Aug 26 22:32:58 2007
  New Revision: 19813
 
  URL: http://www.lyx.org/trac/changeset/19813
  Log:
  Move background colour into the layout files -- for all collapsables
 
 I think this commit breaks tex2lyx. I get error messages like  'Color'
 has not been declared.

Yes you're right, thanks. The attached patch is needed. I don't like it
bringing in Color, but I see no other way.

- Martin
 

Index: TextClass.h
===
--- TextClass.h	(revision 19813)
+++ TextClass.h	(working copy)
@@ -10,6 +10,7 @@
 #ifndef LYXTEXTCLASS_H
 #define LYXTEXTCLASS_H
 
+#include Color.h
 #include Layout.h
 #include lyxlayout_ptr_fwd.h
 
Index: tex2lyx/Makefile.am
===
--- tex2lyx/Makefile.am	(revision 19807)
+++ tex2lyx/Makefile.am	(working copy)
@@ -36,7 +36,9 @@
 	../Layout.cpp \
 	../TextClass.cpp \
 	../TextClass.h \
-	../Lexer.cpp 
+	../Lexer.cpp \
+	../Color.cpp \
+	../Color.h
 
 BUILT_SOURCES = $(PCH_FILE)
 


Re: LyX 1.5 patch candidate list (update)

2007-08-27 Thread Jürgen Spitzmüller
Richard Heck wrote:
  http://www.lyx.org/trac/changeset/19331 - Deal with a UI bug
     
 
  probably not needed (now).
   

 Easy enough to do if you want it. But it's not that critical.

Maybe for later? There will be an 1.5.3 release ;-)

Jürgen


Re: Middle-click copy-paste borked in SVN

2007-08-27 Thread Jürgen Spitzmüller
Bo Peng wrote:
 A 'better' fix has been committed, but there is still a problem of
 copy/paste table cells.

Do we have a bugzilla entry? Sorry for asking, I'm still trying to catch 
up ...

Jürgen


Re: [PATCH-final] Bug 3676

2007-08-27 Thread Jürgen Spitzmüller
Richard Heck wrote:
 It went in at 19565, 19598, and 19657. Whether it's for 1.5.x isn't
 clear to me. It ended up being a very large commit, and I'm guessing
 it'll be hard to port it once it's seen enough testing. But you might
 want to look at it. The new dialog is very nice, if I do say so myself.

Thanks. Let's postpone this then.

Jürgen


Reading LyX.cvs via gmane now, can now I unsubscribe from mail posts?

2007-08-27 Thread christian . ridderstrom
When I wasn't subscribed to LyX.cvs before, my commit messages were not 
posted automatically to that list. As I've quickly gotten tired of all the 
LyX.cvs email I'm now reading the posts through gmane.


My question is if I can unsubscribe to LyX.cvs without losing the function 
that my commit messages are posted to the list as they should?


/Christian


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

Re: [patch for [Bug 1656] command gnome-session-save kills lyx!]

2007-08-27 Thread Abdelrazak Younes

Stephan Witt wrote:

Abdelrazak Younes schrieb:

Do you need a new patch from me or will you change it yourself?


No, that's fine, I'll do it.


Thank you!


You are welcome. Please send a message to this list stating the following:

I grant permission to license any and all contributions I've made to
LyX under the Gnu GPL version 2 or later.

Could one of the usual suspects add Stephan to the Contrib list please?

Abdel.

Author: younes
Date: Mon Aug 27 08:35:24 2007
New Revision: 19824

URL: http://www.lyx.org/trac/changeset/19824
Log:
New 'Save all on shutdown or cancel' feature from Stephan Witt.

Modified:
lyx-devel/trunk/src/frontends/qt4/GuiApplication.cpp
lyx-devel/trunk/src/frontends/qt4/GuiApplication.h

Modified: lyx-devel/trunk/src/frontends/qt4/GuiApplication.cpp
URL: 
http://www.lyx.org/trac/file/lyx-devel/trunk/src/frontends/qt4/GuiApplication.cpp?rev=19824

==
--- lyx-devel/trunk/src/frontends/qt4/GuiApplication.cpp (original)
+++ lyx-devel/trunk/src/frontends/qt4/GuiApplication.cpp Mon Aug 27 
08:35:24 2007

@@ -27,6 +27,7 @@
 #include support/os.h
 #include support/Package.h

+#include BufferList.h
 #include BufferView.h
 #include Color.h
 #include debug.h
@@ -43,6 +44,7 @@
 #include QLocale
 #include QLibraryInfo
 #include QPixmapCache
+#include QSessionManager
 #include QTextCodec
 #include QTimer
 #include QTranslator
@@ -318,6 +320,20 @@
socket_callbacks_.erase(fd);
 }

+
+void GuiApplication::commitData(QSessionManager  sm)
+{
+   /// The implementation is required to avoid an application exit
+   /// when session state save is triggered by session manager.
+   /// The default implementation sends a close event to all
+   /// visible top level widgets when session managment allows
+   /// interaction.
+   /// We are changing that to write all unsaved buffers...
+   if (sm.allowsInteraction()  !theBufferList().quitWriteAll())
+   sm.cancel();
+}
+
+
 
 // X11 specific stuff goes here...
 #ifdef Q_WS_X11

Modified: lyx-devel/trunk/src/frontends/qt4/GuiApplication.h
URL: 
http://www.lyx.org/trac/file/lyx-devel/trunk/src/frontends/qt4/GuiApplication.h?rev=19824

==
--- lyx-devel/trunk/src/frontends/qt4/GuiApplication.h (original)
+++ lyx-devel/trunk/src/frontends/qt4/GuiApplication.h Mon Aug 27 
08:35:24 2007

@@ -25,6 +25,8 @@

 #include QApplication
 #include QTranslator
+
+class QSessionManager;

 namespace lyx {

@@ -74,9 +76,10 @@
void unregisterSocketCallback(int fd);
//@}

-   /// Methods inherited from \c Application class
+   /// Methods inherited from \c QApplication class
//@{
-   virtual bool notify(QObject * receiver, QEvent * event);
+   bool notify(QObject * receiver, QEvent * event);
+   void commitData(QSessionManager  sm);
//@}

///





Re: [patch for [Bug 1656] command gnome-session-save kills lyx!]

2007-08-27 Thread Abdelrazak Younes

Jürgen Spitzmüller wrote:

José Matos wrote:

With Jürgen coming soon I will let this decision to him. :-)

  So apart from style issues (that are easily fixed) this patch can go in
devel. :-)


OK for branch as well, if Abdel's testing revealed no problems.


No problem on Windows too so I just committed it (without the #ifdef).

Abdel.



Re: Middle-click copy-paste borked in SVN

2007-08-27 Thread Darren Freeman
On Mon, 2007-08-27 at 08:28 +0200, Jürgen Spitzmüller wrote:
 Bo Peng wrote:
  A 'better' fix has been committed, but there is still a problem of
  copy/paste table cells.
 
 Do we have a bugzilla entry? Sorry for asking, I'm still trying to catch 
 up ...

I started the thread, but due to proximity to the 1.5 release I expected
it to be on everybody's mind and fixed within a couple of days :)

So no, not to my knowledge.

There is a simple patch under test.

Have fun,
Darren



Re: Reading LyX.cvs via gmane now, can now I unsubscribe from mail posts?

2007-08-27 Thread Abdelrazak Younes

[EMAIL PROTECTED] wrote:
When I wasn't subscribed to LyX.cvs before, my commit messages were not 
posted automatically to that list. As I've quickly gotten tired of all 
the LyX.cvs email I'm now reading the posts through gmane.


My question is if I can unsubscribe to LyX.cvs without losing the 
function that my commit messages are posted to the list as they should?


Ye you can, every commit messages are send to the list independently of 
whether you're subscribe or not (I am not subscribed to lyx.cvs nor 
lyx.devel).


Abdel.



Re: Vertical space in a table cell gives latex errors

2007-08-27 Thread Helge Hafting

Paul A. Rubin wrote:

Helge Hafting wrote:
I have a table with a tall row, because one cell is fixed-width with 
multiple lines.

In another cell I wanted to place a single symbol, preferably centered
vertically.

I tried changing the column's vertical adjustment, but this had
no effect whatsoever.


Did you try setting the vertical alignment of the fixed width column 
to middle?  I find this counterintuitive, but it seems to be how it 
works.

Thanks, I can now get the effect I want.
Still, latex is very strange here, or perhaps LyX just
misrepresent things. I set some alignment on the fixed-width
column - in order to have _other_ columns line up with that
alignment?  Not only is this odd, but the concept does not
extend to having several fixed-width columns with differing
alignemnts.  (How is  the other columns going to line up then?
Like the first fixed column?  Like the next one says?)

There is indeed odd results when setting up several such
columns. :-(




So I tried forcing my way with insert-vertical space before
and after the symbol. Latex puked on this.


Try setting protected on the vertical space.  It doesn't seem to 
cause LaTeX to object (although it also doesn't seem to accomplish much).

Correct.  Latex accepts the protected space, but don't act
on it.  So it is useless and should probably be disabled.

Helge Hafting


Re: Lyx problems in importing txt2tags .tex files

2007-08-27 Thread Alexandre Santos
2007/8/24, José Matos [EMAIL PROTECTED]:
 On Friday 24 August 2007 13:14:33 Alexandre Santos wrote:
  However I have a problem importing the .tex files produced by txt2tags
  into LyX. The title and author field are missing in the .lyx file,
  replaced by a clear page mention. The final .dvi lacks those fields
  entirely.

 Without looking into further detail... does it works in the initial .tex
 version?

Yep, if I launch latex xp1.tex (or xp2.tex), I get properly formatted
dvi files (using MikeTex and Yap). So the problem seems to be with
LyX).

Cheers,
Alex


Re: r19813 - in /lyx-devel/trunk: lib/layouts/stdinsets.inc s...

2007-08-27 Thread Abdelrazak Younes

Martin Vermeer wrote:

On Sun, 26 Aug 2007 16:57:16 -0500
Bo Peng [EMAIL PROTECTED] wrote:


On 8/26/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

Author: vermeer
Date: Sun Aug 26 22:32:58 2007
New Revision: 19813

URL: http://www.lyx.org/trac/changeset/19813
Log:
Move background colour into the layout files -- for all collapsables

I think this commit breaks tex2lyx. I get error messages like  'Color'
has not been declared.


Yes you're right, thanks. The attached patch is needed. I don't like it
bringing in Color, but I see no other way.


There is a way: you just need the Color::color enum AFAIS so the 
solution is to extract this enum from the Color class and give it its 
own header. This will enable us to get rid of the Color_color 
pseudoclass too.


In any case please commit your quick fix ASAP as compilation is broken 
right now.


Abdel.



Re: [PATCH] Layout Modularity, Part 3

2007-08-27 Thread Abdelrazak Younes

[EMAIL PROTECTED] wrote:

On Sun, 26 Aug 2007, Andre Poenitz wrote:


On Sat, Aug 25, 2007 at 12:46:00PM -0400, Richard Heck wrote:

@@ -0,0 +1,291 @@
+/**
+ * \file QSelectionManager.cpp
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author Richard Heck
+ * \author Et Alia


I wonder how hard it will be to make Mr Alia sign the customary 
license agreement...


Probably easier than unifying the installers :-)


PS: Should I really add a smiley?


To be honest, at first I thought Mr Alia was French/Arabic...


FYI Alia is indeed an Arabic girl surname. The feminine counterpart of 
Ali (Which mean literally 'High').


Abdel.



Re: Middle-click copy-paste borked in SVN

2007-08-27 Thread Jürgen Spitzmüller
Darren Freeman wrote:
 So no, not to my knowledge.

 There is a simple patch under test.

Could you create a bugzilla entry and upload the patch there, please?

Jürgen


Re: [patch for [Bug 1656] command gnome-session-save kills lyx!]

2007-08-27 Thread Stephan Witt

Abdelrazak Younes schrieb:

Stephan Witt wrote:

Abdelrazak Younes schrieb:

Do you need a new patch from me or will you change it yourself?


No, that's fine, I'll do it.


Thank you!


You are welcome. Please send a message to this list stating the following:


I granted permission already in 2005. :)
It was the 22nd of February 2005.


Could one of the usual suspects add Stephan to the Contrib list please?


IMHO I'm on the the list already.

Thanks again.

Stephan


Re: [patch for [Bug 1656] command gnome-session-save kills lyx!]

2007-08-27 Thread Abdelrazak Younes

Stephan Witt wrote:

Abdelrazak Younes schrieb:

Stephan Witt wrote:

Abdelrazak Younes schrieb:

Do you need a new patch from me or will you change it yourself?


No, that's fine, I'll do it.


Thank you!


You are welcome. Please send a message to this list stating the 
following:


I granted permission already in 2005. :)
It was the 22nd of February 2005.


Good, so why do I have to commit this for you? ;-)

Abdel.



Re: [patch for [Bug 1656] command gnome-session-save kills lyx!]

2007-08-27 Thread Stephan Witt

Abdelrazak Younes schrieb:

Stephan Witt wrote:

Abdelrazak Younes schrieb:

Stephan Witt wrote:

Abdelrazak Younes schrieb:

Do you need a new patch from me or will you change it yourself?


No, that's fine, I'll do it.


Thank you!


You are welcome. Please send a message to this list stating the 
following:


I granted permission already in 2005. :)
It was the 22nd of February 2005.


Good, so why do I have to commit this for you? ;-)


You know, it's not so easy to gain commit privileges ;)
But I have not so many things to contribute anyway.

Stephan



Re: [patch] Re: Lyx crashed after inserting, deleting and inserting float object

2007-08-27 Thread Abdelrazak Younes

Alfredo Braunstein wrote:

Alfredo Braunstein wrote:


Abdelrazak Younes wrote:



Nope... unfortunately. I am sure this is a metrics problem actually.

Hum... I am _not_ sure...

Actually that's what I've read for some reason ;-) I would nevertheless
like to commit the patch, as valgrind tells that otherwise the wide_inset_
value is used before initialized. This wide stuff is really bad...


I did a bit of research, and I think I found something, and it seems
a mess. Please correct me if I'm wrong, this is what I understand:

Text::dispatch(LFUN_FLOAT_INSERT) calls dispatches
Cursor::dispatch(LFUN_CAPTION_INSERT) to insert the CAPTION. 
One possible general problem with this may be that Cursor::dispatch is not

reentrant-safe (see beforeDispatch members).


I've looked at it more closely and you're right. We should either use 
the local Text::dispatch() method or make sure the savings of 
beforeDispX and beforeDispY happen before Cursor::dispatch():


// store some values to be used inside of the handlers
getPos(beforeDispX_, beforeDispY_);

For trunk, I think we should replace all occurence of
cur.dispatch() with this-dispatch() in Text3::dispatch().
For BRANCH_1_5 I think the simpler solution is to move the getPos() call 
above at the beginning of the LFUN machinery: LyXFunc::dispatch().



The real problem in this case
seems to be that the dispatch machinery assumes up-to-date metrics
(Cursor::dispatch calls getPos), whereas in this case the Collapsable was
already inserted and the metrics still not updated.


I'll commit a hot fix shortly.

Abdel.



Re: r19813 - in /lyx-devel/trunk: lib/layouts/stdinsets.inc s...

2007-08-27 Thread Martin Vermeer
On Mon, 27 Aug 2007 09:43:19 +0200
Abdelrazak Younes [EMAIL PROTECTED] wrote:

 Martin Vermeer wrote:
  On Sun, 26 Aug 2007 16:57:16 -0500
  Bo Peng [EMAIL PROTECTED] wrote:
  
  On 8/26/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
  Author: vermeer
  Date: Sun Aug 26 22:32:58 2007
  New Revision: 19813
 
  URL: http://www.lyx.org/trac/changeset/19813
  Log:
  Move background colour into the layout files -- for all collapsables
  I think this commit breaks tex2lyx. I get error messages like  'Color'
  has not been declared.
  
  Yes you're right, thanks. The attached patch is needed. I don't like it
  bringing in Color, but I see no other way.
 
 There is a way: you just need the Color::color enum AFAIS so the 
 solution is to extract this enum from the Color class and give it its 
 own header. This will enable us to get rid of the Color_color 
 pseudoclass too.

Not really true, I need the lcolor object and getFromLyXName().

 In any case please commit your quick fix ASAP as compilation is broken 
 right now.

OK

- Martin


Re: [patch for [Bug 1656] command gnome-session-save kills lyx!]

2007-08-27 Thread Abdelrazak Younes

Stephan Witt wrote:

Abdelrazak Younes schrieb:

Stephan Witt wrote:

Abdelrazak Younes schrieb:

Stephan Witt wrote:

Abdelrazak Younes schrieb:

Do you need a new patch from me or will you change it yourself?


No, that's fine, I'll do it.


Thank you!


You are welcome. Please send a message to this list stating the 
following:


I granted permission already in 2005. :)
It was the 22nd of February 2005.


Good, so why do I have to commit this for you? ;-)


You know, it's not so easy to gain commit privileges ;)


Don't tell me...


But I have not so many things to contribute anyway.


But I'm sure you could ;-)

Abdel.



Re: r19813 - in /lyx-devel/trunk: lib/layouts/stdinsets.inc s...

2007-08-27 Thread Abdelrazak Younes

Martin Vermeer wrote:

On Mon, 27 Aug 2007 09:43:19 +0200
There is a way: you just need the Color::color enum AFAIS so the 
solution is to extract this enum from the Color class and give it its 
own header. This will enable us to get rid of the Color_color 
pseudoclass too.


Not really true, I need the lcolor object and getFromLyXName().


OK. But my point on the Color::color remains valid IMO.



In any case please commit your quick fix ASAP as compilation is broken 
right now.


OK


Thanks. While you are at it, there's a problem with float inset 
backgrounds, they are black:


LyX internal error: Missing color entry in Color.cpp for -842150451
Using black.


Abdel.



Re: [PATCH] Layout Modularity, Part 3

2007-08-27 Thread christian . ridderstrom

On Mon, 27 Aug 2007, Abdelrazak Younes wrote:


[EMAIL PROTECTED] wrote:

 On Sun, 26 Aug 2007, Andre Poenitz wrote:

  On Sat, Aug 25, 2007 at 12:46:00PM -0400, Richard Heck wrote:

@@ -0,0 +1,291 @@

   +/**
   + * \file QSelectionManager.cpp
   + * This file is part of LyX, the document processor.
   + * Licence details can be found in the file COPYING.
   + *
   + * \author Richard Heck
   + * \author Et Alia
 
  I wonder how hard it will be to make Mr Alia sign the customary license 
  agreement...


 Probably easier than unifying the installers :-)

  PS: Should I really add a smiley?

 To be honest, at first I thought Mr Alia was French/Arabic...


FYI Alia is indeed an Arabic girl surname. The feminine counterpart of 
Ali (Which mean literally 'High').


So Arabic males and females have different surnames (i.e. the family/last 
name)?


/Christian

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

Re: [PATCH] Layout Modularity, Part 3

2007-08-27 Thread Abdelrazak Younes

[EMAIL PROTECTED] wrote:

On Mon, 27 Aug 2007, Abdelrazak Younes wrote:


[EMAIL PROTECTED] wrote:

 On Sun, 26 Aug 2007, Andre Poenitz wrote:

  On Sat, Aug 25, 2007 at 12:46:00PM -0400, Richard Heck wrote:

@@ -0,0 +1,291 @@

   +/**
   + * \file QSelectionManager.cpp
   + * This file is part of LyX, the document processor.
   + * Licence details can be found in the file COPYING.
   + *
   + * \author Richard Heck
   + * \author Et Alia
   I wonder how hard it will be to make Mr Alia sign the customary 
license   agreement...


 Probably easier than unifying the installers :-)

  PS: Should I really add a smiley?

 To be honest, at first I thought Mr Alia was French/Arabic...


FYI Alia is indeed an Arabic girl surname. The feminine counterpart of 
Ali (Which mean literally 'High').


So Arabic males and females have different surnames (i.e. the 
family/last name)?


No, sorry, I meant _first_ name.

Abdel.



Re: TikZ / pdftex_t support?!

2007-08-27 Thread Hans Meine
Am Montag, 27. August 2007 05:53:26 schrieb Angus Leeming:
 Martin Vermeer wrote:
  I am also using XFig, and text in special mode, and include the figure
  as external material. For me it Just Works. You don't even have to
  start up a separate XFig session manually, just click the button in LyX.

 You've just made an old man very happy :-)

 He'd be less happy if asked to explain the code :-( The external code
 is one of those boost experiments that failed IMO. Totally impenetrable.

I also wonder if the UI could be improved: Actually, external material does 
not say very much.  In which respect does it differ from including graphics 
(or even include files)?  Technically, it's very different, I agree, but from 
a user's POV?  I noticed because I have the lyx view, rotate, scale, 
and crop tabs, but
a) the same set of options is using a different, (tab-based) layout
b) I missed the subfigure options.

Also, I wonder why the crop tab is disabled for XFig files; I thought they 
were first converted to PDF for inclusion?
(Please tell me if that changed in 1.5.x, since I went back to 1.4.4 and 
cannot check right now.)

-- 
Ciao, /  /
 /--/
/  / ANS


Re: [patch] Re: Lyx crashed after inserting, deleting and inserting float object

2007-08-27 Thread Abdelrazak Younes

Abdelrazak Younes wrote:

Alfredo Braunstein wrote:

Text::dispatch(LFUN_FLOAT_INSERT) calls dispatches
Cursor::dispatch(LFUN_CAPTION_INSERT) to insert the CAPTION. One 
possible general problem with this may be that Cursor::dispatch is not

reentrant-safe (see beforeDispatch members).


I've looked at it more closely and you're right. We should either use 
the local Text::dispatch() method or make sure the savings of 
beforeDispX and beforeDispY happen before Cursor::dispatch():


// store some values to be used inside of the handlers
getPos(beforeDispX_, beforeDispY_);

For trunk, I think we should replace all occurence of
cur.dispatch() with this-dispatch() in Text3::dispatch().


I've done this. We should replace all occurrences IMO because we'll see 
more of this kind of crash for sure.


For BRANCH_1_5 I think the simpler solution is to move the getPos() call 
above at the beginning of the LFUN machinery: LyXFunc::dispatch().


I'll try that solution, but I'd prefer that we use my solution for 
trunk. Opinion Jurgen?


Abdel.

Author: younes
Date: Mon Aug 27 11:03:18 2007
New Revision: 19827

URL: http://www.lyx.org/trac/changeset/19827
Log:
Lyx crashed after inserting, deleting and inserting float object.

Modified:
lyx-devel/trunk/src/Text3.cpp

Modified: lyx-devel/trunk/src/Text3.cpp
URL: http://www.lyx.org/trac/file/lyx-devel/trunk/src/Text3.cpp?rev=19827
==
--- lyx-devel/trunk/src/Text3.cpp (original)
+++ lyx-devel/trunk/src/Text3.cpp Mon Aug 27 11:03:18 2007
@@ -1271,7 +1271,11 @@
// reposition the cursor to the caption
cur.pit() = cap_pit;
cur.pos() = 0;
-   cur.dispatch(FuncRequest(LFUN_CAPTION_INSERT));
+   // FIXME: This Text/Cursor dispatch handling is a mess!
+   // We cannot use Cursor::dispatch here it needs access to up to
+   // date metrics.
+   cur.text()-dispatch(cur, FuncRequest(LFUN_CAPTION_INSERT));
+   cur.updateFlags(Update::Force);
// FIXME: When leaving the Float (or Wrap) inset we should
// delete any empty paragraph left above or below the
// caption.






Re: Middle-click copy-paste borked in SVN

2007-08-27 Thread Darren Freeman
On Mon, 2007-08-27 at 10:08 +0200, Jürgen Spitzmüller wrote:
 Darren Freeman wrote:
  There is a simple patch under test.
 
 Could you create a bugzilla entry and upload the patch there, please?

http://bugzilla.lyx.org/show_bug.cgi?id=4173

Have fun,
Darren



Re: [patch] Re: Lyx crashed after inserting, deleting and inserting float object

2007-08-27 Thread Abdelrazak Younes

Abdelrazak Younes wrote:

Abdelrazak Younes wrote:

Alfredo Braunstein wrote:

Text::dispatch(LFUN_FLOAT_INSERT) calls dispatches
Cursor::dispatch(LFUN_CAPTION_INSERT) to insert the CAPTION. One 
possible general problem with this may be that Cursor::dispatch is not

reentrant-safe (see beforeDispatch members).


I've looked at it more closely and you're right. We should either use 
the local Text::dispatch() method or make sure the savings of 
beforeDispX and beforeDispY happen before Cursor::dispatch():


// store some values to be used inside of the handlers
getPos(beforeDispX_, beforeDispY_);

For trunk, I think we should replace all occurence of
cur.dispatch() with this-dispatch() in Text3::dispatch().


Actually there are not a lot:

- one in Text::cursorPrevious()
- one in Text::cursorNext()
- one in LFUN_MATH_*
- one in mathDispatch().

Abdel.



Re: [patch] Re: Lyx crashed after inserting, deleting and inserting float object

2007-08-27 Thread Jürgen Spitzmüller
Abdelrazak Younes wrote:
  For BRANCH_1_5 I think the simpler solution is to move the getPos() call
  above at the beginning of the LFUN machinery: LyXFunc::dispatch().

 I'll try that solution, but I'd prefer that we use my solution for
 trunk. Opinion Jurgen?

For branch, your solution is not an option? If so, go ahead.

Jürgen


Re: [patch] Re: Lyx crashed after inserting, deleting and inserting float object

2007-08-27 Thread Abdelrazak Younes

Jürgen Spitzmüller wrote:

Abdelrazak Younes wrote:

For BRANCH_1_5 I think the simpler solution is to move the getPos() call
above at the beginning of the LFUN machinery: LyXFunc::dispatch().

I'll try that solution, but I'd prefer that we use my solution for
trunk. Opinion Jurgen?

  ^^^
replace that with BRANCH.



For branch, your solution is not an option?


Yes, that's what I meant. Some difficulty to write this morning...


If so, go ahead.


OK.

Abdel.



Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas

2007-08-27 Thread Helge Hafting

Martin Vermeer wrote:

This is actually an ugly corner of LyX. There is no clean way to modify
the layout file tree in cases like this. But of course one could take it
philosophically and say that, just like with ERT, you're on your own if
you write your own layouts. I suppose it would be better if we had a 
graphical interface to create layout files: then those would always 
include, or offer to include whatever you need for a certain version 
of LyX to get certain functionality. (But then, how to move old layout files

forward? Allow only one level of include?)
  

If this problem is solvable for single-level include then it
is easy enough for multi-include too - one just have to do
the extra work of traversing the inclusion tree once.  Then
you have a list of included files that can be processed as
in the single-level case.

Helge Hafting


Re: TikZ / pdftex_t support?!

2007-08-27 Thread Helge Hafting

Hans Meine wrote:
I also wonder if the UI could be improved: Actually, external material does 
not say very much.  In which respect does it differ from including graphics 
(or even include files)?

External material might be neither graphics in the usual sense,
nor documents. Lines of sheet music, for example.
  Technically, it's very different, I agree, but from 
a user's POV?  I noticed because I have the lyx view, rotate, scale, 
and crop tabs, but
  

I believe there is a plan for merging external and graphics,
for this reason. The problem is that it is much work just for
polishing the user interface.

Helge Hafting


Re: r19513 - /lyx-devel/trunk/src/frontends/qt4/QLPainter.cpp

2007-08-27 Thread Abdelrazak Younes

Jürgen Spitzmüller wrote:

Abdelrazak Younes wrote:

I can backport this to 1.5 by the way...


If this really is a significant speed improvement on Windows and Mac,


On Mac yes. Only a small improvement on Windows.

and if 
the problems are solved by disabling the cache on Unix (I'm not sure I'm up 
to date in that discussion),


Yes. I've disabled it for Qt  4.2 too because of resizing problems.


then yes.


Done.

Abdel.



Re: [Patch - 1.5] Fix bug 3427, Document Largely Off-screen on Opening

2007-08-27 Thread Abdelrazak Younes

Jürgen Spitzmüller wrote:

Abdelrazak Younes wrote:

http://bugzilla.lyx.org/show_bug.cgi?id=3427

As I cannot reproduce the problem on Windows, please test the patch on
Unix. This patch has already been committed to trunk last week.


I cannot reliably reproduce the problem. However, if someone can confirm it 
fixes the problem, you can commit to branch.


Nobody?



Gmane display is not threaded anymore

2007-08-27 Thread Jean-Pierre Chrétien
Hello,

The subject says all :-(
Gmane stalled some time last week, is this connected ?
Do I miss something ?

Regards

-- 
Jean-Pierre




Virus in Win-Installer 1.5.1-1?

2007-08-27 Thread Ekkehart Schlicht

Hi,

I have right now installed Lyx 1.5.1-1 on two Windows machines. During 
unpacking, Sophos Antivirus gave twice alarm. The warning was:


..\user\Local\Temp\nsys371A.tmp\nsExec.dll belongs to Troj/Zlob-ADU.

I guess this has to do with other problems than LyX, but just to make 
sure ...



Cheers


Ekkehart


Re: [patch] Re: Lyx crashed after inserting, deleting and inserting float object

2007-08-27 Thread Bennett Helm

On Aug 27, 2007, at 5:27 AM, Abdelrazak Younes wrote:


Jürgen Spitzmüller wrote:

Abdelrazak Younes wrote:
For BRANCH_1_5 I think the simpler solution is to move the getPos 
() call

above at the beginning of the LFUN machinery: LyXFunc::dispatch().

I'll try that solution, but I'd prefer that we use my solution for
trunk. Opinion Jurgen?

  ^^^
replace that with BRANCH.


For branch, your solution is not an option?


Yes, that's what I meant. Some difficulty to write this morning...


If so, go ahead.


OK.


This breaks compilation on both trunk and branch for me (Mac):

/bin/sh ../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H - 
I.   -I../src -I../boost -Wextra -Wall   -I/System/Library/Frameworks/ 
CoreFoundation.framework/Headers  -g -Os -MT Text3.lo -MD -MP - 
MF .deps/Text3.Tpo -c -o Text3.lo Text3.cpp
g++ -DHAVE_CONFIG_H -I. -I../src -I../boost -Wextra -Wall -I/System/ 
Library/Frameworks/CoreFoundation.framework/Headers -g -Os -MT  
Text3.lo -MD -MP -MF .deps/Text3.Tpo -c Text3.cpp -o Text3.o
Text3.cpp: In member function 'void lyx::Text::dispatch(lyx::Cursor,  
lyx::FuncRequest)':
Text3.cpp:1277: error: no matching function for call to  
'lyx::Text::dispatch(lyx::Cursor, lyx::FuncRequest)'
Text3.cpp:344: note: candidates are: void lyx::Text::dispatch 
(lyx::Cursor, lyx::FuncRequest)

make[2]: *** [Text3.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Bennett


Re: [patch] Re: Lyx crashed after inserting, deleting and inserting float object

2007-08-27 Thread Abdelrazak Younes

Bennett Helm wrote:

On Aug 27, 2007, at 5:27 AM, Abdelrazak Younes wrote:


Jürgen Spitzmüller wrote:

Abdelrazak Younes wrote:
For BRANCH_1_5 I think the simpler solution is to move the getPos() 
call

above at the beginning of the LFUN machinery: LyXFunc::dispatch().

I'll try that solution, but I'd prefer that we use my solution for
trunk. Opinion Jurgen?

  ^^^
replace that with BRANCH.


For branch, your solution is not an option?


Yes, that's what I meant. Some difficulty to write this morning...


If so, go ahead.


OK.


This breaks compilation on both trunk and branch for me (Mac):


Should be fixed now, please try again.

Abdel.



Re: [Patch - 1.5] Fix bug 3427, Document Largely Off-screen on Opening

2007-08-27 Thread Richard Heck

Abdelrazak Younes wrote:

Jürgen Spitzmüller wrote:

Abdelrazak Younes wrote:

http://bugzilla.lyx.org/show_bug.cgi?id=3427

As I cannot reproduce the problem on Windows, please test the patch on
Unix. This patch has already been committed to trunk last week.


I cannot reliably reproduce the problem. However, if someone can 
confirm it fixes the problem, you can commit to branch.

Nobody?
This bug is so intermittent, it's hard to confirm anything. But I 
haven't seen it in a while.


Richard


--
==
Richard G Heck, Jr
Professor of Philosophy
Brown University
http://frege.brown.edu/heck/
==
Get my public key from http://sks.keyserver.penguin.de
Hash: 0x1DE91F1E66FFBDEC
Learn how to sign your email using Thunderbird and GnuPG at:
http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto



Re: Lyx problems in importing txt2tags .tex files

2007-08-27 Thread José Matos
On Monday 27 August 2007 08:43:45 Alexandre Santos wrote:

 Yep, if I launch latex xp1.tex (or xp2.tex), I get properly formatted
 dvi files (using MikeTex and Yap). So the problem seems to be with
 LyX).

AFAIKS an easy solution is to move the the title and author after the 
\begin{document} in the original tex file.

What we could do in tex2lyx is to output the \maketitle in ERT if there no 
other title elements, while now we delete it unconditionally.

What do others think?

 Cheers,
 Alex

-- 
José Abílio


Re: [Patch - 1.5] Fix bug 3427, Document Largely Off-screen on Opening

2007-08-27 Thread José Matos
On Monday 27 August 2007 14:39:52 Richard Heck wrote:
 This bug is so intermittent, it's hard to confirm anything. But I
 haven't seen it in a while.

  FWIW this is my impression as well. I don't remember to have seen it for 
some time.

 Richard

-- 
José Abílio


Re: [Patch - 1.5] Fix bug 3427, Document Largely Off-screen on Opening

2007-08-27 Thread Abdelrazak Younes

José Matos wrote:

On Monday 27 August 2007 14:39:52 Richard Heck wrote:

This bug is so intermittent, it's hard to confirm anything. But I
haven't seen it in a while.


  FWIW this is my impression as well. I don't remember to have seen it for 
some time.


in 1.5 you mean? In trunk, it is normal that you don't see it...

Abdel.



Re: r19813 - in /lyx-devel/trunk: lib/layouts/stdinsets.inc s...

2007-08-27 Thread Bo Peng
Maybe scons/tex2lyx needs update but I still get

try1/src/tex2lyx/TextClass.o(.text+0x542d): In function
`lyx::TextClass::readInsetLayout(lyx::Lexer,
std::basic_stringunsigned int, std::char_traitsunsigned int,
std::allocatorunsigned int  const)':
try1/src/tex2lyx/TextClass.cpp:689: undefined reference to `lyx::lcolor'


Bo


Re: [patch] Re: Lyx crashed after inserting, deleting and inserting float object

2007-08-27 Thread Bennett Helm

On Aug 27, 2007, at 9:13 AM, Abdelrazak Younes wrote:


Bennett Helm wrote:

On Aug 27, 2007, at 5:27 AM, Abdelrazak Younes wrote:

Jürgen Spitzmüller wrote:

Abdelrazak Younes wrote:
For BRANCH_1_5 I think the simpler solution is to move the  
getPos() call
above at the beginning of the LFUN machinery: LyXFunc::dispatch 
().

I'll try that solution, but I'd prefer that we use my solution for
trunk. Opinion Jurgen?

  ^^^
replace that with BRANCH.


For branch, your solution is not an option?


Yes, that's what I meant. Some difficulty to write this morning...


If so, go ahead.


OK.

This breaks compilation on both trunk and branch for me (Mac):


Should be fixed now, please try again.


That does it -- thanks!

Bennett

Re: [Patch - 1.5] Fix bug 3427, Document Largely Off-screen on Opening

2007-08-27 Thread José Matos
On Monday 27 August 2007 14:51:20 Abdelrazak Younes wrote:
 in 1.5 you mean?

Yes.

 Abdel.

-- 
José Abílio


Re: [Patch - 1.5] Fix bug 3427, Document Largely Off-screen on Opening

2007-08-27 Thread Jürgen Spitzmüller
José Matos wrote:
  in 1.5 you mean?

 Yes.

I've seen it recently, but I don't know how to reproduce it reliably.

Jürgen


Re: metrics call crashes

2007-08-27 Thread Abdelrazak Younes

Edwin Leuven wrote:

guys,

i am (still) fiddling with the tabular code.

after a cell merge there is a redraw which then *sometimes* crashes lyx.

the strange thing is that sometimes it happens, sometimes it doesn't!

backtrace below.

i haven't been able to find out what causes it, and am really at a loss.

so if someone has a hunch that would be great cause i am kinda stuck 
here...


I think I've fixed this problem. The ParagraphMetrics was not updated 
with the new Paragraph address upon Paragraph insertion/deletion.


Please try again.

Author: younes
Date: Mon Aug 27 16:04:46 2007
New Revision: 19833

URL: http://www.lyx.org/trac/changeset/19833
Log:
Gather ParagraphMetrics initialization in ParagraphMetrics::reset().

Modified:
lyx-devel/trunk/src/ParagraphMetrics.cpp
lyx-devel/trunk/src/ParagraphMetrics.h
lyx-devel/trunk/src/TextMetrics.cpp

Modified: lyx-devel/trunk/src/ParagraphMetrics.cpp
URL: 
http://www.lyx.org/trac/file/lyx-devel/trunk/src/ParagraphMetrics.cpp?rev=19833

==
--- lyx-devel/trunk/src/ParagraphMetrics.cpp (original)
+++ lyx-devel/trunk/src/ParagraphMetrics.cpp Mon Aug 27 16:04:46 2007
@@ -88,6 +88,14 @@
 }


+void ParagraphMetrics::reset(Paragraph const  par)
+{
+   par_ = par;
+   dim_ = Dimension();
+   rows_.clear();
+}
+
+
 size_type ParagraphMetrics::calculateRowSignature(Row const  row)
 {
boost::crc_32_type crc;

Modified: lyx-devel/trunk/src/ParagraphMetrics.h
URL: 
http://www.lyx.org/trac/file/lyx-devel/trunk/src/ParagraphMetrics.h?rev=19833

==
--- lyx-devel/trunk/src/ParagraphMetrics.h (original)
+++ lyx-devel/trunk/src/ParagraphMetrics.h Mon Aug 27 16:04:46 2007
@@ -44,6 +44,8 @@
/// \c row_signature_ because those are updated externally with
/// \c updateRowChangeStatus() in TextMetrics::redoParagraph().
ParagraphMetrics  operator=(ParagraphMetrics const );
+
+   void reset(Paragraph const  par);

///
Row  getRow(pos_type pos, bool boundary);

Modified: lyx-devel/trunk/src/TextMetrics.cpp
URL: 
http://www.lyx.org/trac/file/lyx-devel/trunk/src/TextMetrics.cpp?rev=19833

==
--- lyx-devel/trunk/src/TextMetrics.cpp (original)
+++ lyx-devel/trunk/src/TextMetrics.cpp Mon Aug 27 16:04:46 2007
@@ -184,13 +184,13 @@

 bool TextMetrics::redoParagraph(pit_type const pit)
 {
+   Paragraph  par = text_-getPar(pit);
// IMPORTANT NOTE: We pass 'false' explicitely in order to not call
// redoParagraph() recursively inside parMetrics.
Dimension old_dim = parMetrics(pit, false).dim();
ParagraphMetrics  pm = par_metrics_[pit];
-   // reinitialize paragraph dimension.
-   pm.dim() = Dimension();
-   Paragraph  par = text_-getPar(pit);
+   pm.reset(par);
+
Buffer  buffer = bv_-buffer();
main_text_ = (text_ == buffer.text());
bool changed = false;
@@ -229,9 +229,6 @@
MetricsInfo mi(bv_, font, w);
changed |= ii-inset-metrics(mi, dim);
}
-
-   // rebreak the paragraph
-   pm.rows().clear();

par.setBeginOfBody();
pos_type z = 0;






Re: [patch] Re: Lyx crashed after inserting, deleting and inserting float object

2007-08-27 Thread Abdelrazak Younes

Abdelrazak Younes wrote:

Martin Vermeer wrote:

I expect you will have to do the rowpainter cleanup
at the same time.


I'd like to do it in three steps: first remove the hack, then put in 
place a better design, then optimize if need be.


When I say better design, I mean that the rowpainter use should be 
progressively erased. The drawing code will be transfered to 
TextMetrics, ParagraphMetrics and Row in that order. I've made some 
experiment before the summer and I am confident that this is doable.


First step done. Will proceed to second step now.

Abdel.

Author: younes
Date: Mon Aug 27 16:38:29 2007
New Revision: 19834

URL: http://www.lyx.org/trac/changeset/19834
Log:
Remove the wide() hack. This simplifies quite a few things...

Modified:
lyx-devel/trunk/src/insets/InsetCaption.h
lyx-devel/trunk/src/insets/InsetFloat.h
lyx-devel/trunk/src/insets/InsetOptArg.h
lyx-devel/trunk/src/insets/InsetText.cpp
lyx-devel/trunk/src/insets/InsetText.h
lyx-devel/trunk/src/rowpainter.cpp

Modified: lyx-devel/trunk/src/insets/InsetCaption.h
URL: 
http://www.lyx.org/trac/file/lyx-devel/trunk/src/insets/InsetCaption.h?rev=19834

==
--- lyx-devel/trunk/src/insets/InsetCaption.h (original)
+++ lyx-devel/trunk/src/insets/InsetCaption.h Mon Aug 27 16:38:29 2007
@@ -61,8 +61,6 @@
// Update the counters of this inset and of its contents
virtual void updateLabels(Buffer const , ParIterator const );
///
-   virtual bool wide() const { return false; }
-   ///
int latex(Buffer const  buf, odocstream  os,
  OutputParams const ) const;
///

Modified: lyx-devel/trunk/src/insets/InsetFloat.h
URL: 
http://www.lyx.org/trac/file/lyx-devel/trunk/src/insets/InsetFloat.h?rev=19834

==
--- lyx-devel/trunk/src/insets/InsetFloat.h (original)
+++ lyx-devel/trunk/src/insets/InsetFloat.h Mon Aug 27 16:38:29 2007
@@ -58,8 +58,6 @@
void validate(LaTeXFeatures  features) const;
///
Inset::Code lyxCode() const { return Inset::FLOAT_CODE; }
-   ///
-   virtual bool wide() const { return false; }
///
int latex(Buffer const , odocstream ,
  OutputParams const ) const;

Modified: lyx-devel/trunk/src/insets/InsetOptArg.h
URL: 
http://www.lyx.org/trac/file/lyx-devel/trunk/src/insets/InsetOptArg.h?rev=19834

==
--- lyx-devel/trunk/src/insets/InsetOptArg.h (original)
+++ lyx-devel/trunk/src/insets/InsetOptArg.h Mon Aug 27 16:38:29 2007
@@ -31,8 +31,6 @@
Inset::Code lyxCode() const { return Inset::OPTARG_CODE; }
/// return an message upon editing
virtual docstring const editMessage() const;
-   ///
-   virtual bool wide() const { return false; }

/// Standard LaTeX output -- short-circuited
int latex(Buffer const , odocstream ,

Modified: lyx-devel/trunk/src/insets/InsetText.cpp
URL: 
http://www.lyx.org/trac/file/lyx-devel/trunk/src/insets/InsetText.cpp?rev=19834

==
--- lyx-devel/trunk/src/insets/InsetText.cpp (original)
+++ lyx-devel/trunk/src/insets/InsetText.cpp Mon Aug 27 16:38:29 2007
@@ -202,7 +202,7 @@
int const a = tm.ascent() + border_;
int const h = a + tm.descent() + border_;
pi.pain.rectangle(x, y - a,
- ((wide() || hasFixedWidth()) ? tm.maxWidth() 
: w),
+ (hasFixedWidth() ? tm.maxWidth() : w),
  h, frameColor());
}
 }
@@ -216,21 +216,9 @@
int const a = tm.ascent() + border_;
int const h = a + tm.descent() + border_;
pi.pain.fillRectangle(x, y - a,
- ((wide() || hasFixedWidth()) ? tm.maxWidth() : w),
+ (hasFixedWidth() ? tm.maxWidth() : w),
  h, backgroundColor());
text_.drawSelection(pi, x + border_, y);
-}
-
-
-bool InsetText::covers(BufferView const  bv, int x, int y) const
-{
-   TextMetrics const  tm = bv.textMetrics(text_);
-
-   return bv.coordCache().getInsets().has(this)
-x = xo(bv)
-x = xo(bv) + width() + (wide() ? tm.maxWidth() : 0)
-y = yo(bv) - ascent()
-y = yo(bv) + descent();
 }


@@ -346,14 +334,6 @@
 }


-bool InsetText::notifyCursorLeaves(Cursor  cur)
-{
-   if (wide())
-   cur.updateFlags(cur.disp_.update() | Update::Force);
-   return false;
-}
-
-
 void InsetText::cursorPos(BufferView const  bv,
CursorSlice const  sl, bool boundary, int  x, int  y) const
 {

Modified: lyx-devel/trunk/src/insets/InsetText.h
URL: 

RE: Re: metrics call crashes

2007-08-27 Thread Leuven, E.
Abdel wrote:
Edwin Leuven wrote:
 after a cell merge there is a redraw which then *sometimes* crashes lyx.

 I think I've fixed this problem. The ParagraphMetrics was not updated
 with the new Paragraph address upon Paragraph insertion/deletion.

it seems to solve it indeed, thanks!

i must say that i am impressed by your ability to find understand this stuff!!


Re: [HELP] Qt Dialog Conversion 4.3--4.1

2007-08-27 Thread Richard Heck

Edwin Leuven wrote:

Richard Heck wrote:
comment on the widget: perhaps it is nicer to have a list widget 
with checkbox type items for the modules? that way you simply check 
the modules that you want and it takes up less space...  
The order in the UI is preserved in the order in which the layouts 
are loaded, so later ones can overwrite things from earlier ones. 
Hence the need to Up and Down.
sure, but you could still put the modules in a single list widget and 
use checkboxes to select them
Oh, I see what you mean. How feasible that will be will depend upon how 
many modules there are. It'd be completely infeasible with the citation 
dialog, for example: Too many references. It'd be impossible to see 
which ones you'd selected and which you hadn't (unless the selected ones 
magically went to the top or something). At present, there are very few 
modules, but I imagine there will be many more. (I'll be adding a few 
myself in the near future.) So I think in the end we'd have the same 
problem as with citations.


Of course, if you want to try something new

Richard
  


--
==
Richard G Heck, Jr
Professor of Philosophy
Brown University
http://frege.brown.edu/heck/
==
Get my public key from http://sks.keyserver.penguin.de
Hash: 0x1DE91F1E66FFBDEC
Learn how to sign your email using Thunderbird and GnuPG at:
http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto



Re: metrics call crashes

2007-08-27 Thread Abdelrazak Younes

Leuven, E. wrote:

Abdel wrote:
Edwin Leuven wrote:

after a cell merge there is a redraw which then *sometimes* crashes lyx.

I think I've fixed this problem. The ParagraphMetrics was not updated
with the new Paragraph address upon Paragraph insertion/deletion.


it seems to solve it indeed, thanks!

i must say that i am impressed by your ability to find understand this stuff!!


Well, I've introduced this stuff so I hope I undertand it ;-)
Besides, it was my fault to begin with...

Abdel.



RE: Re: metrics call crashes

2007-08-27 Thread Leuven, E.
 Well, I've introduced this stuff so I hope I undertand it ;-)
 Besides, it was my fault to begin with...

glad you are understanding it better now ;-)





Re: Vertical space in a table cell gives latex errors

2007-08-27 Thread Paul A. Rubin

Helge Hafting wrote:

Paul A. Rubin wrote:

Helge Hafting wrote:
I have a table with a tall row, because one cell is fixed-width with 
multiple lines.

In another cell I wanted to place a single symbol, preferably centered
vertically.

I tried changing the column's vertical adjustment, but this had
no effect whatsoever.


Did you try setting the vertical alignment of the fixed width column 
to middle?  I find this counterintuitive, but it seems to be how it 
works.

Thanks, I can now get the effect I want.
Still, latex is very strange here, or perhaps LyX just
misrepresent things.


If you look at the emitted LaTeX, it's correct (the vertical alignment 
is being specified for the fixed-width column), so LyX is absolved of 
fault here.  As to LaTeX being strange, I can agree with that in general.



I set some alignment on the fixed-width
column - in order to have _other_ columns line up with that
alignment?  Not only is this odd, but the concept does not
extend to having several fixed-width columns with differing
alignemnts.  (How is  the other columns going to line up then?
Like the first fixed column?  Like the next one says?)

There is indeed odd results when setting up several such
columns. :-(


I'm no TeXpert, but I think the logic here is that there is a baseline 
for text in each row of the table.  Vertical alignment is with reference 
to the baseline.  So setting middle in the fixed-width column says 
that you want the middle of each cell in that column to align with the 
baseline of the row.  The baseline is defined (I think) independent of 
the alignment of the columns, so even if you make every column 
fixed-width (can't recall if that's legal in LaTeX or not), there's 
still a baseline and the logic still works.


Of course, the first time I tried to do what you were doing, it took me 
half an hour to sort this out.  :-)



So I tried forcing my way with insert-vertical space before
and after the symbol. Latex puked on this.


Try setting protected on the vertical space.  It doesn't seem to 
cause LaTeX to object (although it also doesn't seem to accomplish much).

Correct.  Latex accepts the protected space, but don't act
on it.  So it is useless and should probably be disabled.


Ok, but what happens if the user inserts a minipage in a table cell. 
Inside the minipage, \vfill actually works and should be enabled.  So 
now LyX needs to track whether you're inside a minipage inside a table. 
 I don't know enough LaTeX to know if it ends there or not.  That's one 
for the developers.


/Paul



Re: r19813 - in /lyx-devel/trunk: lib/layouts/stdinsets.inc s...

2007-08-27 Thread Bo Peng
On 8/27/07, Bo Peng [EMAIL PROTECTED] wrote:
 Maybe scons/tex2lyx needs update but I still get

 try1/src/tex2lyx/TextClass.o(.text+0x542d): In function
 `lyx::TextClass::readInsetLayout(lyx::Lexer,
 std::basic_stringunsigned int, std::char_traitsunsigned int,
 std::allocatorunsigned int  const)':
 try1/src/tex2lyx/TextClass.cpp:689: undefined reference to `lyx::lcolor'


Get it. I need to put color.cpp in as well. scons is updated.

Cheer,
Bo


Re: Gmane display is not threaded anymore

2007-08-27 Thread Paul A. Rubin

Jean-Pierre Chrétien wrote:

Hello,

The subject says all :-(
Gmane stalled some time last week, is this connected ?
Do I miss something ?

Regards



Are you referring to the web interface?  I always go in through the 
search engine.  Once I find an article in the right thread, if I click 
the subject, I get a new view using frames, with the thread in the top 
frame.


They also seem to have added something that grabs a logo for the 
poster's domain, which is irrelevant to this but interesting.


/Paul



Re: Gmane display is not threaded anymore

2007-08-27 Thread Jean-Pierre Chrétien
Paul A. Rubin [EMAIL PROTECTED] writes:

[...]
 
 Are you referring to the web interface?  

Yes, I follow devel with it, subscribing overwhelms my box.

I always go in through the 
 search engine.  Once I find an article in the right thread, if I click 
 the subject, I get a new view using frames, with the thread in the top 
 frame.

Right now clicking on the subject fails with No such article
and there is no more tree structure in the display.


-- 
Jean-Pierre






Re: r19813 - in /lyx-devel/trunk: lib/layouts/stdinsets.inc s...

2007-08-27 Thread Martin Vermeer
On Mon, 27 Aug 2007 10:14:07 -0500
Bo Peng [EMAIL PROTECTED] wrote:

 On 8/27/07, Bo Peng [EMAIL PROTECTED] wrote:
  Maybe scons/tex2lyx needs update but I still get
 
  try1/src/tex2lyx/TextClass.o(.text+0x542d): In function
  `lyx::TextClass::readInsetLayout(lyx::Lexer,
  std::basic_stringunsigned int, std::char_traitsunsigned int,
  std::allocatorunsigned int  const)':
  try1/src/tex2lyx/TextClass.cpp:689: undefined reference to `lyx::lcolor'
 
 
 Get it. I need to put color.cpp in as well. scons is updated.
 
 Cheer,
 Bo

Yes, that was the problem with autotools also: you need Color.cpp in
order to get the Color.o that gets linked in.

- Martin


Re: [Patch - 1.5] Fix bug 3427, Document Largely Off-screen on Opening

2007-08-27 Thread Pavel Sanda
 http://bugzilla.lyx.org/show_bug.cgi?id=3427
 
 As I cannot reproduce the problem on Windows, please test the patch on 
 Unix. This patch has already been committed to trunk last week.

- i tried to reproduce it in trunk by the steps in 3785, but New-Window command 
does not 
work for me anymore. it only shows new window, without any doc opened.

- 4044 remains the same in trunk.

- 1.5 branch does not compile for me (
configure.ac:416: required file `development/MacOSX/Info.plist.in' not found
configure.ac:416: required file `development/MacOSX/lyxrc.dist.in' not found
)

pavel


Re: r19813 - in /lyx-devel/trunk: lib/layouts/stdinsets.inc s...

2007-08-27 Thread Martin Vermeer
On Mon, 27 Aug 2007 10:54:34 +0200
Abdelrazak Younes [EMAIL PROTECTED] wrote:

 Martin Vermeer wrote:
  On Mon, 27 Aug 2007 09:43:19 +0200
  There is a way: you just need the Color::color enum AFAIS so the 
  solution is to extract this enum from the Color class and give it its 
  own header. This will enable us to get rid of the Color_color 
  pseudoclass too.
  
  Not really true, I need the lcolor object and getFromLyXName().
 
 OK. But my point on the Color::color remains valid IMO.
 
  
  In any case please commit your quick fix ASAP as compilation is broken 
  right now.
  
  OK
 
 Thanks. While you are at it, there's a problem with float inset 
 backgrounds, they are black:
 
 LyX internal error: Missing color entry in Color.cpp for -842150451
 Using black.
 
 
 Abdel.

Yes, I see that too. The reason is that there is no layout entry for Float,
and no fallback for the case of a completely missing entry (TextClass
contains a fallback for an entry missing a BgColor line).

Fix attached. Changing the place of the backgroundColor() call is not 
necessary, but I think better as the method is defined in that class.

- Martin
Index: InsetCollapsable.cpp
===
--- InsetCollapsable.cpp	(revision 19807)
+++ InsetCollapsable.cpp	(working copy)
@@ -84,6 +84,8 @@
 	setDrawFrame(true);
 	setFrameColor(Color::collapsableframe);
 	setButtonLabel();
+	// Fallback for lacking inset layout item
+	layout_.bgcolor = Color::background;
 }
 
 
@@ -247,7 +249,7 @@
 void InsetCollapsable::draw(PainterInfo  pi, int x, int y) const
 {
 	autoOpen_ = pi.base.bv-cursor().isInside(this);
-
+	text_.background_color_ = backgroundColor();
 	const int xx = x + TEXT_TO_INSET_OFFSET;
 
 	// Draw button first -- top, left or only
Index: InsetText.cpp
===
--- InsetText.cpp	(revision 19807)
+++ InsetText.cpp	(working copy)
@@ -194,7 +194,6 @@
 
 	TextMetrics  tm = pi.base.bv-textMetrics(text_);
 
-	text_.background_color_ = backgroundColor();
 	text_.draw(pi, x + border_, y);
 
 	if (drawFrame_) {


Re: [Patch - 1.5] Fix bug 3427, Document Largely Off-screen on Opening

2007-08-27 Thread Pavel Sanda
 - 1.5 branch does not compile for me (
 configure.ac:416: required file `development/MacOSX/Info.plist.in' not found
 configure.ac:416: required file `development/MacOSX/lyxrc.dist.in' not found
 )

svn update fixed this.
pavel


Re: [Patch - 1.5] Fix bug 3427, Document Largely Off-screen on Opening

2007-08-27 Thread Abdelrazak Younes

Pavel Sanda wrote:

http://bugzilla.lyx.org/show_bug.cgi?id=3427

As I cannot reproduce the problem on Windows, please test the patch on 
Unix. This patch has already been committed to trunk last week.


- i tried to reproduce it in trunk by the steps in 3785, but New-Window command does not 
work for me anymore. it only shows new window, without any doc opened.


This is by design ;-). It works the same as New window in Firefox. All 
the documents are still available of course, they are accessible through 
the View menu.


I agree we should offer some new features now that this is in place:
- detach tab to new window
- duplicate tab in new window
- duplicate tab
etc...



- 4044 remains the same in trunk.


Yes, should be the same as it is not related. I did not look at that yet.

Abdel.



Re: r19838 - in /lyx-devel/trunk/src: TextMetrics.cpp insets/...

2007-08-27 Thread Abdelrazak Younes

I think this should go in branch as well Jurgen.

Abdel.


[EMAIL PROTECTED] wrote:

Author: younes
Date: Mon Aug 27 18:30:57 2007
New Revision: 19838

URL: http://www.lyx.org/trac/changeset/19838
Log:
Bug fix: correctly redraw a Row containing and inset which Dimension slightly 
changed. This replace the need for the former leftEdgeFixed boolean in 
rowpainter.C:paintPar() before the removal of the wide() hack in revision 19834.

* Inset::dimension(): access to dim_

* TextMetrics::redoParagraph(): don't trust Inset::metrics() returned boolean as the 
internal dimension is changed down in the inheritance chain for 
InsetFoot-InsetCollapsable-InsetText.

Modified:
lyx-devel/trunk/src/TextMetrics.cpp
lyx-devel/trunk/src/insets/Inset.h

Modified: lyx-devel/trunk/src/TextMetrics.cpp
URL: http://www.lyx.org/trac/file/lyx-devel/trunk/src/TextMetrics.cpp?rev=19838
==
--- lyx-devel/trunk/src/TextMetrics.cpp (original)
+++ lyx-devel/trunk/src/TextMetrics.cpp Mon Aug 27 18:30:57 2007
@@ -221,13 +221,15 @@
InsetList::const_iterator ii = par.insetlist.begin();
InsetList::const_iterator iend = par.insetlist.end();
for (; ii != iend; ++ii) {
+   Dimension old_dim = ii-inset-dimension();
Dimension dim;
int const w = max_width_ - text_-leftMargin(buffer, max_width_, 
pit, ii-pos)
- right_margin;
Font const  font = ii-inset-noFontChange() ?
bufferfont : text_-getFont(buffer, par, ii-pos);
MetricsInfo mi(bv_, font, w);
-   changed |= ii-inset-metrics(mi, dim);
+   ii-inset-metrics(mi, dim);
+   changed |= (old_dim != dim);
}
 
 	par.setBeginOfBody();


Modified: lyx-devel/trunk/src/insets/Inset.h
URL: http://www.lyx.org/trac/file/lyx-devel/trunk/src/insets/Inset.h?rev=19838
==
--- lyx-devel/trunk/src/insets/Inset.h (original)
+++ lyx-devel/trunk/src/insets/Inset.h Mon Aug 27 18:30:57 2007
@@ -474,6 +474,8 @@
/// reject the changes within the inset
virtual void rejectChanges(BufferParams const ) {};
 
+	/// FIXME: move dim_ out of Inset!

+   Dimension const  dimension() { return dim_; }
/// inset width.
int width() const { return dim_.wid; }
/// inset ascent.







Re: Grab configure.py output to a QT dialog?

2007-08-27 Thread Enrico Forestieri
On Sun, Aug 26, 2007 at 11:26:21PM +0200, Abdelrazak Younes wrote:

 Bo Peng wrote:

  Our rule is that if something works, do not fix it. We will have to
  show a clear advantage of switching to QProcess.
 
 As I said: stdin/out redirection. Plus of course removing a number of 
 LOC which we don't have any interest in maintaining.

http://support.microsoft.com/?scid=kb%3Ben-us%3B190351x=14y=11

-- 
Enrico


Re: Grab configure.py output to a QT dialog?

2007-08-27 Thread Enrico Forestieri
On Sun, Aug 26, 2007 at 11:32:08PM +0200, Andre Poenitz wrote:

 On Sun, Aug 26, 2007 at 10:44:50AM -0500, Bo Peng wrote:

  Our rule is that if something works, do not fix it. We will have to
  show a clear advantage of switching to QProcess.

100% agreed.

 Maybe that's a surprise to everyone, but I could think of a few:
 
 - less code to maintain on our side

Debatable. You are tied to what a library offers, and if it doesn't
fit your need, you have to workaround it. Heck, I can't think that
we need an external library even for spawning a new process.

 - simpler code (no #ifdef _FOO_PLATFORM_ anymore)

Simply call platform_call() and define it in support/os_*.cpp.

 - more people are likely to know the sematics of QProcess than of
   lyx::ForkedProcess

Hmm da dum...

 - less comments of the '// Racy of course, but it will do.' kind.

If it works, it works...

 But that's just for the record. I do not really have strong feelings in
 this particular case. [(yet)].

Me too.

-- 
Enrico


Re: r19659 - /lyx-devel/trunk/src/frontends/qt4/ui/CitationUi.ui

2007-08-27 Thread Andre Poenitz
On Mon, Aug 27, 2007 at 07:51:24AM +0200, Peter Kümmel wrote:
 Hm... not sure. I've been using the commercial version of Qt for three
 years and now in the new job some in-house version from which both the
 commercial and the OS versions are build. I think I never used the
 OS version on Windows myself, so I don't really know how much it differs
 from the commercial one. I'll try to increase my level of knowledge ;-}
 
 The patched open source version of qt doesn't produce running project files,
 only the Makefiles are usable.

Wonder whether this is intentional.

 The only way to have such  project files is to use cmake.
 
 
 So we should make some effort to rectify this situation rather soonish,
 too...
 
 I think cmake could do the same job as scons does, it is only a question
 of time and interest.
 
 Andre', we could meet for beer and cmake hacking...

Sure, why not.

But I am afraid there's no beer in the office (obviously room for
improvement there...) so this would be (preferably for me) my place.
Contact data in private mail...

Andre'


Re: [patch] Re: Lyx crashed after inserting, deleting and inserting float object

2007-08-27 Thread Alfredo Braunstein
Abdelrazak Younes [EMAIL PROTECTED] writes:
 
 Alfredo Braunstein wrote:
  I did a bit of research, and I think I found something, and it seems
  a mess. Please correct me if I'm wrong, this is what I understand:
  
  Text::dispatch(LFUN_FLOAT_INSERT) calls dispatches
  Cursor::dispatch(LFUN_CAPTION_INSERT) to insert the CAPTION. 
  One possible general problem with this may be that Cursor::dispatch is not
  reentrant-safe (see beforeDispatch members).
 
 I've looked at it more closely and you're right. We should either use 
 the local Text::dispatch() method or make sure the savings of 
 beforeDispX and beforeDispY happen before Cursor::dispatch():

Glad to know that my research was somewhat useful ;-)

 
   // store some values to be used inside of the handlers
   getPos(beforeDispX_, beforeDispY_);
 
 For trunk, I think we should replace all occurence of
 cur.dispatch() with this-dispatch() in Text3::dispatch().

This seems good indeed. In the long run, however, we should think of a way to 
enforce this so we don't have to check manually (even some assert at run time 
would be nice). Moreover, I don't see what do we gain by using a lyxfunc 
internally, probably we should just put the content of the corresponding 
dipatch code (that just inserts an inset!) in a standalone function and call 
that instead.

 For BRANCH_1_5 I think the simpler solution is to move the getPos() call 
 above at the beginning of the LFUN machinery: LyXFunc::dispatch().

Wasnt't there also a beforDispatchCursor_ dociterator inside Cursor? I'm 
traveling and I don't have a tree at hand, but I remember so.

  The real problem in this case
  seems to be that the dispatch machinery assumes up-to-date metrics
  (Cursor::dispatch calls getPos), whereas in this case the Collapsable was
  already inserted and the metrics still not updated.
 
 I'll commit a hot fix shortly.

Ok. ;-)

A/ 






Re: [patch] Re: Lyx crashed after inserting, deleting and inserting float object

2007-08-27 Thread Andre Poenitz
On Mon, Aug 27, 2007 at 07:36:43PM +, Alfredo Braunstein wrote:
  // store some values to be used inside of the handlers
  getPos(beforeDispX_, beforeDispY_);
  
  For trunk, I think we should replace all occurence of
  cur.dispatch() with this-dispatch() in Text3::dispatch().
 
 This seems good indeed. In the long run, however, we should think of a way to 
 enforce this so we don't have to check manually (even some assert at run time 
 would be nice). Moreover, I don't see what do we gain by using a lyxfunc 
 internally, probably we should just put the content of the corresponding 
 dipatch code (that just inserts an inset!) in a standalone function and call 
 that instead.

Yes.

Andre' 


Re: [Patch - 1.5] Fix bug 3427, Document Largely Off-screen on Opening

2007-08-27 Thread Pavel Sanda
 http://bugzilla.lyx.org/show_bug.cgi?id=3427
 
 As I cannot reproduce the problem on Windows, please test the patch on 
 Unix. This patch has already been committed to trunk last week.

at least i can confirm that your patch fixes the off-screen behaviour for 
1.5.2svn
which is happening in point 2. of the bug 4084.

pavel


Re: [patch] Re: Lyx crashed after inserting, deleting and inserting float object

2007-08-27 Thread Abdelrazak Younes

Alfredo Braunstein wrote:
This seems good indeed. In the long run, however, we should think of a way to 
enforce this so we don't have to check manually (even some assert at run time 
would be nice). Moreover, I don't see what do we gain by using a lyxfunc 
internally, probably we should just put the content of the corresponding 
dipatch code (that just inserts an inset!) in a standalone function and call 
that instead.


Last time I proposed exactly that with the very same analysis, I was 
told I didn't know what I was talking about ;-)


No need to say that I am all for functions...

Abdel.




Re: Grab configure.py output to a QT dialog?

2007-08-27 Thread Abdelrazak Younes

Enrico Forestieri wrote:

On Sun, Aug 26, 2007 at 11:32:08PM +0200, Andre Poenitz wrote:


On Sun, Aug 26, 2007 at 10:44:50AM -0500, Bo Peng wrote:



Our rule is that if something works, do not fix it. We will have to
show a clear advantage of switching to QProcess.


100% agreed.


Except that in this case it doesn't work.




Maybe that's a surprise to everyone, but I could think of a few:

- less code to maintain on our side


Debatable. You are tied to what a library offers, and if it doesn't
fit your need, you have to workaround it.


As you say, if it works, it works ;-)
There's absolutely no need to reinvent the wheel. And we already depend 
on this wheel by the way.



Heck, I can't think that
we need an external library even for spawning a new process.


I know how to spawn a process and do redirection using win32 API; but 
it's code to maintain for absolutely no added benefit. Why would you 
want your own code to do something that is well understood and done 
correctly in a library? It's not like we want to do it in another way, 
is it?

Besides, it's not just about spawning a process.




- simpler code (no #ifdef _FOO_PLATFORM_ anymore)


Simply call platform_call() and define it in support/os_*.cpp.


Be my guest ;-)

Abdel.



Things we do wrong

2007-08-27 Thread Andre Poenitz

Given that yonder longish list of Things That Go Wrong In LyX is hard to
keep in mind while aging I thought I might share this little gem with
you.

Bad news from the ivory tower part II (Anon namespace vs 'static'):

Compare

  namespace { int fooX() { return X; } }

with

  static int fooX() { return X; }


Looks innocent?


Result:


[EMAIL PROTECTED]:/tmp  perl -e '$n=1; print static int foo$_() { return
$_; }\n foreach 1..$n; print int foo() { return 0; print +foo$_()\n
foreach 1..$n;  print ;}\n;'  1.cpp ; /usr/bin/g++ -c 1.cpp  ; l 1.o

-rw-r--r-- 1 andre users 449606 Aug 27 23:56 1.o

[EMAIL PROTECTED]:/tmp  perl -e '$n=1; print namespace { int foo$_() {
return $_; } } \n foreach 1..$n; print int foo() { return 0; print
+foo$_()\n foreach 1..$n;  print ;}\n;'  1.cpp ;  /usr/bin/g++
-c 1.cpp  ; l 1.o

-rw-r--r-- 1 andre users 909652 Aug 27 23:56 1.o

So the namespace version is twice as big as good old 'static'. Not
surprising, the things anonymous namespace is not really anonymous, but
rather a namespace with a random-but-hopefully-globally-unique name. This
name takes space.

Compile time is the same without optimization.

And now a bit more fun by adding optimization (note s/1/1000, and -O2):

[EMAIL PROTECTED]:/tmp  perl -e '$n=1000; print namespace { int foo$_() {
return $_; } } \n foreach 1..$n; print int foo() { return 0; print
+foo$_()\n foreach 1..$n;  print ;}\n;'  1.cpp ; time /usr/bin/g++
-O2 -c 1.cpp  ; l 1.o

real0m3.927s
user0m3.568s
sys 0m0.060s
-rw-r--r-- 1 andre users 106476 Aug 28 00:01 1.o
[EMAIL PROTECTED]:/tmp  perl -e '$n=1000; print static int foo$_() { return
$_; }\n foreach 1..$n; print int foo() { return 0; print +foo$_()\n
foreach 1..$n;  print ;}\n;'  1.cpp ; time /usr/bin/g++ -O2 -c 1.cpp
; l 1.o

real0m0.549s
user0m0.512s
sys 0m0.028s
-rw-r--r-- 1 andre users 728 Aug 28 00:02 1.o

Anon namespace loses by a factor of 7 in time and 146 in space.

Surprised?

Hardly.

And no, that's not a 'compiler problem'. The compiler behaves as defined
in the Holy Standard: Functions in the anon namespace have _external_
linkage even if they are not (well, not 'really' at least) accessible
from the outside.  On the other hand, static functions have, well,
static linkage. They have to be really invisible to the outside and
therefore can optimized away completely.

Of course it's a somewhat pathological example and we won't suddenly
compile 7 times faster within 1/146 diskspace when we kick anon
namespaces out. But the direction is clear...

So anybody who remembers the reasons to use the anon namespace (for
_functions_)? [Rhetorical question...]

Andre'




Re: [patch] Re: Lyx crashed after inserting, deleting and inserting float object

2007-08-27 Thread Andre Poenitz
On Tue, Aug 28, 2007 at 12:05:25AM +0200, Abdelrazak Younes wrote:
 Alfredo Braunstein wrote:
 This seems good indeed. In the long run, however, we should think of a way 
 to enforce this so we don't have to check manually (even some assert at 
 run time would be nice). Moreover, I don't see what do we gain by using a 
 lyxfunc internally, probably we should just put the content of the 
 corresponding dipatch code (that just inserts an inset!) in a standalone 
 function and call that instead.
 
 Last time I proposed exactly that with the very same analysis, I was 
 told I didn't know what I was talking about ;-)

Was that me?

Andre'
 
 


Re: [patch] Re: Lyx crashed after inserting, deleting and inserting float object

2007-08-27 Thread Abdelrazak Younes

Andre Poenitz wrote:

On Tue, Aug 28, 2007 at 12:05:25AM +0200, Abdelrazak Younes wrote:
  

Alfredo Braunstein wrote:

This seems good indeed. In the long run, however, we should think of a way 
to enforce this so we don't have to check manually (even some assert at 
run time would be nice). Moreover, I don't see what do we gain by using a 
lyxfunc internally, probably we should just put the content of the 
corresponding dipatch code (that just inserts an inset!) in a standalone 
function and call that instead.
  
Last time I proposed exactly that with the very same analysis, I was 
told I didn't know what I was talking about ;-)



Was that me?
  
More like a combination of JMarc, maybe Lars and someone else that I do 
not remember... You were more or less on my side IIRC.


Abdel.



Shortcut problem in trunk

2007-08-27 Thread Richard Heck


I'm getting a command not allowed message when trying to use 
Alt-whatever to access the menu with no buffer open.


Richard

--
==
Richard G Heck, Jr
Professor of Philosophy
Brown University
http://frege.brown.edu/heck/
==
Get my public key from http://sks.keyserver.penguin.de
Hash: 0x1DE91F1E66FFBDEC
Learn how to sign your email using Thunderbird and GnuPG at:
http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto



Re: Things we do wrong

2007-08-27 Thread Angus Leeming
Andre Poenitz [EMAIL PROTECTED] writes:
 So anybody who remembers the reasons to use the anon namespace (for
 _functions_)? [Rhetorical question...]

I seem to remember that Lars told us that it was a good thing (TM). However, 
before anyone indulges in a let's bash Lars bit of nostalgia, here's what 
Stroustrup has to say in The C++ programming language, 3rd ed:

Section 9.2. Linkage

   In C and older C++ programs, the keyword static is (confusingly) used 
to mean use internal linkage (ChB.2.3). Don't use static except inside 
functions (Ch 7.1.2) and classes (Ch 10.2.4).

So, whilst this certainly doesn't invalidate your experiment, I think that we 
should also take a rain check and ask just how much does following 
Stroustrup's advice really hurt in practice.

If it costs 3 secs on a full compile, then any conclusions are essentially 
worthless ;-)

Angus



Re: [Cvslog] r19834 - in /lyx-devel/trunk/src: insets/InsetCaption.h i...

2007-08-27 Thread Martin Vermeer
On Mon, Aug 27, 2007 at 02:38:31PM +, [EMAIL PROTECTED] wrote:
 Author: younes
 Date: Mon Aug 27 16:38:29 2007
 New Revision: 19834
 
 URL: http://www.lyx.org/trac/changeset/19834
 Log:
 Remove the wide() hack. This simplifies quite a few things...

I notice that, when changing an inset, not only that inset's containing
paragraph but all paragraphs on-screen are repainted, even if the height
of that paragraph doesn't change (so this appears unnecessary). Is that 
intentional?

- Martin
 


Re: [patch for [Bug 1656] command "gnome-session-save" kills lyx!]

2007-08-27 Thread Stephan Witt

Abdelrazak Younes schrieb:

Stephan Witt wrote:

Abdelrazak Younes schrieb:
I am OK with the patch but I would like to know first if there are 
any drawbacks, I am not on X11.


I tested this patch with Qt 4.1.2 and it is working without drawbacks.
AFAIK older Qt versions are not supported anymore were I had problems 
with the popping up of the dialog asking the user to confirm the file 
save operation. So two years ago the patch did not work (with Qt 3.x).


OK, thanks for the clarification.


I cannot tell anything about the behaviour on Windows.


I'll try without the #ifdef to test it out.


Do you need a new patch from me or will you change it yourself?


No, that's fine, I'll do it.


Thank you!

Stephan


Re: r19813 - in /lyx-devel/trunk: lib/layouts/stdinsets.inc s...

2007-08-27 Thread Martin Vermeer
On Sun, 26 Aug 2007 16:57:16 -0500
Bo Peng <[EMAIL PROTECTED]> wrote:

> On 8/26/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > Author: vermeer
> > Date: Sun Aug 26 22:32:58 2007
> > New Revision: 19813
> >
> > URL: http://www.lyx.org/trac/changeset/19813
> > Log:
> > Move background colour into the layout files -- for all collapsables
> 
> I think this commit breaks tex2lyx. I get error messages like  'Color'
> has not been declared.

Yes you're right, thanks. The attached patch is needed. I don't like it
bringing in Color, but I see no other way.

- Martin
 

Index: TextClass.h
===
--- TextClass.h	(revision 19813)
+++ TextClass.h	(working copy)
@@ -10,6 +10,7 @@
 #ifndef LYXTEXTCLASS_H
 #define LYXTEXTCLASS_H
 
+#include "Color.h"
 #include "Layout.h"
 #include "lyxlayout_ptr_fwd.h"
 
Index: tex2lyx/Makefile.am
===
--- tex2lyx/Makefile.am	(revision 19807)
+++ tex2lyx/Makefile.am	(working copy)
@@ -36,7 +36,9 @@
 	../Layout.cpp \
 	../TextClass.cpp \
 	../TextClass.h \
-	../Lexer.cpp 
+	../Lexer.cpp \
+	../Color.cpp \
+	../Color.h
 
 BUILT_SOURCES = $(PCH_FILE)
 


Re: LyX 1.5 patch candidate list (update)

2007-08-27 Thread Jürgen Spitzmüller
Richard Heck wrote:
> >> http://www.lyx.org/trac/changeset/19331 - Deal with a UI bug
> >>    
> >
> > probably not needed (now).
> >  
>
> Easy enough to do if you want it. But it's not that critical.

Maybe for later? There will be an 1.5.3 release ;-)

Jürgen


Re: Middle-click copy-paste borked in SVN

2007-08-27 Thread Jürgen Spitzmüller
Bo Peng wrote:
> A 'better' fix has been committed, but there is still a problem of
> copy/paste table cells.

Do we have a bugzilla entry? Sorry for asking, I'm still trying to catch 
up ...

Jürgen


Re: [PATCH-final] Bug 3676

2007-08-27 Thread Jürgen Spitzmüller
Richard Heck wrote:
> It went in at 19565, 19598, and 19657. Whether it's for 1.5.x isn't
> clear to me. It ended up being a very large commit, and I'm guessing
> it'll be hard to port it once it's seen enough testing. But you might
> want to look at it. The new dialog is very nice, if I do say so myself.

Thanks. Let's postpone this then.

Jürgen


Reading LyX.cvs via gmane now, can now I unsubscribe from mail posts?

2007-08-27 Thread christian . ridderstrom
When I wasn't subscribed to LyX.cvs before, my commit messages were not 
posted automatically to that list. As I've quickly gotten tired of all the 
LyX.cvs email I'm now reading the posts through gmane.


My question is if I can unsubscribe to LyX.cvs without losing the function 
that my commit messages are posted to the list as they should?


/Christian


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

Re: [patch for [Bug 1656] command "gnome-session-save" kills lyx!]

2007-08-27 Thread Abdelrazak Younes

Stephan Witt wrote:

Abdelrazak Younes schrieb:

Do you need a new patch from me or will you change it yourself?


No, that's fine, I'll do it.


Thank you!


You are welcome. Please send a message to this list stating the following:

I grant permission to license any and all contributions I've made to
LyX under the Gnu GPL version 2 or later.

Could one of the usual suspects add Stephan to the Contrib list please?

Abdel.

Author: younes
Date: Mon Aug 27 08:35:24 2007
New Revision: 19824

URL: http://www.lyx.org/trac/changeset/19824
Log:
New 'Save all on shutdown or cancel' feature from Stephan Witt.

Modified:
lyx-devel/trunk/src/frontends/qt4/GuiApplication.cpp
lyx-devel/trunk/src/frontends/qt4/GuiApplication.h

Modified: lyx-devel/trunk/src/frontends/qt4/GuiApplication.cpp
URL: 
http://www.lyx.org/trac/file/lyx-devel/trunk/src/frontends/qt4/GuiApplication.cpp?rev=19824

==
--- lyx-devel/trunk/src/frontends/qt4/GuiApplication.cpp (original)
+++ lyx-devel/trunk/src/frontends/qt4/GuiApplication.cpp Mon Aug 27 
08:35:24 2007

@@ -27,6 +27,7 @@
 #include "support/os.h"
 #include "support/Package.h"

+#include "BufferList.h"
 #include "BufferView.h"
 #include "Color.h"
 #include "debug.h"
@@ -43,6 +44,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -318,6 +320,20 @@
socket_callbacks_.erase(fd);
 }

+
+void GuiApplication::commitData(QSessionManager & sm)
+{
+   /// The implementation is required to avoid an application exit
+   /// when session state save is triggered by session manager.
+   /// The default implementation sends a close event to all
+   /// visible top level widgets when session managment allows
+   /// interaction.
+   /// We are changing that to write all unsaved buffers...
+   if (sm.allowsInteraction() && !theBufferList().quitWriteAll())
+   sm.cancel();
+}
+
+
 
 // X11 specific stuff goes here...
 #ifdef Q_WS_X11

Modified: lyx-devel/trunk/src/frontends/qt4/GuiApplication.h
URL: 
http://www.lyx.org/trac/file/lyx-devel/trunk/src/frontends/qt4/GuiApplication.h?rev=19824

==
--- lyx-devel/trunk/src/frontends/qt4/GuiApplication.h (original)
+++ lyx-devel/trunk/src/frontends/qt4/GuiApplication.h Mon Aug 27 
08:35:24 2007

@@ -25,6 +25,8 @@

 #include 
 #include 
+
+class QSessionManager;

 namespace lyx {

@@ -74,9 +76,10 @@
void unregisterSocketCallback(int fd);
//@}

-   /// Methods inherited from \c Application class
+   /// Methods inherited from \c QApplication class
//@{
-   virtual bool notify(QObject * receiver, QEvent * event);
+   bool notify(QObject * receiver, QEvent * event);
+   void commitData(QSessionManager & sm);
//@}

///





Re: [patch for [Bug 1656] command "gnome-session-save" kills lyx!]

2007-08-27 Thread Abdelrazak Younes

Jürgen Spitzmüller wrote:

José Matos wrote:

With Jürgen coming soon I will let this decision to him. :-)

  So apart from style issues (that are easily fixed) this patch can go in
devel. :-)


OK for branch as well, if Abdel's testing revealed no problems.


No problem on Windows too so I just committed it (without the #ifdef).

Abdel.



Re: Middle-click copy-paste borked in SVN

2007-08-27 Thread Darren Freeman
On Mon, 2007-08-27 at 08:28 +0200, Jürgen Spitzmüller wrote:
> Bo Peng wrote:
> > A 'better' fix has been committed, but there is still a problem of
> > copy/paste table cells.
> 
> Do we have a bugzilla entry? Sorry for asking, I'm still trying to catch 
> up ...

I started the thread, but due to proximity to the 1.5 release I expected
it to be on everybody's mind and fixed within a couple of days :)

So no, not to my knowledge.

There is a simple patch under test.

Have fun,
Darren



Re: Reading LyX.cvs via gmane now, can now I unsubscribe from mail posts?

2007-08-27 Thread Abdelrazak Younes

[EMAIL PROTECTED] wrote:
When I wasn't subscribed to LyX.cvs before, my commit messages were not 
posted automatically to that list. As I've quickly gotten tired of all 
the LyX.cvs email I'm now reading the posts through gmane.


My question is if I can unsubscribe to LyX.cvs without losing the 
function that my commit messages are posted to the list as they should?


Ye you can, every commit messages are send to the list independently of 
whether you're subscribe or not (I am not subscribed to lyx.cvs nor 
lyx.devel).


Abdel.



Re: Vertical space in a table cell gives latex errors

2007-08-27 Thread Helge Hafting

Paul A. Rubin wrote:

Helge Hafting wrote:
I have a table with a tall row, because one cell is fixed-width with 
multiple lines.

In another cell I wanted to place a single symbol, preferably centered
vertically.

I tried changing the column's vertical adjustment, but this had
no effect whatsoever.


Did you try setting the vertical alignment of the fixed width column 
to "middle"?  I find this counterintuitive, but it seems to be how it 
works.

Thanks, I can now get the effect I want.
Still, latex is very strange here, or perhaps LyX just
misrepresent things. I set some alignment on the fixed-width
column - in order to have _other_ columns line up with that
alignment?  Not only is this odd, but the concept does not
extend to having several fixed-width columns with differing
alignemnts.  (How is  the other columns going to line up then?
Like the first fixed column?  Like the next one says?)

There is indeed odd results when setting up several such
columns. :-(




So I tried forcing my way with insert->vertical space before
and after the symbol. Latex puked on this.


Try setting "protected" on the vertical space.  It doesn't seem to 
cause LaTeX to object (although it also doesn't seem to accomplish much).

Correct.  Latex accepts the protected space, but don't act
on it.  So it is useless and should probably be disabled.

Helge Hafting


Re: Lyx problems in importing txt2tags .tex files

2007-08-27 Thread Alexandre Santos
2007/8/24, José Matos <[EMAIL PROTECTED]>:
> On Friday 24 August 2007 13:14:33 Alexandre Santos wrote:
> > However I have a problem importing the .tex files produced by txt2tags
> > into LyX. The title and author field are missing in the .lyx file,
> > replaced by a "clear page" mention. The final .dvi lacks those fields
> > entirely.
>
> Without looking into further detail... does it works in the initial .tex
> version?

Yep, if I launch >latex xp1.tex (or xp2.tex), I get properly formatted
dvi files (using MikeTex and Yap). So the problem seems to be with
LyX).

Cheers,
Alex


Re: r19813 - in /lyx-devel/trunk: lib/layouts/stdinsets.inc s...

2007-08-27 Thread Abdelrazak Younes

Martin Vermeer wrote:

On Sun, 26 Aug 2007 16:57:16 -0500
Bo Peng <[EMAIL PROTECTED]> wrote:


On 8/26/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

Author: vermeer
Date: Sun Aug 26 22:32:58 2007
New Revision: 19813

URL: http://www.lyx.org/trac/changeset/19813
Log:
Move background colour into the layout files -- for all collapsables

I think this commit breaks tex2lyx. I get error messages like  'Color'
has not been declared.


Yes you're right, thanks. The attached patch is needed. I don't like it
bringing in Color, but I see no other way.


There is a way: you just need the Color::color enum AFAIS so the 
solution is to extract this enum from the Color class and give it its 
own header. This will enable us to get rid of the Color_color 
pseudoclass too.


In any case please commit your quick fix ASAP as compilation is broken 
right now.


Abdel.



Re: [PATCH] Layout Modularity, Part 3

2007-08-27 Thread Abdelrazak Younes

[EMAIL PROTECTED] wrote:

On Sun, 26 Aug 2007, Andre Poenitz wrote:


On Sat, Aug 25, 2007 at 12:46:00PM -0400, Richard Heck wrote:

@@ -0,0 +1,291 @@
+/**
+ * \file QSelectionManager.cpp
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author Richard Heck
+ * \author Et Alia


I wonder how hard it will be to make Mr Alia sign the customary 
license agreement...


Probably easier than unifying the installers :-)


PS: Should I really add a smiley?


To be honest, at first I thought Mr Alia was French/Arabic...


FYI Alia is indeed an Arabic girl surname. The feminine counterpart of 
Ali (Which mean literally 'High').


Abdel.



Re: Middle-click copy-paste borked in SVN

2007-08-27 Thread Jürgen Spitzmüller
Darren Freeman wrote:
> So no, not to my knowledge.
>
> There is a simple patch under test.

Could you create a bugzilla entry and upload the patch there, please?

Jürgen


Re: [patch for [Bug 1656] command "gnome-session-save" kills lyx!]

2007-08-27 Thread Stephan Witt

Abdelrazak Younes schrieb:

Stephan Witt wrote:

Abdelrazak Younes schrieb:

Do you need a new patch from me or will you change it yourself?


No, that's fine, I'll do it.


Thank you!


You are welcome. Please send a message to this list stating the following:


I granted permission already in 2005. :)
It was the 22nd of February 2005.


Could one of the usual suspects add Stephan to the Contrib list please?


IMHO I'm on the the list already.

Thanks again.

Stephan


Re: [patch for [Bug 1656] command "gnome-session-save" kills lyx!]

2007-08-27 Thread Abdelrazak Younes

Stephan Witt wrote:

Abdelrazak Younes schrieb:

Stephan Witt wrote:

Abdelrazak Younes schrieb:

Do you need a new patch from me or will you change it yourself?


No, that's fine, I'll do it.


Thank you!


You are welcome. Please send a message to this list stating the 
following:


I granted permission already in 2005. :)
It was the 22nd of February 2005.


Good, so why do I have to commit this for you? ;-)

Abdel.



Re: [patch for [Bug 1656] command "gnome-session-save" kills lyx!]

2007-08-27 Thread Stephan Witt

Abdelrazak Younes schrieb:

Stephan Witt wrote:

Abdelrazak Younes schrieb:

Stephan Witt wrote:

Abdelrazak Younes schrieb:

Do you need a new patch from me or will you change it yourself?


No, that's fine, I'll do it.


Thank you!


You are welcome. Please send a message to this list stating the 
following:


I granted permission already in 2005. :)
It was the 22nd of February 2005.


Good, so why do I have to commit this for you? ;-)


You know, it's not so easy to gain commit privileges ;)
But I have not so many things to contribute anyway.

Stephan



Re: [patch] Re: Lyx crashed after inserting, deleting and inserting float object

2007-08-27 Thread Abdelrazak Younes

Alfredo Braunstein wrote:

Alfredo Braunstein wrote:


Abdelrazak Younes wrote:



Nope... unfortunately. I am sure this is a metrics problem actually.

Hum... "I am _not_ sure..."

Actually that's what I've read for some reason ;-) I would nevertheless
like to commit the patch, as valgrind tells that otherwise the wide_inset_
value is used before initialized. This wide stuff is really bad...


I did a bit of research, and I think I found something, and it seems
a mess. Please correct me if I'm wrong, this is what I understand:

Text::dispatch(LFUN_FLOAT_INSERT) calls dispatches
Cursor::dispatch(LFUN_CAPTION_INSERT) to insert the CAPTION. 
One possible general problem with this may be that Cursor::dispatch is not

reentrant-safe (see beforeDispatch members).


I've looked at it more closely and you're right. We should either use 
the local Text::dispatch() method or make sure the savings of 
beforeDispX and beforeDispY happen before Cursor::dispatch():


// store some values to be used inside of the handlers
getPos(beforeDispX_, beforeDispY_);

For trunk, I think we should replace all occurence of
cur.dispatch() with this->dispatch() in Text3::dispatch().
For BRANCH_1_5 I think the simpler solution is to move the getPos() call 
above at the beginning of the LFUN machinery: LyXFunc::dispatch().



The real problem in this case
seems to be that the dispatch machinery assumes up-to-date metrics
(Cursor::dispatch calls getPos), whereas in this case the Collapsable was
already inserted and the metrics still not updated.


I'll commit a hot fix shortly.

Abdel.



Re: r19813 - in /lyx-devel/trunk: lib/layouts/stdinsets.inc s...

2007-08-27 Thread Martin Vermeer
On Mon, 27 Aug 2007 09:43:19 +0200
Abdelrazak Younes <[EMAIL PROTECTED]> wrote:

> Martin Vermeer wrote:
> > On Sun, 26 Aug 2007 16:57:16 -0500
> > Bo Peng <[EMAIL PROTECTED]> wrote:
> > 
> >> On 8/26/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >>> Author: vermeer
> >>> Date: Sun Aug 26 22:32:58 2007
> >>> New Revision: 19813
> >>>
> >>> URL: http://www.lyx.org/trac/changeset/19813
> >>> Log:
> >>> Move background colour into the layout files -- for all collapsables
> >> I think this commit breaks tex2lyx. I get error messages like  'Color'
> >> has not been declared.
> > 
> > Yes you're right, thanks. The attached patch is needed. I don't like it
> > bringing in Color, but I see no other way.
> 
> There is a way: you just need the Color::color enum AFAIS so the 
> solution is to extract this enum from the Color class and give it its 
> own header. This will enable us to get rid of the Color_color 
> pseudoclass too.

Not really true, I need the lcolor object and getFromLyXName().

> In any case please commit your quick fix ASAP as compilation is broken 
> right now.

OK

- Martin


Re: [patch for [Bug 1656] command "gnome-session-save" kills lyx!]

2007-08-27 Thread Abdelrazak Younes

Stephan Witt wrote:

Abdelrazak Younes schrieb:

Stephan Witt wrote:

Abdelrazak Younes schrieb:

Stephan Witt wrote:

Abdelrazak Younes schrieb:

Do you need a new patch from me or will you change it yourself?


No, that's fine, I'll do it.


Thank you!


You are welcome. Please send a message to this list stating the 
following:


I granted permission already in 2005. :)
It was the 22nd of February 2005.


Good, so why do I have to commit this for you? ;-)


You know, it's not so easy to gain commit privileges ;)


Don't tell me...


But I have not so many things to contribute anyway.


But I'm sure you could ;-)

Abdel.



Re: r19813 - in /lyx-devel/trunk: lib/layouts/stdinsets.inc s...

2007-08-27 Thread Abdelrazak Younes

Martin Vermeer wrote:

On Mon, 27 Aug 2007 09:43:19 +0200
There is a way: you just need the Color::color enum AFAIS so the 
solution is to extract this enum from the Color class and give it its 
own header. This will enable us to get rid of the Color_color 
pseudoclass too.


Not really true, I need the lcolor object and getFromLyXName().


OK. But my point on the Color::color remains valid IMO.



In any case please commit your quick fix ASAP as compilation is broken 
right now.


OK


Thanks. While you are at it, there's a problem with float inset 
backgrounds, they are black:


LyX internal error: Missing color entry in Color.cpp for -842150451
Using black.


Abdel.



Re: [PATCH] Layout Modularity, Part 3

2007-08-27 Thread christian . ridderstrom

On Mon, 27 Aug 2007, Abdelrazak Younes wrote:


[EMAIL PROTECTED] wrote:

 On Sun, 26 Aug 2007, Andre Poenitz wrote:

>  On Sat, Aug 25, 2007 at 12:46:00PM -0400, Richard Heck wrote:

@@ -0,0 +1,291 @@

> >  +/**
> >  + * \file QSelectionManager.cpp
> >  + * This file is part of LyX, the document processor.
> >  + * Licence details can be found in the file COPYING.
> >  + *
> >  + * \author Richard Heck
> >  + * \author Et Alia
> 
>  I wonder how hard it will be to make Mr Alia sign the customary license 
>  agreement...


 Probably easier than unifying the installers :-)

>  PS: Should I really add a smiley?

 To be honest, at first I thought Mr Alia was French/Arabic...


FYI Alia is indeed an Arabic girl surname. The feminine counterpart of 
Ali (Which mean literally 'High').


So Arabic males and females have different surnames (i.e. the family/last 
name)?


/Christian

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

Re: [PATCH] Layout Modularity, Part 3

2007-08-27 Thread Abdelrazak Younes

[EMAIL PROTECTED] wrote:

On Mon, 27 Aug 2007, Abdelrazak Younes wrote:


[EMAIL PROTECTED] wrote:

 On Sun, 26 Aug 2007, Andre Poenitz wrote:

>  On Sat, Aug 25, 2007 at 12:46:00PM -0400, Richard Heck wrote:

@@ -0,0 +1,291 @@

> >  +/**
> >  + * \file QSelectionManager.cpp
> >  + * This file is part of LyX, the document processor.
> >  + * Licence details can be found in the file COPYING.
> >  + *
> >  + * \author Richard Heck
> >  + * \author Et Alia
> >  I wonder how hard it will be to make Mr Alia sign the customary 
license >  agreement...


 Probably easier than unifying the installers :-)

>  PS: Should I really add a smiley?

 To be honest, at first I thought Mr Alia was French/Arabic...


FYI Alia is indeed an Arabic girl surname. The feminine counterpart of 
Ali (Which mean literally 'High').


So Arabic males and females have different surnames (i.e. the 
family/last name)?


No, sorry, I meant _first_ name.

Abdel.



  1   2   >