Re: Compilation failure after r33370

2010-02-09 Thread Abdelrazak Younes

On 02/09/2010 01:28 AM, Uwe Stöhr wrote:

Since r33370 I get this compilation error:

   Creating library release\lyx.lib and object release\lyx.exp
InsetFloat.obj : error LNK2019: unresolved external symbol public: 
virtual __th
iscall lyx::InsetFloat::~InsetFloat(void) (??1insetfl...@lyx@@u...@xz) 
reference
d in function public: virtual void * __thiscall 
lyx::InsetFloat::`scalar deleti

ng destructor'(unsigned int) (??_ginsetfl...@lyx@@uaep...@z)
release\lyx.exe : fatal error LNK1120: 1 unresolved externals
scons: *** [release\lyx.exe] Error 1120
scons: building terminated because of errors.

Abdel, can you please have a look?


Fixed, sorry.

Abdel.



Re: Bug 6412 and changeset 31451

2010-02-09 Thread Abdelrazak Younes

On 02/09/2010 02:19 AM, BH wrote:

As I just noted on Trac (bug 6412), the problem I've had on Mac with
inserting citations, changes to the document preamble, etc. is the
result of changest 31451. Abdel, can you take a look?

http://www.lyx.org/trac/ticket/6412
   


I'll try to, this week-end...

Abdel.



Re: Fwd: LyXAction, LyXFunc

2010-02-09 Thread Jean-Marc Lasgouttes
Manoj Rajagopalan rma...@umich.edu writes:
   Re-sending. I am trying to understand the LyX flow of control. Appreciate 
 any help. Apologies for the duplicate.

Sorry, I planned to answer but did not find the time.

These classes seem to be related. Could someone help me understand what 
 each does and how they are related? IIUC, both are meant to be singletons 
 which help with translating user inputs and commands into FuncRequest 
 instances that cause the update of the document or LyX application state. How 
 do these two interact and why do we need to distinguish these two?

LyXAction is the dictionary of known LyX functions, with their names and
properties (together with FuncCode.h for the enums).

LyXFunc contains the basic mechanism to execute these functions. It
should soon become a variable-less class, and part of its contents will
be moved somewhere else. This is in flux currently.

FuncRequest is the object that describes the action one wants to
execute.

FuncStatus describes the result of the action, in particular the updates
that need to happen.

Is this description clear? 

JMarc


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

2010-02-09 Thread Jean-Marc Lasgouttes
 Log:
 * store the full Language in WordLangTuple.

Very good.

 + WordLangTuple(docstring const  w, Language * l)
 + : word_(w)
 + {
 + lang_ = l;
 + }

Why don't you initialize lang_ along with word_?

JMarc


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

2010-02-09 Thread Jürgen Spitzmüller
Jean-Marc Lasgouttes wrote:
  + WordLangTuple(docstring const  w, Language * l)
  + : word_(w)
  + {
  + lang_ = l;
  + }
 
 Why don't you initialize lang_ along with word_?

I got a compile error. But it doesn't do now, so I'll change that.

Jürgen


Math shortcuts problem after upgrading to LyX 1.6.5

2010-02-09 Thread Barak Sh
Hello,

In previous versions of LyX, when using keyboard shortcuts such as Alt+M F =
math-insert \frac, the fraction symbol would be inserted and the cursor
positioned such that the numerator may be entered immediately.
Similarly, Alt+M S (for math-insert \sqrt) would position the cursor inside
the square root sign.

In version 1.6.5 of LyX, this behavior was changed for some reason. Now the
cursor is positioned AFTER the symbol, and not inside it.
This makes writing equations very cumbersome, as I have to manually move the
cursor inside the symbol after creating it. Would it be possible to fix
this? Or perhaps there is an option somewhere in the preferences to change
back to the old behaviour?

Thanks,
Barak


Re: Bug 6412 and changeset 31451

2010-02-09 Thread Abdelrazak Younes

On 02/09/2010 02:19 AM, BH wrote:

As I just noted on Trac (bug 6412), the problem I've had on Mac with
inserting citations, changes to the document preamble, etc. is the
result of changest 31451. Abdel, can you take a look?

http://www.lyx.org/trac/ticket/6412
   


I committed a temporary fix in r33380, could you please test if that 
really fix the issue?


Abdel.



Slow text cursor in Lyx

2010-02-09 Thread danielpferreira

Hello,
I've noticed that the text cursor in Lyx moves a bit slow, wich makes me use
the mouse in a lot of situations were I'd normally use only the keyboard
(wich to me is much more efficient).

This is not exactly a big problem, but it does slow down a lot my text
editing. I couldn't find any information on this anywere else.

Is the text cursor's speed configurable? Does anyone else feel  the same way
about the text cursor's speed? Is this a known bug?

Thanks in advance!
[]'s,
Daniel

-- 
View this message in context: 
http://n2.nabble.com/Slow-text-cursor-in-Lyx-tp4540863p4540863.html
Sent from the LyX - Developers mailing list archive at Nabble.com.


Re: Math shortcuts problem after upgrading to LyX 1.6.5

2010-02-09 Thread Jürgen Spitzmüller
Barak Sh wrote:
 In version 1.6.5 of LyX, this behavior was changed for some reason. Now the
 cursor is positioned AFTER the symbol, and not inside it.
 This makes writing equations very cumbersome, as I have to manually move
  the cursor inside the symbol after creating it. Would it be possible to
  fix this? Or perhaps there is an option somewhere in the preferences to
  change back to the old behaviour?

This is a known bug. It will be fixed in the next release.

Thanks,
Jürgen


Re: Bug 6412 and changeset 31451

2010-02-09 Thread BH
On Tue, Feb 9, 2010 at 7:43 AM, Abdelrazak Younes you...@lyx.org wrote:
 On 02/09/2010 02:19 AM, BH wrote:

 As I just noted on Trac (bug 6412), the problem I've had on Mac with
 inserting citations, changes to the document preamble, etc. is the
 result of changest 31451. Abdel, can you take a look?

 http://www.lyx.org/trac/ticket/6412


 I committed a temporary fix in r33380, could you please test if that really
 fix the issue?

That seems to do it: I can now insert citations and modify the
document preamble. I'll have to test more thoroughly later. (That was
fast!)

Thanks.

BH


Re: Bug 6412 and changeset 31451

2010-02-09 Thread Abdelrazak Younes

On 02/09/2010 02:16 PM, BH wrote:

On Tue, Feb 9, 2010 at 7:43 AM, Abdelrazak Younesyou...@lyx.org  wrote:
   

On 02/09/2010 02:19 AM, BH wrote:
 

As I just noted on Trac (bug 6412), the problem I've had on Mac with
inserting citations, changes to the document preamble, etc. is the
result of changest 31451. Abdel, can you take a look?

http://www.lyx.org/trac/ticket/6412

   

I committed a temporary fix in r33380, could you please test if that really
fix the issue?
 

That seems to do it: I can now insert citations and modify the
document preamble. I'll have to test more thoroughly later.


Good thanks.


  (That was
fast!)
   


Well I could have been a bit less stupid when I committed this...

JMarc, in case you are working on the disabled menus on MACs. I have a 
patch in the pipe that will fix the issue (by transfering getStatus() 
and dispatch() to GuiApplication as discussed earlier).


Abdel.



Re: about the libintl version in the LyX windows installer

2010-02-09 Thread Uwe Stöhr

 I'm afraid I won't have time to look into this now.

It is not that pressing, but having this fixed for LyX 2.0 would be good.

 If the LyX problem is caused by a known bug in gettext, maybe the
 easiest solution for now would be to apply the bugfix to our gettext
 version. Did someone test on Linux to figure out which gettext version
 fixes the problem?

It seems that we need at least version 0.16.1, see 
http://www.lyx.org/trac/ticket/5034


regards Uwe


Re: Bug 6412 and changeset 31451

2010-02-09 Thread Jean-Marc Lasgouttes
Abdelrazak Younes you...@lyx.org writes:
 JMarc, in case you are working on the disabled menus on MACs. I have a
 patch in the pipe that will fix the issue (by transfering getStatus()
 and dispatch() to GuiApplication as discussed earlier).

From time to time I say to myself I should do it, but nothing happens.
So go for it.

JMarc


Re: Bug 6412 and changeset 31451

2010-02-09 Thread Abdelrazak Younes

On 02/09/2010 02:44 PM, Jean-Marc Lasgouttes wrote:

Abdelrazak Younesyou...@lyx.org  writes:
   

JMarc, in case you are working on the disabled menus on MACs. I have a
patch in the pipe that will fix the issue (by transfering getStatus()
and dispatch() to GuiApplication as discussed earlier).
 

 From time to time I say to myself I should do it, but nothing happens.
   


From time to time I also say to myself JMarc will do it but... :-P


So go for it.
   


OK. It's close to be finished anyway... now let's see if it compiles...

Abdel.


Re: Another Lyx Error Detected

2010-02-09 Thread Guenter Milde
On 2010-02-08, Lara Pagano wrote:

 Another problem I am having is with too many floating figures.  I have a
 large document with anywhere from 3-100 figures within each chapter.  I keep
 getting the error regarding too many floats.  I worked around this issue by
 placing /clearpage every so often to make it produce a PDF.  However, the
 blank pages it is producing is something I need to get rid of.  How do I
 combat this issue given the amount of figures I have??

Changing the LaTeX parameters for float placement in the LyX preamble, e.g.

\renewcommand{\textfraction}{0.5}
\renewcommand{\topfraction}{0.5}
\renewcommand{\bottomfraction}{0.5}
\setcounter{totalnumber}{50}
\setcounter{topnumber}{50}
\setcounter{bottomnumber}{50}

Günter





Re: [patch] implement multirow support - request for help

2010-02-09 Thread Guenter Milde
On 2010-02-09, Uwe Stöhr wrote:

  Attached is what I currently have to support multirows.
 
  There is currently one issue I cannot solve: The metrics and drawing
  of the cells that are part of a multirow is broken. The drawing of
  the first multirow cell is however correct. I failed to figure out
  this problem and therefore ask for help.

 Has anybody had time to have a look at this?

Not me, however, I have a maybe similar problem with another LaTeX
frontend -- Docutils: 

If you download and compile
http://svn.berlios.de/svnroot/repos/docutils/trunk/docutils/test/functional/expected/standalone_rst_latex.tex
you will realize a broken border in the rowspanning tables example on
page 13.

The reason is identified as different table models 

   In the LaTeX `multicol` package, if there are multirow cells, the
   overwritten cells need to be defined as empty cells.

   Docutils (similarily to HTML) uses is the Exchange Table Model (also
   known as CALS tables, see soextblx.dtd_) which defines only the
   remaining cells in a row affected by multirow cells.

   Therefore, visit_entry() is only called for the remaining cells and the
   LaTeX writer needs bookkeeping to write out the required number of extra
   ''s.
   
   .. _soextblx.dtd: http://www.docbook.org/sgml/4.2/soextblx.dtd
   
I don't know whether this is related or not but maybe this can be a
hint.

Günter   



Re: r33386 - lyx-devel/trunk/src

2010-02-09 Thread Abdelrazak Younes

On 02/09/2010 03:29 PM, lasgout...@lyx.org wrote:

Author: lasgouttes
Date: Tue Feb  9 15:29:27 2010
New Revision: 33386
URL: http://www.lyx.org/trac/changeset/33386

Log:
remove last member variables from LyXFunc and move them to cursor. Now the 
class can be replaced by a namespace


Hum, as I said... I am already working on that JMarc...

Please refrain from further work on LyXFunc...

Abdel.



Re: r33386 - lyx-devel/trunk/src

2010-02-09 Thread Jean-Marc Lasgouttes
Abdelrazak Younes you...@lyx.org writes:
 Hum, as I said... I am already working on that JMarc...

 Please refrain from further work on LyXFunc...

OK, OK... I did not think you were working on this particular aspect.

JMarc


Re: r33389 - in lyx-devel/trunk: development/scons src src/frontends src/frontends/qt4 src/insets src/mathed

2010-02-09 Thread rgheck



Modified: lyx-devel/trunk/src/Cursor.cpp
==
--- lyx-devel/trunk/src/Cursor.cpp  Tue Feb  9 15:34:58 2010(r33388)
+++ lyx-devel/trunk/src/Cursor.cpp  Tue Feb  9 17:11:13 2010(r33389)
@@ -26,6 +26,7 @@
  #include FuncCode.h
  #include FuncRequest.h
  #include Language.h
+#include LyX.h
  #include LyXAction.h
  #include LyXRC.h
  #include Paragraph.h
@@ -1668,7 +1669,7 @@
int yo = 0;
getPos(xo, yo);
xo = beforeDispatchPosX_;
-   
+
// check if we had something else in mind, if not, this is the future
// target
if (x_target_ == -1)

   

???

rh



Re: r33389 - in lyx-devel/trunk: development/scons src src/frontends src/frontends/qt4 src/insets src/mathed

2010-02-09 Thread Abdelrazak Younes

On 02/09/2010 05:17 PM, rgheck wrote:



Modified: lyx-devel/trunk/src/Cursor.cpp
== 

--- lyx-devel/trunk/src/Cursor.cppTue Feb  9 15:34:58 2010
(r33388)
+++ lyx-devel/trunk/src/Cursor.cppTue Feb  9 17:11:13 2010
(r33389)

@@ -26,6 +26,7 @@
  #include FuncCode.h
  #include FuncRequest.h
  #include Language.h
+#include LyX.h
  #include LyXAction.h
  #include LyXRC.h
  #include Paragraph.h
@@ -1668,7 +1669,7 @@
  int yo = 0;
  getPos(xo, yo);
  xo = beforeDispatchPosX_;
-
+
  // check if we had something else in mind, if not, this is the 
future

  // target
  if (x_target_ == -1)


???


I erased a tab I guess. I had to solve a merge conflict at this position 
if you wonder why this has been touched at all.


Abdel.



Re: r33389 - in lyx-devel/trunk: development/scons src src/frontends src/frontends/qt4 src/insets src/mathed

2010-02-09 Thread rgheck

On 02/09/2010 11:23 AM, Abdelrazak Younes wrote:

On 02/09/2010 05:17 PM, rgheck wrote:



Modified: lyx-devel/trunk/src/Cursor.cpp
== 

--- lyx-devel/trunk/src/Cursor.cppTue Feb  9 15:34:58 2010
(r33388)
+++ lyx-devel/trunk/src/Cursor.cppTue Feb  9 17:11:13 2010
(r33389)

@@ -26,6 +26,7 @@
  #include FuncCode.h
  #include FuncRequest.h
  #include Language.h
+#include LyX.h
  #include LyXAction.h
  #include LyXRC.h
  #include Paragraph.h
@@ -1668,7 +1669,7 @@
  int yo = 0;
  getPos(xo, yo);
  xo = beforeDispatchPosX_;
-
+
  // check if we had something else in mind, if not, this is the 
future

  // target
  if (x_target_ == -1)


???


I erased a tab I guess. I had to solve a merge conflict at this 
position if you wonder why this has been touched at all.


No, I was wondering why LyX.h has to be included here. Was LyXFunc.h 
included somewhere upstream?


rh



Re: r33389 - in lyx-devel/trunk: development/scons src src/frontends src/frontends/qt4 src/insets src/mathed

2010-02-09 Thread Abdelrazak Younes

On 02/09/2010 05:26 PM, rgheck wrote:

On 02/09/2010 11:23 AM, Abdelrazak Younes wrote:

On 02/09/2010 05:17 PM, rgheck wrote:



Modified: lyx-devel/trunk/src/Cursor.cpp
== 

--- lyx-devel/trunk/src/Cursor.cppTue Feb  9 15:34:58 2010
(r33388)
+++ lyx-devel/trunk/src/Cursor.cppTue Feb  9 17:11:13 2010
(r33389)

@@ -26,6 +26,7 @@
  #include FuncCode.h
  #include FuncRequest.h
  #include Language.h
+#include LyX.h
  #include LyXAction.h
  #include LyXRC.h
  #include Paragraph.h
@@ -1668,7 +1669,7 @@
  int yo = 0;
  getPos(xo, yo);
  xo = beforeDispatchPosX_;
-
+
  // check if we had something else in mind, if not, this is 
the future

  // target
  if (x_target_ == -1)


???


I erased a tab I guess. I had to solve a merge conflict at this 
position if you wonder why this has been touched at all.


No, I was wondering why LyX.h has to be included here. Was LyXFunc.h 
included somewhere upstream?


It was needed before the merge conflict with JMarc... I guess it is not 
needed anymore, unless dispatch() is needed I mean..


Abdel.


Re: about the libintl version in the LyX windows installer

2010-02-09 Thread Joost Verburg

On 2/9/2010 8:34 AM, Uwe Stöhr wrote:

  I'm afraid I won't have time to look into this now.

It is not that pressing, but having this fixed for LyX 2.0 would be good.


I know, but I think it's not going to be easy to make gettext 0.17 MSVC 
compatible.



  If the LyX problem is caused by a known bug in gettext, maybe the
  easiest solution for now would be to apply the bugfix to our gettext
  version. Did someone test on Linux to figure out which gettext version
  fixes the problem?

It seems that we need at least version 0.16.1, see
http://www.lyx.org/trac/ticket/5034


So it has been confirmed that 0.15 on Linux has the same problem, i.e. 
it's not a Windows gettext issue that still exits in 0.17?


Joost



Re: [patch] implement multirow support - request for help

2010-02-09 Thread Edwin Leuven

Uwe Stöhr wrote:

  Attached is what I currently have to support multirows.
 
Has anybody had time to have a look at this?


i started to look at it. drawing seems ok in the attached, but it needs 
more attention wrt lines, latex output and i didn't go over the 
copy/cutting/pasting stuff.
Index: src/insets/InsetTabular.cpp
===
--- src/insets/InsetTabular.cpp (revision 33395)
+++ src/insets/InsetTabular.cpp (working copy)
@@ -70,7 +70,6 @@
 using namespace lyx::support;
 
 using boost::shared_ptr;
-using boost::dynamic_pointer_cast;
 
 
 namespace lyx {
@@ -130,6 +129,7 @@
{ Tabular::M_VALIGN_BOTTOM, m-valign-bottom },
{ Tabular::M_VALIGN_MIDDLE, m-valign-middle },
{ Tabular::MULTICOLUMN, multicolumn },
+   { Tabular::MULTIROW, multirow },
{ Tabular::SET_ALL_LINES, set-all-lines },
{ Tabular::UNSET_ALL_LINES, unset-all-lines },
{ Tabular::SET_LONGTABULAR, set-longtabular },
@@ -154,7 +154,8 @@
{ Tabular::SET_LTNEWPAGE, set-ltnewpage },
{ Tabular::TOGGLE_LTCAPTION, toggle-ltcaption },
{ Tabular::SET_SPECIAL_COLUMN, set-special-column },
-   { Tabular::SET_SPECIAL_MULTI, set-special-multi },
+   { Tabular::SET_SPECIAL_MULTICOLUMN, set-special-multicolumn },
+   { Tabular::SET_SPECIAL_MULTIROW, set-special-multirow },
{ Tabular::SET_BOOKTABS, set-booktabs },
{ Tabular::UNSET_BOOKTABS, unset-booktabs },
{ Tabular::SET_TOP_SPACE, set-top-space },
@@ -519,6 +520,7 @@
: cellno(0),
  width(0),
  multicolumn(Tabular::CELL_NORMAL),
+ multirow(Tabular::CELL_NORMAL),
  alignment(LYX_ALIGN_CENTER),
  valignment(LYX_VALIGN_TOP),
  top_line(false),
@@ -537,6 +539,7 @@
: cellno(cs.cellno),
  width(cs.width),
  multicolumn(cs.multicolumn),
+ multirow(cs.multirow),
  alignment(cs.alignment),
  valignment(cs.valignment),
  top_line(cs.top_line),
@@ -562,6 +565,7 @@
std::swap(cellno, rhs.cellno);
std::swap(width, rhs.width);
std::swap(multicolumn, rhs.multicolumn);
+   std::swap(multirow, rhs.multirow);
std::swap(alignment, rhs.alignment);
std::swap(valignment, rhs.valignment);
std::swap(top_line, rhs.top_line);
@@ -680,7 +684,10 @@
swap(cell_info[i], old[i - 1]);
 
updateIndexes();
+
for (col_type c = 0; c  ncols; ++c) {
+   if (isPartOfMultiRow(row, c))
+   continue;
// inherit line settings
idx_type const i = cellIndex(row + 1, c);
idx_type const j = cellIndex(row, c);
@@ -704,6 +711,15 @@
if (row_info.size() == 1)
return;
 
+   size_t const column_count = column_info.size();
+   for (col_type i = 0; i  column_count; ++i) {
+   // Care about multirow cells
+   if (row + 1  row_info.size() 
+   cell_info[row][i].multirow == CELL_BEGIN_OF_MULTIROW 
+   cell_info[row][i + 1].multirow == CELL_PART_OF_MULTIROW) {
+   cell_info[row][i + 1].multirow = CELL_BEGIN_OF_MULTIROW;
+   }
+   }
row_info.erase(row_info.begin() + row);
cell_info.erase(cell_info.begin() + row);
updateIndexes();
@@ -735,14 +751,10 @@
for (row_type r = 0; r  nrows; ++r) {
cell_info[r].insert(cell_info[r].begin() + c + 1, 
CellData(buffer_));
-#if 0
-// FIXME: This code does not work. It deletes the cell's content and
-// it triggers an assertion if the cursor is at pos  0.
if (cell_info[r][c].multicolumn == CELL_BEGIN_OF_MULTICOLUMN)
cell_info[r][c + 1].multicolumn = 
CELL_PART_OF_MULTICOLUMN;
else
cell_info[r][c + 1].multicolumn = 
cell_info[r][c].multicolumn;
-#endif
}
updateIndexes();
for (row_type r = 0; r  nrows; ++r) {
@@ -809,9 +821,13 @@
numberofcells = 0;
for (row_type row = 0; row  nrows; ++row)
for (col_type column = 0; column  ncols; ++column) {
-   if (!isPartOfMultiColumn(row, column))
+   if (!isPartOfMultiColumn(row, column)
+!isPartOfMultiRow(row, column))
++numberofcells;
-   cell_info[row][column].cellno = numberofcells - 1;
+   if (isPartOfMultiRow(row, column))
+   cell_info[row][column].cellno = cell_info[row - 
1][column].cellno;
+   else
+   cell_info[row][column].cellno = numberofcells - 
1;
}
 
rowofcell.resize(numberofcells);
@@ -819,7 +835,8 @@
idx_type i = 0;
for (row_type row = 0; row  nrows; ++row)
 

Re: r33370 - in lyx-devel/trunk/src: . frontends/qt4 frontends/qt4/ui insets

2010-02-09 Thread Jürgen Spitzmüller
younes wrote:
 -void FloatPlacement::set(lyx::InsetFloatParams const  params)
 +void FloatPlacement::paramsToDialog(Inset const * inset)
  {
 +   InsetFloat const * fl = static_castInsetFloat const *(inset);
 +   InsetFloatParams const  params = fl-params();
 +
 +   floatType-setText(toqstr(params.type));

i18n please.

Jürgen


Re: about the libintl version in the LyX windows installer

2010-02-09 Thread Uwe Stöhr

 It seems that we need at least version 0.16.1, see
 http://www.lyx.org/trac/ticket/5034

 So it has been confirmed that 0.15 on Linux has the same problem, 
i.e.  it's not a Windows gettext issue that still exits in 0.17?


Yes, as I understood it. JMarc is this correct?

Inkscape 0.47 also provides the feature to switch the menu language via 
the preferences and this works under Windows. They are using GTK and 
gettext 0.17.


regards Uwe


Re: r33260 - lyx-devel/trunk/src/frontends/qt4

2010-02-09 Thread Pavel Sanda
Pavel Sanda wrote:
 If _really_ needed, we can
put the read-only setting inside a DEVEL_VERSION block, but I do not
 
 yes, i would like to have it.

its in r33402.
pavel


Re: Slow text cursor in Lyx

2010-02-09 Thread Pavel Sanda
danielpferreira wrote:
 I couldn't find any information on this anywere else.

http://www.lyx.org/trac/wiki/Components#Performanceissues

 Is the text cursor's speed configurable?

if cpu/gpu is not the bottleneck then you can setup repeat-key frequency in 
your OS not in lyx.
look at your CPU performance while editing.

Does anyone else feel the same way
 about the text cursor's speed? Is this a known bug?

some people yes. problem could be too old hardware, or badly configured graphic 
stuff of Xorg (in case you use linux).
usually hard-to-catch problem.

pavel


Re: [patch] implement multirow support - request for help

2010-02-09 Thread Uwe Stöhr

 i started to look at it.

Many thanks!

You have done some additional simplifications. With your version, setting a multicolumn is no longer 
possible. Can you please have a look?


 drawing seems ok in the attached, but it needs more attention wrt lines, 
latex output and
 i didn't go over the copy/cutting/pasting stuff.

I fixed now some remaining \hline issues.

However there are many other minor issues to solve:

- The content of the multirow is not horizontally centered
- Adding/deleting columns while the cursor is in a table row containing a multirow cell is not 
properly working.

- plain text export needs to be done

I propose that I or you put the patch into branch in a few days and we continue to fine-tune the 
remaining issues. The patch is already very big and I fear we might loose the track if we work only 
with patches. What do you think?


regards Uwe


Re: [patch] implement multirow support - request for help

2010-02-09 Thread Uwe Stöhr

Am 10.02.2010 05:32, schrieb Uwe Stöhr:


I fixed now some remaining \hline issues.


Attached is that part of the patch.


I propose that I or you put the patch into branch in a few days...


I meant of course trunk.

regards Uwe
 int Tabular::TeXTopHLine(odocstream  os, row_type row, string const lang) const
 {
 	// we only output complete row lines and the 1st row here, the rest
@@ -1884,6 +1992,13 @@
 	col_type nset = 0;
 	for (col_type c = 0; c  ncols; ++c) {
 		topline.push_back(topLine(cellIndex(row, c)));
+		// If cell is part of a multirow and not the first cell of the
+		// multirow, no line must be drawn.
+		if (row != 0)
+			if (isMultiRow(cellIndex(row, c))) {
+if (isMultiRow(cellIndex(row - 1, c)))
+	topline[c] = false;
+			}
 		if (topline[c])
 			++nset;
 	}
@@ -1935,6 +2050,15 @@
 	for (col_type c = 0; c  ncols; ++c) {
 		bottomline.push_back(bottomLine(cellIndex(row, c)));
 		topline.push_back(!lastrow  topLine(cellIndex(row + 1, c)));
+		// If cell is part of a multirow and not the last or first cell of the
+		// multirow, no line must be drawn.
+		if (!lastrow)
+			if (isMultiRow(cellIndex(row, c))) {
+if (isMultiRow(cellIndex(row + 1, c))) {
+	bottomline[c] = false;
+	topline[c] = false;
+}
+			}
 		nextrowset = topline[c];
 	}
 
@@ -1955,7 +2079,7 @@
 		if (use_booktabs)
 			os  (lastrow ? \\bottomrule : \\midrule);
 		else
-			os  \\hline;
+			os  \\hline ;
 	} else {
 		for (col_type c = 0; c  ncols; ++c) {
 			if (bottomline[c]) {



Re: r33370 - in lyx-devel/trunk/src: . frontends/qt4 frontends/qt4/ui insets

2010-02-09 Thread Abdelrazak Younes

On 02/09/2010 07:47 PM, Jürgen Spitzmüller wrote:

younes wrote:
   

-void FloatPlacement::set(lyx::InsetFloatParams const  params)
+void FloatPlacement::paramsToDialog(Inset const * inset)
  {
+   InsetFloat const * fl = static_castInsetFloat const *(inset);
+   InsetFloatParams const  params = fl-params();
+
+   floatType-setText(toqstr(params.type));
 

i18n please.
   


Should be OK now (untested). FWIW, I wanted to implement a combo with 
the list of available types but did not find the time... I think this 
would be a good ui improvement.


Abdel.



Re: r33370 - in lyx-devel/trunk/src: . frontends/qt4 frontends/qt4/ui insets

2010-02-09 Thread Jürgen Spitzmüller
Abdelrazak Younes wrote:
 Should be OK now (untested).

No, it's not. You cannot use params.type for that, because that's not flagged 
for translation. Have a look at InsetCollapsable::floatName().

Jürgen


Re: Compilation failure after r33370

2010-02-09 Thread Abdelrazak Younes

On 02/09/2010 01:28 AM, Uwe Stöhr wrote:

Since r33370 I get this compilation error:

   Creating library release\lyx.lib and object release\lyx.exp
InsetFloat.obj : error LNK2019: unresolved external symbol "public: 
virtual __th
iscall lyx::InsetFloat::~InsetFloat(void)" (??1insetfl...@lyx@@u...@xz) 
reference
d in function "public: virtual void * __thiscall 
lyx::InsetFloat::`scalar deleti

