Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
f3504b8
refresh Nuget publish
jjw24 Dec 9, 2021
1f64dc8
Merge pull request #887 from Flow-Launcher/refresh_nuget_publish
jjw24 Dec 9, 2021
0a35810
Adjust label width in CustomQueryHotkey
onesounds Dec 10, 2021
fac1b3a
Change Checkbox position right to left
onesounds Dec 10, 2021
64c2373
Merge branch 'dev' into pluginmanagercheckbox
onesounds Dec 10, 2021
d1047c9
Change Wizard window to modal (when open in settingwindow only)
onesounds Dec 10, 2021
d573c48
Add Autocomplete Key (Page3) in Wizard
onesounds Dec 10, 2021
1a49178
Add Subtext Highlight Setting
onesounds Dec 10, 2021
bdd5d24
Change Label width to responsive
onesounds Dec 10, 2021
0acd2e1
Revert "Add Subtext Highlight Setting"
onesounds Dec 10, 2021
f1c46d1
Remove Subtitle Highlight
onesounds Dec 10, 2021
f449ef7
Change Priority numberbox box to possible negative number
onesounds Dec 11, 2021
33be8f9
Revert "Change Priority numberbox box to possible negative number"
onesounds Dec 11, 2021
72aaf06
Remove "Minimum = 0" in Priority
onesounds Dec 11, 2021
f42d6a1
Change Toggle on/off string to hardcode text
onesounds Dec 11, 2021
b2184c3
Change Hardcoded toggle on/off label to string
onesounds Dec 11, 2021
261fdd0
Change Toggle Switch Width to responsive
onesounds Dec 11, 2021
df97be7
Merge pull request #888 from onesounds/pluginmanagercheckbox
jjw24 Dec 12, 2021
d08f47f
Change Lastquery Combobox to responsive
onesounds Dec 14, 2021
405a33c
Fix Shell Plugin Checkbox
onesounds Dec 14, 2021
0b5c77e
Change Button Sizes in Explorer Setting Panel
onesounds Dec 14, 2021
6095d0b
- Change Hardcoded text to string
onesounds Dec 14, 2021
3f1f23b
Change Bookmark layout to responsive
onesounds Dec 14, 2021
564349c
Change Actionkeyword hardcoded tooltip to string
onesounds Dec 14, 2021
baeb454
Change Plugin Author Width to responsive
onesounds Dec 15, 2021
213396b
Change Plugin Information area to responsive
onesounds Dec 15, 2021
5a75f76
Change Default Browser Area to responsive
onesounds Dec 15, 2021
bf6fbf7
Adjust Layout in CustomBrowserSetting in Bookmark Plugin
onesounds Dec 15, 2021
968315a
Adjust Layout custombrowsersetting in bookmark plugin
onesounds Dec 15, 2021
f279c20
Adjust File Manager Window
onesounds Dec 15, 2021
c82306f
Add Default Browser Setting Strings in Portugee
onesounds Dec 15, 2021
3b5b3ab
Add BookmarkData Window Title String in portugee
onesounds Dec 15, 2021
9965063
Adjust Color Scheme Button Size
onesounds Dec 15, 2021
979c89d
Adjust Calculator layout to responsive
onesounds Dec 15, 2021
70e48af
Update Korean language
onesounds Dec 15, 2021
21ddf4c
Add Korean Strings
onesounds Dec 15, 2021
155156f
Add String in ContextMenu
onesounds Dec 15, 2021
2ce5260
Adjust Korean String in WindowsSetting
onesounds Dec 15, 2021
70e4414
Merge branch 'dev' into HotfixToggleSwitch
onesounds Dec 15, 2021
d7d567e
Change Searchsource Window layout to responsive (in WebSearch Plugin)
onesounds Dec 15, 2021
48ef53f
Change CustomQueryHotkeyWindow to Responsive
onesounds Dec 15, 2021
f63f221
Change CustomHotkey/Install Buttons in Setting windows to responsive
onesounds Dec 15, 2021
739bf20
Delay Hotkey register & use safe way calling mainwindow animation
taooceros Dec 16, 2021
04c92b0
Delay till assign to Current.MainWindow
taooceros Dec 16, 2021
a8331af
Adjust Vertical Aligment and margins
onesounds Dec 16, 2021
31ce34b
Adjust TextBlock Margin
onesounds Dec 17, 2021
a05f2bb
Adjust Control Aligment
onesounds Dec 17, 2021
f8eafb4
Adjust Shell plugin layout
onesounds Dec 17, 2021
5d2368a
Merge pull request #895 from onesounds/HotfixToggleSwitch
jjw24 Dec 19, 2021
6911cad
version bump plugins
jjw24 Dec 19, 2021
f54409a
Merge pull request #910 from onesounds/PythonSettingPanelStyle
jjw24 Dec 19, 2021
44e5e46
Merge pull request #916 from Flow-Launcher/bump_version_fix_width
jjw24 Dec 19, 2021
9bf7568
Add offset
Garulf Dec 19, 2021
aa850ff
Incease offset to fix context menu triggering alignment issue
Garulf Dec 19, 2021
5ae9ee4
Suppress Startup Manifest Download Error Notification
taooceros Dec 19, 2021
a42df2a
Suppress Startup Update error Notifcation
taooceros Dec 19, 2021
b487b6b
Update Flow.Launcher/ViewModel/MainViewModel.cs
taooceros Dec 19, 2021
6510671
Refacotr code
taooceros Dec 19, 2021
c3e3eec
Fix Priviate to Private
onesounds Dec 19, 2021
8fc0274
Fix Bookmmark to Bookmark
onesounds Dec 19, 2021
7841b6f
Merge pull request #922 from onesounds/FixPrivateText
jjw24 Dec 19, 2021
60ee43d
fix bookmark string
taooceros Dec 19, 2021
7d9bd3a
version bump PluginsManager
jjw24 Dec 19, 2021
3b2ab46
Merge pull request #920 from Flow-Launcher/remove-startup-notification
jjw24 Dec 19, 2021
99ba1b7
fix key name
jjw24 Dec 19, 2021
7e1f041
Merge remote-tracking branch 'origin/dev' into fixSourceString
jjw24 Dec 19, 2021
c9727ea
Merge pull request #923 from Flow-Launcher/fixSourceString
jjw24 Dec 19, 2021
aafbdeb
Allow adjustment of offset in settings file
Garulf Dec 20, 2021
c3ceed1
Revert "Allow adjustment of offset in settings file"
Garulf Dec 20, 2021
85c58a9
Derive offset from Right side Textbox padding
Garulf Dec 20, 2021
58317b7
rename showSound to animationSound
jjw24 Dec 20, 2021
301dd61
lowercase variable name
jjw24 Dec 20, 2021
83a357a
Merge pull request #908 from Flow-Launcher/FixNullReferenceError
jjw24 Dec 20, 2021
47c4023
Merge pull request #918 from Garulf/fix-offset-suggestion-text
jjw24 Dec 20, 2021
6f9a879
remove subtitle highlighting code
jjw24 Dec 20, 2021
a53760b
formatting
jjw24 Dec 22, 2021
bf0e4ba
fix Executable plugin's JsonRPC request string
jjw24 Dec 24, 2021
aedb738
Use Dynamic resource for NewTab & NewWindow
taooceros Dec 28, 2021
9bad050
Include Flow.Launcher.Plguin xml document when debug
taooceros Dec 29, 2021
73a6055
Update xml docs
taooceros Dec 29, 2021
b819c79
add score default value
taooceros Dec 29, 2021
e9ceec5
Update Flow.Launcher.Plugin/Result.cs
taooceros Dec 30, 2021
7bf4fdd
Update Flow.Launcher.Plugin/Result.cs
taooceros Dec 30, 2021
45bd31f
update docs
taooceros Dec 30, 2021
ab61f5b
fix grammar
taooceros Dec 30, 2021
b70d198
Merge pull request #936 from Flow-Launcher/browserWindowText
onesounds Dec 31, 2021
73461bb
Merge pull request #927 from Flow-Launcher/fix_typescript_plugin_request
jjw24 Dec 31, 2021
701a5d4
Update translations from Crowdin(#880)
taooceros Dec 31, 2021
65d8807
bump plugin versions
jjw24 Dec 31, 2021
07760f4
version bump
jjw24 Dec 31, 2021
1b1800f
Update Flow.Launcher.Plugin/Result.cs
taooceros Dec 31, 2021
b0a86ce
fix move cursor to the end when it is not called from main thread
taooceros Dec 31, 2021
6cabc16
Merge pull request #942 from Flow-Launcher/fixCursorMultiThreadIssue
jjw24 Jan 1, 2022
288bf4c
version bump plugins
jjw24 Jan 1, 2022
4d598cd
bump Plugin project version
jjw24 Jan 1, 2022
c2d992d
Merge pull request #890 from onesounds/RemovePathHighlight
jjw24 Jan 1, 2022
7dd5c12
Merge pull request #941 from Flow-Launcher/release_version_bump
jjw24 Jan 1, 2022
ff3224b
revert Result.OriginQuery to internal
JohnTheGr8 Jan 1, 2022
f6d8d3e
Merge pull request #938 from Flow-Launcher/UpdateXMLDoc
jjw24 Jan 1, 2022
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
2 changes: 1 addition & 1 deletion Flow.Launcher.Core/ExternalPlugins/PluginsManifest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public static Task UpdateManifestAsync()
return UpdateTask = DownloadManifestAsync();
}

