mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Fix bug #9898: inset info cannot show specified icon
This commit is contained in:
parent
5fb0b17f02
commit
b6880470b3
@ -169,12 +169,20 @@ bool InsetInfo::validateModifyArgument(docstring const & arg) const
|
||||
|
||||
case SHORTCUT_INFO:
|
||||
case SHORTCUTS_INFO:
|
||||
case MENU_INFO:
|
||||
case ICON_INFO: {
|
||||
case MENU_INFO: {
|
||||
FuncRequest func = lyxaction.lookupFunc(name);
|
||||
return func.action() != LFUN_UNKNOWN_ACTION;
|
||||
}
|
||||
|
||||
case ICON_INFO: {
|
||||
FuncCode const action = lyxaction.lookupFunc(name).action();
|
||||
if (action == LFUN_UNKNOWN_ACTION) {
|
||||
string dir = "images";
|
||||
return !imageLibFileSearch(dir, name, "svgz,png").empty();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
case LYXRC_INFO: {
|
||||
ostringstream oss;
|
||||
lyxrc.write(oss, true, name);
|
||||
|
@ -56,7 +56,8 @@ menu: argument is the name of the LFUN such as "paste". The syntax is the same
|
||||
|
||||
icon: argument is the name of the LFUN such as "paste". The syntax is the same
|
||||
as what is used in the bind and ui files. The output is the icon use in
|
||||
the toolbar for this LFUN.
|
||||
the toolbar for this LFUN. Alternatively, argument can be the icon path
|
||||
without extension specified with respect to the images directory.
|
||||
|
||||
buffer: argument can be one of "name", "path", "class". This inset output the
|
||||
filename, path, and textclass of this buffer.
|
||||
|
Loading…
Reference in New Issue
Block a user