Skip to content

Commit

Permalink
OutputWindow does not take focus when shown.
Browse files Browse the repository at this point in the history
  • Loading branch information
Zoltanar committed Jan 6, 2024
1 parent 008008b commit fe2fa85
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Happy Reader/Model/JMDict.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public void ReadFiles(string folder)
var loadingTerms = ReadJMDictFiles(Path.Combine(directory.FullName, "jmdict_english"), "term_bank_*json");
var kanjiTerms = ReadKanjiDicFiles(Path.Combine(directory.FullName, "kanjidic_english"), "kanji_bank_*json");
if (UseDeinflections) deinflections = _deinflectionEngine.ReadFile(Path.Combine(directory.FullName, "deinflect.json"));
StaticHelpers.Logger.ToFile("Finished reading files for JMDict and KanjiDic.");
StaticHelpers.Logger.ToFile("Finished reading files for JMDict, KanjiDic, Deinflections.");
_kanjiTerms = kanjiTerms.OrderBy(t => t.Character, StringComparer.Ordinal).ToDictionary(k => k.Character);
_dictionaryTerms = loadingTerms.OrderBy(t => t.Expression, StringComparer.Ordinal).ToArray();
if (UseDeinflections) _deinflectionEngine.CreateReasons(deinflections, _dictionaryTerms);
Expand Down
2 changes: 1 addition & 1 deletion Happy Reader/View/NotificationWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Notification Popup" Width="300" SizeToContent="Height"
WindowStyle="None" AllowsTransparency="True" Background="Transparent"
ShowInTaskbar="False" Loaded="NotificationWindow_OnLoaded">
ShowInTaskbar="False" Loaded="NotificationWindow_OnLoaded" ShowActivated="False">
<Window.Resources>
</Window.Resources>
<Grid RenderTransformOrigin="0,1" >
Expand Down
2 changes: 1 addition & 1 deletion Happy Reader/View/OutputWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
xmlns:view="clr-namespace:Happy_Reader.View"
mc:Ignorable="d"
Title="Happy Reader Output" Height="216" Width="800"
ShowInTaskbar="False" WindowStyle="None" AllowsTransparency="True"
ShowInTaskbar="False" ShowActivated="False" WindowStyle="None" AllowsTransparency="True"
Topmost="True"
Loaded="OutputWindow_OnLoaded"
ResizeMode="CanResizeWithGrip"
Expand Down
5 changes: 3 additions & 2 deletions HappySearchObjectClasses/DataAccess/DACollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@ public int SaveChanges()
? _items.Values.Where(i => ((IReadyToUpsert) i).ReadyToUpsert).ToArray() : Array.Empty<TValue>();
if (_itemsToUpsertLater.Count == 0 && otherItemsToUpsert.Length == 0) return 0;
Conn.Open();
Conn.Trace += StaticHelpers.LogDatabaseTrace;
var databaseLogging = StaticHelpers.Logger.LogDatabase;
StaticHelpers.Logger.LogDatabase = false;
DbTransaction transaction = null;
int rowsAffected = 0;
try
Expand All @@ -198,7 +199,7 @@ public int SaveChanges()
((IReadyToUpsert)item).ReadyToUpsert = false;
}
Conn.Close();
Conn.Trace -= StaticHelpers.LogDatabaseTrace;
StaticHelpers.Logger.LogDatabase = databaseLogging;

}
}
Expand Down
2 changes: 1 addition & 1 deletion IthVnrSharpLib

0 comments on commit fe2fa85

Please sign in to comment.