Re: Minor bug fixes

2012-05-09 Thread Pavel Sanda
John Tapsell wrote:
 Hi all,
 
   Here's some minor bug fixes for bugs that I've come across.
 
   The first moves the Latex Argument option for tables into the column
 property section in the dialog.  It got moved fairly recently by
 accidently I think.

I would let this one for tabular guys, I have no idea where latex arg
plays role. Anyway, please don't use any html inside .ui files,
it does not fit well with translation machinery.

   The second fixes buddies in the same dialog (the connection between
 the labels and the widgets.  Important for accelerator)

Shouldn't be the buddies for degrees empty? (There is no accel).

   The third fixes a null-pointer crash if a backend is missing when
 viewing the source.

This is in.
Pavel


Re: Minor bug fixes

2012-05-09 Thread John Tapsell
On 9 May 2012 08:38, Pavel Sanda sa...@lyx.org wrote:
 John Tapsell wrote:
 Hi all,

   Here's some minor bug fixes for bugs that I've come across.

   The first moves the Latex Argument option for tables into the column
 property section in the dialog.  It got moved fairly recently by
 accidently I think.

 I would let this one for tabular guys, I have no idea where latex arg
 plays role. Anyway, please don't use any html inside .ui files,
 it does not fit well with translation machinery.

In the second patch I cleaned up the html and made it fairly minimal.
It shouldn't cause any problems with the translation machinery.  I've
personally worked on some of the i18n code in linux, adding better
support for vietnamese, thai and arabic.  If there are any actual bugs
here I'd like to know and would try to fix them upstream.

   The second fixes buddies in the same dialog (the connection between
 the labels and the widgets.  Important for accelerator)

 Shouldn't be the buddies for degrees empty? (There is no accel).

It's common to pass mouse clicks for a label through to the buddy to
focus it.  Particularly when you use voice commands or touchscreens.
Accessibility is a big topic.

John


Re: Minor bug fixes

2012-05-09 Thread John Tapsell
Here's another small patch.

It fixes the Page break on current row checkbox.  Currently if you
set it for a row in a table, you cannot unset it again.

I tested this and it seems to work, but I'm not sure if I'm doing the
right thing.

John
From 912f0dfbe62e07f3996a4e2dbc7fcd8899ac478d Mon Sep 17 00:00:00 2001
From: John Tapsell john.tapsell@basyskom.com
Date: Wed, 9 May 2012 10:49:03 +0100
Subject: [PATCH] Fix toggling the Page break on current row checkbox in the tabular dialog box

---
 src/frontends/qt4/GuiTabular.cpp |2 ++
 src/insets/InsetTabular.cpp  |8 +++-
 src/insets/InsetTabular.h|1 +
 3 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/src/frontends/qt4/GuiTabular.cpp b/src/frontends/qt4/GuiTabular.cpp
index 8a14cb7..79706d4 100644
--- a/src/frontends/qt4/GuiTabular.cpp
+++ b/src/frontends/qt4/GuiTabular.cpp
@@ -580,6 +580,8 @@ docstring GuiTabular::dialogToParams() const
 	//
 	if (newpageCB-isChecked())
 		setParam(param_str, Tabular::SET_LTNEWPAGE);
+else
+		setParam(param_str, Tabular::UNSET_LTNEWPAGE);
 	//
 	if (captionStatusCB-isChecked())
 		setParam(param_str, Tabular::SET_LTCAPTION);
diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp
index 00ee719..8e796db 100644
--- a/src/insets/InsetTabular.cpp
+++ b/src/insets/InsetTabular.cpp
@@ -165,6 +165,7 @@ TabularFeature tabularFeature[] =
 	{ Tabular::SET_LTLASTFOOT, set-ltlastfoot, true },
 	{ Tabular::UNSET_LTLASTFOOT, unset-ltlastfoot, true },
 	{ Tabular::SET_LTNEWPAGE, set-ltnewpage, false },
+	{ Tabular::UNSET_LTNEWPAGE, unset-ltnewpage, false },
 	{ Tabular::TOGGLE_LTCAPTION, toggle-ltcaption, false },
 	{ Tabular::SET_LTCAPTION, set-ltcaption, false },
 	{ Tabular::UNSET_LTCAPTION, unset-ltcaption, false },
