Merge branch 'GlobalBrowserSetting' of https://github.com/onesounds/Flow.Launcher into GlobalBrowserSetting

This commit is contained in:
DB p 2021-12-07 19:22:29 +09:00
commit d2e689a51a
8 changed files with 7 additions and 93 deletions

View file

@ -1,19 +1,16 @@
using Microsoft.Win32;
using System.Windows; using System.Windows;
using System.Windows.Controls;
using Flow.Launcher.Plugin.BrowserBookmark.Models; using Flow.Launcher.Plugin.BrowserBookmark.Models;
using System.Windows.Input; using System.Windows.Input;
using System.ComponentModel; using System.ComponentModel;
namespace Flow.Launcher.Plugin.BrowserBookmark.Views namespace Flow.Launcher.Plugin.BrowserBookmark.Views
{ {
/// <summary>
/// Interaction logic for BrowserBookmark.xaml
/// </summary>
public partial class SettingsControl : INotifyPropertyChanged public partial class SettingsControl : INotifyPropertyChanged
{ {
public Settings Settings { get; } public Settings Settings { get; }
public CustomBrowser SelectedCustomBrowser { get; set; } public CustomBrowser SelectedCustomBrowser { get; set; }
public bool OpenInNewBrowserWindow public bool OpenInNewBrowserWindow
{ {
get => Settings.OpenInNewBrowserWindow; get => Settings.OpenInNewBrowserWindow;
@ -23,10 +20,6 @@ namespace Flow.Launcher.Plugin.BrowserBookmark.Views
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(OpenInNewBrowserWindow))); PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(OpenInNewBrowserWindow)));
} }
} }
public bool OpenInNewTab
{
get => !OpenInNewBrowserWindow;
}
public SettingsControl(Settings settings) public SettingsControl(Settings settings)
{ {
@ -36,18 +29,6 @@ namespace Flow.Launcher.Plugin.BrowserBookmark.Views
public event PropertyChangedEventHandler PropertyChanged; public event PropertyChangedEventHandler PropertyChanged;
private void OnChooseClick(object sender, RoutedEventArgs e)
{
var fileBrowserDialog = new OpenFileDialog();
fileBrowserDialog.Filter = "Application(*.exe)|*.exe|All files|*.*";
fileBrowserDialog.CheckFileExists = true;
fileBrowserDialog.CheckPathExists = true;
if (fileBrowserDialog.ShowDialog() == true)
{
Settings.BrowserPath = fileBrowserDialog.FileName;
}
}
private void NewCustomBrowser(object sender, RoutedEventArgs e) private void NewCustomBrowser(object sender, RoutedEventArgs e)
{ {
var newBrowser = new CustomBrowser(); var newBrowser = new CustomBrowser();

View file

@ -4,7 +4,7 @@
"Name": "Browser Bookmarks", "Name": "Browser Bookmarks",
"Description": "Search your browser bookmarks", "Description": "Search your browser bookmarks",
"Author": "qianlifeng, Ioannis G.", "Author": "qianlifeng, Ioannis G.",
"Version": "1.5.3", "Version": "1.6.0",
"Language": "csharp", "Language": "csharp",
"Website": "https://github.com/Flow-Launcher/Flow.Launcher", "Website": "https://github.com/Flow-Launcher/Flow.Launcher",
"ExecuteFileName": "Flow.Launcher.Plugin.BrowserBookmark.dll", "ExecuteFileName": "Flow.Launcher.Plugin.BrowserBookmark.dll",

View file

@ -6,7 +6,7 @@
"Name": "Plugins Manager", "Name": "Plugins Manager",
"Description": "Management of installing, uninstalling or updating Flow Launcher plugins", "Description": "Management of installing, uninstalling or updating Flow Launcher plugins",
"Author": "Jeremy Wu", "Author": "Jeremy Wu",
"Version": "1.10.0", "Version": "1.11.0",
"Language": "csharp", "Language": "csharp",
"Website": "https://github.com/Flow-Launcher/Flow.Launcher", "Website": "https://github.com/Flow-Launcher/Flow.Launcher",
"ExecuteFileName": "Flow.Launcher.Plugin.PluginsManager.dll", "ExecuteFileName": "Flow.Launcher.Plugin.PluginsManager.dll",

View file

@ -4,7 +4,7 @@
"Name": "System Commands", "Name": "System Commands",
"Description": "Provide System related commands. e.g. shutdown,lock, setting etc.", "Description": "Provide System related commands. e.g. shutdown,lock, setting etc.",
"Author": "qianlifeng", "Author": "qianlifeng",
"Version": "1.5.1", "Version": "1.6.0",
"Language": "csharp", "Language": "csharp",
"Website": "https://github.com/Flow-Launcher/Flow.Launcher", "Website": "https://github.com/Flow-Launcher/Flow.Launcher",
"ExecuteFileName": "Flow.Launcher.Plugin.Sys.dll", "ExecuteFileName": "Flow.Launcher.Plugin.Sys.dll",

View file

@ -1,25 +1,10 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Microsoft.Win32;
namespace Flow.Launcher.Plugin.Url namespace Flow.Launcher.Plugin.Url
{ {
/// <summary>
/// SettingsControl.xaml 的交互逻辑
/// </summary>
public partial class SettingsControl : UserControl public partial class SettingsControl : UserControl
{ {
private Settings _settings; private Settings _settings;
@ -32,31 +17,5 @@ namespace Flow.Launcher.Plugin.Url
_flowlauncherAPI = flowlauncherAPI; _flowlauncherAPI = flowlauncherAPI;
} }
private void OnChooseClick(object sender, RoutedEventArgs e)
{
var fileBrowserDialog = new OpenFileDialog();
fileBrowserDialog.Filter = _flowlauncherAPI.GetTranslation("flowlauncher_plugin_url_plugin_filter"); ;
fileBrowserDialog.CheckFileExists = true;
fileBrowserDialog.CheckPathExists = true;
if (fileBrowserDialog.ShowDialog() == true)
{
_settings.BrowserPath = fileBrowserDialog.FileName;
}
}
private void OnNewBrowserWindowClick(object sender, RoutedEventArgs e)
{
_settings.OpenInNewBrowserWindow = true;
}
private void OnNewTabClick(object sender, RoutedEventArgs e)
{
_settings.OpenInNewBrowserWindow = false;
}
private void OnBrowserPathTextChanged(object sender, TextChangedEventArgs e)
{
}
} }
} }

View file

@ -4,7 +4,7 @@
"Name": "URL", "Name": "URL",
"Description": "Open the typed URL from Flow Launcher", "Description": "Open the typed URL from Flow Launcher",
"Author": "qianlifeng", "Author": "qianlifeng",
"Version": "1.1.7", "Version": "1.2.0",
"Language": "csharp", "Language": "csharp",
"Website": "https://github.com/Flow-Launcher/Flow.Launcher", "Website": "https://github.com/Flow-Launcher/Flow.Launcher",
"ExecuteFileName": "Flow.Launcher.Plugin.Url.dll", "ExecuteFileName": "Flow.Launcher.Plugin.Url.dll",

View file

@ -61,32 +61,6 @@ namespace Flow.Launcher.Plugin.WebSearch
} }
} }
private void OnNewBrowserWindowClick(object sender, RoutedEventArgs e)
{
_settings.OpenInNewBrowser = true;
}
private void OnNewTabClick(object sender, RoutedEventArgs e)
{
_settings.OpenInNewBrowser = false;
}
private void OnChooseClick(object sender, RoutedEventArgs e)
{
var fileBrowserDialog = new OpenFileDialog();
fileBrowserDialog.Filter = "Application(*.exe)|*.exe|All files|*.*";
fileBrowserDialog.CheckFileExists = true;
fileBrowserDialog.CheckPathExists = true;
if (fileBrowserDialog.ShowDialog() == true)
{
_settings.BrowserPath = fileBrowserDialog.FileName;
}
}
private void OnBrowserPathTextChanged(object sender, TextChangedEventArgs e)
{
}
GridViewColumnHeader _lastHeaderClicked = null; GridViewColumnHeader _lastHeaderClicked = null;
ListSortDirection _lastDirection = ListSortDirection.Ascending; ListSortDirection _lastDirection = ListSortDirection.Ascending;

View file

@ -26,7 +26,7 @@
"Name": "Web Searches", "Name": "Web Searches",
"Description": "Provide the web search ability", "Description": "Provide the web search ability",
"Author": "qianlifeng", "Author": "qianlifeng",
"Version": "1.4.1", "Version": "1.5.0",
"Language": "csharp", "Language": "csharp",
"Website": "https://github.com/Flow-Launcher/Flow.Launcher", "Website": "https://github.com/Flow-Launcher/Flow.Launcher",
"ExecuteFileName": "Flow.Launcher.Plugin.WebSearch.dll", "ExecuteFileName": "Flow.Launcher.Plugin.WebSearch.dll",