[chronojump/chronojump-importer] Fixes error: the new imported jumps were not available unless chronojump was restarted.
- From: Carles Pina i Estany <carlespina src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump/chronojump-importer] Fixes error: the new imported jumps were not available unless chronojump was restarted.
- Date: Mon, 26 Sep 2016 21:52:30 +0000 (UTC)
commit b2a1fe6d26dfba074878b6ed1e53cb95b736995f
Author: Carles Pina i Estany <carles pina cat>
Date: Mon Sep 26 23:51:28 2016 +0200
Fixes error: the new imported jumps were not available unless chronojump was restarted.
Two issues:
a) updateComboStats() wasn't called
b) when updateComboStats() was called: this function didn't update the
list of jumps in one of the combobox (only in a related one). Now it
does.
src/gui/chronojump.cs | 15 ++++++++++++++-
src/gui/stats.cs | 8 +++++++-
2 files changed, 21 insertions(+), 2 deletions(-)
---
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index c3fcf68..5444288 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -2425,14 +2425,23 @@ public partial class ChronoJumpWindow
processStartInfo.CreateNoWindow = true;
processStartInfo.UseShellExecute = false;
processStartInfo.RedirectStandardInput = false;
- processStartInfo.RedirectStandardError = false;
+ processStartInfo.RedirectStandardError = true;
processStartInfo.RedirectStandardOutput = true;
+ process.EnableRaisingEvents = true; // So the callback for Exited is called
+
process.OutputDataReceived += new DataReceivedEventHandler(
(s, e) =>
{
LogB.Debug(e.Data);
}
);
+ process.ErrorDataReceived += new DataReceivedEventHandler (
+ (s, e) =>
+ {
+ LogB.Debug(e.Data);
+ }
+ );
+
process.StartInfo = processStartInfo;
bool started = false;
@@ -2448,7 +2457,11 @@ public partial class ChronoJumpWindow
if (started) {
process.BeginOutputReadLine ();
+ process.BeginErrorReadLine ();
}
+
+ process.WaitForExit ();
+ updateComboStats ();
}
private void on_open_activate (object o, EventArgs args)
diff --git a/src/gui/stats.cs b/src/gui/stats.cs
index 68fcc3f..f92fdb4 100644
--- a/src/gui/stats.cs
+++ b/src/gui/stats.cs
@@ -598,8 +598,14 @@ public partial class ChronoJumpWindow {
//by default show all simple nonTC jumps, but if combo_stats_subtype changed
//updateComboStatsSubType() will do the work
+
+
+ string[] jumps = SqliteJumpType.SelectJumpTypes(false, Constants.AllJumpsName,
"nonTC", true);
+
UtilGtk.ComboUpdate(combo_stats_stat_apply_to,
- SqliteJumpType.SelectJumpTypes(false, Constants.AllJumpsName, "nonTC", true),
""); //only select name
+ jumps, ""); //only select name
+ UtilGtk.ComboUpdate(combo_select_jumps, jumps, "");
+
combo_stats_stat_apply_to.Sensitive = true;
combo_stats_stat_apply_to.Active = 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]