Re: Wiki - suggested edit (mac)

2008-03-14 Thread Pavel Sanda
 (No password so I couldn't do it myself.) http://wiki.lyx.org/Mac/Mac#toc7

btw what is the policy about wiki password? shouldn't we disclose it for
interested users?

pavel


Re: Changes to the website content

2008-03-14 Thread Pavel Sanda
 Thanks for the replies. I went ahead and made some content changes to the
 front page and to the Download Links page. I am attaching the patch to
 this email. This is my first time using SVN or doing anything of this
 nature, so please let me know if I did it wrong.

some comments:

1. small patches like this send in plain, not compressed, so others can
   easily read your work and add their comments for next iteration ;)

2. the resulting html code is horrible to read (i mean _code_ readability).
   please compare the previous format and the changes you introduced.
   try to adhere to indentation rules etc. so its easy to parse html
   just by your eyes.

3. from the quick links you introduced it seems we have no linux port.

4. you wiped out the keyword WYSIWYM, emphasize around structured is gone.
   these are the key properties of lyx and shouldn't be abandoned.


besides your changes there is still some leftover from past - there has been
complaint wrt the readability of text and the patch which should improve it.
but the lack of any comments from others prevented me from commiting it.
i use this occassion to ask again what other thinks about such kind of
background changes in our web, snpshaot see here:
http://195.113.31.123/~sanda/junk/lyx/www2/

 i remeber some recent python things (can give you pointers if you are
  interested)
  - request of csv2lyx: table import (now in perl and buggy)
  - conversion of lfun doxy docs to lyx (now in bash)
 
 Those sound interesting, Pavel. How can I get started with learning the
 internals of LyX so that I can do these tasks? For example, I am unfamiliar
 with the LyX markup language, as well as the overall architecture of the LyX
 program (e.g. where csv2lyx would be called from, etc.) 

you won't find documentation for this, you simply have to play with it, thats 
how
you learn. if something make trouble then read the source code, if that still 
does not
work you ask on list.

 Also, if there are
 any other good beginner tasks for someone new to LyX (preferably in Python),
 please point me to them! :)

yes one other thing came to my mind - there are problems wrt conversion of old
configuration files to newer one and there was suggestion of writing preferences
convertor.

as far as pointers:
csv2lyx: 
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg136791.html

lfuns  doxy: 
http://wiki.lyx.org/LyX/LyxFunctions
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg133161.html
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg135048.html

preferences:
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg134184.html

 By the way, are patches usually submitted over the mailing list, or is there
 some other way of submitting them?

mailing list is the best, you get review easily.

pavel


Re: Wiki - suggested edit (mac)

2008-03-14 Thread christian . ridderstrom

On Fri, 14 Mar 2008, Pavel Sanda wrote:


(No password so I couldn't do it myself.) http://wiki.lyx.org/Mac/Mac#toc7


btw what is the policy about wiki password? shouldn't we disclose it for 
interested users?


Certainly!  I hope the password prompt now says that the user should ask 
the developers for the passoword. As for policy, I think we should give it 
to anyone that asks basically.


/C

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

1.6svn regression: enum/item in tables

2008-03-14 Thread Dov Feldstern

Hi!

It seems that enumeration/itemize (perhaps other layouts as well?) are 
no longer working inside a table. See the attached lyx file, created 
with r23573 from March 8, which still works fine. Try opening it in 
current svn (by r23669 from March 11 the problem already exists) --- the 
itemize and enumeration layouts are not recognized --- not in the GUI, 
nor in the latex output --- the text just appears in standard layout.


(I've been away for the past few weeks, and didn't go over the mailing 
list very thoroughly, so I apologize if this has already been reported).


Thanks!
Dov


enum_item_in_table.lyx
Description: application/lyx


Re: Wiki - suggested edit (mac)

2008-03-14 Thread Pavel Sanda
 Certainly!  I hope the password prompt now says that the user should ask 
 the developers for the passoword. As for policy, I think we should give it 
 to anyone that asks basically.

i sent it privately.
p


lyx-1.6svn of march 12. believes files are changed as soon as they open, even readonly files

2008-03-14 Thread Helge Hafting

Whenever this lyx opens a file, it is flagged as changed.
Even the user guide opens and is flagged (changed)(read only)
which is amusing. I get the question about saving it if I quit immediately.

Obviously, the attempt at saving to a readonly file fails, LyX
even tell me to check if the file/directory might be protected against 
writing. . .


Helge Hafting


LyX 1.6svn bug - irritating and wrong message about included file using module not used in parent file

2008-03-14 Thread Helge Hafting

Today I split a document in two, so I can publish the content
with two different front pages. The idea is simple:

The first document has a latex preamble that sets up the front page,
and in the main window it simply \input the second document which has
all the content. (TOC, headings, text paragraphs, figures)
The \input is done using LyX, no ERT for that.


I split the document by making two copies. From the first I deleted
all content and added the \input. From the second I removed
my custom preamble because that is now in the first document.

The preamble merely defines some commands that the
second document will use to build a front page. Several
different first documents can now use the same content, but get a 
different front.



All this works very well, except that I get a bogus error message each time
I do File-Export-Pdf(pdflatex). I get:
Included file 'content.lyx' uses module 'logicalmkup' which is not used 
in the parent file.


The message is wrong.
Both documents have logical markup in their settings.
The first document has no content (other than \input) so
obviously it doesn't actually _use_ any logical markup. But adding a word
with logical markup doesn't make the message go away. There is no mismatch
in modules.

Ideally, not using logicalmkup in the first file should not be a 
problem at all,
but I can certainly live with having to put all modules in the master 
document.

The bogus message need to go away though.

Helge Hafting





Lyx-1.6svn display bug: both indentation _and_ vertical space (with vert.space selected)

2008-03-14 Thread Helge Hafting

LyX support indentation or vertical space for separating paragraphs.

Indentation is displayed correctly in the main window.

Vertical space is also displayed, but the indentation no longer 
disappear. This

is a recent bug.

Helge Hafting


LyX-1.6svn crash when changing width of graphichs - so this can't be done.

2008-03-14 Thread Helge Hafting

To reproduce the crash:
* open a file that has graphichs
* right-click a graphic to bring up the settings dialog
* change the width from 100% to 60% of linelengt for example
* Click the OK button and LyX dies like this:

Assertion triggered in bool lyx::EmbeddedFile::extract() const by 
failing check enabled() in file ../../lyx-devel/src/EmbeddedFiles.cpp:145


The emergency savefile does not have the new width, so changig the width
of graphichs is currently impossible.

Helge Hafting




Re: setting lines in tables

2008-03-14 Thread Edwin Leuven

Edwin Leuven wrote:
it is not completely finished yet, but works pretty ok and comments 
would be more than welcome


small update attached

give it a try: it is nice to be finally able to easily set the lines you 
want
Index: src/insets/InsetTabular.h
===
--- src/insets/InsetTabular.h	(revision 23714)
+++ src/insets/InsetTabular.h	(working copy)
@@ -106,14 +106,6 @@
 		///
 		VALIGN_MIDDLE,
 		///
-		M_TOGGLE_LINE_TOP,
-		///
-		M_TOGGLE_LINE_BOTTOM,
-		///
-		M_TOGGLE_LINE_LEFT,
-		///
-		M_TOGGLE_LINE_RIGHT,
-		///
 		M_ALIGN_LEFT,
 		///
 		M_ALIGN_RIGHT,
@@ -244,13 +236,13 @@
 	Tabular(Buffer const , col_type columns_arg, row_type rows_arg);
 
 	/// Returns true if there is a topline, returns false if not
-	bool topLine(idx_type cell, bool wholerow = false) const;
+	bool topLine(idx_type cell) const;
 	/// Returns true if there is a topline, returns false if not
-	bool bottomLine(idx_type cell, bool wholerow = false) const;
+	bool bottomLine(idx_type cell) const;
 	/// Returns true if there is a topline, returns false if not
-	bool leftLine(idx_type cell, bool wholecolumn = false) const;
+	bool leftLine(idx_type cell) const;
 	/// Returns true if there is a topline, returns false if not
-	bool rightLine(idx_type cell, bool wholecolumn = false) const;
+	bool rightLine(idx_type cell) const;
 
 	///
 	bool topAlreadyDrawn(idx_type cell) const;
@@ -285,13 +277,13 @@
 	///
 	void setAllLines(idx_type cell, bool line);
 	///
-	void setTopLine(idx_type cell, bool line, bool wholerow = false);
+	void setTopLine(idx_type cell, bool line);
 	///
-	void setBottomLine(idx_type cell, bool line, bool wholerow = false);
+	void setBottomLine(idx_type cell, bool line);
 	///
-	void setLeftLine(idx_type cell, bool line, bool wholecolumn = false);
+	void setLeftLine(idx_type cell, bool line);
 	///
-	void setRightLine(idx_type cell, bool line, bool wholecolumn = false);
+	void setRightLine(idx_type cell, bool line);
 	///
 	void setAlignment(idx_type cell, LyXAlignment align,
 			  bool onlycolumn = false);
@@ -330,6 +322,7 @@
 	///
 	void copyRow(row_type);
 	///
+	///
 	void appendColumn(idx_type cell);
 	///
 	void deleteColumn(col_type column);
@@ -743,6 +736,10 @@
 
 	/// lock cell with given index
 	void edit(Cursor  cur, bool front, EntryDirection entry_from);
+	/// get table rom from x coordinate
+	int getRowFromY(Cursor  cur, int y) const;
+	/// get table column from y coordinate
+	int getColumnFromX(Cursor  cur, int x) const;
 	///
 	Inset * editXY(Cursor  cur, int x, int y);
 	/// can we go further down on mouse click?
@@ -772,7 +769,6 @@
 			   idx_type cell, bool erased) const;
 	///
 	void setCursorFromCoordinates(Cursor  cur, int x, int y) const;
-
 	///
 	void moveNextCell(Cursor  cur);
 	///