private async static Task DownloadManifestAsync()
private static async Task DownloadManifestAsync()
{
try
{
Expand Down
14 changes: 9 additions & 5 deletions Flow.Launcher.Core/Plugin/ExecutablePlugin.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Diagnostics;
using System.Diagnostics;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
Expand All @@ -22,18 +21,23 @@ public ExecutablePlugin(string filename)
RedirectStandardOutput = true,
RedirectStandardError = true
};

// required initialisation for below request calls
_startInfo.ArgumentList.Add(string.Empty);
}

protected override Task<Stream> RequestAsync(JsonRPCRequestModel request, CancellationToken token = default)
{
_startInfo.Arguments = $"\"{request}\"";
// since this is not static, request strings will build up in ArgumentList if index is not specified
_startInfo.ArgumentList[0] = request.ToString();
return ExecuteAsync(_startInfo, token);
}

protected override string Request(JsonRPCRequestModel rpcRequest, CancellationToken token = default)
{
_startInfo.Arguments = $"\"{rpcRequest}\"";
// since this is not static, request strings will build up in ArgumentList if index is not specified
_startInfo.ArgumentList[0] = rpcRequest.ToString();
return Execute(_startInfo);
}
}
}
}
19 changes: 12 additions & 7 deletions Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,9 @@ public virtual async Task InitAsync(PluginInitContext context)
this.context = context;
await InitSettingAsync();
}
private static readonly Thickness settingControlMargin = new(10);
private static readonly Thickness settingControlMargin = new(10, 4, 10, 4);
private static readonly Thickness settingPanelMargin = new(15, 20, 15, 20);
private static readonly Thickness settingTextBlockMargin = new(10, 4, 10, 4);
private JsonRpcConfigurationModel _settingsTemplate;
public Control CreateSettingPanel()
{
Expand All @@ -363,7 +365,7 @@ public Control CreateSettingPanel()
var settingWindow = new UserControl();
var mainPanel = new StackPanel
{
Margin = settingControlMargin,
Margin = settingPanelMargin,
Orientation = Orientation.Vertical
};
settingWindow.Content = mainPanel;
Expand All @@ -375,10 +377,13 @@ public Control CreateSettingPanel()
Orientation = Orientation.Horizontal,
Margin = settingControlMargin
};
var name = new Label()
var name = new TextBlock()
{
Content = attribute.Label,
Margin = settingControlMargin
Text = attribute.Label,
Width = 120,
VerticalAlignment = VerticalAlignment.Center,
Margin = settingControlMargin,
TextWrapping = TextWrapping.WrapWithOverflow
};

