Skip to content
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
9486355
Add check registry method
onesounds Apr 5, 2025
43330db
Add InfoBar Control
onesounds Apr 6, 2025
d1ceba7
Adjust Inforbar
onesounds Apr 6, 2025
5c09598
Add Infobar strings for korean
onesounds Apr 7, 2025
736837e
Add function for switch and button
onesounds Apr 8, 2025
762b267
Merge branch 'dev' into 250405-KoreanIME
onesounds Apr 8, 2025
5c55d29
Handle it so that it doesn’t show if the registry is missing.
onesounds Apr 9, 2025
62e32dc
Merge branch 'dev' into 250405-KoreanIME
onesounds Apr 9, 2025
33392f6
Merge remote-tracking branch 'origin/250405-KoreanIME' into 250405-Ko…
onesounds Apr 9, 2025
7052701
Merge branch 'dev' into 250405-KoreanIME
onesounds Apr 9, 2025
7fdc216
Fix small things for merging dev
onesounds Apr 9, 2025
77ffafc
Fix string
onesounds Apr 9, 2025
3c49d8e
Fix Binding error
onesounds Apr 9, 2025
d9a353b
- Fix String and adjust messages
onesounds Apr 9, 2025
be0a9b7
clean up comment
onesounds Apr 9, 2025
afe9d9a
Merge branch 'dev' into 250405-KoreanIME
onesounds Apr 9, 2025
317f241
- Add Comment
onesounds Apr 9, 2025
8686308
Merge remote-tracking branch 'origin/250405-KoreanIME' into 250405-Ko…
onesounds Apr 9, 2025
1c1bad0
Cleanup Code
onesounds Apr 9, 2025
f1b0bb8
Remove namespace
onesounds Apr 9, 2025
ebff80c
Add Error Message
onesounds Apr 9, 2025
f56d038
Remove debug codes & Improve code quality
Jack251970 Apr 11, 2025
b14cf89
Remove useless using
Jack251970 Apr 11, 2025
1517db8
Revert wrong changes on en.xaml
Jack251970 Apr 11, 2025
c5f2fca
Revert wrong changes on en.xaml
Jack251970 Apr 11, 2025
218635a
Add logic to check whether the Korean IME is in use
onesounds Apr 11, 2025
a6c7430
Code quality
Jack251970 Apr 11, 2025
7192319
Change IME settings icon
Jack251970 Apr 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions Flow.Launcher.Infrastructure/Win32Helper.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.Runtime.InteropServices;
using System.Windows;
Expand Down Expand Up @@ -517,5 +518,86 @@ public static bool IsNotificationSupported()
}

#endregion

#region Korean IME

public static bool IsKoreanIMEExist()
{
return GetLegacyKoreanIMERegistryValue() != null;
}

public static bool IsLegacyKoreanIMEEnabled()
{
object value = GetLegacyKoreanIMERegistryValue();

if (value is int intValue)
{
return intValue == 1;
}
else if (value != null && int.TryParse(value.ToString(), out int parsedValue))
{
return parsedValue == 1;
}

return false;
}

public static bool SetLegacyKoreanIMEEnabled(bool enable)
{
const string subKeyPath = @"Software\Microsoft\input\tsf\tsf3override\{A028AE76-01B1-46C2-99C4-ACD9858AE02F}";
const string valueName = "NoTsf3Override5";

try
{
using RegistryKey key = Registry.CurrentUser.CreateSubKey(subKeyPath);
if (key != null)
{
int value = enable ? 1 : 0;
key.SetValue(valueName, value, RegistryValueKind.DWord);
return true;
}
}
catch (System.Exception)
{
// Ignored
}

return false;
}

public static object GetLegacyKoreanIMERegistryValue()
{
const string subKeyPath = @"Software\Microsoft\input\tsf\tsf3override\{A028AE76-01B1-46C2-99C4-ACD9858AE02F}";
const string valueName = "NoTsf3Override5";

try
{
using RegistryKey key = Registry.CurrentUser.OpenSubKey(subKeyPath);
if (key != null)
{
return key.GetValue(valueName);
}
}
catch (System.Exception)
{
// Ignored
}

return null;
}

public static void OpenImeSettings()
{
try
{
Process.Start(new ProcessStartInfo("ms-settings:regionlanguage") { UseShellExecute = true });
}
catch (System.Exception)
{
// Ignored
}
}

