mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
fix new tab not save issue
This commit is contained in:
parent
af2277de61
commit
05fd41a104
3 changed files with 10 additions and 9 deletions
|
|
@ -18,6 +18,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
|
|||
{
|
||||
Name = Name,
|
||||
Path = Path,
|
||||
OpenInTab = OpenInTab,
|
||||
PrivateArg = PrivateArg,
|
||||
EnablePrivate = EnablePrivate,
|
||||
Editable = Editable
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@
|
|||
Margin="10,0,0,0"
|
||||
Click="btnDelete_Click"
|
||||
Content="{DynamicResource delete}"
|
||||
IsEnabled="{Binding CustomExplorer.Editable}" />
|
||||
IsEnabled="{Binding CustomBrowser.Editable}" />
|
||||
|
||||
</StackPanel>
|
||||
<Rectangle
|
||||
|
|
@ -117,7 +117,7 @@
|
|||
<StackPanel
|
||||
Margin="0,0,0,0"
|
||||
HorizontalAlignment="Stretch"
|
||||
DataContext="{Binding CustomExplorer}"
|
||||
DataContext="{Binding CustomBrowser}"
|
||||
Orientation="Horizontal">
|
||||
<Grid Width="480">
|
||||
<Grid.ColumnDefinitions>
|
||||
|
|
@ -197,7 +197,7 @@
|
|||
VerticalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<RadioButton GroupName="browser" IsChecked="{Binding OpenInTab}">New Tab</RadioButton>
|
||||
<RadioButton GroupName="browser" IsChecked="{Binding OpenInNewWindow, Mode=OneWay}">New Window</RadioButton>
|
||||
<RadioButton GroupName="browser" IsChecked="{Binding OpenInNewWindow, Mode=OneTime}">New Window</RadioButton>
|
||||
</StackPanel>
|
||||
<TextBlock
|
||||
Grid.Row="3"
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ namespace Flow.Launcher
|
|||
{
|
||||
public partial class SelectBrowserWindow : Window, INotifyPropertyChanged
|
||||
{
|
||||
private int selectedCustomExplorerIndex;
|
||||
private int selectedCustomBrowserIndex;
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
|
|
@ -28,15 +28,15 @@ namespace Flow.Launcher
|
|||
|
||||
public int SelectedCustomBrowserIndex
|
||||
{
|
||||
get => selectedCustomExplorerIndex; set
|
||||
get => selectedCustomBrowserIndex; set
|
||||
{
|
||||
selectedCustomExplorerIndex = value;
|
||||
PropertyChanged?.Invoke(this, new(nameof(CustomExplorer)));
|
||||
selectedCustomBrowserIndex = value;
|
||||
PropertyChanged?.Invoke(this, new(nameof(CustomBrowser)));
|
||||
}
|
||||
}
|
||||
public ObservableCollection<CustomBrowserViewModel> CustomBrowsers { get; set; }
|
||||
|
||||
public CustomBrowserViewModel CustomExplorer => CustomBrowsers[SelectedCustomBrowserIndex];
|
||||
public CustomBrowserViewModel CustomBrowser => CustomBrowsers[SelectedCustomBrowserIndex];
|
||||
public SelectBrowserWindow(Settings settings)
|
||||
{
|
||||
Settings = settings;
|
||||
|
|
@ -54,7 +54,7 @@ namespace Flow.Launcher
|
|||
{
|
||||
Settings.CustomBrowserList = CustomBrowsers.ToList();
|
||||
Settings.CustomBrowserIndex = SelectedCustomBrowserIndex;
|
||||
Close();
|
||||
Cl ose();
|
||||
}
|
||||
|
||||
private void btnAdd_Click(object sender, RoutedEventArgs e)
|
||||
|
|
|
|||
Loading…
Reference in a new issue