-InsetInfo::InsetInfo(Buffer const & buf, string const & name)
- : InsetCollapsable(buf, Collapsed), type_(UNKNOWN_INFO), name_()
+InsetInfo::InsetInfo(Buffer * buf, string const & name)
+ : InsetCollapsable(buf), type_(UNKNOWN_INFO), name_()
{
setAutoBreakRows(true);
setInfo(name);
+ status_ = Collapsed;
}
docstring InsetInfo::toolTip(BufferView const &, int, int) const
{
- odocstringstream os;
- os << _("Information regarding ")
- << _(infoType()) << " " << from_utf8(name_);
- return os.str();
+ return bformat(_("Information regarding %1$s '%2$s'"),
+ _(infoType()), from_utf8(name_));
}
_("Missing \\end_inset at this point."),
from_utf8(token));
}
- setLayout(buffer().params());
updateInfo();
}
case LFUN_MOUSE_DOUBLE:
case LFUN_MOUSE_TRIPLE:
case LFUN_COPY:
- case LFUN_INSET_SETTINGS:
return InsetCollapsable::getStatus(cur, cmd, flag);
+ case LFUN_INSET_DIALOG_UPDATE:
case LFUN_INSET_MODIFY:
+ case LFUN_INSET_SETTINGS:
flag.setEnabled(true);
- break;
+ return true;
default:
return false;
}
- return true;
}
string type;
name_ = trim(split(name, type, ' '));
type_ = nameTranslator().find(type);
- setLayout(buffer().params());
updateInfo();
}
void InsetInfo::error(string const & err)
{
- setText(bformat(_(err), from_utf8(name_)), Font(inherit_font), false);
+ setText(bformat(_(err), from_utf8(name_)),
+ Font(inherit_font, buffer().params().language), false);
}
void InsetInfo::setText(docstring const & str)
{
- setText(str, Font(inherit_font), false);
+ setText(str, Font(inherit_font, buffer().params().language), false);
}
break;
}
if (type_ == SHORTCUT_INFO)
- setText(bindings.rbegin()->print(KeySequence::Portable),
- Font(getLayout().font()), false);
+ setText(bindings.begin()->print(KeySequence::Portable));
else
- setText(theTopLevelKeymap().printBindings(func),
- Font(getLayout().font()), false);
+ setText(theTopLevelKeymap().printBindings(func, KeySequence::Portable));
break;
}
case LYXRC_INFO: {
// if found, return its path.
clear();
Paragraph & par = paragraphs().front();
- Font const f = Font(getLayout().font());
+ Font const f(inherit_font, buffer().params().language);
//Font fu = f;
//fu.fontInfo().setUnderbar(FONT_ON);
docstring_list::const_iterator beg = names.begin();
FileName file(to_utf8(icon_name));
if (!file.exists())
break;
- InsetGraphics * inset = new InsetGraphics(buffer());
+ InsetGraphics * inset = new InsetGraphics(buffer_);
InsetGraphicsParams igp;
igp.filename = file;
inset->setParams(igp);