Skip to content
Merged
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
20 changes: 19 additions & 1 deletion Src/LexText/Interlinear/InterlinDocRootSiteBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,7 @@ protected virtual ContextMenuStrip MakeContextMenu(int ilineChoice)
// (separator)
// 5) Add Line > (submenu of currently hidden lines)
// 6) Configure Interlinear...
// 7) Help

if (Vc != null && Vc.LineChoices != null && !isRibbonMenu) // just to be safe; shouldn't happen
{
Expand Down Expand Up @@ -554,14 +555,31 @@ protected virtual ContextMenuStrip MakeContextMenu(int ilineChoice)
menu.Items.Add(addLineSubMenu);
}

// 6) Last, but not least, add a link to the Configure Interlinear dialog
// 6) Add a link to the Configure Interlinear dialog
var configLink = new ToolStripMenuItem(ITextStrings.ksConfigureLinkText);
configLink.Click += new EventHandler(configLink_Click); // TODO: Figure out how to pass more parameters
menu.Items.Add(configLink);

// 7) Add Help.
if (Vc != null && Vc.LineChoices != null && !isRibbonMenu)
{
if (Vc.LineChoices.EnabledLineSpecs[ilineChoice].Flid == InterlinLineChoices.kflidMedia)
{
ImageCollection smallImages = m_propertyTable.GetValue<ImageCollection>("smallImages");
Image imgHelp = smallImages.GetImage("Help");
menu.Items.Add(new ToolStripMenuItem("Help...", null, this.OnMediaHelp));
}
}

return menu;
}

public void OnMediaHelp(object sender, EventArgs args)
{
CheckDisposed();
ShowHelp.ShowHelpTopic(m_propertyTable.GetValue<IHelpTopicProvider>("HelpTopicProvider"), "khtpField-Interlinear-Media");
}

private void AddHideLineMenuItem(ContextMenuStrip menu,
InterlinLineChoices curLineChoices, int ilineChoice)
{
Expand Down
Loading