Merge pull request #323 from renzhn/fix-wox

Fix wox
This commit is contained in:
qianlifeng 2015-08-28 09:41:12 +08:00
commit fe4319ad07
6 changed files with 21 additions and 10 deletions

View File

@ -10,8 +10,8 @@
<system:String x:Key="wox_plugin_program_suffixes">索引文件后缀</system:String>
<system:String x:Key="wox_plugin_program_reindex">重新索引</system:String>
<system:String x:Key="wox_plugin_program_indexing">索引中</system:String>
<system:String x:Key="wox_plugin_program_index_start">指数开始菜单</system:String>
<system:String x:Key="wox_plugin_program_index_registry">指数注册</system:String>
<system:String x:Key="wox_plugin_program_index_start">索引开始菜单</system:String>
<system:String x:Key="wox_plugin_program_index_registry">索引注册表</system:String>
<system:String x:Key="wox_plugin_program_suffixes_header">后缀</system:String>
<system:String x:Key="wox_plugin_program_max_depth_header">最大深度</system:String>

View File

@ -6,6 +6,7 @@ using System.Text;
using System.Threading;
using Wox.Infrastructure;
using Wox.Plugin;
using Wox.Core.UserSettings;
namespace Wox.Core.Plugin.QueryDispatcher
{
@ -17,6 +18,12 @@ namespace Wox.Core.Plugin.QueryDispatcher
{
foreach (PluginPair pair in GetPlugins(query))
{
var customizedPluginConfig = UserSettingStorage.Instance.
CustomizedPluginConfigs.FirstOrDefault(o => o.ID == pair.Metadata.ID);
if (customizedPluginConfig != null && customizedPluginConfig.Disabled)
{
return;
}
PluginPair localPair = pair;
if (query.IsIntantQuery && PluginManager.IsInstantSearchPlugin(pair.Metadata))
{

View File

@ -8,6 +8,8 @@ namespace Wox.Converters
{
public class StringNullOrEmptyToVisibilityConverter : ConvertorBase<StringNullOrEmptyToVisibilityConverter>
{
public StringNullOrEmptyToVisibilityConverter() { }
public override object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return string.IsNullOrEmpty(value as string) ? Visibility.Collapsed : Visibility.Visible;

View File

@ -31,8 +31,8 @@
<system:String x:Key="actionKeyword">触发关键字</system:String>
<system:String x:Key="pluginDirectory">插件目录</system:String>
<system:String x:Key="author">作者</system:String>
<system:String x:Key="plugin_init_time">加载耗时{0}ms</system:String>
<system:String x:Key="plugin_query_time">查询耗时{0}ms</system:String>
<system:String x:Key="plugin_init_time">加载耗时 {0}ms</system:String>
<system:String x:Key="plugin_query_time">查询耗时 {0}ms</system:String>
<!--设置,主题-->
<system:String x:Key="theme">主题</system:String>

View File

@ -99,16 +99,16 @@
<TextBlock Opacity="0.5" VerticalAlignment="Bottom" HorizontalAlignment="Right" x:Name="pluginAuthor" Text="{DynamicResource author}"></TextBlock>
</DockPanel>
<TextBlock Grid.Row="1" x:Name="pluginSubTitle" Opacity="0.5" ToolTip="{Binding Source=pluginSubTitle, Path=Text}" Visibility="{Binding Source=pluginSubTitle, Path=Text, Converter={converters:StringNullOrEmptyToVisibilityConverter}}" ></TextBlock>
<DockPanel Grid.Row="2" Margin="0 8 0 0">
<DockPanel Grid.Row="2" Margin="0 10 0 8">
<CheckBox x:Name="cbDisablePlugin" Click="CbDisablePlugin_OnClick">
<TextBlock Text="{DynamicResource disable}"></TextBlock>
</CheckBox>
<TextBlock x:Name="pluginActionKeywordTitle" Margin="20 -2 0 0">
<TextBlock x:Name="pluginActionKeywordTitle" Margin="20 0 0 0">
<TextBlock Text="{DynamicResource actionKeyword}"></TextBlock>
</TextBlock>
<TextBlock Margin="5 -2 0 0" ToolTip="Change Action Keyword" Cursor="Hand" MouseUp="PluginActionKeyword_OnMouseUp" Foreground="Blue" Text="key" x:Name="pluginActionKeyword"></TextBlock>
<TextBlock Margin="20 -2 0 0" Text="Init time: 0ms" x:Name="pluginInitTime"></TextBlock>
<TextBlock Margin="20 -2 0 0" Text="Query time: 0ms" x:Name="pluginQueryTime"></TextBlock>
<TextBlock Margin="5 0 0 0" ToolTip="Change Action Keyword" Cursor="Hand" MouseUp="PluginActionKeyword_OnMouseUp" Foreground="Blue" Text="key" x:Name="pluginActionKeyword"></TextBlock>
<TextBlock Margin="10 0 0 0" Text="Init time: 0ms" x:Name="pluginInitTime"></TextBlock>
<TextBlock Margin="10 0 0 0" Text="Query time: 0ms" x:Name="pluginQueryTime"></TextBlock>
<TextBlock HorizontalAlignment="Right" Cursor="Hand" MouseUp="tbOpenPluginDirecoty_MouseUp" Foreground="Blue" Text="{DynamicResource pluginDirectory}" x:Name="tbOpenPluginDirecoty"></TextBlock>
</DockPanel>
</Grid>

View File

@ -111,7 +111,9 @@ namespace Wox
cbEnableProxy.Unchecked += (o, e) => DisableProxy();
cbEnableProxy.IsChecked = UserSettingStorage.Instance.ProxyEnabled;
tbProxyServer.Text = UserSettingStorage.Instance.ProxyServer;
tbProxyPort.Text = UserSettingStorage.Instance.ProxyPort.ToString();
if (UserSettingStorage.Instance.ProxyPort != 0) {
tbProxyPort.Text = UserSettingStorage.Instance.ProxyPort.ToString();
}
tbProxyUserName.Text = UserSettingStorage.Instance.ProxyUserName;
tbProxyPassword.Password = UserSettingStorage.Instance.ProxyPassword;
if (UserSettingStorage.Instance.ProxyEnabled)