diff --git a/.gitignore b/.gitignore index 1ec5fe61c..cf79703f0 100644 --- a/.gitignore +++ b/.gitignore @@ -33,6 +33,7 @@ desktop.ini # experimental dev work /libs/3rdparty/mupdf/mupdf/ +/libs/3rdparty/SOLR/ /docs-src/_meta/HTML standards and designs/ /docs-src/_meta/layouts/ diff --git a/Qiqqa.Build/Packaging/Include/couninst.exe b/Qiqqa.Build/Packaging/Include/couninst.exe index a1e17b863..02acc50ef 100644 Binary files a/Qiqqa.Build/Packaging/Include/couninst.exe and b/Qiqqa.Build/Packaging/Include/couninst.exe differ diff --git a/Qiqqa/Common/Configuration/ConfigurationManager.cs b/Qiqqa/Common/Configuration/ConfigurationManager.cs index b60f11291..e3677c1f6 100644 --- a/Qiqqa/Common/Configuration/ConfigurationManager.cs +++ b/Qiqqa/Common/Configuration/ConfigurationManager.cs @@ -64,7 +64,7 @@ public static bool IsInitialized private readonly Lazy __startupDirectoryForQiqqa = new Lazy(() => UnitTestDetector.StartupDirectoryForQiqqa); public string StartupDirectoryForQiqqa => __startupDirectoryForQiqqa.Value; - private readonly Lazy __BaseDirectoryForQiqqa = new Lazy(() => + private Lazy __BaseDirectoryForQiqqa = new Lazy(() => { // Command-line parameters override the Registry: string[] args = Environment.GetCommandLineArgs(); @@ -138,9 +138,30 @@ public static bool IsInitialized // If we get here, use the default path return Path.GetFullPath(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"Quantisle/Qiqqa")); }); + private bool __BaseDirectoryForQiqqaIsFixedFromNowOn = false; + public bool BaseDirectoryForQiqqaIsFixedFromNowOn + { + get => __BaseDirectoryForQiqqaIsFixedFromNowOn; + set + { + __BaseDirectoryForQiqqaIsFixedFromNowOn = true; // doesn't matter what you set 'value' to: we only can turn this lock ON and then it's DONE. + } + } public string BaseDirectoryForQiqqa { - get => __BaseDirectoryForQiqqa.Value; + get + { + return __BaseDirectoryForQiqqa.Value; + } + set + { + if (BaseDirectoryForQiqqaIsFixedFromNowOn) + { + throw new AccessViolationException($"Internal Error: Rewriting Qiqqa Base Path to '{value}' after it was locked for writing is indicative of erroneous use of the setter, i.e. setter is useed too late in the game!"); + } + __BaseDirectoryForQiqqa = new Lazy(() => Path.GetFullPath(value)); + RegistrySettings.Instance.Write(RegistrySettings.BaseDataDirectory, value); + } } public string BaseDirectoryForUser diff --git a/Qiqqa/Common/MessageBoxControls/UnhandledExceptionMessageBox.xaml.cs b/Qiqqa/Common/MessageBoxControls/UnhandledExceptionMessageBox.xaml.cs index a24df0996..b087f94c2 100644 --- a/Qiqqa/Common/MessageBoxControls/UnhandledExceptionMessageBox.xaml.cs +++ b/Qiqqa/Common/MessageBoxControls/UnhandledExceptionMessageBox.xaml.cs @@ -45,14 +45,6 @@ public static void DisplayException(Exception ex) throw new OutOfMemoryException("Out of memory", ex); } - // the garbage collection is not crucial for the functioning of the dialog itself, hence dump it into a worker thread. - SafeThreadPool.QueueUserWorkItem(o => - { - // Collect all generations of memory. - GC.WaitForPendingFinalizers(); - GC.Collect(GC.MaxGeneration, GCCollectionMode.Forced, true, true); - }); - string useful_text_heading = "Something unexpected has happened, but it's okay. " + ex.Message; string useful_text_subheading = "You can continue working, but we would appreciate it if you would send us some feedback on what you were doing when this happened."; diff --git a/Qiqqa/DocumentLibrary/WebLibraryStuff/WebLibraryDetailControl.xaml.cs b/Qiqqa/DocumentLibrary/WebLibraryStuff/WebLibraryDetailControl.xaml.cs index bb0561d07..65e966bd4 100644 --- a/Qiqqa/DocumentLibrary/WebLibraryStuff/WebLibraryDetailControl.xaml.cs +++ b/Qiqqa/DocumentLibrary/WebLibraryStuff/WebLibraryDetailControl.xaml.cs @@ -784,7 +784,7 @@ private void UpdateLibraryStatistics_Headers() { TextLibraryCount.Text = String.Format("{0} document(s) in this library, {1}", web_library_detail.Xlibrary?.PDFDocuments_IncludingDeleted_Count ?? 0, - web_library_detail.LastSynced.HasValue ? $"last synced on {web_library_detail.LastSynced.Value.ToString()}" : @"has never been synced yet"); + web_library_detail.LastSynced.HasValue ? $"which was last synced on {web_library_detail.LastSynced.Value}" : @"which has never been synced yet"); } // The wizard stuff diff --git a/Qiqqa/Main/LoginStuff/LoginWindow.xaml b/Qiqqa/Main/LoginStuff/LoginWindow.xaml index 87cee4940..9eaa37eea 100644 --- a/Qiqqa/Main/LoginStuff/LoginWindow.xaml +++ b/Qiqqa/Main/LoginStuff/LoginWindow.xaml @@ -1,56 +1,100 @@ - + x:Class="Qiqqa.Main.LoginStuff.LoginWindow" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:commongui="clr-namespace:Qiqqa.Common.GUI" + xmlns:configgui="clr-namespace:Qiqqa.Common.Configuration" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:local_gui="clr-namespace:Utilities.GUI;assembly=Utilities" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + Width="400" + Icon="/Qiqqa;component/Qiqqa.ico" + ResizeMode="NoResize" + ShowInTaskbar="True" + SizeToContent="Height" + WindowStartupLocation="CenterScreen" + mc:Ignorable="d"> + - - + + -