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: 0 additions & 3 deletions DistFiles/Language Explorer/Configuration/Main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -967,9 +967,6 @@ I (RandyR) brought them into this file, just to keep track of them for the time

<property name="InitialArea" value="lexicon" settingsGroup="local"/>
<property name="DoLog" bool="true" persist="false"/>
<!-- ShowMorphBundles is no longer supported in GUI, but still in the code.
So, add a default value here in order to prevent it from persisting -->
<property name="ShowMorphBundles" bool="true" persist="false" settingsGroup="local"/>
<!-- Default splitter values -->
<!-- <property name="PartsOfSpeech.editBasic.DataTree-Splitter" intValue="200"/>
<property name="PartsOfSpeech.editPlus.DataTree-Splitter" intValue="200"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@
<command id="CmdDeleteFreeTrans" label="Delete Free Translation" message="DeleteFreeform"/>
<command id="CmdDeleteLitTrans" label="Delete Literal Translation" message="DeleteFreeform"/>
<command id="CmdDeleteNote" label="Delete Note" message="DeleteFreeform"/>
<!-- <command id="CmdShowMorphBundles" label="Show Morphology" message="ShowMorphBundles" boolProperty="ShowMorphBundles"/> -->
<command id="CmdConfigureInterlinear" label="Interlinear..." message="ConfigureInterlinear"/>
<command id="CmdExportInterlinear" label="_Export Interlinear..." message="ExportInterlinear"/>
<command id="CmdExportDiscourseChart" label="Export Discourse Chart..." message="ExportDiscourse"/>
Expand Down Expand Up @@ -315,7 +314,6 @@
<menu id="View">
<item command="CmdChooseTexts" defaultVisible="false"/>
<!--<item command="CmdToggleRawAndInterlinear" defaultVisible="false"/>-->
<!--<item label="Show _Morphology" boolProperty="ShowMorphBundles" defaultVisible="false" /> -->
</menu>

<menu id="Data">
Expand Down
2 changes: 1 addition & 1 deletion Src/LexText/Discourse/InterlinRibbon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ public override void Display(IVwEnv vwenv, int hvo, int frag)

vwenv.OpenDiv();
vwenv.OpenParagraph();
AddLabelPile(vwenv, m_cache, true, ShowMorphBundles);
AddLabelPile(vwenv, m_cache);
vwenv.AddObjVecItems(m_ribbon.OccurenceListId, this, InterlinVc.kfragBundle);
vwenv.CloseParagraph();
vwenv.CloseDiv();
Expand Down
1 change: 0 additions & 1 deletion Src/LexText/Interlinear/FocusBoxController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ internal virtual IAnalysisControlInternal CreateNewSandbox(AnalysisOccurrence se
m_lineChoices, selected, this);
sandbox.SizeToContent = true; // Layout will ignore size.
//sandbox.Mediator = Mediator;
sandbox.ShowMorphBundles = true;
sandbox.StyleSheet = m_stylesheet;
panelSandbox.Controls.Add(sandbox); // Makes it real and may give it a root box.
// Note: adding sandbox to Controls doesn't always MakeRoot(), because OnHandleCreated happens
Expand Down
2 changes: 0 additions & 2 deletions Src/LexText/Interlinear/InterlinDocRootSiteBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,6 @@ protected virtual void MakeRootInternal()
m_sda = m_cache.MainCacheAccessor;
m_sda.AddNotification(this);

// PropertyTable can be null when the root site exists inside a dialog (LT-20412)
Vc.ShowMorphBundles = m_propertyTable?.GetBoolProperty("ShowMorphBundles", true) ?? true;
Vc.LineChoices = LineChoices;
Vc.ShowDefaultSense = true;

Expand Down
4 changes: 0 additions & 4 deletions Src/LexText/Interlinear/InterlinMaster.cs
Original file line number Diff line number Diff line change
Expand Up @@ -484,10 +484,6 @@ public void OnPropertyChanged(string name)
if (m_tabCtrl.SelectedIndex != (int)InterlinearTab)
ShowTabView();
break;
case "ShowMorphBundles":
// This helps make sure the notification gets through even if the pane isn't
// in focus (maybe the Sandbox or TC pane is) and so isn't an xCore target.
break;
}
}