@@ -4640,6 +4641,9 @@ bool InsetTabular::getStatus(Cursor  cur, FuncRequest const  cmd,
 		case Tabular::SET_LTNEWPAGE:
 			status.setOnOff(tabular.getLTNewPage(sel_row_start));
 			break;
+		case Tabular::UNSET_LTNEWPAGE:
+			status.setOnOff(!tabular.getLTNewPage(sel_row_start));
+			break;
 
 		// only one row in head/firsthead/foot/lasthead can be the caption
 		// and a multirow cannot be set as caption
@@ -5657,8 +5661,10 @@ void InsetTabular::tabularFeatures(Cursor  cur,
 		tabular.setLTFoot(row, flag, ltt, true);
 		break;
 
+	case Tabular::UNSET_LTNEWPAGE:
+		flag = false;
 	case Tabular::SET_LTNEWPAGE:
-		tabular.setLTNewPage(row, !tabular.getLTNewPage(row));
+		tabular.setLTNewPage(row, flag);
 		break;
 
 	case Tabular::SET_LTCAPTION: {
diff --git a/src/insets/InsetTabular.h b/src/insets/InsetTabular.h
index e765000..80958cc 100644
--- a/src/insets/InsetTabular.h
+++ b/src/insets/InsetTabular.h
@@ -233,6 +233,7 @@ public:
 		UNSET_LTLASTFOOT,
 		///
 		SET_LTNEWPAGE,
+		UNSET_LTNEWPAGE,
 		///
 		TOGGLE_LTCAPTION,
 		///
-- 
1.7.4.1



Re: Minor bug fixes

2012-05-09 Thread Pavel Sanda
John Tapsell wrote:
  I would let this one for tabular guys, I have no idea where latex arg
  plays role. Anyway, please don't use any html inside .ui files,
  it does not fit well with translation machinery.
 
 In the second patch I cleaned up the html and made it fairly minimal.
 It shouldn't cause any problems with the translation machinery.  I've
 personally worked on some of the i18n code in linux, adding better
 support for vietnamese, thai and arabic.  If there are any actual bugs
 here I'd like to know and would try to fix them upstream.

From what I remember it pushes html in .po files and thats ugly from
translators point of view and there is almost no gain. Why not use simple 
string?
Anyway, I let this leftover, perhaps Uwe is willing to check the rearrangement.

    The second fixes buddies in the same dialog (the connection between
  the labels and the widgets.  Important for accelerator)
 
  Shouldn't be the buddies for degrees empty? (There is no accel).
 
 It's common to pass mouse clicks for a label through to the buddy to
 focus it.  Particularly when you use voice commands or touchscreens.
 Accessibility is a big topic.

Ok, this one is also in. 
Pavel


Feature request: Latex file in Lyx archive

2012-05-09 Thread Max Funk

Hallo,

I wanted to suggest, that it would be great if Lyx would store not
only the lyx file and the graphics in an exported lyx archive (tar.gz
or zip), but also the created latex file.

In my understanding, one of the major functions of the archive is
to give away the document to another user or to a journal in a
single file. If this other user does not prefer lyx, he / she can
optionally use also the latex source after unzip.

Also, if the exported archive is used as backup, the exported
latex file would be useful in case of any long-time compatibility
issues.

Regards, mf




Re: Minor bug fixes

2012-05-09 Thread Pavel Sanda
John Tapsell wrote:
> Hi all,
> 
>   Here's some minor bug fixes for bugs that I've come across.
> 
>   The first moves the Latex Argument option for tables into the column
> property section in the dialog.  It got moved fairly recently by
> accidently I think.

I would let this one for tabular guys, I have no idea where latex arg
plays role. Anyway, please don't use any html inside .ui files,
it does not fit well with translation machinery.

>   The second fixes buddies in the same dialog (the connection between
> the labels and the widgets.  Important for accelerator)

Shouldn't be the buddies for degrees empty? (There is no accel).

>   The third fixes a null-pointer crash if a backend is missing when
> viewing the source.

This is in.
Pavel


Re: Minor bug fixes

2012-05-09 Thread John Tapsell
On 9 May 2012 08:38, Pavel Sanda  wrote:
> John Tapsell wrote:
>> Hi all,
>>
>>   Here's some minor bug fixes for bugs that I've come across.
>>
>>   The first moves the Latex Argument option for tables into the column
>> property section in the dialog.  It got moved fairly recently by
>> accidently I think.
>
> I would let this one for tabular guys, I have no idea where latex arg
> plays role. Anyway, please don't use any html inside .ui files,
> it does not fit well with translation machinery.

In the second patch I cleaned up the html and made it fairly minimal.
It shouldn't cause any problems with the translation machinery.  I've
personally worked on some of the i18n code in linux, adding better
support for vietnamese, thai and arabic.  If there are any actual bugs
here I'd like to know and would try to fix them upstream.

>>   The second fixes buddies in the same dialog (the connection between
>> the labels and the widgets.  Important for accelerator)
>
> Shouldn't be the buddies for degrees empty? (There is no accel).

It's common to pass mouse clicks for a label through to the buddy to
focus it.  Particularly when you use voice commands or touchscreens.
Accessibility is a big topic.

John


Re: Minor bug fixes

2012-05-09 Thread John Tapsell
Here's another small patch.

It fixes the "Page break on current row" checkbox.  Currently if you
set it for a row in a table, you cannot unset it again.

I tested this and it seems to work, but I'm not sure if I'm doing the
right thing.

John
From 912f0dfbe62e07f3996a4e2dbc7fcd8899ac478d Mon Sep 17 00:00:00 2001
From: John Tapsell 
Date: Wed, 9 May 2012 10:49:03 +0100
Subject: [PATCH] Fix toggling the "Page break on current row" checkbox in the tabular dialog box

---
 src/frontends/qt4/GuiTabular.cpp |2 ++
 src/insets/InsetTabular.cpp  |8 +++-
 src/insets/InsetTabular.h|1 +
 3 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/src/frontends/qt4/GuiTabular.cpp b/src/frontends/qt4/GuiTabular.cpp
index 8a14cb7..79706d4 100644
--- a/src/frontends/qt4/GuiTabular.cpp
+++ b/src/frontends/qt4/GuiTabular.cpp
@@ -580,6 +580,8 @@ docstring GuiTabular::dialogToParams() const
 	//
 	if (newpageCB->isChecked())
 		setParam(param_str, Tabular::SET_LTNEWPAGE);
+else
+		setParam(param_str, Tabular::UNSET_LTNEWPAGE);
 	//
 	if (captionStatusCB->isChecked())
 		setParam(param_str, Tabular::SET_LTCAPTION);
diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp
index 00ee719..8e796db 100644
--- a/src/insets/InsetTabular.cpp
+++ b/src/insets/InsetTabular.cpp
@@ -165,6 +165,7 @@ TabularFeature tabularFeature[] =
 	{ Tabular::SET_LTLASTFOOT, "set-ltlastfoot", true },
 	{ Tabular::UNSET_LTLASTFOOT, "unset-ltlastfoot", true },
 	{ Tabular::SET_LTNEWPAGE, "set-ltnewpage", false },
+	{ Tabular::UNSET_LTNEWPAGE, "unset-ltnewpage", false },
 	{ Tabular::TOGGLE_LTCAPTION, "toggle-ltcaption", false },
 	{ Tabular::SET_LTCAPTION, "set-ltcaption", false },
 	{ Tabular::UNSET_LTCAPTION, "unset-ltcaption", false },
@@ -4640,6 +4641,9 @@ bool InsetTabular::getStatus(Cursor & cur, FuncRequest const & cmd,
 		case Tabular::SET_LTNEWPAGE:
 			status.setOnOff(tabular.getLTNewPage(sel_row_start));
 			break;
+		case Tabular::UNSET_LTNEWPAGE:
+			status.setOnOff(!tabular.getLTNewPage(sel_row_start));
+			break;
 
 		// only one row in head/firsthead/foot/lasthead can be the caption
 		// and a multirow cannot be set as caption
@@ -5657,8 +5661,10 @@ void InsetTabular::tabularFeatures(Cursor & cur,
 		tabular.setLTFoot(row, flag, ltt, true);
 		break;
 
+	case Tabular::UNSET_LTNEWPAGE:
+		flag = false;
 	case Tabular::SET_LTNEWPAGE:
-		tabular.setLTNewPage(row, !tabular.getLTNewPage(row));
+		tabular.setLTNewPage(row, flag);
 		break;
 
 	case Tabular::SET_LTCAPTION: {
diff --git a/src/insets/InsetTabular.h b/src/insets/InsetTabular.h
index e765000..80958cc 100644
--- a/src/insets/InsetTabular.h
+++ b/src/insets/InsetTabular.h
@@ -233,6 +233,7 @@ public:
 		UNSET_LTLASTFOOT,
 		///
 		SET_LTNEWPAGE,
+		UNSET_LTNEWPAGE,
 		///
 		TOGGLE_LTCAPTION,
 		///
-- 
1.7.4.1



Re: Minor bug fixes

2012-05-09 Thread Pavel Sanda
John Tapsell wrote:
> > I would let this one for tabular guys, I have no idea where latex arg
> > plays role. Anyway, please don't use any html inside .ui files,
> > it does not fit well with translation machinery.
> 
> In the second patch I cleaned up the html and made it fairly minimal.
> It shouldn't cause any problems with the translation machinery.  I've
> personally worked on some of the i18n code in linux, adding better
> support for vietnamese, thai and arabic.  If there are any actual bugs
> here I'd like to know and would try to fix them upstream.

>From what I remember it pushes html in .po files and thats ugly from
translators point of view and there is almost no gain. Why not use simple 
string?
Anyway, I let this leftover, perhaps Uwe is willing to check the rearrangement.

> >>   The second fixes buddies in the same dialog (the connection between
> >> the labels and the widgets.  Important for accelerator)
> >
> > Shouldn't be the buddies for degrees empty? (There is no accel).
> 
> It's common to pass mouse clicks for a label through to the buddy to
> focus it.  Particularly when you use voice commands or touchscreens.
> Accessibility is a big topic.

Ok, this one is also in. 
Pavel


Feature request: Latex file in Lyx archive

2012-05-09 Thread Max Funk

Hallo,

I wanted to suggest, that it would be great if Lyx would store not
only the lyx file and the graphics in an exported lyx archive (tar.gz
or zip), but also the created latex file.

In my understanding, one of the major functions of the archive is
to give away the document to another user or to a journal in a
single file. If this other user does not prefer lyx, he / she can
optionally use also the latex source after unzip.

Also, if the exported archive is used as backup, the exported
latex file would be useful in case of any long-time compatibility
issues.

Regards, mf