Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 1 addition & 5 deletions Flow.Launcher.Core/Plugin/QueryBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public static Query Build(string text, Dictionary<string, PluginPair> nonGlobalP
else
{ // non action keyword
actionKeyword = string.Empty;
actionParameters = terms.ToList();
search = rawQuery;
}

Expand All @@ -38,10 +37,7 @@ public static Query Build(string text, Dictionary<string, PluginPair> nonGlobalP
Terms = terms,
RawQuery = rawQuery,
ActionKeyword = actionKeyword,
Search = search,
// Obsolete value initialisation
ActionName = actionKeyword,
ActionParameters = actionParameters
Search = search
};

return query;
Expand Down
21 changes: 0 additions & 21 deletions Flow.Launcher.Infrastructure/Alphabet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,27 +95,6 @@ public void Save()
private static string[] EmptyStringArray = new string[0];
private static string[][] Empty2DStringArray = new string[0][];

[Obsolete("Not accurate, eg 音乐 will not return yinyue but returns yinle ")]
/// <summary>
/// replace chinese character with pinyin, non chinese character won't be modified
/// <param name="word"> should be word or sentence, instead of single character. e.g. 微软 </param>
/// </summary>
public string[] Pinyin(string word)
{
if (!_settings.ShouldUsePinyin)
{
return EmptyStringArray;
}

var pinyin = word.Select(c =>
{
var pinyins = PinyinHelper.toHanyuPinyinStringArray(c);
var result = pinyins == null ? c.ToString() : pinyins[0];
return result;
}).ToArray();
return pinyin;
}

/// <summmary>
/// replace chinese character with pinyin, non chinese character won't be modified
/// Because we don't have words dictionary, so we can only return all possiblie pinyin combination
Expand Down
32 changes: 0 additions & 32 deletions Flow.Launcher.Infrastructure/FuzzyMatcher.cs

This file was deleted.

24 changes: 0 additions & 24 deletions Flow.Launcher.Infrastructure/StringMatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,6 @@ public StringMatcher(IAlphabet alphabet = null)

public static StringMatcher Instance { get; internal set; }

[Obsolete("This method is obsolete and should not be used. Please use the static function StringMatcher.FuzzySearch")]
public static int Score(string source, string target)
{
return FuzzySearch(target, source).Score;
}

[Obsolete("This method is obsolete and should not be used. Please use the static function StringMatcher.FuzzySearch")]
public static bool IsMatch(string source, string target)
{
return Score(source, target) > 0;
}

public static MatchResult FuzzySearch(string query, string stringToCompare)
{
return Instance.FuzzyMatch(query, stringToCompare);
Expand Down Expand Up @@ -323,18 +311,6 @@ private int ScoreAfterSearchPrecisionFilter(int rawScore)

public class MatchOption
{
/// <summary>
/// prefix of match char, use for highlight
/// </summary>
[Obsolete("this is never used")]
public string Prefix { get; set; } = "";

/// <summary>
/// suffix of match char, use for highlight
/// </summary>
[Obsolete("this is never used")]
public string Suffix { get; set; } = "";

public bool IgnoreCase { get; set; } = true;
}
}
14 changes: 0 additions & 14 deletions Flow.Launcher.Infrastructure/UserSettings/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,6 @@ public string QuerySearchPrecisionString
public PluginsSettings PluginSettings { get; set; } = new PluginsSettings();
public ObservableCollection<CustomPluginHotkey> CustomPluginHotkeys { get; set; } = new ObservableCollection<CustomPluginHotkey>();

[Obsolete]
public double Opacity { get; set; } = 1;

[Obsolete]
public OpacityMode OpacityMode { get; set; } = OpacityMode.Normal;

public bool DontPromptUpdateMsg { get; set; }
public bool EnableUpdateLog { get; set; }

Expand Down Expand Up @@ -108,12 +102,4 @@ public enum LastQueryMode
Empty,
Preserved
}

[Obsolete]
public enum OpacityMode
{
Normal = 0,
LayeredWindow = 1,
DWM = 2
}
}
17 changes: 0 additions & 17 deletions Flow.Launcher.Plugin/Feature.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,6 @@ public interface IContextMenu : IFeatures
List<Result> LoadContextMenus(Result selectedResult);
}

[Obsolete("If a plugin has a action keyword, then it is exclusive. This interface will be remove in v1.3.0")]
public interface IExclusiveQuery : IFeatures
{
[Obsolete("If a plugin has a action keyword, then it is exclusive. This method will be remove in v1.3.0")]
bool IsExclusiveQuery(Query query);
}

/// <summary>
/// Represent plugin query will be executed in UI thread directly. Don't do long-running operation in Query method if you implement this interface
/// <remarks>This will improve the performance of instant search like websearch or cmd plugin</remarks>
/// </summary>
[Obsolete("Flow Launcher is fast enough now, executed on ui thread is no longer needed")]
public interface IInstantQuery : IFeatures
{
bool IsInstantQuery(string query);
}

/// <summary>
/// Represent plugins that support internationalization
/// </summary>
Expand Down
9 changes: 0 additions & 9 deletions Flow.Launcher.Plugin/Features/IContextMenu.cs

This file was deleted.

9 changes: 0 additions & 9 deletions Flow.Launcher.Plugin/Features/IExclusiveQuery.cs

This file was deleted.

9 changes: 0 additions & 9 deletions Flow.Launcher.Plugin/Features/IInstantQuery.cs

This file was deleted.

8 changes: 4 additions & 4 deletions Flow.Launcher.Plugin/Flow.Launcher.Plugin.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
</PropertyGroup>

