[LyX/master] New attempt on #9906: allow following hyperlinks via context menu.
Jürgen Spitzmüller
spitz at lyx.org
Tue Aug 18 07:23:08 UTC 2020
Only some minor comments. Looks good in general.
Am Montag, den 17.08.2020, 08:16 +0200 schrieb Pavel Sanda:
> diff --git a/lib/ui/stdcontext.inc b/lib/ui/stdcontext.inc
> index c2beb316f4..b47cd4d7f8 100644
> --- a/lib/ui/stdcontext.inc
> +++ b/lib/ui/stdcontext.inc
> @@ -128,6 +128,7 @@ Menuset
> CiteStyles
> Separator
> Item "Settings...|S" "inset-settings"
> + Item "Open citation content|O" "inset-edit"
This should be an OptItem, and the function should be disabled if the
citation in question does not have a target to follow.
Also, we use Title Casing in menus.
> + doi = operator[]("doi");
> + if (!doi.empty() && !prefixIs(doi,from_ascii("http")))
> + doi = "https://doi.org/" + doi;
> + url = operator[]("url");
> + file = operator[]("file");
Biblatex also has eprint (a template identifier that can point to
arxiv, jstor etc., which is indicated by the eprinttype field). A bit
harder to resolve, but possible at least for the default eprinttypes as
preset by Biblatex). See Biblatex manual, 3.13.7.
> + //TODO I have no clue about non-bibtex cases
This is the bibliography environment. All you could do here is let LyX
scan the entry for URL or HRef insets. But I'm not sure it's worth it.
> @@ -293,6 +296,18 @@ void showDirectory(FileName const & directory)
> if (!QDesktopServices::openUrl(qurl))
> LYXERR0("Unable to open QUrl even though dir
> exists!");
> }
> +
> +void showTarget(string const & target){
> + lyxerr<<"Showtarget:" << target << "\n";
You will want to remove this debug msg, or make it a proper dbg
message.
Jürgen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20200818/0c24a15a/attachment.asc>
More information about the lyx-devel
mailing list