Lfuns doxy -> .lyx

2008-03-15 Thread Rex Eastbourne
Hi,

I took a look at the lfuns doxy -> .lyx shell script. I wasn't able to run
it on my computer (I got error messages), but as far as I can tell it takes
the documentation in LyXAction.cpp and converts it into a LyX file. I read a
little bit about Doxygen, and it seems that Doxygen can output LaTeX. So I'm
curious why we don't just run Doxygen on LyXAction.cpp to get the LaTeX, and
convert the LaTeX to LyX. Do I understand this right?

Rex

> 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
>
>


Re: Some strings

2008-03-15 Thread Bo Peng
On Sat, Mar 15, 2008 at 9:36 PM, Pavel Sanda <[EMAIL PROTECTED]> wrote:
> hi
>  its ok to commit this (Bo?)

Sure.

Thanks.
Bo


Completion Cursor

2008-03-15 Thread rgheck


Would it be possible to add a preference that would turn off the text 
completion cursor? I was using 1.6 to do some documentation work today, 
and I found the switch from "|" to ">"---close enough---somewhat 
distracting. And it doesn't help me, because I won't use completion in 
text mode. So it'd be nice to be able to turn it off altogether.


It would perhaps be even better simply to have a "turn off text-mode 
completion altogether" preference that would also stop word collection. 
I'm a bit worried about what this will do to slow machines, e.g., my 
very old but much loved 750MHz PIII Vaio laptop.


rh



Re: Changes to website content

2008-03-15 Thread Rex Eastbourne
Hi Pavel,

Fair enough. Here's a second patch containing just the changes to the
"Download Links" page, and not the front page. I addressed your feedback by
fixing the HTML and adding in "Linux/sources/other versions" in a section
header. Feel free to change the wording; the only reason I submitted this
patch is that I think clear links to binary downloads for Windows/Mac are
urgently needed.

Thanks to Pavel and others for the other references -- I'll look at those
projects when I have a chance.

Rex

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/ 
> 
>
>
>


Website Content Patch 2.patch
Description: Binary data


Some strings

2008-03-15 Thread Pavel Sanda
hi
its ok to commit this (Bo?)
pavel
diff --git a/src/Buffer.cpp b/src/Buffer.cpp
index cac1f58..b20340d 100644
--- a/src/Buffer.cpp
+++ b/src/Buffer.cpp
@@ -925,18 +925,18 @@ bool Buffer::writeFile(FileName const & fname) const
}
 
if (!retval) {
-   message(str + _(" could not write file!."));
+   message(str + _(" could not write file!"));
return false;
}
 
removeAutosaveFile(d->filename.absFilename());
 
