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
3 changes: 2 additions & 1 deletion Src/LexText/Interlinear/SandboxBase.ComboHandlers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using SIL.LCModel.Core.KernelInterfaces;
using SIL.FieldWorks.Common.ViewsInterfaces;
using SIL.FieldWorks.Common.FwUtils;
using static SIL.FieldWorks.Common.FwUtils.FwUtils;
using SIL.FieldWorks.Common.Widgets;
using SIL.LCModel;
using SIL.LCModel.Application;
Expand Down Expand Up @@ -2591,7 +2592,7 @@ private void OnSelectCreateNewEntry(object sender, EventArgs args)
private void OnSelectEditLexicalEntry(object sender, EventArgs args)
{
ILexEntry lexEntry = GetLexEntry();
m_sandbox.Mediator.SendMessage("JumpToPopupLexEntry", lexEntry.Hvo);
Publisher.Publish(new PublisherParameterObject(EventConstants.JumpToPopupLexEntry, lexEntry.Hvo));
}

private ILexEntry GetLexEntry()
Expand Down
3 changes: 2 additions & 1 deletion Src/LexText/LexTextControls/InsertEntryDlg.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
using SIL.FieldWorks.Common.Controls;
using SIL.LCModel.Core.KernelInterfaces;
using SIL.FieldWorks.Common.FwUtils;
using static SIL.FieldWorks.Common.FwUtils.FwUtils;
using SIL.FieldWorks.Common.RootSites;
using SIL.FieldWorks.Common.Widgets;
using SIL.LCModel;
Expand Down Expand Up @@ -1349,7 +1350,7 @@ private void InsertEntryDlg_Closing(object sender, CancelEventArgs e)
CreateNewEntry();
if (DialogResult == DialogResult.Retry)
{
m_mediator.SendMessage("JumpToPopupLexEntry", m_entry.Hvo);
Publisher.Publish(new PublisherParameterObject(EventConstants.JumpToPopupLexEntry, m_entry.Hvo));
DialogResult = DialogResult.OK;
}
break;
Expand Down
8 changes: 5 additions & 3 deletions Src/xWorks/FwXWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ private void BasicInit(FwApp app)
m_propertyTable.SetProperty("App", app, true);
m_propertyTable.SetPropertyPersistence("App", false);
}
Subscriber.Subscribe(EventConstants.JumpToPopupLexEntry, JumpToPopupLexEntry);
}

/// ------------------------------------------------------------------------------------
Expand Down Expand Up @@ -440,6 +441,8 @@ protected override void Dispose(bool disposing)

if (disposing)
{
Subscriber.Unsubscribe(EventConstants.JumpToPopupLexEntry, JumpToPopupLexEntry);

if (m_viewHelper != null)
m_viewHelper.Dispose();
if (m_app != null)
Expand Down Expand Up @@ -1214,7 +1217,7 @@ protected bool OnFileProjectProperties(object command)
/// Create a popup window to edit the given lexical entry.
/// </summary>
/// ------------------------------------------------------------------------------------
protected bool OnJumpToPopupLexEntry(object command)
private void JumpToPopupLexEntry(object command)
{
switch (m_propertyTable.GetStringProperty("currentContentControl", null))
{
Expand All @@ -1224,7 +1227,7 @@ protected bool OnJumpToPopupLexEntry(object command)
Mediator.BroadcastMessage("JumpToRecord", command);
Mediator.BroadcastMessage("FocusFirstPossibleSlice", null);
#pragma warning restore 618
return true;
return;
}

XmlNode toolNode;
Expand All @@ -1249,7 +1252,6 @@ protected bool OnJumpToPopupLexEntry(object command)
Mediator.BroadcastMessage("FocusFirstPossibleSlice", null);
#pragma warning restore 618
}
return true;
}

/// ------------------------------------------------------------------------------------
Expand Down
Loading