Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visual studio 2017 #700

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@

# BillKrat updates to LiveWrite
* A **C:\Program Files (x86)\Open Live Writer\Plugins** folder is required for a clean compile (plug in transferred to it); be sure to provide yourself write access to the folder.

# Open Live Writer

<hr>
Open Live Writer makes it easy to write, preview, and post to your blog.
For more information see http://www.OpenLiveWriter.org/.
For more information see http://www.OpenLiveWriter.org/. Original information follows:
<hr>

[![Build status](https://ci.appveyor.com/api/projects/status/8xpga2y53sgwo24g?svg=true)](https://ci.appveyor.com/project/dotnetfoundation/openlivewriter)

### Installation
You can install the latest version of Open Live Writer alongside an [older version of Windows Live Writer](http://windows.microsoft.com/en-us/windows-live/essentials). Visit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using System.Xml;
using OpenLiveWriter.CoreServices.ResourceDownloading;
using OpenLiveWriter.Extensibility.BlogClient;
using System.Diagnostics;

namespace OpenLiveWriter.BlogClient.Providers
{
Expand Down Expand Up @@ -100,7 +101,18 @@ private static object ReadXmlBlogProviders(XmlDocument providersDocument)
XmlNodeList providerNodes = providersDocument.SelectNodes("//providers/provider");
foreach (XmlNode providerNode in providerNodes)
{
providers.Add(new BlogProviderFromXml(providerNode));
// BillKrat.2017.11.11 Added try/catch as any error crashes the application
// Exception thrown: 'System.ArgumentException' in OpenLiveWriter.BlogClient.dll
// Invalid ClientType: TistoryBlogClient
try
{
providers.Add(new BlogProviderFromXml(providerNode));
}
catch (Exception ex)
{
Trace.WriteLine($"Exception attempting to load provider : {ex.Message}{ex.StackTrace}");
// Do not let failures crash process
}
}

// return list of providers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@
<supportsScripts>Yes</supportsScripts>
</options>
</provider>
<provider>
<!--<provider> BillKrat.2018.01.14 - causes exception
<id>9E0EC9F9-AFDD-4812-9298-8963D5DB94CC</id>
<name>Tistory OAuth</name>
<description>Tistory Oauth.</description>
Expand All @@ -630,6 +630,5 @@
<usePicasaImgMaxAlways>Yes</usePicasaImgMaxAlways>
<usePicasaS1600h>Yes</usePicasaS1600h>
</options>
</provider>

</providers>
</provider>-->
</providers>
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ private string GetLocalizedString(string name, string defaultValue)

try
{
name = name.Replace(".", "_");
string result = _resMan.GetString(name);
if (result == null)
return defaultValue;
Expand Down
6 changes: 4 additions & 2 deletions src/managed/OpenLiveWriter.PostEditor/JumpList/JumpList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,8 @@ private static void DumpFileRegistration(JumpListCustomCategory category)
if (String.IsNullOrEmpty(progId))
{
error = true;
Trace.Fail("ERROR: ProgId missing for extension: " + extension);
// BillKrat.2018.01.14 - remove annoying fail for ProgId missing for extension
// Trace.Fail("ERROR: ProgId missing for extension: " + extension);
}
else
{
Expand Down Expand Up @@ -291,7 +292,8 @@ private void AppendCustomCategories()
if ((uint)hr == 0x80040F03)
{
DumpFileRegistration(category);
throw new InvalidOperationException("The file type is not registered with this application.");
// BillKrat.2018.01.14 Remove annoying exception for JumpList "not registered with this application"
// throw new InvalidOperationException("The file type is not registered with this application.");
}
else if ((uint)hr == 0x80070005 /*E_ACCESSDENIED*/)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
</ProjectReference>
<ProjectReference Include="..\OpenLiveWriter.InternalWriterPlugin\OpenLiveWriter.InternalWriterPlugin.csproj">
<Name>OpenLiveWriter.WriterPlugin</Name>
<Name>OpenLiveWriter.InternalWriterPlugin</Name>
<Project>{699FB638-CE02-48D7-8078-30A7939C5BCB}</Project>
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
</ProjectReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,11 @@ public void ReferenceFixedCallback(string oldReference, string newReference)
{
// We can no longer trust the target settings for this file, so we must remove them
// this means the first time the object is clicked it will read the settings from the DOM
if (file.FileId == imageData.InlineImageFile.SupportingFile.FileId)
//
// BillKrat.2018.04.16 InlineImageFile property was null crashing application. I encountered this after
// an issue with the online BlogEngine site where I was inserting an image but the impage did not make it to
// the blog. I couldn't upload images from site nor reload the blog in OpenWriter [resolved]
if (imageData.InlineImageFile==null || file.FileId == imageData.InlineImageFile.SupportingFile.FileId)
{
BlogPostSettingsBag settings =
imageData.ImageDecoratorSettings.GetSubSettings(HtmlImageTargetDecorator.Id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ public static void CheckforUpdates(bool forceCheck = false)
UpdateSettings.BetaUpdateDownloadUrl : UpdateSettings.UpdateDownloadUrl;

// Schedule Open Live Writer 10 seconds after the launch
var delayUpdate = new DelayUpdateHelper(UpdateOpenLiveWriter(downloadUrl, checkNow), UPDATELAUNCHDELAY);
delayUpdate.StartBackgroundUpdate("Background OpenLiveWriter application update");
// BillKrat.2018.01.14 - causes "Update.exe not found, not a Squirrel-installed app?" error - disabled
// var delayUpdate = new DelayUpdateHelper(UpdateOpenLiveWriter(downloadUrl, checkNow), UPDATELAUNCHDELAY);
// delayUpdate.StartBackgroundUpdate("Background OpenLiveWriter application update");
#endif
}

Expand Down