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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 49 additions and 49 deletions

View File

@ -52,7 +52,7 @@
Margin="24,8,24,24"
BorderThickness="4"
CornerRadius="4"
Visibility="{Binding Results.Visbility}">
Visibility="{Binding Results.Visibility}">
<Border.Effect>
<DropShadowEffect BlurRadius="16" Opacity="0.8" ShadowDepth="0" />
</Border.Effect>

View File

@ -196,7 +196,7 @@ namespace PowerLauncher
private void OnDeactivated(object sender, EventArgs e)
{
if (_settings.HideWhenDeactive)
if (_settings.HideWhenDeactivated)
{
if (isDPIChanged)
{

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);
}
}
}

View File

@ -10,7 +10,7 @@ namespace Wox.Infrastructure.Exception
{
public class ExceptionFormatter
{
public static string FormatExcpetion(System.Exception exception)
public static string FormatException(System.Exception exception)
{
return CreateExceptionReport(exception);
}

View File

@ -9,7 +9,7 @@ namespace Wox.Infrastructure.Storage
/// <summary>
/// Serialize object using json format.
/// </summary>
public class JsonStrorage<T>
public class JsonStorage<T>
{
private readonly JsonSerializerSettings _serializerSettings;
private T _data;
@ -20,7 +20,7 @@ namespace Wox.Infrastructure.Storage
public string DirectoryPath { get; set; }
internal JsonStrorage()
internal JsonStorage()
{
// use property initialization instead of DefaultValueAttribute
// easier and flexible for default value of object
@ -35,10 +35,10 @@ namespace Wox.Infrastructure.Storage
{
if (File.Exists(FilePath))
{
var searlized = File.ReadAllText(FilePath);
if (!string.IsNullOrWhiteSpace(searlized))
var serialized = File.ReadAllText(FilePath);
if (!string.IsNullOrWhiteSpace(serialized))
{
Deserialize(searlized);
Deserialize(serialized);
}
else
{
@ -52,16 +52,16 @@ namespace Wox.Infrastructure.Storage
return _data.NonNull();
}
private void Deserialize(string searlized)
private void Deserialize(string serialized)
{
try
{
_data = JsonConvert.DeserializeObject<T>(searlized, _serializerSettings);
_data = JsonConvert.DeserializeObject<T>(serialized, _serializerSettings);
}
catch (JsonException e)
{
LoadDefault();
Log.Exception($"|JsonStrorage.Deserialize|Deserialize error for json <{FilePath}>", e);
Log.Exception($"|JsonStorage.Deserialize|Deserialize error for json <{FilePath}>", e);
}
if (_data == null)

View File

@ -2,7 +2,7 @@
namespace Wox.Infrastructure.Storage
{
public class PluginJsonStorage<T> :JsonStrorage<T> where T : new()
public class PluginJsonStorage<T> :JsonStorage<T> where T : new()
{
public PluginJsonStorage()
{

View File

@ -7,7 +7,7 @@ using System.Threading.Tasks;
namespace Wox.Infrastructure.Storage
{
public class WoxJsonStorage<T> : JsonStrorage<T> where T : new()
public class WoxJsonStorage<T> : JsonStorage<T> where T : new()
{
public WoxJsonStorage()
{

View File

@ -128,7 +128,7 @@ namespace Wox.Infrastructure.UserSettings
}
}
public bool LeaveCmdOpen { get; set; }
public bool HideWhenDeactive { get; set; } = true;
public bool HideWhenDeactivated { get; set; } = true;
public bool RememberLastLaunchLocation { get; set; }
public bool IgnoreHotkeysOnFullscreen { get; set; }

View File

@ -20,11 +20,11 @@ namespace Wox.Plugin.SharedCommands
var browser = string.IsNullOrEmpty(browserExecutableName) ? "chrome" : browserPath;
// Internet Explorer will open url in new browser window, and does not take the --new-window parameter
var browserArguements = browserExecutableName == "iexplore.exe" ? url : "--new-window " + url;
var browserArguments = browserExecutableName == "iexplore.exe" ? url : "--new-window " + url;
try
{
Process.Start(browser, browserArguements);
Process.Start(browser, browserArguments);
}
catch (System.ComponentModel.Win32Exception)
{

View File

@ -11,7 +11,7 @@ namespace Wox.Helper
private static void Report(Exception e)
{
var logger = LogManager.GetLogger("UnHandledException");
logger.Fatal(ExceptionFormatter.FormatExcpetion(e));
logger.Fatal(ExceptionFormatter.FormatException(e));
var reportWindow = new ReportWindow(e);
reportWindow.Show();

View File

@ -161,7 +161,7 @@ namespace Wox
private void OnDeactivated(object sender, EventArgs e)
{
if (_settings.HideWhenDeactive)
if (_settings.HideWhenDeactivated)
{
Hide();
}

View File

@ -12,7 +12,7 @@
SelectedItem="{Binding SelectedItem, Mode=OneWayToSource}"
HorizontalContentAlignment="Stretch" ItemsSource="{Binding Results}"
Margin="{Binding Margin}"
Visibility="{Binding Visbility}"
Visibility="{Binding Visibility}"
Style="{DynamicResource BaseListboxStyle}" Focusable="False"
KeyboardNavigation.DirectionalNavigation="Cycle" SelectionMode="Single"
VirtualizingStackPanel.IsVirtualizing="True" VirtualizingStackPanel.VirtualizationMode="Standard"

View File

@ -276,13 +276,13 @@ namespace Wox.ViewModel
_selectedResults = value;
if (SelectedIsFromQueryResults())
{
ContextMenu.Visbility = Visibility.Collapsed;
History.Visbility = Visibility.Collapsed;
ContextMenu.Visibility = Visibility.Collapsed;
History.Visibility = Visibility.Collapsed;
ChangeQueryText(_queryTextBeforeLeaveResults);
}
else
{
Results.Visbility = Visibility.Collapsed;
Results.Visibility = Visibility.Collapsed;
_queryTextBeforeLeaveResults = QueryText;
@ -299,7 +299,7 @@ namespace Wox.ViewModel
QueryText = string.Empty;
}
}
_selectedResults.Visbility = Visibility.Visible;
_selectedResults.Visibility = Visibility.Visible;
}
}
@ -471,7 +471,7 @@ namespace Wox.ViewModel
{
Results.SelectedItem = null;
Results.Clear();
Results.Visbility = Visibility.Collapsed;
Results.Visibility = Visibility.Collapsed;
}
}
@ -654,9 +654,9 @@ namespace Wox.ViewModel
Results.AddResults(list, metadata.ID);
}
if (Results.Visbility != Visibility.Visible && list.Count > 0)
if (Results.Visibility != Visibility.Visible && list.Count > 0)
{
Results.Visbility = Visibility.Visible;
Results.Visibility = Visibility.Visible;
}
}

View File

@ -14,7 +14,7 @@ namespace Wox.ViewModel
public ImageSource Image => ImageLoader.Load(PluginPair.Metadata.IcoPath);
public Visibility ActionKeywordsVisibility => PluginPair.Metadata.ActionKeywords.Count > 1 ? Visibility.Collapsed : Visibility.Visible;
public string InitilizaTime => string.Format(_translator.GetTranslation("plugin_init_time"), PluginPair.Metadata.InitTime);
public string InitializeTime => string.Format(_translator.GetTranslation("plugin_init_time"), PluginPair.Metadata.InitTime);
public string QueryTime => string.Format(_translator.GetTranslation("plugin_query_time"), PluginPair.Metadata.AvgQueryTime);
public string ActionKeywordsText => string.Join(Query.ActionKeywordSeparator, PluginPair.Metadata.ActionKeywords);
}

View File

@ -83,7 +83,7 @@ namespace Wox.ViewModel
public Thickness Margin { get; set; }
public Visibility Visbility { get; set; } = Visibility.Hidden;
public Visibility Visibility { get; set; } = Visibility.Hidden;
#endregion
@ -203,7 +203,7 @@ namespace Wox.ViewModel
else
{
Margin = new Thickness { Top = 0 };
Visbility = Visibility.Collapsed;
Visibility = Visibility.Collapsed;
}
}
}

View File

@ -128,7 +128,7 @@ void log_stack_trace(std::wstring& generalErrorDescription)
MessageBoxW(NULL, errorString.c_str(), L"Unhandled Error", MB_OK | MB_ICONERROR);
}
LONG WINAPI unhandled_exceptiont_handler(PEXCEPTION_POINTERS info)
LONG WINAPI unhandled_exception_handler(PEXCEPTION_POINTERS info)
{
if (!processing_exception)
{
@ -164,7 +164,7 @@ extern "C" void AbortHandler(int signal_number)
void init_global_error_handlers()
{
default_top_level_exception_handler = SetUnhandledExceptionFilter(unhandled_exceptiont_handler);
default_top_level_exception_handler = SetUnhandledExceptionFilter(unhandled_exception_handler);
signal(SIGABRT, &AbortHandler);
}
#endif