@@ -17,7 +17,8 @@ public class ResultCreator
17
17
private readonly IconProvider iconProvider ;
18
18
19
19
private const string PathSeparator = " > " ;
20
- private const string Unread = "\u2022 " ;
20
+ private const string BulletPoint = "\u2022 " ;
21
+ private const string TrianglePoint = "\u2023 " ;
21
22
22
23
private string ActionKeyword => context . CurrentPluginMetadata . ActionKeyword ;
23
24
public ResultCreator ( PluginInitContext context , Settings settings , IconProvider iconProvider )
@@ -36,14 +37,14 @@ private string GetTitle(IOneNoteItem item, List<int> highlightData)
36
37
if ( ! item . IsUnread || ! settings . ShowUnread )
37
38
return title ;
38
39
39
- title = title . Insert ( 0 , Unread ) ;
40
+ title = title . Insert ( 0 , BulletPoint ) ;
40
41
41
42
if ( highlightData == null )
42
43
return title ;
43
44
44
45
for ( int i = 0 ; i < highlightData . Count ; i ++ )
45
46
{
46
- highlightData [ i ] += Unread . Length ;
47
+ highlightData [ i ] += BulletPoint . Length ;
47
48
}
48
49
return title ;
49
50
@@ -143,19 +144,30 @@ public Result CreateOneNoteItemResult(IOneNoteItem item, bool actionIsAutoComple
143
144
{
144
145
case OneNoteNotebook notebook :
145
146
toolTip =
146
- $ "Last Modified:\t { notebook . LastModified : F} \n " +
147
- $ "Sections:\t \t { notebook . Sections . Count ( ) } \n " +
148
- $ "Sections Groups:\t { notebook . SectionGroups . Count ( ) } ";
147
+ $ """
148
+ Last Modified:
149
+ { TrianglePoint } { notebook . LastModified : F}
150
+
151
+ Contains:
152
+ { TrianglePoint } { "section group" . ToQuantity ( notebook . SectionGroups . Count ( ) ) }
153
+ { TrianglePoint } { "section" . ToQuantity ( notebook . Sections . Count ( ) ) }
154
+ { TrianglePoint } { "page" . ToQuantity ( notebook . GetPages ( ) . Count ( ) ) }
155
+ """ ;
149
156
150
157
subTitle = string . Empty ;
151
158
iconInfo = new IconGeneratorInfo ( notebook ) ;
152
159
break ;
153
160
case OneNoteSectionGroup sectionGroup :
154
161
toolTip =
155
- $ "Path:\t \t { subTitle } \n " +
156
- $ "Last Modified:\t { sectionGroup . LastModified : F} \n " +
157
- $ "Sections:\t \t { sectionGroup . Sections . Count ( ) } \n " +
158
- $ "Sections Groups:\t { sectionGroup . SectionGroups . Count ( ) } ";
162
+ $ """
163
+ Last Modified:
164
+ { TrianglePoint } { sectionGroup . LastModified : F}
165
+
166
+ Contains:
167
+ { TrianglePoint } { "section group" . ToQuantity ( sectionGroup . SectionGroups . Count ( ) ) }
168
+ { TrianglePoint } { "section" . ToQuantity ( sectionGroup . Sections . Count ( ) ) }
169
+ { TrianglePoint } { "page" . ToQuantity ( sectionGroup . GetPages ( ) . Count ( ) ) }
170
+ """ ;
159
171
160
172
iconInfo = new IconGeneratorInfo ( sectionGroup ) ;
161
173
break ;
@@ -166,9 +178,13 @@ public Result CreateOneNoteItemResult(IOneNoteItem item, bool actionIsAutoComple
166
178
}
167
179
168
180
toolTip =
169
- $ "Path:\t \t { subTitle } \n " +
170
- $ "Last Modified:\t { section . LastModified } \n " +
171
- $ "Pages:\t \t { section . Pages . Count ( ) } ";
181
+ $ """
182
+ Last Modified:
183
+ { TrianglePoint } { section . LastModified : F}
184
+
185
+ Contains:
186
+ { TrianglePoint } { "page" . ToQuantity ( section . GetPages ( ) . Count ( ) ) }
187
+ """ ;
172
188
173
189
iconInfo = new IconGeneratorInfo ( section ) ;
174
190
break ;
@@ -179,7 +195,6 @@ public Result CreateOneNoteItemResult(IOneNoteItem item, bool actionIsAutoComple
179
195
180
196
subTitle = subTitle [ ..^ ( page . Name . Length + PathSeparator . Length ) ] ;
181
197
toolTip =
182
- $ "Path:\t \t { subTitle } \n " +
183
198
$ "Created:\t \t { page . Created : F} \n " +
184
199
$ "Last Modified:\t { page . LastModified : F} ";
185
200
@@ -382,6 +397,7 @@ public List<Result> ContextMenu(Result selectedResult)
382
397
}
383
398
return results ;
384
399
}
400
+
385
401
public List < Result > NoItemsInCollection ( List < Result > results , IOneNoteItem parent )
386
402
{
387
403
// parent can be null if the collection only contains notebooks.
0 commit comments