Index: src/insets/InsetTabular.cpp
===
--- src/insets/InsetTabular.cpp	(revision 23714)
+++ src/insets/InsetTabular.cpp	(working copy)
@@ -85,10 +85,10 @@
 
 namespace {
 
-int const ADD_TO_HEIGHT = 2;
-int const ADD_TO_TABULAR_WIDTH = 2;
-int const default_line_space = 10;
-int const WIDTH_OF_LINE = 5;
+int const ADD_TO_HEIGHT = 2; // in cell
+int const ADD_TO_TABULAR_WIDTH = 6; // horiz space before and after the table
+int const default_line_space = 10; // ?
+int const WIDTH_OF_LINE = 5; // space between double lines
 
 
 ///
@@ -120,10 +120,6 @@
 	{ Tabular::VALIGN_TOP, valign-top },
 	{ Tabular::VALIGN_BOTTOM, valign-bottom },
 	{ Tabular::VALIGN_MIDDLE, valign-middle },
-	{ Tabular::M_TOGGLE_LINE_TOP, m-toggle-line-top },
-	{ Tabular::M_TOGGLE_LINE_BOTTOM, m-toggle-line-bottom },
-	{ Tabular::M_TOGGLE_LINE_LEFT, m-toggle-line-left },
-	{ Tabular::M_TOGGLE_LINE_RIGHT, m-toggle-line-right },
 	{ Tabular::M_ALIGN_LEFT, m-align-left },
 	{ Tabular::M_ALIGN_RIGHT, m-align-right },
 	{ Tabular::M_ALIGN_CENTER, m-align-center },
@@ -478,9 +474,9 @@
 	  multicolumn(Tabular::CELL_NORMAL),
 	  alignment(LYX_ALIGN_CENTER),
 	  valignment(LYX_VALIGN_TOP),
-	  top_line(true),
+	  top_line(false),
 	  bottom_line(false),
-	  left_line(true),
+	  left_line(false),
 	  right_line(false),
 	  usebox(BOX_NONE),
 	  rotate(false),
@@ -538,7 +534,7 @@
 Tabular::RowData::RowData()
 	: ascent(0),
 	  descent(0),
-	  top_line(true),
+	  top_line(false),
 	  bottom_line(false),
 	  top_space_default(false),
 	  bottom_space_default(false),
@@ -554,7 +550,7 @@
 Tabular::ColumnData::ColumnData()
 	: alignment(LYX_ALIGN_CENTER),
 	  valignment(LYX_VALIGN_TOP),
-	  left_line(true),
+	  left_line(false),
 	  right_line(false),
 	  width(0)
 {
@@ -592,11 +588,7 @@
 	column_info.reserve(10);
 	cell_info.reserve(100);
 	fixCellNums();
-	for (row_type i = 0; i  rows_arg; ++i)
-		cell_info[i].back().right_line = true;
-	row_info.back().bottom_line = true;
-	row_info.front().bottom_line = true;
-	column_info.back().right_line = true;
+	// FIXME: set LyX silly default lines
 	is_long_tabular = false;
 	rotate = false;

Re: 1.6svn regression: enum/item in tables

2008-03-14 Thread Dov Feldstern

Dov Feldstern wrote:

Hi!

It seems that enumeration/itemize (perhaps other layouts as well?) are 
no longer working inside a table. See the attached lyx file, created 
with r23573 from March 8, which still works fine. Try opening it in 
current svn (by r23669 from March 11 the problem already exists) --- the 
itemize and enumeration layouts are not recognized --- not in the GUI, 
nor in the latex output --- the text just appears in standard layout.


Using mercurials bisect extension 
(http://www.selenic.com/mercurial/wiki/index.cgi/BisectExtension), I was 
able to track this bug down to r23662. Richard --- any ideas?


Thanks!
Dov


Text completion not working in tables?

2008-03-14 Thread Dov Feldstern

Hi!

Stefan --- the completion stuff looks really, really nice. Thanks!

It seems to me that text completion is not working in tables. Math 
completion *does* work, though. Can anything be done about this?


Thanks!
Dov


Inserted subdocument is erroneoulsy embedded - I didn't ask for embedding in this case

2008-03-14 Thread Helge Hafting

insert-subdocument. Select some other lyx document.
Leave the embed checkbox blank as embedding is not wanted this time
Observe that the included file is embedded anyway!

This is simple to fix for the user - just bring up the dialog again
and un-embed the file. No-one should need to do that though.

Helge Hafting


Text completion and RTL

2008-03-14 Thread Dov Feldstern

Hi!

There's a small problem with the text completion and RTL text:

The grayed-out inline completion appears backwards in RTL text (see 
attached image).


I can explain why it is happening (and why this problem wasn't observed 
 when RTL was tested with latin characters), but I don't know how to 
easily solve the issue. The reason is something like this: when painting 
text, LyX applies the bidi algorithm, so that the string that it 
ultimately passes to Qt for painting is already in visual order; 
however, Qt 4 now applies its own bidi algorithm to all strings that it 
paints, and it doesn't seem to provide any API for saying the string is 
already in visual order, just paint it as it is. To get around this 
problem, we paint RTL strings one character at a time (see 
http://www.lyx.org/trac/browser/lyx-devel/trunk/src/rowpainter.cpp?rev=23522#L259). 
But I imagine that the grayed-out inline completion is painted as a full 
string...


I haven't looked at the completion code at all, so I'm not sure exactly 
what's going on; but I'm pretty sure that this is the correct 
explanation of the problem. Any ideas on what can be done to solve it?


Thanks!
Dov
inline: rtl_text_completion.png

Re: Time for 1.6 alpha?

2008-03-14 Thread Jean-Marc Lasgouttes
Andre Poenitz [EMAIL PROTECTED] writes:

 On Thu, Mar 13, 2008 at 09:46:16AM +0100, Jean-Marc Lasgouttes wrote:
 José Matos [EMAIL PROTECTED] writes:
Other than Juergen who has another feature waiting in the backburner? 
  How 
  much time do you need to put the feature in?
 
 I am currently playing with the qt code in the configure script (use
 qmake to get to qt flags), but I am not sure it will work out to be
 usable.

 What kind of information are you trying to extract from qmake?

I would like to use it like pkg-config (but working also with the
Qt/Mac binaries provided by trolltech). Here is my current patch,
using a set of m4 macros I found somewhere (there is probably room for
simplfication in there).

The problem now on the mac is that the macros expect qmake to generate
a makefile by default. On the mac, it produces a xcode project now
(since 4.3?). I guess I could work around this, but the result would
be very fragile, I guess.

JMarc

svndiff

Index: src/frontends/qt4/Makefile.am
===
--- src/frontends/qt4/Makefile.am	(revision 23686)
+++ src/frontends/qt4/Makefile.am	(working copy)
@@ -8,15 +8,15 @@ CLEANFILES += $(BUILT_SOURCES)
 
 #  Qt stuff  #
 # Use _() for localization instead of tr() or trUtf8()
-UIC4FLAGS=-tr lyx::qt_
+UICFLAGS=-tr lyx::qt_
 
 ui_%.h: ui/%.ui
-	$(UIC4) $(UIC4FLAGS) $ -o $@
+	$(UIC) $(UICFLAGS) $ -o $@
 
 MOCEDFILES = $(MOCHEADER:%.h=%_moc.cpp)
 
 %_moc.cpp: %.h
-	$(MOC4) -o $@ $
+	$(MOC) -o $@ $
 
 Resources.qrc: Makefile
 	echo !DOCTYPE RCCRCC version='1.0'qresource  $@
@@ -26,7 +26,7 @@ Resources.qrc: Makefile
 	echo /qresource/RCC  $@
 
 Resources.cpp: Resources.qrc
-	$(RCC4) $ -name Resources -o $@
+	$(RCC) $ -name Resources -o $@
 
 
 #  LIBRARIES  #
@@ -34,15 +34,15 @@ Resources.cpp: Resources.qrc
 noinst_LTLIBRARIES = liblyxqt4.la
 
 liblyxqt4_la_DEPENDENCIES = $(MOCEDFILES)
-liblyxqt4_la_LDFLAGS = $(QT4_LDFLAGS)
-liblyxqt4_la_LIBADD = $(QT4_LIB) 
+liblyxqt4_la_LDFLAGS = $(QT_LDFLAGS)
+liblyxqt4_la_LIBADD = $(QT_LIB) 
 
 AM_CPPFLAGS += \
-	$(QT4_CPPFLAGS) \
+	$(QT_CPPFLAGS) \
 	-I$(top_srcdir)/src \
 	-I$(top_srcdir)/src/frontends \
 	-I$(top_srcdir)/images \
-	$(QT4_INCLUDES) $(BOOST_INCLUDES)
+	$(BOOST_INCLUDES)
 
 SOURCEFILES = \
 	ButtonPolicy.cpp \
Index: src/Makefile.am
===
--- src/Makefile.am	(revision 23686)
+++ src/Makefile.am	(working copy)
@@ -23,6 +23,9 @@ OTHERLIBS = $(BOOST_LIBS) $(INTLLIBS) $(
 noinst_LTLIBRARIES = liblyxcore.la
 bin_PROGRAMS = lyx
 
+lyx_CXXFLAGS = $(QT_CXXFLAGS) $(AM_CXXFLAGS)
+lyx_CPPFLAGS = $(QT_CPPFLAGS) $(AM_CPPFLAGS)
+lyx_LDFLAGS  = $(QT_LDFLAGS) $(LDFLAGS)
 lyx_LDADD = \
 	liblyxcore.la \
 	liblyxmathed.la \
@@ -32,7 +35,7 @@ lyx_LDADD = \
 	liblyxgraphics.la \
 	support/liblyxsupport.la \
 	$(OTHERLIBS) \
-	$(QT4_LIB) 
+	$(QT_LIBS) 
 
 if LYX_WIN_RESOURCE
 .rc.o:
Index: src/support/Makefile.am
===
--- src/support/Makefile.am	(revision 23686)
+++ src/support/Makefile.am	(working copy)
@@ -7,8 +7,7 @@ EXTRA_DIST = pch.h \
 
 noinst_LTLIBRARIES = liblyxsupport.la
 
-liblyxsupport_la_LIBADD = $(LIBSHLWAPI) $(QT4_CORE_LIB) $(BOOST_SIGNALS)
-liblyxsupport_la_LDFLAGS = $(QT4_CORE_LDFLAGS)
+liblyxsupport_la_LIBADD = $(LIBSHLWAPI) $(BOOST_SIGNALS)
 
 BUILT_SOURCES = $(PCH_FILE)
 
@@ -23,7 +22,7 @@ CLEANFILES += $(MOCEDFILES)
 BUILT_SOURCES += $(MOCEDFILES)
 
 %_moc.cpp: %.h
-	$(MOC4) -o $@ $
+	$(MOC) -o $@ $
 
 liblyxsupport_la_DEPENDENCIES = $(MOCEDFILES)
 
@@ -31,7 +30,7 @@ liblyxsupport_la_DEPENDENCIES = $(MOCEDF
 ##
 
 AM_CPPFLAGS += $(PCH_FLAGS) -I$(srcdir)/.. $(BOOST_INCLUDES)
-AM_CPPFLAGS += $(QT4_CPPFLAGS) $(QT4_CORE_INCLUDES) -I$(srcdir)/minizip
+AM_CPPFLAGS += $(QT_CPPFLAGS) -I$(srcdir)/minizip
 
 # force the use of C++ compiler for minizip/*.c files, because
 # gcc can not go through the included boost files.
@@ -145,8 +144,8 @@ check_PROGRAMS = \
 	check_lstrings
 
 check_convert_LDADD = ../debug.o convert.o docstring.o lstrings.o unicode.o \
-	$(BOOST_LIBS) $(QT4_CORE_LIB)
-check_convert_LDFLAGS = $(QT4_CORE_LDFLAGS)
+	$(BOOST_LIBS) $(QT_CORE_LIBS)
+check_convert_LDFLAGS = $(QT_CORE_LDFLAGS)
 check_convert_SOURCES = \
 	tests/check_convert.cpp \
 	tests/boost.cpp
@@ -157,8 +156,8 @@ check_filetools_SOURCES = \
 	tests/boost.cpp
 
 check_lstrings_LDADD = ../debug.o lstrings.o convert.o docstring.o unicode.o \
-	$(QT4_CORE_LIB)
-check_lstrings_LDFLAGS = $(QT4_CORE_LDFLAGS)
+	$(QT_CORE_LIB)
+check_lstrings_LDFLAGS = $(QT_CORE_LDFLAGS)
 check_lstrings_SOURCES = \
 	tests/check_lstrings.cpp \
 	tests/boost.cpp
Index: src/client/Makefile.am
===
--- src/client/Makefile.am	(revision 23686)
+++ 

Re: [Cvslog] r23712 - in /lyx-devel/branches/BRANCH_1_5_X: src/mathed/...

2008-03-14 Thread Uwe Stöhr

 The recipe is as follows:
 1) put the cursor inside a labeled formula
 2) choose Insert-Label
 3) delete the label in the label dialog (OK is disabled)

This was the problem, you have to use INSERT- Label to delete it. Nobody is expecting this and this 
was often blamed in the past by users.


 4) press the space bar (OK gets enabled)
 5) hit the enter key or press the OK button
 6) the label is deleted but the formula is still numbered

 As it is now, after step 5) the label gets deleted, but only
 because the formula is now turned into an unnumbered one, meaning
 that you have to hit again Alt-m-n to restore the numbering.

A label that is not referenced, can be left as is and doesn't change anything. But I agree that it 
is often better that the numbering is untouched and only the label is deleted.


regards Uwe


Re: Take 2: time for alpha

2008-03-14 Thread Uwe Stöhr

 beta 1 - 2 April

I forgot that I have to do a fileformat change to get Japanese properly working, but won't have the 
time to work on that stuff before beta 1. IS it OK to do it after beta 1 is out?


I promised that LyX 1.6 will work for Japanese and Koji Yokata invested a lot of time to reach this 
goal. All that is now left are a few changes in the LaTeX-output and the languages file. But this 
requires some time for careful testing.


regards Uwe


Re: Text completion and RTL

2008-03-14 Thread Dov Feldstern

Stefan Schimanski wrote:


Am 14.03.2008 um 15:05 schrieb Dov Feldstern:


Hi!

There's a small problem with the text completion and RTL text:

The grayed-out inline completion appears backwards in RTL text (see 
attached image).


I have to check my code as well. The idea was to reverse the string if 
needed before telling Qt about. But maybe I got something wrong in this 
logic. Take a look at RowPainter::paintInlineCompletion. That's the code 
for the text mode.


It's a bit more involved than you might expect, because the inline 
completion consists of the unique part (drawn in dark grey) and the 
non-unique part (drawn in light grey).


I do a reversal of the rtl text there. No idea why it does not work. Or 
maybe Qt its own bidi magic?


Thanks, I'll take a look at this. But I'll be a few days though...



Stefan




Re: Text completion not working in tables?

2008-03-14 Thread Dov Feldstern

Stefan Schimanski wrote:


Am 14.03.2008 um 14:14 schrieb Dov Feldstern:


Hi!

Stefan --- the completion stuff looks really, really nice. Thanks!

It seems to me that text completion is not working in tables. Math 
completion *does* work, though. Can anything be done about this?


It can. But at the moment the support is only in InsetMathNest and 
InsetText. Have to try it for InsetTabular. Probably one can just copy 
the code from InsetText.


Is the text inside a table cell not an InsetText? I sort of assumed that 
every cell contains an InsetText for its text...




Stefan




Re: Text completion and RTL

2008-03-14 Thread Stefan Schimanski


Am 14.03.2008 um 15:25 schrieb Dov Feldstern:


Stefan Schimanski wrote:

Am 14.03.2008 um 15:05 schrieb Dov Feldstern:

Hi!

There's a small problem with the text completion and RTL text:

The grayed-out inline completion appears backwards in RTL text  
(see attached image).


I have to check my code as well. The idea was to reverse the string  
if needed before telling Qt about. But maybe I got something wrong  
in this logic. Take a look at RowPainter::paintInlineCompletion.  
That's the code for the text mode.
It's a bit more involved than you might expect, because the inline  
completion consists of the unique part (drawn in dark grey) and the  
non-unique part (drawn in light grey).
I do a reversal of the rtl text there. No idea why it does not  
work. Or maybe Qt its own bidi magic?


Thanks, I'll take a look at this. But I'll be a few days though...


Sure, no problem. Btw, do you use a rtl locale for the gui? I mean  
maybe your Qt does some RTL magic which mine does not. Just an idea...


Stefan


Re: Text completion and RTL

2008-03-14 Thread Dov Feldstern

Stefan Schimanski wrote:


Am 14.03.2008 um 15:25 schrieb Dov Feldstern:


Stefan Schimanski wrote:

Am 14.03.2008 um 15:05 schrieb Dov Feldstern:

Hi!

There's a small problem with the text completion and RTL text:

The grayed-out inline completion appears backwards in RTL text (see 
attached image).


I have to check my code as well. The idea was to reverse the string 
if needed before telling Qt about. But maybe I got something wrong in 
this logic. Take a look at RowPainter::paintInlineCompletion. That's 
the code for the text mode.
It's a bit more involved than you might expect, because the inline 
completion consists of the unique part (drawn in dark grey) and the 
non-unique part (drawn in light grey).
I do a reversal of the rtl text there. No idea why it does not work. 
Or maybe Qt its own bidi magic?


Thanks, I'll take a look at this. But I'll be a few days though...


Sure, no problem. Btw, do you use a rtl locale for the gui? I mean maybe 
your Qt does some RTL magic which mine does not. Just an idea...




I'll keep this possibility in mind, thanks...


Stefan




Re: Text completion not working in tables?

2008-03-14 Thread Stefan Schimanski


Am 14.03.2008 um 14:14 schrieb Dov Feldstern:


Hi!

Stefan --- the completion stuff looks really, really nice. Thanks!

It seems to me that text completion is not working in tables. Math  
completion *does* work, though. Can anything be done about this?


