diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj
index c42378a9a..253a53f1e 100644
--- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj
+++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj
@@ -64,14 +64,16 @@
+
+
+ ..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.Windows.Forms.dll
+
+
+
-
-
+
+
diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/en.xaml b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/en.xaml
index 5dbe925c1..427b538ff 100644
--- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/en.xaml
+++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/en.xaml
@@ -20,7 +20,12 @@
Browser Name
Data Directory Path
Add
+ Edit
Delete
+ Browse
Others
Browser Engine
+ If you are using a special browser such as Brave or Librewolf, or a portable version, you must add the bookmarks data directory (not file) and engine type in order for this plugin to work.
+ For example: Brave's engine is Chromium; and its default bookmark data location is: "C:\Users\username\AppData\Local\BraveSoftware\Brave-Browser\UserData".
+ After changing these values, close all setting windows and press F5 when Flow Launcher is open to reload the plug-in.
\ No newline at end of file
diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/CustomBrowserSetting.xaml b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/CustomBrowserSetting.xaml
index 499d22834..a8ecb54f9 100644
--- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/CustomBrowserSetting.xaml
+++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/CustomBrowserSetting.xaml
@@ -7,7 +7,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="clr-namespace:Flow.Launcher.Infrastructure.UI;assembly=Flow.Launcher.Infrastructure"
Title="{DynamicResource flowlauncher_plugin_browserbookmark_bookmarkDataSetting}"
- Width="520"
+ Width="550"
Background="{DynamicResource PopuBGColor}"
Foreground="{DynamicResource PopupTextColor}"
KeyDown="WindowKeyDown"
@@ -71,8 +71,8 @@
TextAlignment="Left" />
-
-
+
+
@@ -81,17 +81,45 @@
+
-
+
+
+
+
+
-
+ SelectedItem="{Binding BrowserType}" />
-
+ LastChildFill="True">
+
+
+
diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/CustomBrowserSetting.xaml.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/CustomBrowserSetting.xaml.cs
index 392d4695a..0ac219962 100644
--- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/CustomBrowserSetting.xaml.cs
+++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/CustomBrowserSetting.xaml.cs
@@ -1,7 +1,10 @@
using Flow.Launcher.Plugin.BrowserBookmark.Models;
+using Microsoft.Win32;
+using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
+using System.Windows.Forms;
namespace Flow.Launcher.Plugin.BrowserBookmark.Views
{
@@ -25,7 +28,7 @@ namespace Flow.Launcher.Plugin.BrowserBookmark.Views
private void ConfirmCancelEditCustomBrowser(object sender, RoutedEventArgs e)
{
- if (DataContext is CustomBrowser editBrowser && e.Source is Button button)
+ if (DataContext is CustomBrowser editBrowser && e.Source is System.Windows.Controls.Button button)
{
if (button.Name == "btnConfirm")
{
@@ -39,12 +42,20 @@ namespace Flow.Launcher.Plugin.BrowserBookmark.Views
Close();
}
- private void WindowKeyDown(object sender, KeyEventArgs e)
+ private void WindowKeyDown(object sender, System.Windows.Input.KeyEventArgs e)
{
if (e.Key == Key.Enter)
{
ConfirmCancelEditCustomBrowser(sender, e);
}
}
+
+ private void OnSelectPathClick(object sender, RoutedEventArgs e)
+ {
+ var dialog = new FolderBrowserDialog();
+ dialog.ShowDialog();
+ PathTextBox.Text = dialog.SelectedPath;
+ string folder = dialog.SelectedPath;
+ }
}
}
diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/SettingsControl.xaml b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/SettingsControl.xaml
index 628a9417b..408256f45 100644
--- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/SettingsControl.xaml
+++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/SettingsControl.xaml
@@ -1,67 +1,83 @@
+ x:Class="Flow.Launcher.Plugin.BrowserBookmark.Views.SettingsControl"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ 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"
+ d:DesignHeight="300"
+ d:DesignWidth="500"
+ DataContext="{Binding RelativeSource={RelativeSource Self}}"
+ mc:Ignorable="d">
-
+
-
-
-
-
+
+
+
+
+ Margin="0,0,15,0"
+ Click="Others_Click"
+ Content="{DynamicResource flowlauncher_plugin_browserbookmark_others}" />
+ Name="CustomBrowsers"
+ Height="auto"
+ Margin="10"
+ BorderBrush="DarkGray"
+ BorderThickness="1"
+ ItemsSource="{Binding Settings.CustomChromiumBrowsers}"
+ MouseDoubleClick="MouseDoubleClickOnSelectedCustomBrowser"
+ SelectedItem="{Binding SelectedCustomBrowser}"
+ Style="{StaticResource {x:Static GridView.GridViewStyleKey}}">
-
-
-
+
+
+
+ MinWidth="130"
+ Margin="10"
+ Click="NewCustomBrowser"
+ Content="{DynamicResource flowlauncher_plugin_browserbookmark_addBrowserBookmark}" />
+ MinWidth="130"
+ Margin="10"
+ Click="EditCustomBrowser"
+ Content="{DynamicResource flowlauncher_plugin_browserbookmark_editBrowserBookmark}">
+
+
+
+
+
diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/SettingsControl.xaml.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/SettingsControl.xaml.cs
index e67c73923..479d0c7bb 100644
--- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/SettingsControl.xaml.cs
+++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/SettingsControl.xaml.cs
@@ -70,5 +70,14 @@ namespace Flow.Launcher.Plugin.BrowserBookmark.Views
else
CustomBrowsersList.Visibility = Visibility.Collapsed;
}
+
+ private void EditCustomBrowser(object sender, RoutedEventArgs e)
+ {
+ if (SelectedCustomBrowser is null)
+ return;
+
+ var window = new CustomBrowserSettingWindow(SelectedCustomBrowser);
+ window.ShowDialog();
+ }
}
}