Skip to content

Commit 309006e

Browse files
committed
Align setting control and allow localization and version bump
1 parent e5e8c48 commit 309006e

File tree

5 files changed

+17
-25
lines changed

5 files changed

+17
-25
lines changed

Plugins/Flow.Launcher.Plugin.BrowserBookmark/Commands/BookmarkLoader.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ internal static List<Bookmark> LoadAllBookmarks(Settings setting)
2626

2727
var allBookmarks = new List<Bookmark>();
2828

29-
//TODO: Let the user select which browser's bookmarks are displayed
3029
// Add Firefox bookmarks
3130
allBookmarks.AddRange(mozBookmarks.GetBookmarks());
3231

Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/en.xaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,9 @@
1414
<system:String x:Key="flowlauncher_plugin_browserbookmark_settings_choose">Choose</system:String>
1515
<system:String x:Key="flowlauncher_plugin_browserbookmark_copyurl_title">Copy url</system:String>
1616
<system:String x:Key="flowlauncher_plugin_browserbookmark_copyurl_subtitle">Copy the bookmark's url to clipboard</system:String>
17+
<system:String x:Key="flowlauncher_plugin_browserbookmark_loadBrowserFrom">Load Browser From:</system:String>
18+
<system:String x:Key="flowlauncher_plugin_browserbookmark_browserName">Browser Name</system:String>
19+
<system:String x:Key="flowlauncher_plugin_browserbookmark_browserBookmarkDataDirectory">DataDirectoryPath</system:String>
20+
<system:String x:Key="flowlauncher_plugin_browserbookmark_addBrowserBookmark">Add Custom Browser Bookmark</system:String>
21+
<system:String x:Key="flowlauncher_plugin_browserbookmark_removeBrowserBookmark">Delete Custom Browser Bookmark</system:String>
1722
</ResourceDictionary>

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

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,6 @@ public class Settings : BaseModel
1010

1111
public string BrowserPath { get; set; }
1212

13-
public ObservableCollection<CustomBrowser> CustomChromiumBrowsers { get; set; } = new()
14-
{
15-
new CustomBrowser
16-
{
17-
Name="awefawef",
18-
DataDirectoryPath="awefawef"
19-
},
20-
new CustomBrowser
21-
{
22-
Name = "awefawefawefawef",
23-
DataDirectoryPath = "aweawefawfawef"
24-
}
25-
};
13+
public ObservableCollection<CustomBrowser> CustomChromiumBrowsers { get; set; } = new();
2614
}
2715
}

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,21 @@
77
Background="White"
88
d:DesignHeight="300" d:DesignWidth="500"
99
DataContext="{Binding RelativeSource={RelativeSource Self}}">
10-
<Grid>
10+
<Grid Margin="10">
1111
<Grid.RowDefinitions>
1212
<RowDefinition Height="50" />
1313
<RowDefinition Height="80"/>
1414
<RowDefinition Height="auto"/>
1515
</Grid.RowDefinitions>
1616
<StackPanel>
17-
<Grid Grid.Row="0" Margin="40 20 0 0">
17+
<Grid Grid.Row="0" Margin="30 20 0 0">
1818
<Grid.ColumnDefinitions>
1919
<ColumnDefinition Width="160" />
2020
<ColumnDefinition Width="140"/>
2121
<ColumnDefinition Width="100"/>
2222
</Grid.ColumnDefinitions>
2323
<Label Grid.Column="0" Content="{DynamicResource flowlauncher_plugin_browserbookmark_settings_openBookmarks}"
24-
FontSize="15" Margin="0 5 0 0"/>
24+
FontSize="15" Margin="10 5 0 0"/>
2525
<RadioButton Grid.Column="1" Name="NewWindowBrowser" GroupName="OpenSearchBehaviour"
2626
Content="{DynamicResource flowlauncher_plugin_browserbookmark_settings_newWindow}"
2727
Click="OnNewBrowserWindowClick" />
@@ -30,7 +30,7 @@
3030
Click="OnNewTabClick" />
3131
</Grid>
3232
</StackPanel>
33-
<StackPanel Orientation="Horizontal" VerticalAlignment="Top" Grid.Row="1" Height="60" Margin="25,13,0,0">
33+
<StackPanel Orientation="Horizontal" VerticalAlignment="Top" Grid.Row="1" Height="60" Margin="30,20,0,0">
3434
<Label Content="{DynamicResource flowlauncher_plugin_browserbookmark_settings_setBrowserFromPath}"
3535
Height="28" Margin="10"/>
3636
<TextBox x:Name="BrowserPathBox"
@@ -44,8 +44,8 @@
4444
<Button x:Name="ViewButton" Content="{DynamicResource flowlauncher_plugin_browserbookmark_settings_choose}"
4545
HorizontalAlignment="Left" Margin="10" Width="100" Height="30" Click="OnChooseClick" FontSize="14" />
4646
</StackPanel>
47-
<StackPanel Grid.Row="2" Orientation="Vertical">
48-
<TextBlock Text="CustomBrowsers" Margin="10"/>
47+
<StackPanel Grid.Row="2" Orientation="Vertical" Margin="30,20,0,0">
48+
<TextBlock Text="{DynamicResource flowlauncher_plugin_browserbookmark_loadBrowserFrom}" Margin="10"/>
4949
<ListView Grid.Row="2" ItemsSource="{Binding Settings.CustomChromiumBrowsers}"
5050
SelectedItem="{Binding SelectedCustomBrowser}"
5151
Margin="10"
@@ -57,14 +57,14 @@
5757
MouseDoubleClick="MouseDoubleClickOnSelectedCustomBrowser">
5858
<ListView.View>
5959
<GridView>
60-
<GridViewColumn DisplayMemberBinding="{Binding Name, Mode=OneWay}" Header="Browser Name"/>
61-
<GridViewColumn DisplayMemberBinding="{Binding DataDirectoryPath, Mode=OneWay}" Header="DataDirectoryPath"/>
60+
<GridViewColumn DisplayMemberBinding="{Binding Name, Mode=OneWay}" Header="{DynamicResource flowlauncher_plugin_browserbookmark_browserName}"/>
61+
<GridViewColumn DisplayMemberBinding="{Binding DataDirectoryPath, Mode=OneWay}" Header="{DynamicResource flowlauncher_plugin_browserbookmark_browserBookmarkDataDirectory}"/>
6262
</GridView>
6363
</ListView.View>
6464
</ListView>
6565
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
66-
<Button Content="Add Custom Browser" Margin="10" Click="NewCustomBrowser"/>
67-
<Button Content="Delete Custom Browser" Margin="10" Click="DeleteCustomBrowser"/>
66+
<Button Content="{DynamicResource flowlauncher_plugin_browserbookmark_addBrowserBookmark}" Margin="10" Click="NewCustomBrowser"/>
67+
<Button Content="{DynamicResource flowlauncher_plugin_browserbookmark_removeBrowserBookmark}" Margin="10" Click="DeleteCustomBrowser"/>
6868
</StackPanel>
6969
</StackPanel>
7070
</Grid>

Plugins/Flow.Launcher.Plugin.BrowserBookmark/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"Name": "Browser Bookmarks",
55
"Description": "Search your browser bookmarks",
66
"Author": "qianlifeng, Ioannis G.",
7-
"Version": "1.4.4",
7+
"Version": "1.5.0",
88
"Language": "csharp",
99
"Website": "https://github.com/Flow-Launcher/Flow.Launcher",
1010
"ExecuteFileName": "Flow.Launcher.Plugin.BrowserBookmark.dll",

0 commit comments

Comments
 (0)