]> git.lyx.org Git - lyx.git/commitdiff
patch from Juergen
authorJohn Levon <levon@movementarian.org>
Wed, 27 Nov 2002 23:58:37 +0000 (23:58 +0000)
committerJohn Levon <levon@movementarian.org>
Wed, 27 Nov 2002 23:58:37 +0000 (23:58 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5738 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt2/ChangeLog
src/frontends/qt2/QTabular.C
src/frontends/qt2/QTabularDialog.C
src/frontends/qt2/ui/QTabularDialog.ui

index f9452814e55cbd3e23b640caec4cbe60f1f6ceb4..2f8ada58647b93fb953679dd4ffcc714c079d86b 100644 (file)
@@ -1,3 +1,9 @@
+2002-11-27  Juergen Spitzmueller  <j.spitzmueller@gmx.de>
+
+       * ui/TabularDialog.ui
+       * QTabular.C
+       * QTabularDialog.C: ui fixes.
+
 2002-11-27  Dekel Tsur  <dekelts@tau.ac.il>
 
        * qfont_loader.C (font_info): Use lyxrc.*_font_foundry.
index 24bbc8a62afc77ce939ff593fcb0a91060b87c43..41a2633fb777a210d64e2ab56a886ddcd0b8159d 100644 (file)
@@ -125,17 +125,30 @@ void QTabular::update_contents()
        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 0e3e7c40ad5af9e36d0b3a8228420f315b4ad574..27832cf7154b7bb65ae366c51e3c6148aa1bb0d4 100644 (file)
@@ -84,6 +84,7 @@ void QTabularDialog::borderSet_clicked()
        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 @@ void QTabularDialog::borderUnset_clicked()
        form_->controller().set(LyXTabular::UNSET_ALL_LINES);
        form_->update_borders();
        form_->changed();
+       //FIXME: qsetborder widget not updated
 }
  
 
@@ -146,13 +148,15 @@ void QTabularDialog::specialAlignment_changed()
 
 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 @@ void QTabularDialog::multicolumn_clicked()
 {
        form_->controller().set(LyXTabular::MULTICOLUMN);
        form_->changed();
+       form_->update_contents();
 }
 
 
@@ -197,33 +202,33 @@ void QTabularDialog::rotateCell_checked(int state)
 
 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())
@@ -235,8 +240,8 @@ void QTabularDialog::hAlign_changed(int align)
 
 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 7e6bad63b482c5218064900e8fb48a183257892f..a404e8c30415f84f7dbe0e3f3dfc6a482f2ded63 100644 (file)
                                     <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>
                                     <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>
                                     <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>
                                     <name>text</name>
                                     <string>Dele&amp;te</string>
                                 </property>
+                                <property stdset="1">
+                                    <name>autoDefault</name>
+                                    <bool>false</bool>
+                                </property>
                                 <property>
                                     <name>toolTip</name>
                                     <string>Delete this row</string>