Removed UI related to python path and the bindings related to that

This commit is contained in:
Alekhya Reddy
2020-03-23 15:33:39 -07:00
parent db253cdaf8
commit 4dac1ae9f8
4 changed files with 0 additions and 37 deletions

View File

@@ -14,8 +14,6 @@ namespace Wox.Core.Plugin
public static class PluginsLoader
{
public const string PATH = "PATH";
public const string Python = "python";
public const string PythonExecutable = "pythonw.exe";
public static List<PluginPair> Plugins(List<PluginMetadata> metadatas, PluginsSettings settings)
{

View File

@@ -5,7 +5,6 @@ namespace Wox.Infrastructure.UserSettings
{
public class PluginsSettings : BaseModel
{
public string PythonDirectory { get; set; }
public Dictionary<string, Plugin> Plugins { get; set; } = new Dictionary<string, Plugin>();
public void UpdatePluginSettings(List<PluginMetadata> metadatas)

View File

@@ -81,12 +81,6 @@
<ComboBox Margin="10 0 0 0" Width="45" ItemsSource="{Binding MaxResultsRange}"
SelectedItem="{Binding Settings.MaxResultsToShow}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Margin="10" Text="{DynamicResource pythonDirectory}" />
<TextBox Width="300" Margin="10" Text="{Binding Settings.PluginSettings.PythonDirectory}" />
<Button Margin="10" Click="OnSelectPythonDirectoryClick"
Content="{DynamicResource selectPythonDirectory}" />
</StackPanel>
</StackPanel>
</TabItem>
<TabItem Header="{DynamicResource plugin}">

View File

@@ -87,34 +87,6 @@ namespace Wox
}
}
}
private void OnSelectPythonDirectoryClick(object sender, RoutedEventArgs e)
{
var dlg = new System.Windows.Forms.FolderBrowserDialog
{
SelectedPath = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles)
};
var result = dlg.ShowDialog();
if (result == System.Windows.Forms.DialogResult.OK)
{
string pythonDirectory = dlg.SelectedPath;
if (!string.IsNullOrEmpty(pythonDirectory))
{
var pythonPath = Path.Combine(pythonDirectory, PluginsLoader.PythonExecutable);
if (File.Exists(pythonPath))
{
_settings.PluginSettings.PythonDirectory = pythonDirectory;
MessageBox.Show("Remember to restart Wox use new Python path");
}
else
{
MessageBox.Show("Can't find python in given directory");
}
}
}
}
#endregion
#region Hotkey