mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Remove LocationConverter
This commit is contained in:
parent
7bc4cfb964
commit
7362bd26cf
3 changed files with 1 additions and 36 deletions
|
|
@ -1,33 +0,0 @@
|
|||
using System;
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Markup;
|
||||
|
||||
namespace Flow.Launcher.Plugin.Program
|
||||
{
|
||||
public class LocationConverter : MarkupExtension, IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
var text = value as string;
|
||||
if (string.IsNullOrEmpty(text))
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
return text;
|
||||
}
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
public override object ProvideValue(IServiceProvider serviceProvider)
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -101,7 +101,6 @@ namespace Flow.Launcher.Plugin.Program.ViewModels
|
|||
|
||||
public (bool, string) UpdateProgramSource()
|
||||
{
|
||||
// Separate checks to avoid changing UniqueIdentifier of UWP when changing Enabled
|
||||
if (LocationModified)
|
||||
{
|
||||
if (!Directory.Exists(Location))
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:program="clr-namespace:Flow.Launcher.Plugin.Program"
|
||||
Height="520"
|
||||
DataContext="{Binding RelativeSource={RelativeSource Self}}"
|
||||
mc:Ignorable="d">
|
||||
|
|
@ -172,7 +171,7 @@
|
|||
<GridViewColumn Width="550" Header="{DynamicResource flowlauncher_plugin_program_location}">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Location, ConverterParameter=(null), Converter={program:LocationConverter}}" />
|
||||
<TextBlock Text="{Binding Location}" />
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
|
|
|||
Loading…
Reference in a new issue