]> git.lyx.org Git - features.git/commitdiff
remove insetparent
authorJohn Levon <levon@movementarian.org>
Mon, 2 Jun 2003 14:19:30 +0000 (14:19 +0000)
committerJohn Levon <levon@movementarian.org>
Mon, 2 Jun 2003 14:19:30 +0000 (14:19 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7084 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/LyXAction.C
src/factory.C
src/insets/ChangeLog
src/insets/Makefile.am
src/insets/inset.h
src/insets/insetparent.C [deleted file]
src/insets/insetparent.h [deleted file]
src/lfuns.h
src/lyxfunc.C
src/text3.C

index bc996cc118762b42e5cdc062b4092655254ed242..4d2b09be6224003379f83e0297fc81bee2b65705 100644 (file)
@@ -1,3 +1,11 @@
+2003-06-02  John Levon  <levon@movementarian.org>
+
+       * LyXAction.C:
+       * factory.C:
+       * lfuns.h:
+       * lyxfunc.C:
+       * text3.C: remove insetparent
+
 2003-06-02  John Levon  <levon@movementarian.org>
 
        * buffer.h:
index 057fc8c0aa90996dc938ac5030157e9df9ef847d..5dc982296d16cba3a767668a1a4278dad3490174 100644 (file)
@@ -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 },
index fa05ac87da5ba16d287f6847e3401b1a093f7896..c2316ef39edd72228c9814e21b9138c567a8c875 100644 (file)
@@ -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") {
index 337df3f9b5102a354f1bf15013ccb9577b032c06..5efeaa0d28dc6f994f03e8425eca51697ef98bbc 100644 (file)
@@ -1,3 +1,9 @@
+2003-06-02  John Levon  <levon@movementarian.org>
+
+       * Makefile.am:
+       * inset.h:
+       * insetparent.h:
+       * insetparent.C: remove insetparent
 
 2003-06-02  André Pönitz  <poenitz@gmx.net>
 
index 77de2966ffdbc0e7b62a6a52e746bfe710319dc2..bdf9a7bfd5d795474c4ad5bff6b03b62047f5692 100644 (file)
@@ -77,8 +77,6 @@ libinsets_la_SOURCES = \
        insetnote.h \
        insetoptarg.C \
        insetoptarg.h \
-       insetparent.C \
-       insetparent.h \
        insetquotes.C \
        insetquotes.h \
        insetref.C \
index 844d9377ab54b8d864755a6cc029bcc6d7111090..0b72fb684a2c21906432b15ce01a62a7f8faccf4 100644 (file)
@@ -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 (file)
index cd056a9..0000000
+++ /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 <config.h>
-
-#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 (file)
index c79b741..0000000
+++ /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
index e997263308bf94692e1d5e3624cf3586814111f4..0ecea946a99e774b18096e15aa4bb4715e845fc0 100644 (file)
@@ -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,
 
index 5a3fffc15803bc7651acaf0246c91049220c58a3..b1a737955eaa2cac3aad98bb2f8b0d3902fbee7e 100644 (file)
@@ -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;
index 6844d80b85b10f87ef88d9bd4c67688d9fbda72c..50f3498dc49e5a73592b536660366df5c47d4b26 100644 (file)
@@ -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