namespace lyx {
using std::string;
-using std::auto_ptr;
using std::istringstream;
using std::ostream;
using std::ostringstream;
InsetBranchParams const & params)
: InsetCollapsable(bp), params_(params)
{
+ setLayout(bp);
init();
}
}
-auto_ptr<Inset> InsetBranch::doClone() const
+Inset * InsetBranch::clone() const
{
- return auto_ptr<Inset>(new InsetBranch(*this));
+ return new InsetBranch(*this);
}
{
params_.read(lex);
InsetCollapsable::read(buf, lex);
+ setLayout(buf.params());
setButtonLabel();
}
void InsetBranch::setButtonLabel()
{
- Font font(Font::ALL_SANE);
- font.decSize();
- font.decSize();
-
docstring s = _("Branch: ") + params_.branch;
if (!params_.branch.empty()) {
// FIXME UNICODE
s = _("Undef: ") + s;
}
}
- font.setColor(Color::foreground);
- setLabel(isOpen() ? s : getNewLabel(s) );
- setLabelFont(font);
+ if (decoration() == Classic)
+ setLabel(isOpen() ? s : getNewLabel(s) );
+ else
+ setLabel(params_.branch + ": " + getNewLabel(s));
}
InsetBranchParams params;
InsetBranchMailer::string2params(to_utf8(cmd.argument()), params);
params_.branch = params.branch;
+ setLayout(cur.buffer().params());
setButtonLabel();
break;
}