It can. But at the moment the support is only in InsetMathNest and  
InsetText. Have to try it for InsetTabular. Probably one can just copy  
the code from InsetText.


Stefan


Re: Text completion not working in tables?

2008-03-14 Thread Stefan Schimanski


Am 14.03.2008 um 15:26 schrieb Dov Feldstern:


Stefan Schimanski wrote:

Am 14.03.2008 um 14:14 schrieb Dov Feldstern:

Hi!

Stefan --- the completion stuff looks really, really nice. Thanks!

It seems to me that text completion is not working in tables. Math  
completion *does* work, though. Can anything be done about this?
It can. But at the moment the support is only in InsetMathNest and  
InsetText. Have to try it for InsetTabular. Probably one can just  
copy the code from InsetText.


Is the text inside a table cell not an InsetText? I sort of assumed  
that every cell contains an InsetText for its text...


AFAIK it only uses the Text class for every cell. Otherwise the cursor  
would need another slice for the table and the InsetText, and hence  
many special handling to avoid strange positions which are in the  
table, but not in the InsetText.


Stefan


Re: Text completion and RTL

2008-03-14 Thread Stefan Schimanski


Am 14.03.2008 um 15:05 schrieb Dov Feldstern:


Hi!

There's a small problem with the text completion and RTL text:

The grayed-out inline completion appears backwards in RTL text (see  
attached image).


I can explain why it is happening (and why this problem wasn't  
observed  when RTL was tested with latin characters), but I don't  
know how to easily solve the issue. The reason is something like  
this: when painting text, LyX applies the bidi algorithm, so that  
the string that it ultimately passes to Qt for painting is already  
in visual order; however, Qt 4 now applies its own bidi algorithm to  
all strings that it paints, and it doesn't seem to provide any API  
for saying the string is already in visual order, just paint it as  
it is. To get around this problem, we paint RTL strings one  
character at a time (see http://www.lyx.org/trac/browser/lyx-devel/trunk/src/rowpainter.cpp?rev=23522#L259) 
. But I imagine that the grayed-out inline completion is painted as  
a full string...


I haven't looked at the completion code at all, so I'm not sure  
exactly what's going on; but I'm pretty sure that this is the  
correct explanation of the problem. Any ideas on what can be done to  
solve it?


I have to check my code as well. The idea was to reverse the string if  
needed before telling Qt about. But maybe I got something wrong in  
this logic. Take a look at RowPainter::paintInlineCompletion. That's  
the code for the text mode.


It's a bit more involved than you might expect, because the inline  
completion consists of the unique part (drawn in dark grey) and the  
non-unique part (drawn in light grey).


I do a reversal of the rtl text there. No idea why it does not work.  
Or maybe Qt its own bidi magic?


Stefan


Re: Take 2: time for alpha

2008-03-14 Thread Pavel Sanda
 I forgot that I have to do a fileformat change to get Japanese properly 
 working, but won't have the time to work on that stuff before beta 1. IS it 
 OK to do it after beta 1 is out?

fileformat change is allowed after beta.
fileformat change is not allowed after stable release is released.

however there are inconsistencies between official site and wiki
whether release candidate is considered to be a stable release.

i dont remember exactly but have the feeling that last time fileformat 
change were ok after rc1 but not after rc2. maybe Jose should clarify this.

pavel


Re: Inserted subdocument is erroneoulsy embedded - I didn't ask for embedding in this case

2008-03-14 Thread Bo Peng
  This is simple to fix for the user - just bring up the dialog again
  and un-embed the file. No-one should need to do that though.

Could you try again?

Bo


Re: lyx-1.6svn of march 12. believes files are changed as soon as they open, even readonly files

2008-03-14 Thread Bo Peng
On Fri, Mar 14, 2008 at 6:22 AM, Helge Hafting
[EMAIL PROTECTED] wrote:
 Whenever this lyx opens a file, it is flagged as changed.
  Even the user guide opens and is flagged (changed)(read only)
  which is amusing. I get the question about saving it if I quit immediately.

Is this still the case?

Bo


Re: [Cvslog] r23712 - in /lyx-devel/branches/BRANCH_1_5_X: src/mathed/...

2008-03-14 Thread Enrico Forestieri
On Fri, Mar 14, 2008 at 03:15:34PM +0100, Uwe Stöhr wrote:
   The recipe is as follows:
   1) put the cursor inside a labeled formula
   2) choose Insert-Label
   3) delete the label in the label dialog (OK is disabled)
 
 This was the problem, you have to use INSERT- Label to delete it.
 Nobody is expecting this and this 
 was often blamed in the past by users.

Then, in the same vein, nobody expects to use Insert-Label in order
to change it. This means that bug 2556 is only an embodiment of an
UI bug that still is unresolved...

-- 
Enrico


Re: Open in tabs/windows + keep lyx running without windows - patch

2008-03-14 Thread Stefan Schimanski
So I reimplemented everything like you proposed. But I cannot get  
the shortcuts to work. They are handled usually by the  
GuiView::event(..) handler. If there is no GuiView around, this does  
not work. There are some kind of low level event filter in  
QApplication, but I am not sure that's right approach. Another  
possibility maybe would be a hidden QWidget which is somehow made  
into the focused widget. Any other idea?


I finally found a way. Setting the focus on a hidden widget is not  
possible. But grabbing the keyboard is. So I grab the keyboard now  
with the global menubar. Works fine it seems.


Stefan


Re: Open in tabs/windows + keep lyx running without windows - patch

2008-03-14 Thread Stefan Schimanski
- on Mac, there is one unique toolbar so, when the last GuiView is  
closed, the global toolbar should be hidden. This means that we  
should keep trace of the global menubar pointer when created.


What do you mean here?

Stefan


Re: Open in tabs/windows + keep lyx running without windows - patch

2008-03-14 Thread Stefan Schimanski

Here is another try, following your proposal.

Stefan



0001-preference-option-to-open-buffers-in-tabs-or-new-w.patch
Description: Binary data


0002-on-Mac-close-GuiView-when-the-last-tab-was-closed.patch
Description: Binary data


0003-create-global-menubar-on-Mac-without-a-parent.-It.patch
Description: Binary data


0004-release-keyboard-grab-from-global-menubar-again-wh.patch
Description: Binary data




Am 13.03.2008 um 08:36 schrieb Abdelrazak Younes:


Stefan Schimanski wrote:

Here is a series of patches
1) which add an open-in-window mode (enabled on Mac by default)


That's fine.


2) which keep LyX running, even after closing the last window on Mac


Not fine, see below.


3) which close a window when the last tab is closed on Mac


That should be a preference too (default to true on Mac).


3) which add a preference option to change (1)
For (2) I keep the GuiView with id 0 in memory and only hide it. It  
is then reused when the user requests another window.


That's wrong as the GuiView with id 0 may be closed _before_ id 1.  
If you want to go this way, you should hide the last visible GuiView  
instead. BUT, I don't think you should go this way:


I think a new GuiView should be created on demand. You want to  
modify case QEvent::FileOpen() in GuiApplication::event(). I created  
this entry to fix file opening by double-clicking on Mac when LyX is  
not started (see comment in source code). To recap my thinking:


- If LyX is already started but there is no GuiView avalaible,  
LFUN_FILE_OPEN should take care of creating one.


 = This means that GuiApplication::dispatch() should handle  
LFUN_FILE_OPEN instead of GuiView.


- If LyX is already started and there is a current GuiView and you  
want to open a file; two options:

1. create a new GuiView for the file: this is you feature 1),
2. open the file in current GuiView.

- If LyX is not yet started and the user double-click on icon to  
open a file, QEvent::FileOpen() should be acknowledged and delayed.


I think you can manage from here.

Abdel.





Re: [Cvslog] r23712 - in /lyx-devel/branches/BRANCH_1_5_X: src/mathed/...

2008-03-14 Thread Uwe Stöhr

 Then, in the same vein, nobody expects to use Insert-Label in order
 to change it.

This issue is http://bugzilla.lyx.org/show_bug.cgi?id=1370 .

regards Uwe


GMANE doesn't store all lyx-devel posts

2008-03-14 Thread Uwe Stöhr

I just noticed that GMANE doesn't show posts with the following subject scheme:

Re: [Cvslog] r23712 - in /lyx-devel/branches/BRANCH_1_5_X: src/mathed/...
or
Re: r23681 - /lyx-devel/trunk/src/mathed/InsetMathNest.cpp
(http://news.gmane.org/gmane.editors.lyx.devel/)

Mail-archive works:

http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg136876.html
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg136964.html

I don't know if we can do something about this by changing something in our mailing list server, or 
is this definitively a problem of GMANE?


regards Uwe


Re: GMANE doesn't store all lyx-devel posts

2008-03-14 Thread Pavel Sanda
 I don't know if we can do something about this by changing something in our 
 mailing list server, or is this definitively a problem of GMANE?

this is known issue, i reported this on devel list at least twice.
it seems as gmane antispam policy.

pavel


Re: 1.6svn regression: enum/item in tables

2008-03-14 Thread Richard Heck

Dov Feldstern wrote:

Dov Feldstern wrote:

Hi!

It seems that enumeration/itemize (perhaps other layouts as well?) 
are no longer working inside a table. See the attached lyx file, 
created with r23573 from March 8, which still works fine. Try opening 
it in current svn (by r23669 from March 11 the problem already 
exists) --- the itemize and enumeration layouts are not recognized 
--- not in the GUI, nor in the latex output --- the text just appears 
in standard layout.


Using mercurials bisect extension 
(http://www.selenic.com/mercurial/wiki/index.cgi/BisectExtension), I 
was able to track this bug down to r23662. Richard --- any ideas?


I'll have a look. I'm probably overdoing it by requiring tables to use 
the EmptyLayout. The solution is presumably to put the enumeration 
inside an empty layout.


rh



Re: LyX 1.6svn bug - irritating and wrong message about included file using module not used in parent file

2008-03-14 Thread Richard Heck

Helge Hafting wrote:

Today I split a document in two, so I can publish the content
with two different front pages. The idea is simple:

The first document has a latex preamble that sets up the front page,
and in the main window it simply \input the second document which has
all the content. (TOC, headings, text paragraphs, figures)
The \input is done using LyX, no ERT for that.


I split the document by making two copies. From the first I deleted
all content and added the \input. From the second I removed
my custom preamble because that is now in the first document.

The preamble merely defines some commands that the
second document will use to build a front page. Several
different first documents can now use the same content, but get a 
different front.



All this works very well, except that I get a bogus error message each 
time

I do File-Export-Pdf(pdflatex). I get:
Included file 'content.lyx' uses module 'logicalmkup' which is not 
used in the parent file.


The message is wrong.
Both documents have logical markup in their settings.
The first document has no content (other than \input) so
obviously it doesn't actually _use_ any logical markup. But adding a word
with logical markup doesn't make the message go away. There is no 
mismatch

in modules.

Ideally, not using logicalmkup in the first file should not be a 
problem at all,



I agree.

but I can certainly live with having to put all modules in the master 
document.

The bogus message need to go away though.


I'll check this.

rh



Re: Open in tabs/windows + keep lyx running without windows - patch

2008-03-14 Thread Abdelrazak Younes

Stefan Schimanski wrote:

Here is another try, following your proposal.
Sorry Stefan, I won't have the time to review it for the next two weeks 
(going on well deserved vacations). But I trust your code anyway so I 
guess it should be OK. Cross-checking with Andre' might be a good thing 
too ;-). Peter has worked on this stuff so I put him in copy (hope you 
don't mind Peter).


One thing that probably needs some cleaning too is the GuiView 
dependency in Action and Menu. I think we could just use 
guiApp-currentView() instead of storing the GuiView reference.


Anyway, good luck with that.

Abdel.



Re: Wiki - suggested edit (mac)

2008-03-14 Thread Scott Lambert

Done. Thanks.

Any ideas on clicking in Lyx to go to pdf?

-Scott


Re: Text completion not working in tables?

2008-03-14 Thread Andre Poenitz
On Fri, Mar 14, 2008 at 03:19:32PM +0100, Stefan Schimanski wrote:

 Am 14.03.2008 um 14:14 schrieb Dov Feldstern:

 Hi!

 Stefan --- the completion stuff looks really, really nice. Thanks!

 It seems to me that text completion is not working in tables. Math 
 completion *does* work, though. Can anything be done about this?

 It can. But at the moment the support is only in InsetMathNest and 
 InsetText. Have to try it for InsetTabular. Probably one can just copy the 
 code from InsetText.

Or move it to Text, which is shared by InsetText and InsetTabular?

Andre'


Re: Take 2: time for alpha

2008-03-14 Thread José Matos
On Friday 14 March 2008 14:32:46 Pavel Sanda wrote:
 fileformat change is allowed after beta.
 fileformat change is not allowed after stable release is released.

  Right. :-)

 however there are inconsistencies between official site and wiki
 whether release candidate is considered to be a stable release.

  If the release candidates were considered stable they would be no more 
release candidate, they would get the job immediately. ;-)

 i dont remember exactly but have the feeling that last time fileformat
 change were ok after rc1 but not after rc2. maybe Jose should clarify this.

  Thanks to lyx2lxy and the developers who make it work the fileformat is not 
the issue.

  In the release candidate schedule only bug fixes are allowed if the bug fix 
requires a file format change then OK.

  The emphasis is on nature of the changes not if it the file format changes 
or not. The file format is on the same level as the graphical interface as 
far as the release procedure for rc is concerned.

 pavel

-- 
José Abílio


Re: Wiki - suggested edit (mac)

2008-03-14 Thread Scott Lambert

Done. Thanks. Link:http://wiki.lyx.org/Mac/Mac#PdfSync

Any ideas on clicking in Lyx to go to pdf?

-Scott


Re: Text completion not working in tables?

2008-03-14 Thread Stefan Schimanski


Am 14.03.2008 um 20:13 schrieb Andre Poenitz:


On Fri, Mar 14, 2008 at 03:19:32PM +0100, Stefan Schimanski wrote:


Am 14.03.2008 um 14:14 schrieb Dov Feldstern:


Hi!

Stefan --- the completion stuff looks really, really nice. Thanks!

It seems to me that text completion is not working in tables. Math
completion *does* work, though. Can anything be done about this?


It can. But at the moment the support is only in InsetMathNest and
InsetText. Have to try it for InsetTabular. Probably one can just  
copy the

code from InsetText.


Or move it to Text, which is shared by InsetText and InsetTabular?


Will try that.

Stefan


More displays

2008-03-14 Thread Pavel Sanda
hi,

does anybody know whether is possible for one process to own different windows 
on
different X displays ?

(dream: lfun-new-window-on-display 15 will let more people to share one 
document online.)

pavel


Re: More displays

2008-03-14 Thread Andre Poenitz
On Fri, Mar 14, 2008 at 09:53:08PM +0100, Pavel Sanda wrote:
 hi,
 
 does anybody know whether is possible for one process to own different
 windows on different X displays ?

Conceptionally there should be no _X_ problem at all 'interesting' X
functions take a Display argument, and I see no reason why one should
not be able to feed different values there.

However, I doubt this will work with Qt:

qx11info_x11.h:static Display *display();

 (dream: lfun-new-window-on-display 15 will let more people to share
 one document online.)

Not within the next few years ;-)

Andre'


Re: Open in tabs/windows + keep lyx running without windows - patch

2008-03-14 Thread Stefan Schimanski


Am 14.03.2008 um 19:50 schrieb Abdelrazak Younes:


Stefan Schimanski wrote:

Here is another try, following your proposal.
Sorry Stefan, I won't have the time to review it for the next two  
weeks (going on well deserved vacations). But I trust your code  
anyway so I guess it should be OK. Cross-checking with Andre' might  
be a good thing too ;-). Peter has worked on this stuff so I put him  
in copy (hope you don't mind Peter).


One thing that probably needs some cleaning too is the GuiView  
dependency in Action and Menu. I think we could just use guiApp- 
currentView() instead of storing the GuiView reference.


I am not completely sure about this. What if you click a toolbar  
action of a background window. Can we be sure that it gets the current  
view before the action is fired? I guess not.


Stefan


Re: Open in tabs/windows + keep lyx running without windows - patch

2008-03-14 Thread Abdelrazak Younes

Stefan Schimanski wrote:


Am 14.03.2008 um 19:50 schrieb Abdelrazak Younes:


Stefan Schimanski wrote:

Here is another try, following your proposal.
Sorry Stefan, I won't have the time to review it for the next two 
weeks (going on well deserved vacations). But I trust your code anyway 
so I guess it should be OK. Cross-checking with Andre' might be a good 
thing too ;-). Peter has worked on this stuff so I put him in copy 
(hope you don't mind Peter).


One thing that probably needs some cleaning too is the GuiView 
dependency in Action and Menu. I think we could just use 
guiApp-currentView() instead of storing the GuiView reference.


I am not completely sure about this. What if you click a toolbar action 
of a background window. Can we be sure that it gets the current view 
before the action is fired? I guess not.


On activation (see GuiView::event()), the GuiView register itself as the 
current view so it should be OK.


Abdel.



Re: Open in tabs/windows + keep lyx running without windows - patch

2008-03-14 Thread Stefan Schimanski


Am 14.03.2008 um 23:13 schrieb Abdelrazak Younes:


Stefan Schimanski wrote:

Am 14.03.2008 um 19:50 schrieb Abdelrazak Younes:

Stefan Schimanski wrote:

Here is another try, following your proposal.
Sorry Stefan, I won't have the time to review it for the next two  
weeks (going on well deserved vacations). But I trust your code  
anyway so I guess it should be OK. Cross-checking with Andre'  
might be a good thing too ;-). Peter has worked on this stuff so I  
put him in copy (hope you don't mind Peter).


One thing that probably needs some cleaning too is the GuiView  
dependency in Action and Menu. I think we could just use guiApp- 
currentView() instead of storing the GuiView reference.
I am not completely sure about this. What if you click a toolbar  
action of a background window. Can we be sure that it gets the  
current view before the action is fired? I guess not.


On activation (see GuiView::event()), the GuiView register itself as  
the current view so it should be OK.


On activation of course. But there seems to be the case for example on  
Mac that the closeEvent can arrive without prior activation when you  
click on the close button of the window. Maybe it's an extreme case  
which cannot happen with toolbars or other action representations.


Stefan


Re: Text completion not working in tables?

2008-03-14 Thread Abdelrazak Younes

Stefan Schimanski wrote:


Am 14.03.2008 um 15:26 schrieb Dov Feldstern:


Stefan Schimanski wrote:

Am 14.03.2008 um 14:14 schrieb Dov Feldstern:

Hi!

Stefan --- the completion stuff looks really, really nice. Thanks!

It seems to me that text completion is not working in tables. Math 
completion *does* work, though. Can anything be done about this?
It can. But at the moment the support is only in InsetMathNest and 
InsetText. Have to try it for InsetTabular. Probably one can just 
copy the code from InsetText.


Is the text inside a table cell not an InsetText? I sort of assumed 
that every cell contains an InsetText for its text...


AFAIK it only uses the Text class for every cell. Otherwise the cursor 
would need another slice for the table and the InsetText, and hence many 
special handling to avoid strange positions which are in the table, but 
not in the InsetText.


I don't think this is a good thing personally. Cells should be insets. I 
am pretty sure the code will be less complicated if that was the case.


Abdel.



Re: More displays

2008-03-14 Thread Abdelrazak Younes

Andre Poenitz wrote:

On Fri, Mar 14, 2008 at 09:53:08PM +0100, Pavel Sanda wrote:

hi,

does anybody know whether is possible for one process to own different
windows on different X displays ?


Conceptionally there should be no _X_ problem at all 'interesting' X
functions take a Display argument, and I see no reason why one should
not be able to feed different values there.

However, I doubt this will work with Qt:

qx11info_x11.h:static Display *display();


(dream: lfun-new-window-on-display 15 will let more people to share
one document online.)


Not within the next few years ;-)


Actually, I don't think we're so far away from that dream ;-)
Concurrent editing is something that is not conceptually very different 
from multi-view, we just need to 'lock' the lfun server while a view is 
being edited.


Abdel.



Re: Text completion not working in tables?

2008-03-14 Thread Andre Poenitz
On Fri, Mar 14, 2008 at 11:15:48PM +0100, Abdelrazak Younes wrote:
 Stefan Schimanski wrote:
 Am 14.03.2008 um 15:26 schrieb Dov Feldstern:
 Stefan Schimanski wrote:
 Am 14.03.2008 um 14:14 schrieb Dov Feldstern:
 Hi!

 Stefan --- the completion stuff looks really, really nice. Thanks!

 It seems to me that text completion is not working in tables. Math 
 completion *does* work, though. Can anything be done about this?
 It can. But at the moment the support is only in InsetMathNest and 
 InsetText. Have to try it for InsetTabular. Probably one can just copy 
 the code from InsetText.

 Is the text inside a table cell not an InsetText? I sort of assumed that 
 every cell contains an InsetText for its text...
 AFAIK it only uses the Text class for every cell. Otherwise the cursor 
 would need another slice for the table and the InsetText, and hence many 
 special handling to avoid strange positions which are in the table, but 
 not in the InsetText.

 I don't think this is a good thing personally. Cells should be insets. I am 
 pretty sure the code will be less complicated if that was the case.

I always thought a bit like Text == Model, InsetText == View.

But of course, the metrics stuff completely defeats this...

Andre'


Re: Open in tabs/windows + keep lyx running without windows - patch

2008-03-14 Thread Abdelrazak Younes

Stefan Schimanski wrote:


Am 14.03.2008 um 23:13 schrieb Abdelrazak Younes:


Stefan Schimanski wrote:

Am 14.03.2008 um 19:50 schrieb Abdelrazak Younes:

Stefan Schimanski wrote:

Here is another try, following your proposal.
Sorry Stefan, I won't have the time to review it for the next two 
weeks (going on well deserved vacations). But I trust your code 
anyway so I guess it should be OK. Cross-checking with Andre' might 
be a good thing too ;-). Peter has worked on this stuff so I put him 
in copy (hope you don't mind Peter).


One thing that probably needs some cleaning too is the GuiView 
dependency in Action and Menu. I think we could just use 
guiApp-currentView() instead of storing the GuiView reference.
I am not completely sure about this. What if you click a toolbar 
action of a background window. Can we be sure that it gets the 
current view before the action is fired? I guess not.


On activation (see GuiView::event()), the GuiView register itself as 
the current view so it should be OK.


On activation of course. But there seems to be the case for example on 
Mac that the closeEvent can arrive without prior activation when you 
click on the close button of the window.


Well, if you close the window you don't really need to process further 
event, do you? And if you want to cancel the event because of an unsave 
file you should of course register the current view.


Maybe it's an extreme case 
which cannot happen with toolbars or other action representations.


That's what I think, yes.

Abdel.



Re: More displays

2008-03-14 Thread Andre Poenitz
On Fri, Mar 14, 2008 at 11:22:15PM +0100, Abdelrazak Younes wrote:
 Andre Poenitz wrote:
 On Fri, Mar 14, 2008 at 09:53:08PM +0100, Pavel Sanda wrote:
 hi,

 does anybody know whether is possible for one process to own different
 windows on different X displays ?
 Conceptionally there should be no _X_ problem at all 'interesting' X
 functions take a Display argument, and I see no reason why one should
 not be able to feed different values there.
 However, I doubt this will work with Qt:
 qx11info_x11.h:static Display *display();
 (dream: lfun-new-window-on-display 15 will let more people to share
 one document online.)
 Not within the next few years ;-)

 Actually, I don't think we're so far away from that dream ;-)
 Concurrent editing is something that is not conceptually very different 
 from multi-view, we just need to 'lock' the lfun server while a view is 
 being edited.

The Gui would need to run in a separate process as right now there's (at
most) one X Display per Qt process and it is rather unlikely to change.

And we are still a bit away from a real GUI/Core separation.

Andre'


Re: More displays

2008-03-14 Thread Abdelrazak Younes

Andre Poenitz wrote:

On Fri, Mar 14, 2008 at 11:22:15PM +0100, Abdelrazak Younes wrote:

Andre Poenitz wrote:

On Fri, Mar 14, 2008 at 09:53:08PM +0100, Pavel Sanda wrote:

hi,

does anybody know whether is possible for one process to own different
windows on different X displays ?

Conceptionally there should be no _X_ problem at all 'interesting' X
functions take a Display argument, and I see no reason why one should
not be able to feed different values there.
However, I doubt this will work with Qt:
qx11info_x11.h:static Display *display();

(dream: lfun-new-window-on-display 15 will let more people to share
one document online.)

Not within the next few years ;-)

Actually, I don't think we're so far away from that dream ;-)
Concurrent editing is something that is not conceptually very different 
from multi-view, we just need to 'lock' the lfun server while a view is 
being edited.


The Gui would need to run in a separate process as right now there's (at
most) one X Display per Qt process and it is rather unlikely to change.


I didn't know that...



And we are still a bit away from a real GUI/Core separation.


Right.

Abdel.



Trunk does not compile.

2008-03-14 Thread Bo Peng
src/frontends/qt4/GuiToolbar.cpp: In member function 'void
lyx::frontend::GuiLayoutBox::setIconSize(QSize)':
src/frontends/qt4/GuiToolbar.cpp:663: error: 'WA_MacSmallSize' is not
a member of 'Qt'
src/frontends/qt4/GuiToolbar.cpp:664: error: 'WA_MacNormalSize' is not
a member of 'Qt'

Missing #ifdef mac?

Bo


Re: Trunk does not compile.

2008-03-14 Thread Stefan Schimanski


Am 14.03.2008 um 23:48 schrieb Bo Peng:


src/frontends/qt4/GuiToolbar.cpp: In member function 'void
lyx::frontend::GuiLayoutBox::setIconSize(QSize)':
src/frontends/qt4/GuiToolbar.cpp:663: error: 'WA_MacSmallSize' is not
a member of 'Qt'
src/frontends/qt4/GuiToolbar.cpp:664: error: 'WA_MacNormalSize' is not
a member of 'Qt'

Missing #ifdef mac?


Ah, I thought it's available on every platform. Will fix it.

Stefan


Re: setting lines in tables

2008-03-14 Thread Edwin Leuven

Edwin Leuven wrote:
give it a try: it is nice to be finally able to easily set the lines you 
want


any objections if i apply the attached?
Index: src/frontends/qt4/GuiTabular.cpp
===
--- src/frontends/qt4/GuiTabular.cpp	(revision 23727)
+++ src/frontends/qt4/GuiTabular.cpp	(working copy)
@@ -283,28 +283,28 @@
 
 void GuiTabular::leftBorder_changed()
 {
-	toggleLeftLine();
+	set(Tabular::TOGGLE_LINE_LEFT);
 	changed();
 }
 
 
 void GuiTabular::rightBorder_changed()
 {
-	toggleRightLine();
+	set(Tabular::TOGGLE_LINE_RIGHT);
 	changed();
 }
 
 
 void GuiTabular::topBorder_changed()
 {
-	toggleTopLine();
+	set(Tabular::TOGGLE_LINE_TOP);
 	changed();
 }
 
 
 void GuiTabular::bottomBorder_changed()
 {
-	toggleBottomLine();
+	set(Tabular::TOGGLE_LINE_BOTTOM);
 	changed();
 }
 
