diff --git a/Flow.Launcher.Core/Flow.Launcher.Core.csproj b/Flow.Launcher.Core/Flow.Launcher.Core.csproj
index 8aeca4699..df2f4d2cb 100644
--- a/Flow.Launcher.Core/Flow.Launcher.Core.csproj
+++ b/Flow.Launcher.Core/Flow.Launcher.Core.csproj
@@ -54,7 +54,7 @@
-
+
diff --git a/Flow.Launcher.Core/Plugin/JsonRPCPluginV2.cs b/Flow.Launcher.Core/Plugin/JsonRPCPluginV2.cs
index 5a6633525..305b28150 100644
--- a/Flow.Launcher.Core/Plugin/JsonRPCPluginV2.cs
+++ b/Flow.Launcher.Core/Plugin/JsonRPCPluginV2.cs
@@ -26,54 +26,33 @@ namespace Flow.Launcher.Core.Plugin
protected override async Task ExecuteResultAsync(JsonRPCResult result)
{
- try
- {
- var res = await RPC.InvokeAsync(result.JsonRPCAction.Method,
- argument: result.JsonRPCAction.Parameters);
+ var res = await RPC.InvokeAsync(result.JsonRPCAction.Method,
+ argument: result.JsonRPCAction.Parameters);
- return res.Hide;
- }
- catch
- {
- return false;
- }
+ return res.Hide;
}
private JoinableTaskFactory JTF { get; } = new JoinableTaskFactory(new JoinableTaskContext());
public override List LoadContextMenus(Result selectedResult)
{
- try
- {
- var res = JTF.Run(() => RPC.InvokeWithCancellationAsync("context_menu",
- new object[] { selectedResult.ContextData }));
+ var res = JTF.Run(() => RPC.InvokeWithCancellationAsync("context_menu",
+ new object[] { selectedResult.ContextData }));
- var results = ParseResults(res);
+ var results = ParseResults(res);
- return results;
- }
- catch
- {
- return new List();
- }
+ return results;
}
public override async Task> QueryAsync(Query query, CancellationToken token)
{
- try
- {
- var res = await RPC.InvokeWithCancellationAsync("query",
- new object[] { query, Settings.Inner },
- token);
+ var res = await RPC.InvokeWithCancellationAsync("query",
+ new object[] { query, Settings.Inner },
+ token);
- var results = ParseResults(res);
+ var results = ParseResults(res);
- return results;
- }
- catch
- {
- return new List();
- }
+ return results;
}
diff --git a/Flow.Launcher.Core/Resource/AvailableLanguages.cs b/Flow.Launcher.Core/Resource/AvailableLanguages.cs
index c385cd8e8..ecaecf646 100644
--- a/Flow.Launcher.Core/Resource/AvailableLanguages.cs
+++ b/Flow.Launcher.Core/Resource/AvailableLanguages.cs
@@ -30,7 +30,6 @@ namespace Flow.Launcher.Core.Resource
public static Language Vietnamese = new Language("vi-vn", "Tiếng Việt");
public static Language Hebrew = new Language("he", "עברית");
-
public static List GetAvailableLanguages()
{
List languages = new List
@@ -63,5 +62,38 @@ namespace Flow.Launcher.Core.Resource
};
return languages;
}
+
+ public static string GetSystemTranslation(string languageCode)
+ {
+ return languageCode switch
+ {
+ "en" => "System",
+ "zh-cn" => "系统",
+ "zh-tw" => "系統",
+ "uk-UA" => "Система",
+ "ru" => "Система",
+ "fr" => "Système",
+ "ja" => "システム",
+ "nl" => "Systeem",
+ "pl" => "System",
+ "da" => "System",
+ "de" => "System",
+ "ko" => "시스템",
+ "sr" => "Систем",
+ "pt-pt" => "Sistema",
+ "pt-br" => "Sistema",
+ "es" => "Sistema",
+ "es-419" => "Sistema",
+ "it" => "Sistema",
+ "nb-NO" => "System",
+ "sk" => "Systém",
+ "tr" => "Sistem",
+ "cs" => "Systém",
+ "ar" => "النظام",
+ "vi-vn" => "Hệ thống",
+ "he" => "מערכת",
+ _ => "System",
+ };
+ }
}
}
diff --git a/Flow.Launcher.Core/Resource/Internationalization.cs b/Flow.Launcher.Core/Resource/Internationalization.cs
index 1505e84f8..ef38e8be0 100644
--- a/Flow.Launcher.Core/Resource/Internationalization.cs
+++ b/Flow.Launcher.Core/Resource/Internationalization.cs
@@ -18,23 +18,52 @@ namespace Flow.Launcher.Core.Resource
{
public Settings Settings { get; set; }
private const string Folder = "Languages";
+ private const string DefaultLanguageCode = "en";
private const string DefaultFile = "en.xaml";
private const string Extension = ".xaml";
private readonly List _languageDirectories = new List();
private readonly List _oldResources = new List();
+ private readonly string SystemLanguageCode;
public Internationalization()
{
AddFlowLauncherLanguageDirectory();
+ SystemLanguageCode = GetSystemLanguageCodeAtStartup();
}
-
private void AddFlowLauncherLanguageDirectory()
{
var directory = Path.Combine(Constant.ProgramDirectory, Folder);
_languageDirectories.Add(directory);
}
+ private static string GetSystemLanguageCodeAtStartup()
+ {
+ var availableLanguages = AvailableLanguages.GetAvailableLanguages();
+
+ // Retrieve the language identifiers for the current culture.
+ // ChangeLanguage method overrides the CultureInfo.CurrentCulture, so this needs to
+ // be called at startup in order to get the correct lang code of system.
+ var currentCulture = CultureInfo.CurrentCulture;
+ var twoLetterCode = currentCulture.TwoLetterISOLanguageName;
+ var threeLetterCode = currentCulture.ThreeLetterISOLanguageName;
+ var fullName = currentCulture.Name;
+
+ // Try to find a match in the available languages list
+ foreach (var language in availableLanguages)
+ {
+ var languageCode = language.LanguageCode;
+
+ if (string.Equals(languageCode, twoLetterCode, StringComparison.OrdinalIgnoreCase) ||
+ string.Equals(languageCode, threeLetterCode, StringComparison.OrdinalIgnoreCase) ||
+ string.Equals(languageCode, fullName, StringComparison.OrdinalIgnoreCase))
+ {
+ return languageCode;
+ }
+ }
+
+ return DefaultLanguageCode;
+ }
internal void AddPluginLanguageDirectories(IEnumerable plugins)
{
@@ -68,8 +97,18 @@ namespace Flow.Launcher.Core.Resource
public void ChangeLanguage(string languageCode)
{
languageCode = languageCode.NonNull();
- Language language = GetLanguageByLanguageCode(languageCode);
- ChangeLanguage(language);
+
+ // Get actual language if language code is system
+ var isSystem = false;
+ if (languageCode == Constant.SystemLanguageCode)
+ {
+ languageCode = SystemLanguageCode;
+ isSystem = true;
+ }
+
+ // Get language by language code and change language
+ var language = GetLanguageByLanguageCode(languageCode);
+ ChangeLanguage(language, isSystem);
}
private Language GetLanguageByLanguageCode(string languageCode)
@@ -87,11 +126,10 @@ namespace Flow.Launcher.Core.Resource
}
}
- public void ChangeLanguage(Language language)
+ private void ChangeLanguage(Language language, bool isSystem)
{
language = language.NonNull();
-
RemoveOldLanguageFiles();
if (language != AvailableLanguages.English)
{
@@ -103,7 +141,7 @@ namespace Flow.Launcher.Core.Resource
CultureInfo.CurrentUICulture = CultureInfo.CurrentCulture;
// Raise event after culture is set
- Settings.Language = language.LanguageCode;
+ Settings.Language = isSystem ? Constant.SystemLanguageCode : language.LanguageCode;
_ = Task.Run(() =>
{
UpdatePluginMetadataTranslations();
@@ -167,7 +205,9 @@ namespace Flow.Launcher.Core.Resource
public List LoadAvailableLanguages()
{
- return AvailableLanguages.GetAvailableLanguages();
+ var list = AvailableLanguages.GetAvailableLanguages();
+ list.Insert(0, new Language(Constant.SystemLanguageCode, AvailableLanguages.GetSystemTranslation(SystemLanguageCode)));
+ return list;
}
public string GetTranslation(string key)
diff --git a/Flow.Launcher.Infrastructure/Constant.cs b/Flow.Launcher.Infrastructure/Constant.cs
index 2889e5ec7..c86ed4324 100644
--- a/Flow.Launcher.Infrastructure/Constant.cs
+++ b/Flow.Launcher.Infrastructure/Constant.cs
@@ -52,5 +52,7 @@ namespace Flow.Launcher.Infrastructure
public const string SponsorPage = "https://github.com/sponsors/Flow-Launcher";
public const string GitHub = "https://github.com/Flow-Launcher/Flow.Launcher";
public const string Docs = "https://flowlauncher.com/docs";
+
+ public const string SystemLanguageCode = "system";
}
}
diff --git a/Flow.Launcher.Infrastructure/FileExplorerHelper.cs b/Flow.Launcher.Infrastructure/FileExplorerHelper.cs
index b738b9c88..d908b0fde 100644
--- a/Flow.Launcher.Infrastructure/FileExplorerHelper.cs
+++ b/Flow.Launcher.Infrastructure/FileExplorerHelper.cs
@@ -68,7 +68,7 @@ namespace Flow.Launcher.Infrastructure
var numRemaining = hWnds.Count;
PInvoke.EnumWindows((wnd, _) =>
{
- var searchIndex = hWnds.FindIndex(x => x.HWND == wnd.Value);
+ var searchIndex = hWnds.FindIndex(x => new IntPtr(x.HWND) == wnd);
if (searchIndex != -1)
{
z[searchIndex] = index;
diff --git a/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj b/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj
index 1475252ca..1d6ee5c86 100644
--- a/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj
+++ b/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj
@@ -53,7 +53,7 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
index af3a950e9..4f16ae812 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
@@ -13,7 +13,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
{
public class Settings : BaseModel, IHotkeySettings
{
- private string language = "en";
+ private string language = Constant.SystemLanguageCode;
private string _theme = Constant.DefaultTheme;
public string Hotkey { get; set; } = $"{KeyConstant.LeftAlt} + {KeyConstant.Space}";
public string OpenResultModifiers { get; set; } = KeyConstant.Alt;
diff --git a/Flow.Launcher.Plugin/Result.cs b/Flow.Launcher.Plugin/Result.cs
index f2050cc9f..c6ca81cf3 100644
--- a/Flow.Launcher.Plugin/Result.cs
+++ b/Flow.Launcher.Plugin/Result.cs
@@ -157,27 +157,6 @@ namespace Flow.Launcher.Plugin
}
}
- ///
- public override bool Equals(object obj)
- {
- var r = obj as Result;
-
- var equality = string.Equals(r?.Title, Title) &&
- string.Equals(r?.SubTitle, SubTitle) &&
- string.Equals(r?.AutoCompleteText, AutoCompleteText) &&
- string.Equals(r?.CopyText, CopyText) &&
- string.Equals(r?.IcoPath, IcoPath) &&
- TitleHighlightData == r.TitleHighlightData;
-
- return equality;
- }
-
- ///
- public override int GetHashCode()
- {
- return HashCode.Combine(Title, SubTitle, AutoCompleteText, CopyText, IcoPath);
- }
-
///
public override string ToString()
{
diff --git a/Flow.Launcher.Test/Plugins/JsonRPCPluginTest.cs b/Flow.Launcher.Test/Plugins/JsonRPCPluginTest.cs
index 3d05e5679..42a4630fe 100644
--- a/Flow.Launcher.Test/Plugins/JsonRPCPluginTest.cs
+++ b/Flow.Launcher.Test/Plugins/JsonRPCPluginTest.cs
@@ -63,28 +63,5 @@ namespace Flow.Launcher.Test.Plugins
})
};
- [TestCaseSource(typeof(JsonRPCPluginTest), nameof(ResponseModelsSource))]
- public async Task GivenModel_WhenSerializeWithDifferentNamingPolicy_ThenExpectSameResult_Async(JsonRPCQueryResponseModel reference)
- {
- var camelText = JsonSerializer.Serialize(reference, new JsonSerializerOptions() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase });
-
- var pascalText = JsonSerializer.Serialize(reference);
-
- var results1 = await QueryAsync(new Query { Search = camelText }, default);
- var results2 = await QueryAsync(new Query { Search = pascalText }, default);
-
- Assert.IsNotNull(results1);
- Assert.IsNotNull(results2);
-
- foreach (var ((result1, result2), referenceResult) in results1.Zip(results2).Zip(reference.Result))
- {
- Assert.AreEqual(result1, result2);
- Assert.AreEqual(result1, referenceResult);
-
- Assert.IsNotNull(result1);
- Assert.IsNotNull(result1.AsyncAction);
- }
- }
-
}
}
diff --git a/Flow.Launcher/Flow.Launcher.csproj b/Flow.Launcher/Flow.Launcher.csproj
index 004fafae4..532907092 100644
--- a/Flow.Launcher/Flow.Launcher.csproj
+++ b/Flow.Launcher/Flow.Launcher.csproj
@@ -99,7 +99,7 @@
-
+
diff --git a/Flow.Launcher/Helper/SingletonWindowOpener.cs b/Flow.Launcher/Helper/SingletonWindowOpener.cs
index b5c2d8b55..5282b61f9 100644
--- a/Flow.Launcher/Helper/SingletonWindowOpener.cs
+++ b/Flow.Launcher/Helper/SingletonWindowOpener.cs
@@ -10,16 +10,29 @@ public static class SingletonWindowOpener
{
var window = Application.Current.Windows.OfType().FirstOrDefault(x => x.GetType() == typeof(T))
?? (T)Activator.CreateInstance(typeof(T), args);
-
+
// Fix UI bug
// Add `window.WindowState = WindowState.Normal`
// If only use `window.Show()`, Settings-window doesn't show when minimized in taskbar
// Not sure why this works tho
// Probably because, when `.Show()` fails, `window.WindowState == Minimized` (not `Normal`)
// https://stackoverflow.com/a/59719760/4230390
- window.WindowState = WindowState.Normal;
- window.Show();
-
+ // Ensure the window is not minimized before showing it
+ if (window.WindowState == WindowState.Minimized)
+ {
+ window.WindowState = WindowState.Normal;
+ }
+
+ // Ensure the window is visible
+ if (!window.IsVisible)
+ {
+ window.Show();
+ }
+ else
+ {
+ window.Activate(); // Bring the window to the foreground if already open
+ }
+
window.Focus();
return (T)window;
diff --git a/Flow.Launcher/Languages/de.xaml b/Flow.Launcher/Languages/de.xaml
index 7f2e2bd8d..c7e775ae3 100644
--- a/Flow.Launcher/Languages/de.xaml
+++ b/Flow.Launcher/Languages/de.xaml
@@ -65,8 +65,8 @@
Letzte Abfrage beibehalten
Letzte Abfrage auswählen
Letzte Abfrage leeren
- Preserve Last Action Keyword
- Select Last Action Keyword
+ Letztes Aktions-Schlüsselwort beibehalten
+ Letztes Aktions-Schlüsselwort auswählen
Feste Fensterhöhe
Die Fensterhöhe ist durch Ziehen nicht anpassbar.
Maximal gezeigte Ergebnisse
diff --git a/Flow.Launcher/Languages/es.xaml b/Flow.Launcher/Languages/es.xaml
index bf22aea48..c7595f69b 100644
--- a/Flow.Launcher/Languages/es.xaml
+++ b/Flow.Launcher/Languages/es.xaml
@@ -65,8 +65,8 @@
Mantener la última consulta
Seleccionar la última consulta
Limpiar la última consulta
- Conservar palabra clave de última acción
- Seleccionar palabra clave de última acción
+ Conservar última palabra clave de acción
+ Seleccionar última palabra clave de acción
Altura de la ventana fija
La altura de la ventana no se puede ajustar arrastrando el ratón.
Número máximo de resultados mostrados
diff --git a/Flow.Launcher/Languages/he.xaml b/Flow.Launcher/Languages/he.xaml
index eeb33da17..f3c9bb307 100644
--- a/Flow.Launcher/Languages/he.xaml
+++ b/Flow.Launcher/Languages/he.xaml
@@ -9,7 +9,7 @@
אנא בחר את קובץ ההפעלה {0}
לא ניתן להגדיר נתיב הפעלה {0}, אנא נסה שוב בהגדרות Flow (גלול עד למטה).
נכשל בהפעלת תוספים
- תוספים: {0} - נכשלים בטעינה ויהיו מושבתים, אנא צור קשר עם יוצרי התוספים לקבלת עזרה
+ תוספים: {0} - נכשלו בטעינה ויושבתו, אנא צור קשר עם יוצרי התוספים לקבלת עזרה
רישום מקש הקיצור "{0}" נכשל. ייתכן שמקש הקיצור נמצא בשימוש על ידי תוכנה אחרת. שנה למקש קיצור אחר, או צא מהתוכנה האחרת.
@@ -54,10 +54,10 @@
צג ראשי
צג מותאם אישית
Search Window Position on Monitor
- Center
- Center Top
- Left Top
- Right Top
+ מרכז
+ מרכז עליון
+ שמאל עליון
+ ימין עליון
Custom Position
שפה
Last Query Style
@@ -83,16 +83,16 @@
Please select pythonw.exe
Always Start Typing in English Mode
Temporarily change your input method to English mode when activating Flow.
- Auto Update
- Select
+ עדכון אוטומטי
+ בחר
Hide Flow Launcher on startup
Flow Launcher search window is hidden in the tray after starting up.
Hide tray icon
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.
- None
- Low
+ ללא
+ נמוך
Regular
Search with Pinyin
Allows using Pinyin to search. Pinyin is the standard system of romanized spelling for translating Chinese.
@@ -120,26 +120,26 @@
Priority
Change Plugin Results Priority
Plugin Directory
- by
+ מאת
Init time:
Query time:
- Version
- Website
- Uninstall
+ גרסה
+ אתר
+ הסר התקנה
חנות תוספים
- New Release
+ שחרור חדש
Recently Updated
תוספים
- Installed
+ מותקן
רענן
התקן
- Uninstall
+ הסר התקנה
עדכון
Plugin already installed
- New Version
+ גרסה חדשה
This plugin has been updated within the last 7 days
New Update is Available
@@ -164,7 +164,7 @@
Query Box Font
Result Title Font
Result Subtitle Font
- Reset
+ אפס
Customize
Window Mode
Opacity
@@ -196,9 +196,9 @@
- Hotkey
- Hotkeys
- Open Flow Launcher
+ מקש קיצור
+ מקשי קיצור
+ פתח את Flow Launcher
Enter shortcut to show/hide Flow Launcher.
Toggle Preview
Enter shortcut to show/hide preview in search window.
@@ -206,24 +206,24 @@
List of currently registered hotkeys
Open Result Modifier Key
Select a modifier key to open selected result via keyboard.
- Show Hotkey
+ הצג מקש קיצור
Show result selection hotkey with results.
Auto Complete
Runs autocomplete for the selected items.
Select Next Item
Select Previous Item
- Next Page
- Previous Page
+ הדף הבא
+ הדף הקודם
Cycle Previous Query
Cycle Next Query
Open Context Menu
Open Native Context Menu
Open Setting Window
- Copy File Path
+ העתק את נתיב הקובץ
Toggle Game Mode
Toggle History
Open Containing Folder
- Run As Admin
+ הרץ כמנהל
Refresh Search Results
Reload Plugins Data
Quick Adjust Window Width
@@ -234,13 +234,13 @@
Custom Query Shortcuts
Built-in Shortcuts
שאילתה
- Shortcut
- Expansion
- Description
+ קיצור דרך
+ הרחבה
+ תיאור
מחק
ערוך
הוסף
- None
+ ללא
אנא בחר פריט
Are you sure you want to delete {0} plugin hotkey?
Are you sure you want to delete shortcut: {0} with expansion {1}?
@@ -259,8 +259,8 @@
Enable HTTP Proxy
HTTP Server
Port
- User Name
- Password
+ שם משתמש
+ סיסמא
Test Proxy
שמור
Server field can't be empty
@@ -272,11 +272,11 @@
אודות
- Website
- GitHub
- Docs
- Version
- Icons
+ אתר אינטרנט
+ Github
+ תיעוד
+ גרסה
+ סמלים
You have activated Flow Launcher {0} times
Check for Updates
Become A Sponsor
@@ -302,8 +302,8 @@
Select File Manager
Please specify the file location of the file manager you using and add arguments as required. The "%d" represents the directory path to open for, used by the Arg for Folder field and for commands opening specific directories. The "%f" represents the file path to open for, used by the Arg for File field and for commands opening specific files.
For example, if the file manager uses a command such as "totalcmd.exe /A c:\windows" to open the c:\windows directory, the File Manager Path will be totalcmd.exe, and the Arg For Folder will be /A "%d". Certain file managers like QTTabBar may just require a path to be supplied, in this instance use "%d" as the File Manager Path and leave the rest of the fileds blank.
- File Manager
- Profile Name
+ מנהל קבצים
+ שם פרופיל
File Manager Path
Arg For Folder
Arg For File
@@ -314,9 +314,9 @@
Browser
Browser Name
Browser Path
- New Window
- New Tab
- Private Mode
+ חלון חדש
+ כרטיסייה חדשה
+ מצב פרטיות
Change Priority
@@ -362,14 +362,14 @@ If you add an '@' prefix while inputting a shortcut, it matches any position in
שמור
Overwrite
ביטול
- Reset
+ אפס
מחק
- OK
- Yes
- No
+ אישור
+ כן
+ לא
- Version
+ גרסה
זמן
Please tell us how application crashed so we can fix it
שלח דיווח
@@ -377,21 +377,21 @@ If you add an '@' prefix while inputting a shortcut, it matches any position in
כללי
חריגים
Exception Type
- Source
+ מקור
Stack Trace
- Sending
+ שולח
Report sent successfully
Failed to send report
Flow Launcher got an error
- Please wait...
+ אנא המתן...
Checking for new update
You already have the latest Flow Launcher version
- Update found
- Updating...
+ עדכון נמצא
+ מעדכן...
Flow Launcher was not able to move your user profile data to the new update version.
Please manually move your profile data folder from {0} to {1}
@@ -405,7 +405,7 @@ If you add an '@' prefix while inputting a shortcut, it matches any position in
Check your connection and try updating proxy settings to github-cloud.s3.amazonaws.com.
This upgrade will restart Flow Launcher
Following files will be updated
- Update files
+ עדכן קבצים
Update description
@@ -416,7 +416,7 @@ If you add an '@' prefix while inputting a shortcut, it matches any position in
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
+ מקשי קיצור
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
diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs
index cb3f1e4a1..d5b303516 100644
--- a/Flow.Launcher/SettingWindow.xaml.cs
+++ b/Flow.Launcher/SettingWindow.xaml.cs
@@ -34,11 +34,11 @@ public partial class SettingWindow
private void OnLoaded(object sender, RoutedEventArgs e)
{
RefreshMaximizeRestoreButton();
- // Fix (workaround) for the window freezes after lock screen (Win+L)
+ // Fix (workaround) for the window freezes after lock screen (Win+L) or sleep
// https://stackoverflow.com/questions/4951058/software-rendering-mode-wpf
HwndSource hwndSource = PresentationSource.FromVisual(this) as HwndSource;
HwndTarget hwndTarget = hwndSource.CompositionTarget;
- hwndTarget.RenderMode = RenderMode.Default;
+ hwndTarget.RenderMode = RenderMode.SoftwareOnly; // Must use software only render mode here
InitializePosition();
}
diff --git a/Flow.Launcher/ViewModel/ResultsViewModel.cs b/Flow.Launcher/ViewModel/ResultsViewModel.cs
index 107372e01..7d2b5bc93 100644
--- a/Flow.Launcher/ViewModel/ResultsViewModel.cs
+++ b/Flow.Launcher/ViewModel/ResultsViewModel.cs
@@ -182,7 +182,7 @@ namespace Flow.Launcher.ViewModel
///
/// To avoid deadlock, this method should not called from main thread
///
- public void AddResults(IEnumerable resultsForUpdates, CancellationToken token, bool reselect = true)
+ public void AddResults(ICollection resultsForUpdates, CancellationToken token, bool reselect = true)
{
var newResults = NewResults(resultsForUpdates);
@@ -228,12 +228,12 @@ namespace Flow.Launcher.ViewModel
.ToList();
}
- private List NewResults(IEnumerable resultsForUpdates)
+ private List NewResults(ICollection resultsForUpdates)
{
if (!resultsForUpdates.Any())
return Results;
- return Results.Where(r => r != null && !resultsForUpdates.Any(u => u.ID == r.Result.PluginID))
+ return Results.Where(r => r?.Result != null && resultsForUpdates.All(u => u.ID != r.Result.PluginID))
.Concat(resultsForUpdates.SelectMany(u => u.Results, (u, r) => new ResultViewModel(r, _settings)))
.OrderByDescending(rv => rv.Result.Score)
.ToList();
diff --git a/Plugins/Flow.Launcher.Plugin.Calculator/Flow.Launcher.Plugin.Calculator.csproj b/Plugins/Flow.Launcher.Plugin.Calculator/Flow.Launcher.Plugin.Calculator.csproj
index 69c03b877..1b985acf9 100644
--- a/Plugins/Flow.Launcher.Plugin.Calculator/Flow.Launcher.Plugin.Calculator.csproj
+++ b/Plugins/Flow.Launcher.Plugin.Calculator/Flow.Launcher.Plugin.Calculator.csproj
@@ -62,7 +62,7 @@
-
+
\ No newline at end of file
diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/he.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/he.xaml
index 0e1753d67..f87dd7d63 100644
--- a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/he.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/he.xaml
@@ -29,8 +29,8 @@
Everything Setting
Preview Panel
Size
- Date Created
- Date Modified
+ תאריך יצירה
+ תאריך שינוי
Display File Info
Date and time format
Sort Option:
@@ -126,20 +126,20 @@
Failed to load Everything SDK
אזהרה: שירות Everything אינו פועל
שגיאה במהלך שאילתה לEverything
- Sort By
+ מיין לפי
Name
- Path
+ נתיב
Size
Extension
Type Name
- Date Created
- Date Modified
- Attributes
+ תאריך יצירה
+ תאריך שינוי
+ מאפיינים
File List FileName
Run Count
- Date Recently Changed
- Date Accessed
- Date Run
+ תאריך שינוי אחרון
+ תאריך גישה
+ תאריך הרצה
↑
↓
Warning: This is not a Fast Sort option, searches may be slow
@@ -149,11 +149,11 @@
Click to launch or install Everything
Everything Installation
- Installing Everything service. Please wait...
- Successfully installed Everything service
- Failed to automatically install Everything service. Please manually install it from https://www.voidtools.com
+ מתקין את שירות Everything. אנא המתן...
+ שירות Everything הותקן בהצלחה
+ התקנה אוטומטית של שירות Everything נכשלה. אנא הורד אותו ידנית מ- https://www.voidtools.com
Click here to start it
- Unable to find an Everything installation, would you like to manually select a location?{0}{0}Click no and Everything will be automatically installed for you
+ לא מצליח למצוא התקנה של Everything, האם תרצה לבחור מיקום באופן ידני?{0}{0}לחץ על לא וEverything יותקן עבורך אוטומטית
Do you want to enable content search for Everything?
It can be very slow without index (which is only supported in Everything v1.5+)
diff --git a/Plugins/Flow.Launcher.Plugin.PluginsManager/Utilities.cs b/Plugins/Flow.Launcher.Plugin.PluginsManager/Utilities.cs
index 9800fa020..743f5b25b 100644
--- a/Plugins/Flow.Launcher.Plugin.PluginsManager/Utilities.cs
+++ b/Plugins/Flow.Launcher.Plugin.PluginsManager/Utilities.cs
@@ -1,10 +1,9 @@
using Flow.Launcher.Core.ExternalPlugins;
-using Flow.Launcher.Infrastructure.UserSettings;
using ICSharpCode.SharpZipLib.Zip;
-using Newtonsoft.Json;
using System.IO;
using System.IO.Compression;
using System.Linq;
+using System.Text.Json;
namespace Flow.Launcher.Plugin.PluginsManager
{
@@ -72,12 +71,9 @@ namespace Flow.Launcher.Plugin.PluginsManager
if (pluginJsonEntry != null)
{
- using (StreamReader reader = new StreamReader(pluginJsonEntry.Open()))
- {
- string pluginJsonContent = reader.ReadToEnd();
- plugin = JsonConvert.DeserializeObject(pluginJsonContent);
- plugin.IcoPath = "Images\\zipfolder.png";
- }
+ using Stream stream = pluginJsonEntry.Open();
+ plugin = JsonSerializer.Deserialize(stream);
+ plugin.IcoPath = "Images\\zipfolder.png";
}
}
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Main.cs b/Plugins/Flow.Launcher.Plugin.Program/Main.cs
index e311a0b94..00b97e114 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Main.cs
+++ b/Plugins/Flow.Launcher.Plugin.Program/Main.cs
@@ -41,9 +41,36 @@ namespace Flow.Launcher.Plugin.Program
"uninst000.exe",
"uninstall.exe"
};
- // For cases when the uninstaller is named like "Uninstall Program Name.exe"
- private const string CommonUninstallerPrefix = "uninstall";
- private const string CommonUninstallerSuffix = ".exe";
+ private static readonly string[] commonUninstallerPrefixs =
+ {
+ "uninstall",//en
+ "卸载",//zh-cn
+ "卸載",//zh-tw
+ "видалити",//uk-UA
+ "удалить",//ru
+ "désinstaller",//fr
+ "アンインストール",//ja
+ "deïnstalleren",//nl
+ "odinstaluj",//pl
+ "afinstallere",//da
+ "deinstallieren",//de
+ "삭제",//ko
+ "деинсталирај",//sr
+ "desinstalar",//pt-pt
+ "desinstalar",//pt-br
+ "desinstalar",//es
+ "desinstalar",//es-419
+ "disinstallare",//it
+ "avinstallere",//nb-NO
+ "odinštalovať",//sk
+ "kaldır",//tr
+ "odinstalovat",//cs
+ "إلغاء التثبيت",//ar
+ "gỡ bỏ",//vi-vn
+ "הסרה"//he
+ };
+ private const string ExeUninstallerSuffix = ".exe";
+ private const string InkUninstallerSuffix = ".lnk";
static Main()
{
@@ -96,10 +123,33 @@ namespace Flow.Launcher.Plugin.Program
{
if (!_settings.HideUninstallers) return true;
if (program is not Win32 win32) return true;
+
+ // First check the executable path
var fileName = Path.GetFileName(win32.ExecutablePath);
- return !commonUninstallerNames.Contains(fileName, StringComparer.OrdinalIgnoreCase) &&
- !(fileName.StartsWith(CommonUninstallerPrefix, StringComparison.OrdinalIgnoreCase) &&
- fileName.EndsWith(CommonUninstallerSuffix, StringComparison.OrdinalIgnoreCase));
+ // For cases when the uninstaller is named like "uninst.exe"
+ if (commonUninstallerNames.Contains(fileName, StringComparer.OrdinalIgnoreCase)) return false;
+ // For cases when the uninstaller is named like "Uninstall Program Name.exe"
+ foreach (var prefix in commonUninstallerPrefixs)
+ {
+ if (fileName.StartsWith(prefix, StringComparison.OrdinalIgnoreCase) &&
+ fileName.EndsWith(ExeUninstallerSuffix, StringComparison.OrdinalIgnoreCase))
+ return false;
+ }
+
+ // Second check the lnk path
+ if (!string.IsNullOrEmpty(win32.LnkResolvedPath))
+ {
+ var inkFileName = Path.GetFileName(win32.FullPath);
+ // For cases when the uninstaller is named like "Uninstall Program Name.ink"
+ foreach (var prefix in commonUninstallerPrefixs)
+ {
+ if (inkFileName.StartsWith(prefix, StringComparison.OrdinalIgnoreCase) &&
+ inkFileName.EndsWith(InkUninstallerSuffix, StringComparison.OrdinalIgnoreCase))
+ return false;
+ }
+ }
+
+ return true;
}
public async Task InitAsync(PluginInitContext context)
diff --git a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Properties/Resources.de-DE.resx b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Properties/Resources.de-DE.resx
index dac5f82bc..dcc74d520 100644
--- a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Properties/Resources.de-DE.resx
+++ b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Properties/Resources.de-DE.resx
@@ -2130,7 +2130,7 @@
Ändern, wie der Mauszeiger ausschaut
- Change power-saving settings
+ Energiespareinstellungen ändern
Optimieren für Blindheit
@@ -2143,7 +2143,7 @@
Windows-Features ein- oder ausschalten
- Show which operating system your computer is running
+ Betriebssystem, welches auf deinem Computer läuft, anzeigen
Lokale Dienste ansehen