Fixed disabled Table-Menu entries, renamed table-insert to dialog-tabular-insert

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@988 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Vigna 2000-08-25 13:37:24 +00:00
parent d4cf7ae0fa
commit 096db9161e
10 changed files with 19 additions and 15 deletions

View File

@ -1,5 +1,10 @@
2000-08-25 Juergen Vigna <jug@sad.it>
* src/LyXAction.C (init): renamed LFUN_TABLE to
LFUN_DIALOG_TABULAR_INSERT and fixed all it's occurences.
* src/lyxfunc.C (getStatus): fix for disabled Edit->Table entries.
* src/lyxscreen.h: add force_clear variable and fuction to force
a clear area when redrawing in LyXText.

View File

@ -115,7 +115,7 @@
#
\bind "M-i g" "figure-insert"
\bind "M-i b" "table-insert"
\bind "M-i b" "dialog-tabular-insert"
\bind "M-i c" "buffer-child-insert"
\bind "M-i a l" "file-insert-ascii line"
\bind "M-i a p" "file-insert-ascii paragraph"

View File

@ -90,7 +90,7 @@ Menuset
Item "Go to Error|E" "error-next"
Item "Go to Note|N" "note-next"
Submenu "Floats & Insets|I" "edit_floats"
Submenu "Table" "edit_table"
Submenu "Tabular" "edit_tabular"
Item "Spellchecker...|S" "spellchecker"
Item "Check TeX|h" "buffer-chktex"
Item "Table of Contents|b" "toc-view"
@ -105,7 +105,7 @@ Menuset
Menu "edit_floats"
End
Menu "edit_table"
Menu "edit_tabular"
Item "Multicolumn|M" "tabular-feature multicolumn"
Separator
Item "Line Top|T" "tabular-feature toggle-line-top"
@ -164,7 +164,7 @@ Menuset
Menu "insert"
Item "Figure...|F" "figure-insert"
Item "Tabular...|T" "table-insert"
Item "Tabular...|T" "dialog-tabular-insert"
Separator
Item "Include File...|I" "buffer-child-insert"
Submenu "Import ascii file|a" "insert_ascii"
@ -310,6 +310,6 @@ Toolbar
Icon "math-mode"
Separator
Icon "figure-insert"
Icon "table-insert"
Icon "dialog-tabular-insert"
End

View File

@ -382,7 +382,8 @@ void LyXAction::init()
{ LFUN_SHIFT_TAB, "tab-backward", "", Noop },
{ LFUN_TAB, "tab-forward", "", Noop },
{ LFUN_TABINSERT, "tab-insert", "", Noop },
{ LFUN_TABLE, "table-insert", N_("Insert Table"), Noop },
{ LFUN_DIALOG_TABULAR_INSERT, "dialog-tabular-insert",
N_("Open Insert Tabular Dialog"), Noop },
{ LFUN_TABULAR_FEATURE, "tabular-feature",
N_("Tabular Features"), Noop },
{ LFUN_INSET_TABULAR, "tabular-insert",

View File

@ -75,11 +75,7 @@ void ToolbarDefaults::init()
add(SEPARATOR);
add(LFUN_FIGURE);
#ifndef NEW_TABULAR
add(LFUN_TABLE);
#else
add(LFUN_INSET_TABULAR);
#endif
add(LFUN_DIALOG_TABULAR_INSERT);
//add(LFUN_MELT);
}

View File

@ -142,7 +142,6 @@ enum kb_action {
LFUN_MATH_MACROARG, // ale970510
LFUN_MATH_PANEL,
LFUN_FIGURE,
LFUN_TABLE, // schedule for deletion
LFUN_MELT,
LFUN_DELETE_WORD_FORWARD,
LFUN_DELETE_WORD_BACKWARD,
@ -276,6 +275,7 @@ enum kb_action {
LFUN_INDEX_INSERT, // Angus 20000803
LFUN_REF_CREATE, // Angus 20000807
LFUN_SCREEN_FONT_UPDATE, // ARRae 20000813
LFUN_DIALOG_TABULAR_INSERT, // Jug 20000825 (old table-insert)
LFUN_LASTACTION /* this marks the end of the table */
};

View File

@ -1668,6 +1668,7 @@ LyXFunc::func_status InsetTabular::getStatus(string what) const
case LyXTabular::DELETE_COLUMN:
case LyXTabular::SET_ALL_LINES:
case LyXTabular::UNSET_ALL_LINES:
status |= LyXFunc::OK;
return status;
case LyXTabular::MULTICOLUMN:

View File

@ -572,6 +572,7 @@ LyXFunc::func_status LyXFunc::getStatus(int ac) const
getStatus(argument);
}
flag |= ret;
disable = false;
} else {
static InsetTabular inset(owner->buffer(), 1, 1);
func_status ret;
@ -1048,7 +1049,7 @@ string LyXFunc::Dispatch(int ac,
break;
}
case LFUN_TABLE:
case LFUN_DIALOG_TABULAR_INSERT:
#ifndef NEW_TABULAR
Table();
#else

View File

@ -1193,7 +1193,7 @@ void Menus::ShowEditMenu(FL_OBJECT * ob, long)
case 26: men->currentView()->allFloats(0, 1); break;
case 27: tmpfunc->Dispatch(LFUN_REMOVEERRORS); break;
#endif
case 31: tmpfunc->Dispatch(LFUN_TABLE); break;
case 31: tmpfunc->Dispatch(LFUN_DIALOG_TABULAR_INSERT); break;
// this is really temporary. We need new function in keybind.C
// These should set the minibuffer, too.
case 32: case 33: case 34:
@ -1776,7 +1776,7 @@ void Menus::ShowInsertMenu(FL_OBJECT * ob, long)
men->currentView()->hideCursor();
switch (choice) {
case 1: tmpfunc->Dispatch(LFUN_FIGURE); break;
case 2: tmpfunc->Dispatch(LFUN_TABLE); break;
case 2: tmpfunc->Dispatch(LFUN_DIALOG_TABULAR_INSERT); break;
case 3: tmpfunc->Dispatch(LFUN_CHILDINSERT); break;
case 4: // Insert ASCII file submenu
break;