#endregion
}
}
25 changes: 23 additions & 2 deletions Flow.Launcher/Languages/en.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,25 @@
<system:String x:Key="searchDelay">Search Delay</system:String>
<system:String x:Key="searchDelayToolTip">Adds a short delay while typing to reduce UI flicker and result load. Recommended if your typing speed is average.</system:String>
<system:String x:Key="searchDelayTime">Default Search Delay Time</system:String>
<system:String x:Key="searchDelayTimeToolTip">Wait time before showing results after typing stops. Higher values wait longer. (ms)</system:String>
<system:String x:Key="searchDelayTimeToolTip">Plugin default delay time after which search results appear when typing is stopped.</system:String>
<system:String x:Key="SearchDelayTimeVeryLong">Very long</system:String>
<system:String x:Key="SearchDelayTimeLong">Long</system:String>
<system:String x:Key="SearchDelayTimeNormal">Normal</system:String>
<system:String x:Key="SearchDelayTimeShort">Short</system:String>
<system:String x:Key="SearchDelayTimeVeryShort">Very short</system:String>
<system:String x:Key="KoreanImeTitle">Information for Korean IME user</system:String>
<system:String x:Key="KoreanImeGuide">
The Korean input method used in Windows 11 may cause some issues in Flow Launcher.&#x0a;
If you experience any problems, you may need to enable "Use previous version of Korean IME".&#x0a;&#x0a;
Open Setting in Windows 11 and go to:&#x0a;
Time &amp; Language &gt; Language &amp; Region &gt; Korean &gt; Language Options &gt; Keyboard - Microsoft IME &gt; Compatibility,&#x0a;
and enable "Use previous version of Microsoft IME".&#x0a;&#x0a;
</system:String>
<system:String x:Key="KoreanImeOpenLink">Open Language and Region System Settings</system:String>
<system:String x:Key="KoreanImeOpenLinkToolTip">Opens the Korean IME setting location. Go to Korean &gt; Language Options &gt; Keyboard - Microsoft IME &gt; Compatibility</system:String>
<system:String x:Key="KoreanImeOpenLinkButton">Open</system:String>
<system:String x:Key="KoreanImeRegistry">Use Previous Korean IME</system:String>
<system:String x:Key="KoreanImeRegistryTooltip">You can change the Previous Korean IME settings directly from here</system:String>

<!-- Setting Plugin -->
<system:String x:Key="searchplugin">Search Plugin</system:String>
Expand Down Expand Up @@ -148,6 +166,7 @@
<system:String x:Key="failedToRemovePluginSettingsMessage">Plugins: {0} - Fail to remove plugin settings files, please remove them manually</system:String>
<system:String x:Key="failedToRemovePluginCacheTitle">Fail to remove plugin cache</system:String>
<system:String x:Key="failedToRemovePluginCacheMessage">Plugins: {0} - Fail to remove plugin cache files, please remove them manually</system:String>
<system:String x:Key="default">Default</system:String>

<!-- Setting Plugin Store -->
<system:String x:Key="pluginStore">Plugin Store</system:String>
Expand Down Expand Up @@ -374,7 +393,9 @@

<!-- Search Delay Settings Dialog -->
<system:String x:Key="searchDelayTimeTitle">Search Delay Time Setting</system:String>
<system:String x:Key="searchDelayTimeTips">Input the search delay time in ms you like to use for the plugin. Input empty if you don't want to specify any, and the plugin will use default search delay time.</system:String>
<system:String x:Key="searchDelayTime_tips">Select the search delay time you like to use for the plugin. Select "{0}" if you don't want to specify any, and the plugin will use default search delay time.</system:String>
<system:String x:Key="currentSearchDelayTime">Current search delay time</system:String>
<system:String x:Key="newSearchDelayTime">New search delay time</system:String>

<!-- Custom Query Hotkey Dialog -->
<system:String x:Key="customeQueryHotkeyTitle">Custom Query Hotkey</system:String>
Expand Down
81 changes: 81 additions & 0 deletions Flow.Launcher/Resources/Controls/InfoBar.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<UserControl
x:Class="Flow.Launcher.Resources.Controls.InfoBar"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:cc="clr-namespace:Flow.Launcher.Resources.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.modernwpf.com/2019"
d:DesignHeight="45"
d:DesignWidth="400"
mc:Ignorable="d">
<UserControl.Resources />
<Grid>
<Border
x:Name="PART_Border"
MinHeight="48"
Padding="18 18 18 18"
Background="{DynamicResource InfoBarInfoBG}"
BorderBrush="{DynamicResource Color03B}"
BorderThickness="1"
CornerRadius="5">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" MinWidth="24" />
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" Orientation="Horizontal">
<Border
x:Name="PART_IconBorder"
Width="16"
Height="16"
Margin="0 0 12 0"
VerticalAlignment="Top"
CornerRadius="10">
<ui:FontIcon
x:Name="PART_Icon"
Margin="1 0 0 1"
VerticalAlignment="Center"
FontFamily="Segoe MDL2 Assets"
FontSize="13"
Foreground="{DynamicResource Color01B}"
Visibility="Visible" />
</Border>

</StackPanel>
<StackPanel
x:Name="PART_StackPanel"
Grid.Column="1"
VerticalAlignment="Center"
Orientation="Horizontal">
<TextBlock
x:Name="PART_Title"
Margin="0 0 12 0"
FontWeight="SemiBold"
Foreground="{DynamicResource Color05B}"
Text="{Binding RelativeSource={RelativeSource AncestorType=cc:InfoBar}, Path=Title}" />
<TextBlock
x:Name="PART_Message"
Foreground="{DynamicResource Color05B}"
Text="{Binding RelativeSource={RelativeSource AncestorType=cc:InfoBar}, Path=Message}"
TextWrapping="Wrap" />
</StackPanel>

<Button
x:Name="PART_CloseButton"
Grid.Column="2"
Width="32"
Height="32"
VerticalAlignment="Center"
AutomationProperties.Name="Close InfoBar"
Click="PART_CloseButton_Click"
Content="&#xE10A;"
FontFamily="Segoe MDL2 Assets"
FontSize="12"
ToolTip="Close"
Visibility="Visible" />
</Grid>
</Border>
</Grid>
</UserControl>
Loading
Loading