Fixes #103. Tests pending.
This commit is contained in:
parent
069fa99b9a
commit
796b75a170
|
@ -649,7 +649,7 @@
|
|||
Type="Exclamation"
|
||||
Buttons="YesNo"
|
||||
Title="Open Live Writer"
|
||||
Text="{0}
Not a valid URL.
Do you want to continue?"
|
||||
Text="{0}
Not a valid URL.
Do you want to go back and edit the URL?"
|
||||
comment:Text="{0} - the url that was entered"/>
|
||||
<Message
|
||||
Identifier="InvalidInsertionPoint"
|
||||
|
|
|
@ -2835,7 +2835,7 @@ Check the file name and try again.</value>
|
|||
<data name="DisplayMessage.InputIsNotUrl.Text" xml:space="preserve">
|
||||
<value>{0}
|
||||
Not a valid URL.
|
||||
Do you want to continue?</value>
|
||||
Do you want to go back and edit the URL?</value>
|
||||
<comment>{0} - the url that was entered</comment></data>
|
||||
<data name="DisplayMessage.InputIsNotUrl.Title" xml:space="preserve">
|
||||
<value>Open Live Writer</value>
|
||||
|
|
|
@ -48,10 +48,11 @@ namespace OpenLiveWriter.PostEditor.ImageInsertion.WebImages
|
|||
{
|
||||
if (!UrlHelper.IsUrl(_source.SourceImageLink))
|
||||
{
|
||||
if (DisplayMessage.Show(MessageId.InputIsNotUrl, this, _source.SourceImageLink) == System.Windows.Forms.DialogResult.No)
|
||||
//Ask if they want to go back and correct the link or just abort it altogether
|
||||
if (DisplayMessage.Show(MessageId.InputIsNotUrl, this, _source.SourceImageLink) == System.Windows.Forms.DialogResult.Yes)
|
||||
return;
|
||||
}
|
||||
DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
DialogResult = System.Windows.Forms.DialogResult.Abort;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -95,15 +95,15 @@ namespace OpenLiveWriter.PostEditor.PostHtmlEditing
|
|||
imgHtmlElement.setAttribute("height", oldHeight, 0);
|
||||
if (!String.IsNullOrEmpty(oldWidth))
|
||||
imgHtmlElement.setAttribute("width", oldWidth, 0);
|
||||
|
||||
try
|
||||
{
|
||||
info = new ImagePropertiesInfo(new Uri(imgSrc), new Size(width, height), remoteImageDecoratorsList);
|
||||
}
|
||||
catch (UriFormatException)
|
||||
{
|
||||
DisplayMessage.Show(MessageId.InvalidWebImage);
|
||||
return null;
|
||||
DisplayMessage.Show(MessageId.NoSuchImageFile);
|
||||
imgHtmlElement.setAttribute("src", "https://browshot.com/static/images/not-found.png");
|
||||
info = new ImagePropertiesInfo(new Uri("https://browshot.com/static/images/not-found.png"), new Size(width, height), remoteImageDecoratorsList);
|
||||
}
|
||||
info.ImgElement = imgHtmlElement;
|
||||
|
||||
|
|
Loading…
Reference in New Issue