On Thu, 2005-04-21 at 09:15, Martin Vermeer wrote: > On Wed, 2005-04-20 at 23:12, Martin Vermeer wrote: > > On Wed, Apr 20, 2005 at 05:47:57PM +0300, Martin Vermeer wrote: > > ... > > > A radical, alternative idea would therefore be to just _merge_ the two > > menus, to the extent that they have entries in common; let the menu > > structure reflect the internal commonality. Perhaps a single submenu > > "Tabular features" ? > > > > Comments? > > > > - Martin > > Try this one on for size ;-) > > - Martin > > BTW I'll be travelling. Back on Monday.
Back, and an improved patch attached. Now I also fixed the tick marks in front of the alignment menu items for math, so they are working like for non-math tabular. Nobody responded to the previous patch... is this one OK to commit? - Martin
Index: src/mathed/ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/ChangeLog,v retrieving revision 1.493 diff -u -p -r1.493 ChangeLog --- src/mathed/ChangeLog 11 Apr 2005 18:48:34 -0000 1.493 +++ src/mathed/ChangeLog 25 Apr 2005 09:48:24 -0000 @@ -1,3 +1,9 @@ +2005-04-25 Martin Vermeer <[EMAIL PROTECTED]>a + + * math_gridinset.C (doDispatch): + * math_hullInset.C (doDispatch): + * math_nestInset.C (doDispatch): fix handling of alignment + 2005-04-11 Martin Vermeer <[EMAIL PROTECTED]> * math_nestinset.C (doDispatch): make insert-around-selection Index: src/mathed/math_gridinset.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_gridinset.C,v retrieving revision 1.160 diff -u -p -r1.160 math_gridinset.C --- src/mathed/math_gridinset.C 10 Apr 2005 09:07:28 -0000 1.160 +++ src/mathed/math_gridinset.C 25 Apr 2005 09:48:24 -0000 @@ -1292,6 +1292,14 @@ bool MathGridInset::getStatus(LCursor & flag.message(bformat( N_("Unknown tabular feature '%1$s'"), s)); } + + flag.setOnOff(s == "align-left" && halign(cur.col()) == 'l' + || s == "align-right" && halign(cur.col()) == 'r' + || s == "align-center" && halign(cur.col()) == 'c' + || s == "valign-top" && valign() == 't' + || s == "valign-bottom" && valign() == 'b' + || s == "valign-middle" && valign() == 'm'); + #if 0 // FIXME: What did this code do? // Please check wether it is still needed! Index: src/mathed/math_hullinset.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_hullinset.C,v retrieving revision 1.163 diff -u -p -r1.163 math_hullinset.C --- src/mathed/math_hullinset.C 24 Mar 2005 16:26:15 -0000 1.163 +++ src/mathed/math_hullinset.C 25 Apr 2005 09:48:24 -0000 @@ -1139,6 +1139,12 @@ bool MathHullInset::getStatus(LCursor & flag.enabled(false); return true; } + if (s == "valign-top" || s == "valign-middle" + || s == "valign-bottom" || s == "align-left" + || s == "align-center" || s == "align-right") { + flag.enabled(false); + return true; + } return MathGridInset::getStatus(cur, cmd, flag); } default: Index: src/mathed/math_nestinset.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_nestinset.C,v retrieving revision 1.152 diff -u -p -r1.152 math_nestinset.C --- src/mathed/math_nestinset.C 11 Apr 2005 18:48:34 -0000 1.152 +++ src/mathed/math_nestinset.C 25 Apr 2005 09:48:25 -0000 @@ -866,6 +866,9 @@ bool MathNestInset::getStatus(LCursor & //string tc = "mathnormal"; bool ret = true; switch (cmd.action) { + case LFUN_TABULAR_FEATURE: + flag.enabled(false); + break; #if 0 case LFUN_TABULAR_FEATURE: // FIXME: check temporarily disabled Index: lib/ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/ChangeLog,v retrieving revision 1.689 diff -u -p -r1.689 ChangeLog --- lib/ChangeLog 21 Apr 2005 06:21:25 -0000 1.689 +++ lib/ChangeLog 25 Apr 2005 09:48:25 -0000 @@ -1,3 +1,7 @@ +2005-04-25 Martin Vermeer <[EMAIL PROTECTED]> + + * ui/stdmenus.ui: rearrange tabular features stuff + 2005-04-18 Martin Vermeer <[EMAIL PROTECTED]> * stdtoolbars.ui: remove the 4x4 default size Index: lib/ui/stdmenus.ui =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/ui/stdmenus.ui,v retrieving revision 1.43 diff -u -p -r1.43 stdmenus.ui --- lib/ui/stdmenus.ui 18 Apr 2005 18:09:57 -0000 1.43 +++ lib/ui/stdmenus.ui 25 Apr 2005 09:48:25 -0000 @@ -90,6 +90,7 @@ Menuset # Mathed b0rkage means these don't work properly OptSubmenu "Table|T" "edit_tabular" OptSubmenu "Math|M" "edit_math" + OptSubmenu "Rows & Cols|C" "tabular_features" Separator OptItem "Increase List Depth|I" "depth-increment" OptItem "Decrease List Depth|D" "depth-decrement" @@ -117,12 +118,6 @@ Menuset # not much we can do to help here Menu "edit_tabular" - Item "Add Row|A" "tabular-feature append-row" - Item "Delete Row|w" "tabular-feature delete-row" - Separator - Item "Add Column|u" "tabular-feature append-column" - Item "Delete Column|D" "tabular-feature delete-column" - Separator Item "Multicolumn|M" "tabular-feature multicolumn" Separator Item "Top Line|T" "tabular-feature toggle-line-top" @@ -130,10 +125,9 @@ Menuset Item "Left Line|L" "tabular-feature toggle-line-left" Item "Right Line|R" "tabular-feature toggle-line-right" Separator - Submenu "Alignment|i" "edit_align" End - Menu "edit_align" + Menu "tabular_features" Item "Left|L" "tabular-feature align-left" Item "Center|C" "tabular-feature align-center" Item "Right|R" "tabular-feature align-right" @@ -141,6 +135,16 @@ Menuset Item "Top|T" "tabular-feature valign-top" Item "Middle|M" "tabular-feature valign-middle" Item "Bottom|B" "tabular-feature valign-bottom" + Separator + Item "Add Row" "tabular-feature append-row" + Item "Delete Row" "tabular-feature delete-row" + Item "Copy Row" "tabular-feature copy-row" + Item "Swap Rows" "tabular-feature swap-row" + Separator + Item "Add Column" "tabular-feature append-column" + Item "Delete Column" "tabular-feature delete-column" + Item "Copy Column" "tabular-feature copy-column" + Item "Swap Columns" "tabular-feature swap-column" End Menu "edit_math" @@ -152,21 +156,11 @@ Menuset Separator Submenu "Use Computer Algebra System|S" "edit_math_extern" Separator - Submenu "Alignment|A" "edit_align" - Separator - Item "Add Row|R" "tabular-feature append-row" - Item "Delete Row|D" "tabular-feature delete-row" - Item "Copy Row" "tabular-feature copy-row" - Item "Swap Rows" "tabular-feature swap-row" Item "Add Line Above" "tabular-feature add-hline-above" Item "Add Line Below" "tabular-feature add-hline-below" Item "Delete Line Above" "tabular-feature delete-hline-above" Item "Delete Line Below" "tabular-feature delete-hline-below" Separator - Item "Add Column|C" "tabular-feature append-column" - Item "Delete Column|e" "tabular-feature delete-column" - Item "Copy Column" "tabular-feature copy-column" - Item "Swap Columns" "tabular-feature swap-column" Item "Add Line to Left" "tabular-feature add-vline-left" Item "Add Line to Right" "tabular-feature add-vline-right" Item "Delete Line to Left" "tabular-feature delete-vline-left"
signature.asc
Description: This is a digitally signed message part