@@ -554,39 +554,10 @@
 void GuiTabular::update_borders()
 {
 	Tabular::idx_type const cell = getActiveCell();
-	bool const isMulticolumnCell = tabular_.isMultiColumn(cell);
-
-	if (!isMulticolumnCell) {
-		borders-setLeftEnabled(true);
-		borders-setRightEnabled(true);
-		borders-setTop(tabular_.topLine(cell, true));
-		borders-setBottom(tabular_.bottomLine(cell, true));
-		borders-setLeft(tabular_.leftLine(cell, true));
-		borders-setRight(tabular_.rightLine(cell, true));
-		// repaint the setborder widget
-		borders-update();
-		return;
-	}
-
 	borders-setTop(tabular_.topLine(cell));
 	borders-setBottom(tabular_.bottomLine(cell));
-	// pay attention to left/right lines: they are only allowed
-	// to set if we are in first/last cell of row or if the left/right
-	// cell is also a multicolumn.
-	if (tabular_.isFirstCellInRow(cell) || tabular_.isMultiColumn(cell - 1)) {
-		borders-setLeftEnabled(true);
-		borders-setLeft(tabular_.leftLine(cell));
-	} else {
-		borders-setLeft(false);
-		borders-setLeftEnabled(false);
-	}
-	if (tabular_.isLastCellInRow(cell) || tabular_.isMultiColumn(cell + 1)) {
-		borders-setRightEnabled(true);
-		borders-setRight(tabular_.rightLine(cell));
-	} else {
-		borders-setRight(false);
-		borders-setRightEnabled(false);
-	}
+	borders-setLeft(tabular_.leftLine(cell));
+	borders-setRight(tabular_.rightLine(cell));
 	// repaint the setborder widget
 	borders-update();
 }
@@ -988,42 +959,6 @@
 }
 
 