if (params().embedded) {
-   message(str + _(" writing embedded files!."));
+   message(str + _(" writing embedded files."));
// if embedding is enabled, write file.lyx and all the embedded 
files
// to the zip file fname.
if (!d->embedded_files.writeFile(fname, *this)) {
-   message(str + _(" could not write embedded files!."));
+   message(str + _(" could not write embedded files!"));
return false;
}
}
diff --git a/src/EmbeddedFiles.cpp b/src/EmbeddedFiles.cpp
index e5d7ab3..4109dcd 100644
--- a/src/EmbeddedFiles.cpp
+++ b/src/EmbeddedFiles.cpp
@@ -168,7 +168,7 @@ bool EmbeddedFile::extract() const
// otherwise, ask if overwrite
int ret = Alert::prompt(
_("Overwrite external file?"),
-   bformat(_("External file %1$s already exists, do you 
want to overwrite it"),
+   bformat(_("External file %1$s already exists, do you 
want to overwrite it?"),
from_utf8(ext_file)), 1, 1, _("&Overwrite"), 
_("&Cancel"));
if (ret != 0)
// if the user does not want to overwrite, we still 
consider it
diff --git a/src/LyXFunc.cpp b/src/LyXFunc.cpp
index 7536a0f..8ef6cec 100644
--- a/src/LyXFunc.cpp
+++ b/src/LyXFunc.cpp
@@ -720,7 +720,7 @@ bool loadLayoutFile(string const & name, string const & 
buf_path)
 
LayoutFile & tc = LayoutFileList::get()[name];
if (!tc.load(buf_path)) {
-   docstring s = bformat(_("The document class %1$s."
+   docstring s = bformat(_("The document class %1$s "
   "could not be loaded."), from_utf8(name));
Alert::error(_("Could not load class"), s);
return false;


Re: [patch] InsetSpace GUI (was: Re: Time for 1.6 alpha?)

2008-03-15 Thread Enrico Forestieri
On Sat, Mar 15, 2008 at 07:28:07PM +0100, Jürgen Spitzmüller wrote:

> Here's the patch. Lyx2lyx works now, the metrics problem remains, and I'm 
> stuck with that. Maybe someone has an idea.
> 
> Otherwise, objections?

I think that there should be some visual difference between enspace,
quad, qquad, and custom spaces. ATM they all look the same.

Just as a suggestion, maybe your new inset could support leaders.
Leaders are a special case of glue as far as TeX is concerned.
Ordinary glue fills space with nothing, while leaders fill space
with any desired thing. For example, \leaders\hskip
has the same effect as \hskip except that the specified box
is used as a fill pattern.

A \lspace macro could be defined as

\def\lspace#1#2{\vrule [EMAIL PROTECTED]@\nobreak
  \leaders\hbox{#1}\hskip #2\hskip [EMAIL PROTECTED]

and then used as follows:

\lspace{$\rightarrow$}{\fill}

\lspace{ $\rightarrow$ }{\fill}

\lspace{.-}{5cm}

\lspace{abc}{5cm}

In this way a fill pattern could also be defined by the user for
custom lengths.

-- 
Enrico


Re: Question about Math Macros

2008-03-15 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
>
> 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.

thanks
pavel


Re: More displays

2008-03-15 Thread Pavel Sanda
>>> I was editing a LyX document a work[1] and left it running at work. Then 
>>> I
>>> did some work at home and thought it'd be great if I could just "shift" 
>>> the
>>> display so that it now shows up at home instead...  Is there any idea of
>>> filing this in bugzilla for the extreme future?
>>
>> i dont think this is the stuff to be implemented by lyx. anyway have you 
>> ever tried vnc?
>
> Yes, but as I hadn't started LyX ina VNC session to begin with, it wasn't 
> an option (AFAIK).

http://gentoo-wiki.com/HOWTO_Use_VNC_to_connect_to_existing_X_Sessions

pavel


Re: More displays

2008-03-15 Thread christian . ridderstrom

On Sun, 16 Mar 2008, Pavel Sanda wrote:


I was editing a LyX document a work[1] and left it running at work. Then I
did some work at home and thought it'd be great if I could just "shift" the
display so that it now shows up at home instead...  Is there any idea of
filing this in bugzilla for the extreme future?


i dont think this is the stuff to be implemented by lyx. anyway have you 
ever tried vnc?


Yes, but as I hadn't started LyX ina VNC session to begin with, it wasn't 
an option (AFAIK).


Anyway, I was just dreaming of a way to "hijack" the LyX session.

/Christian

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

Re: Move Editing and Fullscreen in the 'User interface' panel to a separate panel.

2008-03-15 Thread Pavel Sanda
> >  The completion settings should probably get their own panel, no? They
> >  take quite a lot of space.
> 
> I am not quite sure Maybe fullscreen back to user interface and
> completion to editing?

i have no hard opinion on that matter. do as you wish.
pavel


Re: [patch] implement \slash and \nobreakdash

2008-03-15 Thread Pavel Sanda
> > 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 ?
> 
> I don't understand.

this question rose when i tried to translate the string. in czech there are 
different
words for hyphen and dash and i was puzzled, that hypen is implemented by macro 
containing
"dash" in its name.

pavel


Re: [Cvslog] r23743 - /lyx-devel/trunk/src/frontends/qt4/ui/PrefLangua...

2008-03-15 Thread Pavel Sanda
> I guess it's a matter of taste, but I don't really think that this is an 
> improvement... ;)

i can revert if you dont like it. 
as you said its matter of taste, the previous version was hurting my eyes
for the alignment of checkbox so i tried to break it by the line..

pavel


Re: More displays

2008-03-15 Thread Pavel Sanda
> I was editing a LyX document a work[1] and left it running at work. Then I 
> did some work at home and thought it'd be great if I could just "shift" the 
> display so that it now shows up at home instead...  Is there any idea of 
> filing this in bugzilla for the extreme future?

i dont think this is the stuff to be implemented by lyx.
anyway have you ever tried vnc?
pavel


Re: Move Editing and Fullscreen in the 'User interface' panel to a separate panel.

2008-03-15 Thread Stefan Schimanski


Am 15.03.2008 um 23:39 schrieb Bo Peng:


The completion settings should probably get their own panel, no? They
take quite a lot of space.


I am not quite sure Maybe fullscreen back to user interface and
completion to editing?


I would prefer a separate pane for fullscreen and a separate pane for  
completion in fact.


Stefan



Re: Move Editing and Fullscreen in the 'User interface' panel to a separate panel.

2008-03-15 Thread Bo Peng
>  The completion settings should probably get their own panel, no? They
>  take quite a lot of space.

I am not quite sure Maybe fullscreen back to user interface and
completion to editing?

Bo


Re: Move Editing and Fullscreen in the 'User interface' panel to a separate panel.

2008-03-15 Thread Stefan Schimanski


Am 15.03.2008 um 23:13 schrieb Bo Peng:


Yes, please!


Have done that. But the dialog is still very long because of the
'keyboard/mouse' panel. :-(


The completion settings should probably get their own panel, no? They  
take quite a lot of space.


Stefan


Re: Move Editing and Fullscreen in the 'User interface' panel to a separate panel.

2008-03-15 Thread Bo Peng
>  Yes, please!

Have done that. But the dialog is still very long because of the
'keyboard/mouse' panel. :-(

Bo


Re: Move Editing and Fullscreen in the 'User interface' panel to a separate panel.

2008-03-15 Thread Stefan Schimanski


Am 15.03.2008 um 22:03 schrieb Bo Peng:


Hi,

The 'user interface' panel of the preference dialog is too long (and
can not be viewed completely on my widescreen laptop). If there is no
objection, I will create another panel 'Editing' and move editing and
fullscreen to that panel.


Yes, please!

Stefan


Move Editing and Fullscreen in the 'User interface' panel to a separate panel.

2008-03-15 Thread Bo Peng
Hi,

The 'user interface' panel of the preference dialog is too long (and
can not be viewed completely on my widescreen laptop). If there is no
objection, I will create another panel 'Editing' and move editing and
fullscreen to that panel.

Cheers,
Bo


Re: [patch] InsetSpace GUI (was: Re: Time for 1.6 alpha?)

2008-03-15 Thread Stefan Schimanski


Am 15.03.2008 um 19:28 schrieb Jürgen Spitzmüller:


Juergen Spitzmueller wrote:
It is basically complete and already works. The feature is a dialog  
for
InsetSpace similar to our VSpace dialog (bug 2078), which also  
merges HFill

into InsetSpace (thus lets you switch between the diverse spaces and
hfill). The boni are: support for \hspace and \hspace* (bug 2075),  
\dotfill

and \hrulefill. Furthermore, it fixes bug 4555 (hfill drawing).

The remaining problems are: one specific lyx2lyx reversion problem  
and some
metrics problems (all non-fill spaces are drawn in the same width).  
I think
these are trivial, I just need some time. I'll try to finish it at  
the

weekend.


Here's the patch. Lyx2lyx works now, the metrics problem remains,  
and I'm

stuck with that. Maybe someone has an idea.

Otherwise, objections?


Yes, I don't think the following is what you want to do. The loop will  
set basically every inset to width 5.


diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp
index 73e50a8..d728d77 100644
--- a/src/TextMetrics.cpp
+++ b/src/TextMetrics.cpp
@@ -626,7 +626,8 @@ void TextMetrics::computeRowMetrics(pit_type const  
pit,

InsetList::const_iterator iend = par.insetList().end();
for ( ; ii != iend; ++ii) {
if (ii->pos >= endpos || ii->pos < row.pos()
-   || ii->inset->lyxCode() != HFILL_CODE)
+   || (ii->inset->lyxCode() != SPACE_CODE &&
+   ii->inset->isStretchableSpace()))
continue;
Dimension dim = row.dimension();
if (pm.hfillExpansion(row, ii->pos))

Stefan

Re: [Cvslog] r23763 - in /lyx-devel/trunk/src: Text.cpp Text.h TextMet...

2008-03-15 Thread Dov Feldstern

[EMAIL PROTECTED] wrote:

Author: sts
Date: Sat Mar 15 13:22:28 2008
New Revision: 23763

URL: http://www.lyx.org/trac/changeset/23763
Log:
* moved text completion logic into Text class
* added completion support to InsetTabular


Thanks!


Re: [Cvslog] r23743 - /lyx-devel/trunk/src/frontends/qt4/ui/PrefLangua...

2008-03-15 Thread Dov Feldstern

[EMAIL PROTECTED] wrote:

Author: sanda
Date: Sat Mar 15 00:50:02 2008
New Revision: 23743

URL: http://www.lyx.org/trac/changeset/23743
Log:
Try to deuglify RTL in Language preferences a bit.



I guess it's a matter of taste, but I don't really think that this is an 
improvement... ;)


Re: 1.6svn regression: enum/item in tables

2008-03-15 Thread Dov Feldstern

rgheck wrote:

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.




Yes, this seems to solve the problem. Thanks!


rh





Re: Fix pipes

2008-03-15 Thread rgheck

Scott Lambert wrote:
There seems to be a well known issue that if LyX crashes that the 
.lyxpipes files are not properly deleted and this causes problems. I 
have created an automator script that deletes these. Could you modify 
LyX's start up sequence to automatically delete these files, just in 
case the program did not successfully complete its quit procedure? 
This would make using pipes much more stable for the average user.


You don't quite want to do that. I have occasionally wanted to run more 
than one instance of LyX at a time, in which case I have to deal with 
the fact that the pipes are already there and the new instance won't be 
able to write its own. But deleting them would definitely be wrong.


What would be nice is if we could get LyX to go ahead and delete them 
before it shuts down. This won't always work, but I'll bet it would work 
a lot of the time.


rh



Re: More displays

2008-03-15 Thread Andre Poenitz
On Sat, Mar 15, 2008 at 06:08:25PM +0100, [EMAIL PROTECTED] wrote:
> On Fri, 14 Mar 2008, Pavel Sanda wrote:
>
>> 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.)
>
> Another "dream" I had the other day was to be able to "shift" the display 
> on a running LyX instance from one computer to another. Here's the 
> scenario.
>
> I was editing a LyX document a work[1] and left it running at work. Then I 
> did some work at home and thought it'd be great if I could just "shift" the 
> display so that it now shows up at home instead...  Is there any idea of 
> filing this in bugzilla for the extreme future?

I think this is a rather generic X "wanted feature" (or whatever, it
might even already exist) than a LyX specific one.

Andre'


[patch] InsetSpace GUI (was: Re: Time for 1.6 alpha?)

2008-03-15 Thread Jürgen Spitzmüller
Juergen Spitzmueller wrote:
> It is basically complete and already works. The feature is a dialog for
> InsetSpace similar to our VSpace dialog (bug 2078), which also merges HFill
> into InsetSpace (thus lets you switch between the diverse spaces and
> hfill). The boni are: support for \hspace and \hspace* (bug 2075), \dotfill
> and \hrulefill. Furthermore, it fixes bug 4555 (hfill drawing).
>
> The remaining problems are: one specific lyx2lyx reversion problem and some
> metrics problems (all non-fill spaces are drawn in the same width). I think
> these are trivial, I just need some time. I'll try to finish it at the
> weekend.

Here's the patch. Lyx2lyx works now, the metrics problem remains, and I'm 
stuck with that. Maybe someone has an idea.

Otherwise, objections?

Jürgen
Index: lib/lyx2lyx/LyX.py
===
--- lib/lyx2lyx/LyX.py	(Revision 23764)
+++ lib/lyx2lyx/LyX.py	(Arbeitskopie)
@@ -80,7 +80,7 @@
("1_3", [221], minor_versions("1.3" , 7)),
("1_4", range(222,246), minor_versions("1.4" , 5)),
("1_5", range(246,277), minor_versions("1.5" , 2)),
-   ("1_6", range(277,319), minor_versions("1.6" , 0))]
+   ("1_6", range(277,320), minor_versions("1.6" , 0))]
 
 
 def formats_list():
Index: lib/lyx2lyx/lyx_1_6.py
===
--- lib/lyx2lyx/lyx_1_6.py	(Revision 23764)
+++ lib/lyx2lyx/lyx_1_6.py	(Arbeitskopie)
@@ -1259,14 +1259,14 @@
 continue
 l = find_token(document.body, '\tsubcaptionText', i, j)
 caption = get_value(document.body, '\tsubcaptionText', i, j).strip('"')
-savestr = document.body[i]
+savebegin = document.body[i]
+saveend = document.body[j]
+document.body[j] = '\n\\end_layout\n\n\\end_inset\n' + saveend
+del document.body[k]
+del document.body[l]
 document.body[i] = '\\begin_inset Float figure\nwide false\nsideways false\n' \
 'status open\n\n\\begin_layout PlainLayout\n\\begin_inset Caption\n\n\\begin_layout PlainLayout\n' \
-+ caption + '\n\\end_layout\n\n\\end_inset\n\n\\end_layout\n\n\\begin_layout PlainLayout\n' + savestr
-savestr = document.body[j]
-document.body[j] = '\n\\end_layout\n\n\\end_inset\n' + savestr
-del document.body[k]
-del document.body[l]
++ caption + '\n\\end_layout\n\n\\end_inset\n\n\\end_layout\n\n\\begin_layout PlainLayout\n' + savebegin
 
 
 def revert_subfig(document):
@@ -1388,6 +1388,53 @@
 return
 document.header.pop(i)
 
+
+def convert_hfill(document):
+"Convert hfill to space inset"
+i = 0
+while True:
+i = find_token(document.body, "\\hfill", i)
+if i == -1:
+return
+document.body[i] = document.body[i].replace('\\hfill', '\\InsetSpace \\hfill{}')
+
+
+def revert_hfills(document):
+'Revert \\hfill commands'
+for i in range(len(document.body)):
+document.body[i] = document.body[i].replace('\\InsetSpace \\hfill{}', '\\hfill')
+document.body[i] = document.body[i].replace('\\InsetSpace \\dotfill{}', \
+'\\begin_inset ERT\nstatus collapsed\n\n' \
+'\\begin_layout Standard\n\n\n\\backslash\n' \
+'dotfill{}\n\\end_layout\n\n\\end_inset\n\n')
+document.body[i] = document.body[i].replace('\\InsetSpace \\hrulefill{}', \
+'\\begin_inset ERT\nstatus collapsed\n\n' \
+'\\begin_layout Standard\n\n\n\\backslash\n' \
+'hrulefill{}\n\\end_layout\n\n\\end_inset\n\n')
+
+
+def revert_hspace(document):
+'Revert \\InsetSpace \\hspace{} to ERT'
+i = 0
+while True:
+i = find_token(document.body, "\\InsetSpace \\hspace", i)
+if i == -1:
+return
+length = get_value(document.body, '\\length', i+1)
+if length == '':
+document.warning("Malformed lyx document: Missing '\\length' in Space inset.")
+return
+del document.body[i+1]
+document.body[i] = document.body[i].replace('\\InsetSpace \\hspace*{}', \
+'\\begin_inset ERT\nstatus collapsed\n\n' \
+'\\begin_layout Standard\n\n\n\\backslash\n' \
+'hspace*{' + length + '}\n\\end_layout\n\n\\end_inset\n\n')
+document.body[i] = document.body[i].replace('\\InsetSpace \\hspace{}', \
+'\\begin_inset ERT\nstatus collapsed\n\n' \
+'\\begin_layout Standard\n\n\n\\backslash\n' \
+'hspace{' + length + '}\n\\end_layout\n\n\\end_inset\n\n')
+
+
 ##
 # Conversion hub
 #
@@ -1435,9 +1482,11 @@
[316, [convert_subfig]],
[317, []],
[318, []],
+   [319, [convert_hfill]]
   ]
 
-revert =  [[317, [remove_extra_embedded_files]],
+revert =  [[318, [revert_hfills, revert_hspace]],
+   [317, [remove_extra_embedded_files]],
[316, [revert_wrapplacement]],
  

Re: setting lines in tables

2008-03-15 Thread Edwin Leuven

Jürgen Spitzmüller wrote:

Edwin Leuven wrote:

fixed in attached.


really?


ahum
Index: src/frontends/qt4/GuiTabular.cpp
===
--- src/frontends/qt4/GuiTabular.cpp	(revision 23764)
+++ 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 23764)
+++ 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 23764)
+++ src/insets/InsetTabular.cpp	(working copy)
@@ -86,10 +86,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
 
 
 ///
@@ -121,10 +121,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" },
@@ -479,9 +475,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

Re: setting lines in tables

2008-03-15 Thread Jürgen Spitzmüller
Edwin Leuven wrote:
> fixed in attached.

really?

> the lyx2lyx part needs to be done though...

yes.

Jürgen


Re: setting lines in tables

2008-03-15 Thread Edwin Leuven

Jürgen Spitzmüller wrote:

I think you shouldn't change the default settings of the lines.


fixed in attached.

the lyx2lyx part needs to be done though...
Index: intl/localename.c
===
--- intl/localename.c	(revision 23764)
+++ intl/localename.c	(working copy)
@@ -1357,7 +1357,6 @@
 	switch (sub)
 	  {
 	  case SUBLANG_PUNJABI_INDIA: return "pa_IN"; /* Gurmukhi script */
-	  case SUBLANG_PUNJABI_PAKISTAN: return "pa_PK"; /* Arabic script */
 	  }
 	return "pa";
   case LANG_RHAETO_ROMANCE: return "rm_CH";
@@ -1365,7 +1364,6 @@
 	switch (sub)
 	  {
 	  case SUBLANG_ROMANIAN_ROMANIA: return "ro_RO";
-	  case SUBLANG_ROMANIAN_MOLDOVA: return "ro_MD";
 	  }
 	return "ro";
   case LANG_RUSSIAN:


Re: setting lines in tables

2008-03-15 Thread Jürgen Spitzmüller
Edwin Leuven wrote:
> any objections if i apply the attached?

I think you shouldn't change the default settings of the lines.

Jürgen


Re: [patch] implement \slash and \nobreakdash

2008-03-15 Thread Jürgen Spitzmüller
Pavel Sanda wrote:
> 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 ?

I don't understand.

Jürgen


Re: More displays

2008-03-15 Thread christian . ridderstrom

On Fri, 14 Mar 2008, Pavel Sanda wrote:

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.)


Another "dream" I had the other day was to be able to "shift" the display 
on a running LyX instance from one computer to another. Here's the 
scenario.


I was editing a LyX document a work[1] and left it running at work. Then I 
did some work at home and thought it'd be great if I could just "shift" 
the display so that it now shows up at home instead...  Is there any idea 
of filing this in bugzilla for the extreme future?


Best regards
/Christian

[1] I have a reason to write a document once again with lots of math, so I 
could motivate using LyX :-)  It's still amazing, and I like it quite a 
bit.


Annoyance 1. What are the keyboard shortcuts (and LFUN) for "Toggle math 
toolbar"?  I couldn't find the old math dialog, but eventually found the 
icon on the toolbar. However, I haven't figured out the shortcut. All the 
tool tip says is "Toggle math toolbar", nothing about a shortcut :-(


Annoyance 2. What are the keyboard shortcuts for "toggle math panels"?
Same thing here really...


Should I file an enhancement request for the toolbar tips to also show 
keyboard shortcuts?  Should I file an enhancement request for giving these 
things a keyboard shortcut if they don't already ahve them? (or LFUN's).


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

Re: setting lines in tables

2008-03-15 Thread Edwin Leuven

latest version attached

this would imply a format change because current cell and row/col lines 
are not consistent


unfortunately i don't know any python and was wondering whether someone 
could give me a hand?


the logic would be the following:

get col line settings
get row line settings
don't write col + row line settings

foreach (cell)
if !cell.multicol
cell.topline = row.topline
cell.bottomline = row.bottomline

if !cell.multicol || (cell.multicol && !nextcell.multicol)
cell.rightline = col.rightline

if !cell.multicol || (cell.multicol && !prevcell.multicol)
cell.leftline = col.leftline



edwin
Index: development/FORMAT
===
--- development/FORMAT	(revision 23764)
+++ development/FORMAT	(working copy)
@@ -1,6 +1,9 @@
 LyX file-format changes
 ---
 
+2008-03-15 Edwin Leuven <[EMAIL PROTECTED]>
+	* Format incremented to 319: ensure consistency between cell and row/col lines
+
 2008-03-09 Bo Peng <[EMAIL PROTECTED]>
 	* Format incremented to 318: add \extra_embedded_files to buffer params
 
@@ -953,3 +956,4 @@
 
  \end_inset
 
+
Index: lib/lyx2lyx/LyX.py
===
--- lib/lyx2lyx/LyX.py	(revision 23764)
+++ lib/lyx2lyx/LyX.py	(working copy)
@@ -80,7 +80,7 @@
("1_3", [221], minor_versions("1.3" , 7)),
("1_4", range(222,246), minor_versions("1.4" , 5)),
("1_5", range(246,277), minor_versions("1.5" , 2)),
-   ("1_6", range(277,319), minor_versions("1.6" , 0))]
+   ("1_6", range(277,320), minor_versions("1.6" , 0))]
 
 
 def formats_list():