ng destructor'(unsigned int)" (??_ginsetfl...@lyx@@uaep...@z)
release\lyx.exe : fatal error LNK1120: 1 unresolved externals
scons: *** [release\lyx.exe] Error 1120
scons: building terminated because of errors.

Abdel, can you please have a look?


Fixed, sorry.

Abdel.



Re: Bug 6412 and changeset 31451

2010-02-09 Thread Abdelrazak Younes

On 02/09/2010 02:19 AM, BH wrote:

As I just noted on Trac (bug 6412), the problem I've had on Mac with
inserting citations, changes to the document preamble, etc. is the
result of changest 31451. Abdel, can you take a look?

http://www.lyx.org/trac/ticket/6412
   


I'll try to, this week-end...

Abdel.



Re: Fwd: LyXAction, LyXFunc

2010-02-09 Thread Jean-Marc Lasgouttes
Manoj Rajagopalan  writes:
>   Re-sending. I am trying to understand the LyX flow of control. Appreciate 
> any help. Apologies for the duplicate.

Sorry, I planned to answer but did not find the time.

>These classes seem to be related. Could someone help me understand what 
> each does and how they are related? IIUC, both are meant to be singletons 
> which help with translating user inputs and commands into FuncRequest 
> instances that cause the update of the document or LyX application state. How 
> do these two interact and why do we need to distinguish these two?

