Spelling: ... wox (#3775)

* spelling: arguments

* spelling: config

* spelling: deactivated

* spelling: exception

* spelling: folder

* spelling: initialize

* spelling: makesure

* spelling: response

* spelling: storage

* spelling: visibility

* spelling: serialized

* spelling: zipped
This commit is contained in:
Josh Soref
2020-05-27 11:05:54 -04:00
committed by GitHub
parent c2c163ac4e
commit 84169cce10
19 changed files with 49 additions and 49 deletions

View File

@@ -87,8 +87,8 @@ namespace Wox.Core.Plugin
}
else
{
string actionReponse = ExecuteCallback(result1.JsonRPCAction);
JsonRPCRequestModel jsonRpcRequestModel = JsonConvert.DeserializeObject<JsonRPCRequestModel>(actionReponse);
string actionResponse = ExecuteCallback(result1.JsonRPCAction);
JsonRPCRequestModel jsonRpcRequestModel = JsonConvert.DeserializeObject<JsonRPCRequestModel>(actionResponse);
if (jsonRpcRequestModel != null
&& !String.IsNullOrEmpty(jsonRpcRequestModel.Method)
&& jsonRpcRequestModel.Method.StartsWith("Wox."))

View File

@@ -90,7 +90,7 @@ namespace Wox.Core.Plugin
if (!File.Exists(metadata.ExecuteFilePath))
{
Log.Error($"|PluginConfig.GetPluginMetadata|execute file path didn't exist <{metadata.ExecuteFilePath}> for conifg <{configPath}");
Log.Error($"|PluginConfig.GetPluginMetadata|execute file path didn't exist <{metadata.ExecuteFilePath}> for config <{configPath}");
return null;
}

View File

@@ -13,28 +13,28 @@ namespace Wox.Core.Plugin
{
if (File.Exists(path))
{
string tempFoler = Path.Combine(Path.GetTempPath(), "wox\\plugins");
if (Directory.Exists(tempFoler))
string tempFolder = Path.Combine(Path.GetTempPath(), "wox\\plugins");
if (Directory.Exists(tempFolder))
{
Directory.Delete(tempFoler, true);
Directory.Delete(tempFolder, true);
}
UnZip(path, tempFoler, true);
UnZip(path, tempFolder, true);
string iniPath = Path.Combine(tempFoler, "plugin.json");
string iniPath = Path.Combine(tempFolder, "plugin.json");
if (!File.Exists(iniPath))
{
MessageBox.Show("Install failed: plugin config is missing");
return;
}
PluginMetadata plugin = GetMetadataFromJson(tempFoler);
PluginMetadata plugin = GetMetadataFromJson(tempFolder);
if (plugin == null || plugin.Name == null)
{
MessageBox.Show("Install failed: plugin config is invalid");
return;
}
string pluginFolerPath = Infrastructure.Constant.PluginsDirectory;
string pluginFolderPath = Infrastructure.Constant.PluginsDirectory;
string newPluginName = plugin.Name
.Replace("/", "_")
@@ -46,7 +46,7 @@ namespace Wox.Core.Plugin
.Replace("*", "_")
.Replace("|", "_")
+ "-" + Guid.NewGuid();
string newPluginPath = Path.Combine(pluginFolerPath, newPluginName);
string newPluginPath = Path.Combine(pluginFolderPath, newPluginName);
string content = $"Do you want to install following plugin?{Environment.NewLine}{Environment.NewLine}" +
$"Name: {plugin.Name}{Environment.NewLine}" +
$"Version: {plugin.Version}{Environment.NewLine}" +
@@ -72,7 +72,7 @@ namespace Wox.Core.Plugin
}
UnZip(path, newPluginPath, true);
Directory.Delete(tempFoler, true);
Directory.Delete(tempFolder, true);
//existing plugins could be loaded by the application,
//if we try to delete those kind of plugins, we will get a error that indicate the
@@ -146,17 +146,17 @@ namespace Wox.Core.Plugin
/// <summary>
/// unzip
/// </summary>
/// <param name="zipedFile">The ziped file.</param>
/// <param name="zippedFile">The zipped file.</param>
/// <param name="strDirectory">The STR directory.</param>
/// <param name="overWrite">overwrite</param>
private static void UnZip(string zipedFile, string strDirectory, bool overWrite)
private static void UnZip(string zippedFile, string strDirectory, bool overWrite)
{
if (strDirectory == "")
strDirectory = Directory.GetCurrentDirectory();
if (!strDirectory.EndsWith("\\"))
strDirectory = strDirectory + "\\";
using (ZipInputStream s = new ZipInputStream(File.OpenRead(zipedFile)))
using (ZipInputStream s = new ZipInputStream(File.OpenRead(zippedFile)))
{
ZipEntry theEntry;

View File

@@ -29,7 +29,7 @@ namespace Wox.Core.Resource
{
_themeDirectories.Add(DirectoryPath);
_themeDirectories.Add(UserDirectoryPath);
MakesureThemeDirectoriesExist();
MakeSureThemeDirectoriesExist();
var dicts = Application.Current.Resources.MergedDictionaries;
_oldResource = dicts.First(d =>
@@ -45,7 +45,7 @@ namespace Wox.Core.Resource
_oldTheme = Path.GetFileNameWithoutExtension(_oldResource.Source.AbsolutePath);
}
private void MakesureThemeDirectoriesExist()
private void MakeSureThemeDirectoriesExist()
{
foreach (string dir in _themeDirectories)
{
@@ -57,7 +57,7 @@ namespace Wox.Core.Resource
}
catch (Exception e)
{
Log.Exception($"|Theme.MakesureThemeDirectoriesExist|Exception when create directory <{dir}>", e);
Log.Exception($"|Theme.MakeSureThemeDirectoriesExist|Exception when create directory <{dir}>", e);
}
}
}