mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
elide long URLs - http://bugzilla.lyx.org/show_bug.cgi?id=404
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5096 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
3c732e8542
commit
e91aba8dd0
@ -1,3 +1,7 @@
|
||||
2002-08-25 John Levon <levon@movementarian.org>
|
||||
|
||||
* inseturl.C: elide long URLs (bug 404)
|
||||
|
||||
2002-08-23 Rob Lahaye <lahaye@snu.ac.kr>
|
||||
|
||||
* insetgraphics.[Ch]: remove InsetGraphics::readFigInset()
|
||||
|
@ -41,12 +41,19 @@ string const InsetUrl::getScreenLabel(Buffer const *) const
|
||||
else
|
||||
temp = _("HtmlUrl: ");
|
||||
|
||||
string url;
|
||||
|
||||
if (!getOptions().empty())
|
||||
temp += getOptions();
|
||||
url += getOptions();
|
||||
else
|
||||
temp += getContents();
|
||||
url += getContents();
|
||||
|
||||
return temp;
|
||||
// elide if long
|
||||
if (url.length() > 30) {
|
||||
url = url.substr(0, 10) + "..."
|
||||
+ url.substr(url.length() - 17, url.length());
|
||||
}
|
||||
return temp + url;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user