<PropertyGroup>
<Version>1.1.0</Version>
<PackageVersion>1.1.0</PackageVersion>
<AssemblyVersion>1.1.0</AssemblyVersion>
<FileVersion>1.1.0</FileVersion>
<Version>1.2.0</Version>
<PackageVersion>1.2.0</PackageVersion>
<AssemblyVersion>1.2.0</AssemblyVersion>
<FileVersion>1.2.0</FileVersion>
<PackageId>Flow.Launcher.Plugin</PackageId>
<Authors>Flow-Launcher</Authors>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand Down
52 changes: 0 additions & 52 deletions Flow.Launcher.Plugin/IPublicAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,6 @@ namespace Flow.Launcher.Plugin
/// </summary>
public interface IPublicAPI
{
/// <summary>
/// Push result to query box
/// </summary>
/// <param name="query"></param>
/// <param name="plugin"></param>
/// <param name="results"></param>
[Obsolete("This method will be removed in Flow Launcher 1.3")]
void PushResults(Query query, PluginMetadata plugin, List<Result> results);

/// <summary>
/// Change Flow.Launcher query
/// </summary>
Expand All @@ -27,42 +18,11 @@ public interface IPublicAPI
/// </param>
void ChangeQuery(string query, bool requery = false);

/// <summary>
/// Just change the query text, this won't raise search
/// </summary>
/// <param name="query"></param>
[Obsolete]
void ChangeQueryText(string query, bool selectAll = false);

/// <summary>
/// Close Flow Launcher
/// </summary>
[Obsolete]
void CloseApp();

/// <summary>
/// Restart Flow Launcher
/// </summary>
void RestartApp();

/// <summary>
/// Restart Flow Launcher
/// </summary>
[Obsolete("Use RestartApp instead. This method will be removed in Flow Launcher 1.3")]
void RestarApp();

/// <summary>
/// Hide Flow Launcher
/// </summary>
[Obsolete]
void HideApp();

/// <summary>
/// Show Flow Launcher
/// </summary>
[Obsolete]
void ShowApp();

/// <summary>
/// Save all Flow Launcher settings
/// </summary>
Expand Down Expand Up @@ -103,18 +63,6 @@ public interface IPublicAPI
/// </summary>
void OpenSettingDialog();

/// <summary>
/// Show loading animation
/// </summary>
[Obsolete("automatically start")]
void StartLoadingBar();

/// <summary>
/// Stop loading animation
/// </summary>
[Obsolete("automatically stop")]
void StopLoadingBar();

/// <summary>
/// Install Flow Launcher plugin
/// </summary>
Expand Down
3 changes: 0 additions & 3 deletions Flow.Launcher.Plugin/PluginMetadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ public override string ToString()
return Name;
}

[Obsolete("Use IcoPath")]
public string FullIcoPath => IcoPath;

/// <summary>
/// Init time include both plugin load time and init time
/// </summary>
Expand Down
9 changes: 0 additions & 9 deletions Flow.Launcher.Plugin/Query.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,5 @@ private string SplitSearch(int index)
}

public override string ToString() => RawQuery;

[Obsolete("Use ActionKeyword, this property will be removed in v1.3.0")]
public string ActionName { get; internal set; }

[Obsolete("Use Search instead, this property will be removed in v1.3.0")]
public List<string> ActionParameters { get; internal set; }

[Obsolete("Use Search instead, this method will be removed in v1.3.0")]
public string GetAllRemainingParameter() => Search;
}
}
15 changes: 0 additions & 15 deletions Flow.Launcher.Plugin/Result.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,21 +104,6 @@ public override string ToString()
return Title + SubTitle;
}


/// <summary>
/// Context menus associate with this result
/// </summary>
[Obsolete("Use IContextMenu instead")]
public List<Result> ContextMenu { get; set; }

[Obsolete("Use Object initializer instead")]
public Result(string Title, string IcoPath, string SubTitle = null)
{
this.Title = Title;
this.IcoPath = IcoPath;
this.SubTitle = SubTitle;
}

public Result() { }

/// <summary>
Expand Down
33 changes: 0 additions & 33 deletions Flow.Launcher/PublicAPIInstance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,6 @@ public void ChangeQueryText(string query, bool selectAll = false)
_mainVM.ChangeQueryText(query);
}

[Obsolete]
public void CloseApp()
{
Application.Current.MainWindow.Close();
}

public void RestartApp()
{
_mainVM.MainWindowVisibility = Visibility.Hidden;
Expand Down Expand Up @@ -90,18 +84,6 @@ public void ReloadAllPluginData()
PluginManager.ReloadData();
}

[Obsolete]
public void HideApp()
{
_mainVM.MainWindowVisibility = Visibility.Hidden;
}

[Obsolete]
public void ShowApp()
{
_mainVM.MainWindowVisibility = Visibility.Visible;
}

public void ShowMsg(string title, string subTitle = "", string iconPath = "")
{
ShowMsg(title, subTitle, iconPath, true);
Expand Down Expand Up @@ -151,21 +133,6 @@ public List<PluginPair> GetAllPlugins()

public event FlowLauncherGlobalKeyboardEventHandler GlobalKeyboardEvent;

[Obsolete("This will be removed in Flow Launcher 1.3")]
public void PushResults(Query query, PluginMetadata plugin, List<Result> results)
{
results.ForEach(o =>
{
o.PluginDirectory = plugin.PluginDirectory;
o.PluginID = plugin.ID;
o.OriginQuery = query;
});
Task.Run(() =>
{
_mainVM.UpdateResultView(results, plugin, query);
});
}

#endregion

#region Private Methods
Expand Down
Loading