-void GuiTabular::toggleTopLine()
-{
-	if (tabular_.isMultiColumn(getActiveCell()))
-		set(Tabular::M_TOGGLE_LINE_TOP);
-	else
-		set(Tabular::TOGGLE_LINE_TOP);
-}
-
-
-void GuiTabular::toggleBottomLine()
-{
-	if (tabular_.isMultiColumn(getActiveCell()))
-		set(Tabular::M_TOGGLE_LINE_BOTTOM);
-	else
-		set(Tabular::TOGGLE_LINE_BOTTOM);
-}
-
-
-void GuiTabular::toggleLeftLine()
-{
-	if (tabular_.isMultiColumn(getActiveCell()))
-		set(Tabular::M_TOGGLE_LINE_LEFT);
-	else
-		set(Tabular::TOGGLE_LINE_LEFT);
-}
-
-
-void GuiTabular::toggleRightLine()
-{
-	if (tabular_.isMultiColumn(getActiveCell()))
-		set(Tabular::M_TOGGLE_LINE_RIGHT);
-	else
-		set(Tabular::TOGGLE_LINE_RIGHT);
-}
-
-
 void GuiTabular::setSpecial(string const  special)
 {
 	if (tabular_.isMultiColumn(getActiveCell()))
Index: src/frontends/qt4/GuiTabular.h
===
--- src/frontends/qt4/GuiTabular.h	(revision 23727)
+++ src/frontends/qt4/GuiTabular.h	(working copy)
@@ -95,12 +95,6 @@
 	/// set a parameter
 	void set(Tabular::Feature, std::string const  arg = std::string());
 
-	/// borders
-	void toggleTopLine();
-	void toggleBottomLine();
-	void toggleLeftLine();
-	void toggleRightLine();
-
 	void setSpecial(std::string const  special);
 
 	void setWidth(std::string const  width);
Index: src/insets/InsetTabular.cpp
===
--- src/insets/InsetTabular.cpp	(revision 23727)
+++ src/insets/InsetTabular.cpp	(working copy)
@@ -85,10 +85,10 @@
 
 namespace {
 
-int const ADD_TO_HEIGHT = 2;
-int const ADD_TO_TABULAR_WIDTH = 2;
-int const default_line_space = 10;
-int const WIDTH_OF_LINE = 5;
+int const ADD_TO_HEIGHT = 2; // in cell
+int const ADD_TO_TABULAR_WIDTH = 6; // horiz space before and after the table
+int const default_line_space = 10; // ?
+int const WIDTH_OF_LINE = 5; // space between double lines
 
 
 ///
@@ -120,10 +120,6 @@
 	{ Tabular::VALIGN_TOP, valign-top },
 	{ Tabular::VALIGN_BOTTOM, valign-bottom },
 	{ Tabular::VALIGN_MIDDLE, valign-middle },
-	{ Tabular::M_TOGGLE_LINE_TOP, m-toggle-line-top },
-	{ Tabular::M_TOGGLE_LINE_BOTTOM, m-toggle-line-bottom },
-	{ Tabular::M_TOGGLE_LINE_LEFT, m-toggle-line-left },
-	{ Tabular::M_TOGGLE_LINE_RIGHT, m-toggle-line-right },
 	{ Tabular::M_ALIGN_LEFT, m-align-left },
 	{ Tabular::M_ALIGN_RIGHT, m-align-right },
 	{ Tabular::M_ALIGN_CENTER, m-align-center },
@@ -478,9 +474,9 @@
 	  multicolumn(Tabular::CELL_NORMAL),
 	  alignment(LYX_ALIGN_CENTER),
 	  valignment(LYX_VALIGN_TOP),
-	  top_line(true),
+	  top_line(false),
 	  bottom_line(false),
-	  left_line(true),
+	  left_line(false),
 	  right_line(false),
 	  

Wrong sorting of RC entries

2008-03-14 Thread Pavel Sanda

Stefan, i guess this is yours...



The table passed to Lexer is not sorted!
Tell the developers to fix it!

Unsorted:

Number of tags: 126
table[0]:  tag: `\accept_compound'  code:1
table[1]:  tag: `\allow_geometry_session'  code:44
table[2]:  tag: `\alternate_language'  code:2
table[3]:  tag: `\auto_number'  code:8
.

p


Re: r23744 - in /lyx-devel/trunk/src/insets: Inset.cpp Inset....

2008-03-14 Thread Stefan Schimanski

The CompletionList.h file is missing I guess:

/Users/sts/Quellen/mac/lyx-scope-dynmacro/src/frontends/qt4/ 
GuiCompleter.cpp:105: error: 'class lyx::Inset::CompletionList' has  
not been declared
/Users/sts/Quellen/mac/lyx-scope-dynmacro/src/frontends/qt4/ 
GuiCompleter.cpp:168: error: expected ';' before 'const'
/Users/sts/Quellen/mac/lyx-scope-dynmacro/src/frontends/qt4/ 
GuiCompleter.cpp: In constructor  
'lyx::frontend::GuiCompletionModel::GuiCompletionModel(QObject*, const  
int*)':
/Users/sts/Quellen/mac/lyx-scope-dynmacro/src/frontends/qt4/ 
GuiCompleter.cpp:106: error: class 'lyx::frontend::GuiCompletionModel'  
does not have any field named 'list_'
/Users/sts/Quellen/mac/lyx-scope-dynmacro/src/frontends/qt4/ 
GuiCompleter.cpp: In destructor 'virtual  
lyx::frontend::GuiCompletionModel::~GuiCompletionModel()':
/Users/sts/Quellen/mac/lyx-scope-dynmacro/src/frontends/qt4/ 
GuiCompleter.cpp:109: error: 'list_' was not declared in this scope
/Users/sts/Quellen/mac/lyx-scope-dynmacro/src/frontends/qt4/ 
GuiCompleter.cpp: In member function 'bool  
lyx::frontend::GuiCompletionModel::sorted() const':
/Users/sts/Quellen/mac/lyx-scope-dynmacro/src/frontends/qt4/ 
GuiCompleter.cpp:113: error: 'list_' was not declared in this scope
/Users/sts/Quellen/mac/lyx-scope-dynmacro/src/frontends/qt4/ 
GuiCompleter.cpp: In member function 'virtual int  
lyx::frontend::GuiCompletionModel::rowCount(const QModelIndex) const':
/Users/sts/Quellen/mac/lyx-scope-dynmacro/src/frontends/qt4/ 
GuiCompleter.cpp:126: error: 'list_' was not declared in this scope
/Users/sts/Quellen/mac/lyx-scope-dynmacro/src/frontends/qt4/ 
GuiCompleter.cpp: In member function 'virtual QVariant  
lyx::frontend::GuiCompletionModel::data(const QModelIndex, int) const':
/Users/sts/Quellen/mac/lyx-scope-dynmacro/src/frontends/qt4/ 
GuiCompleter.cpp:135: error: 'list_' was not declared in this scope
/Users/sts/Quellen/mac/lyx-scope-dynmacro/src/frontends/qt4/ 
GuiCompleter.cpp:145: error: 'list_' was not declared in this scope
/Users/sts/Quellen/mac/lyx-scope-dynmacro/src/frontends/qt4/ 
GuiCompleter.cpp:149: error: 'list_' was not declared in this scope
/Users/sts/Quellen/mac/lyx-scope-dynmacro/src/frontends/qt4/ 
GuiCompleter.cpp: In member function 'void  
lyx::frontend::GuiCompleter::updateModel(lyx::Cursor, bool, bool)':
/Users/sts/Quellen/mac/lyx-scope-dynmacro/src/frontends/qt4/ 
GuiCompleter.cpp:482: error: 'CompletionList' is not a member of  
'lyx::Inset'
/Users/sts/Quellen/mac/lyx-scope-dynmacro/src/frontends/qt4/ 
GuiCompleter.cpp:482: error: expected `;' before 'const'
/Users/sts/Quellen/mac/lyx-scope-dynmacro/src/frontends/qt4/ 
GuiCompleter.cpp:483: error: missing template arguments before ')' token
/Users/sts/Quellen/mac/lyx-scope-dynmacro/src/frontends/qt4/ 
GuiCompleter.cpp:485: error: missing template arguments before '-'  
token
/Users/sts/Quellen/mac/lyx-scope-dynmacro/src/frontends/qt4/ 
GuiCompleter.cpp: In member function 'virtual int  
lyx::frontend::GuiCompletionModel::rowCount(const QModelIndex) const':
/Users/sts/Quellen/mac/lyx-scope-dynmacro/src/frontends/qt4/ 
GuiCompleter.cpp:130: warning: control reaches end of non-void function


Am 15.03.2008 um 01:02 schrieb [EMAIL PROTECTED]:


Author: poenitz
Date: Sat Mar 15 01:02:41 2008
New Revision: 23744

URL: http://www.lyx.org/trac/changeset/23744
Log:
earder cleanup; cosmetics;

Modified:
   lyx-devel/trunk/src/insets/Inset.cpp
   lyx-devel/trunk/src/insets/Inset.h
   lyx-devel/trunk/src/insets/InsetCitation.cpp
   lyx-devel/trunk/src/insets/InsetCode.h
   lyx-devel/trunk/src/insets/InsetCommandParams.cpp
   lyx-devel/trunk/src/insets/InsetCommandParams.h
   lyx-devel/trunk/src/insets/InsetNewline.h
   lyx-devel/trunk/src/insets/InsetNewpage.cpp
   lyx-devel/trunk/src/insets/InsetNewpage.h
   lyx-devel/trunk/src/insets/InsetQuotes.cpp
   lyx-devel/trunk/src/insets/InsetQuotes.h
   lyx-devel/trunk/src/insets/InsetText.cpp

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

--- lyx-devel/trunk/src/insets/Inset.cpp (original)
+++ lyx-devel/trunk/src/insets/Inset.cpp Sat Mar 15 01:02:41 2008
@@ -429,4 +429,10 @@
return theApp() ? theApp()-updateInset(this) : 0;
}

+
+docstring Inset::completionPrefix(Cursor const ) const
+{
+   return docstring();
+}
+
} // namespace lyx

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

--- lyx-devel/trunk/src/insets/Inset.h (original)
+++ lyx-devel/trunk/src/insets/Inset.h Sat Mar 15 01:02:41 2008
@@ -19,10 +19,8 @@
#include InsetCode.h

#include support/strfwd.h
-
-#include boost/shared_ptr.hpp
-
-#include vector
+#include support/types.h
+

namespace lyx {

@@ -31,6 +29,7 @@
class 

Question about Math Macros

2008-03-14 Thread Pavel Sanda
hi,

we have three different modes of macros editation.
how do they differ? switching between them and and the insert  edit macro
does not seem to make difference. what should i do to see whats their purpose?

pavel


Re: Question about Math Macros

2008-03-14 Thread Stefan Schimanski


Am 15.03.2008 um 01:26 schrieb Pavel Sanda:


hi,

we have three different modes of macros editation.
how do they differ? switching between them and and the insert  edit  
macro
does not seem to make difference. what should i do to see whats  
their purpose?


It's about the instances of the macros. They differ as described in  
the preferences. There was strong demand for each of them, so we  
provide all three.


Define a macro with the \foo := button. Then go into math mode and  
use the macro. When you enter with the cursor, the different editing  
modes come into play.


Stefan


Re: Question about Math Macros

2008-03-14 Thread Pavel Sanda
 Define a macro with the \foo := button. Then go into math mode and use 
 the macro. When you enter with the cursor, the different editing modes come 
 into play.

sorry i'm lost, whatsoever i do, no difference.
can you describe step by step what exactly should i do?
pavel


Re: Question about Math Macros

2008-03-14 Thread Stefan Schimanski


Am 15.03.2008 um 01:44 schrieb Pavel Sanda:

Define a macro with the \foo := button. Then go into math mode  
and use
the macro. When you enter with the cursor, the different editing  
modes come

into play.


sorry i'm lost, whatsoever i do, no difference.
can you describe step by step what exactly should i do?
pavel



I maybe forgot to say that you have to add at least one parameter to  
the macro. So you do this:


1. Click the \foo := button in the toolbar.
2. Change the macro name to \foo
3. Go into the first box (the macro definition) and enter \#1 (this  
makes the macro into a unary one)

4. Leave the macro definition and create a formula
5. Enter \fooSPACE. You see the macro with the hole.
6. Go back with the cursor to enter the hole.

Now you see that a grey box is drawn around it. This depends on the  
macro editing mode. Some people like it like this. For others the  
small metrics changes, which cause a bit of jumping of the formulas on  
screen, is already too much. They can use the mode without the grey  
foo header. The third mode is like it was in LyX 1.5, i.e. with a  
list of parameters.


Stefan

inline: Bild 1.png



Re: Question about Math Macros

2008-03-14 Thread Pavel Sanda
 Define a macro with the \foo := button. Then go into math mode and use
 the macro. When you enter with the cursor, the different editing modes 
 come
 into play.

 sorry i'm lost, whatsoever i do, no difference.
 can you describe step by step what exactly should i do?
 pavel


 I maybe forgot to say that you have to add at least one parameter to the 
 macro. 

aaa!
thanks :)
pavel


Re: [Cvslog] r23741 - /lyx-devel/trunk/src/frontends/qt4/GuiAbout.cpp

2008-03-14 Thread Andre Poenitz
On Fri, Mar 14, 2008 at 11:32:35PM -, [EMAIL PROTECTED] wrote:
 Author: sts
 Date: Sat Mar 15 00:32:34 2008
 New Revision: 23741
 
 URL: http://www.lyx.org/trac/changeset/23741
 Log:
 * Some work was done in 2007 and 2008 which should deserve a copyright, no?

Right.

Andre'


Re: [patch] implement \slash and \nobreakdash

2008-03-14 Thread Pavel Sanda
 The attached patch implements two (at least by me) frequently requested and
 useful special characters: A breakable slash (\slash from the LaTeX kernel)
 and a protected hypen (\nobreakdash- from amsmath).
 
 The former allows a linebreak (without hyphen) after a slash, as
 in LyX/LaTeX, the latter provides a hyphen after which no linebreak must
 occur, which is what you need when you write something like Großväter
 und -mütter (in order to prevent LaTeX to split the hyphen from the
 suffix). \nobreakdash can also be used to produce protected en- and
 emdashes. Just insert one or two dashes after the special character, which
 will result in the correct LaTeX commands \nobreakdash-- or
 \nobreakdash---, respectively.

i wonder why \nobreakdash- implements hyphen. it is used just because dash- 
accidentaly reminds hyphen or it is that latex dash- = hyphen(in typographical 
sense), while dash--/--- = dash ?

pavel


Close tab group

2008-03-14 Thread Pavel Sanda
launch lyx, new file, close tab group, crash
p


Re: r23747 - in /lyx-devel/trunk/src: BiblioInfo.cpp BufferLi...

2008-03-14 Thread Stefan Schimanski


Am 15.03.2008 um 01:22 schrieb [EMAIL PROTECTED]:


+bool InsetMathNest::script(Cursor  cur, bool up)
+{
+   script(cur, up, docstring());
+}
+
+


return script(cur, up, docstring()); ?

Stefan


Re: Close tab group

2008-03-14 Thread Stefan Schimanski


Am 15.03.2008 um 03:17 schrieb Pavel Sanda:


launch lyx, new file, close tab group, crash
p


(gdb) bt
#0  0x0124 in ?? ()
#1  0x0ec07cab in QCoreApplication::removePostedEvents  
(receiver=0x2703d560, eventType=0) at kernel/qcoreapplication.cpp:1228
#2  0x0ec07e0d in QCoreApplication::removePostedEvents  
(receiver=0x2703d560) at kernel/qcoreapplication.cpp:1176
#3  0x0212d77a in QWidget::~QWidget (this=0x2703d560) at kernel/ 
qwidget.cpp:1206
#4  0x02433e13 in QFrame::~QFrame (this=0x2703d560) at widgets/ 
qframe.cpp:249
#5  0x024c2f63 in QAbstractScrollArea::~QAbstractScrollArea  
(this=0x2703d560) at widgets/qabstractscrollarea.cpp:474
#6  0x0253a4ed in QAbstractItemView::~QAbstractItemView  
(this=0x2703d560) at itemviews/qabstractitemview.cpp:488
#7  0x0254a6ab in QHeaderView::~QHeaderView (this=0x2703d560) at  
itemviews/qheaderview.cpp:320
#8  0x0ec14d35 in QObjectPrivate::deleteChildren (this=0x108d1600) at  
kernel/qobject.cpp:1932
#9  0x0212d76f in QWidget::~QWidget (this=0x270385a0) at kernel/ 
qwidget.cpp:1204
#10 0x02433e13 in QFrame::~QFrame (this=0x270385a0) at widgets/ 
qframe.cpp:249
#11 0x024c2f63 in QAbstractScrollArea::~QAbstractScrollArea  
(this=0x270385a0) at widgets/qabstractscrollarea.cpp:474
#12 0x0253a4ed in QAbstractItemView::~QAbstractItemView  
(this=0x270385a0) at itemviews/qabstractitemview.cpp:488
#13 0x0256e2d7 in QTreeView::~QTreeView (this=0x270385a0) at itemviews/ 
qtreeview.cpp:208
#14 0x0273413b in QCompleterPrivate::~QCompleterPrivate  
(this=0x27038000) at util/qcompleter_p.h:78
#15 0x0ec19b2a in QObject::~QObject (this=0x27033104) at kernel/ 
qobject.cpp:856
#16 0x025fed97 in QCompleter::~QCompleter (this=0x27033104) at util/ 
qcompleter.cpp:948
#17 0x004bf24e in lyx::frontend::GuiCompleter::~GuiCompleter  
(this=0x27033104) at /Users/sts/Quellen/mac/lyx-scope-dynmacro/src/ 
frontends/qt4/GuiCompleter.cpp:215
#18 0x00638f74 in lyx::frontend::GuiWorkArea::~GuiWorkArea  
(this=0x27033050) at /Users/sts/Quellen/mac/lyx-scope-dynmacro/src/ 
frontends/qt4/GuiWorkArea.cpp:292
#19 0x0ec14d35 in QObjectPrivate::deleteChildren (this=0x2702f080) at  
kernel/qobject.cpp:1932
#20 0x0212d76f in QWidget::~QWidget (this=0x2702ef20) at kernel/ 
qwidget.cpp:1204
#21 0x02433e13 in QFrame::~QFrame (this=0x2702ef20) at widgets/ 
qframe.cpp:249
#22 0x0249dc1d in QStackedWidget::~QStackedWidget (this=0x2702ef20) at  
widgets/qstackedwidget.cpp:158
#23 0x0ec14d35 in QObjectPrivate::deleteChildren (this=0x2702ef50) at  
kernel/qobject.cpp:1932
#24 0x0212d76f in QWidget::~QWidget (this=0x2702eee0) at kernel/ 
qwidget.cpp:1204
#25 0x024a5509 in QTabWidget::~QTabWidget (this=0x2702eee0) at widgets/ 
qtabwidget.cpp:319
#26 0x0063e0e2 in lyx::frontend::TabWorkArea::~TabWorkArea  
(this=0x2702eee0) at qt4/GuiWorkArea.h:244
#27 0x00628100 in lyx::frontend::GuiView::dispatch (this=0x1de24cf0,  
[EMAIL PROTECTED]) at /Users/sts/Quellen/mac/lyx-scope-dynmacro/src/ 
frontends/qt4/GuiView.cpp:1874




Re: Question about Math Macros

2008-03-14 Thread Pavel Sanda
next question for these strings:

msgid Append Parameter Eating From The Right  
msgid Append Optional Parameter Eating From The Right 
msgid Remove Last Parameter Spitting Out To The Right

do we have documented somewhere whats the purpose? 
pavel


Re: Question about Math Macros

2008-03-14 Thread Stefan Schimanski


Am 15.03.2008 um 03:26 schrieb Pavel Sanda:


next question for these strings:

msgid Append Parameter Eating From The Right
msgid Append Optional Parameter Eating From The Right
msgid Remove Last Parameter Spitting Out To The Right

do we have documented somewhere whats the purpose?
pavel


Normally, when you change the arity of a macro, the macro will get new  
empty cells or old cells including their contents are remove.


Sometimes it is desirable to make them greedy in the sense, that they  
take the cell right of the macro as content of a new cell, i.e. they  
eat from the right. If you reduce the arity they spit the contents out  
again.


This can be helpful for example if you had defined a macro in the  
preamble of a tex file, imported the file in LyX, and then you have  
plenty of undefined \bla macros in the LyX buffer. Now define \bla as  
a LyX macro and add greedy parameters. They will eat up the cells  
right of the macro instances which of course are meant to be inside of  
the macros as they were in the tex file.


Stefan


Re: Question about Math Macros

2008-03-14 Thread Stefan Schimanski


Am 15.03.2008 um 03:26 schrieb Pavel Sanda:


next question for these strings:

msgid Append Parameter Eating From The Right
msgid Append Optional Parameter Eating From The Right
msgid Remove Last Parameter Spitting Out To The Right

do we have documented somewhere whats the purpose?
pavel


I have documented the macros some time ago here: 
http://1stein.org/download/dynmacro.pdf

Stefan


Re: LyX 1.6svn bug - irritating and wrong message about included file using module not used in parent file

2008-03-14 Thread rgheck

Helge Hafting wrote:

Today I split a document in two, so I can publish the content
with two different front pages. [...] All this works very well, except
that I get a bogus error message each time
I do File-Export-Pdf(pdflatex). I get:
Included file 'content.lyx' uses module 'logicalmkup' which is not 
used in the parent file.


The message is wrong.


Can you try the attached exceedingly silly patch?

rh

Index: InsetInclude.cpp
===
--- InsetInclude.cpp	(revision 23755)
+++ InsetInclude.cpp	(working copy)
@@ -473,7 +473,7 @@
 			string const module = *it;
 			vectorstring::const_iterator found =
 find(masterModules.begin(), masterModules.end(), module);
-			if (found != masterModules.end()) {
+			if (found == masterModules.end()) {
 docstring text = bformat(_(Included file `%1$s'\n
 	uses module `%2$s'\n
 	which is not used in parent file.),


Re: 1.6svn regression: enum/item in tables

2008-03-14 Thread rgheck

Richard Heck wrote:

Dov Feldstern wrote:

Dov Feldstern wrote:

Hi!

It seems that enumeration/itemize (perhaps other layouts as well?) 
are no longer working inside a table. See the attached lyx file, 
created with r23573 from March 8, which still works fine. Try 
opening it in current svn (by r23669 from March 11 the problem 
already exists) --- the itemize and enumeration layouts are not 
recognized --- not in the GUI, nor in the latex output --- the text 
just appears in standard layout.


Using mercurials bisect extension 
(http://www.selenic.com/mercurial/wiki/index.cgi/BisectExtension), I 
was able to track this bug down to r23662. Richard --- any ideas?


I'll have a look. I'm probably overdoing it by requiring tables to use 
the EmptyLayout. The solution is presumably to put the enumeration 
inside an empty layout.


I've tested your file with the patch committed at r23756, and it seems 
to work. Let me know if there are any additional problems.


rh



Trunk does not compile: QDrag::exec is 4.3 only.

2008-03-14 Thread Bo Peng
src/frontends/qt4/GuiWorkArea.cpp:1478: error: 'class QDrag' has no
member named 'exec'

Should we bump QT requirement to 4.3???

Bo


Re: Trunk does not compile: QDrag::exec is 4.3 only.

2008-03-14 Thread rgheck

Bo Peng wrote:

src/frontends/qt4/GuiWorkArea.cpp:1478: error: 'class QDrag' has no
member named 'exec'

Should we bump QT requirement to 4.3???

  
Oh, no, not another one of THESE discussions! I think the last time we 
discussed this issue, we came to some kind of agreement that we'd stay 
a version behind what the `cutting edge' people think is stable. Since 
Fedora is at 4.3.3, and we're pretty cutting edge, that seems to argue 
for 4.2 as the requirement. (Does F9 include 4.4? That's alpha right now 
anyway)


What to do about QDrag::exec is another question. Presumably Andre will 
have a good idea.


rh



Re: Trunk does not compile: QDrag::exec is 4.3 only.

2008-03-14 Thread rgheck

rgheck wrote:

Bo Peng wrote:

src/frontends/qt4/GuiWorkArea.cpp:1478: error: 'class QDrag' has no
member named 'exec'

Should we bump QT requirement to 4.3???

  
Oh, no, not another one of THESE discussions! I think the last time we 
discussed this issue, we came to some kind of agreement that we'd stay 
a version behind what the `cutting edge' people think is stable. 
Since Fedora is at 4.3.3, and we're pretty cutting edge, that seems to 
argue for 4.2 as the requirement. (Does F9 include 4.4? That's alpha 
right now anyway)


What to do about QDrag::exec is another question. Presumably Andre 
will have a good idea.


Actually, this looks pretty simple: What's called exec() in 4.3 is 
pretty much just start() in 4.2. See here: 
http://doc.trolltech.com/4.2/qdrag.html#start. So some sort of 
conditional macro will take care of this.


rh



Re: Trunk does not compile: QDrag::exec is 4.3 only.

2008-03-14 Thread Bo Peng
  What to do about QDrag::exec is another question. Presumably Andre will
  have a good idea.

Why cannot people use qt 4.2 for development? We have had a lot of
compatibility problems with qt 4.3.

Bo


Re: Wiki - suggested edit (mac)

2008-03-14 Thread Pavel Sanda
> (No password so I couldn't do it myself.) http://wiki.lyx.org/Mac/Mac#toc7

btw what is the policy about wiki password? shouldn't we disclose it for
interested users?

pavel


Re: Changes to the website content

2008-03-14 Thread Pavel Sanda
> Thanks for the replies. I went ahead and made some content changes to the
> front page and to the "Download Links" page. I am attaching the patch to
> this email. This is my first time using SVN or doing anything of this
> nature, so please let me know if I did it wrong.

some comments:

1. small patches like this send in plain, not compressed, so others can
   easily read your work and add their comments for next iteration ;)

2. the resulting html code is horrible to read (i mean _code_ readability).
   please compare the previous format and the changes you introduced.
   try to adhere to indentation rules etc. so its easy to parse html
   just by your eyes.

3. from the quick links you introduced it seems we have no linux port.

4. you wiped out the keyword WYSIWYM, emphasize around "structured" is gone.
   these are the key properties of lyx and shouldn't be abandoned.


besides your changes there is still some leftover from past - there has been
complaint wrt the readability of text and the patch which should improve it.
but the lack of any comments from others prevented me from commiting it.
i use this occassion to ask again what other thinks about such kind of
background changes in our web, snpshaot see here:
http://195.113.31.123/~sanda/junk/lyx/www2/

> i remeber some recent python things (can give you pointers if you are
> > interested)
> > - request of csv2lyx: table import (now in perl and buggy)
> > - conversion of lfun doxy docs to lyx (now in bash)
> >
> Those sound interesting, Pavel. How can I get started with learning the
> internals of LyX so that I can do these tasks? For example, I am unfamiliar
> with the LyX markup language, as well as the overall architecture of the LyX
> program (e.g. where csv2lyx would be called from, etc.) 

you won't find documentation for this, you simply have to play with it, thats 
how
you learn. if something make trouble then read the source code, if that still 
does not
work you ask on list.

> Also, if there are
> any other good beginner tasks for someone new to LyX (preferably in Python),
> please point me to them! :)

yes one other thing came to my mind - there are problems wrt conversion of old
configuration files to newer one and there was suggestion of writing preferences
convertor.

as far as pointers:
csv2lyx: 
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg136791.html

lfuns & doxy: 
http://wiki.lyx.org/LyX/LyxFunctions
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg133161.html
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg135048.html

preferences:
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg134184.html

> By the way, are patches usually submitted over the mailing list, or is there
> some other way of submitting them?

mailing list is the best, you get review easily.

pavel


Re: Wiki - suggested edit (mac)

2008-03-14 Thread christian . ridderstrom

On Fri, 14 Mar 2008, Pavel Sanda wrote:


(No password so I couldn't do it myself.) http://wiki.lyx.org/Mac/Mac#toc7


btw what is the policy about wiki password? shouldn't we disclose it for 
interested users?


Certainly!  I hope the password prompt now says that the user should ask 
the developers for the passoword. As for policy, I think we should give it 
to anyone that asks basically.


/C

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

1.6svn regression: enum/item in tables

2008-03-14 Thread Dov Feldstern

Hi!

It seems that enumeration/itemize (perhaps other layouts as well?) are 
no longer working inside a table. See the attached lyx file, created 
with r23573 from March 8, which still works fine. Try opening it in 
current svn (by r23669 from March 11 the problem already exists) --- the 
itemize and enumeration layouts are not recognized --- not in the GUI, 
nor in the latex output --- the text just appears in standard layout.


(I've been away for the past few weeks, and didn't go over the mailing 
list very thoroughly, so I apologize if this has already been reported).


Thanks!
Dov


enum_item_in_table.lyx
Description: application/lyx


Re: Wiki - suggested edit (mac)

2008-03-14 Thread Pavel Sanda
> Certainly!  I hope the password prompt now says that the user should ask 
> the developers for the passoword. As for policy, I think we should give it 
> to anyone that asks basically.

i sent it privately.
p


lyx-1.6svn of march 12. believes files are "changed" as soon as they open, even readonly files

2008-03-14 Thread Helge Hafting

Whenever this lyx opens a file, it is flagged as "changed".
Even the user guide opens and is flagged (changed)(read only)
which is amusing. I get the question about saving it if I quit immediately.

Obviously, the attempt at saving to a readonly file fails, LyX
even tell me to check if the file/directory might be protected against 
writing. . .


Helge Hafting


LyX 1.6svn bug - irritating and wrong message about "included file using module not used in parent file"

2008-03-14 Thread Helge Hafting

Today I split a document in two, so I can publish the content
with two different front pages. The idea is simple:

The first document has a latex preamble that sets up the front page,
and in the main window it simply \input the second document which has
all the content. (TOC, headings, text paragraphs, figures)
The \input is done using LyX, no ERT for that.


I split the document by making two copies. From the first I deleted
all content and added the \input. From the second I removed
my custom preamble because that is now in the first document.

The preamble merely defines some commands that the
second document will use to build a front page. Several
different first documents can now use the same content, but get a 
different front.



All this works very well, except that I get a bogus error message each time
I do File->Export->Pdf(pdflatex). I get:
Included file 'content.lyx' uses module 'logicalmkup' which is not used 
in the parent file.


The message is wrong.
Both documents have "logical markup" in their settings.
The first document has no content (other than \input) so
obviously it doesn't actually _use_ any logical markup. But adding a word
with logical markup doesn't make the message go away. There is no mismatch
in modules.

Ideally, not using "logicalmkup" in the first file should not be a 
problem at all,
but I can certainly live with having to put all modules in the master 
document.

The bogus message need to go away though.

Helge Hafting





Lyx-1.6svn display bug: both indentation _and_ vertical space (with vert.space selected)

2008-03-14 Thread Helge Hafting

LyX support indentation or vertical space for separating paragraphs.

Indentation is displayed correctly in the main window.

Vertical space is also displayed, but the indentation no longer 
disappear. This

is a recent bug.

Helge Hafting


LyX-1.6svn crash when changing width of graphichs - so this can't be done.

2008-03-14 Thread Helge Hafting

To reproduce the crash:
* open a file that has graphichs
* right-click a graphic to bring up the settings dialog
* change the width from 100% to 60% of linelengt for example
* Click the OK button and LyX dies like this:

Assertion triggered in bool lyx::EmbeddedFile::extract() const by 
failing check "enabled()" in file ../../lyx-devel/src/EmbeddedFiles.cpp:145


The emergency savefile does not have the new width, so changig the width
of graphichs is currently impossible.

Helge Hafting




Re: setting lines in tables

2008-03-14 Thread Edwin Leuven

Edwin Leuven wrote:
it is not completely finished yet, but works pretty ok and comments 
would be more than welcome


small update attached

give it a try: it is nice to be finally able to easily set the lines you 
want
Index: src/insets/InsetTabular.h
===
--- src/insets/InsetTabular.h	(revision 23714)
+++ src/insets/InsetTabular.h	(working copy)
@@ -106,14 +106,6 @@
 		///
 		VALIGN_MIDDLE,
 		///
-		M_TOGGLE_LINE_TOP,
-		///
-		M_TOGGLE_LINE_BOTTOM,
-		///
-		M_TOGGLE_LINE_LEFT,
-		///
-		M_TOGGLE_LINE_RIGHT,
-		///
 		M_ALIGN_LEFT,
 		///
 		M_ALIGN_RIGHT,
@@ -244,13 +236,13 @@
 	Tabular(Buffer const &, col_type columns_arg, row_type rows_arg);
 
 	/// Returns true if there is a topline, returns false if not
-	bool topLine(idx_type cell, bool wholerow = false) const;
+	bool topLine(idx_type cell) const;
 	/// Returns true if there is a topline, returns false if not
-	bool bottomLine(idx_type cell, bool wholerow = false) const;
+	bool bottomLine(idx_type cell) const;
 	/// Returns true if there is a topline, returns false if not
-	bool leftLine(idx_type cell, bool wholecolumn = false) const;
+	bool leftLine(idx_type cell) const;
 	/// Returns true if there is a topline, returns false if not
-	bool rightLine(idx_type cell, bool wholecolumn = false) const;
+	bool rightLine(idx_type cell) const;
 
 	///
 	bool topAlreadyDrawn(idx_type cell) const;
@@ -285,13 +277,13 @@
 	///
 	void setAllLines(idx_type cell, bool line);
 	///
-	void setTopLine(idx_type cell, bool line, bool wholerow = false);
+	void setTopLine(idx_type cell, bool line);
 	///
-	void setBottomLine(idx_type cell, bool line, bool wholerow = false);
+	void setBottomLine(idx_type cell, bool line);
 	///
-	void setLeftLine(idx_type cell, bool line, bool wholecolumn = false);
+	void setLeftLine(idx_type cell, bool line);
 	///
-	void setRightLine(idx_type cell, bool line, bool wholecolumn = false);
+	void setRightLine(idx_type cell, bool line);
 	///
 	void setAlignment(idx_type cell, LyXAlignment align,
 			  bool onlycolumn = false);
@@ -330,6 +322,7 @@
 	///
 	void copyRow(row_type);
 	///
+	///
 	void appendColumn(idx_type cell);
 	///
 	void deleteColumn(col_type column);
@@ -743,6 +736,10 @@
 
 	/// lock cell with given index
 	void edit(Cursor & cur, bool front, EntryDirection entry_from);
+	/// get table rom from x coordinate
+	int getRowFromY(Cursor & cur, int y) const;
+	/// get table column from y coordinate
+	int getColumnFromX(Cursor & cur, int x) const;
 	///
 	Inset * editXY(Cursor & cur, int x, int y);
 	/// can we go further down on mouse click?
@@ -772,7 +769,6 @@
 			   idx_type cell, bool erased) const;
 	///
 	void setCursorFromCoordinates(Cursor & cur, int x, int y) const;
-
 	///
 	void moveNextCell(Cursor & cur);
 	///
Index: src/insets/InsetTabular.cpp
===
--- src/insets/InsetTabular.cpp	(revision 23714)
+++ src/insets/InsetTabular.cpp	(working copy)
@@ -85,10 +85,10 @@
 
 namespace {
 
-int const ADD_TO_HEIGHT = 2;
-int const ADD_TO_TABULAR_WIDTH = 2;
-int const default_line_space = 10;
-int const WIDTH_OF_LINE = 5;
+int const ADD_TO_HEIGHT = 2; // in cell
+int const ADD_TO_TABULAR_WIDTH = 6; // horiz space before and after the table
+int const default_line_space = 10; // ?
+int const WIDTH_OF_LINE = 5; // space between double lines
 
 
 ///
@@ -120,10 +120,6 @@
 	{ Tabular::VALIGN_TOP, "valign-top" },
 	{ Tabular::VALIGN_BOTTOM, "valign-bottom" },
 	{ Tabular::VALIGN_MIDDLE, "valign-middle" },
-	{ Tabular::M_TOGGLE_LINE_TOP, "m-toggle-line-top" },
-	{ Tabular::M_TOGGLE_LINE_BOTTOM, "m-toggle-line-bottom" },
-	{ Tabular::M_TOGGLE_LINE_LEFT, "m-toggle-line-left" },
-	{ Tabular::M_TOGGLE_LINE_RIGHT, "m-toggle-line-right" },
 	{ Tabular::M_ALIGN_LEFT, "m-align-left" },
 	{ Tabular::M_ALIGN_RIGHT, "m-align-right" },
 	{ Tabular::M_ALIGN_CENTER, "m-align-center" },
@@ -478,9 +474,9 @@
 	  multicolumn(Tabular::CELL_NORMAL),
 	  alignment(LYX_ALIGN_CENTER),
 	  valignment(LYX_VALIGN_TOP),
-	  top_line(true),
+	  top_line(false),
 	  bottom_line(false),
-	  left_line(true),
+	  left_line(false),
 	  right_line(false),
 	  usebox(BOX_NONE),
 	  rotate(false),
@@ -538,7 +534,7 @@
 Tabular::RowData::RowData()
 	: ascent(0),
 	  descent(0),
-	  top_line(true),
+	  top_line(false),
 	  bottom_line(false),
 	  top_space_default(false),
 	  bottom_space_default(false),
@@ -554,7 +550,7 @@
 Tabular::ColumnData::ColumnData()
 	: alignment(LYX_ALIGN_CENTER),
 	  valignment(LYX_VALIGN_TOP),
-	  left_line(true),
+	  left_line(false),
 	  right_line(false),
 	  width(0)
 {
@@ -592,11 +588,7 @@
 	column_info.reserve(10);
 	cell_info.reserve(100);
 	fixCellNums();
-	for (row_type i = 0; i < rows_arg; ++i)
-		cell_info[i].back().right_line = true;
-	row_info.back().bottom_line = true;
-	row_info.front().bottom_line = true;
-	column_info.back().right_line = true;
+	// FIXME: set LyX silly default lines
 	

Re: 1.6svn regression: enum/item in tables

2008-03-14 Thread Dov Feldstern

Dov Feldstern wrote:

Hi!

It seems that enumeration/itemize (perhaps other layouts as well?) are 
no longer working inside a table. See the attached lyx file, created 
with r23573 from March 8, which still works fine. Try opening it in 
current svn (by r23669 from March 11 the problem already exists) --- the 
itemize and enumeration layouts are not recognized --- not in the GUI, 
nor in the latex output --- the text just appears in standard layout.


Using mercurials bisect extension 
(http://www.selenic.com/mercurial/wiki/index.cgi/BisectExtension), I was 
able to track this bug down to r23662. Richard --- any ideas?


Thanks!
Dov


Text completion not working in tables?

2008-03-14 Thread Dov Feldstern

Hi!

Stefan --- the completion stuff looks really, really nice. Thanks!

It seems to me that text completion is not working in tables. Math 
completion *does* work, though. Can anything be done about this?


Thanks!
Dov


Inserted subdocument is erroneoulsy embedded - I didn't ask for embedding in this case

2008-03-14 Thread Helge Hafting

insert->subdocument. Select some other lyx document.
Leave the "embed" checkbox blank as embedding is not wanted this time
Observe that the included file is embedded anyway!

This is simple to fix for the user - just bring up the dialog again
and un-embed the file. No-one should need to do that though.

Helge Hafting


Text completion and RTL

2008-03-14 Thread Dov Feldstern

Hi!

There's a small problem with the text completion and RTL text:

The grayed-out inline completion appears backwards in RTL text (see 
attached image).


I can explain why it is happening (and why this problem wasn't observed 
 when RTL was tested with latin characters), but I don't know how to 
easily solve the issue. The reason is something like this: when painting 
text, LyX applies the bidi algorithm, so that the string that it 
ultimately passes to Qt for painting is already in visual order; 
however, Qt 4 now applies its own bidi algorithm to all strings that it 
paints, and it doesn't seem to provide any API for saying "the string is 
already in visual order, just paint it as it is". To get around this 
problem, we paint RTL strings one character at a time (see 
http://www.lyx.org/trac/browser/lyx-devel/trunk/src/rowpainter.cpp?rev=23522#L259). 
But I imagine that the grayed-out inline completion is painted as a full 
string...


I haven't looked at the completion code at all, so I'm not sure exactly 
what's going on; but I'm pretty sure that this is the correct 
explanation of the problem. Any ideas on what can be done to solve it?


Thanks!
Dov
<>

Re: Time for 1.6 alpha?

2008-03-14 Thread Jean-Marc Lasgouttes
Andre Poenitz <[EMAIL PROTECTED]> writes:

> On Thu, Mar 13, 2008 at 09:46:16AM +0100, Jean-Marc Lasgouttes wrote:
>> José Matos <[EMAIL PROTECTED]> writes:
>> >   Other than Juergen who has another feature waiting in the backburner? 
>> > How 
>> > much time do you need to put the feature in?
>> 
>> I am currently playing with the qt code in the configure script (use
>> qmake to get to qt flags), but I am not sure it will work out to be
>> usable.
>
> What kind of information are you trying to extract from qmake?

I would like to use it like pkg-config (but working also with the
Qt/Mac binaries provided by trolltech). Here is my current patch,
using a set of m4 macros I found somewhere (there is probably room for
simplfication in there).

The problem now on the mac is that the macros expect qmake to generate
a makefile by default. On the mac, it produces a xcode project now
(since 4.3?). I guess I could work around this, but the result would
be very fragile, I guess.

JMarc

svndiff

Index: src/frontends/qt4/Makefile.am
===
--- src/frontends/qt4/Makefile.am	(revision 23686)
+++ src/frontends/qt4/Makefile.am	(working copy)
@@ -8,15 +8,15 @@ CLEANFILES += $(BUILT_SOURCES)
 
 #  Qt stuff  #
 # Use _() for localization instead of tr() or trUtf8()
-UIC4FLAGS=-tr lyx::qt_
+UICFLAGS=-tr lyx::qt_
 
 ui_%.h: ui/%.ui
-	$(UIC4) $(UIC4FLAGS) $< -o $@
+	$(UIC) $(UICFLAGS) $< -o $@
 
 MOCEDFILES = $(MOCHEADER:%.h=%_moc.cpp)
 
 %_moc.cpp: %.h
-	$(MOC4) -o $@ $<
+	$(MOC) -o $@ $<
 
 Resources.qrc: Makefile
 	echo "" > $@
@@ -26,7 +26,7 @@ Resources.qrc: Makefile
 	echo "" >> $@
 
 Resources.cpp: Resources.qrc
-	$(RCC4) $< -name Resources -o $@
+	$(RCC) $< -name Resources -o $@
 
 
 #  LIBRARIES  #
@@ -34,15 +34,15 @@ Resources.cpp: Resources.qrc
 noinst_LTLIBRARIES = liblyxqt4.la
 
 liblyxqt4_la_DEPENDENCIES = $(MOCEDFILES)
-liblyxqt4_la_LDFLAGS = $(QT4_LDFLAGS)
-liblyxqt4_la_LIBADD = $(QT4_LIB) 
+liblyxqt4_la_LDFLAGS = $(QT_LDFLAGS)
+liblyxqt4_la_LIBADD = $(QT_LIB) 
 
 AM_CPPFLAGS += \
-	$(QT4_CPPFLAGS) \
+	$(QT_CPPFLAGS) \
 	-I$(top_srcdir)/src \
 	-I$(top_srcdir)/src/frontends \
 	-I$(top_srcdir)/images \
-	$(QT4_INCLUDES) $(BOOST_INCLUDES)
+	$(BOOST_INCLUDES)
 
 SOURCEFILES = \
 	ButtonPolicy.cpp \
Index: src/Makefile.am
===
--- src/Makefile.am	(revision 23686)
+++ src/Makefile.am	(working copy)
@@ -23,6 +23,9 @@ OTHERLIBS = $(BOOST_LIBS) $(INTLLIBS) $(
 noinst_LTLIBRARIES = liblyxcore.la
 bin_PROGRAMS = lyx
 
+lyx_CXXFLAGS = $(QT_CXXFLAGS) $(AM_CXXFLAGS)
+lyx_CPPFLAGS = $(QT_CPPFLAGS) $(AM_CPPFLAGS)
+lyx_LDFLAGS  = $(QT_LDFLAGS) $(LDFLAGS)
 lyx_LDADD = \
 	liblyxcore.la \
 	liblyxmathed.la \
@@ -32,7 +35,7 @@ lyx_LDADD = \
 	liblyxgraphics.la \
 	support/liblyxsupport.la \
 	$(OTHERLIBS) \
-	$(QT4_LIB) 
+	$(QT_LIBS) 
 
 if LYX_WIN_RESOURCE
 .rc.o:
Index: src/support/Makefile.am
===
--- src/support/Makefile.am	(revision 23686)
+++ src/support/Makefile.am	(working copy)
@@ -7,8 +7,7 @@ EXTRA_DIST = pch.h \
 
 noinst_LTLIBRARIES = liblyxsupport.la
 
-liblyxsupport_la_LIBADD = $(LIBSHLWAPI) $(QT4_CORE_LIB) $(BOOST_SIGNALS)
-liblyxsupport_la_LDFLAGS = $(QT4_CORE_LDFLAGS)
+liblyxsupport_la_LIBADD = $(LIBSHLWAPI) $(BOOST_SIGNALS)
 
 BUILT_SOURCES = $(PCH_FILE)
 
@@ -23,7 +22,7 @@ CLEANFILES += $(MOCEDFILES)
 BUILT_SOURCES += $(MOCEDFILES)
 
 %_moc.cpp: %.h
-	$(MOC4) -o $@ $<
+	$(MOC) -o $@ $<
 
 liblyxsupport_la_DEPENDENCIES = $(MOCEDFILES)
 
@@ -31,7 +30,7 @@ liblyxsupport_la_DEPENDENCIES = $(MOCEDF
 ##
 
 AM_CPPFLAGS += $(PCH_FLAGS) -I$(srcdir)/.. $(BOOST_INCLUDES)
-AM_CPPFLAGS += $(QT4_CPPFLAGS) $(QT4_CORE_INCLUDES) -I$(srcdir)/minizip
+AM_CPPFLAGS += $(QT_CPPFLAGS) -I$(srcdir)/minizip
 
 # force the use of C++ compiler for minizip/*.c files, because
 # gcc can not go through the included boost files.
@@ -145,8 +144,8 @@ check_PROGRAMS = \
 	check_lstrings
 
 check_convert_LDADD = ../debug.o convert.o docstring.o lstrings.o unicode.o \
-	$(BOOST_LIBS) $(QT4_CORE_LIB)
-check_convert_LDFLAGS = $(QT4_CORE_LDFLAGS)
+	$(BOOST_LIBS) $(QT_CORE_LIBS)
+check_convert_LDFLAGS = $(QT_CORE_LDFLAGS)
 check_convert_SOURCES = \
 	tests/check_convert.cpp \
 	tests/boost.cpp
@@ -157,8 +156,8 @@ check_filetools_SOURCES = \
 	tests/boost.cpp
 
 check_lstrings_LDADD = ../debug.o lstrings.o convert.o docstring.o unicode.o \
-	$(QT4_CORE_LIB)
-check_lstrings_LDFLAGS = $(QT4_CORE_LDFLAGS)
+	$(QT_CORE_LIB)
+check_lstrings_LDFLAGS = $(QT_CORE_LDFLAGS)
 check_lstrings_SOURCES = \
 	tests/check_lstrings.cpp \
 	tests/boost.cpp
Index: src/client/Makefile.am
===
--- src/client/Makefile.am	(revision 23686)
+++ src/client/Makefile.am	

Re: [Cvslog] r23712 - in /lyx-devel/branches/BRANCH_1_5_X: src/mathed/...

2008-03-14 Thread Uwe Stöhr

> The recipe is as follows:
> 1) put the cursor inside a labeled formula
> 2) choose Insert->Label
> 3) delete the label in the label dialog (OK is disabled)

This was the problem, you have to use INSERT-> Label to delete it. Nobody is expecting this and this 
was often blamed in the past by users.


> 4) press the space bar (OK gets enabled)
> 5) hit the enter key or press the OK button
> 6) the label is deleted but the formula is still numbered
>
> As it is now, after step 5) the label gets deleted, but only
> because the formula is now turned into an unnumbered one, meaning
> that you have to hit again Alt-m-n to restore the numbering.

A label that is not referenced, can be left as is and doesn't change anything. But I agree that it 
is often better that the numbering is untouched and only the label is deleted.


regards Uwe


Re: Take 2: time for alpha

2008-03-14 Thread Uwe Stöhr

> beta 1 - 2 April

I forgot that I have to do a fileformat change to get Japanese properly working, but won't have the 
time to work on that stuff before beta 1. IS it OK to do it after beta 1 is out?


I promised that LyX 1.6 will work for Japanese and Koji Yokata invested a lot of time to reach this 
goal. All that is now left are a few changes in the LaTeX-output and the languages file. But this 
requires some time for careful testing.


regards Uwe


Re: Text completion and RTL

2008-03-14 Thread Dov Feldstern

Stefan Schimanski wrote:


Am 14.03.2008 um 15:05 schrieb Dov Feldstern:


Hi!

There's a small problem with the text completion and RTL text:

The grayed-out inline completion appears backwards in RTL text (see 
attached image).


I have to check my code as well. The idea was to reverse the string if 
needed before telling Qt about. But maybe I got something wrong in this 
logic. Take a look at RowPainter::paintInlineCompletion. That's the code 
for the text mode.


It's a bit more involved than you might expect, because the inline 
completion consists of the unique part (drawn in dark grey) and the 
non-unique part (drawn in light grey).


I do a reversal of the rtl text there. No idea why it does not work. Or 
maybe Qt its own bidi magic?


Thanks, I'll take a look at this. But I'll be a few days though...



Stefan




Re: Text completion not working in tables?

2008-03-14 Thread Dov Feldstern

Stefan Schimanski wrote:


Am 14.03.2008 um 14:14 schrieb Dov Feldstern:


Hi!

Stefan --- the completion stuff looks really, really nice. Thanks!

It seems to me that text completion is not working in tables. Math 
completion *does* work, though. Can anything be done about this?


It can. But at the moment the support is only in InsetMathNest and 
InsetText. Have to try it for InsetTabular. Probably one can just copy 
the code from InsetText.


Is the text inside a table cell not an InsetText? I sort of assumed that 
every cell contains an InsetText for its text...




Stefan




Re: Text completion and RTL

2008-03-14 Thread Stefan Schimanski


Am 14.03.2008 um 15:25 schrieb Dov Feldstern:


Stefan Schimanski wrote:

Am 14.03.2008 um 15:05 schrieb Dov Feldstern:

Hi!

There's a small problem with the text completion and RTL text:

The grayed-out inline completion appears backwards in RTL text  
(see attached image).


I have to check my code as well. The idea was to reverse the string  
if needed before telling Qt about. But maybe I got something wrong  
in this logic. Take a look at RowPainter::paintInlineCompletion.  
That's the code for the text mode.
It's a bit more involved than you might expect, because the inline  
completion consists of the unique part (drawn in dark grey) and the  
non-unique part (drawn in light grey).
I do a reversal of the rtl text there. No idea why it does not  
work. Or maybe Qt its own bidi magic?


Thanks, I'll take a look at this. But I'll be a few days though...


Sure, no problem. Btw, do you use a rtl locale for the gui? I mean  
maybe your Qt does some RTL magic which mine does not. Just an idea...


Stefan


Re: Text completion and RTL

2008-03-14 Thread Dov Feldstern

Stefan Schimanski wrote:


Am 14.03.2008 um 15:25 schrieb Dov Feldstern:


Stefan Schimanski wrote:

Am 14.03.2008 um 15:05 schrieb Dov Feldstern:

Hi!

There's a small problem with the text completion and RTL text:

The grayed-out inline completion appears backwards in RTL text (see 
attached image).


I have to check my code as well. The idea was to reverse the string 
if needed before telling Qt about. But maybe I got something wrong in 
this logic. Take a look at RowPainter::paintInlineCompletion. That's 
the code for the text mode.
It's a bit more involved than you might expect, because the inline 
completion consists of the unique part (drawn in dark grey) and the 
non-unique part (drawn in light grey).
I do a reversal of the rtl text there. No idea why it does not work. 
Or maybe Qt its own bidi magic?


Thanks, I'll take a look at this. But I'll be a few days though...


Sure, no problem. Btw, do you use a rtl locale for the gui? I mean maybe 
your Qt does some RTL magic which mine does not. Just an idea...




I'll keep this possibility in mind, thanks...


Stefan




Re: Text completion not working in tables?

2008-03-14 Thread Stefan Schimanski


Am 14.03.2008 um 14:14 schrieb Dov Feldstern:


Hi!

Stefan --- the completion stuff looks really, really nice. Thanks!

It seems to me that text completion is not working in tables. Math  
completion *does* work, though. Can anything be done about this?


It can. But at the moment the support is only in InsetMathNest and  
InsetText. Have to try it for InsetTabular. Probably one can just copy  
the code from InsetText.


Stefan


Re: Text completion not working in tables?

2008-03-14 Thread Stefan Schimanski


Am 14.03.2008 um 15:26 schrieb Dov Feldstern:


Stefan Schimanski wrote:

Am 14.03.2008 um 14:14 schrieb Dov Feldstern:

Hi!

Stefan --- the completion stuff looks really, really nice. Thanks!

It seems to me that text completion is not working in tables. Math  
completion *does* work, though. Can anything be done about this?
It can. But at the moment the support is only in InsetMathNest and  
InsetText. Have to try it for InsetTabular. Probably one can just  
copy the code from InsetText.


Is the text inside a table cell not an InsetText? I sort of assumed  
that every cell contains an InsetText for its text...


AFAIK it only uses the Text class for every cell. Otherwise the cursor  
would need another slice for the table and the InsetText, and hence  
many special handling to avoid strange positions which are in the  
table, but not in the InsetText.


Stefan


  1   2   >