-
-
Notifications
You must be signed in to change notification settings - Fork 620
Expand file tree
/
Copy pathDialogJumpResult.cs
More file actions
94 lines (92 loc) · 3.74 KB
/
Copy pathDialogJumpResult.cs
File metadata and controls
94 lines (92 loc) · 3.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
namespace Flow.Launcher.Plugin
{
/// <summary>
/// Describes a result of a <see cref="Query"/> executed by a plugin in Dialog Jump window
/// </summary>
public class DialogJumpResult : Result
{
/// <summary>
/// This holds the path which can be provided by plugin to be navigated to the
/// file dialog when records in Dialog Jump window is right clicked on a result.
/// </summary>
public required string DialogJumpPath { get; init; }
/// <summary>
/// Clones the current Dialog Jump result
/// </summary>
public new DialogJumpResult Clone()
{
return new DialogJumpResult
{
Title = Title,
SubTitle = SubTitle,
ActionKeywordAssigned = ActionKeywordAssigned,
CopyText = CopyText,
AutoCompleteText = AutoCompleteText,
IcoPath = IcoPath,
BadgeIcoPath = BadgeIcoPathRaw,
RoundedIcon = RoundedIcon,
Icon = Icon,
BadgeIcon = BadgeIcon,
Glyph = Glyph,
Action = Action,
AsyncAction = AsyncAction,
Score = Score,
TitleHighlightData = TitleHighlightData,
OriginQuery = OriginQuery,
PluginDirectory = PluginDirectory,
ContextData = ContextData,
PluginID = PluginID,
TitleToolTip = TitleToolTip,
SubTitleToolTip = SubTitleToolTip,
PreviewPanel = PreviewPanel,
ProgressBar = ProgressBar,
ProgressBarColor = ProgressBarColor,
Preview = Preview.Copy(),
AddSelectedCount = AddSelectedCount,
RecordKey = RecordKey,
ShowBadge = ShowBadge,
QuerySuggestionText = QuerySuggestionText,
DialogJumpPath = DialogJumpPath
};
}
/// <summary>
/// Convert <see cref="Result"/> to <see cref="DialogJumpResult"/>.
/// </summary>
public static DialogJumpResult From(Result result, string dialogJumpPath)
{
return new DialogJumpResult
{
Title = result.Title,
SubTitle = result.SubTitle,
ActionKeywordAssigned = result.ActionKeywordAssigned,
CopyText = result.CopyText,
AutoCompleteText = result.AutoCompleteText,
IcoPath = result.IcoPath,
BadgeIcoPath = result.BadgeIcoPathRaw,
RoundedIcon = result.RoundedIcon,
Icon = result.Icon,
BadgeIcon = result.BadgeIcon,
Glyph = result.Glyph,
Action = result.Action,
AsyncAction = result.AsyncAction,
Score = result.Score,
TitleHighlightData = result.TitleHighlightData,
OriginQuery = result.OriginQuery,
PluginDirectory = result.PluginDirectory,
ContextData = result.ContextData,
PluginID = result.PluginID,
TitleToolTip = result.TitleToolTip,
SubTitleToolTip = result.SubTitleToolTip,
PreviewPanel = result.PreviewPanel,
ProgressBar = result.ProgressBar,
ProgressBarColor = result.ProgressBarColor,
Preview = result.Preview.Copy(),
AddSelectedCount = result.AddSelectedCount,
RecordKey = result.RecordKey,
ShowBadge = result.ShowBadge,
QuerySuggestionText = result.QuerySuggestionText,
DialogJumpPath = dialogJumpPath
};
}
}
}