JumpList refresh

Ensure that the jump list is refreshed when you hit save based on the
new folder location.
This commit is contained in:
Mark Downie 2016-02-10 00:03:39 -05:00
parent bb1b84f549
commit d38b8fcf3c
2 changed files with 7 additions and 5 deletions

View File

@ -109,5 +109,9 @@ namespace OpenLiveWriter.PostEditor
PostEditorSettings.WeblogPostsFolder = WeblogPostsFolder;
}
public void SaveWebLogPostFolder()
{
PostEditorSettings.WeblogPostsFolder = WeblogPostsFolder;
}
}
}

View File

@ -161,6 +161,8 @@ namespace OpenLiveWriter.PostEditor
Directory.CreateDirectory(destinationRecentPosts);
Directory.CreateDirectory(destinationDrafts);
_postEditorPreferences.SaveWebLogPostFolder();
if (string.Compare(_originalFolder, _postEditorPreferences.WeblogPostsFolder, true, CultureInfo.CurrentUICulture) != 0)
{
string message = "You have updated the default location for your blog posts, would you like to move any existing posts?";
@ -175,7 +177,7 @@ namespace OpenLiveWriter.PostEditor
MovePosts(Path.Combine(_originalFolder + @"\\Recent Posts\\"), destinationRecentPosts);
MovePosts(Path.Combine(_originalFolder + @"\\Drafts\\"), destinationDrafts);
PostEditorForm frm = Application.OpenForms?[0] as PostEditorForm;
if (frm != null)
{
@ -186,8 +188,6 @@ namespace OpenLiveWriter.PostEditor
}
}
}
_postEditorPreferences.Changed();
}
if (_postEditorPreferences.IsModified())
@ -196,8 +196,6 @@ namespace OpenLiveWriter.PostEditor
if (_wordCountPreferences.IsModified())
_wordCountPreferences.Save();
PostListCache.Update();
_originalFolder = _postEditorPreferences.WeblogPostsFolder;
}