[Monodevelop-patches-list] r2269 - in trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor: . Gui/Dialogs
Christian Hergert <chris@mosaix.net>
chergert at mono-cvs.ximian.com
Wed Feb 23 23:46:25 EST 2005
Author: chergert
Date: 2005-02-23 23:46:25 -0500 (Wed, 23 Feb 2005)
New Revision: 2269
Modified:
trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog
trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/Dialogs/ReplaceDialog.cs
Log:
Check for null when building store to prevent exception.
Modified: trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog 2005-02-24 02:43:37 UTC (rev 2268)
+++ trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog 2005-02-24 04:46:25 UTC (rev 2269)
@@ -1,3 +1,7 @@
+2005-02-23 Christian Hergert <christian.hergert at gmail.com>
+
+ * Gui/Dialogs/ReplaceDialog.cs: Check for null to prevent Exception.
+
2005-02-22 John Luke <john.luke at gmail.com>
* CodeCompletion/CodeCompletionDataProvider.cs:
Modified: trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/Dialogs/ReplaceDialog.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/Dialogs/ReplaceDialog.cs 2005-02-24 02:43:37 UTC (rev 2268)
+++ trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/Dialogs/ReplaceDialog.cs 2005-02-24 04:46:25 UTC (rev 2269)
@@ -342,24 +342,33 @@
if (stringArray != null) {
string[] items = stringArray.ToString ().Split (historySeparator);
- findHistory.AddRange (items);
+ ListStore store = new ListStore (typeof (string));
- ListStore store = new ListStore (typeof (string));
- foreach (string i in items)
- store.AppendValues (i);
+ if(items != null) {
+ findHistory.AddRange (items);
+ foreach (string i in items) {
+ store.AppendValues (i);
+ }
+ }
+
searchPatternEntry.Completion.Model = store;
}
// now do the replace history
+ stringArray = propertyService.GetProperty ("MonoDevelop.FindReplaceDialogs.ReplaceHistory");
+
if (replaceMode) {
- string[] items = stringArray.ToString ().Split (historySeparator);
- stringArray = propertyService.GetProperty ("MonoDevelop.FindReplaceDialogs.ReplaceHistory");
-
if (stringArray != null) {
- replaceHistory.AddRange (items);
+ string[] items = stringArray.ToString ().Split (historySeparator);
ListStore store = new ListStore (typeof (string));
- foreach (string i in items)
- store.AppendValues (i);
+
+ if(items != null) {
+ replaceHistory.AddRange (items);
+ foreach (string i in items) {
+ store.AppendValues (i);
+ }
+ }
+
replacePatternEntry.Completion.Model = store;
}
}
More information about the Monodevelop-patches-list
mailing list