John Levon wrote:
> please re diff (sorry)

attached 
(note that I have also modified one of your changes)
Jürgen.
Index: src/frontends/qt2/ChangeLog
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/qt2/ChangeLog,v
retrieving revision 1.322
diff -u -r1.322 ChangeLog
--- src/frontends/qt2/ChangeLog	2002/11/27 20:23:53	1.322
+++ src/frontends/qt2/ChangeLog	2002/11/27 20:56:43
@@ -1,3 +1,9 @@
+2002-11-27  Juergen Spitzmueller  <[EMAIL PROTECTED]>
+
+	* ui/TabularDialog.ui
+	* QTabular.C
+	* QTabularDialog.C: ui fixes.
+
 2002-11-27  John Levon  <[EMAIL PROTECTED]>

 	* qsetborder.h:
Index: src/frontends/qt2/QTabular.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/qt2/QTabular.C,v
retrieving revision 1.6
diff -u -r1.6 QTabular.C
--- src/frontends/qt2/QTabular.C	2002/11/27 20:23:53	1.6
+++ src/frontends/qt2/QTabular.C	2002/11/27 20:56:44
@@ -124,18 +124,31 @@
 	}
 	dialog_->widthED->setEnabled(!isReadonly);
 	dialog_->widthUnit->setEnabled(!isReadonly);
+
+	dialog_->hAlignCB->clear();
+	dialog_->hAlignCB->insertItem(_("Left"));
+	dialog_->hAlignCB->insertItem(_("Center"));
+	dialog_->hAlignCB->insertItem(_("Right"));
+	if (!multicol && !pwidth.zero())
+		dialog_->hAlignCB->insertItem(_("Block"));
 
 	int align = 0;
 	switch (tabular->GetAlignment(cell)) {
 	case LYX_ALIGN_LEFT:
-		align = 1;
+		align = 0;
 		break;
 	case LYX_ALIGN_CENTER:
-		align = 2;
+		align = 1;
 		break;
 	case LYX_ALIGN_RIGHT:
-		align = 3;
+		align = 2;
+		break;
+	case LYX_ALIGN_BLOCK:
+	{
+		if (!multicol && !pwidth.zero())
+			align = 3;
 		break;
+	}
 	default:
 		align = 0;
 		break;
Index: src/frontends/qt2/QTabularDialog.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/qt2/QTabularDialog.C,v
retrieving revision 1.4
diff -u -r1.4 QTabularDialog.C
--- src/frontends/qt2/QTabularDialog.C	2002/11/27 20:23:53	1.4
+++ src/frontends/qt2/QTabularDialog.C	2002/11/27 20:56:45
@@ -84,6 +84,7 @@
 	form_->controller().set(LyXTabular::SET_ALL_LINES);
 	form_->update_borders();
 	form_->changed();
+	//FIXME: qsetborder widget not updated
 }
 
 void QTabularDialog::borderUnset_clicked()
@@ -91,6 +92,7 @@
 	form_->controller().set(LyXTabular::UNSET_ALL_LINES);
 	form_->update_borders();
 	form_->changed();
+	//FIXME: qsetborder widget not updated
 }
  
 
@@ -146,13 +148,15 @@
 
 void QTabularDialog::width_changed()
 {
-	string const width =
-		LyXLength(widthED->text().toDouble(),
-			  widthUnit->currentLengthItem()).asString();
+	string const width = 
+		LyXLength(widthED->text().toDouble(), 
+			widthUnit->currentLengthItem()).asString();
 	if (form_->controller().isMulticolumnCell())
 		form_->controller().set(LyXTabular::SET_MPWIDTH, width);
 	else
 		form_->controller().set(LyXTabular::SET_PWIDTH, width);
+	form_->changed();
+	form_->update_contents();
 }
 
 
@@ -160,6 +164,7 @@
 {
 	form_->controller().set(LyXTabular::MULTICOLUMN);
 	form_->changed();
+	form_->update_contents();
 }
 
 
@@ -197,34 +202,34 @@
 
 void QTabularDialog::hAlign_changed(int align)
 {
-	LyXTabular::Feature num = LyXTabular::ALIGN_BLOCK;
+	LyXTabular::Feature num = LyXTabular::ALIGN_LEFT;
 	LyXTabular::Feature multi_num = LyXTabular::M_ALIGN_LEFT;
 
 	switch (align) {
 		case 0:
 		{
-			num = LyXTabular::ALIGN_BLOCK;
-			//FIXME: multi_num no equivalent
-			break;
-		}
-		case 1:
-		{
 			num = LyXTabular::ALIGN_LEFT;
 			multi_num = LyXTabular::M_ALIGN_LEFT;
 			break;
 		}
-		case 2:
+		case 1:
 		{
 			num = LyXTabular::ALIGN_CENTER;
 			multi_num = LyXTabular::M_ALIGN_CENTER;
 			break;
 		}
-		case 3:
+		case 2:
 		{
 			num = LyXTabular::ALIGN_RIGHT;
 			multi_num = LyXTabular::M_ALIGN_RIGHT;
 			break;
+		case 3:
+		{
+			num = LyXTabular::ALIGN_BLOCK;
+			//multi_num: no equivalent
+			break;
 		}
+		}
 	}
 	if (form_->controller().isMulticolumnCell())
 		form_->controller().set(multi_num);
@@ -235,8 +240,8 @@
 
 void QTabularDialog::vAlign_changed(int align)
 {
-	LyXTabular::Feature num = LyXTabular::ALIGN_BLOCK;
-	LyXTabular::Feature multi_num = LyXTabular::M_ALIGN_LEFT;
+	LyXTabular::Feature num = LyXTabular::VALIGN_CENTER;
+	LyXTabular::Feature multi_num = LyXTabular::M_VALIGN_CENTER;
 
 	switch (align) {
 		case 0:
Index: src/frontends/qt2/ui/QTabularDialog.ui
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/qt2/ui/QTabularDialog.ui,v
retrieving revision 1.5
diff -u -r1.5 QTabularDialog.ui
--- src/frontends/qt2/ui/QTabularDialog.ui	2002/11/27 18:47:09	1.5
+++ src/frontends/qt2/ui/QTabularDialog.ui	2002/11/27 20:56:50
@@ -186,6 +186,10 @@
                                     <name>text</name>
                                     <string>A&amp;dd</string>
                                 </property>
+                                <property stdset="1">
+                                    <name>autoDefault</name>
+                                    <bool>false</bool>
+                                </property>
                                 <property>
                                     <name>toolTip</name>
                                     <string>Append column (right)</string>
@@ -201,6 +205,10 @@
                                     <name>text</name>
                                     <string>De&amp;lete</string>
                                 </property>
+                                <property stdset="1">
+                                    <name>autoDefault</name>
+                                    <bool>false</bool>
+                                </property>
                                 <property>
                                     <name>toolTip</name>
                                     <string>Delete current column</string>
@@ -237,6 +245,10 @@
                                     <name>text</name>
                                     <string>&amp;Add</string>
                                 </property>
+                                <property stdset="1">
+                                    <name>autoDefault</name>
+                                    <bool>false</bool>
+                                </property>
                                 <property>
                                     <name>toolTip</name>
                                     <string>Append row (below)</string>
@@ -251,6 +263,10 @@
                                 <property stdset="1">
                                     <name>text</name>
                                     <string>Dele&amp;te</string>
+                                </property>
+                                <property stdset="1">
+                                    <name>autoDefault</name>
+                                    <bool>false</bool>
                                 </property>
                                 <property>
                                     <name>toolTip</name>

Reply via email to