Expand Down
60 changes: 18 additions & 42 deletions Src/LexText/Interlinear/InterlinVc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ public class InterlinVc : FwBaseVc, IDisposable
private ITsString m_tssCommaSpace;
private ITsString m_tssPendingGlossAffix; // LexGloss line GlossAppend or GlossPrepend
private int m_mpBundleHeight; // millipoint height of interlinear bundle.
private bool m_fShowMorphBundles = true;
private bool m_fRtl;
private readonly IDictionary<ILgWritingSystem, ITsString> m_mapWsDirTss = new Dictionary<ILgWritingSystem, ITsString>();
// AnnotationDefns we need
Expand Down Expand Up @@ -475,21 +474,6 @@ private set
}
}

// Controls whether to display the morpheme bundles.
public bool ShowMorphBundles
{
get
{
CheckDisposed();
return m_fShowMorphBundles;
}
set
{
CheckDisposed();
m_fShowMorphBundles = value;
}
}

// Controls whether to display the default sense (true), or the normal '***' row.
public bool ShowDefaultSense
{
Expand Down Expand Up @@ -666,7 +650,7 @@ public override void Display(IVwEnv vwenv, int hvo, int frag)
(int)SpellingModes.ksmDoNotCheck);
vwenv.OpenParagraph();
AddSegmentReference(vwenv, hvo); // Calculate and display the segment reference.
AddLabelPile(vwenv, m_cache, true, m_fShowMorphBundles);
AddLabelPile(vwenv, m_cache);
vwenv.AddObjVecItems(SegmentTags.kflidAnalyses, this, kfragBundle);
// JohnT, 1 Feb 2008. Took this out as I can see no reason for it; AddObjVecItems handles
// the dependency already. Adding it just means that any change to the forms list
Expand Down Expand Up @@ -701,8 +685,7 @@ public override void Display(IVwEnv vwenv, int hvo, int frag)
{
var wa = m_analRepository.GetObject(hvo);
vwenv.AddObj(wa.Owner.Hvo, this, kfragWordformForm);
if (m_fShowMorphBundles)
vwenv.AddObj(hvo, this, kfragAnalysisMorphs);
vwenv.AddObj(hvo, this, kfragAnalysisMorphs);

int chvoGlosses = wa.MeaningsOC.Count;
for (int i = 0; i < m_WsList.AnalysisWsIds.Length; ++i)
Expand Down Expand Up @@ -1168,7 +1151,7 @@ private void DisplaySingleInterlinearAnalysisWithLabels(IVwEnv vwenv, int hvo)
}
vwenv.OpenParagraph();
m_fHaveOpenedParagraph = true;
AddLabelPile(vwenv, m_cache, true, m_fShowMorphBundles);
AddLabelPile(vwenv, m_cache);
try
{
// We use this rather than AddObj(hvo) so we can easily identify this object and select
Expand Down Expand Up @@ -1657,7 +1640,7 @@ internal bool DisplayLexGlossWithInflType(IVwEnv vwenv, ILexEntry possibleVarian
/// <summary>
/// Add the pile of labels used to identify the lines in interlinear text.
/// </summary>
public void AddLabelPile(IVwEnv vwenv, LcmCache cache, bool fWantMultipleSenseGloss, bool fShowMorphemes)
public void AddLabelPile(IVwEnv vwenv, LcmCache cache)
{
CheckDisposed();

Expand Down Expand Up @@ -1866,33 +1849,26 @@ private void DisplayMorphemes()
{
case WfiWordformTags.kClassId:
case WfiAnalysisTags.kClassId:
if (m_this.m_fShowMorphBundles)
// Display the morpheme bundles.
if (m_hvoDefault != m_hvoWordBundleAnalysis)
{
// Display the morpheme bundles.
if (m_hvoDefault != m_hvoWordBundleAnalysis)
{
m_this.SetGuessing(m_vwenv, m_this.GetGuessColor(m_defaultObj));
// Let the exporter know that this is a guessed analysis.
m_vwenv.set_StringProperty(ktagAnalysisStatus, "guess");
}
m_vwenv.AddObj(m_hvoDefault, m_this, kfragAnalysisMorphs);
m_this.SetGuessing(m_vwenv, m_this.GetGuessColor(m_defaultObj));
// Let the exporter know that this is a guessed analysis.
m_vwenv.set_StringProperty(ktagAnalysisStatus, "guess");
}
m_vwenv.AddObj(m_hvoDefault, m_this, kfragAnalysisMorphs);
break;
case WfiGlossTags.kClassId:

if (m_this.m_fShowMorphBundles)
m_hvoWfiAnalysis = m_defaultObj.Owner.Hvo;
// Display all the morpheme stuff.
if (m_hvoWordBundleAnalysis == m_hvoWordform)
{
m_hvoWfiAnalysis = m_defaultObj.Owner.Hvo;
// Display all the morpheme stuff.
if (m_hvoWordBundleAnalysis == m_hvoWordform)
{
// Real analysis is just word, one we're displaying is a default
m_this.SetGuessing(m_vwenv, m_this.GetGuessColor(m_defaultObj));
// Let the exporter know that this is a guessed analysis.
m_vwenv.set_StringProperty(ktagAnalysisStatus, "guess");
}
m_vwenv.AddObj(m_hvoWfiAnalysis, m_this, kfragAnalysisMorphs);
// Real analysis is just word, one we're displaying is a default
m_this.SetGuessing(m_vwenv, m_this.GetGuessColor(m_defaultObj));
// Let the exporter know that this is a guessed analysis.
m_vwenv.set_StringProperty(ktagAnalysisStatus, "guess");
}
m_vwenv.AddObj(m_hvoWfiAnalysis, m_this, kfragAnalysisMorphs);
break;
default:
throw new Exception("Invalid type found in Segment analysis");
Expand Down
48 changes: 15 additions & 33 deletions Src/LexText/Interlinear/SandboxBase.SandboxVc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ public class SandboxVc : FwBaseVc, IDisposable
// width in millipoints of the arrow picture.
int m_dxmpArrowPicWidth;
bool m_fIconsForAnalysisChoices;
bool m_fShowMorphBundles = true;
bool m_fIconForWordGloss = false;
bool m_fIsMorphemeFormEditable = true;
bool m_fRtl = false;
Expand Down Expand Up @@ -245,20 +244,6 @@ internal bool RightToLeft
m_sandbox.RootBox.Reconstruct();
}
}
// Controls whether to display the morpheme bundles.
public bool ShowMorphBundles
{
get
{
CheckDisposed();
return m_fShowMorphBundles;
}
set
{
CheckDisposed();
m_fShowMorphBundles = value;
}
}

public bool ShowWordGlossIcon
{
Expand Down Expand Up @@ -652,25 +637,22 @@ private static void SetBGColor(IVwEnv vwenv, int guessColor)

private void DisplayMorphBundles(IVwEnv vwenv, int hvo)
{
if (m_fShowMorphBundles)
// Don't allow direct editing of the morph bundle lines.
MakeNextFlowObjectReadOnly(vwenv);
if (vwenv.DataAccess.get_VecSize(hvo, ktagSbWordMorphs) == 0)
{
// Don't allow direct editing of the morph bundle lines.
MakeNextFlowObjectReadOnly(vwenv);
if (vwenv.DataAccess.get_VecSize(hvo, ktagSbWordMorphs) == 0)
{
SetColor(vwenv, m_choices.LabelRGBForEnabled(m_choices.IndexInEnabled(InterlinLineChoices.kflidMorphemes)));
vwenv.AddProp(ktagMissingMorphs, this, kfragMissingMorphs);
// Blank lines to fill up the gap; LexEntry line
vwenv.AddString(m_tssEmptyVern);
vwenv.AddString(m_tssEmptyAnalysis); // LexGloss line
vwenv.AddString(m_tssEmptyAnalysis); // LexPos line
}
else
{
vwenv.OpenParagraph();
vwenv.AddObjVec(ktagSbWordMorphs, this, kfragMorph);
vwenv.CloseParagraph();
}
SetColor(vwenv, m_choices.LabelRGBForEnabled(m_choices.IndexInEnabled(InterlinLineChoices.kflidMorphemes)));
vwenv.AddProp(ktagMissingMorphs, this, kfragMissingMorphs);
// Blank lines to fill up the gap; LexEntry line
vwenv.AddString(m_tssEmptyVern);
vwenv.AddString(m_tssEmptyAnalysis); // LexGloss line
vwenv.AddString(m_tssEmptyAnalysis); // LexPos line
}
else
{
vwenv.OpenParagraph();
vwenv.AddObjVec(ktagSbWordMorphs, this, kfragMorph);
vwenv.CloseParagraph();
}
}

Expand Down
Loading
Loading