FrameworkElement contentControl;
Expand All @@ -390,8 +395,8 @@ public Control CreateSettingPanel()
contentControl = new TextBlock
{
Text = attribute.Description.Replace("\\r\\n", "\r\n"),
Margin = settingControlMargin,
MaxWidth = 400,
Margin = settingTextBlockMargin,
MaxWidth = 500,
TextWrapping = TextWrapping.WrapWithOverflow
};
break;
Expand Down
7 changes: 4 additions & 3 deletions Flow.Launcher.Core/Updater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,9 @@ public async Task UpdateAppAsync(IPublicAPI api, bool silentUpdate = true)
catch (Exception e) when (e is HttpRequestException or WebException or SocketException || e.InnerException is TimeoutException)
{
Log.Exception($"|Updater.UpdateApp|Check your connection and proxy settings to github-cloud.s3.amazonaws.com.", e);
api.ShowMsg(api.GetTranslation("update_flowlauncher_fail"),
api.GetTranslation("update_flowlauncher_check_connection"));
if (!silentUpdate)
api.ShowMsg(api.GetTranslation("update_flowlauncher_fail"),
api.GetTranslation("update_flowlauncher_check_connection"));
}
finally
{
Expand Down Expand Up @@ -124,7 +125,7 @@ private async Task<UpdateManager> GitHubUpdateManager(string repository)
var releases = await System.Text.Json.JsonSerializer.DeserializeAsync<List<GithubRelease>>(jsonStream).ConfigureAwait(false);
var latest = releases.Where(r => !r.Prerelease).OrderByDescending(r => r.PublishedAt).First();
var latestUrl = latest.HtmlUrl.Replace("/tag/", "/download/");

var client = new WebClient
{
Proxy = Http.WebProxy
Expand Down
11 changes: 6 additions & 5 deletions Flow.Launcher.Plugin/Flow.Launcher.Plugin.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0-windows</TargetFramework>
Expand All @@ -14,10 +14,10 @@
</PropertyGroup>

<PropertyGroup>
<Version>2.1.0</Version>
<PackageVersion>2.1.0</PackageVersion>
<AssemblyVersion>2.1.0</AssemblyVersion>
<FileVersion>2.1.0</FileVersion>
<Version>2.1.1</Version>
<PackageVersion>2.1.1</PackageVersion>
<AssemblyVersion>2.1.1</AssemblyVersion>
<FileVersion>2.1.1</FileVersion>
<PackageId>Flow.Launcher.Plugin</PackageId>
<Authors>Flow-Launcher</Authors>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand All @@ -42,6 +42,7 @@
<WarningLevel>4</WarningLevel>
<PlatformTarget>AnyCPU</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
<DocumentationFile>..\Output\Debug\Flow.Launcher.Plugin.xml</DocumentationFile>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
Expand Down
5 changes: 5 additions & 0 deletions Flow.Launcher.Plugin/GlyphInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,10 @@

namespace Flow.Launcher.Plugin
{
/// <summary>
/// Text with FontFamily specified
/// </summary>
/// <param name="FontFamily">Font Family of this Glyph</param>
/// <param name="Glyph">Text/Unicode of the Glyph</param>
public record GlyphInfo(string FontFamily, string Glyph);
}
43 changes: 28 additions & 15 deletions Flow.Launcher.Plugin/Result.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.IO;
using System.Windows.Media;
Expand All @@ -10,11 +10,11 @@ public class Result
{

private string _pluginDirectory;

private string _icoPath;

/// <summary>
/// Provides the title of the result. This is always required.
/// The title of the result. This is always required.
/// </summary>
public string Title { get; set; }

Expand All @@ -36,6 +36,11 @@ public class Result
/// </summary>
public string AutoCompleteText { get; set; }

/// <summary>
/// Image Displayed on the result
/// <value>Relative Path to the Image File</value>
/// <remarks>GlyphInfo is prioritized if not null</remarks>
/// </summary>
public string IcoPath
{
get { return _icoPath; }
Expand All @@ -60,30 +65,35 @@ public string IcoPath
public IconDelegate Icon;

/// <summary>
/// Information for Glyph Icon
/// Information for Glyph Icon (Prioritized than IcoPath/Icon if user enable Glyph Icons)
/// </summary>
public GlyphInfo Glyph { get; init; }
public GlyphInfo Glyph { get; init; }


/// <summary>
/// return true to hide flowlauncher after select result
/// Delegate. An action to take in the form of a function call when the result has been selected
/// <returns>
/// true to hide flowlauncher after select result
/// </returns>
/// </summary>
public Func<ActionContext, bool> Action { get; set; }

/// <summary>
/// Priority of the current result
/// <value>default: 0</value>
/// </summary>
public int Score { get; set; }

/// <summary>
/// A list of indexes for the characters to be highlighted in Title
/// </summary>
public IList<int> TitleHighlightData { get; set; }

/// <summary>
/// A list of indexes for the characters to be highlighted in SubTitle
/// </summary>
[Obsolete("Deprecated as of Flow Launcher v1.9.1. Subtitle highlighting is no longer offered")]
public IList<int> SubTitleHighlightData { get; set; }

/// <summary>
/// Only results that originQuery match with current query will be displayed in the panel
/// Query information associated with the result
/// </summary>
internal Query OriginQuery { get; set; }

Expand All @@ -103,35 +113,38 @@ public string PluginDirectory
}
}

/// <inheritdoc />
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?.IcoPath, IcoPath) &&
TitleHighlightData == r.TitleHighlightData &&
SubTitleHighlightData == r.SubTitleHighlightData;
TitleHighlightData == r.TitleHighlightData;

return equality;
}

