Skip to content

Commit 672616e

Browse files
committed
Rename Variable & adjust window size
1 parent eac61fb commit 672616e

File tree

8 files changed

+15
-15
lines changed

8 files changed

+15
-15
lines changed

Plugins/Flow.Launcher.Plugin.BrowserBookmark/CustomChromiumBookmarkLoader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public class CustomChromiumBookmarkLoader : ChromiumBookmarkLoader
88
public CustomChromiumBookmarkLoader(CustomBrowser browser)
99
{
1010
BrowserName = browser.Name;
11-
BrowserDataPath = browser.Path;
11+
BrowserDataPath = browser.DataDirectoryPath;
1212
}
1313
public string BrowserDataPath { get; init; }
1414
public string BookmarkFilePath { get; init; }

Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public void Init(PluginInitContext context)
2626

2727
_settings = context.API.LoadSettingJsonStorage<Settings>();
2828

29-
cachedBookmarks = BookmarkLoader.LoadAllBookmarks();
29+
cachedBookmarks = BookmarkLoader.LoadAllBookmarks(_settings);
3030
}
3131

3232
public List<Result> Query(Query query)
@@ -93,7 +93,7 @@ public void ReloadData()
9393
{
9494
cachedBookmarks.Clear();
9595

96-
cachedBookmarks = BookmarkLoader.LoadAllBookmarks();
96+
cachedBookmarks = BookmarkLoader.LoadAllBookmarks(_settings);
9797
}
9898

9999
public string GetTranslatedPluginTitle()

Plugins/Flow.Launcher.Plugin.BrowserBookmark/Models/CustomBrowser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
public class CustomBrowser : BaseModel
44
{
55
public string Name { get; set; }
6-
public string Path { get; set; }
6+
public string DataDirectoryPath { get; set; }
77
}
88
}

Plugins/Flow.Launcher.Plugin.BrowserBookmark/Models/Settings.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ public class Settings : BaseModel
1515
new CustomBrowser
1616
{
1717
Name="awefawef",
18-
Path="awefawef"
18+
DataDirectoryPath="awefawef"
1919
},
2020
new CustomBrowser
2121
{
2222
Name = "awefawefawefawef",
23-
Path = "aweawefawfawef"
23+
DataDirectoryPath = "aweawefawfawef"
2424
}
2525
};
2626
}

Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/CustomBrowserSetting.xaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
66
xmlns:local="clr-namespace:Flow.Launcher.Plugin.BrowserBookmark.Models"
77
mc:Ignorable="d"
8-
Title="CustomBrowserSetting" Height="300" Width="400"
8+
Title="CustomBrowserSetting" Height="450" Width="600"
99
>
1010
<Window.DataContext>
1111
<local:CustomBrowser/>
@@ -22,11 +22,11 @@
2222
</Grid.ColumnDefinitions>
2323
<TextBlock Grid.Row="0" Grid.Column="0" Text="Browser Name" FontSize="15"
2424
HorizontalAlignment="Center" VerticalAlignment="Center"/>
25-
<TextBlock Grid.Row="1" Grid.Column="0" Text="Browser Path" FontSize="15"
25+
<TextBlock Grid.Row="1" Grid.Column="0" Text="Browser Data Directory Path" FontSize="15"
2626
HorizontalAlignment="Center" VerticalAlignment="Center"/>
2727
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding Name}"
2828
HorizontalAlignment="Center" VerticalAlignment="Center" Width="100" Height="30"/>
29-
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Path}"
29+
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding DataDirectoryPath}"
3030
HorizontalAlignment="Center" VerticalAlignment="Center" Width="200" Height="30"/>
3131
<StackPanel HorizontalAlignment="Right" Grid.Row="2" Orientation="Horizontal" Grid.Column="1" Height="60">
3232
<Button Content="Confirm" Margin="15" Click="ConfirmEditCustomBrowser"/>

Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/CustomBrowserSetting.xaml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public CustomBrowserSettingWindow(CustomBrowser browser)
2828
DataContext = new CustomBrowser
2929
{
3030
Name = browser.Name,
31-
Path = browser.Path
31+
DataDirectoryPath = browser.DataDirectoryPath
3232
};
3333
}
3434

@@ -37,7 +37,7 @@ private void ConfirmEditCustomBrowser(object sender, RoutedEventArgs e)
3737
if (DataContext is CustomBrowser editedBrowser)
3838
{
3939
currentCustomBrowser.Name = editedBrowser.Name;
40-
currentCustomBrowser.Path = editedBrowser.Path;
40+
currentCustomBrowser.DataDirectoryPath = editedBrowser.DataDirectoryPath;
4141
}
4242
Close();
4343
}

Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/SettingsControl.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
<ListView.View>
5757
<GridView>
5858
<GridViewColumn DisplayMemberBinding="{Binding Name}" Header="Browser Name"/>
59-
<GridViewColumn DisplayMemberBinding="{Binding Path}" Header="Path"/>
59+
<GridViewColumn DisplayMemberBinding="{Binding DataDirectoryPath}" Header="DataDirectoryPath"/>
6060
</GridView>
6161
</ListView.View>
6262
</ListView>

Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/SettingsControl.xaml.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,18 @@ private void NewCustomBrowser(object sender, RoutedEventArgs e)
5050
if (newBrowser is not
5151
{
5252
Name: null,
53-
Path: null
53+
DataDirectoryPath: null
5454
})
5555
{
56-
Settings.CustomBrowsers.Add(newBrowser);
56+
Settings.CustomChromiumBrowsers.Add(newBrowser);
5757
}
5858
}
5959

6060
private void DeleteCustomBrowser(object sender, RoutedEventArgs e)
6161
{
6262
if(CustomBrowsers.SelectedItem is CustomBrowser selectedCustomBrowser)
6363
{
64-
Settings.CustomBrowsers.Remove(selectedCustomBrowser);
64+
Settings.CustomChromiumBrowsers.Remove(selectedCustomBrowser);
6565
}
6666
}
6767
}

0 commit comments

Comments
 (0)