LyXAction is the dictionary of known LyX functions, with their names and
properties (together with FuncCode.h for the enums).

LyXFunc contains the basic mechanism to execute these functions. It
should soon become a variable-less class, and part of its contents will
be moved somewhere else. This is in flux currently.

FuncRequest is the object that describes the action one wants to
execute.

FuncStatus describes the result of the action, in particular the updates
that need to happen.

Is this description clear? 

JMarc


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

2010-02-09 Thread Jean-Marc Lasgouttes
> Log:
> * store the full Language in WordLangTuple.

Very good.

> + WordLangTuple(docstring const & w, Language * l)
> + : word_(w)
> + {
> + lang_ = l;
> + }

Why don't you initialize lang_ along with word_?

JMarc


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

2010-02-09 Thread Jürgen Spitzmüller
Jean-Marc Lasgouttes wrote:
> > + WordLangTuple(docstring const & w, Language * l)
> > + : word_(w)
> > + {
> > + lang_ = l;
> > + }
> 
> Why don't you initialize lang_ along with word_?

I got a compile error. But it doesn't do now, so I'll change that.

Jürgen


Math shortcuts problem after upgrading to LyX 1.6.5

2010-02-09 Thread Barak Sh
Hello,

In previous versions of LyX, when using keyboard shortcuts such as Alt+M F =
math-insert \frac, the fraction symbol would be inserted and the cursor
positioned such that the numerator may be entered immediately.
Similarly, Alt+M S (for math-insert \sqrt) would position the cursor inside
the square root sign.

