diff --git a/DRAL_UI/DRAL_GTK.csproj b/DRAL_UI/DRAL_GTK.csproj index dbe1ca9..62f05fc 100644 --- a/DRAL_UI/DRAL_GTK.csproj +++ b/DRAL_UI/DRAL_GTK.csproj @@ -7,9 +7,11 @@ DRAL https://github.com/boiscljo/DRAL true - 1.0.3.0 - 1.0.3.0 + 1.0.4.0 + 1.0.4.0 annotations + https://github.com/boiscljo/DRAL + MIT diff --git a/DRAL_UI/Program.cs b/DRAL_UI/Program.cs index 08391a4..d738d7f 100644 --- a/DRAL_UI/Program.cs +++ b/DRAL_UI/Program.cs @@ -1,5 +1,6 @@ using System; using System.Globalization; +using System.IO.Compression; using System.Linq; using System.Net; using System.Reflection; @@ -55,7 +56,20 @@ static void Main(string[] args) } if (args.Contains("-v") || args.Contains("--verbose")) verbose = true; - Gtk.Application.Init(); + try + { + Gtk.Application.Init(); + } + catch + { + Console.WriteLine("Installing Gtk libraries for current user"); + WebClient wc = new WebClient(); + wc.DownloadFile("https://zergling.moyskleytech.com/dataset/DRAL/Gtk.zip" , "Gtk.zip"); + ZipFile.ExtractToDirectory("Gtk.zip" , Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)); + System.IO.File.Delete("Gtk.zip"); + Console.WriteLine("Please run DRAL again."); + return; + } if (args.Contains("--out")) { @@ -106,6 +120,7 @@ static void Main(string[] args) return; } + if (withWindow) window.Show(); if (args.Contains("--fix") || args.Contains("-f") || args.Contains("--fix-dataset") || diff --git a/DRAL_UI/UI/NewTagWindow.cs b/DRAL_UI/UI/NewTagWindow.cs index e7a3e6c..2d4aa74 100644 --- a/DRAL_UI/UI/NewTagWindow.cs +++ b/DRAL_UI/UI/NewTagWindow.cs @@ -258,11 +258,11 @@ private void Left_MotionNotifyEvent(object o, MotionNotifyEventArgs args) private void Previous(bool v) { attentionHandler.Previous(); - var lbl = manager.GetLabel(attentionHandler.Filename); + /*var lbl = manager.GetLabel(attentionHandler.Filename); while (lbl == null) { attentionHandler.Previous(); - } + }*/ LoadImageInformation(); if (v) {