Including more web search by default

1. Fix #376
2. Thanks @ishu3101
This commit is contained in:
bao-qian
2016-01-04 05:00:16 +00:00
parent 098db9adf6
commit ebe4804b00
20 changed files with 216 additions and 60 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 986 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

View File

@@ -79,10 +79,7 @@ namespace Wox.Plugin.WebSearch
public void Init(PluginInitContext context)
{
this.Context = context;
if (WebSearchStorage.Instance.WebSearches == null)
WebSearchStorage.Instance.WebSearches = WebSearchStorage.Instance.LoadDefaultWebSearches();
Context = context;
}
#region ISettingProvider Members

View File

@@ -6,7 +6,7 @@ using Wox.Infrastructure.Storage;
namespace Wox.Plugin.WebSearch
{
public class WebSearchStorage :JsonStrorage<WebSearchStorage>
public class WebSearchStorage : JsonStrorage<WebSearchStorage>
{
[JsonProperty]
public List<WebSearch> WebSearches { get; set; }
@@ -26,49 +26,5 @@ namespace Wox.Plugin.WebSearch
{
get { return "setting"; }
}
protected override WebSearchStorage LoadDefault()
{
WebSearches = LoadDefaultWebSearches();
return this;
}
public List<WebSearch> LoadDefaultWebSearches()
{
List<WebSearch> webSearches = new List<WebSearch>();
WebSearch googleWebSearch = new WebSearch()
{
Title = "Google",
ActionKeyword = "g",
IconPath = @"Images\google.png",
Url = "https://www.google.com/search?q={q}",
Enabled = true
};
webSearches.Add(googleWebSearch);
WebSearch wikiWebSearch = new WebSearch()
{
Title = "Wikipedia",
ActionKeyword = "wiki",
IconPath = @"Images\wiki.png",
Url = "http://en.wikipedia.org/wiki/{q}",
Enabled = true
};
webSearches.Add(wikiWebSearch);
WebSearch findIcon = new WebSearch()
{
Title = "FindIcon",
ActionKeyword = "findicon",
IconPath = @"Images\pictures.png",
Url = "http://findicons.com/search/{q}",
Enabled = true
};
webSearches.Add(findIcon);
return webSearches;
}
}
}

View File

@@ -79,6 +79,48 @@
<None Include="Images\wiki.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Images\bing.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Images\duckduckgo.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Images\facebook.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Images\gist.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Images\github.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Images\gmail.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Images\google_drive.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Images\google_maps.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Images\google_translate.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Images\stackoverflow.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Images\twitter.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Images\wolframalpha.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Images\yahoo.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Images\youtube.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<Content Include="Languages\en.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -94,6 +136,9 @@
<SubType>Designer</SubType>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="setting.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<Page Include="WebSearchesSetting.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>

View File

@@ -1,12 +1,32 @@
{
"ID":"565B73353DBF4806919830B9202EE3BF",
"ActionKeywords": ["g", "wiki", "findicon"],
"Name":"Web Searches",
"Description":"Provide the web search ability",
"Author":"qianlifeng",
"Version":"1.0.0",
"Language":"csharp",
"Website":"http://www.getwox.com/plugin",
"ExecuteFileName":"Wox.Plugin.WebSearch.dll",
"IcoPath":"Images\\web_search.png"
"ID": "565B73353DBF4806919830B9202EE3BF",
"ActionKeywords": [
"g",
"wiki",
"findicon",
"facebook",
"twitter",
"maps",
"translate",
"duckduckgo",
"github",
"gist",
"gmail",
"drive",
"wolframalpha",
"stackoverflow",
"lucky",
"image",
"youtube",
"bing",
"yahoo"
],
"Name": "Web Searches",
"Description": "Provide the web search ability",
"Author": "qianlifeng",
"Version": "1.0.0",
"Language": "csharp",
"Website": "http://www.getwox.com/plugin",
"ExecuteFileName": "Wox.Plugin.WebSearch.dll",
"IcoPath": "Images\\web_search.png"
}

View File