In version 1.6.5 of LyX, this behavior was changed for some reason. Now the
cursor is positioned AFTER the symbol, and not inside it.
This makes writing equations very cumbersome, as I have to manually move the
cursor inside the symbol after creating it. Would it be possible to fix
this? Or perhaps there is an option somewhere in the preferences to change
back to the old behaviour?

Thanks,
Barak


Re: Bug 6412 and changeset 31451

2010-02-09 Thread Abdelrazak Younes

On 02/09/2010 02:19 AM, BH wrote:

As I just noted on Trac (bug 6412), the problem I've had on Mac with
inserting citations, changes to the document preamble, etc. is the
result of changest 31451. Abdel, can you take a look?

http://www.lyx.org/trac/ticket/6412
   


I committed a temporary fix in r33380, could you please test if that 
really fix the issue?


Abdel.



Slow text cursor in Lyx

2010-02-09 Thread danielpferreira

Hello,
I've noticed that the text cursor in Lyx moves a bit slow, wich makes me use
the mouse in a lot of situations were I'd normally use only the keyboard
(wich to me is much more efficient).

This is not exactly a big problem, but it does slow down a lot my text
editing. I couldn't find any information on this anywere else.

Is the text cursor's speed configurable? Does anyone else feel  the same way
about the text cursor's speed? Is this a known bug?

