[EMAIL PROTECTED] wrote:
Author: younes
Date: Thu Nov 15 16:40:01 2007
New Revision: 21627
URL: http://www.lyx.org/trac/changeset/21627
Log:
Add InsetOptArg to standard insets.
Modified:
lyx-devel/trunk/lib/layouts/stdinsets.inc
lyx-devel/trunk/src/insets/InsetOptArg.cpp
lyx-devel/trunk/src/insets/InsetOptArg.h
Modified: lyx-devel/trunk/lib/layouts/stdinsets.inc
URL:
http://www.lyx.org/trac/file/lyx-devel/trunk/lib/layouts/stdinsets.inc?rev=21627
==============================================================================
--- lyx-devel/trunk/lib/layouts/stdinsets.inc (original)
+++ lyx-devel/trunk/lib/layouts/stdinsets.inc Thu Nov 15 16:40:01 2007
@@ -224,3 +224,11 @@
EndPreamble
End
+InsetLayout OptArg
+ LabelString opt
+ LabelFont
+ Color collapsable
+ Size Small
+ EndFont
+ MultiPar false
Hum, I just checked 1.5 and it seems that multiple paragraph are allowed
there. But LateX won't compile when the optional argument has more than
one par in 1.5. So this is a bug of 1.5 right?
+End
Modified: lyx-devel/trunk/src/insets/InsetOptArg.cpp
URL:
http://www.lyx.org/trac/file/lyx-devel/trunk/src/insets/InsetOptArg.cpp?rev=21627
==============================================================================
--- lyx-devel/trunk/src/insets/InsetOptArg.cpp (original)
+++ lyx-devel/trunk/src/insets/InsetOptArg.cpp Thu Nov 15 16:40:01 2007
@@ -23,16 +23,12 @@
InsetOptArg::InsetOptArg(BufferParams const & ins)
: InsetCollapsable(ins)
-{
- setLabel(_("opt"));
-}
+{}
InsetOptArg::InsetOptArg(InsetOptArg const & in)
: InsetCollapsable(in)
-{
- setLabel(_("opt"));
-}
+{}
Inset * InsetOptArg::clone() const
Modified: lyx-devel/trunk/src/insets/InsetOptArg.h
URL:
http://www.lyx.org/trac/file/lyx-devel/trunk/src/insets/InsetOptArg.h?rev=21627
==============================================================================
--- lyx-devel/trunk/src/insets/InsetOptArg.h (original)
+++ lyx-devel/trunk/src/insets/InsetOptArg.h Thu Nov 15 16:40:01 2007
@@ -29,6 +29,8 @@
/// code of the inset
InsetCode lyxCode() const { return OPTARG_CODE; }
+ ///
+ docstring name() const { return from_ascii("OptArg"); }
/// return an message upon editing
virtual docstring const editMessage() const;