Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono-tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Habersack <grendel@twistedcode.net>2010-06-05 00:40:34 +0400
committerMarek Habersack <grendel@twistedcode.net>2010-06-05 00:40:34 +0400
commitc7c52256e73279f4015f35b38587e65109e0f3d4 (patch)
treeac4e88443c52088d90560a1531f4e702bb261f18 /gui-compare
parent62926e2278684cee1d43a6d05ce8a068017a2713 (diff)
2010-06-04 Marek Habersack <mhabersack@novell.com>
* MainWindow.cs: don't crash when comparison failed. svn path=/trunk/mono-tools/; revision=158494
Diffstat (limited to 'gui-compare')
-rw-r--r--gui-compare/ChangeLog4
-rw-r--r--gui-compare/MainWindow.cs52
2 files changed, 32 insertions, 24 deletions
diff --git a/gui-compare/ChangeLog b/gui-compare/ChangeLog
index 7a52b69d..bf1bf9c2 100644
--- a/gui-compare/ChangeLog
+++ b/gui-compare/ChangeLog
@@ -1,3 +1,7 @@
+2010-06-04 Marek Habersack <mhabersack@novell.com>
+
+ * MainWindow.cs: don't crash when comparison failed.
+
2010-04-26 Alan McGovern <amcgovern@novell.com>
* InfoManager.cs: When setting the title of the window, switch the
diff --git a/gui-compare/MainWindow.cs b/gui-compare/MainWindow.cs
index 8e857777..0da25a42 100644
--- a/gui-compare/MainWindow.cs
+++ b/gui-compare/MainWindow.cs
@@ -552,34 +552,38 @@ public partial class MainWindow: Gtk.Window
context.Finished += delegate (object sender, EventArgs e) {
Application.Invoke (delegate {
DateTime finish_time = DateTime.Now;
+
+ if (context.Comparison != null) {
+ Status = String.Format ("Comparison completed at {0}", finish_time);
+
+ context.Comparison.PropagateCounts ();
+ PopulateTreeFromComparison (context.Comparison);
+ Progress = 0.0;
+
+ CompareHistory[] history = Config.Recent[0].History;
- Status = String.Format ("Comparison completed at {0}", finish_time);
+ if (history == null || history.Length == 0 ||
+ (history[history.Length-1].Extras != context.Comparison.Extra ||
+ history[history.Length-1].Errors != context.Comparison.Warning ||
+ history[history.Length-1].Missing != context.Comparison.Missing ||
+ history[history.Length-1].Niexs != context.Comparison.Niex ||
+ history[history.Length-1].Todos != context.Comparison.Todo)) {
+
+ CompareHistory history_entry = new CompareHistory();
+ history_entry.CompareTime = finish_time;
+ history_entry.Extras = context.Comparison.Extra;
+ history_entry.Errors = context.Comparison.Warning;
+ history_entry.Missing = context.Comparison.Missing;
+ history_entry.Niexs = context.Comparison.Niex;
+ history_entry.Todos = context.Comparison.Todo;
+ Config.Recent[0].AddHistoryEntry (history_entry);
+ Config.Save ();
+ }
+ } else
+ Status = "Comparison not completed - no data returned.";
- context.Comparison.PropagateCounts ();
- PopulateTreeFromComparison (context.Comparison);
- Progress = 0.0;
done (this);
progressbar1.Visible = false;
-
- CompareHistory[] history = Config.Recent[0].History;
-
- if (history == null || history.Length == 0 ||
- (history[history.Length-1].Extras != context.Comparison.Extra ||
- history[history.Length-1].Errors != context.Comparison.Warning ||
- history[history.Length-1].Missing != context.Comparison.Missing ||
- history[history.Length-1].Niexs != context.Comparison.Niex ||
- history[history.Length-1].Todos != context.Comparison.Todo)) {
-
- CompareHistory history_entry = new CompareHistory();
- history_entry.CompareTime = finish_time;
- history_entry.Extras = context.Comparison.Extra;
- history_entry.Errors = context.Comparison.Warning;
- history_entry.Missing = context.Comparison.Missing;
- history_entry.Niexs = context.Comparison.Niex;
- history_entry.Todos = context.Comparison.Todo;
- Config.Recent[0].AddHistoryEntry (history_entry);
- Config.Save ();
- }
});
};
treeStore.Clear ();