X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetHyperlink.cpp;h=a0c504cd9cb5d6ef2c9218e8b19f32c471db03f9;hb=8124e6c02ea1fd6779bb6c47ffe2bca2c8bd2d97;hp=4c1b43542c2503e11e04ea5c5484dc637da1b884;hpb=144cf4bb9afaa594ef61b93fdb03d34e4752f2ad;p=lyx.git diff --git a/src/insets/InsetHyperlink.cpp b/src/insets/InsetHyperlink.cpp index 4c1b43542c..a0c504cd9c 100644 --- a/src/insets/InsetHyperlink.cpp +++ b/src/insets/InsetHyperlink.cpp @@ -17,6 +17,7 @@ #include "FuncRequest.h" #include "FuncStatus.h" #include "LaTeXFeatures.h" +#include "LyX.h" #include "output_docbook.h" #include "output_xhtml.h" #include "xml.h" @@ -91,6 +92,12 @@ docstring InsetHyperlink::screenLabel() const void InsetHyperlink::doDispatch(Cursor & cur, FuncRequest & cmd) { + // Ctrl + click: open hyperlink + if (cmd.action() == LFUN_MOUSE_RELEASE && cmd.modifier() == ControlModifier) { + lyx::dispatch(FuncRequest(LFUN_INSET_EDIT)); + return; + } + switch (cmd.action()) { case LFUN_INSET_EDIT: @@ -184,9 +191,8 @@ void InsetHyperlink::latex(otexstream & os, url.replace(pos, 1, from_ascii("\\") + chars_url[k]); // add "http://" when the type is web (type = empty) - // and no "://" or "run:" is given + // and no "://" is given if (url.find(from_ascii("://")) == string::npos - && url.find(from_ascii("run:")) == string::npos && utype.empty()) url = from_ascii("http://") + url; @@ -281,7 +287,7 @@ docstring InsetHyperlink::toolTip(BufferView const & /*bv*/, int /*x*/, int /*y* else if (type == "file:") guitype = _("file"); else if (type == "other") - guitype = _("other"); + guitype = _("other[[Hyperlink Type]]"); return bformat(_("Hyperlink (%1$s) to %2$s"), guitype, url); }