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
4 changes: 4 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 2.1.2 - 2025-6-11

- Added the ability to open items in a new OneNote window using the context menu.([#28](https://github.com/Odotocodot/Flow.Launcher.Plugin.OneNote/issues/28))

## 2.1.1 - 2025-1-4

### Changes
Expand Down
15 changes: 13 additions & 2 deletions Flow.Launcher.Plugin.OneNote/ResultCreator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -395,18 +395,29 @@ public List<Result> ContextMenu(Result selectedResult)
result.SubTitle = string.Empty;
result.ContextData = null;
results.Add(result);
results.Add(new Result
{
Title = "Open in new OneNote window",
IcoPath = IconProvider.Logo,
Action = _ =>
{
OneNoteApplication.ComObject.NavigateTo(item.ID, fNewWindow: true);
WindowHelper.FocusOneNote();
return true;
}
});

if (item is not OneNotePage)
{
results.Add(new Result
{
Title = "Show in Notebook Explorer",
Title = "Copy Notebook Explorer path to clipboard",
SubTitle = result.AutoCompleteText,
Score = - 1000,
IcoPath = iconProvider.NotebookExplorer,
Action = _ =>
{
context.API.ChangeQuery(result.AutoCompleteText);
context.API.CopyToClipboard(result.AutoCompleteText);
return false;
}
});
Expand Down
2 changes: 1 addition & 1 deletion Flow.Launcher.Plugin.OneNote/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"Name": "OneNote",
"Description": "Search and create your OneNote notes",
"Author": "Odotocodot",
"Version": "2.1.1",
"Version": "2.1.2",
"Language": "csharp",
"Website": "https://github.com/Odotocodot/Flow.Launcher.Plugin.OneNote",
"IcoPath": "Images/logo.png",
Expand Down