mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 19:57:07 +02:00
Fix icon path for Web Search plugin
This commit is contained in:
@@ -50,13 +50,7 @@ namespace Wox.Plugin.WebSearch
|
||||
|
||||
private void ShowIcon(string path)
|
||||
{
|
||||
try
|
||||
{
|
||||
imgIcon.Source = new BitmapImage(new Uri(path, UriKind.Relative));
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
imgIcon.Source = new BitmapImage(new Uri($"{_defaultWebSearchImageDirectory}\\{path}", UriKind.Absolute));
|
||||
}
|
||||
|
||||
private void BtnCancel_OnClick(object sender, RoutedEventArgs e)
|
||||
@@ -86,13 +80,6 @@ namespace Wox.Plugin.WebSearch
|
||||
}
|
||||
|
||||
string newActionKeyword = tbActionword.Text.Trim();
|
||||
if (string.IsNullOrEmpty(newActionKeyword))
|
||||
{
|
||||
string warning = _context.API.GetTranslation("wox_plugin_websearch_input_action_keyword");
|
||||
MessageBox.Show(warning);
|
||||
return;
|
||||
}
|
||||
|
||||
if (_isUpdate)
|
||||
{
|
||||
try
|
||||
@@ -155,8 +142,8 @@ namespace Wox.Plugin.WebSearch
|
||||
if (result == true)
|
||||
{
|
||||
string filename = dlg.FileName;
|
||||
tbIconPath.Text = filename;
|
||||
ShowIcon(filename);
|
||||
tbIconPath.Text = Path.GetFileName(filename);
|
||||
ShowIcon(tbIconPath.Text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace Wox.Plugin.WebSearch
|
||||
{
|
||||
Title = "Google",
|
||||
ActionKeyword = "g",
|
||||
IconPath = @"Images\websearch\google.png",
|
||||
IconPath = @"google.png",
|
||||
Url = "https://www.google.com/search?q={q}",
|
||||
Enabled = true
|
||||
};
|
||||
@@ -52,7 +52,7 @@ namespace Wox.Plugin.WebSearch
|
||||
{
|
||||
Title = "Wikipedia",
|
||||
ActionKeyword = "wiki",
|
||||
IconPath = @"Images\websearch\wiki.png",
|
||||
IconPath = @"wiki.png",
|
||||
Url = "http://en.wikipedia.org/wiki/{q}",
|
||||
Enabled = true
|
||||
};
|
||||
@@ -62,7 +62,7 @@ namespace Wox.Plugin.WebSearch
|
||||
{
|
||||
Title = "FindIcon",
|
||||
ActionKeyword = "findicon",
|
||||
IconPath = @"Images\websearch\pictures.png",
|
||||
IconPath = @"pictures.png",
|
||||
Url = "http://findicons.com/search/{q}",
|
||||
Enabled = true
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user