diff --git a/.github/workflows/winget.yml b/.github/workflows/winget.yml index fe1b5a5fc5c..b1d2890910e 100644 --- a/.github/workflows/winget.yml +++ b/.github/workflows/winget.yml @@ -9,7 +9,7 @@ jobs: # Action can only be run on windows runs-on: windows-latest steps: - - uses: vedantmgoyal2009/winget-releaser@v1 + - uses: vedantmgoyal2009/winget-releaser@v2 with: identifier: Flow-Launcher.Flow-Launcher token: ${{ secrets.WINGET_TOKEN }} diff --git a/Flow.Launcher.Core/Flow.Launcher.Core.csproj b/Flow.Launcher.Core/Flow.Launcher.Core.csproj index 10799264781..4077320bcf3 100644 --- a/Flow.Launcher.Core/Flow.Launcher.Core.csproj +++ b/Flow.Launcher.Core/Flow.Launcher.Core.csproj @@ -54,8 +54,8 @@ - - + + diff --git a/Flow.Launcher.Infrastructure/Hotkey/HotkeyModel.cs b/Flow.Launcher.Infrastructure/Hotkey/HotkeyModel.cs index b92bc020724..93705943651 100644 --- a/Flow.Launcher.Infrastructure/Hotkey/HotkeyModel.cs +++ b/Flow.Launcher.Infrastructure/Hotkey/HotkeyModel.cs @@ -1,8 +1,8 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; using System.Windows.Input; -using System.Windows.Navigation; namespace Flow.Launcher.Infrastructure.Hotkey { @@ -99,7 +99,7 @@ private void Parse(string hotkeyString) { try { - CharKey = (Key) Enum.Parse(typeof (Key), charKey); + CharKey = (Key)Enum.Parse(typeof(Key), charKey); } catch (ArgumentException) { @@ -137,8 +137,13 @@ public override string ToString() } return string.Join(" + ", keys); } - - public bool Validate() + + /// + /// Validate hotkey + /// + /// Try to validate hotkey as a KeyGesture. + /// + public bool Validate(bool validateKeyGestrue = false) { switch (CharKey) { @@ -150,21 +155,57 @@ public bool Validate() case Key.RightShift: case Key.LWin: case Key.RWin: + case Key.None: return false; default: + if (validateKeyGestrue) + { + try + { + KeyGesture keyGesture = new KeyGesture(CharKey, ModifierKeys); + } + catch (System.Exception e) when (e is NotSupportedException || e is InvalidEnumArgumentException) + { + return false; + } + } if (ModifierKeys == ModifierKeys.None) { - return !((CharKey >= Key.A && CharKey <= Key.Z) || - (CharKey >= Key.D0 && CharKey <= Key.D9) || - (CharKey >= Key.NumPad0 && CharKey <= Key.NumPad9)); + return !IsPrintableCharacter(CharKey); } else { - return CharKey != Key.None; + return true; } } } + private static bool IsPrintableCharacter(Key key) + { + // https://stackoverflow.com/questions/11881199/identify-if-a-event-key-is-text-not-only-alphanumeric + return (key >= Key.A && key <= Key.Z) || + (key >= Key.D0 && key <= Key.D9) || + (key >= Key.NumPad0 && key <= Key.NumPad9) || + key == Key.OemQuestion || + key == Key.OemQuotes || + key == Key.OemPlus || + key == Key.OemOpenBrackets || + key == Key.OemCloseBrackets || + key == Key.OemMinus || + key == Key.DeadCharProcessed || + key == Key.Oem1 || + key == Key.Oem7 || + key == Key.OemPeriod || + key == Key.OemComma || + key == Key.OemMinus || + key == Key.Add || + key == Key.Divide || + key == Key.Multiply || + key == Key.Subtract || + key == Key.Oem102 || + key == Key.Decimal; + } + public override bool Equals(object obj) { if (obj is HotkeyModel other) diff --git a/Flow.Launcher/HotkeyControl.xaml.cs b/Flow.Launcher/HotkeyControl.xaml.cs index b71df97588c..3da66caeb01 100644 --- a/Flow.Launcher/HotkeyControl.xaml.cs +++ b/Flow.Launcher/HotkeyControl.xaml.cs @@ -19,6 +19,11 @@ public partial class HotkeyControl : UserControl public event EventHandler HotkeyChanged; + /// + /// Designed for Preview Hotkey and KeyGesture. + /// + public bool ValidateKeyGesture { get; set; } = false; + protected virtual void OnHotkeyChanged() => HotkeyChanged?.Invoke(this, EventArgs.Empty); public HotkeyControl() @@ -68,7 +73,7 @@ public async Task SetHotkeyAsync(HotkeyModel keyModel, bool triggerValidate = tr if (triggerValidate) { - bool hotkeyAvailable = CheckHotkeyAvailability(keyModel); + bool hotkeyAvailable = CheckHotkeyAvailability(keyModel, ValidateKeyGesture); CurrentHotkeyAvailable = hotkeyAvailable; SetMessage(hotkeyAvailable); OnHotkeyChanged(); @@ -91,13 +96,13 @@ public async Task SetHotkeyAsync(HotkeyModel keyModel, bool triggerValidate = tr CurrentHotkey = keyModel; } } - + public Task SetHotkeyAsync(string keyStr, bool triggerValidate = true) { return SetHotkeyAsync(new HotkeyModel(keyStr), triggerValidate); } - private static bool CheckHotkeyAvailability(HotkeyModel hotkey) => hotkey.Validate() && HotKeyMapper.CheckAvailability(hotkey); + private static bool CheckHotkeyAvailability(HotkeyModel hotkey, bool validateKeyGesture) => hotkey.Validate(validateKeyGesture) && HotKeyMapper.CheckAvailability(hotkey); public new bool IsFocused => tbHotkey.IsFocused; diff --git a/Flow.Launcher/Languages/da.xaml b/Flow.Launcher/Languages/da.xaml index f8db8420d28..c6dfed1f3ef 100644 --- a/Flow.Launcher/Languages/da.xaml +++ b/Flow.Launcher/Languages/da.xaml @@ -1,5 +1,8 @@ - - + + Kunne ikke registrere genvejstast: {0} Kunne ikke starte {0} @@ -80,6 +83,7 @@ No results found Please try a different search. Plugin + Plugins Find flere plugins On Deaktiver @@ -120,6 +124,7 @@ Tema + Appearance Søg efter flere temaer How to create a theme Hi There @@ -152,6 +157,7 @@ Genvejstast + Genvejstast Flow Launcher genvejstast Enter shortcut to show/hide Flow Launcher. Preview Hotkey @@ -174,6 +180,7 @@ Er du sikker på du vil slette {0} plugin genvejstast? Are you sure you want to delete shortcut: {0} with expansion {1}? Get text from clipboard. + Get path from active explorer. Query window shadow effect Shadow effect has a substantial usage of GPU. Not recommended if your computer performance is limited. Window Width Size diff --git a/Flow.Launcher/Languages/de.xaml b/Flow.Launcher/Languages/de.xaml index 09b800f71b0..5f9aee2138c 100644 --- a/Flow.Launcher/Languages/de.xaml +++ b/Flow.Launcher/Languages/de.xaml @@ -80,6 +80,7 @@ No results found Please try a different search. Erweiterung + Erweiterung Suche nach weiteren Plugins Aktivieren Deaktivieren @@ -120,6 +121,7 @@ Design + Appearance Suche nach weiteren Themes Wie man ein Design erstellt Hallo! @@ -152,6 +154,7 @@ Tastenkombination + Tastenkombination Flow Launcher Tastenkombination Verknüpfung eingeben, um Flow Launcher anzuzeigen/auszublenden. Preview Hotkey @@ -174,6 +177,7 @@ Wollen Sie die {0} Plugin Tastenkombination wirklich löschen? Are you sure you want to delete shortcut: {0} with expansion {1}? Get text from clipboard. + Get path from active explorer. Query window shadow effect Shadow effect has a substantial usage of GPU. Not recommended if your computer performance is limited. Window Width Size diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index 49c603dc851..9e86d930555 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -82,6 +82,7 @@ No results found Please try a different search. Plugin + Plugins Find more plugins On Off @@ -122,6 +123,7 @@ Theme + Appearance Theme Gallery How to create a theme Hi There @@ -154,6 +156,7 @@ Hotkey + Hotkeys Flow Launcher Hotkey Enter shortcut to show/hide Flow Launcher. Preview Hotkey @@ -162,9 +165,9 @@ Select a modifier key to open selected result via keyboard. Show Hotkey Show result selection hotkey with results. - Custom Query Hotkey - Custom Query Shortcut - Built-in Shortcut + Custom Query Hotkeys + Custom Query Shortcuts + Built-in Shortcuts Query Shortcut Expansion diff --git a/Flow.Launcher/Languages/es-419.xaml b/Flow.Launcher/Languages/es-419.xaml index 85da4404561..ab3a09a7340 100644 --- a/Flow.Launcher/Languages/es-419.xaml +++ b/Flow.Launcher/Languages/es-419.xaml @@ -1,4 +1,4 @@ - + Error al registrar la tecla de acceso directo: {0} @@ -80,6 +80,7 @@ No results found Please try a different search. Plugin + Plugins Encontrar más plugins Activado Desactivado @@ -120,6 +121,7 @@ Tema + Appearance Galería de Temas Cómo crear un tema Hola @@ -152,6 +154,7 @@ Tecla Rápida + Tecla Rápida Tecla de acceso a Flow Launcher Introduzca el acceso directo para mostrar/ocultar Flow Launcher. Preview Hotkey @@ -174,6 +177,7 @@ ¿Está seguro que desea eliminar la tecla de acceso directo del plugin {0}? Are you sure you want to delete shortcut: {0} with expansion {1}? Get text from clipboard. + Get path from active explorer. Efecto de sombra de ventana de búsqueda El efecto sombra tiene un uso sustancial de GPU. No se recomienda si el rendimiento de su computadora es limitado. Tamaño de Ancho de Ventana diff --git a/Flow.Launcher/Languages/es.xaml b/Flow.Launcher/Languages/es.xaml index aa28743990f..e28a7605b6c 100644 --- a/Flow.Launcher/Languages/es.xaml +++ b/Flow.Launcher/Languages/es.xaml @@ -80,6 +80,7 @@ No se han encontrado resultados Por favor, intente una búsqueda diferente. Complementos + Complementos Buscar más complementos Activado Desactivado @@ -120,6 +121,7 @@ Tema + Apariencia Galería de temas Cómo crear un tema Hola @@ -152,6 +154,7 @@ Atajos de teclado + Atajos de teclado Atajo de teclado de Flow Launcher Introduzca el atajo de teclado para mostrar/ocultar Flow Launcher. Atajo de teclado para vista previa @@ -160,8 +163,8 @@ Seleccione una tecla modificadora para abrir el resultado seleccionado con el teclado. Mostrar atajo de teclado Muestra atajo de teclado de selección junto a los resultados. - Atajo de teclado de consulta personalizada - Acceso directo de consulta personalizada + Atajos de teclado de consulta personalizada + Accesos directos de consulta personalizada Accesos directos integrados Consulta Acceso directo @@ -174,6 +177,7 @@ ¿Está seguro que desea eliminar el atajo de teclado de consulta personalizada {0}? ¿Está seguro que desea eliminar el acceso directo: {0} con la expansión {1}? Obtiene el texto del portapapeles. + Obtiene la ruta del explorador activo. Efecto de sombra de la ventana de consultas El efecto de sombra hace un uso sustancial de la GPU. No se recomienda para ordenadores de rendimiento limitado. Tamaño del ancho de la ventana @@ -245,7 +249,7 @@ Cambiar la prioridad - A mayor número, más alto aparecerá el resultado. Inténtelo con 5. Si quiere que los resultados aparezcan más abajo que los de cualquier otro complemento, utilice un número negativo + Cuanto mayor sea el número, más arriba se situará el resultado. Inténtelo con 5. Si desea que los resultados se situén más abajo que los de cualquier otro complemento, utilice un número negativo ¡Por favor, proporcione un número entero válido para la prioridad! diff --git a/Flow.Launcher/Languages/fr.xaml b/Flow.Launcher/Languages/fr.xaml index c700ecaadbd..9c52f52d66f 100644 --- a/Flow.Launcher/Languages/fr.xaml +++ b/Flow.Launcher/Languages/fr.xaml @@ -52,9 +52,9 @@ Ignore les raccourcis lorsqu'une application est en plein écran Désactiver l'activation de Flow Launcher lorsqu'une application en plein écran est active (Recommandé pour les jeux). Gestionnaire de fichiers par défaut - Select the file manager to use when opening the folder. + Sélectionnez le gestionnaire de fichiers à utiliser lors de l'ouverture du dossier. Navigateur web par défaut - Setting for New Tab, New Window, Private Mode. + Réglage pour Nouvel onglet, Nouvelle fenêtre, Mode privé. Python Path Node.js Path Please select the Node.js executable @@ -66,13 +66,13 @@ Cacher Flow Launcher au démarrage Masquer icône du plateau When the icon is hidden from the tray, the Settings menu can be opened by right-clicking on the search window. - Query Search Precision - Changes minimum match score required for results. + Précision de la recherche + Modifie le score de correspondance minimum requis pour les résultats. Devrait utiliser le pinyin Allows using Pinyin to search. Pinyin is the standard system of romanized spelling for translating Chinese. Always Preview Always open preview panel when Flow activates. Press {0} to toggle preview. - Shadow effect is not allowed while current theme has blur effect enabled + L'effet d'ombre n'est pas autorisé lorsque le thème actuel à un effet de flou activé Search Plugin @@ -80,6 +80,7 @@ No results found Please try a different search. Plugin + Modules Trouver plus de modules On Désactivé @@ -88,27 +89,27 @@ Current action keyword New action keyword Change Action Keywords - Current Priority - New Priority - Priority + Priorité actuelle + Nouvelle priorité + Priorité Change Plugin Results Priority Répertoire - by + par Chargement : Utilisation : Version - Website + Site Web Désinstaller - Plugin Store + Magasin des Plugins New Release Recently Updated Modules Installed - Refresh - Install + Rafraîchir + Installer Désinstaller Actualiser Plugin already installed @@ -120,9 +121,10 @@ Thèmes + Appearance Trouver plus de thèmes - How to create a theme - Hi There + Comment créer un thème + Salut Explorer Search for files, folders and file contents WebSearch @@ -135,29 +137,30 @@ Police (liste des résultats) Mode fenêtré Opacité - Theme {0} not exists, fallback to default theme - Fail to load theme {0}, fallback to default theme - Theme Folder - Open Theme Folder - Color Scheme - System Default - Light - Dark - Sound Effect - Play a small sound when the search window opens + Le thème {0} n'existe pas, retour au thème par défaut + Impossible de charger le thème {0}, retour au thème par défaut + Dossier des thèmes + Ouvrir le dossier des thèmes + Mode visuelle + Suivre le système + Clair + Sombre + Effet Sonore + Jouer un petit son lorsque la fenêtre de recherche s'ouvre Animation - Use Animation in UI + Utiliser l'animation dans l'interface Clock Date Raccourcis + Raccourcis Ouvrir Flow Launcher - Enter shortcut to show/hide Flow Launcher. + Entrez le raccourci pour afficher/masquer Flow Launcher. Preview Hotkey Enter shortcut to show/hide preview in search window. Modificateurs de résultats ouverts - Select a modifier key to open selected result via keyboard. + Sélectionnez une touche de modification pour ouvrir le résultat sélectionné via le clavier. Afficher le raccourci clavier Show result selection hotkey with results. Requêtes personnalisées @@ -174,6 +177,7 @@ Voulez-vous vraiment supprimer {0} raccourci(s) ? Are you sure you want to delete shortcut: {0} with expansion {1}? Get text from clipboard. + Get path from active explorer. Query window shadow effect Shadow effect has a substantial usage of GPU. Not recommended if your computer performance is limited. Window Width Size @@ -200,7 +204,7 @@ À propos - Website + Site Web GitHub Docs Version @@ -233,10 +237,10 @@ Arg For File - Default Web Browser + Navigateur web par défaut The default setting follows the OS default browser setting. If specified separately, flow uses that browser. Navigateur - Browser Name + Nom du navigateur Browser Path New Window New Tab @@ -309,48 +313,48 @@ Une erreur s'est produite lors de l'installation de la mise à jour Actualiser Annuler - Update Failed - Check your connection and try updating proxy settings to github-cloud.s3.amazonaws.com. + La mise à jour a échoué + Vérifiez votre connexion et essayez de mettre à jour les paramètres du proxy vers github-cloud.s3.amazonaws.com. Flow Launcher doit redémarrer pour installer cette mise à jour Les fichiers suivants seront mis à jour Fichiers mis à jour Description de la mise à jour - Skip - Welcome to Flow Launcher - Hello, this is the first time you are running Flow Launcher! - Before starting, this wizard will assist in setting up Flow Launcher. You can skip this if you wish. Please choose a language - Search and run all files and applications on your PC - Search everything from applications, files, bookmarks, YouTube, Twitter and more. All from the comfort of your keyboard without ever touching the mouse. - Flow Launcher starts with the hotkey below, go ahead and try it out now. To change it, click on the input and press the desired hotkey on the keyboard. - Hotkeys + Passer + Bienvenue dans Flow Launcher + Bonjour, c'est la première fois que vous utilisez Flow Launcher ! + Avant de commencer, cet assistant vous aidera à configurer Flow Launcher. Vous pouvez sauter cela si vous le souhaitez. Veuillez choisir une langue + Recherchez et exécutez tous les fichiers et applications sur votre PC + Recherchez tout, depuis les applications, les fichiers, les signets, YouTube, Twitter et plus encore. Tout cela depuis le confort de votre clavier sans jamais toucher à la souris. + Flow Launcher commence avec le raccourci ci-dessous, allez-y et essayez maintenant. Pour le modifier, cliquez sur l'entrée et appuyez sur la touche de raccourci désirée du clavier. + Raccourcis claviers Action Keyword and Commands - Search the web, launch applications or run various functions through Flow Launcher plugins. Certain functions start with an action keyword, and if necessary, they can be used without action keywords. Try the queries below in Flow Launcher. - Let's Start Flow Launcher - Finished. Enjoy Flow Launcher. Don't forget the hotkey to start :) + Recherchez sur le web, lancez des applications ou exécutez diverses fonctions grâce aux plugins Flow Launcher. Certaines fonctions commencent par un mot clé d'action, et si nécessaire, elles peuvent être utilisées sans mots clés d'action. Essayez les requêtes ci-dessous dans Flow Launcher. + Démarrons Flow Launcher + Terminé. Profitez de Flow Launcher. N'oubliez pas le raccourci pour le démarrer :) - Back / Context Menu + Retour / Menu contextuel Item Navigation - Open Context Menu + Ouvrir le Menu Contextuel Open Containing Folder - Run as Admin - Query History - Back to Result in Context Menu - Autocomplete - Open / Run Selected Item - Open Setting Window - Reload Plugin Data + Exécuter en tant qu'Administrateur + Historique des Recherches + Retour au résultat dans le Menu Contextuel + Auto-complétion + Ouvrir/Exécuter l'Élément Sélectionné + Ouvrir la Fenêtre des Réglages + Recharger les Données des Plugins - Weather - Weather in Google Result + Météo + Météo dans les résultats Google > ping 8.8.8.8 Commande Shell s Bluetooth Bluetooth dans les Paramètres de Windows sn - Sticky Notes + Pense-bêtes diff --git a/Flow.Launcher/Languages/it.xaml b/Flow.Launcher/Languages/it.xaml index 8fc179093e1..2c33555fc9f 100644 --- a/Flow.Launcher/Languages/it.xaml +++ b/Flow.Launcher/Languages/it.xaml @@ -1,4 +1,4 @@ - + Impossibile salvare il tasto di scelta rapida: {0} @@ -80,6 +80,7 @@ No results found Please try a different search. Plugin + Plugins Cerca altri plugins Attivo Disabilita @@ -120,6 +121,7 @@ Tema + Appearance Sfoglia per altri temi Come creare un tema Ciao @@ -152,6 +154,7 @@ Tasti scelta rapida + Tasti scelta rapida Tasto scelta rapida Flow Launcher Immettere la scorciatoia per mostrare/nascondere Flow Launcher. Preview Hotkey @@ -174,6 +177,7 @@ Volete cancellare il tasto di scelta rapida per il plugin {0}? Are you sure you want to delete shortcut: {0} with expansion {1}? Get text from clipboard. + Get path from active explorer. Query window shadow effect Shadow effect has a substantial usage of GPU. Not recommended if your computer performance is limited. Window Width Size @@ -211,8 +215,8 @@ Una nuova versione {0} è disponibile, riavvia Flow Launcher per favore. Ricerca aggiornamenti fallita, per favore controlla la tua connessione e le eventuali impostazioni proxy per api.github.com. - Download degli aggiornamenti fallito, per favore controlla la tua connessione ed eventuali impostazioni proxy per github-cloud.s3.amazonaws.com, - oppure vai su https://github.com/Flow-Launcher/Flow.Launcher/releases per scaricare gli aggiornamenti manualmente. + Download degli aggiornamenti fallito, per favore controlla la tua connessione ed eventuali impostazioni proxy per github-cloud.s3.amazonaws.com, + oppure vai su https://github.com/Flow-Launcher/Flow.Launcher/releases per scaricare gli aggiornamenti manualmente. Note di rilascio Usage Tips diff --git a/Flow.Launcher/Languages/ja.xaml b/Flow.Launcher/Languages/ja.xaml index 20295f3e1f3..fd0431d7d35 100644 --- a/Flow.Launcher/Languages/ja.xaml +++ b/Flow.Launcher/Languages/ja.xaml @@ -80,6 +80,7 @@ No results found Please try a different search. Plugin + プラグイン プラグインを探す 有効 無効 @@ -120,6 +121,7 @@ テーマ + Appearance テーマを探す How to create a theme Hi There @@ -152,6 +154,7 @@ ホットキー + ホットキー Flow Launcher ホットキー Enter shortcut to show/hide Flow Launcher. Preview Hotkey @@ -174,6 +177,7 @@ {0} プラグインのホットキーを本当に削除しますか? Are you sure you want to delete shortcut: {0} with expansion {1}? Get text from clipboard. + Get path from active explorer. Query window shadow effect Shadow effect has a substantial usage of GPU. Not recommended if your computer performance is limited. Window Width Size diff --git a/Flow.Launcher/Languages/ko.xaml b/Flow.Launcher/Languages/ko.xaml index e69e29c8c7c..b9626b408d9 100644 --- a/Flow.Launcher/Languages/ko.xaml +++ b/Flow.Launcher/Languages/ko.xaml @@ -80,6 +80,7 @@ 검색 결과를 찾을 수 없습니다. 다른 검색어를 시도해주세요. 플러그인 + 플러그인 플러그인 더 찾아보기 @@ -120,6 +121,7 @@ 테마 + 외관 테마 갤러리 테마 제작 안내 안녕하세요! @@ -152,6 +154,7 @@ 단축키 + 단축키 Flow Launcher 단축키 Flow Launcher를 열 때 사용할 단축키를 입력하세요. 미리보기 단축키 @@ -174,6 +177,7 @@ {0} 플러그인 단축키를 삭제하시겠습니까? Are you sure you want to delete shortcut: {0} with expansion {1}? 클립보드에서 텍스트 가져오기 + Get path from active explorer. 그림자 효과 그림자 효과는 GPU를 사용합니다. 컴퓨터 퍼포먼스가 제한적인 경우 사용을 추천하지 않습니다. 창 넓이 diff --git a/Flow.Launcher/Languages/nb-NO.xaml b/Flow.Launcher/Languages/nb-NO.xaml index c8b1e4456b6..4391dc23a6d 100644 --- a/Flow.Launcher/Languages/nb-NO.xaml +++ b/Flow.Launcher/Languages/nb-NO.xaml @@ -1,7 +1,8 @@ - - + + Kunne ikke registrere hurtigtast: {0} Kunne ikke starte {0} Ugyldig filformat for Flow Launcher-utvidelse @@ -14,7 +15,7 @@ Om Avslutt - + Flow Launcher-innstillinger Generelt Start Flow Launcher ved systemstart @@ -32,8 +33,9 @@ Velg Skjul Flow Launcher ved oppstart - + Utvidelse + Utvidelse Finn flere utvidelser Deaktiver Handlingsnøkkelord @@ -42,16 +44,18 @@ Oppstartstid: Spørringstid: - + Tema + Appearance Finn flere temaer Font for spørringsboks Font for resultat Vindusmodus Gjennomsiktighet - + Hurtigtast + Hurtigtast Flow Launcher-hurtigtast Åpne resultatmodifiserere Egendefinerd spørringshurtigtast @@ -62,7 +66,7 @@ Vennligst velg et element Er du sikker på at du vil slette utvidelserhurtigtasten for {0}? - + HTTP-proxy Aktiver HTTP-proxy HTTP-server @@ -78,7 +82,7 @@ Proxy konfigurert riktig Proxy-tilkobling feilet - + Om Netside Versjon @@ -87,12 +91,12 @@ Ny versjon {0} er tilgjengelig, vennligst start Flow Launcher på nytt. Oppdateringssjekk feilet, vennligst sjekk tilkoblingen og proxy-innstillene for api.github.com. - Nedlastning av oppdateringer feilet, vennligst sjekk tilkoblingen og proxy-innstillene for github-cloud.s3.amazonaws.com, + Nedlastning av oppdateringer feilet, vennligst sjekk tilkoblingen og proxy-innstillene for github-cloud.s3.amazonaws.com, eller gå til https://github.com/Flow-Launcher/Flow.Launcher/releases for å laste ned oppdateringer manuelt. Versjonsmerknader: - + Gammelt handlingsnøkkelord Nytt handlingsnøkkelord Avbryt @@ -103,16 +107,16 @@ Vellykket Bruk * hvis du ikke ønsker å angi et handlingsnøkkelord - + Forhåndsvis Hurtigtasten er ikke tilgjengelig, vennligst velg en ny hurtigtast Ugyldig hurtigtast for utvidelse Oppdater - + Hurtigtast utilgjengelig - + Versjon Tid Fortell oss hvordan programmet krasjet, så vi kan fikse det @@ -128,7 +132,7 @@ Kunne ikke sende rapport Flow Launcher møtte på en feil - + Versjon {0} av Flow Launcher er nå tilgjengelig En feil oppstod under installasjon av programvareoppdateringer Oppdater diff --git a/Flow.Launcher/Languages/nb.xaml b/Flow.Launcher/Languages/nb.xaml index 629624f5ef9..125aa51129c 100644 --- a/Flow.Launcher/Languages/nb.xaml +++ b/Flow.Launcher/Languages/nb.xaml @@ -80,6 +80,7 @@ No results found Please try a different search. Plugin + Plugins Find more plugins On Off @@ -120,6 +121,7 @@ Theme + Appearance Theme Gallery How to create a theme Hi There @@ -152,6 +154,7 @@ Hotkey + Hotkeys Flow Launcher Hotkey Enter shortcut to show/hide Flow Launcher. Preview Hotkey @@ -174,6 +177,7 @@ Are you sure you want to delete {0} plugin hotkey? Are you sure you want to delete shortcut: {0} with expansion {1}? Get text from clipboard. + Get path from active explorer. Query window shadow effect Shadow effect has a substantial usage of GPU. Not recommended if your computer performance is limited. Window Width Size diff --git a/Flow.Launcher/Languages/nl.xaml b/Flow.Launcher/Languages/nl.xaml index 4b1c9bb84a8..a9525ad1383 100644 --- a/Flow.Launcher/Languages/nl.xaml +++ b/Flow.Launcher/Languages/nl.xaml @@ -1,4 +1,4 @@ - + Sneltoets registratie: {0} mislukt @@ -80,6 +80,7 @@ No results found Please try a different search. Plugin + Plugins Zoek meer plugins Aan Disable @@ -120,6 +121,7 @@ Thema + Appearance Zoek meer thema´s Hoe maak je een thema Hallo daar @@ -152,6 +154,7 @@ Sneltoets + Sneltoets Flow Launcher Sneltoets Voer snelkoppeling in om Flow Launcher te tonen/verbergen. Preview Hotkey @@ -174,6 +177,7 @@ Weet u zeker dat je {0} plugin sneltoets wilt verwijderen? Are you sure you want to delete shortcut: {0} with expansion {1}? Get text from clipboard. + Get path from active explorer. Query window shadow effect Shadow effect has a substantial usage of GPU. Not recommended if your computer performance is limited. Window Width Size diff --git a/Flow.Launcher/Languages/pl.xaml b/Flow.Launcher/Languages/pl.xaml index 2a9052ca3de..8ea9f121b62 100644 --- a/Flow.Launcher/Languages/pl.xaml +++ b/Flow.Launcher/Languages/pl.xaml @@ -80,6 +80,7 @@ No results found Please try a different search. Plugin + Wtyczki Znajdź więcej wtyczek On Wyłącz @@ -120,6 +121,7 @@ Skórka + Appearance Znajdź więcej skórek How to create a theme Hi There @@ -152,6 +154,7 @@ Skrót klawiszowy + Skrót klawiszowy Skrót klawiszowy Flow Launcher Enter shortcut to show/hide Flow Launcher. Preview Hotkey @@ -174,6 +177,7 @@ Czy jesteś pewien że chcesz usunąć skrót klawiszowy {0} wtyczki? Are you sure you want to delete shortcut: {0} with expansion {1}? Get text from clipboard. + Get path from active explorer. Query window shadow effect Shadow effect has a substantial usage of GPU. Not recommended if your computer performance is limited. Window Width Size diff --git a/Flow.Launcher/Languages/pt-br.xaml b/Flow.Launcher/Languages/pt-br.xaml index 496aea4f340..44c3016d77d 100644 --- a/Flow.Launcher/Languages/pt-br.xaml +++ b/Flow.Launcher/Languages/pt-br.xaml @@ -1,4 +1,4 @@ - + Falha ao registrar atalho: {0} @@ -80,6 +80,7 @@ No results found Please try a different search. Plugin + Plugins Encontrar mais plugins On Desabilitar @@ -120,6 +121,7 @@ Tema + Appearance Ver mais temas How to create a theme Hi There @@ -152,6 +154,7 @@ Atalho + Atalho Atalho do Flow Launcher Enter shortcut to show/hide Flow Launcher. Preview Hotkey @@ -174,6 +177,7 @@ Tem cereza de que deseja deletar o atalho {0} do plugin? Are you sure you want to delete shortcut: {0} with expansion {1}? Get text from clipboard. + Get path from active explorer. Query window shadow effect Shadow effect has a substantial usage of GPU. Not recommended if your computer performance is limited. Window Width Size diff --git a/Flow.Launcher/Languages/pt-pt.xaml b/Flow.Launcher/Languages/pt-pt.xaml index ed2760857b7..62380da72b5 100644 --- a/Flow.Launcher/Languages/pt-pt.xaml +++ b/Flow.Launcher/Languages/pt-pt.xaml @@ -80,6 +80,7 @@ Não existem resultados Experimente outro termo de pesquisa. Plugin + Plugins Mais plugins Ativo Inativo @@ -120,6 +121,7 @@ Tema + Aparência Galeria de temas Como criar um tema Olá @@ -152,6 +154,7 @@ Tecla de atalho + Teclas de atalho Tecla de atalho Flow Launcher Introduza o atalho para mostrar/ocultar Flow Launcher Preview Hotkey @@ -160,9 +163,9 @@ Selecione a tecla modificadora para abrir o resultado com o teclado Mostrar tecla de atalho Mostrar tecla de atalho perto dos resultados - Tecla de atalho personalizada - Atalho de consulta personalizada - Atalho nativo + Teclas de atalho personalizadas + Atalhos de consultas personalizadas + Atalhos nativos Consulta Atalho Expansão @@ -174,6 +177,7 @@ Tem a certeza de que deseja remover a tecla de atalho do plugin {0}? Tem a certeza de que deseja eliminar o atalho: {0} com expansão {1}? Obter texto da área de transferência. + Obter caminho a partir do explorador ativo. Efeito de sombra da janela Este efeito intensifica a utilização da GPU. Não deve ativar esta opção se o desempenho do seu computador for fraco. Largura da janela diff --git a/Flow.Launcher/Languages/ru.xaml b/Flow.Launcher/Languages/ru.xaml index 6369fec8a82..fbc867d22c1 100644 --- a/Flow.Launcher/Languages/ru.xaml +++ b/Flow.Launcher/Languages/ru.xaml @@ -80,6 +80,7 @@ No results found Please try a different search. Plugin + Плагины Найти больше плагинов On Отключить @@ -120,6 +121,7 @@ Тема + Appearance Найти больше тем How to create a theme Hi There @@ -152,6 +154,7 @@ Горячая клавиша + Горячая клавиша Горячая клавиша Flow Launcher Enter shortcut to show/hide Flow Launcher. Preview Hotkey @@ -174,6 +177,7 @@ Вы уверены что хотите удалить горячую клавишу для плагина {0}? Are you sure you want to delete shortcut: {0} with expansion {1}? Get text from clipboard. + Get path from active explorer. Query window shadow effect Shadow effect has a substantial usage of GPU. Not recommended if your computer performance is limited. Window Width Size diff --git a/Flow.Launcher/Languages/sk.xaml b/Flow.Launcher/Languages/sk.xaml index fc2df1e19f3..e1b4fb611b3 100644 --- a/Flow.Launcher/Languages/sk.xaml +++ b/Flow.Launcher/Languages/sk.xaml @@ -80,6 +80,7 @@ Nenašli sa žiadne výsledky Skúste použiť iné vyhľadávanie. Pluginy + Pluginy Nájsť ďalšie pluginy Zapnuté Vypnuté @@ -120,6 +121,7 @@ Motív + Vzhľad Galéria motívov Ako vytvoriť motív Ahojte @@ -152,6 +154,7 @@ Klávesové skratky + Klávesové skratky Klávesová skratka pre Flow Launcher Zadajte skratku na zobrazenie/skrytie Flow Launchera. Klávesová skratka pre náhľad @@ -160,8 +163,8 @@ Vyberte modifikačný kláves na otvorenie vybraného výsledku pomocou klávesnice. Zobraziť klávesovú skratku Zobrazí klávesovú skratku spolu s výsledkami. - Klávesová skratka vlastného vyhľadávania - Klávesová skratka vlastného dopytu + Klávesové skratky vlastného vyhľadávania + Klávesové skratky vlastného dopytu Vstavané skratky Dopyt Skratka @@ -174,6 +177,7 @@ Ste si istý, že chcete odstrániť klávesovú skratku {0} pre plugin? Naozaj chcete odstrániť skratku: {0} pre dopyt {1}? Kopírovať text do schránky. + Získať cestu z aktívneho Prieskumníka. Tieňový efekt v poli vyhľadávania Tieňový efekt významne využíva GPU. Neodporúča sa, ak je výkon počítača obmedzený. Šírka okna diff --git a/Flow.Launcher/Languages/sr.xaml b/Flow.Launcher/Languages/sr.xaml index d747f630b01..1ee7e1249d4 100644 --- a/Flow.Launcher/Languages/sr.xaml +++ b/Flow.Launcher/Languages/sr.xaml @@ -1,4 +1,4 @@ - + Neuspešno registrovana prečica: {0} @@ -80,6 +80,7 @@ No results found Please try a different search. Plugin + Plugins Nađi još plugin-a On Onemogući @@ -120,6 +121,7 @@ Tema + Appearance Pretražite još tema How to create a theme Hi There @@ -152,6 +154,7 @@ Prečica + Prečica Flow Launcher prečica Enter shortcut to show/hide Flow Launcher. Preview Hotkey @@ -174,6 +177,7 @@ Da li ste sigurni da želite da obrišete prečicu za {0} plugin? Are you sure you want to delete shortcut: {0} with expansion {1}? Get text from clipboard. + Get path from active explorer. Query window shadow effect Shadow effect has a substantial usage of GPU. Not recommended if your computer performance is limited. Window Width Size @@ -211,7 +215,7 @@ Nove verzija {0} je dostupna, molim Vas ponovo pokrenite Flow Launcher. Neuspešna provera ažuriranja, molim Vas proverite vašu vezu i podešavanja za proksi prema api.github.com. - Neuspešno preuzimanje ažuriranja, molim Vas proverite vašu vezu i podešavanja za proksi prema github-cloud.s3.amazonaws.com, + Neuspešno preuzimanje ažuriranja, molim Vas proverite vašu vezu i podešavanja za proksi prema github-cloud.s3.amazonaws.com, ili posetite https://github.com/Flow-Launcher/Flow.Launcher/releases da preuzmete ažuriranja ručno. U novoj verziji diff --git a/Flow.Launcher/Languages/tr.xaml b/Flow.Launcher/Languages/tr.xaml index 2bda02604cf..5928a43d051 100644 --- a/Flow.Launcher/Languages/tr.xaml +++ b/Flow.Launcher/Languages/tr.xaml @@ -80,6 +80,7 @@ No results found Please try a different search. Eklenti + Eklenti Daha fazla eklenti bul Açık Devre Dışı @@ -120,6 +121,7 @@ Temalar + Appearance Daha fazla tema bul Nasıl bir tema yaratılır Merhaba @@ -152,6 +154,7 @@ Kısayol Tuşu + Kısayol Tuşu Flow Launcher Kısayolu Enter shortcut to show/hide Flow Launcher. Preview Hotkey @@ -174,6 +177,7 @@ {0} eklentisi için olan kısayolu silmek istediğinize emin misiniz? Are you sure you want to delete shortcut: {0} with expansion {1}? Get text from clipboard. + Get path from active explorer. Query window shadow effect Shadow effect has a substantial usage of GPU. Not recommended if your computer performance is limited. Window Width Size diff --git a/Flow.Launcher/Languages/uk-UA.xaml b/Flow.Launcher/Languages/uk-UA.xaml index 761396f119f..a7dad25164e 100644 --- a/Flow.Launcher/Languages/uk-UA.xaml +++ b/Flow.Launcher/Languages/uk-UA.xaml @@ -80,6 +80,7 @@ No results found Please try a different search. Plugin + Плагіни Знайти більше плагінів Увімкнено Відключити @@ -120,6 +121,7 @@ Тема + Appearance Знайти більше тем Як створити тему Привіт усім @@ -152,6 +154,7 @@ Гаряча клавіша + Гаряча клавіша Гаряча клавіша Flow Launcher Введіть ярлик для відображення/приховання потокового запуску. Preview Hotkey @@ -174,6 +177,7 @@ Ви впевнені, що хочете видалити гарячу клавішу ({0}) плагіну? Are you sure you want to delete shortcut: {0} with expansion {1}? Get text from clipboard. + Get path from active explorer. Ефект тіні вікна запиту Shadow effect has a substantial usage of GPU. Not recommended if your computer performance is limited. Window Width Size diff --git a/Flow.Launcher/Languages/zh-cn.xaml b/Flow.Launcher/Languages/zh-cn.xaml index 8604bbb1a42..7890535bf53 100644 --- a/Flow.Launcher/Languages/zh-cn.xaml +++ b/Flow.Launcher/Languages/zh-cn.xaml @@ -80,6 +80,7 @@ 未找到结果 请尝试搜索不同的内容。 插件 + 插件 浏览更多插件 启用 禁用 @@ -120,6 +121,7 @@ 主题 + 外观 浏览更多主题 如何创建一个主题 你好! @@ -152,6 +154,7 @@ 热键 + 热键 Flow Launcher 激活热键 输入显示/隐藏 Flow Launcher 的快捷键。 预览快捷键 @@ -174,6 +177,7 @@ 你确定要删除插件 {0} 的热键吗? 你确定要删除捷径 {0} (展开为 {1})? 从剪贴板获取文本。 + 从活动的资源管理器窗口获取路径。 查询窗口阴影效果 阴影效果将占用大量的GPU资源。 如果您的计算机性能有限,则不建议使用。 窗口宽度 @@ -211,7 +215,7 @@ 发现新版本 {0}, 请重启 Flow Launcher 下载更新失败,请检查您与 api.github.com 的连接状态或检查代理设置 - 下载更新失败,请检查您与 github-cloud.s3.amazonaws.com 的连接状态或检查代理设置, + 下载更新失败,请检查您与 github-cloud.s3.amazonaws.com 的连接状态或检查代理设置, 或访问 https://github.com/Flow-Launcher/Flow.Launcher/releases 手动下载更新 更新说明 diff --git a/Flow.Launcher/Languages/zh-tw.xaml b/Flow.Launcher/Languages/zh-tw.xaml index b0a75be14ee..ae7cf9811c2 100644 --- a/Flow.Launcher/Languages/zh-tw.xaml +++ b/Flow.Launcher/Languages/zh-tw.xaml @@ -80,6 +80,7 @@ No results found Please try a different search. 插件 + 插件 瀏覽更多外掛 啟用 停用 @@ -120,6 +121,7 @@ 主題 + Appearance 瀏覽更多主題 如何創建一個主題 你好呀 @@ -152,6 +154,7 @@ 快捷鍵 + 快捷鍵 Flow Launcher 快捷鍵 執行快捷鍵以顯示 / 隱藏 Flow Launcher。 Preview Hotkey @@ -174,6 +177,7 @@ 確定要刪除外掛 {0} 的快捷鍵嗎? Are you sure you want to delete shortcut: {0} with expansion {1}? Get text from clipboard. + Get path from active explorer. 查詢窗口陰影效果 陰影效果將佔用大量的 GPU 資源。如果你的電腦效能有限,不建議使用。 窗口寬度 @@ -323,7 +327,7 @@ 你好,這是你第一次運行 Flow Launcher! 在開始之前,此嚮導將幫助設定 Flow Launcher。如果你想,你可以跳過這個。請選擇一種語言 在PC上搜尋並執行所有文件和應用程式 - 只需使用鍵盤搜尋應用程式、文件、書籤、Youtube、Twitter等 + 只需使用鍵盤搜尋應用程式、文件、書籤、YouTube、Twitter 等。 Flow Launcher 需要搭配快捷鍵使用,請馬上試試吧! 如果想更改它,請點擊"輸入"並輸入你想要的快捷鍵。 快捷鍵 關鍵字與指令 diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index daf8ec608c4..186bb2c418a 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -1027,7 +1027,7 @@ + Text="{DynamicResource plugins}" /> @@ -1049,7 +1049,7 @@ DockPanel.Dock="Left" FontSize="30" Style="{StaticResource PageTitle}" - Text="{DynamicResource plugin}" + Text="{DynamicResource plugins}" TextAlignment="Left" /> + Text="{DynamicResource appearance}" /> @@ -1792,7 +1792,7 @@ Margin="0,5,0,5" FontSize="30" Style="{StaticResource PageTitle}" - Text="{DynamicResource theme}" + Text="{DynamicResource appearance}" TextAlignment="left" /> @@ -2388,7 +2388,7 @@ + Text="{DynamicResource hotkeys}" /> @@ -2448,6 +2448,7 @@ Width="300" Height="35" Margin="0,0,0,0" + ValidateKeyGesture="True" HorizontalAlignment="Right" HorizontalContentAlignment="Right" Loaded="OnPreviewHotkeyControlLoaded" diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index 705f6aad0a1..d0dbd6268ec 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -24,6 +24,7 @@ using CommunityToolkit.Mvvm.Input; using System.Globalization; using System.Windows.Input; +using System.ComponentModel; namespace Flow.Launcher.ViewModel { @@ -583,7 +584,24 @@ public double MainWindowWidth public string OpenResultCommandModifiers => Settings.OpenResultModifiers; - public string PreviewHotkey => Settings.PreviewHotkey; + public string PreviewHotkey + { + get + { + // TODO try to patch issue #1755 + // Added in v1.14.0, remove after v1.16.0. + try + { + var converter = new KeyGestureConverter(); + var key = (KeyGesture)converter.ConvertFromString(Settings.PreviewHotkey); + } + catch (Exception e) when (e is NotSupportedException || e is InvalidEnumArgumentException) + { + Settings.PreviewHotkey = "F1"; + } + return Settings.PreviewHotkey; + } + } public string Image => Constant.QueryTextBoxIconImagePath; diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Commands/BookmarkLoader.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Commands/BookmarkLoader.cs index 77d9c64a0ea..d08c05b6ba1 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Commands/BookmarkLoader.cs +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Commands/BookmarkLoader.cs @@ -44,11 +44,16 @@ internal static List LoadAllBookmarks(Settings setting) foreach (var browser in setting.CustomChromiumBrowsers) { - var loader = new CustomChromiumBookmarkLoader(browser); + IBookmarkLoader loader = browser.BrowserType switch + { + BrowserType.Chromium => new CustomChromiumBookmarkLoader(browser), + BrowserType.Firefox => new CustomFirefoxBookmarkLoader(browser), + _ => new CustomChromiumBookmarkLoader(browser), + }; allBookmarks.AddRange(loader.GetBookmarks()); } return allBookmarks.Distinct().ToList(); } } -} \ No newline at end of file +} diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/CustomFirefoxBookmarkLoader.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/CustomFirefoxBookmarkLoader.cs new file mode 100644 index 00000000000..82bdc29f54d --- /dev/null +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/CustomFirefoxBookmarkLoader.cs @@ -0,0 +1,27 @@ +using System.Collections.Generic; +using System.IO; +using Flow.Launcher.Plugin.BrowserBookmark.Models; + +namespace Flow.Launcher.Plugin.BrowserBookmark +{ + public class CustomFirefoxBookmarkLoader : FirefoxBookmarkLoaderBase + { + public CustomFirefoxBookmarkLoader(CustomBrowser browser) + { + BrowserName = browser.Name; + BrowserDataPath = browser.DataDirectoryPath; + } + + /// + /// Path to places.sqlite + /// + public string BrowserDataPath { get; init; } + + public string BrowserName { get; init; } + + public override List GetBookmarks() + { + return GetBookmarksFromPath(Path.Combine(BrowserDataPath, "places.sqlite")); + } + } +} diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs index fc58e40df53..022f2814408 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs @@ -7,8 +7,10 @@ namespace Flow.Launcher.Plugin.BrowserBookmark { - public class FirefoxBookmarkLoader : IBookmarkLoader + public abstract class FirefoxBookmarkLoaderBase : IBookmarkLoader { + public abstract List GetBookmarks(); + private const string queryAllBookmarks = @"SELECT moz_places.url, moz_bookmarks.title FROM moz_places INNER JOIN moz_bookmarks ON ( @@ -19,21 +21,18 @@ ORDER BY moz_places.visit_count DESC private const string dbPathFormat = "Data Source ={0};Version=3;New=False;Compress=True;"; - /// - /// Searches the places.sqlite db and returns all bookmarks - /// - public List GetBookmarks() + protected static List GetBookmarksFromPath(string placesPath) { // Return empty list if the places.sqlite file cannot be found - if (string.IsNullOrEmpty(PlacesPath) || !File.Exists(PlacesPath)) + if (string.IsNullOrEmpty(placesPath) || !File.Exists(placesPath)) return new List(); var bookmarkList = new List(); - - Main.RegisterBookmarkFile(PlacesPath); + + Main.RegisterBookmarkFile(placesPath); // create the connection string and init the connection - string dbPath = string.Format(dbPathFormat, PlacesPath); + string dbPath = string.Format(dbPathFormat, placesPath); using var dbConnection = new SQLiteConnection(dbPath); // Open connection to the database file and execute the query dbConnection.Open(); @@ -41,13 +40,25 @@ public List GetBookmarks() // return results in List format bookmarkList = reader.Select( - x => new Bookmark(x["title"] is DBNull ? string.Empty : x["title"].ToString(), + x => new Bookmark(x["title"] is DBNull ? string.Empty : x["title"].ToString(), x["url"].ToString()) ).ToList(); return bookmarkList; } + } + + public class FirefoxBookmarkLoader : FirefoxBookmarkLoaderBase + { + /// + /// Searches the places.sqlite db and returns all bookmarks + /// + public override List GetBookmarks() + { + return GetBookmarksFromPath(PlacesPath); + } + /// /// Path to places.sqlite /// 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 c42378a9a36..25577d96b60 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj @@ -11,6 +11,7 @@ true false false + true @@ -66,12 +67,8 @@ - - + + diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/da.xaml b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/da.xaml index e8568898820..49c08748431 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/da.xaml +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/da.xaml @@ -18,6 +18,11 @@ Browser Name Data Directory Path Tilføj + Rediger Slet + Browse Others + Browser Engine + If you are not using Chrome, Firefox or Edge, or you are using their portable version, you need to add bookmarks data directory and select correct browser engine to make this plugin work. + For example: Brave's engine is Chromium; and its default bookmarks data location is: "%LOCALAPPDATA%\BraveSoftware\Brave-Browser\UserData". For Firefox engine, the bookmarks directory is the userdata folder contains the places.sqlite file. diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/de.xaml b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/de.xaml index 7c9b6bc9763..54581910f1f 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/de.xaml +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/de.xaml @@ -18,6 +18,11 @@ Browser-Name Pfad zum Datenverzeichnis Hinzufügen + Bearbeiten Löschen + Durchsuchen Others + Browser Engine + If you are not using Chrome, Firefox or Edge, or you are using their portable version, you need to add bookmarks data directory and select correct browser engine to make this plugin work. + For example: Brave's engine is Chromium; and its default bookmarks data location is: "%LOCALAPPDATA%\BraveSoftware\Brave-Browser\UserData". For Firefox engine, the bookmarks directory is the userdata folder contains the places.sqlite file. diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/en.xaml b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/en.xaml index 7c88708f502..e5f3d541e11 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/en.xaml +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/en.xaml @@ -20,6 +20,11 @@ Browser Name Data Directory Path Add + Edit Delete + Browse Others + Browser Engine + If you are not using Chrome, Firefox or Edge, or you are using their portable version, you need to add bookmarks data directory and select correct browser engine to make this plugin work. + For example: Brave's engine is Chromium; and its default bookmarks data location is: "%LOCALAPPDATA%\BraveSoftware\Brave-Browser\UserData". For Firefox engine, the bookmarks directory is the userdata folder contains the places.sqlite file. \ No newline at end of file diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/es-419.xaml b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/es-419.xaml index 37c1707d3f8..0f7a955711a 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/es-419.xaml +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/es-419.xaml @@ -18,6 +18,11 @@ Nombre del Navegador Ruta del Directorio de Datos Añadir + Editar Eliminar + Browse Others + Browser Engine + If you are not using Chrome, Firefox or Edge, or you are using their portable version, you need to add bookmarks data directory and select correct browser engine to make this plugin work. + For example: Brave's engine is Chromium; and its default bookmarks data location is: "%LOCALAPPDATA%\BraveSoftware\Brave-Browser\UserData". For Firefox engine, the bookmarks directory is the userdata folder contains the places.sqlite file. diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/es.xaml b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/es.xaml index 9c375cebf1d..3bbf5001748 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/es.xaml +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/es.xaml @@ -18,6 +18,11 @@ Nombre del navegador Ruta del directorio de datos Añadir + Editar Eliminar + Navegar Otros + Motor del navegador + Si no está utilizando Chrome, Firefox o Edge, o si está utilizando su versión portátil, debe añadir el directorio de datos de los marcadores y seleccionar el motor del navegador correcto para que este complemento funcione. + Por ejemplo: El motor de Brave es Chromium; y la ubicación por defecto de los datos de los marcadores es: "%LOCALAPPDATA%\BraveSoftware\Brave-Browser\UserData". Para el motor de Firefox, el directorio de los marcadores es la carpeta de datos del usuario que contiene el archivo places.sqlite. diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/fr.xaml b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/fr.xaml index d42c0c6c19a..602d66e49b8 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/fr.xaml +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/fr.xaml @@ -2,22 +2,27 @@ - Browser Bookmarks - Search your browser bookmarks + Favoris du Navigateur + Rechercher dans les favoris de votre navigateur - Bookmark Data - Open bookmarks in: - New window - New tab - Set browser from path: - Choose - Copy url - Copy the bookmark's url to clipboard - Load Browser From: - Browser Name - Data Directory Path + Données des favoris + Ouvrir les favoris dans : + Nouvelle fenêtre + Nouvel onglet + Définir le navigateur à partir du chemin : + Choisir + Copier l'url + Copier l'Url du favori dans le presse-papier + Charger le navigateur depuis : + Nom du navigateur + Répertoire des Données Ajouter + Modifier Supprimer + Browse Others + Browser Engine + If you are not using Chrome, Firefox or Edge, or you are using their portable version, you need to add bookmarks data directory and select correct browser engine to make this plugin work. + For example: Brave's engine is Chromium; and its default bookmarks data location is: "%LOCALAPPDATA%\BraveSoftware\Brave-Browser\UserData". For Firefox engine, the bookmarks directory is the userdata folder contains the places.sqlite file. diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/it.xaml b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/it.xaml index 07be31f631d..040a433782e 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/it.xaml +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/it.xaml @@ -18,6 +18,11 @@ Nome del browser Percorso cartella Data Aggiungi + Modifica Cancella + Browse Others + Browser Engine + If you are not using Chrome, Firefox or Edge, or you are using their portable version, you need to add bookmarks data directory and select correct browser engine to make this plugin work. + For example: Brave's engine is Chromium; and its default bookmarks data location is: "%LOCALAPPDATA%\BraveSoftware\Brave-Browser\UserData". For Firefox engine, the bookmarks directory is the userdata folder contains the places.sqlite file. diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/ja.xaml b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/ja.xaml index 63e7592996a..d278faf98ed 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/ja.xaml +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/ja.xaml @@ -18,6 +18,11 @@ Browser Name Data Directory Path + 削除 + Browse Others + Browser Engine + If you are not using Chrome, Firefox or Edge, or you are using their portable version, you need to add bookmarks data directory and select correct browser engine to make this plugin work. + For example: Brave's engine is Chromium; and its default bookmarks data location is: "%LOCALAPPDATA%\BraveSoftware\Brave-Browser\UserData". For Firefox engine, the bookmarks directory is the userdata folder contains the places.sqlite file. diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/ko.xaml b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/ko.xaml index 694167efba3..8010e56f4fa 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/ko.xaml +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/ko.xaml @@ -18,6 +18,11 @@ 브라우저 이름 데이터 디렉토리 위치 추가 + 편집 삭제 + 찾아보기 Others + Browser Engine + If you are not using Chrome, Firefox or Edge, or you are using their portable version, you need to add bookmarks data directory and select correct browser engine to make this plugin work. + For example: Brave's engine is Chromium; and its default bookmarks data location is: "%LOCALAPPDATA%\BraveSoftware\Brave-Browser\UserData". For Firefox engine, the bookmarks directory is the userdata folder contains the places.sqlite file. diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/nb.xaml b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/nb.xaml index 6d6f30884d2..90f4ea49bd2 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/nb.xaml +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/nb.xaml @@ -18,6 +18,11 @@ Browser Name Data Directory Path Add + Edit Delete + Browse Others + Browser Engine + If you are not using Chrome, Firefox or Edge, or you are using their portable version, you need to add bookmarks data directory and select correct browser engine to make this plugin work. + For example: Brave's engine is Chromium; and its default bookmarks data location is: "%LOCALAPPDATA%\BraveSoftware\Brave-Browser\UserData". For Firefox engine, the bookmarks directory is the userdata folder contains the places.sqlite file. diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/nl.xaml b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/nl.xaml index 4c45242da81..319606d22c7 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/nl.xaml +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/nl.xaml @@ -18,6 +18,11 @@ Browser Name Data Directory Path Toevoegen + Bewerken Verwijder + Browse Others + Browser Engine + If you are not using Chrome, Firefox or Edge, or you are using their portable version, you need to add bookmarks data directory and select correct browser engine to make this plugin work. + For example: Brave's engine is Chromium; and its default bookmarks data location is: "%LOCALAPPDATA%\BraveSoftware\Brave-Browser\UserData". For Firefox engine, the bookmarks directory is the userdata folder contains the places.sqlite file. diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/pl.xaml b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/pl.xaml index e0076a376b1..0a78aeb7bd3 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/pl.xaml +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/pl.xaml @@ -18,6 +18,11 @@ Browser Name Data Directory Path Dodaj + Edytuj Usu + Przeglądaj Others + Browser Engine + If you are not using Chrome, Firefox or Edge, or you are using their portable version, you need to add bookmarks data directory and select correct browser engine to make this plugin work. + For example: Brave's engine is Chromium; and its default bookmarks data location is: "%LOCALAPPDATA%\BraveSoftware\Brave-Browser\UserData". For Firefox engine, the bookmarks directory is the userdata folder contains the places.sqlite file. diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/pt-br.xaml b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/pt-br.xaml index 0131d2a73b5..d0628a611a3 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/pt-br.xaml +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/pt-br.xaml @@ -18,6 +18,11 @@ Browser Name Data Directory Path Adicionar + Editar Apagar + Browse Others + Browser Engine + If you are not using Chrome, Firefox or Edge, or you are using their portable version, you need to add bookmarks data directory and select correct browser engine to make this plugin work. + For example: Brave's engine is Chromium; and its default bookmarks data location is: "%LOCALAPPDATA%\BraveSoftware\Brave-Browser\UserData". For Firefox engine, the bookmarks directory is the userdata folder contains the places.sqlite file. diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/pt-pt.xaml b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/pt-pt.xaml index a602649701a..4344e8c3d84 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/pt-pt.xaml +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/pt-pt.xaml @@ -18,6 +18,11 @@ Nome do navegador Caminho da pasta de dados Adicionar + Editar Eliminar + Explorar Outros + Motor do navegador + Se não estiver a usar o Chrome, Firefox ou Edge ou se estiver a usar a versão portátil, tem que adicionar o diretório de dados dos marcadores e selecionar o motor do navegador para que este plugin funcione. + Por exemplo: o motor do Brave é Chromium e a localização padrão dos marcadores é "%LOCALAPPDATA%\BraveSoftware\Brave-Browser\UserData". Para o navegafor Firefox, o diretório de marcadores é a pasta do utilizador que contém o ficheiro places.sqlite. diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/ru.xaml b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/ru.xaml index a631f3ca496..36939f49351 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/ru.xaml +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/ru.xaml @@ -18,6 +18,11 @@ Browser Name Data Directory Path Добавить + Редактировать Удалить + Browse Others + Browser Engine + If you are not using Chrome, Firefox or Edge, or you are using their portable version, you need to add bookmarks data directory and select correct browser engine to make this plugin work. + For example: Brave's engine is Chromium; and its default bookmarks data location is: "%LOCALAPPDATA%\BraveSoftware\Brave-Browser\UserData". For Firefox engine, the bookmarks directory is the userdata folder contains the places.sqlite file. diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/sk.xaml b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/sk.xaml index aa65967a909..3c1ce9d2201 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/sk.xaml +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/sk.xaml @@ -18,6 +18,11 @@ Názov prehliadača Umiestnenie priečinku s dátami Pridať + Upraviť Odstrániť + Prehliadať Iné + Jadro prehliadača + Ak nepoužívate prehliadač Chrome, Firefox alebo Edge alebo používate ich prenosnú verziu, musíte pridať priečinok s údajmi o záložkách a vybrať správne jadro prehliadača, aby tento plugin fungoval. + Napríklad: Prehliadač Brave má jadro Chromium; predvolené umiestnenie údajov o záložkách je: "%LOCALAPPDATA%\BraveSoftware\Brave-Browser\UserData". Pre jadro Firefoxu je priečinkom záložiek priečinok userdata, ktorý obsahuje súbor places.sqlite. diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/sr.xaml b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/sr.xaml index b6a3677983c..be113c8cf77 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/sr.xaml +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/sr.xaml @@ -18,6 +18,11 @@ Browser Name Data Directory Path Dodaj + Izmeni Obriši + Browse Others + Browser Engine + If you are not using Chrome, Firefox or Edge, or you are using their portable version, you need to add bookmarks data directory and select correct browser engine to make this plugin work. + For example: Brave's engine is Chromium; and its default bookmarks data location is: "%LOCALAPPDATA%\BraveSoftware\Brave-Browser\UserData". For Firefox engine, the bookmarks directory is the userdata folder contains the places.sqlite file. diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/tr.xaml b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/tr.xaml index bf4a59e65b8..05e97f2c050 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/tr.xaml +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/tr.xaml @@ -18,6 +18,11 @@ Browser Name Data Directory Path Ekle + Düzenle Sil + Gözat Others + Browser Engine + If you are not using Chrome, Firefox or Edge, or you are using their portable version, you need to add bookmarks data directory and select correct browser engine to make this plugin work. + For example: Brave's engine is Chromium; and its default bookmarks data location is: "%LOCALAPPDATA%\BraveSoftware\Brave-Browser\UserData". For Firefox engine, the bookmarks directory is the userdata folder contains the places.sqlite file. diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/uk-UA.xaml b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/uk-UA.xaml index 52b9f0b1247..a55b9de1ba5 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/uk-UA.xaml +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/uk-UA.xaml @@ -18,6 +18,11 @@ Browser Name Data Directory Path Додати + Редагувати Видалити + Browse Others + Browser Engine + If you are not using Chrome, Firefox or Edge, or you are using their portable version, you need to add bookmarks data directory and select correct browser engine to make this plugin work. + For example: Brave's engine is Chromium; and its default bookmarks data location is: "%LOCALAPPDATA%\BraveSoftware\Brave-Browser\UserData". For Firefox engine, the bookmarks directory is the userdata folder contains the places.sqlite file. diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/zh-cn.xaml b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/zh-cn.xaml index 7c9c0a8493e..c082d50a2a6 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/zh-cn.xaml +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/zh-cn.xaml @@ -18,6 +18,11 @@ 浏览器名称 数据文件路径 添加 + 编辑 删除 + 浏览 其他 + 浏览器引擎 + If you are not using Chrome, Firefox or Edge, or you are using their portable version, you need to add bookmarks data directory and select correct browser engine to make this plugin work. + For example: Brave's engine is Chromium; and its default bookmarks data location is: "%LOCALAPPDATA%\BraveSoftware\Brave-Browser\UserData". For Firefox engine, the bookmarks directory is the userdata folder contains the places.sqlite file. diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/zh-tw.xaml b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/zh-tw.xaml index 0a237d6a085..50c23699fa6 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/zh-tw.xaml +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/zh-tw.xaml @@ -18,6 +18,11 @@ 瀏覽器名稱 檔案目錄路徑 新增 + 編輯 刪除 + 瀏覽 Others + Browser Engine + If you are not using Chrome, Firefox or Edge, or you are using their portable version, you need to add bookmarks data directory and select correct browser engine to make this plugin work. + For example: Brave's engine is Chromium; and its default bookmarks data location is: "%LOCALAPPDATA%\BraveSoftware\Brave-Browser\UserData". For Firefox engine, the bookmarks directory is the userdata folder contains the places.sqlite file. diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs index d072a362d0e..d9a719272b5 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs @@ -17,16 +17,16 @@ namespace Flow.Launcher.Plugin.BrowserBookmark { public class Main : ISettingProvider, IPlugin, IReloadable, IPluginI18n, IContextMenu, IDisposable { - private PluginInitContext context; + private static PluginInitContext context; - private List cachedBookmarks = new List(); - - private Settings _settings { get; set; } + private static List cachedBookmarks = new List(); + private static Settings _settings; + public void Init(PluginInitContext context) { - this.context = context; - + Main.context = context; + _settings = context.API.LoadSettingJsonStorage(); cachedBookmarks = BookmarkLoader.LoadAllBookmarks(_settings); @@ -136,6 +136,11 @@ internal static void RegisterBookmarkFile(string path) } public void ReloadData() + { + ReloadAllBookmarks(); + } + + public static void ReloadAllBookmarks() { cachedBookmarks.Clear(); diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Models/CustomBrowser.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Models/CustomBrowser.cs index c19de08a446..69bb56e4879 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Models/CustomBrowser.cs +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Models/CustomBrowser.cs @@ -4,6 +4,8 @@ public class CustomBrowser : BaseModel { private string _name; private string _dataDirectoryPath; + private BrowserType browserType = BrowserType.Chromium; + public string Name { get => _name; @@ -13,6 +15,7 @@ public string Name OnPropertyChanged(nameof(Name)); } } + public string DataDirectoryPath { get => _dataDirectoryPath; @@ -22,5 +25,21 @@ public string DataDirectoryPath OnPropertyChanged(nameof(DataDirectoryPath)); } } + + public BrowserType BrowserType + { + get => browserType; + set + { + browserType = value; + OnPropertyChanged(nameof(BrowserType)); + } + } + } + + public enum BrowserType + { + Chromium, + Firefox, } -} \ 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 aff85072844..392c9e0a78c 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/CustomBrowserSetting.xaml +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/CustomBrowserSetting.xaml @@ -5,8 +5,9 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:Flow.Launcher.Plugin.BrowserBookmark.Models" 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" @@ -38,7 +39,7 @@ diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/CustomBrowserSetting.xaml.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/CustomBrowserSetting.xaml.cs index b243878f7de..bdef5bf0fc0 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/CustomBrowserSetting.xaml.cs +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/CustomBrowserSetting.xaml.cs @@ -1,17 +1,7 @@ using Flow.Launcher.Plugin.BrowserBookmark.Models; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Windows; -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.Shapes; +using System.Windows.Forms; namespace Flow.Launcher.Plugin.BrowserBookmark.Views { @@ -27,31 +17,41 @@ public CustomBrowserSettingWindow(CustomBrowser browser) currentCustomBrowser = browser; DataContext = new CustomBrowser { - Name = browser.Name, DataDirectoryPath = browser.DataDirectoryPath + Name = browser.Name, + DataDirectoryPath = browser.DataDirectoryPath, + BrowserType = browser.BrowserType, }; } - - private void ConfirmCancelEditCustomBrowser(object sender, RoutedEventArgs e) + + private void ConfirmEditCustomBrowser(object sender, RoutedEventArgs e) { - if (DataContext is CustomBrowser editBrowser && e.Source is Button button) - { - if (button.Name == "btnConfirm") - { - currentCustomBrowser.Name = editBrowser.Name; - currentCustomBrowser.DataDirectoryPath = editBrowser.DataDirectoryPath; - Close(); - } - } + CustomBrowser editBrowser = (CustomBrowser)DataContext; + currentCustomBrowser.Name = editBrowser.Name; + currentCustomBrowser.DataDirectoryPath = editBrowser.DataDirectoryPath; + currentCustomBrowser.BrowserType = editBrowser.BrowserType; + DialogResult = true; + Close(); + } + private void CancelEditCustomBrowser(object sender, RoutedEventArgs e) + { 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); + ConfirmEditCustomBrowser(sender, e); } } + + private void OnSelectPathClick(object sender, RoutedEventArgs e) + { + var dialog = new FolderBrowserDialog(); + dialog.ShowDialog(); + CustomBrowser editBrowser = (CustomBrowser)DataContext; + editBrowser.DataDirectoryPath = dialog.SelectedPath; + } } -} \ No newline at end of file +} diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/SettingsControl.xaml b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/SettingsControl.xaml index 12a84cb5a31..014deff03b6 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/SettingsControl.xaml +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/SettingsControl.xaml @@ -1,65 +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"> - + - - - - + + + + +