Thanks in advance!
[]'s,
Daniel

-- 
View this message in context: 
http://n2.nabble.com/Slow-text-cursor-in-Lyx-tp4540863p4540863.html
Sent from the LyX - Developers mailing list archive at Nabble.com.


Re: Math shortcuts problem after upgrading to LyX 1.6.5

2010-02-09 Thread Jürgen Spitzmüller
Barak Sh wrote:
> In version 1.6.5 of LyX, this behavior was changed for some reason. Now the
> cursor is positioned AFTER the symbol, and not inside it.
> This makes writing equations very cumbersome, as I have to manually move
>  the cursor inside the symbol after creating it. Would it be possible to
>  fix this? Or perhaps there is an option somewhere in the preferences to
>  change back to the old behaviour?

This is a known bug. It will be fixed in the next release.

Thanks,
Jürgen


Re: Bug 6412 and changeset 31451

2010-02-09 Thread BH
On Tue, Feb 9, 2010 at 7:43 AM, Abdelrazak Younes  wrote:
> On 02/09/2010 02:19 AM, BH wrote:
>>
>> As I just noted on Trac (bug 6412), the problem I've had on Mac with
>> inserting citations, changes to the document preamble, etc. is the
>> result of changest 31451. Abdel, can you take a look?
>>
>> http://www.lyx.org/trac/ticket/6412
>>
>
> I committed a temporary fix in r33380, could you please test if that really
> fix the issue?

That seems to do it: I can now insert citations and modify the
document preamble. I'll have to test more thoroughly later. (That was
fast!)

Thanks.

BH


Re: Bug 6412 and changeset 31451

2010-02-09 Thread Abdelrazak Younes

On 02/09/2010 02:16 PM, BH wrote:

On Tue, Feb 9, 2010 at 7:43 AM, Abdelrazak Younes  wrote:
   

On 02/09/2010 02:19 AM, BH wrote:
 

As I just noted on Trac (bug 6412), the problem I've had on Mac with
inserting citations, changes to the document preamble, etc. is the
result of changest 31451. Abdel, can you take a look?

http://www.lyx.org/trac/ticket/6412

   

I committed a temporary fix in r33380, could you please test if that really
fix the issue?
 

That seems to do it: I can now insert citations and modify the
document preamble. I'll have to test more thoroughly later.


Good thanks.


  (That was
fast!)
   


Well I could have been a bit less stupid when I committed this...

JMarc, in case you are working on the disabled menus on MACs. I have a 
patch in the pipe that will fix the issue (by transfering getStatus() 
and dispatch() to GuiApplication as discussed earlier).


Abdel.



Re: about the libintl version in the LyX windows installer

2010-02-09 Thread Uwe Stöhr

