mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
remove insetparent
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7084 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
c7cb2f251b
commit
91b3be6f57
@ -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:
|
||||
|
@ -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 },
|
||||
|
@ -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") {
|
||||
|
@ -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>
|
||||
|
||||
|
@ -77,8 +77,6 @@ libinsets_la_SOURCES = \
|
||||
insetnote.h \
|
||||
insetoptarg.C \
|
||||
insetoptarg.h \
|
||||
insetparent.C \
|
||||
insetparent.h \
|
||||
insetquotes.C \
|
||||
insetquotes.h \
|
||||
insetref.C \
|
||||
|
@ -83,8 +83,6 @@ public:
|
||||
///
|
||||
GRAPHICS_CODE,
|
||||
///
|
||||
PARENT_CODE,
|
||||
///
|
||||
BIBITEM_CODE,
|
||||
///
|
||||
BIBTEX_CODE,
|
||||
|
@ -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;
|
||||
}
|
@ -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
|
33
src/lfuns.h
33
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,
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user