Skip to content

Commit

Permalink
Merge pull request stevencohn#578 from stevencohn/548-keyboard-placeh…
Browse files Browse the repository at this point in the history
…olders

548 keyboard placeholders
  • Loading branch information
stevencohn committed Aug 29, 2022
2 parents 9e0f974 + 41517b5 commit ae901fe
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
15 changes: 13 additions & 2 deletions OneMore/AddInCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,12 @@ public async Task ArrangeContainersCmd(IRibbonControl control)
public async Task BreakingCmd(IRibbonControl control)
=> await factory.Run<BreakingCommand>();


[Command("ribCalendarButton_Label", Keys.None)]
public async Task CalendarCmd(IRibbonControl control)
=> await factory.Run<CalendarCommand>();


public async Task CaptionAttachmentsCmd(IRibbonControl control)
=> await factory.Run<CaptionAttachmentsCommand>();

Expand Down Expand Up @@ -141,9 +144,13 @@ public async Task CopyAcrossCmd(IRibbonControl control)
public async Task CopyDownCmd(IRibbonControl control)
=> await factory.Run<FillCellsCommand>(FillCells.CopyDown);


[Command("ribCopyLinkToPageButton_Label", Keys.None)]
public async Task CopyLinkToPageCmd(IRibbonControl control)
=> await factory.Run<CopyLinkCommand>(false);


[Command("ribCopyLinkToParagraphButton_Label", Keys.None)]
public async Task CopyLinkToParagraphCmd(IRibbonControl control)
=> await factory.Run<CopyLinkCommand>(true);

Expand Down Expand Up @@ -232,8 +239,6 @@ public async Task HighlightCmd(IRibbonControl control)
public async Task HighlightFormulaCmd(IRibbonControl control)
=> await factory.Run<HighlightFormulaCommand>();

public async Task InsertBoxCmd(IRibbonControl control)
=> await factory.Run<InsertCodeBlockCommand>(false);

public async Task ImportCmd(IRibbonControl control)
=> await factory.Run<ImportCommand>();
Expand All @@ -244,6 +249,12 @@ public async Task ImportWebCmd(IRibbonControl control)
public async Task InsertBlueStatusCmd(IRibbonControl control)
=> await factory.Run<InsertStatusCommand>(StatusColor.Blue);


[Command("ribBoxButton_Label", Keys.None)]
public async Task InsertBoxCmd(IRibbonControl control)
=> await factory.Run<InsertCodeBlockCommand>(false);


public async Task InsertBreadcrumbCmd(IRibbonControl control)
=> await factory.Run<InsertBreadcrumbCommand>(StatusColor.Blue);

Expand Down
4 changes: 4 additions & 0 deletions OneMore/AddInHotkeys.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,15 @@ private void RegisterHotkeys()
RegisterHotKey(s, nameof(ApplyStyle7Cmd), async () => await ApplyStyle7Cmd(null));
RegisterHotKey(s, nameof(ApplyStyle8Cmd), async () => await ApplyStyle8Cmd(null));
RegisterHotKey(s, nameof(ApplyStyle9Cmd), async () => await ApplyStyle9Cmd(null));
RegisterHotKey(s, nameof(CalendarCmd), async () => await CalendarCmd(null));
RegisterHotKey(s, nameof(ClearLogCmd), async () => await ClearLogCmd(null));
RegisterHotKey(s, nameof(CopyLinkToPageCmd), async () => await CopyLinkToPageCmd(null));
RegisterHotKey(s, nameof(CopyLinkToParagraphCmd), async () => await CopyLinkToParagraphCmd(null));
RegisterHotKey(s, nameof(DecreaseFontSizeCmd), async () => await DecreaseFontSizeCmd(null));
RegisterHotKey(s, nameof(DiagnosticsCmd), async () => await DiagnosticsCmd(null));
RegisterHotKey(s, nameof(FillDownCmd), async () => await FillDownCmd(null));
RegisterHotKey(s, nameof(HighlightCmd), async () => await HighlightCmd(null));
RegisterHotKey(s, nameof(InsertBoxCmd), async () => await InsertBoxCmd(null));
RegisterHotKey(s, nameof(InsertCodeBlockCmd), async () => await InsertCodeBlockCmd(null));
RegisterHotKey(s, nameof(InsertDateCmd), async () => await InsertDateCmd(null));
RegisterHotKey(s, nameof(InsertDateTimeCmd), async () => await InsertDateTimeCmd(null));
Expand Down
2 changes: 0 additions & 2 deletions OneMore/Properties/Ribbon.xml
Original file line number Diff line number Diff line change
Expand Up @@ -380,13 +380,11 @@
id="ribCopyLinkToPageButton"
imageMso="EditLinks"
getLabel="GetRibbonLabel"
getEnabled="GetBodyContext"
onAction="CopyLinkToPageCmd"/>
<button
id="ribCopyLinkToParagraphButton"
imageMso="TextBoxPreviousLinked"
getLabel="GetRibbonLabel"
getEnabled="GetBodyContext"
onAction="CopyLinkToParagraphCmd"/>
<button
id="ribStartBiLinkButton"
Expand Down

0 comments on commit ae901fe

Please sign in to comment.