Fix handling of aligment; rearrange tabular-features menu stuff

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9872 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Martin Vermeer 2005-04-25 14:10:10 +00:00
parent 17e48cd4f3
commit 2eab957971
6 changed files with 39 additions and 18 deletions

View File

@ -1,3 +1,7 @@
2005-04-25 Martin Vermeer <martin.vermeer@hut.fi>
* ui/stdmenus.ui: rearrange tabular features stuff
2005-04-22 Angus Leeming <leeming@lyx.org>
* configure.m4: rewrite the "DeclareFOOClass" manipulation

View File

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

View File

@ -1,3 +1,9 @@
2005-04-25 Martin Vermeer <martin.vermeer@hut.fi>a
* math_gridinset.C (doDispatch):
* math_hullInset.C (doDispatch):
* math_nestInset.C (doDispatch): fix handling of alignment
2005-04-11 Martin Vermeer <martin.vermeer@hut.fi>
* math_nestinset.C (doDispatch): make insert-around-selection

View File

@ -1292,6 +1292,14 @@ bool MathGridInset::getStatus(LCursor & cur, FuncRequest const & cmd,
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!

View File

@ -1139,6 +1139,12 @@ bool MathHullInset::getStatus(LCursor & cur, FuncRequest const & cmd,
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:

View File

@ -866,6 +866,9 @@ bool MathNestInset::getStatus(LCursor & /*cur*/, FuncRequest const & cmd,
//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