/// <inheritdoc />
public override int GetHashCode()
{
var hashcode = (Title?.GetHashCode() ?? 0) ^
(SubTitle?.GetHashCode() ?? 0);
return hashcode;
}

/// <inheritdoc />
public override string ToString()
{
return Title + SubTitle;
}

public Result() { }

/// <summary>
/// Additional data associate with this result
/// Additional data associated with this result
/// <example>
/// As external information for ContextMenu
/// </example>
/// </summary>
public object ContextData { get; set; }

Expand Down
4 changes: 2 additions & 2 deletions Flow.Launcher/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ await Stopwatch.NormalAsync("|App.OnStartup|Startup cost", async () =>
PluginManager.LoadPlugins(_settings.PluginSettings);
_mainVM = new MainViewModel(_settings);

HotKeyMapper.Initialize(_mainVM);

API = new PublicAPIInstance(_settingsVM, _mainVM, _alphabet);

Http.API = API;
Expand All @@ -83,6 +81,8 @@ await Stopwatch.NormalAsync("|App.OnStartup|Startup cost", async () =>

Current.MainWindow = window;
Current.MainWindow.Title = Constant.FlowLauncher;

HotKeyMapper.Initialize(_mainVM);

// happlebao todo temp fix for instance code logic
// load plugin before change language, because plugin language also needs be changed
Expand Down
5 changes: 4 additions & 1 deletion Flow.Launcher/Converters/QuerySuggestionBoxConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ public object Convert(object[] values, Type targetType, object parameter, Cultur
// Check if Text will be larger then our QueryTextBox
System.Windows.Media.Typeface typeface = new Typeface(QueryTextBox.FontFamily, QueryTextBox.FontStyle, QueryTextBox.FontWeight, QueryTextBox.FontStretch);
System.Windows.Media.FormattedText ft = new FormattedText(QueryTextBox.Text, System.Globalization.CultureInfo.CurrentCulture, System.Windows.FlowDirection.LeftToRight, typeface, QueryTextBox.FontSize, Brushes.Black);
if (ft.Width > QueryTextBox.ActualWidth || QueryTextBox.HorizontalOffset != 0)

var offset = QueryTextBox.Padding.Right;

if ((ft.Width + offset) > QueryTextBox.ActualWidth || QueryTextBox.HorizontalOffset != 0)
{
return string.Empty;
};
Expand Down
Loading