@@ -0,0 +1,139 @@
{
"WebSearches": [
{
"Title": "Google",
"ActionKeyword": "g",
"IconPath": "Images\\google.png",
"Url": "https://www.google.com/search?q={q}",
"Enabled": true
},
{
"Title": "Wikipedia",
"ActionKeyword": "wiki",
"IconPath": "Images\\wiki.png",
"Url": "http://en.wikipedia.org/wiki/{q}",
"Enabled": true
},
{
"Title": "FindIcon",
"ActionKeyword": "findicon",
"IconPath": "Images\\pictures.png",
"Url": "http://findicons.com/search/{q}",
"Enabled": true
},
{
"Title": "Facebook",
"ActionKeyword": "facebook",
"IconPath": "Images\\facebook.png",
"Url": "http://www.facebook.com/search/?q={q}",
"Enabled": true
},
{
"Title": "Twitter",
"ActionKeyword": "twitter",
"IconPath": "Images\\twitter.png",
"Url": "http://twitter.com/search?q={q}",
"Enabled": true
},
{
"Title": "Google Maps",
"ActionKeyword": "maps",
"IconPath": "Images\\google_maps.png",
"Url": "http://maps.google.com/maps?q={q}",
"Enabled": true
},
{
"Title": "Google Translate",
"ActionKeyword": "translate",
"IconPath": "Images\\google_translate.png",
"Url": "http://translate.google.com/#auto|en|{q}",
"Enabled": true
},
{
"Title": "Duckduckgo",
"ActionKeyword": "duckduckgo",
"IconPath": "Images\\duckduckgo.png",
"Url": "https://duckduckgo.com/?q={q}",
"Enabled": true
},
{
"Title": "Github",
"ActionKeyword": "github",
"IconPath": "Images\\github.png",
"Url": "https://github.com/search?q={q}",
"Enabled": true
},
{
"Title": "Github Gist",
"ActionKeyword": "gist",
"IconPath": "Images\\gist.png",
"Url": "https://gist.github.com/search?q={q}",
"Enabled": true
},
{
"Title": "Gmail",
"ActionKeyword": "gmail",
"IconPath": "Images\\gmail.png",
"Url": "https://mail.google.com/mail/ca/u/0/#apps/{q}",
"Enabled": true
},
{
"Title": "Google Drive",
"ActionKeyword": "drive",
"IconPath": "Images\\google_drive.png",
"Url": "http://drive.google.com/?hl=en&tab=bo#search/{q}",
"Enabled": true
},
{
"Title": "Wolframalpha",
"ActionKeyword": "wolframalpha",
"IconPath": "Images\\wolframalpha.png",
"Url": "http://www.wolframalpha.com/input/?i={q}",
"Enabled": true
},
{
"Title": "Stackoverflow",
"ActionKeyword": "stackoverflow",
"IconPath": "Images\\stackoverflow.png",
"Url": "http://stackoverflow.com/search?q={q}",
"Enabled": true
},
{
"Title": "I'm Feeling Lucky",
"ActionKeyword": "lucky",
"IconPath": "Images\\google.png",
"Url": "http://google.com/search?q={q}&btnI=I",
"Enabled": true
},
{
"Title": "Google Image",
"ActionKeyword": "image",
"IconPath": "Images\\google.png",
"Url": "https://www.google.com/search?q={q}&tbm=isch",
"Enabled": true
},
{
"Title": "Youtube",
"ActionKeyword": "youtube",
"IconPath": "Images\\youtube.png",
"Url": "http://www.youtube.com/results?search_query={q}",
"Enabled": true
},
{
"Title": "Bing",
"ActionKeyword": "bing",
"IconPath": "Images\\bing.png",
"URL": "https://www.bing.com/search?q={q}",
"Enabled": true
},
{
"Title": "Yahoo",
"ActionKeyword": "yahoo",
"IconPath": "Images\\yahoo.png",
"URL": "http://www.search.yahoo.com/search?p={q}",
"Enabled": true
}
],
"EnableWebSearchSuggestion": false,
"WebSearchSuggestionSource": "Google"
}

View File

@@ -63,7 +63,6 @@
<Compile Include="Hotkey\InterceptKeys.cs" />
<Compile Include="Hotkey\KeyEvent.cs" />
<Compile Include="Logger\Log.cs" />
<Compile Include="PeHeaderReader.cs" />
<Compile Include="Stopwatch.cs" />
<Compile Include="Storage\BinaryStorage.cs" />
<Compile Include="Storage\IStorage.cs" />