From 096db9161eedd0c270a5fadef7dde2f12908dc90 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrgen=20Vigna?= Date: Fri, 25 Aug 2000 13:37:24 +0000 Subject: [PATCH] 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 --- ChangeLog | 5 +++++ lib/bind/menus.bind | 2 +- .../{table-insert.xpm => dialog-tabular-insert.xpm} | 0 lib/ui/default.ui | 8 ++++---- src/LyXAction.C | 3 ++- src/ToolbarDefaults.C | 6 +----- src/commandtags.h | 2 +- src/insets/insettabular.C | 1 + src/lyxfunc.C | 3 ++- src/menus.C | 4 ++-- 10 files changed, 19 insertions(+), 15 deletions(-) rename lib/images/{table-insert.xpm => dialog-tabular-insert.xpm} (100%) diff --git a/ChangeLog b/ChangeLog index 1e10446b35..631eee3abd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2000-08-25 Juergen Vigna + * 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. diff --git a/lib/bind/menus.bind b/lib/bind/menus.bind index 9d91d90f52..69aa6e781f 100644 --- a/lib/bind/menus.bind +++ b/lib/bind/menus.bind @@ -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" diff --git a/lib/images/table-insert.xpm b/lib/images/dialog-tabular-insert.xpm similarity index 100% rename from lib/images/table-insert.xpm rename to lib/images/dialog-tabular-insert.xpm diff --git a/lib/ui/default.ui b/lib/ui/default.ui index b96ac75da0..5a4e1e6475 100644 --- a/lib/ui/default.ui +++ b/lib/ui/default.ui @@ -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 diff --git a/src/LyXAction.C b/src/LyXAction.C index 130ea166b7..bd8d6bce31 100644 --- a/src/LyXAction.C +++ b/src/LyXAction.C @@ -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", diff --git a/src/ToolbarDefaults.C b/src/ToolbarDefaults.C index 9c9d6eba7f..7b98891ee6 100644 --- a/src/ToolbarDefaults.C +++ b/src/ToolbarDefaults.C @@ -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); } diff --git a/src/commandtags.h b/src/commandtags.h index 933a441648..e93efe41f2 100644 --- a/src/commandtags.h +++ b/src/commandtags.h @@ -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 */ }; diff --git a/src/insets/insettabular.C b/src/insets/insettabular.C index d7ee579d67..2cbcc3503e 100644 --- a/src/insets/insettabular.C +++ b/src/insets/insettabular.C @@ -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: diff --git a/src/lyxfunc.C b/src/lyxfunc.C index ea555cff61..32984cbd0c 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -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 diff --git a/src/menus.C b/src/menus.C index 4bee5438e7..e0e1dc9104 100644 --- a/src/menus.C +++ b/src/menus.C @@ -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; -- 2.39.2