From: John Levon Date: Mon, 2 Jun 2003 14:19:30 +0000 (+0000) Subject: remove insetparent X-Git-Tag: 1.6.10~16708 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=91b3be6f57305be7a2b83d8e1e8774c3e2581752;p=features.git remove insetparent git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7084 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/ChangeLog b/src/ChangeLog index bc996cc118..4d2b09be62 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2003-06-02 John Levon + + * LyXAction.C: + * factory.C: + * lfuns.h: + * lyxfunc.C: + * text3.C: remove insetparent + 2003-06-02 John Levon * buffer.h: diff --git a/src/LyXAction.C b/src/LyXAction.C index 057fc8c0aa..5dc982296d 100644 --- a/src/LyXAction.C +++ b/src/LyXAction.C @@ -236,7 +236,6 @@ void LyXAction::init() { LFUN_PARAGRAPH_SPACING, "paragraph-spacing", Noop }, { LFUN_UP_PARAGRAPH, "paragraph-up", ReadOnly }, { LFUN_UP_PARAGRAPHSEL, "paragraph-up-select", ReadOnly }, - { LFUN_PARENTINSERT, "parent-insert", Noop }, { LFUN_PASTE, "paste", Noop }, { LFUN_DIALOG_PREFERENCES, "dialog-preferences", NoBuffer }, { LFUN_SAVEPREFERENCES, "preferences-save", NoBuffer }, diff --git a/src/factory.C b/src/factory.C index fa05ac87da..c2316ef39e 100644 --- a/src/factory.C +++ b/src/factory.C @@ -38,7 +38,6 @@ #include "insets/insetminipage.h" #include "insets/insetnote.h" #include "insets/insetoptarg.h" -#include "insets/insetparent.h" #include "insets/insetref.h" #include "insets/insetspace.h" #include "insets/insettabular.h" @@ -158,10 +157,6 @@ Inset * createInset(FuncRequest const & cmd) case LFUN_TOC_INSERT: return new InsetTOC(InsetCommandParams("tableofcontents")); - case LFUN_PARENTINSERT: - return new InsetParent( - InsetCommandParams("lyxparent", cmd.argument), *bv->buffer()); - case LFUN_ENVIRONMENT_INSERT: return new InsetEnvironment(params, cmd.argument); @@ -339,8 +334,6 @@ Inset * readInset(LyXLex & lex, Buffer const & buf) inset = new InsetFloatList("table"); } else if (cmdName == "printindex") { inset = new InsetPrintIndex(inscmd); - } else if (cmdName == "lyxparent") { - inset = new InsetParent(inscmd, buf); } } else { if (tmptok == "Quotes") { diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 337df3f9b5..5efeaa0d28 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,9 @@ +2003-06-02 John Levon + + * Makefile.am: + * inset.h: + * insetparent.h: + * insetparent.C: remove insetparent 2003-06-02 André Pönitz diff --git a/src/insets/Makefile.am b/src/insets/Makefile.am index 77de2966ff..bdf9a7bfd5 100644 --- a/src/insets/Makefile.am +++ b/src/insets/Makefile.am @@ -77,8 +77,6 @@ libinsets_la_SOURCES = \ insetnote.h \ insetoptarg.C \ insetoptarg.h \ - insetparent.C \ - insetparent.h \ insetquotes.C \ insetquotes.h \ insetref.C \ diff --git a/src/insets/inset.h b/src/insets/inset.h index 844d9377ab..0b72fb684a 100644 --- a/src/insets/inset.h +++ b/src/insets/inset.h @@ -83,8 +83,6 @@ public: /// GRAPHICS_CODE, /// - PARENT_CODE, - /// BIBITEM_CODE, /// BIBTEX_CODE, diff --git a/src/insets/insetparent.C b/src/insets/insetparent.C deleted file mode 100644 index cd056a988e..0000000000 --- a/src/insets/insetparent.C +++ /dev/null @@ -1,71 +0,0 @@ -/** - * \file insetparent.C - * This file is part of LyX, the document processor. - * Licence details can be found in the file COPYING. - * - * \author Alejandro Aguilar Sierra - * - * Full author contact details are available in file CREDITS - */ - - -// Created by asierra 970813 - -#include - -#include "insetparent.h" -#include "BufferView.h" -#include "frontends/LyXView.h" -#include "support/LOstream.h" -#include "funcrequest.h" -#include "buffer.h" -#include "gettext.h" - -#include "support/filetools.h" -#include "support/lstrings.h" - -using std::ostream; - - -InsetParent::InsetParent(InsetCommandParams const & p, Buffer const & bf) - : InsetCommand(p) -{ - string const fn = p.getContents(); - setContents(MakeAbsPath(fn, bf.filePath())); -} - - -// InsetParent::InsetParent(InsetCommandParams const & p, Buffer const & bf, bool) -// : InsetCommand(p, false) -// { -// string const fn = p.getContents(); -// setContents(MakeAbsPath(fn, bf.filePath())); -// } - - -string const InsetParent::getScreenLabel(Buffer const *) const -{ - return bformat(_("Parent: %1$s"), getContents()); -} - - -dispatch_result InsetParent::localDispatch(FuncRequest const & cmd) -{ - switch (cmd.action) { - case LFUN_INSET_EDIT: - cmd.view()->owner()->dispatch(FuncRequest(LFUN_CHILDOPEN, getContents())); - return DISPATCHED; - default: - return InsetCommand::localDispatch(cmd); - } -} - - -// LaTeX must just ignore this command -int InsetParent::latex(Buffer const * buf, ostream & os, - LatexRunParams const & runparams) const -{ - os << "%%#{lyx}"; - InsetCommand::latex(buf, os, runparams); - return 0; -} diff --git a/src/insets/insetparent.h b/src/insets/insetparent.h deleted file mode 100644 index c79b7419f2..0000000000 --- a/src/insets/insetparent.h +++ /dev/null @@ -1,47 +0,0 @@ -// -*- C++ -*- -/** - * \file insetparent.h - * This file is part of LyX, the document processor. - * Licence details can be found in the file COPYING. - * - * \author Alejandro Aguilar Sierra - * - * Full author contact details are available in file CREDITS - */ - -#ifndef INSET_PARENT_H -#define INSET_PARENT_H - - -#include "insetcommand.h" - -class Buffer; - -/** Reference to the parent document. - - Useful to load a parent document from a child document and to - share parent's properties between preambleless children. - */ -class InsetParent : public InsetCommand { -public: - /// - InsetParent(InsetCommandParams const &, Buffer const &); - /// - virtual Inset * clone(Buffer const & buffer) const { - return new InsetParent(params(), buffer); - } - /// - dispatch_result localDispatch(FuncRequest const & cmd); - /// - string const getScreenLabel(Buffer const *) const; - /// - EDITABLE editable() const { return IS_EDITABLE; } - /// - Inset::Code lyxCode() const { return Inset::PARENT_CODE; } - /// - int latex(Buffer const *, std::ostream &, - LatexRunParams const &) const; - /// - void setParent(string const & fn) { setContents(fn); } -}; -#endif diff --git a/src/lfuns.h b/src/lfuns.h index e997263308..0ecea946a9 100644 --- a/src/lfuns.h +++ b/src/lfuns.h @@ -241,99 +241,98 @@ enum kb_action { LFUN_VC_HISTORY, // Lgb 97-07-01 LFUN_EXPORT, // Lgb 97-07-29 LFUN_REF_GOTO, // Ale 970806 - LFUN_PARENTINSERT, // Ale 970813 - // 180 LFUN_LDOTS, // Asger 970929 + // 180 LFUN_END_OF_SENTENCE, // Asger 970929 LFUN_TOGGLECURSORFOLLOW, // ARRae 971202 LFUN_RUNCHKTEX, // Asger 971030 LFUN_HTMLURL, // CFO-G 971121 - // 185 LFUN_URL, // CFO-G 971121 + // 185 LFUN_WORDFINDFORWARD, // Etienne 980216 LFUN_WORDFINDBACKWARD, // Etienne 980220 LFUN_APPENDIX, // ettrich 980505 LFUN_IMPORT, // Asger 980724 - // 190 LFUN_MENU_SEPARATOR, // Asger 990220 + // 190 LFUN_SEQUENCE, // Andre' 991111 LFUN_DIALOG_PREFERENCES, // ARRae 20000726 LFUN_SAVEPREFERENCES, // Lgb 991127 LFUN_HELP_OPEN, // Jug 990627 - // 195 LFUN_DATE_INSERT, // jdblair 20000131 + // 195 LFUN_LANGUAGE, // Dekel 20000203 LFUN_INSET_ERT, // Jug 20000218 LFUN_INSET_FOOTNOTE, // Jug 20000307 LFUN_PARAGRAPH_SPACING, // Lgb 20000411 - // 200 LFUN_TABULAR_INSERT, // Jug 20000412 + // 200 LFUN_LOFVIEW, // Dekel 20000519 LFUN_LOTVIEW, // Dekel 20000519 LFUN_LOAVIEW, // Dekel 20000519 LFUN_SET_COLOR, // SLior 20000611 - // 205 LFUN_INSET_MARGINAL, // Lgb 20000626 + // 205 LFUN_INSET_MINIPAGE, // Lgb 20000627 LFUN_INSET_FLOAT, // Lgb 20000627 LFUN_INSET_WIDE_FLOAT, // Lgb 20010531 LFUN_INSET_CAPTION, // Lgb 20000718 - // 210 LFUN_SWITCHBUFFER, + // 210 LFUN_TABULAR_FEATURE, // Jug 20000728 LFUN_LAYOUT_TABULAR, // Jug 20000731 LFUN_SCROLL_INSET, // Jug 20000801 LFUN_UPDATE, // Dekel 20000805 - // 215 LFUN_INDEX_INSERT, // Angus 20000803 + // 215 LFUN_SCREEN_FONT_UPDATE, // ARRae 20000813 LFUN_GOTO_PARAGRAPH, // Dekel 20000826 LFUN_REFERENCE_GOTO, // Dekel 20010114 LFUN_BOOKMARK_SAVE, // Dekel 20010127 - // 220 LFUN_BOOKMARK_GOTO, // Dekel 20010127 + // 220 LFUN_SELECT_FILE_SYNC, // Levon 20010214 LFUN_MESSAGE, // Lgb 20010408 LFUN_TRANSPOSE_CHARS, // Lgb 20010425 LFUN_ESCAPE, // Lgb 20010517 - // 225 LFUN_HELP_ABOUTLYX, // Edwin 20010712 + // 225 LFUN_THESAURUS_ENTRY, // Levon 20010720 LFUN_HELP_TEXINFO, // Herbert 20011001 LFUN_FORKS_SHOW, // Angus 16 Feb 2002 LFUN_FORKS_KILL, // Angus 16 Feb 2002 - // 230 LFUN_TOOLTIPS_TOGGLE, // Angus 8 Mar 2002 + // 230 LFUN_INSET_OPTARG, // Martin 12 Aug 2002 LFUN_MOUSE_PRESS, // André 9 Aug 2002 LFUN_MOUSE_MOTION, // André 9 Aug 2002 LFUN_MOUSE_RELEASE, // André 9 Aug 2002 - // 235 LFUN_MOUSE_DOUBLE, // André 9 Aug 2002 + // 235 LFUN_MOUSE_TRIPLE, // André 9 Aug 2002 LFUN_INSET_EDIT, // André 16 Aug 2002 LFUN_INSET_WRAP, // Dekel 7 Apr 2002 LFUN_TRACK_CHANGES, // Levon 20021001 (cool date !) - // 240 LFUN_MERGE_CHANGES, // Levon 20021016 + // 240 LFUN_ACCEPT_CHANGE, // Levon 20021016 LFUN_REJECT_CHANGE, // Levon 20021016 LFUN_ACCEPT_ALL_CHANGES, // Levon 20021016 LFUN_REJECT_ALL_CHANGES, // Levon 20021016 - // 245 LFUN_INSERT_BIBITEM, // André 14 Feb 2003 + // 245 LFUN_DIALOG_SHOW_NEW_INSET, LFUN_DIALOG_SHOW_NEXT_INSET, LFUN_DIALOG_UPDATE, LFUN_DIALOG_HIDE, - // 250 LFUN_DIALOG_DISCONNECT_INSET, + // 250 LFUN_INSET_APPLY, LFUN_INSET_INSERT, LFUN_INSET_MODIFY, LFUN_INSET_DIALOG_UPDATE, - // 255 LFUN_INSET_SETTINGS, + // 255 LFUN_PARAGRAPH_APPLY, LFUN_PARAGRAPH_UPDATE, diff --git a/src/lyxfunc.C b/src/lyxfunc.C index 5a3fffc158..b1a737955e 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -645,9 +645,6 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & ev) const case LFUN_TOC_INSERT: code = Inset::TOC_CODE; break; - case LFUN_PARENTINSERT: - code = Inset::PARENT_CODE; - break; case LFUN_HTMLURL: case LFUN_URL: code = Inset::URL_CODE; diff --git a/src/text3.C b/src/text3.C index 6844d80b85..50f3498dc4 100644 --- a/src/text3.C +++ b/src/text3.C @@ -1598,7 +1598,6 @@ Inset::RESULT LyXText::dispatch(FuncRequest const & cmd) break; case LFUN_INDEX_PRINT: - case LFUN_PARENTINSERT: case LFUN_TOC_INSERT: case LFUN_HFILL: // do nothing fancy