[chronojump] On exportsession calling to reloadSession is done on GTK thread now



commit 9e0b5a123363bbd92a4968d9c7c6a0967f758710
Author: Xavier de Blas <xaviblas gmail com>
Date:   Tue Nov 3 16:20:17 2020 +0100

    On exportsession calling to reloadSession is done on GTK thread now

 src/gui/app1/session/export.cs | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/src/gui/app1/session/export.cs b/src/gui/app1/session/export.cs
index bc7f8e62..5fb876be 100644
--- a/src/gui/app1/session/export.cs
+++ b/src/gui/app1/session/export.cs
@@ -110,10 +110,15 @@ public partial class ChronoJumpWindow
 
        private bool app1s_ExportPulseGTK ()
        {
-               if ( ! app1s_threadExport.IsAlive ) {
+               if ( ! app1s_threadExport.IsAlive )
+               {
                        LogB.ThreadEnding();
                        app1s_ExportPulseEnd();
 
+                       LogB.Information("calling reloadSession");
+                       reloadSession(); //to use default db again
+                       LogB.Information("called reloadSession");
+
                        LogB.ThreadEnded();
                        return false;
                }
@@ -176,6 +181,7 @@ public partial class ChronoJumpWindow
 
        static string app1s_exportText;
        static long app1s_exportElapsedMs;
+       //No GTK here!
        private void app1s_export()
        {
                app1s_exportElapsedMs = 0;
@@ -222,14 +228,13 @@ public partial class ChronoJumpWindow
                                LogB.Information(string.Format("session: {0}, will be deleted", sessionID));
                                sessionSwitcher.DeleteAllStuff(sessionID);
                        }
+                       LogB.Information(string.Format("export session {0}/{1} done!", count, 
mySessions.Length ));
                        count ++;
                }
 
-               //TODO: check if we really need this
-               reloadSession(); //to use default db again
-
                sw.Stop();
                app1s_exportElapsedMs = sw.ElapsedMilliseconds;
+               LogB.Information("ended app1s_export()");
        }
 
        private void on_app1s_button_export_cancel_or_close_clicked (object o, EventArgs args)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]