mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Add user name and email to Insert > Fields
This is a low hanging fruit, since it's already available (although quite hidden) Generally, output "not set" i a pref is not set rather than an empty string.
This commit is contained in:
parent
2315bdad41
commit
c6d8efba6c
@ -431,6 +431,8 @@ Menuset
|
||||
Item "Time (Fix)|x" "info-insert fixtime"
|
||||
Separator
|
||||
Item "File Name (Excl. Extension)|N" "info-insert buffer name-noext"
|
||||
Item "User Name|U" "info-insert lyxrc user_name"
|
||||
Item "User Email|E" "info-insert lyxrc user_email"
|
||||
Separator
|
||||
Item "Other...|O" "info-insert"
|
||||
End
|
||||
|
@ -786,6 +786,9 @@ void InsetInfo::updateBuffer(ParIterator const & it, UpdateType utype) {
|
||||
// remove \n and ""
|
||||
result = rtrim(result, "\n");
|
||||
result = trim(result, "\"");
|
||||
gui = _("not set");
|
||||
if (result.empty())
|
||||
result = "not set";
|
||||
setText(from_utf8(result), params_.lang);
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user