Re: [Cvslog] r21394 - in /lyx-devel/trunk/src/insets: InsetListings.cp...

2007-11-03 Thread Martin Vermeer
On Fri, Nov 02, 2007 at 11:12:45PM +, [EMAIL PROTECTED] wrote:
 Author: younes
 Date: Sat Nov  3 00:12:43 2007
 New Revision: 21394
 
 URL: http://www.lyx.org/trac/changeset/21394
 Log:
 Remremove unneeded init() method.
 
 
 Modified:
 lyx-devel/trunk/src/insets/InsetListings.cpp
 lyx-devel/trunk/src/insets/InsetListings.h
 
 Modified: lyx-devel/trunk/src/insets/InsetListings.cpp
 URL: 
 http://www.lyx.org/trac/file/lyx-devel/trunk/src/insets/InsetListings.cpp?rev=21394
 ==
 --- lyx-devel/trunk/src/insets/InsetListings.cpp (original)
 +++ lyx-devel/trunk/src/insets/InsetListings.cpp Sat Nov  3 00:12:43 2007
 @@ -31,43 +31,28 @@
  
  #include sstream
  
 -namespace lyx {
 -
 -using support::token;
 -using support::contains;
 -using support::subst;
 -
  using std::istringstream;
  using std::ostream;
  using std::ostringstream;
  using std::string;
  
 +namespace lyx {
 +
 +using support::token;
 +using support::contains;
 +using support::subst;
 +
  char const lstinline_delimiters[] =
   
 !*()-=+|;:'\`,./?QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm;
  
 -void InsetListings::init()
 -{
 - setButtonLabel();
 - layout_.labelfont.setColor(Color_none);

Great. I see you did Box too.

- Martin



Re: [Cvslog] r21396 - in /lyx-devel/trunk/src: CutAndPaste.cpp TextCla...

2007-11-03 Thread Martin Vermeer
On Sat, Nov 03, 2007 at 12:35:08AM +, [EMAIL PROTECTED] wrote:
 Author: younes
 Date: Sat Nov  3 01:35:07 2007
 New Revision: 21396
 
 URL: http://www.lyx.org/trac/changeset/21396
 Log:
 Further cleanup of InsetFlex, InsetCollapsable and InsetLayout:
 - Getting rid of some unneeded init() methods.
 - InsetCollapsable::layout_ is now a const pointer.
 
 Modified:
 lyx-devel/trunk/src/CutAndPaste.cpp
 lyx-devel/trunk/src/TextClass.cpp
 lyx-devel/trunk/src/factory.cpp
 lyx-devel/trunk/src/insets/InsetBox.cpp
 lyx-devel/trunk/src/insets/InsetBranch.cpp
 lyx-devel/trunk/src/insets/InsetCollapsable.cpp
 lyx-devel/trunk/src/insets/InsetCollapsable.h
 lyx-devel/trunk/src/insets/InsetERT.cpp
 lyx-devel/trunk/src/insets/InsetERT.h
 lyx-devel/trunk/src/insets/InsetFlex.cpp
 lyx-devel/trunk/src/insets/InsetFlex.h
 lyx-devel/trunk/src/insets/InsetNote.cpp
 
 Modified: lyx-devel/trunk/src/CutAndPaste.cpp
 URL: 
 http://www.lyx.org/trac/file/lyx-devel/trunk/src/CutAndPaste.cpp?rev=21396
 ==
 --- lyx-devel/trunk/src/CutAndPaste.cpp (original)
 +++ lyx-devel/trunk/src/CutAndPaste.cpp Sat Nov  3 01:35:07 2007
 @@ -448,7 +448,7 @@
   InsetFlex  inset =
   static_castInsetFlex (*it);
   string const name = inset.params().name;
 - InsetLayout const il = 
 + InsetLayout const  il = 
   tclass2.insetlayout(from_utf8(name));
   inset.setLayout(il);
   if (il.labelstring == from_utf8(UNDEFINED)) {
 
 Modified: lyx-devel/trunk/src/TextClass.cpp
 URL: http://www.lyx.org/trac/file/lyx-devel/trunk/src/TextClass.cpp?rev=21396
 ==
 --- lyx-devel/trunk/src/TextClass.cpp (original)
 +++ lyx-devel/trunk/src/TextClass.cpp Sat Nov  3 01:35:07 2007
 @@ -707,6 +707,9 @@
   break;
   case IL_LABELFONT:
   labelfont = lyxRead(lexrc, inherit_font);
 + // The label font is generally used as-is without
 + // any realization against a given context.
 + labelfont.realize(sane_font);

Great. Did you also remember to change the labelfont
initialization (above) inherit_font - sane_font? 
(i.e., fix my mistake's first part)?

- Martin


   break;
   case IL_FORCELTR:
   lexrc.next();


Re: [Cvslog] r21398 - /lyx-devel/trunk/src/TextClass.cpp

2007-11-03 Thread Martin Vermeer
OK, thanks.

- Martin



Re: warnings

2007-11-03 Thread Jürgen Spitzmüller
Andre Poenitz wrote:
 ../../trunk/src/LyXFunc.cpp:2477: warning: enumeration value
 'RC_DEFFILE' not handled in switch
 ../../trunk/src/LyXFunc.cpp:2477: warning: enumeration value
 'RC_USE_PIXMAP_CACHE' not handled in switch

The latter is fixed. This is commented-out code btw.

Jürgen


Re: [Cvslog] r21375 - /lyx-devel/trunk/src/frontends/qt4/ui/PrefUi.ui

2007-11-03 Thread Jürgen Spitzmüller
Bo Peng wrote:
 I change from 4.3 format to 4.22 (which is supposedly the same as
 4.1). I could not compile the trunk without this change.

Now I'm puzzled.

Jürgen


Re: Todays 1.6svn crash in various ways when opening existing documents

2007-11-03 Thread Jürgen Spitzmüller
Bo Peng wrote:
 During a fast-evolving period like this, with no public release in
 between, reversion of lyx2lyx is IMHO acceptable

I think we discussed this sufficiently now. It doesn't matter in which release 
perdiod we are. 

Jürgen


1.5 branch won't compile

2007-11-03 Thread Darren Freeman
Hi all,

you'll love this :) The 1.5 stable branch won't compile for me today.
See below for the relevant error.

Today's revision that failed is r21399. I went backward to find the most
recent revision which compiles, which is r21356. The change which broke
it is therefore r21357.

I'll now do a fresh build of the next revision just to be sure. If I
don't write back then assume it failed again.

Have fun,
Darren

88888

make[7]: Entering directory `/home/dfreeman/lyx-devel/src/frontends/qt4'
if /bin/sh ../../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H
-I. -I. -I../../../src  -DQT_CLEAN_NAMESPACE -DQT_GENUINE_STR
-DQT_NO_STL -DQT_NO_KEYWORDS -Winvalid-pch --include=./pch.h
-I../../../src -I../../../src/frontends -I../../../images -DQT_SHARED
-I/usr/include/QtCore -I/usr/include/QtGui   -I../../../boost
-I../../../src/frontends/controllers -Wextra -Wall -g -O -MT
Dialogs.lo -MD -MP -MF .deps/Dialogs.Tpo -c -o Dialogs.lo Dialogs.cpp;
\
then mv -f .deps/Dialogs.Tpo .deps/Dialogs.Plo; else rm -f
.deps/Dialogs.Tpo; exit 1; fi
 g++ -DHAVE_CONFIG_H -I. -I. -I../../../src -DQT_CLEAN_NAMESPACE
-DQT_GENUINE_STR -DQT_NO_STL -DQT_NO_KEYWORDS -Winvalid-pch
--include=./pch.h -I../../../src -I../../../src/frontends
-I../../../images -DQT_SHARED -I/usr/include/QtCore -I/usr/include/QtGui
-I../../../boost -I../../../src/frontends/controllers -Wextra -Wall -g
-O -MT Dialogs.lo -MD -MP -MF .deps/Dialogs.Tpo -c Dialogs.cpp -o
Dialogs.o
ui/PrefUi.h: In member function 'void Ui_QPrefUi::setupUi(QWidget*)':
ui/PrefUi.h:123: error: 'class QGridLayout' has no member named
'setLeftMargin'
ui/PrefUi.h:124: error: 'class QGridLayout' has no member named
'setTopMargin'
ui/PrefUi.h:125: error: 'class QGridLayout' has no member named
'setRightMargin'
ui/PrefUi.h:126: error: 'class QGridLayout' has no member named
'setBottomMargin'
ui/PrefUi.h:127: error: 'class QGridLayout' has no member named
'setHorizontalSpacing'
ui/PrefUi.h:128: error: 'class QGridLayout' has no member named
'setVerticalSpacing'
ui/PrefUi.h:158: error: 'class QHBoxLayout' has no member named
'setLeftMargin'
ui/PrefUi.h:159: error: 'class QHBoxLayout' has no member named
'setTopMargin'
ui/PrefUi.h:160: error: 'class QHBoxLayout' has no member named
'setRightMargin'
ui/PrefUi.h:161: error: 'class QHBoxLayout' has no member named
'setBottomMargin'
ui/PrefUi.h:211: error: 'class QVBoxLayout' has no member named
'setLeftMargin'
ui/PrefUi.h:212: error: 'class QVBoxLayout' has no member named
'setTopMargin'
ui/PrefUi.h:213: error: 'class QVBoxLayout' has no member named
'setRightMargin'
ui/PrefUi.h:214: error: 'class QVBoxLayout' has no member named
'setBottomMargin'
ui/PrefUi.h:223: error: 'class QHBoxLayout' has no member named
'setLeftMargin'
ui/PrefUi.h:224: error: 'class QHBoxLayout' has no member named
'setTopMargin'
ui/PrefUi.h:225: error: 'class QHBoxLayout' has no member named
'setRightMargin'
ui/PrefUi.h:226: error: 'class QHBoxLayout' has no member named
'setBottomMargin'
ui/PrefUi.h:254: error: 'class QHBoxLayout' has no member named
'setLeftMargin'
ui/PrefUi.h:255: error: 'class QHBoxLayout' has no member named
'setTopMargin'
ui/PrefUi.h:256: error: 'class QHBoxLayout' has no member named
'setRightMargin'
ui/PrefUi.h:257: error: 'class QHBoxLayout' has no member named
'setBottomMargin'
ui/PrefUi.h:281: error: 'class QVBoxLayout' has no member named
'setLeftMargin'
ui/PrefUi.h:282: error: 'class QVBoxLayout' has no member named
'setTopMargin'
ui/PrefUi.h:283: error: 'class QVBoxLayout' has no member named
'setRightMargin'
ui/PrefUi.h:284: error: 'class QVBoxLayout' has no member named
'setBottomMargin'
make[7]: *** [Dialogs.lo] Error 1
make[7]: Leaving directory `/home/dfreeman/lyx-devel/src/frontends/qt4'
make[6]: *** [all-recursive] Error 1
make[6]: Leaving directory `/home/dfreeman/lyx-devel/src/frontends/qt4'
make[5]: *** [all] Error 2
make[5]: Leaving directory `/home/dfreeman/lyx-devel/src/frontends/qt4'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/dfreeman/lyx-devel/src/frontends'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/home/dfreeman/lyx-devel/src/frontends'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/dfreeman/lyx-devel/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/dfreeman/lyx-devel/src'
make: *** [all-recursive] Error 1



Re: 1.5 branch won't compile

2007-11-03 Thread Darren Freeman
On Sat, 2007-11-03 at 19:27 +1100, Darren Freeman wrote:
 Today's revision that failed is r21399. I went backward to find the most
 recent revision which compiles, which is r21356. The change which broke
 it is therefore r21357.

Sorry, I'm off-by-one. The version which compiles is r21357 and the
break occurred at r21358.

Have fun,
Darren



Re: [Cvslog] r21396 - in /lyx-devel/trunk/src: CutAndPaste.cpp TextCla...

2007-11-03 Thread Abdelrazak Younes

Martin Vermeer wrote:

Modified: lyx-devel/trunk/src/TextClass.cpp
URL: http://www.lyx.org/trac/file/lyx-devel/trunk/src/TextClass.cpp?rev=21396
==
--- lyx-devel/trunk/src/TextClass.cpp (original)
+++ lyx-devel/trunk/src/TextClass.cpp Sat Nov  3 01:35:07 2007
@@ -707,6 +707,9 @@
break;
case IL_LABELFONT:
labelfont = lyxRead(lexrc, inherit_font);
+   // The label font is generally used as-is without
+   // any realization against a given context.
+   labelfont.realize(sane_font);


Great. Did you also remember to change the labelfont
initialization (above) inherit_font - sane_font? 
(i.e., fix my mistake's first part)?


No, as I think it is correct (but am not sure). We don't want to 
override the parsed settings, do we?


Abdel.



Re: 1.5 branch won't compile

2007-11-03 Thread Abdelrazak Younes

Darren Freeman wrote:

On Sat, 2007-11-03 at 19:27 +1100, Darren Freeman wrote:

Today's revision that failed is r21399. I went backward to find the most
recent revision which compiles, which is r21356. The change which broke
it is therefore r21357.


Sorry, I'm off-by-one. The version which compiles is r21357 and the
break occurred at r21358.


Are you sure it's not 21368?

If yes, then looks like you used Qt 4.3 Juergen...

Abdel.




Re: Todays 1.6svn crash in various ways when opening existing documents

2007-11-03 Thread Andre Poenitz
On Sat, Nov 03, 2007 at 01:12:24AM +0200, Martin Vermeer wrote:
 On Sat, Nov 03, 2007 at 12:00:42AM +0100, Abdelrazak Younes wrote:
 
 ...
 
OK, I've done some cleanup an the crashes are gone but the inset 
   layouts 
   are  broken!
  
Martin, Richard, do you have an idea here? I don't know if we shall we 
   fix  Inset::getLayout() or if we shall assume that each inset hard-code 
   its own  layout.
  
Help please,
Abdel.
   Abdel,
   this is precisely the way _not_ to do it. The calls to setLayout() in the 
   various insets are designed (by Jean-Marc during the Bromarv meeting) to 
   get precisely the right insetlayout based on the inset's name().
  
   Year I noticed that... calling virtual methods in ctors is dangerous and 
   should be avoided.
 
 OK...

Well, it has a well-defined semantics (the incarnation of the currently
constructed part is called). It's not 'dangerous' but usually not too
helpful.

Andre'


What is the purpose of InsetFlexParams?

2007-11-03 Thread Abdelrazak Younes

Is this going to be extended? If not I think it should be erased.

Abdel.



Re: Todays 1.6svn crash in various ways when opening existing documents

2007-11-03 Thread Andre Poenitz
On Sat, Nov 03, 2007 at 12:29:39AM +0100, Uwe Stöhr wrote:
  During a fast-evolving period like this, with no public release in
  between, reversion of lyx2lyx is IMHO acceptable.

 But this introduces crashed: I can for example not open Stefan's macro 
 example file, see my just sent post on the list.

A solution for back-and-forward conversions in the final script would be
some 'obsoleted in format n' property. So lyx2lyx would skip parts
that are obsoleted if the target format has a higher version, yet in
between it will do the conversion, so all the time it will do the 'Right
Thing'. Jose'?

Andre'


Re: [Bug 4318] New: crash when pasting to formula

2007-11-03 Thread Andre Poenitz
On Sat, Nov 03, 2007 at 01:36:56AM +0100, [EMAIL PROTECTED] wrote:
 http://bugzilla.lyx.org/show_bug.cgi?id=4318
 
Summary: crash when pasting to formula
Product: LyX
Version: 1.5.2
   Platform: Other
 OS/Version: other
 Status: UNCONFIRMED
   Severity: critical
   Priority: P2
  Component: mathed
 AssignedTo: [EMAIL PROTECTED]
 ReportedBy: [EMAIL PROTECTED]
  QAContact: [EMAIL PROTECTED]
 
 
 - open a formula
 - copy these two characters to the clipboard: \\
 - paste from the clipboard to the formula - Crash:
 
   Line ~0: Math parse error: The input stream is not well...
   Tokens:  pos: 1

We definitely should switch to a more user friendly error handling then
plain crashs. While it might be annoying that one cannot properly paste
form the clipboard we should not crash...

Andre'


Re: Todays 1.6svn crash in various ways when opening existing documents

2007-11-03 Thread Abdelrazak Younes

Andre Poenitz wrote:

On Sat, Nov 03, 2007 at 01:12:24AM +0200, Martin Vermeer wrote:

On Sat, Nov 03, 2007 at 12:00:42AM +0100, Abdelrazak Younes wrote:

...

 OK, I've done some cleanup an the crashes are gone but the inset layouts 
are  broken!


 Martin, Richard, do you have an idea here? I don't know if we shall we 
fix  Inset::getLayout() or if we shall assume that each inset hard-code 
its own  layout.


 Help please,
 Abdel.

Abdel,
this is precisely the way _not_ to do it. The calls to setLayout() in the 
various insets are designed (by Jean-Marc during the Bromarv meeting) to 
get precisely the right insetlayout based on the inset's name().
 Year I noticed that... calling virtual methods in ctors is dangerous and 
 should be avoided.

OK...


Well, it has a well-defined semantics (the incarnation of the currently
constructed part is called).


I know but I sometimes forgot that in the past.


It's not 'dangerous' but usually not too
helpful.


Well it was not really dangerous but when your code relies on the 
inheriting class calling a virtual method without enforcing it can 
result in crashes.


Abdel.



Compile error, iconv and const

2007-11-03 Thread Stefan Schimanski
/Users/sts/Quellen/mac/lyx-devel/src/support/unicode.cpp: In member  
function 'int lyx::IconvProcessor::convert(const char*, size_t, char*,  
size_t)':
/Users/sts/Quellen/mac/lyx-devel/src/support/unicode.cpp:138: error:  
invalid conversion from 'const char**' to 'char**'
/Users/sts/Quellen/mac/lyx-devel/src/support/unicode.cpp:138: error:
initializing argument 2 of 'size_t iconv(void*, char**, size_t*,  
char**, size_t*)'


I get this with Leopard's gcc 4.01. Fixed it by this patch:

Index: src/support/docstream.cpp
===
--- src/support/docstream.cpp   (revision 21402)
+++ src/support/docstream.cpp   (working copy)
@@ -240,7 +240,7 @@
size_t * inbytesleft, char ** to, size_t * 
outbytesleft) const
{
char const * const to_start = *to;
-   size_t converted = iconv(cd, const_castchar ICONV_CONST 
**(from),
+   size_t converted = iconv(cd, const_castchar **(from),
inbytesleft, to, outbytesleft);
if (converted == (size_t)(-1)) {
switch(errno) {
Index: src/support/unicode.cpp
===
--- src/support/unicode.cpp (revision 21402)
+++ src/support/unicode.cpp (working copy)
@@ -131,7 +131,7 @@
return -1;
}

-   char ICONV_CONST * inbuf = const_castchar ICONV_CONST *(buf);
+   char * inbuf = const_castchar *(buf);
size_t inbytesleft = buflen;
size_t outbytesleft = maxoutsize;

But I have no clue whether this is sensible in general.

Stefan


Re: Integration of my dynmacro patch

2007-11-03 Thread Stefan Schimanski


Am 03.11.2007 um 00:23 schrieb Uwe Stöhr:


Stefan Schimanski schrieb:


I have many test cases here: http://1stein.org/download/testcases.lyx


With this file LyX crashes. Could you send me a file that I can open  
with current trunk?


Works fine for me here. Can you send me a backtrace of the crash?

Stefan

Re: [Cvslog] r21396 - in /lyx-devel/trunk/src: CutAndPaste.cpp TextCla...

2007-11-03 Thread Martin Vermeer
On Sat, Nov 03, 2007 at 10:09:52AM +0100, Abdelrazak Younes wrote:
 Martin Vermeer wrote:
 Modified: lyx-devel/trunk/src/TextClass.cpp
 URL: 
 http://www.lyx.org/trac/file/lyx-devel/trunk/src/TextClass.cpp?rev=21396
 ==
 --- lyx-devel/trunk/src/TextClass.cpp (original)
 +++ lyx-devel/trunk/src/TextClass.cpp Sat Nov  3 01:35:07 2007
 @@ -707,6 +707,9 @@
 break;
 case IL_LABELFONT:
 labelfont = lyxRead(lexrc, inherit_font);
 +   // The label font is generally used as-is without
 +   // any realization against a given context.
 +   labelfont.realize(sane_font);
 
 Great. Did you also remember to change the labelfont
 initialization (above) inherit_font - sane_font? 
 (i.e., fix my mistake's first part)?
 
 No, as I think it is correct (but am not sure). We don't want to 
 override the parsed settings, do we?

No... you did it differently but right IMO.

- Martin
 


Re: [Cvslog] r21400 - in /lyx-devel/trunk/src: CutAndPaste.cpp insets/...

2007-11-03 Thread Martin Vermeer
On Sat, Nov 03, 2007 at 09:03:09AM +, [EMAIL PROTECTED] wrote:
 Author: younes
 Date: Sat Nov  3 10:03:08 2007
 New Revision: 21400
 
 URL: http://www.lyx.org/trac/changeset/21400
 Log:
 Transfer some code from InsetFlex to InsetCollapsable. Add some safeguards 
 and FIXMEs.
 
 Modified:
 lyx-devel/trunk/src/CutAndPaste.cpp
 lyx-devel/trunk/src/insets/InsetCollapsable.cpp
 lyx-devel/trunk/src/insets/InsetCollapsable.h
 lyx-devel/trunk/src/insets/InsetFlex.cpp
 lyx-devel/trunk/src/insets/InsetFlex.h
 lyx-devel/trunk/src/tex2lyx/Font.h

... 
  
 + setLayout(buf.params());
 +
   if (!token_found)
   status_ = isOpen() ? Open : Collapsed;
 -
 - setLayout(buf.params());

Is there a reason for this swap?

...
  
  
  InsetCollapsable::Decoration InsetCollapsable::decoration() const
  {
 - if (layout_-decoration == classic)
 + if (!layout_ || layout_-decoration == classic)
   return Classic;
   if (layout_-decoration == minimalistic)
   return Minimalistic;
   if (layout_-decoration == conglomerate)
   return Conglomerate;
 - if (name() == from_ascii(Flex))
 + if (lyxCode() == FLEX_CODE)

Why is this better?

 + // FIXME: Is this really necessary?
   return Conglomerate;

Not if you put Decoration Conglomerate in all the charstyle entries in
the layout files. 

...

  int InsetCollapsable::latex(Buffer const  buf, odocstream  os,
 OutputParams const  runparams) const
  {
 + // FIXME: What should we do layout_ is 0?
 + // 1) assert
 + // 2) through an error
  throw

 + if (!layout_)
 + return 0;
 +

Suspenders and a belt... should not happen with a well set up layout
file environment (see files stdcharstyles.inc and stdcustom.inc) but
doesn't harm. I would just assert, and describe the fix in a comment
at the assert location.

...

- Martin



Re: What is the purpose of InsetFlexParams?

2007-11-03 Thread Martin Vermeer
On Sat, Nov 03, 2007 at 10:39:44AM +0100, Abdelrazak Younes wrote:
 Is this going to be extended? If not I think it should be erased.
 
 Abdel.

Hmmm, do we want to be able to rename a flex inset to one of another
type, through a dialogue? Branch and Note have this.

The dialogue is lacking and I don't think I'm going to write it. So if
everything still works after deleting it, let it go :-)

- Martin
 


Compilation problems (trunk branch)

2007-11-03 Thread Dov Feldstern

Hi!

I'm also having compilation trouble in both trunk and branch. I'm using 
Qt 4.2.1 (which is the version that debian etch offers as far as I can 
tell).


* trunk:

 g++ -DHAVE_CONFIG_H -I. -I. -I../../../src -DQT_CLEAN_NAMESPACE 
-DQT_GENUINE_ST
R -DQT_NO_STL -DQT_NO_KEYWORDS -I../../../src -I../../../src/frontends 
-I../../.
./images -DQT_SHARED -I/usr/include/qt4 -I/usr/include/qt4/QtCore 
-I/usr/include
/qt4/QtGui -I../../../boost -I../../../src/frontends/controllers -Wextra 
-Wall -
g -O -MT GuiHyperlink.lo -MD -MP -MF .deps/GuiHyperlink.Tpo -c 
GuiHyperlink.cpp

-o GuiHyperlink.o
ui_HyperlinkUi.h: In member function 'void 
Ui_HyperlinkUi::setupUi(QDialog*)':
ui_HyperlinkUi.h:102: error: 'class QHBoxLayout' has no member named 
'setLeftMar

gin'
ui_HyperlinkUi.h:103: error: 'class QHBoxLayout' has no member named 
'setTopMarg

in'
ui_HyperlinkUi.h:104: error: 'class QHBoxLayout' has no member named 
'setRightMa

rgin'
ui_HyperlinkUi.h:105: error: 'class QHBoxLayout' has no member named 
'setBottomM

argin'
make[6]: *** [GuiHyperlink.lo] Error 1

---
* branch:
 g++ -DHAVE_CONFIG_H -I. -I. -I../../../src -DQT_CLEAN_NAMESPACE 
-DQT_GENUINE_ST
R -DQT_NO_STL -DQT_NO_KEYWORDS -Winvalid-pch --include=./pch.h 
-I../../../src -I
../../../src/frontends -I../../../images -DQT_SHARED -I/usr/include/qt4 
-I/usr/i
nclude/qt4/QtCore -I/usr/include/qt4/QtGui -I../../../boost 
-I../../../src/front
ends/controllers -Wextra -Wall -g -O -MT Dialogs.lo -MD -MP -MF 
.deps/Dialogs.Tp

o -c Dialogs.cpp -o Dialogs.o
ui/PrefUi.h: In member function 'void Ui_QPrefUi::setupUi(QWidget*)':
ui/PrefUi.h:123: error: 'class QGridLayout' has no member named 
'setLeftMargin'
ui/PrefUi.h:124: error: 'class QGridLayout' has no member named 
'setTopMargin'
ui/PrefUi.h:125: error: 'class QGridLayout' has no member named 
'setRightMargin'
ui/PrefUi.h:126: error: 'class QGridLayout' has no member named 
'setBottomMargin

'
ui/PrefUi.h:127: error: 'class QGridLayout' has no member named 
'setHorizontalSp

acing'
ui/PrefUi.h:128: error: 'class QGridLayout' has no member named 
'setVerticalSpac

ing'
ui/PrefUi.h:158: error: 'class QHBoxLayout' has no member named 
'setLeftMargin'
ui/PrefUi.h:159: error: 'class QHBoxLayout' has no member named 
'setTopMargin'
ui/PrefUi.h:160: error: 'class QHBoxLayout' has no member named 
'setRightMargin'
ui/PrefUi.h:161: error: 'class QHBoxLayout' has no member named 
'setBottomMargin

'
ui/PrefUi.h:211: error: 'class QVBoxLayout' has no member named 
'setLeftMargin'
ui/PrefUi.h:212: error: 'class QVBoxLayout' has no member named 
'setTopMargin'
ui/PrefUi.h:213: error: 'class QVBoxLayout' has no member named 
'setRightMargin'
ui/PrefUi.h:214: error: 'class QVBoxLayout' has no member named 
'setBottomMargin

'
ui/PrefUi.h:223: error: 'class QHBoxLayout' has no member named 
'setLeftMargin'
ui/PrefUi.h:224: error: 'class QHBoxLayout' has no member named 
'setTopMargin'
ui/PrefUi.h:225: error: 'class QHBoxLayout' has no member named 
'setRightMargin'
ui/PrefUi.h:226: error: 'class QHBoxLayout' has no member named 
'setBottomMargin

'
ui/PrefUi.h:254: error: 'class QHBoxLayout' has no member named 
'setLeftMargin'
ui/PrefUi.h:255: error: 'class QHBoxLayout' has no member named 
'setTopMargin'
ui/PrefUi.h:256: error: 'class QHBoxLayout' has no member named 
'setRightMargin'
ui/PrefUi.h:257: error: 'class QHBoxLayout' has no member named 
'setBottomMargin

'
ui/PrefUi.h:281: error: 'class QVBoxLayout' has no member named 
'setLeftMargin'
ui/PrefUi.h:282: error: 'class QVBoxLayout' has no member named 
'setTopMargin'
ui/PrefUi.h:283: error: 'class QVBoxLayout' has no member named 
'setRightMargin'
ui/PrefUi.h:284: error: 'class QVBoxLayout' has no member named 
'setBottomMargin

'
make[7]: *** [Dialogs.lo] Error 1


Re: Compilation problems (trunk branch)

2007-11-03 Thread Dov Feldstern

Dov Feldstern wrote:

Hi!

I'm also having compilation trouble in both trunk and branch. I'm using 
Qt 4.2.1 (which is the version that debian etch offers as far as I can 
tell).


Sorry, trunk is OK (I hadn't updated); branch still problematic, though.



* branch:
 g++ -DHAVE_CONFIG_H -I. -I. -I../../../src -DQT_CLEAN_NAMESPACE 
-DQT_GENUINE_ST
R -DQT_NO_STL -DQT_NO_KEYWORDS -Winvalid-pch --include=./pch.h 
-I../../../src -I
../../../src/frontends -I../../../images -DQT_SHARED -I/usr/include/qt4 
-I/usr/i
nclude/qt4/QtCore -I/usr/include/qt4/QtGui -I../../../boost 
-I../../../src/front
ends/controllers -Wextra -Wall -g -O -MT Dialogs.lo -MD -MP -MF 
.deps/Dialogs.Tp

o -c Dialogs.cpp -o Dialogs.o
ui/PrefUi.h: In member function 'void Ui_QPrefUi::setupUi(QWidget*)':
ui/PrefUi.h:123: error: 'class QGridLayout' has no member named 
'setLeftMargin'
ui/PrefUi.h:124: error: 'class QGridLayout' has no member named 
'setTopMargin'
ui/PrefUi.h:125: error: 'class QGridLayout' has no member named 
'setRightMargin'
ui/PrefUi.h:126: error: 'class QGridLayout' has no member named 
'setBottomMargin

'
ui/PrefUi.h:127: error: 'class QGridLayout' has no member named 
'setHorizontalSp

acing'
ui/PrefUi.h:128: error: 'class QGridLayout' has no member named 
'setVerticalSpac

ing'
ui/PrefUi.h:158: error: 'class QHBoxLayout' has no member named 
'setLeftMargin'
ui/PrefUi.h:159: error: 'class QHBoxLayout' has no member named 
'setTopMargin'
ui/PrefUi.h:160: error: 'class QHBoxLayout' has no member named 
'setRightMargin'
ui/PrefUi.h:161: error: 'class QHBoxLayout' has no member named 
'setBottomMargin

'
ui/PrefUi.h:211: error: 'class QVBoxLayout' has no member named 
'setLeftMargin'
ui/PrefUi.h:212: error: 'class QVBoxLayout' has no member named 
'setTopMargin'
ui/PrefUi.h:213: error: 'class QVBoxLayout' has no member named 
'setRightMargin'
ui/PrefUi.h:214: error: 'class QVBoxLayout' has no member named 
'setBottomMargin

'
ui/PrefUi.h:223: error: 'class QHBoxLayout' has no member named 
'setLeftMargin'
ui/PrefUi.h:224: error: 'class QHBoxLayout' has no member named 
'setTopMargin'
ui/PrefUi.h:225: error: 'class QHBoxLayout' has no member named 
'setRightMargin'
ui/PrefUi.h:226: error: 'class QHBoxLayout' has no member named 
'setBottomMargin

'
ui/PrefUi.h:254: error: 'class QHBoxLayout' has no member named 
'setLeftMargin'
ui/PrefUi.h:255: error: 'class QHBoxLayout' has no member named 
'setTopMargin'
ui/PrefUi.h:256: error: 'class QHBoxLayout' has no member named 
'setRightMargin'
ui/PrefUi.h:257: error: 'class QHBoxLayout' has no member named 
'setBottomMargin

'
ui/PrefUi.h:281: error: 'class QVBoxLayout' has no member named 
'setLeftMargin'
ui/PrefUi.h:282: error: 'class QVBoxLayout' has no member named 
'setTopMargin'
ui/PrefUi.h:283: error: 'class QVBoxLayout' has no member named 
'setRightMargin'
ui/PrefUi.h:284: error: 'class QVBoxLayout' has no member named 
'setBottomMargin

'
make[7]: *** [Dialogs.lo] Error 1





Re: [patch] Putting ForceLTR to use

2007-11-03 Thread Dov Feldstern

Andre Poenitz wrote:

On Thu, Nov 01, 2007 at 10:58:29PM +0200, Dov Feldstern wrote:

Richard Heck wrote:

Probably should be asInsetCollapsable().
Hmm, yes. I tried to conform to the example of asTextInset, but I now 
notice that asInsetMath goes the other way... Should I change asTextInset 
- asInsetText, as well?


Yes, please.

Andre'



Done (http://www.lyx.org/trac/changeset/21406)


Re: Integration of my dynmacro patch

2007-11-03 Thread Uwe Stöhr

Stefan Schimanski schrieb:


Works fine for me here. Can you send me a backtrace of the crash?


Nein, ich kann leider keine Backtraces erzeugen - Win XPx64 und MSVC2005 wollen 
da nicht miteinander.

Gruß Uwe


Re: [patch] pixmap cache goes rc

2007-11-03 Thread Bennett Helm

On Nov 2, 2007, at 7:15 AM, Jürgen Spitzmüller wrote:


Abdelrazak Younes wrote:

And I confirm that it works fine.


Good. I applied the thing to branch. Will do trunk later.


I just updated and recompiled branch, and found the preference  
setting, but I don't notice any difference whether it's checked or  
not. (I even took screen shots and zoomed in to take a closer look.)


With cache enabled:inline: ZZ3843B5FA.jpg

With cache disabled:inline: ZZ021A648E.jpg

(In switching, I quit and restarted LyX each time, not knowing  
whether that would make a difference or not.)


Am I just blind?

Bennett


Re: Compilation problems (trunk branch)

2007-11-03 Thread Kornel Benko
Am Samstag 03 November 2007 schrieb Dov Feldstern:
 Dov Feldstern wrote:
  Hi!
 
  I'm also having compilation trouble in both trunk and branch. I'm using
  Qt 4.2.1 (which is the version that debian etch offers as far as I can
  tell).

 Sorry, trunk is OK (I hadn't updated); branch still problematic, though.

Same here. Qt 4.2.3, kubuntu.

Kornel

-- 
Kornel Benko
[EMAIL PROTECTED]


pgpo7sIE3s8Yz.pgp
Description: PGP signature


Re: Integration of my dynmacro patch

2007-11-03 Thread Stefan Schimanski


Am 03.11.2007 um 20:57 schrieb Uwe Stöhr:


Stefan Schimanski schrieb:


Works fine for me here. Can you send me a backtrace of the crash?


Nein, ich kann leider keine Backtraces erzeugen - Win XPx64 und  
MSVC2005 wollen da nicht miteinander.


Ach ja, ich erinnere mich. Du kompilierst mit Visual Studio? Wiese  
funktionieren da die Debug-Funktionen nicht mit 64 Bit? Fand den  
Debugger von MS immer recht brauchbar.


Stefan

Re: Integration of my dynmacro patch

2007-11-03 Thread Stefan Schimanski


Am 03.11.2007 um 23:10 schrieb Stefan Schimanski:



Am 03.11.2007 um 20:57 schrieb Uwe Stöhr:


Stefan Schimanski schrieb:


Works fine for me here. Can you send me a backtrace of the crash?


Nein, ich kann leider keine Backtraces erzeugen - Win XPx64 und  
MSVC2005 wollen da nicht miteinander.


Ach ja, ich erinnere mich. Du kompilierst mit Visual Studio? Wiese  
funktionieren da die Debug-Funktionen nicht mit 64 Bit? Fand den  
Debugger von MS immer recht brauchbar.


Oops, next time in English again.

Stefan

Re: Compilation problems (trunk branch)

2007-11-03 Thread Abdelrazak Younes

Kornel Benko wrote:

Am Samstag 03 November 2007 schrieb Dov Feldstern:

Dov Feldstern wrote:

Hi!

I'm also having compilation trouble in both trunk and branch. I'm using
Qt 4.2.1 (which is the version that debian etch offers as far as I can
tell).

Sorry, trunk is OK (I hadn't updated); branch still problematic, though.


Same here. Qt 4.2.3, kubuntu.


Please try again with latest rev.

Abdel.

PS: Sorry Juergen I didn't wait but this is an urgency.



Re: What is the purpose of InsetFlexParams?

2007-11-03 Thread Abdelrazak Younes

Martin Vermeer wrote:

On Sat, Nov 03, 2007 at 10:39:44AM +0100, Abdelrazak Younes wrote:

Is this going to be extended? If not I think it should be erased.

Abdel.


Hmmm, do we want to be able to rename a flex inset to one of another
type, through a dialogue? Branch and Note have this.


OK, if that is the only reason, it can go. I am no fan of these 
serialized params passing.




The dialogue is lacking and I don't think I'm going to write it. So if
everything still works after deleting it, let it go :-)


It will go :-)

Abdel.



Re: [Cvslog] r21400 - in /lyx-devel/trunk/src: CutAndPaste.cpp insets/...

2007-11-03 Thread Abdelrazak Younes

Martin Vermeer wrote:

On Sat, Nov 03, 2007 at 09:03:09AM +, [EMAIL PROTECTED] wrote:

Author: younes
Date: Sat Nov  3 10:03:08 2007
New Revision: 21400

URL: http://www.lyx.org/trac/changeset/21400
Log:
Transfer some code from InsetFlex to InsetCollapsable. Add some safeguards and 
FIXMEs.

Modified:
lyx-devel/trunk/src/CutAndPaste.cpp
lyx-devel/trunk/src/insets/InsetCollapsable.cpp
lyx-devel/trunk/src/insets/InsetCollapsable.h
lyx-devel/trunk/src/insets/InsetFlex.cpp
lyx-devel/trunk/src/insets/InsetFlex.h
lyx-devel/trunk/src/tex2lyx/Font.h


... 
  

+   setLayout(buf.params());
+
if (!token_found)
status_ = isOpen() ? Open : Collapsed;
-
-   setLayout(buf.params());


Is there a reason for this swap?


Yes, isOpen() uses layout_ (and it was using an uninitialized layout_ 
previously).




...
  
 
 InsetCollapsable::Decoration InsetCollapsable::decoration() const

 {
-   if (layout_-decoration == classic)
+   if (!layout_ || layout_-decoration == classic)
return Classic;
if (layout_-decoration == minimalistic)
return Minimalistic;
if (layout_-decoration == conglomerate)
return Conglomerate;
-   if (name() == from_ascii(Flex))
+   if (lyxCode() == FLEX_CODE)


Why is this better?


Not better but name() is not Flex anymore but the layout name.




+   // FIXME: Is this really necessary?
return Conglomerate;


Not if you put Decoration Conglomerate in all the charstyle entries in
the layout files. 


OK.



...


 int InsetCollapsable::latex(Buffer const  buf, odocstream  os,
  OutputParams const  runparams) const
 {
+   // FIXME: What should we do layout_ is 0?
+   // 1) assert
+   // 2) through an error

  throw


+   if (!layout_)
+   return 0;
+


Suspenders and a belt... should not happen with a well set up layout
file environment (see files stdcharstyles.inc and stdcustom.inc) but
doesn't harm. I would just assert, and describe the fix in a comment
at the assert location.


OK.

Thanks,
Abdel.



Re: [patch] pixmap cache goes rc

2007-11-03 Thread Abdelrazak Younes

Bennett Helm wrote:

On Nov 2, 2007, at 7:15 AM, Jürgen Spitzmüller wrote:


Abdelrazak Younes wrote:

And I confirm that it works fine.


Good. I applied the thing to branch. Will do trunk later.


I just updated and recompiled branch, and found the preference setting, 
but I don't notice any difference whether it's checked or not. (I even 
took screen shots and zoomed in to take a closer look.)


With cache enabled:




With cache disabled:





And compared to 1.5.2, is it better?



(In switching, I quit and restarted LyX each time, not knowing whether 
that would make a difference or not.)


Am I just blind?


I never was able to see the difference anyway. I guess it depends on the 
font used too.


Abdel.



Finishing up the LTR bias removal

2007-11-03 Thread Dov Feldstern

Hi!

Attached find the final patch (at least for now) which gets rid of LTR 
bias in the code. I will commit in the next few days if there are no 
objections.


The only non-trivial change (i.e., more than just changing function 
names) is that I merged idxLeft into idxPrev, and idxRight into idxNext. 
Does this seem OK?


Other than that, just make sure the names I chose are OK.

As this entire series, behavior should remain unchanged by this patch.

Thanks!
Dov

diff -r 7537ce89f78b src/BufferView.cpp
--- a/src/BufferView.cppSat Nov 03 19:12:52 2007 +0100
+++ b/src/BufferView.cppSun Nov 04 00:48:34 2007 +0200
@@ -1320,7 +1320,7 @@ Update::flags BufferView::dispatch(FuncR
if (inset) {
if (inset-isActive()) {
Cursor tmpcur = cur;
-   tmpcur.pushLeft(*inset);
+   tmpcur.pushBackward(*inset);
inset-dispatch(tmpcur, tmpcmd);
if (tmpcur.result().dispatched()) {
cur.dispatched();
diff -r 7537ce89f78b src/Cursor.cpp
--- a/src/Cursor.cppSat Nov 03 19:12:52 2007 +0100
+++ b/src/Cursor.cppSun Nov 04 00:48:34 2007 +0200
@@ -370,19 +370,19 @@ void Cursor::push(Inset  p)
 }
 
 
-void Cursor::pushLeft(Inset  p)
+void Cursor::pushBackward(Inset  p)
 {
BOOST_ASSERT(!empty());
-   //lyxerr  Entering inset   t   left  endl;
+   //lyxerr  Entering inset   t   front  endl;
push(p);
p.idxFirst(*this);
 }
 
 
-bool Cursor::popLeft()
+bool Cursor::popBackward()
 {
BOOST_ASSERT(!empty());
-   //lyxerr  Leaving inset to the left  endl;
+   //lyxerr  Leaving inset from in back  endl;
inset().notifyCursorLeaves(*this);
if (depth() == 1)
return false;
@@ -391,10 +391,10 @@ bool Cursor::popLeft()
 }
 
 
-bool Cursor::popRight()
+bool Cursor::popForward()
 {
BOOST_ASSERT(!empty());
-   //lyxerr  Leaving inset to the right  endl;
+   //lyxerr  Leaving inset from in front  endl;
const pos_type lp = (depth()  1) ? (*this)[depth() - 2].lastpos() : 0;
inset().notifyCursorLeaves(*this);
if (depth() == 1)
@@ -440,7 +440,7 @@ void Cursor::resetAnchor()
 
 
 
-bool Cursor::posLeft()
+bool Cursor::posBackward()
 {
if (pos() == 0)
return false;
@@ -449,7 +449,7 @@ bool Cursor::posLeft()
 }
 
 
-bool Cursor::posRight()
+bool Cursor::posForward()
 {
if (pos() == lastpos())
return false;
@@ -772,10 +772,10 @@ void Cursor::niceInsert(MathAtom const 
plainInsert(t);
// enter the new inset and move the contents of the selection if 
possible
if (t-isActive()) {
-   posLeft();
-   // be careful here: don't use 'pushLeft(t)' as this we need to
+   posBackward();
+   // be careful here: don't use 'pushBackward(t)' as this we need 
to
// push the clone, not the original
-   pushLeft(*nextInset());
+   pushBackward(*nextInset());
// We may not use niceInsert here (recursion)
MathData ar;
asArray(safe, ar);
@@ -806,7 +806,7 @@ bool Cursor::backspace()
if (pos() == 0) {
// If empty cell, and not part of a big cell
if (lastpos() == 0  inset().nargs() == 1) {
-   popLeft();
+   popBackward();
// Directly delete empty cell: [|[]] = [|]
if (inMathed()) {
plainErase();
@@ -819,7 +819,7 @@ bool Cursor::backspace()
if (inMathed())
pullArg();
else
-   popLeft();
+   popBackward();
return true;
}
}
@@ -865,7 +865,7 @@ bool Cursor::erase()
if (pos() == lastpos()) {
bool one_cell = inset().nargs() == 1;
if (one_cell  lastpos() == 0) {
-   popLeft();
+   popBackward();
// Directly delete empty cell: [|[]] = [|]
if (inMathed()) {
plainErase();
@@ -967,8 +967,8 @@ void Cursor::handleNest(MathAtom const 
MathAtom t = a;
asArray(cap::grabAndEraseSelection(*this), t.nucleus()-cell(c));
insert(t);
-   posLeft();
-   pushLeft(*nextInset());
+   posBackward();
+   pushBackward(*nextInset());
 }
 
 
@@ -1019,7 +1019,7 @@ void Cursor::pullArg()
 {
// FIXME: Look here
MathData ar = cell();
-   if (popLeft()  inMathed()) {
+   if (popBackward()  inMathed()) {
plainErase();
cell().insert(pos(), ar);

Re: Compilation problems (trunk branch)

2007-11-03 Thread Dov Feldstern

Abdelrazak Younes wrote:

Kornel Benko wrote:

Am Samstag 03 November 2007 schrieb Dov Feldstern:

Dov Feldstern wrote:

Hi!

I'm also having compilation trouble in both trunk and branch. I'm using
Qt 4.2.1 (which is the version that debian etch offers as far as I can
tell).

Sorry, trunk is OK (I hadn't updated); branch still problematic, though.


Same here. Qt 4.2.3, kubuntu.


Please try again with latest rev.



Works for me, thanks Abdel!


Abdel.

PS: Sorry Juergen I didn't wait but this is an urgency.






Re: [patch] pixmap cache goes rc

2007-11-03 Thread Uwe Stöhr

Uwe Stöhr schrieb:

I need to describe this in the docs. What exactly does the pixmap? 


Is this description correct?:

B.1.1.6 Pixmap Cache

The option Enable Pixmap Cache activates a cache for screen fonts and icons like toolbar buttons. 
Using this cache improves the speed performance of LyX but might decrease the quality of the screen 
fonts.


regards Uwe



Re: Support request for Japanese without CJK

2007-11-03 Thread Uwe Stöhr

Koji Yokota schrieb:

Sorry for being late. Please apply the attached patch to add description 
in LaTeXConfig.lyx.


This file was broken. It seems you have copied the text manually with and editor into the section 
about kluwer.


The CTAN paths you gave in your don't exist - I can't find a path
http://www.ctan.org/tex-archive/language/japanese/ptex-texmf/
and
http://www.ctan.org/tex-archive/language/japanese/jsclasses/

I therefore set it to unknown. What are the right paths?

I committed this version:
http://www.lyx.org/trac/changeset/21415

regards Uwe


Re: Compilation problems (trunk branch)

2007-11-03 Thread Kornel Benko
Am Sonntag 04 November 2007 schrieb Dov Feldstern:
 Works for me, thanks Abdel!

Here too. Thanx Abdel :)

  Abdel.
 
  PS: Sorry Juergen I didn't wait but this is an urgency.

!!

Kornel

-- 
Kornel Benko
[EMAIL PROTECTED]


pgpsmKgeJPvzd.pgp
Description: PGP signature


Re: 1.5 branch won't compile

2007-11-03 Thread Darren Freeman
On Sat, 2007-11-03 at 10:17 +0100, Abdelrazak Younes wrote:
 Darren Freeman wrote:
  On Sat, 2007-11-03 at 19:27 +1100, Darren Freeman wrote:
  Today's revision that failed is r21399. I went backward to find the most
  recent revision which compiles, which is r21356. The change which broke
  it is therefore r21357.
  
  Sorry, I'm off-by-one. The version which compiles is r21357 and the
  break occurred at r21358.
 
 Are you sure it's not 21368?

Sorry off-by-10 :) Must have been having a bout of dyslexia...

 If yes, then looks like you used Qt 4.3 Juergen...

I'm using 4.2.1 (stock RPM from OpenSUSE).

Have fun,
Darren



Re: Support request for Japanese without CJK

2007-11-03 Thread Koji Yokota
Uwe Stöhr wrote:
 This file was broken. It seems you have copied the text manually with
 and editor into the section about kluwer.

Oops, sorry about that.

 The CTAN paths you gave in your don't exist - I can't find a path
 http://www.ctan.org/tex-archive/language/japanese/ptex-texmf/
 and
 http://www.ctan.org/tex-archive/language/japanese/jsclasses/
 
 I therefore set it to unknown. What are the right paths?

As I'm arranging with CTAN to include additional documentations, they
are currently suspended. They will be uploaded soon (in a several days,
I hope). So, please keep them as unknown for the moment.

 I committed this version:
 http://www.lyx.org/trac/changeset/21415

Thank you,

Koji


Re: [Cvslog] r21394 - in /lyx-devel/trunk/src/insets: InsetListings.cp...

2007-11-03 Thread Martin Vermeer
On Fri, Nov 02, 2007 at 11:12:45PM +, [EMAIL PROTECTED] wrote:
> Author: younes
> Date: Sat Nov  3 00:12:43 2007
> New Revision: 21394
> 
> URL: http://www.lyx.org/trac/changeset/21394
> Log:
> Remremove unneeded init() method.
> 
> 
> Modified:
> lyx-devel/trunk/src/insets/InsetListings.cpp
> lyx-devel/trunk/src/insets/InsetListings.h
> 
> Modified: lyx-devel/trunk/src/insets/InsetListings.cpp
> URL: 
> http://www.lyx.org/trac/file/lyx-devel/trunk/src/insets/InsetListings.cpp?rev=21394
> ==
> --- lyx-devel/trunk/src/insets/InsetListings.cpp (original)
> +++ lyx-devel/trunk/src/insets/InsetListings.cpp Sat Nov  3 00:12:43 2007
> @@ -31,43 +31,28 @@
>  
>  #include 
>  
> -namespace lyx {
> -
> -using support::token;
> -using support::contains;
> -using support::subst;
> -
>  using std::istringstream;
>  using std::ostream;
>  using std::ostringstream;
>  using std::string;
>  
> +namespace lyx {
> +
> +using support::token;
> +using support::contains;
> +using support::subst;
> +
>  char const lstinline_delimiters[] =
>   
> "!*()-=+|;:'\"`,<.>/?QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm";
>  
> -void InsetListings::init()
> -{
> - setButtonLabel();
> - layout_.labelfont.setColor(Color_none);

Great. I see you did Box too.

- Martin



Re: [Cvslog] r21396 - in /lyx-devel/trunk/src: CutAndPaste.cpp TextCla...

2007-11-03 Thread Martin Vermeer
On Sat, Nov 03, 2007 at 12:35:08AM +, [EMAIL PROTECTED] wrote:
> Author: younes
> Date: Sat Nov  3 01:35:07 2007
> New Revision: 21396
> 
> URL: http://www.lyx.org/trac/changeset/21396
> Log:
> Further cleanup of InsetFlex, InsetCollapsable and InsetLayout:
> - Getting rid of some unneeded init() methods.
> - InsetCollapsable::layout_ is now a const pointer.
> 
> Modified:
> lyx-devel/trunk/src/CutAndPaste.cpp
> lyx-devel/trunk/src/TextClass.cpp
> lyx-devel/trunk/src/factory.cpp
> lyx-devel/trunk/src/insets/InsetBox.cpp
> lyx-devel/trunk/src/insets/InsetBranch.cpp
> lyx-devel/trunk/src/insets/InsetCollapsable.cpp
> lyx-devel/trunk/src/insets/InsetCollapsable.h
> lyx-devel/trunk/src/insets/InsetERT.cpp
> lyx-devel/trunk/src/insets/InsetERT.h
> lyx-devel/trunk/src/insets/InsetFlex.cpp
> lyx-devel/trunk/src/insets/InsetFlex.h
> lyx-devel/trunk/src/insets/InsetNote.cpp
> 
> Modified: lyx-devel/trunk/src/CutAndPaste.cpp
> URL: 
> http://www.lyx.org/trac/file/lyx-devel/trunk/src/CutAndPaste.cpp?rev=21396
> ==
> --- lyx-devel/trunk/src/CutAndPaste.cpp (original)
> +++ lyx-devel/trunk/src/CutAndPaste.cpp Sat Nov  3 01:35:07 2007
> @@ -448,7 +448,7 @@
>   InsetFlex & inset =
>   static_cast(*it);
>   string const name = inset.params().name;
> - InsetLayout const il = 
> + InsetLayout const & il = 
>   tclass2.insetlayout(from_utf8(name));
>   inset.setLayout(il);
>   if (il.labelstring == from_utf8("UNDEFINED")) {
> 
> Modified: lyx-devel/trunk/src/TextClass.cpp
> URL: http://www.lyx.org/trac/file/lyx-devel/trunk/src/TextClass.cpp?rev=21396
> ==
> --- lyx-devel/trunk/src/TextClass.cpp (original)
> +++ lyx-devel/trunk/src/TextClass.cpp Sat Nov  3 01:35:07 2007
> @@ -707,6 +707,9 @@
>   break;
>   case IL_LABELFONT:
>   labelfont = lyxRead(lexrc, inherit_font);
> + // The label font is generally used as-is without
> + // any realization against a given context.
> + labelfont.realize(sane_font);

Great. Did you also remember to change the labelfont
initialization (above) inherit_font -> sane_font? 
(i.e., fix my mistake's first part)?

- Martin


>   break;
>   case IL_FORCELTR:
>   lexrc.next();


Re: [Cvslog] r21398 - /lyx-devel/trunk/src/TextClass.cpp

2007-11-03 Thread Martin Vermeer
OK, thanks.

- Martin



Re: warnings

2007-11-03 Thread Jürgen Spitzmüller
Andre Poenitz wrote:
> ../../trunk/src/LyXFunc.cpp:2477: warning: enumeration value
> 'RC_DEFFILE' not handled in switch
> ../../trunk/src/LyXFunc.cpp:2477: warning: enumeration value
> 'RC_USE_PIXMAP_CACHE' not handled in switch

The latter is fixed. This is commented-out code btw.

Jürgen


Re: [Cvslog] r21375 - /lyx-devel/trunk/src/frontends/qt4/ui/PrefUi.ui

2007-11-03 Thread Jürgen Spitzmüller
Bo Peng wrote:
> I change from 4.3 format to 4.22 (which is supposedly the same as
> 4.1). I could not compile the trunk without this change.

Now I'm puzzled.

Jürgen


Re: Todays 1.6svn crash in various ways when opening existing documents

2007-11-03 Thread Jürgen Spitzmüller
Bo Peng wrote:
> During a fast-evolving period like this, with no public release in
> between, reversion of lyx2lyx is IMHO acceptable

I think we discussed this sufficiently now. It doesn't matter in which release 
perdiod we are. 

Jürgen


1.5 branch won't compile

2007-11-03 Thread Darren Freeman
Hi all,

you'll love this :) The 1.5 "stable" branch won't compile for me today.
See below for the relevant error.

Today's revision that failed is r21399. I went backward to find the most
recent revision which compiles, which is r21356. The change which broke
it is therefore r21357.

I'll now do a fresh build of the next revision just to be sure. If I
don't write back then assume it failed again.

Have fun,
Darren

8<8<8<8<8<

make[7]: Entering directory `/home/dfreeman/lyx-devel/src/frontends/qt4'
if /bin/sh ../../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H
-I. -I. -I../../../src  -DQT_CLEAN_NAMESPACE -DQT_GENUINE_STR
-DQT_NO_STL -DQT_NO_KEYWORDS -Winvalid-pch --include=./pch.h
-I../../../src -I../../../src/frontends -I../../../images -DQT_SHARED
-I/usr/include/QtCore -I/usr/include/QtGui   -I../../../boost
-I../../../src/frontends/controllers -Wextra -Wall -g -O -MT
Dialogs.lo -MD -MP -MF ".deps/Dialogs.Tpo" -c -o Dialogs.lo Dialogs.cpp;
\
then mv -f ".deps/Dialogs.Tpo" ".deps/Dialogs.Plo"; else rm -f
".deps/Dialogs.Tpo"; exit 1; fi
 g++ -DHAVE_CONFIG_H -I. -I. -I../../../src -DQT_CLEAN_NAMESPACE
-DQT_GENUINE_STR -DQT_NO_STL -DQT_NO_KEYWORDS -Winvalid-pch
--include=./pch.h -I../../../src -I../../../src/frontends
-I../../../images -DQT_SHARED -I/usr/include/QtCore -I/usr/include/QtGui
-I../../../boost -I../../../src/frontends/controllers -Wextra -Wall -g
-O -MT Dialogs.lo -MD -MP -MF .deps/Dialogs.Tpo -c Dialogs.cpp -o
Dialogs.o
ui/PrefUi.h: In member function 'void Ui_QPrefUi::setupUi(QWidget*)':
ui/PrefUi.h:123: error: 'class QGridLayout' has no member named
'setLeftMargin'
ui/PrefUi.h:124: error: 'class QGridLayout' has no member named
'setTopMargin'
ui/PrefUi.h:125: error: 'class QGridLayout' has no member named
'setRightMargin'
ui/PrefUi.h:126: error: 'class QGridLayout' has no member named
'setBottomMargin'
ui/PrefUi.h:127: error: 'class QGridLayout' has no member named
'setHorizontalSpacing'
ui/PrefUi.h:128: error: 'class QGridLayout' has no member named
'setVerticalSpacing'
ui/PrefUi.h:158: error: 'class QHBoxLayout' has no member named
'setLeftMargin'
ui/PrefUi.h:159: error: 'class QHBoxLayout' has no member named
'setTopMargin'
ui/PrefUi.h:160: error: 'class QHBoxLayout' has no member named
'setRightMargin'
ui/PrefUi.h:161: error: 'class QHBoxLayout' has no member named
'setBottomMargin'
ui/PrefUi.h:211: error: 'class QVBoxLayout' has no member named
'setLeftMargin'
ui/PrefUi.h:212: error: 'class QVBoxLayout' has no member named
'setTopMargin'
ui/PrefUi.h:213: error: 'class QVBoxLayout' has no member named
'setRightMargin'
ui/PrefUi.h:214: error: 'class QVBoxLayout' has no member named
'setBottomMargin'
ui/PrefUi.h:223: error: 'class QHBoxLayout' has no member named
'setLeftMargin'
ui/PrefUi.h:224: error: 'class QHBoxLayout' has no member named
'setTopMargin'
ui/PrefUi.h:225: error: 'class QHBoxLayout' has no member named
'setRightMargin'
ui/PrefUi.h:226: error: 'class QHBoxLayout' has no member named
'setBottomMargin'
ui/PrefUi.h:254: error: 'class QHBoxLayout' has no member named
'setLeftMargin'
ui/PrefUi.h:255: error: 'class QHBoxLayout' has no member named
'setTopMargin'
ui/PrefUi.h:256: error: 'class QHBoxLayout' has no member named
'setRightMargin'
ui/PrefUi.h:257: error: 'class QHBoxLayout' has no member named
'setBottomMargin'
ui/PrefUi.h:281: error: 'class QVBoxLayout' has no member named
'setLeftMargin'
ui/PrefUi.h:282: error: 'class QVBoxLayout' has no member named
'setTopMargin'
ui/PrefUi.h:283: error: 'class QVBoxLayout' has no member named
'setRightMargin'
ui/PrefUi.h:284: error: 'class QVBoxLayout' has no member named
'setBottomMargin'
make[7]: *** [Dialogs.lo] Error 1
make[7]: Leaving directory `/home/dfreeman/lyx-devel/src/frontends/qt4'
make[6]: *** [all-recursive] Error 1
make[6]: Leaving directory `/home/dfreeman/lyx-devel/src/frontends/qt4'
make[5]: *** [all] Error 2
make[5]: Leaving directory `/home/dfreeman/lyx-devel/src/frontends/qt4'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/dfreeman/lyx-devel/src/frontends'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/home/dfreeman/lyx-devel/src/frontends'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/dfreeman/lyx-devel/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/dfreeman/lyx-devel/src'
make: *** [all-recursive] Error 1



Re: 1.5 branch won't compile

2007-11-03 Thread Darren Freeman
On Sat, 2007-11-03 at 19:27 +1100, Darren Freeman wrote:
> Today's revision that failed is r21399. I went backward to find the most
> recent revision which compiles, which is r21356. The change which broke
> it is therefore r21357.

Sorry, I'm off-by-one. The version which compiles is r21357 and the
break occurred at r21358.

Have fun,
Darren



Re: [Cvslog] r21396 - in /lyx-devel/trunk/src: CutAndPaste.cpp TextCla...

2007-11-03 Thread Abdelrazak Younes

Martin Vermeer wrote:

Modified: lyx-devel/trunk/src/TextClass.cpp
URL: http://www.lyx.org/trac/file/lyx-devel/trunk/src/TextClass.cpp?rev=21396
==
--- lyx-devel/trunk/src/TextClass.cpp (original)
+++ lyx-devel/trunk/src/TextClass.cpp Sat Nov  3 01:35:07 2007
@@ -707,6 +707,9 @@
break;
case IL_LABELFONT:
labelfont = lyxRead(lexrc, inherit_font);
+   // The label font is generally used as-is without
+   // any realization against a given context.
+   labelfont.realize(sane_font);


Great. Did you also remember to change the labelfont
initialization (above) inherit_font -> sane_font? 
(i.e., fix my mistake's first part)?


No, as I think it is correct (but am not sure). We don't want to 
override the parsed settings, do we?


Abdel.



Re: 1.5 branch won't compile

2007-11-03 Thread Abdelrazak Younes

Darren Freeman wrote:

On Sat, 2007-11-03 at 19:27 +1100, Darren Freeman wrote:

Today's revision that failed is r21399. I went backward to find the most
recent revision which compiles, which is r21356. The change which broke
it is therefore r21357.


Sorry, I'm off-by-one. The version which compiles is r21357 and the
break occurred at r21358.


Are you sure it's not 21368?

If yes, then looks like you used Qt 4.3 Juergen...

Abdel.




Re: Todays 1.6svn crash in various ways when opening existing documents

2007-11-03 Thread Andre Poenitz
On Sat, Nov 03, 2007 at 01:12:24AM +0200, Martin Vermeer wrote:
> On Sat, Nov 03, 2007 at 12:00:42AM +0100, Abdelrazak Younes wrote:
> 
> ...
> 
> > >>  OK, I've done some cleanup an the crashes are gone but the inset 
> > >> layouts 
> > >> are  broken!
> > >>
> > >>  Martin, Richard, do you have an idea here? I don't know if we shall we 
> > >> fix  Inset::getLayout() or if we shall assume that each inset hard-code 
> > >> its own  layout.
> > >>
> > >>  Help please,
> > >>  Abdel.
> > > Abdel,
> > > this is precisely the way _not_ to do it. The calls to setLayout() in the 
> > > various insets are designed (by Jean-Marc during the Bromarv meeting) to 
> > > get precisely the right insetlayout based on the inset's name().
> > 
> >  Year I noticed that... calling virtual methods in ctors is dangerous and 
> >  should be avoided.
> 
> OK...

Well, it has a well-defined semantics (the incarnation of the currently
constructed part is called). It's not 'dangerous' but usually not too
helpful.

Andre'


What is the purpose of InsetFlexParams?

2007-11-03 Thread Abdelrazak Younes

Is this going to be extended? If not I think it should be erased.

Abdel.



Re: Todays 1.6svn crash in various ways when opening existing documents

2007-11-03 Thread Andre Poenitz
On Sat, Nov 03, 2007 at 12:29:39AM +0100, Uwe Stöhr wrote:
> > During a fast-evolving period like this, with no public release in
> > between, reversion of lyx2lyx is IMHO acceptable.
>
> But this introduces crashed: I can for example not open Stefan's macro 
> example file, see my just sent post on the list.

A solution for back-and-forward conversions in the final script would be
some 'obsoleted in format n' property. So lyx2lyx would skip parts
that are obsoleted if the target format has a higher version, yet in
between it will do the conversion, so all the time it will do the 'Right
Thing'. Jose'?

Andre'


Re: [Bug 4318] New: crash when pasting to formula

2007-11-03 Thread Andre Poenitz
On Sat, Nov 03, 2007 at 01:36:56AM +0100, [EMAIL PROTECTED] wrote:
> http://bugzilla.lyx.org/show_bug.cgi?id=4318
> 
>Summary: crash when pasting to formula
>Product: LyX
>Version: 1.5.2
>   Platform: Other
> OS/Version: other
> Status: UNCONFIRMED
>   Severity: critical
>   Priority: P2
>  Component: mathed
> AssignedTo: [EMAIL PROTECTED]
> ReportedBy: [EMAIL PROTECTED]
>  QAContact: [EMAIL PROTECTED]
> 
> 
> - open a formula
> - copy these two characters to the clipboard: \\
> - paste from the clipboard to the formula -> Crash:
> 
>   Line ~0: Math parse error: The input stream is not well...
>   Tokens:  pos: 1

We definitely should switch to a more user friendly error handling then
plain crashs. While it might be annoying that one cannot properly paste
form the clipboard we should not crash...

Andre'


Re: Todays 1.6svn crash in various ways when opening existing documents

2007-11-03 Thread Abdelrazak Younes

Andre Poenitz wrote:

On Sat, Nov 03, 2007 at 01:12:24AM +0200, Martin Vermeer wrote:

On Sat, Nov 03, 2007 at 12:00:42AM +0100, Abdelrazak Younes wrote:

...

 OK, I've done some cleanup an the crashes are gone but the inset layouts 
are  broken!


 Martin, Richard, do you have an idea here? I don't know if we shall we 
fix  Inset::getLayout() or if we shall assume that each inset hard-code 
its own  layout.


 Help please,
 Abdel.

Abdel,
this is precisely the way _not_ to do it. The calls to setLayout() in the 
various insets are designed (by Jean-Marc during the Bromarv meeting) to 
get precisely the right insetlayout based on the inset's name().
 Year I noticed that... calling virtual methods in ctors is dangerous and 
 should be avoided.

OK...


Well, it has a well-defined semantics (the incarnation of the currently
constructed part is called).


I know but I sometimes forgot that in the past.


It's not 'dangerous' but usually not too
helpful.


Well it was not really dangerous but when your code relies on the 
inheriting class calling a virtual method without enforcing it can 
result in crashes.


Abdel.



Compile error, iconv and const

2007-11-03 Thread Stefan Schimanski
/Users/sts/Quellen/mac/lyx-devel/src/support/unicode.cpp: In member  
function 'int lyx::IconvProcessor::convert(const char*, size_t, char*,  
size_t)':
/Users/sts/Quellen/mac/lyx-devel/src/support/unicode.cpp:138: error:  
invalid conversion from 'const char**' to 'char**'
/Users/sts/Quellen/mac/lyx-devel/src/support/unicode.cpp:138: error:
initializing argument 2 of 'size_t iconv(void*, char**, size_t*,  
char**, size_t*)'


I get this with Leopard's gcc 4.01. Fixed it by this patch:

Index: src/support/docstream.cpp
===
--- src/support/docstream.cpp   (revision 21402)
+++ src/support/docstream.cpp   (working copy)
@@ -240,7 +240,7 @@
size_t * inbytesleft, char ** to, size_t * 
outbytesleft) const
{
char const * const to_start = *to;
-   size_t converted = iconv(cd, const_cast(from),
+   size_t converted = iconv(cd, const_cast(from),
inbytesleft, to, outbytesleft);
if (converted == (size_t)(-1)) {
switch(errno) {
Index: src/support/unicode.cpp
===
--- src/support/unicode.cpp (revision 21402)
+++ src/support/unicode.cpp (working copy)
@@ -131,7 +131,7 @@
return -1;
}

-   char ICONV_CONST * inbuf = const_cast(buf);
+   char * inbuf = const_cast(buf);
size_t inbytesleft = buflen;
size_t outbytesleft = maxoutsize;

But I have no clue whether this is sensible in general.

Stefan


Re: Integration of my dynmacro patch

2007-11-03 Thread Stefan Schimanski


Am 03.11.2007 um 00:23 schrieb Uwe Stöhr:


Stefan Schimanski schrieb:


I have many test cases here: http://1stein.org/download/testcases.lyx


With this file LyX crashes. Could you send me a file that I can open  
with current trunk?


Works fine for me here. Can you send me a backtrace of the crash?

Stefan

Re: [Cvslog] r21396 - in /lyx-devel/trunk/src: CutAndPaste.cpp TextCla...

2007-11-03 Thread Martin Vermeer
On Sat, Nov 03, 2007 at 10:09:52AM +0100, Abdelrazak Younes wrote:
> Martin Vermeer wrote:
> >>Modified: lyx-devel/trunk/src/TextClass.cpp
> >>URL: 
> >>http://www.lyx.org/trac/file/lyx-devel/trunk/src/TextClass.cpp?rev=21396
> >>==
> >>--- lyx-devel/trunk/src/TextClass.cpp (original)
> >>+++ lyx-devel/trunk/src/TextClass.cpp Sat Nov  3 01:35:07 2007
> >>@@ -707,6 +707,9 @@
> >>break;
> >>case IL_LABELFONT:
> >>labelfont = lyxRead(lexrc, inherit_font);
> >>+   // The label font is generally used as-is without
> >>+   // any realization against a given context.
> >>+   labelfont.realize(sane_font);
> >
> >Great. Did you also remember to change the labelfont
> >initialization (above) inherit_font -> sane_font? 
> >(i.e., fix my mistake's first part)?
> 
> No, as I think it is correct (but am not sure). We don't want to 
> override the parsed settings, do we?

No... you did it differently but right IMO.

- Martin
 


Re: [Cvslog] r21400 - in /lyx-devel/trunk/src: CutAndPaste.cpp insets/...

2007-11-03 Thread Martin Vermeer
On Sat, Nov 03, 2007 at 09:03:09AM +, [EMAIL PROTECTED] wrote:
> Author: younes
> Date: Sat Nov  3 10:03:08 2007
> New Revision: 21400
> 
> URL: http://www.lyx.org/trac/changeset/21400
> Log:
> Transfer some code from InsetFlex to InsetCollapsable. Add some safeguards 
> and FIXMEs.
> 
> Modified:
> lyx-devel/trunk/src/CutAndPaste.cpp
> lyx-devel/trunk/src/insets/InsetCollapsable.cpp
> lyx-devel/trunk/src/insets/InsetCollapsable.h
> lyx-devel/trunk/src/insets/InsetFlex.cpp
> lyx-devel/trunk/src/insets/InsetFlex.h
> lyx-devel/trunk/src/tex2lyx/Font.h

... 
  
> + setLayout(buf.params());
> +
>   if (!token_found)
>   status_ = isOpen() ? Open : Collapsed;
> -
> - setLayout(buf.params());

Is there a reason for this swap?

...
  
>  
>  InsetCollapsable::Decoration InsetCollapsable::decoration() const
>  {
> - if (layout_->decoration == "classic")
> + if (!layout_ || layout_->decoration == "classic")
>   return Classic;
>   if (layout_->decoration == "minimalistic")
>   return Minimalistic;
>   if (layout_->decoration == "conglomerate")
>   return Conglomerate;
> - if (name() == from_ascii("Flex"))
> + if (lyxCode() == FLEX_CODE)

Why is this better?

> + // FIXME: Is this really necessary?
>   return Conglomerate;

Not if you put "Decoration Conglomerate" in all the charstyle entries in
the layout files. 

...

>  int InsetCollapsable::latex(Buffer const & buf, odocstream & os,
> OutputParams const & runparams) const
>  {
> + // FIXME: What should we do layout_ is 0?
> + // 1) assert
> + // 2) through an error
  throw

> + if (!layout_)
> + return 0;
> +

Suspenders and a belt... should not happen with a well set up layout
file environment (see files stdcharstyles.inc and stdcustom.inc) but
doesn't harm. I would just assert, and describe the fix in a comment
at the assert location.

...

- Martin



Re: What is the purpose of InsetFlexParams?

2007-11-03 Thread Martin Vermeer
On Sat, Nov 03, 2007 at 10:39:44AM +0100, Abdelrazak Younes wrote:
> Is this going to be extended? If not I think it should be erased.
> 
> Abdel.

Hmmm, do we want to be able to rename a flex inset to one of another
type, through a dialogue? Branch and Note have this.

The dialogue is lacking and I don't think I'm going to write it. So if
everything still works after deleting it, let it go :-)

- Martin
 


Compilation problems (trunk & branch)

2007-11-03 Thread Dov Feldstern

Hi!

I'm also having compilation trouble in both trunk and branch. I'm using 
Qt 4.2.1 (which is the version that debian etch offers as far as I can 
tell).


* trunk:

 g++ -DHAVE_CONFIG_H -I. -I. -I../../../src -DQT_CLEAN_NAMESPACE 
-DQT_GENUINE_ST
R -DQT_NO_STL -DQT_NO_KEYWORDS -I../../../src -I../../../src/frontends 
-I../../.
./images -DQT_SHARED -I/usr/include/qt4 -I/usr/include/qt4/QtCore 
-I/usr/include
/qt4/QtGui -I../../../boost -I../../../src/frontends/controllers -Wextra 
-Wall -
g -O -MT GuiHyperlink.lo -MD -MP -MF .deps/GuiHyperlink.Tpo -c 
GuiHyperlink.cpp

-o GuiHyperlink.o
ui_HyperlinkUi.h: In member function 'void 
Ui_HyperlinkUi::setupUi(QDialog*)':
ui_HyperlinkUi.h:102: error: 'class QHBoxLayout' has no member named 
'setLeftMar

gin'
ui_HyperlinkUi.h:103: error: 'class QHBoxLayout' has no member named 
'setTopMarg

in'
ui_HyperlinkUi.h:104: error: 'class QHBoxLayout' has no member named 
'setRightMa

rgin'
ui_HyperlinkUi.h:105: error: 'class QHBoxLayout' has no member named 
'setBottomM

argin'
make[6]: *** [GuiHyperlink.lo] Error 1

---
* branch:
 g++ -DHAVE_CONFIG_H -I. -I. -I../../../src -DQT_CLEAN_NAMESPACE 
-DQT_GENUINE_ST
R -DQT_NO_STL -DQT_NO_KEYWORDS -Winvalid-pch --include=./pch.h 
-I../../../src -I
../../../src/frontends -I../../../images -DQT_SHARED -I/usr/include/qt4 
-I/usr/i
nclude/qt4/QtCore -I/usr/include/qt4/QtGui -I../../../boost 
-I../../../src/front
ends/controllers -Wextra -Wall -g -O -MT Dialogs.lo -MD -MP -MF 
.deps/Dialogs.Tp

o -c Dialogs.cpp -o Dialogs.o
ui/PrefUi.h: In member function 'void Ui_QPrefUi::setupUi(QWidget*)':
ui/PrefUi.h:123: error: 'class QGridLayout' has no member named 
'setLeftMargin'
ui/PrefUi.h:124: error: 'class QGridLayout' has no member named 
'setTopMargin'
ui/PrefUi.h:125: error: 'class QGridLayout' has no member named 
'setRightMargin'
ui/PrefUi.h:126: error: 'class QGridLayout' has no member named 
'setBottomMargin

'
ui/PrefUi.h:127: error: 'class QGridLayout' has no member named 
'setHorizontalSp

acing'
ui/PrefUi.h:128: error: 'class QGridLayout' has no member named 
'setVerticalSpac

ing'
ui/PrefUi.h:158: error: 'class QHBoxLayout' has no member named 
'setLeftMargin'
ui/PrefUi.h:159: error: 'class QHBoxLayout' has no member named 
'setTopMargin'
ui/PrefUi.h:160: error: 'class QHBoxLayout' has no member named 
'setRightMargin'
ui/PrefUi.h:161: error: 'class QHBoxLayout' has no member named 
'setBottomMargin

'
ui/PrefUi.h:211: error: 'class QVBoxLayout' has no member named 
'setLeftMargin'
ui/PrefUi.h:212: error: 'class QVBoxLayout' has no member named 
'setTopMargin'
ui/PrefUi.h:213: error: 'class QVBoxLayout' has no member named 
'setRightMargin'
ui/PrefUi.h:214: error: 'class QVBoxLayout' has no member named 
'setBottomMargin

'
ui/PrefUi.h:223: error: 'class QHBoxLayout' has no member named 
'setLeftMargin'
ui/PrefUi.h:224: error: 'class QHBoxLayout' has no member named 
'setTopMargin'
ui/PrefUi.h:225: error: 'class QHBoxLayout' has no member named 
'setRightMargin'
ui/PrefUi.h:226: error: 'class QHBoxLayout' has no member named 
'setBottomMargin

'
ui/PrefUi.h:254: error: 'class QHBoxLayout' has no member named 
'setLeftMargin'
ui/PrefUi.h:255: error: 'class QHBoxLayout' has no member named 
'setTopMargin'
ui/PrefUi.h:256: error: 'class QHBoxLayout' has no member named 
'setRightMargin'
ui/PrefUi.h:257: error: 'class QHBoxLayout' has no member named 
'setBottomMargin

'
ui/PrefUi.h:281: error: 'class QVBoxLayout' has no member named 
'setLeftMargin'
ui/PrefUi.h:282: error: 'class QVBoxLayout' has no member named 
'setTopMargin'
ui/PrefUi.h:283: error: 'class QVBoxLayout' has no member named 
'setRightMargin'
ui/PrefUi.h:284: error: 'class QVBoxLayout' has no member named 
'setBottomMargin

'
make[7]: *** [Dialogs.lo] Error 1


Re: Compilation problems (trunk & branch)

2007-11-03 Thread Dov Feldstern

Dov Feldstern wrote:

Hi!

I'm also having compilation trouble in both trunk and branch. I'm using 
Qt 4.2.1 (which is the version that debian etch offers as far as I can 
tell).


Sorry, trunk is OK (I hadn't updated); branch still problematic, though.



* branch:
 g++ -DHAVE_CONFIG_H -I. -I. -I../../../src -DQT_CLEAN_NAMESPACE 
-DQT_GENUINE_ST
R -DQT_NO_STL -DQT_NO_KEYWORDS -Winvalid-pch --include=./pch.h 
-I../../../src -I
../../../src/frontends -I../../../images -DQT_SHARED -I/usr/include/qt4 
-I/usr/i
nclude/qt4/QtCore -I/usr/include/qt4/QtGui -I../../../boost 
-I../../../src/front
ends/controllers -Wextra -Wall -g -O -MT Dialogs.lo -MD -MP -MF 
.deps/Dialogs.Tp

o -c Dialogs.cpp -o Dialogs.o
ui/PrefUi.h: In member function 'void Ui_QPrefUi::setupUi(QWidget*)':
ui/PrefUi.h:123: error: 'class QGridLayout' has no member named 
'setLeftMargin'
ui/PrefUi.h:124: error: 'class QGridLayout' has no member named 
'setTopMargin'
ui/PrefUi.h:125: error: 'class QGridLayout' has no member named 
'setRightMargin'
ui/PrefUi.h:126: error: 'class QGridLayout' has no member named 
'setBottomMargin

'
ui/PrefUi.h:127: error: 'class QGridLayout' has no member named 
'setHorizontalSp

acing'
ui/PrefUi.h:128: error: 'class QGridLayout' has no member named 
'setVerticalSpac

ing'
ui/PrefUi.h:158: error: 'class QHBoxLayout' has no member named 
'setLeftMargin'
ui/PrefUi.h:159: error: 'class QHBoxLayout' has no member named 
'setTopMargin'
ui/PrefUi.h:160: error: 'class QHBoxLayout' has no member named 
'setRightMargin'
ui/PrefUi.h:161: error: 'class QHBoxLayout' has no member named 
'setBottomMargin

'
ui/PrefUi.h:211: error: 'class QVBoxLayout' has no member named 
'setLeftMargin'
ui/PrefUi.h:212: error: 'class QVBoxLayout' has no member named 
'setTopMargin'
ui/PrefUi.h:213: error: 'class QVBoxLayout' has no member named 
'setRightMargin'
ui/PrefUi.h:214: error: 'class QVBoxLayout' has no member named 
'setBottomMargin

'
ui/PrefUi.h:223: error: 'class QHBoxLayout' has no member named 
'setLeftMargin'
ui/PrefUi.h:224: error: 'class QHBoxLayout' has no member named 
'setTopMargin'
ui/PrefUi.h:225: error: 'class QHBoxLayout' has no member named 
'setRightMargin'
ui/PrefUi.h:226: error: 'class QHBoxLayout' has no member named 
'setBottomMargin

'
ui/PrefUi.h:254: error: 'class QHBoxLayout' has no member named 
'setLeftMargin'
ui/PrefUi.h:255: error: 'class QHBoxLayout' has no member named 
'setTopMargin'
ui/PrefUi.h:256: error: 'class QHBoxLayout' has no member named 
'setRightMargin'
ui/PrefUi.h:257: error: 'class QHBoxLayout' has no member named 
'setBottomMargin

'
ui/PrefUi.h:281: error: 'class QVBoxLayout' has no member named 
'setLeftMargin'
ui/PrefUi.h:282: error: 'class QVBoxLayout' has no member named 
'setTopMargin'
ui/PrefUi.h:283: error: 'class QVBoxLayout' has no member named 
'setRightMargin'
ui/PrefUi.h:284: error: 'class QVBoxLayout' has no member named 
'setBottomMargin

'
make[7]: *** [Dialogs.lo] Error 1





Re: [patch] Putting ForceLTR to use

2007-11-03 Thread Dov Feldstern

Andre Poenitz wrote:

On Thu, Nov 01, 2007 at 10:58:29PM +0200, Dov Feldstern wrote:

Richard Heck wrote:

Probably should be asInsetCollapsable().
Hmm, yes. I tried to conform to the example of asTextInset, but I now 
notice that asInsetMath goes the other way... Should I change asTextInset 
-> asInsetText, as well?


Yes, please.

Andre'



Done (http://www.lyx.org/trac/changeset/21406)


Re: Integration of my dynmacro patch

2007-11-03 Thread Uwe Stöhr

Stefan Schimanski schrieb:


Works fine for me here. Can you send me a backtrace of the crash?


Nein, ich kann leider keine Backtraces erzeugen - Win XPx64 und MSVC2005 wollen 
da nicht miteinander.

Gruß Uwe


Re: [patch] pixmap cache goes rc

2007-11-03 Thread Bennett Helm

On Nov 2, 2007, at 7:15 AM, Jürgen Spitzmüller wrote:


Abdelrazak Younes wrote:

And I confirm that it works fine.


Good. I applied the thing to branch. Will do trunk later.


I just updated and recompiled branch, and found the preference  
setting, but I don't notice any difference whether it's checked or  
not. (I even took screen shots and zoomed in to take a closer look.)


With cache enabled:<>

With cache disabled:<>

(In switching, I quit and restarted LyX each time, not knowing  
whether that would make a difference or not.)


Am I just blind?

Bennett


Re: Compilation problems (trunk & branch)

2007-11-03 Thread Kornel Benko
Am Samstag 03 November 2007 schrieb Dov Feldstern:
> Dov Feldstern wrote:
> > Hi!
> >
> > I'm also having compilation trouble in both trunk and branch. I'm using
> > Qt 4.2.1 (which is the version that debian etch offers as far as I can
> > tell).
>
> Sorry, trunk is OK (I hadn't updated); branch still problematic, though.

Same here. Qt 4.2.3, kubuntu.

Kornel

-- 
Kornel Benko
[EMAIL PROTECTED]


pgpo7sIE3s8Yz.pgp
Description: PGP signature


Re: Integration of my dynmacro patch

2007-11-03 Thread Stefan Schimanski


Am 03.11.2007 um 20:57 schrieb Uwe Stöhr:


Stefan Schimanski schrieb:


Works fine for me here. Can you send me a backtrace of the crash?


Nein, ich kann leider keine Backtraces erzeugen - Win XPx64 und  
MSVC2005 wollen da nicht miteinander.


Ach ja, ich erinnere mich. Du kompilierst mit Visual Studio? Wiese  
funktionieren da die Debug-Funktionen nicht mit 64 Bit? Fand den  
Debugger von MS immer recht brauchbar.


Stefan

Re: Integration of my dynmacro patch

2007-11-03 Thread Stefan Schimanski


Am 03.11.2007 um 23:10 schrieb Stefan Schimanski:



Am 03.11.2007 um 20:57 schrieb Uwe Stöhr:


Stefan Schimanski schrieb:


Works fine for me here. Can you send me a backtrace of the crash?


Nein, ich kann leider keine Backtraces erzeugen - Win XPx64 und  
MSVC2005 wollen da nicht miteinander.


Ach ja, ich erinnere mich. Du kompilierst mit Visual Studio? Wiese  
funktionieren da die Debug-Funktionen nicht mit 64 Bit? Fand den  
Debugger von MS immer recht brauchbar.


Oops, next time in English again.

Stefan

Re: Compilation problems (trunk & branch)

2007-11-03 Thread Abdelrazak Younes

Kornel Benko wrote:

Am Samstag 03 November 2007 schrieb Dov Feldstern:

Dov Feldstern wrote:

Hi!

I'm also having compilation trouble in both trunk and branch. I'm using
Qt 4.2.1 (which is the version that debian etch offers as far as I can
tell).

Sorry, trunk is OK (I hadn't updated); branch still problematic, though.


Same here. Qt 4.2.3, kubuntu.


Please try again with latest rev.

Abdel.

PS: Sorry Juergen I didn't wait but this is an urgency.



Re: What is the purpose of InsetFlexParams?

2007-11-03 Thread Abdelrazak Younes

Martin Vermeer wrote:

On Sat, Nov 03, 2007 at 10:39:44AM +0100, Abdelrazak Younes wrote:

Is this going to be extended? If not I think it should be erased.

Abdel.


Hmmm, do we want to be able to rename a flex inset to one of another
type, through a dialogue? Branch and Note have this.


OK, if that is the only reason, it can go. I am no fan of these 
serialized params passing.




The dialogue is lacking and I don't think I'm going to write it. So if
everything still works after deleting it, let it go :-)


It will go :-)

Abdel.



Re: [Cvslog] r21400 - in /lyx-devel/trunk/src: CutAndPaste.cpp insets/...

2007-11-03 Thread Abdelrazak Younes

Martin Vermeer wrote:

On Sat, Nov 03, 2007 at 09:03:09AM +, [EMAIL PROTECTED] wrote:

Author: younes
Date: Sat Nov  3 10:03:08 2007
New Revision: 21400

URL: http://www.lyx.org/trac/changeset/21400
Log:
Transfer some code from InsetFlex to InsetCollapsable. Add some safeguards and 
FIXMEs.

Modified:
lyx-devel/trunk/src/CutAndPaste.cpp
lyx-devel/trunk/src/insets/InsetCollapsable.cpp
lyx-devel/trunk/src/insets/InsetCollapsable.h
lyx-devel/trunk/src/insets/InsetFlex.cpp
lyx-devel/trunk/src/insets/InsetFlex.h
lyx-devel/trunk/src/tex2lyx/Font.h


... 
  

+   setLayout(buf.params());
+
if (!token_found)
status_ = isOpen() ? Open : Collapsed;
-
-   setLayout(buf.params());


Is there a reason for this swap?


Yes, isOpen() uses layout_ (and it was using an uninitialized layout_ 
previously).




...
  
 
 InsetCollapsable::Decoration InsetCollapsable::decoration() const

 {
-   if (layout_->decoration == "classic")
+   if (!layout_ || layout_->decoration == "classic")
return Classic;
if (layout_->decoration == "minimalistic")
return Minimalistic;
if (layout_->decoration == "conglomerate")
return Conglomerate;
-   if (name() == from_ascii("Flex"))
+   if (lyxCode() == FLEX_CODE)


Why is this better?


Not better but name() is not "Flex" anymore but the layout name.




+   // FIXME: Is this really necessary?
return Conglomerate;


Not if you put "Decoration Conglomerate" in all the charstyle entries in
the layout files. 


OK.



...


 int InsetCollapsable::latex(Buffer const & buf, odocstream & os,
  OutputParams const & runparams) const
 {
+   // FIXME: What should we do layout_ is 0?
+   // 1) assert
+   // 2) through an error

  throw


+   if (!layout_)
+   return 0;
+


Suspenders and a belt... should not happen with a well set up layout
file environment (see files stdcharstyles.inc and stdcustom.inc) but
doesn't harm. I would just assert, and describe the fix in a comment
at the assert location.


OK.

Thanks,
Abdel.



Re: [patch] pixmap cache goes rc

2007-11-03 Thread Abdelrazak Younes

Bennett Helm wrote:

On Nov 2, 2007, at 7:15 AM, Jürgen Spitzmüller wrote:


Abdelrazak Younes wrote:

And I confirm that it works fine.


Good. I applied the thing to branch. Will do trunk later.


I just updated and recompiled branch, and found the preference setting, 
but I don't notice any difference whether it's checked or not. (I even 
took screen shots and zoomed in to take a closer look.)


With cache enabled:




With cache disabled:





And compared to 1.5.2, is it better?



(In switching, I quit and restarted LyX each time, not knowing whether 
that would make a difference or not.)


Am I just blind?


I never was able to see the difference anyway. I guess it depends on the 
font used too.


Abdel.



Finishing up the LTR bias removal

2007-11-03 Thread Dov Feldstern

Hi!

Attached find the final patch (at least for now) which gets rid of LTR 
bias in the code. I will commit in the next few days if there are no 
objections.


The only non-trivial change (i.e., more than just changing function 
names) is that I merged idxLeft into idxPrev, and idxRight into idxNext. 
Does this seem OK?


Other than that, just make sure the names I chose are OK.

As this entire series, behavior should remain unchanged by this patch.

Thanks!
Dov

diff -r 7537ce89f78b src/BufferView.cpp
--- a/src/BufferView.cppSat Nov 03 19:12:52 2007 +0100
+++ b/src/BufferView.cppSun Nov 04 00:48:34 2007 +0200
@@ -1320,7 +1320,7 @@ Update::flags BufferView::dispatch(FuncR
if (inset) {
if (inset->isActive()) {
Cursor tmpcur = cur;
-   tmpcur.pushLeft(*inset);
+   tmpcur.pushBackward(*inset);
inset->dispatch(tmpcur, tmpcmd);
if (tmpcur.result().dispatched()) {
cur.dispatched();
diff -r 7537ce89f78b src/Cursor.cpp
--- a/src/Cursor.cppSat Nov 03 19:12:52 2007 +0100
+++ b/src/Cursor.cppSun Nov 04 00:48:34 2007 +0200
@@ -370,19 +370,19 @@ void Cursor::push(Inset & p)
 }
 
 
-void Cursor::pushLeft(Inset & p)
+void Cursor::pushBackward(Inset & p)
 {
BOOST_ASSERT(!empty());
-   //lyxerr << "Entering inset " << t << " left" << endl;
+   //lyxerr << "Entering inset " << t << " front" << endl;
push(p);
p.idxFirst(*this);
 }
 
 
-bool Cursor::popLeft()
+bool Cursor::popBackward()
 {
BOOST_ASSERT(!empty());
-   //lyxerr << "Leaving inset to the left" << endl;
+   //lyxerr << "Leaving inset from in back" << endl;
inset().notifyCursorLeaves(*this);
if (depth() == 1)
return false;
@@ -391,10 +391,10 @@ bool Cursor::popLeft()
 }
 
 
-bool Cursor::popRight()
+bool Cursor::popForward()
 {
BOOST_ASSERT(!empty());
-   //lyxerr << "Leaving inset to the right" << endl;
+   //lyxerr << "Leaving inset from in front" << endl;
const pos_type lp = (depth() > 1) ? (*this)[depth() - 2].lastpos() : 0;
inset().notifyCursorLeaves(*this);
if (depth() == 1)
@@ -440,7 +440,7 @@ void Cursor::resetAnchor()
 
 
 
-bool Cursor::posLeft()
+bool Cursor::posBackward()
 {
if (pos() == 0)
return false;
@@ -449,7 +449,7 @@ bool Cursor::posLeft()
 }
 
 
-bool Cursor::posRight()
+bool Cursor::posForward()
 {
if (pos() == lastpos())
return false;
@@ -772,10 +772,10 @@ void Cursor::niceInsert(MathAtom const &
plainInsert(t);
// enter the new inset and move the contents of the selection if 
possible
if (t->isActive()) {
-   posLeft();
-   // be careful here: don't use 'pushLeft(t)' as this we need to
+   posBackward();
+   // be careful here: don't use 'pushBackward(t)' as this we need 
to
// push the clone, not the original
-   pushLeft(*nextInset());
+   pushBackward(*nextInset());
// We may not use niceInsert here (recursion)
MathData ar;
asArray(safe, ar);
@@ -806,7 +806,7 @@ bool Cursor::backspace()
if (pos() == 0) {
// If empty cell, and not part of a big cell
if (lastpos() == 0 && inset().nargs() == 1) {
-   popLeft();
+   popBackward();
// Directly delete empty cell: [|[]] => [|]
if (inMathed()) {
plainErase();
@@ -819,7 +819,7 @@ bool Cursor::backspace()
if (inMathed())
pullArg();
else
-   popLeft();
+   popBackward();
return true;
}
}
@@ -865,7 +865,7 @@ bool Cursor::erase()
if (pos() == lastpos()) {
bool one_cell = inset().nargs() == 1;
if (one_cell && lastpos() == 0) {
-   popLeft();
+   popBackward();
// Directly delete empty cell: [|[]] => [|]
if (inMathed()) {
plainErase();
@@ -967,8 +967,8 @@ void Cursor::handleNest(MathAtom const &
MathAtom t = a;
asArray(cap::grabAndEraseSelection(*this), t.nucleus()->cell(c));
insert(t);
-   posLeft();
-   pushLeft(*nextInset());
+   posBackward();
+   pushBackward(*nextInset());
 }
 
 
@@ -1019,7 +1019,7 @@ void Cursor::pullArg()
 {
// FIXME: Look here
MathData ar = cell();
-   if (popLeft() && inMathed()) {
+   if (popBackward() && inMathed()) {

Re: Compilation problems (trunk & branch)

2007-11-03 Thread Dov Feldstern

Abdelrazak Younes wrote:

Kornel Benko wrote:

Am Samstag 03 November 2007 schrieb Dov Feldstern:

Dov Feldstern wrote:

Hi!

I'm also having compilation trouble in both trunk and branch. I'm using
Qt 4.2.1 (which is the version that debian etch offers as far as I can
tell).

Sorry, trunk is OK (I hadn't updated); branch still problematic, though.


Same here. Qt 4.2.3, kubuntu.


Please try again with latest rev.



Works for me, thanks Abdel!


Abdel.

PS: Sorry Juergen I didn't wait but this is an urgency.






Re: [patch] pixmap cache goes rc

2007-11-03 Thread Uwe Stöhr

Uwe Stöhr schrieb:

I need to describe this in the docs. What exactly does the pixmap? 


Is this description correct?:

B.1.1.6 Pixmap Cache

The option Enable Pixmap Cache activates a cache for screen fonts and icons like toolbar buttons. 
Using this cache improves the speed performance of LyX but might decrease the quality of the screen 
fonts.


regards Uwe



Re: Support request for Japanese without CJK

2007-11-03 Thread Uwe Stöhr

Koji Yokota schrieb:

Sorry for being late. Please apply the attached patch to add description 
in LaTeXConfig.lyx.


This file was broken. It seems you have copied the text manually with and editor into the section 
about kluwer.


The CTAN paths you gave in your don't exist - I can't find a path
http://www.ctan.org/tex-archive/language/japanese/ptex-texmf/
and
http://www.ctan.org/tex-archive/language/japanese/jsclasses/

I therefore set it to unknown. What are the right paths?

I committed this version:
http://www.lyx.org/trac/changeset/21415

regards Uwe


Re: Compilation problems (trunk & branch)

2007-11-03 Thread Kornel Benko
Am Sonntag 04 November 2007 schrieb Dov Feldstern:
> Works for me, thanks Abdel!

Here too. Thanx Abdel :)

> > Abdel.
> >
> > PS: Sorry Juergen I didn't wait but this is an urgency.

!!

Kornel

-- 
Kornel Benko
[EMAIL PROTECTED]


pgpsmKgeJPvzd.pgp
Description: PGP signature


Re: 1.5 branch won't compile

2007-11-03 Thread Darren Freeman
On Sat, 2007-11-03 at 10:17 +0100, Abdelrazak Younes wrote:
> Darren Freeman wrote:
> > On Sat, 2007-11-03 at 19:27 +1100, Darren Freeman wrote:
> >> Today's revision that failed is r21399. I went backward to find the most
> >> recent revision which compiles, which is r21356. The change which broke
> >> it is therefore r21357.
> > 
> > Sorry, I'm off-by-one. The version which compiles is r21357 and the
> > break occurred at r21358.
> 
> Are you sure it's not 21368?

Sorry off-by-10 :) Must have been having a bout of dyslexia...

> If yes, then looks like you used Qt 4.3 Juergen...

I'm using 4.2.1 (stock RPM from OpenSUSE).

Have fun,
Darren



Re: Support request for Japanese without CJK

2007-11-03 Thread Koji Yokota
Uwe Stöhr wrote:
> This file was broken. It seems you have copied the text manually with
> and editor into the section about kluwer.

Oops, sorry about that.

> The CTAN paths you gave in your don't exist - I can't find a path
> http://www.ctan.org/tex-archive/language/japanese/ptex-texmf/
> and
> http://www.ctan.org/tex-archive/language/japanese/jsclasses/
> 
> I therefore set it to unknown. What are the right paths?

As I'm arranging with CTAN to include additional documentations, they
are currently suspended. They will be uploaded soon (in a several days,
I hope). So, please keep them as unknown for the moment.

> I committed this version:
> http://www.lyx.org/trac/changeset/21415

Thank you,

Koji