Index: lib/lyx2lyx/lyx_1_6.py
===
--- lib/lyx2lyx/lyx_1_6.py	(revision 23764)
+++ lib/lyx2lyx/lyx_1_6.py	(working copy)
@@ -47,6 +47,10 @@
 
 
 
+def convert_tablines(document):
+return
+
+
 def fix_wrong_tables(document):
 i = 0
 while True:
@@ -1435,9 +1439,11 @@
[316, [convert_subfig]],
[317, []],
[318, []],
+   [319, [convert_tablines]],
   ]
 
-revert =  [[317, [remove_extra_embedded_files]],
+revert =  [[318, []],
+   [317, [remove_extra_embedded_files]],
[316, [revert_wrapplacement]],
[315, [revert_subfig]],
[314, [revert_colsep]],
Index: src/Buffer.cpp
===
--- src/Buffer.cpp	(revision 23764)
+++ src/Buffer.cpp	(working copy)
@@ -116,7 +116,7 @@
 
 namespace {
 
-int const LYX_FORMAT = 318;
+int const LYX_FORMAT = 319;
 
 typedef map DepClean;
 typedef map > RefCache;
Index: src/frontends/qt4/GuiTabular.cpp
===
--- src/frontends/qt4/GuiTabular.cpp	(revision 23764)
+++ 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));
 	// repain

Password policy for wiki pages (Was: Wiki - suggested edit (mac)

2008-03-15 Thread christian . ridderstrom
I suggest that when users ask for the password in order to edit pages we 
just send it to them privately. [*]


Any objections?

Best regards
/Christian

PS. We can revert changes to the wiki pages, and we can change the 
password, so I see little risk in giving out the password. In fact, I'd 
prefer that we didn't have a password at all, but the spam bots are 
annoying.


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

Re: Changes to the website content

2008-03-15 Thread christian . ridderstrom

On Thu, 13 Mar 2008, Rex Eastbourne wrote:

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.


Did you set up a web site somewhere so that we could look at the end 
result?  If not, I can help you if you send me (privately) the full set of 
files. Then I'll set it up on www.lyx.org/~chr for others to see.


/Christian


- conversion of lfun doxy docs to lyx (now in bash)



unfamiliar with the LyX markup language, as well as the overall


Just ask lots of question on this list, you'll learn as you go along!

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

Fix pipes

2008-03-15 Thread Scott Lambert
There seems to be a well known issue that if LyX crashes that  
the .lyxpipes files are not properly deleted and this causes problems.  
I have created an automator script that deletes these. Could you  
modify LyX's start up sequence to automatically delete these files,  
just in case the program did not successfully complete its quit  
procedure? This would make using pipes much more stable for the  
average user.


-Scott


Re: Word2Lyx MSWord Macro

2008-03-15 Thread christian . ridderstrom

On Thu, 13 Mar 2008, Damien Boucquey wrote:

Is this intersting for anybody ? and if yes, here and how can I post it 
on the LyX site ?


It certainly sounds interesting. I think a page on the wiki is a good 
start. To make sure that the file isn't corrupted by a malicous user, I 
could upload it for you so that others can't modify it. (The link on a 
wiki page could still be altered though).


Best regards
/C

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

Re: Helping with LyX

2008-03-15 Thread christian . ridderstrom

On Wed, 12 Mar 2008, Rex Eastbourne wrote:

place where I could see the most improvement is the website, 
specifically the navigation, documentation, and look and feel.


Hi Rex,

I certainly agree with the above. (IMHO this also holds for the wiki, 
although I'm not sure you're referring to it specifically. Oh, btw, I'm 
the administrator/creator of the wiki, so it's ok to bash it:-)  All the 
ugly layout and bad structure you see is my fault (no irony here, I'd be 
happy to improve it somehow)


For example, here's one immediate issue: Many of my friends have seen me 
using LyX and have asked where to get it. However, they have come back 
to me confused about the www.lyx.org website, specifically where to find 
the right installer.


I think this is very true. I've heard other stories from people who've 
never even bothered to test the software because of an outdated web site.

(Two MSc thesis workes that I supervise comes to my mind...:-)

Bo wrote:


I would suggest that you first check out lyx-devel and compile lyx by
yourself. Learn how to make changes and submit patches. Many things
will come out when you follow lyx-devel mailing list messages. At this
stage of development, I think you can test lyx1.6 and report bugs,
and document new features of lyx (ask Uwe). On the top of my mind,
lib/doc/Shortcuts.lyx needs a lot of work.


As Bo said, I think building LyX is an excellent way for you to start.

Best regards
/Christian

PS. Let me know if you'd like help on dealing with the web site stuff, 
i.e. checking it out or testing it on www.lyx.org.  Or if you'd like to 
change stuff on the wiki.


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

Re: Question about Math Macros

2008-03-15 Thread Stefan Schimanski


Am 15.03.2008 um 10:00 schrieb José Matos:


On Saturday 15 March 2008 03:01:57 Stefan Schimanski wrote:

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


 Could you add this documentation to lyx if it is not in yet?

 If necessary we can add this to the developers directory and then  
later move

it to the genereal documentation...

 Just my 2 euro cents. :-)


Added it to development/mathmacros.

Moreover I also commited some testcases which I used frequently.

Stefan

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

2008-03-15 Thread Stefan Schimanski


Am 15.03.2008 um 04:39 schrieb 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.


Because then I would have used QDrag::start, just to get complains by  
Qt 4.3 people that it does not complile.


But honestly, switching everybody to 4.2 does not make much sense.  
First some platforms just use 4.3 and it would need manual compiling  
of 4.2 to get it working, possible of course. But then, when we  
release binaries, we might need 4.3 anyway because then we _have_ to  
use the local version. And at least then we would find out about  
incompatibilities which would have been fixed long before otherwise.


Stefan


Re: Question about Math Macros

2008-03-15 Thread José Matos
On Saturday 15 March 2008 03:01:57 Stefan Schimanski wrote:
> I have documented the macros some time ago here:
> http://1stein.org/download/dynmacro.pdf

  Could you add this documentation to lyx if it is not in yet?

  If necessary we can add this to the developers directory and then later move 
it to the genereal documentation...

  Just my 2 euro cents. :-)

> Stefan

-- 
José Abílio


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

2008-03-15 Thread Andre Poenitz
On Sat, Mar 15, 2008 at 03:21:37AM +0100, Stefan Schimanski wrote:
>
> 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()); ?

Erm, yes.

Andre'