> I'm afraid I won't have time to look into this now.

It is not that pressing, but having this fixed for LyX 2.0 would be good.

> If the LyX problem is caused by a known bug in gettext, maybe the
> easiest solution for now would be to apply the bugfix to our gettext
> version. Did someone test on Linux to figure out which gettext version
> fixes the problem?

It seems that we need at least version 0.16.1, see 
http://www.lyx.org/trac/ticket/5034


regards Uwe


Re: Bug 6412 and changeset 31451

2010-02-09 Thread Jean-Marc Lasgouttes
Abdelrazak Younes  writes:
> JMarc, in case you are working on the disabled menus on MACs. I have a
> patch in the pipe that will fix the issue (by transfering getStatus()
> and dispatch() to GuiApplication as discussed earlier).

>From time to time I say to myself I should do it, but nothing happens.
So go for it.

JMarc


Re: Bug 6412 and changeset 31451

2010-02-09 Thread Abdelrazak Younes

On 02/09/2010 02:44 PM, Jean-Marc Lasgouttes wrote:

Abdelrazak Younes  writes:
   

JMarc, in case you are working on the disabled menus on MACs. I have a
patch in the pipe that will fix the issue (by transfering getStatus()
and dispatch() to GuiApplication as discussed earlier).
 

 From time to time I say to myself I should do it, but nothing happens.
   


From time to time I also say to myself JMarc will do it but... :-P


So go for it.
   


OK. It's close to be finished anyway... now let's see if it compiles...

Abdel.


Re: Another Lyx Error Detected

2010-02-09 Thread Guenter Milde
On 2010-02-08, Lara Pagano wrote:

> Another problem I am having is with too many floating figures.  I have a
> large document with anywhere from 3-100 figures within each chapter.  I keep
> getting the error regarding too many floats.  I worked around this issue by
> placing /clearpage every so often to make it produce a PDF.  However, the
> blank pages it is producing is something I need to get rid of.  How do I
> combat this issue given the amount of figures I have??

Changing the LaTeX parameters for float placement in the LyX preamble, e.g.

\renewcommand{\textfraction}{0.5}
\renewcommand{\topfraction}{0.5}
\renewcommand{\bottomfraction}{0.5}
\setcounter{totalnumber}{50}
\setcounter{topnumber}{50}
\setcounter{bottomnumber}{50}"""

Günter





Re: [patch] implement multirow support - request for help

2010-02-09 Thread Guenter Milde
On 2010-02-09, Uwe Stöhr wrote:

> > Attached is what I currently have to support multirows.
> >
> > There is currently one issue I cannot solve: The metrics and drawing
> > of the cells that are part of a multirow is broken. The drawing of
> > the first multirow cell is however correct. I failed to figure out
> > this problem and therefore ask for help.

> Has anybody had time to have a look at this?

Not me, however, I have a maybe similar problem with another LaTeX
frontend -- Docutils: 

If you download and compile
http://svn.berlios.de/svnroot/repos/docutils/trunk/docutils/test/functional/expected/standalone_rst_latex.tex
you will realize a broken border in the "rowspanning tables" example on
page 13.

The reason is identified as different "table models" 

   In the LaTeX `multicol` package, if there are multirow cells, the
   "overwritten" cells need to be defined as empty cells.

   Docutils (similarily to HTML) uses is the "Exchange Table Model" (also
   known as CALS tables, see soextblx.dtd_) which defines only the
   remaining cells in a row "affected" by multirow cells.

   Therefore, visit_entry() is only called for the remaining cells and the
   LaTeX writer needs bookkeeping to write out the required number of extra
   '&'s.
   
   .. _soextblx.dtd: http://www.docbook.org/sgml/4.2/soextblx.dtd
   
I don't know whether this is related or not but maybe this can be a
hint.

Günter   



Re: r33386 - lyx-devel/trunk/src

2010-02-09 Thread Abdelrazak Younes

On 02/09/2010 03:29 PM, lasgout...@lyx.org wrote:

Author: lasgouttes
Date: Tue Feb  9 15:29:27 2010
New Revision: 33386
URL: http://www.lyx.org/trac/changeset/33386

Log:
remove last member variables from LyXFunc and move them to cursor. Now the 
class can be replaced by a namespace


Hum, as I said... I am already working on that JMarc...

Please refrain from further work on LyXFunc...

Abdel.



Re: r33386 - lyx-devel/trunk/src

2010-02-09 Thread Jean-Marc Lasgouttes
Abdelrazak Younes  writes:
> Hum, as I said... I am already working on that JMarc...
>
> Please refrain from further work on LyXFunc...

OK, OK... I did not think you were working on this particular aspect.

JMarc


Re: r33389 - in lyx-devel/trunk: development/scons src src/frontends src/frontends/qt4 src/insets src/mathed

2010-02-09 Thread rgheck



Modified: lyx-devel/trunk/src/Cursor.cpp
==
--- lyx-devel/trunk/src/Cursor.cpp  Tue Feb  9 15:34:58 2010(r33388)
+++ lyx-devel/trunk/src/Cursor.cpp  Tue Feb  9 17:11:13 2010(r33389)
@@ -26,6 +26,7 @@
  #include "FuncCode.h"
  #include "FuncRequest.h"
  #include "Language.h"
+#include "LyX.h"
  #include "LyXAction.h"
  #include "LyXRC.h"
  #include "Paragraph.h"
@@ -1668,7 +1669,7 @@
int yo = 0;
getPos(xo, yo);
xo = beforeDispatchPosX_;
-   
+
// check if we had something else in mind, if not, this is the future
// target
if (x_target_ == -1)

   

???

rh



Re: r33389 - in lyx-devel/trunk: development/scons src src/frontends src/frontends/qt4 src/insets src/mathed

2010-02-09 Thread Abdelrazak Younes

On 02/09/2010 05:17 PM, rgheck wrote:



Modified: lyx-devel/trunk/src/Cursor.cpp
== 

--- lyx-devel/trunk/src/Cursor.cppTue Feb  9 15:34:58 2010
(r33388)
+++ lyx-devel/trunk/src/Cursor.cppTue Feb  9 17:11:13 2010
(r33389)

@@ -26,6 +26,7 @@
  #include "FuncCode.h"
  #include "FuncRequest.h"
  #include "Language.h"
+#include "LyX.h"
  #include "LyXAction.h"
  #include "LyXRC.h"
  #include "Paragraph.h"
@@ -1668,7 +1669,7 @@
  int yo = 0;
  getPos(xo, yo);
  xo = beforeDispatchPosX_;
-
+
  // check if we had something else in mind, if not, this is the 
future

  // target
  if (x_target_ == -1)


???


I erased a tab I guess. I had to solve a merge conflict at this position 
if you wonder why this has been touched at all.


Abdel.



Re: r33389 - in lyx-devel/trunk: development/scons src src/frontends src/frontends/qt4 src/insets src/mathed

2010-02-09 Thread rgheck

On 02/09/2010 11:23 AM, Abdelrazak Younes wrote:

On 02/09/2010 05:17 PM, rgheck wrote:



Modified: lyx-devel/trunk/src/Cursor.cpp
== 

--- lyx-devel/trunk/src/Cursor.cppTue Feb  9 15:34:58 2010
(r33388)
+++ lyx-devel/trunk/src/Cursor.cppTue Feb  9 17:11:13 2010
(r33389)

@@ -26,6 +26,7 @@
  #include "FuncCode.h"
  #include "FuncRequest.h"
  #include "Language.h"
+#include "LyX.h"
  #include "LyXAction.h"
  #include "LyXRC.h"
  #include "Paragraph.h"
@@ -1668,7 +1669,7 @@
  int yo = 0;
  getPos(xo, yo);
  xo = beforeDispatchPosX_;
-
+
  // check if we had something else in mind, if not, this is the 
future

  // target
  if (x_target_ == -1)


???


I erased a tab I guess. I had to solve a merge conflict at this 
position if you wonder why this has been touched at all.


No, I was wondering why LyX.h has to be included here. Was LyXFunc.h 
included somewhere upstream?


rh



Re: r33389 - in lyx-devel/trunk: development/scons src src/frontends src/frontends/qt4 src/insets src/mathed

2010-02-09 Thread Abdelrazak Younes

On 02/09/2010 05:26 PM, rgheck wrote:

On 02/09/2010 11:23 AM, Abdelrazak Younes wrote:

On 02/09/2010 05:17 PM, rgheck wrote:



Modified: lyx-devel/trunk/src/Cursor.cpp
== 

--- lyx-devel/trunk/src/Cursor.cppTue Feb  9 15:34:58 2010
(r33388)
+++ lyx-devel/trunk/src/Cursor.cppTue Feb  9 17:11:13 2010
(r33389)

@@ -26,6 +26,7 @@
  #include "FuncCode.h"
  #include "FuncRequest.h"
  #include "Language.h"
+#include "LyX.h"
  #include "LyXAction.h"
  #include "LyXRC.h"
  #include "Paragraph.h"
@@ -1668,7 +1669,7 @@
  int yo = 0;
  getPos(xo, yo);
  xo = beforeDispatchPosX_;
-
+
  // check if we had something else in mind, if not, this is 
the future

  // target
  if (x_target_ == -1)


???


I erased a tab I guess. I had to solve a merge conflict at this 
position if you wonder why this has been touched at all.


No, I was wondering why LyX.h has to be included here. Was LyXFunc.h 
included somewhere upstream?


It was needed before the merge conflict with JMarc... I guess it is not 
needed anymore, unless dispatch() is needed I mean..


Abdel.


Re: about the libintl version in the LyX windows installer

2010-02-09 Thread Joost Verburg

On 2/9/2010 8:34 AM, Uwe Stöhr wrote:

 > I'm afraid I won't have time to look into this now.

It is not that pressing, but having this fixed for LyX 2.0 would be good.


I know, but I think it's not going to be easy to make gettext 0.17 MSVC 
compatible.



 > If the LyX problem is caused by a known bug in gettext, maybe the
 > easiest solution for now would be to apply the bugfix to our gettext
 > version. Did someone test on Linux to figure out which gettext version
 > fixes the problem?

It seems that we need at least version 0.16.1, see
http://www.lyx.org/trac/ticket/5034


So it has been confirmed that 0.15 on Linux has the same problem, i.e. 
it's not a Windows gettext issue that still exits in 0.17?


Joost



Re: [patch] implement multirow support - request for help

2010-02-09 Thread Edwin Leuven

Uwe Stöhr wrote:

 > Attached is what I currently have to support multirows.
 >
Has anybody had time to have a look at this?


i started to look at it. drawing seems ok in the attached, but it needs 
more attention wrt lines, latex output and i didn't go over the 
copy/cutting/pasting stuff.
Index: src/insets/InsetTabular.cpp
===
--- src/insets/InsetTabular.cpp (revision 33395)
+++ src/insets/InsetTabular.cpp (working copy)
@@ -70,7 +70,6 @@
 using namespace lyx::support;
 
 using boost::shared_ptr;
-using boost::dynamic_pointer_cast;
 
 
 namespace lyx {
@@ -130,6 +129,7 @@
{ Tabular::M_VALIGN_BOTTOM, "m-valign-bottom" },
{ Tabular::M_VALIGN_MIDDLE, "m-valign-middle" },
{ Tabular::MULTICOLUMN, "multicolumn" },
+   { Tabular::MULTIROW, "multirow" },
{ Tabular::SET_ALL_LINES, "set-all-lines" },
{ Tabular::UNSET_ALL_LINES, "unset-all-lines" },
{ Tabular::SET_LONGTABULAR, "set-longtabular" },
@@ -154,7 +154,8 @@
{ Tabular::SET_LTNEWPAGE, "set-ltnewpage" },
{ Tabular::TOGGLE_LTCAPTION, "toggle-ltcaption" },
{ Tabular::SET_SPECIAL_COLUMN, "set-special-column" },
-   { Tabular::SET_SPECIAL_MULTI, "set-special-multi" },
+   { Tabular::SET_SPECIAL_MULTICOLUMN, "set-special-multicolumn" },
+   { Tabular::SET_SPECIAL_MULTIROW, "set-special-multirow" },
{ Tabular::SET_BOOKTABS, "set-booktabs" },
{ Tabular::UNSET_BOOKTABS, "unset-booktabs" },
{ Tabular::SET_TOP_SPACE, "set-top-space" },
@@ -519,6 +520,7 @@
: cellno(0),
  width(0),
  multicolumn(Tabular::CELL_NORMAL),
+ multirow(Tabular::CELL_NORMAL),
  alignment(LYX_ALIGN_CENTER),
  valignment(LYX_VALIGN_TOP),
  top_line(false),
@@ -537,6 +539,7 @@
: cellno(cs.cellno),
  width(cs.width),
  multicolumn(cs.multicolumn),
+ multirow(cs.multirow),
  alignment(cs.alignment),
  valignment(cs.valignment),
  top_line(cs.top_line),
@@ -562,6 +565,7 @@
std::swap(cellno, rhs.cellno);
std::swap(width, rhs.width);
std::swap(multicolumn, rhs.multicolumn);
+   std::swap(multirow, rhs.multirow);
std::swap(alignment, rhs.alignment);
std::swap(valignment, rhs.valignment);
std::swap(top_line, rhs.top_line);
@@ -680,7 +684,10 @@
swap(cell_info[i], old[i - 1]);
 
updateIndexes();
+
for (col_type c = 0; c < ncols; ++c) {
+   if (isPartOfMultiRow(row, c))
+   continue;
// inherit line settings
idx_type const i = cellIndex(row + 1, c);
idx_type const j = cellIndex(row, c);
@@ -704,6 +711,15 @@
if (row_info.size() == 1)
return;
 
+   size_t const column_count = column_info.size();
+   for (col_type i = 0; i < column_count; ++i) {
+   // Care about multirow cells
+   if (row + 1 < row_info.size() &&
+   cell_info[row][i].multirow == CELL_BEGIN_OF_MULTIROW &&
+   cell_info[row][i + 1].multirow == CELL_PART_OF_MULTIROW) {
+   cell_info[row][i + 1].multirow = CELL_BEGIN_OF_MULTIROW;
+   }
+   }
row_info.erase(row_info.begin() + row);
cell_info.erase(cell_info.begin() + row);
updateIndexes();
@@ -735,14 +751,10 @@
for (row_type r = 0; r < nrows; ++r) {
cell_info[r].insert(cell_info[r].begin() + c + 1, 
CellData(buffer_));
-#if 0
-// FIXME: This code does not work. It deletes the cell's content and
-// it triggers an assertion if the cursor is at pos > 0.
if (cell_info[r][c].multicolumn == CELL_BEGIN_OF_MULTICOLUMN)
cell_info[r][c + 1].multicolumn = 
CELL_PART_OF_MULTICOLUMN;
else
cell_info[r][c + 1].multicolumn = 
cell_info[r][c].multicolumn;
-#endif
}
updateIndexes();
for (row_type r = 0; r < nrows; ++r) {
@@ -809,9 +821,13 @@
numberofcells = 0;
for (row_type row = 0; row < nrows; ++row)
for (col_type column = 0; column < ncols; ++column) {
-   if (!isPartOfMultiColumn(row, column))
+   if (!isPartOfMultiColumn(row, column)
+   && !isPartOfMultiRow(row, column))
++numberofcells;
-   cell_info[row][column].cellno = numberofcells - 1;
+   if (isPartOfMultiRow(row, column))
+   cell_info[row][column].cellno = cell_info[row - 
1][column].cellno;
+   else
+   cell_info[row][column].cellno = numberofcells - 
1;
}
 
rowofcell.resize(numberofcells);
@@ -819,7 +835,8 @@
idx_type i = 0;
   

Re: r33370 - in lyx-devel/trunk/src: . frontends/qt4 frontends/qt4/ui insets

2010-02-09 Thread Jürgen Spitzmüller
younes wrote:
> -void FloatPlacement::set(lyx::InsetFloatParams const & params)
> +void FloatPlacement::paramsToDialog(Inset const * inset)
>  {
> +   InsetFloat const * fl = static_cast(inset);
> +   InsetFloatParams const & params = fl->params();
> +
> +   floatType->setText(toqstr(params.type));

i18n please.

Jürgen


Re: about the libintl version in the LyX windows installer

2010-02-09 Thread Uwe Stöhr

>> It seems that we need at least version 0.16.1, see
>> http://www.lyx.org/trac/ticket/5034
>
> So it has been confirmed that 0.15 on Linux has the same problem, 
i.e. > it's not a Windows gettext issue that still exits in 0.17?


Yes, as I understood it. JMarc is this correct?

Inkscape 0.47 also provides the feature to switch the menu language via 
the preferences and this works under Windows. They are using GTK and 
gettext 0.17.


regards Uwe


Re: r33260 - lyx-devel/trunk/src/frontends/qt4

2010-02-09 Thread Pavel Sanda
Pavel Sanda wrote:
> >If _really_ needed, we can
> >   put the read-only setting inside a DEVEL_VERSION block, but I do not
> 
> yes, i would like to have it.

its in r33402.
pavel


Re: Slow text cursor in Lyx

2010-02-09 Thread Pavel Sanda
danielpferreira wrote:
> I couldn't find any information on this anywere else.

http://www.lyx.org/trac/wiki/Components#Performanceissues

> Is the text cursor's speed configurable?

if cpu/gpu is not the bottleneck then you can setup repeat-key frequency in 
your OS not in lyx.
look at your CPU performance while editing.

>Does anyone else feel the same way
> about the text cursor's speed? Is this a known bug?

some people yes. problem could be too old hardware, or badly configured graphic 
stuff of Xorg (in case you use linux).
usually hard-to-catch problem.

pavel


Re: [patch] implement multirow support - request for help

2010-02-09 Thread Uwe Stöhr

> i started to look at it.

Many thanks!

You have done some additional simplifications. With your version, setting a multicolumn is no longer 
possible. Can you please have a look?


> drawing seems ok in the attached, but it needs more attention wrt lines, 
latex output and
> i didn't go over the copy/cutting/pasting stuff.

I fixed now some remaining \hline issues.

However there are many other minor issues to solve:

- The content of the multirow is not horizontally centered
- Adding/deleting columns while the cursor is in a table row containing a multirow cell is not 
properly working.

- plain text export needs to be done

I propose that I or you put the patch into branch in a few days and we continue to fine-tune the 
remaining issues. The patch is already very big and I fear we might loose the track if we work only 
with patches. What do you think?


regards Uwe


Re: [patch] implement multirow support - request for help

2010-02-09 Thread Uwe Stöhr

Am 10.02.2010 05:32, schrieb Uwe Stöhr:


I fixed now some remaining \hline issues.


Attached is that part of the patch.


I propose that I or you put the patch into branch in a few days...


I meant of course trunk.

regards Uwe
 int Tabular::TeXTopHLine(odocstream & os, row_type row, string const lang) const
 {
 	// we only output complete row lines and the 1st row here, the rest
@@ -1884,6 +1992,13 @@
 	col_type nset = 0;
 	for (col_type c = 0; c < ncols; ++c) {
 		topline.push_back(topLine(cellIndex(row, c)));
+		// If cell is part of a multirow and not the first cell of the
+		// multirow, no line must be drawn.
+		if (row != 0)
+			if (isMultiRow(cellIndex(row, c))) {
+if (isMultiRow(cellIndex(row - 1, c)))
+	topline[c] = false;
+			}
 		if (topline[c])
 			++nset;
 	}
@@ -1935,6 +2050,15 @@
 	for (col_type c = 0; c < ncols; ++c) {
 		bottomline.push_back(bottomLine(cellIndex(row, c)));
 		topline.push_back(!lastrow && topLine(cellIndex(row + 1, c)));
+		// If cell is part of a multirow and not the last or first cell of the
+		// multirow, no line must be drawn.
+		if (!lastrow)
+			if (isMultiRow(cellIndex(row, c))) {
+if (isMultiRow(cellIndex(row + 1, c))) {
+	bottomline[c] = false;
+	topline[c] = false;
+}
+			}
 		nextrowset &= topline[c];
 	}
 
@@ -1955,7 +2079,7 @@
 		if (use_booktabs)
 			os << (lastrow ? "\\bottomrule" : "\\midrule");
 		else
-			os << "\\hline";
+			os << "\\hline ";
 	} else {
 		for (col_type c = 0; c < ncols; ++c) {
 			if (bottomline[c]) {



Re: r33370 - in lyx-devel/trunk/src: . frontends/qt4 frontends/qt4/ui insets

2010-02-09 Thread Abdelrazak Younes

On 02/09/2010 07:47 PM, Jürgen Spitzmüller wrote:

younes wrote:
   

-void FloatPlacement::set(lyx::InsetFloatParams const&  params)
+void FloatPlacement::paramsToDialog(Inset const * inset)
  {
+   InsetFloat const * fl = static_cast(inset);
+   InsetFloatParams const&  params = fl->params();
+
+   floatType->setText(toqstr(params.type));
 

i18n please.
   


Should be OK now (untested). FWIW, I wanted to implement a combo with 
the list of available types but did not find the time... I think this 
would be a good ui improvement.


Abdel.



Re: r33370 - in lyx-devel/trunk/src: . frontends/qt4 frontends/qt4/ui insets

2010-02-09 Thread Jürgen Spitzmüller
Abdelrazak Younes wrote:
> Should be OK now (untested).

No, it's not. You cannot use params.type for that, because that's not flagged 
for translation. Have a look at InsetCollapsable::floatName().

Jürgen