[Monodevelop-patches-list] r2681 - in trunk/MonoDevelop/Core/src/MonoDevelop.Base: . Gui/Dialogs/ReferenceDialog
John Luke <jluke@cfl.rr.com>
jluke at mono-cvs.ximian.com
Wed Jul 20 21:20:14 EDT 2005
Author: jluke
Date: 2005-07-20 21:20:14 -0400 (Wed, 20 Jul 2005)
New Revision: 2681
Modified:
trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog
trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Dialogs/ReferenceDialog/GacReferencePanel.cs
Log:
2005-07-20 John Luke <john.luke at gmail.com>
* Gui/Dialogs/ReferenceDialog/GacReferencePanel.cs:
don't display useless Path column and mark it with FIXME
sort list of gac assemblies by name then version for
consistency, thanks to Rafael Teixeira for noticing
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog 2005-07-20 16:54:25 UTC (rev 2680)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog 2005-07-21 01:20:14 UTC (rev 2681)
@@ -1,3 +1,10 @@
+2005-07-20 John Luke <john.luke at gmail.com>
+
+ * Gui/Dialogs/ReferenceDialog/GacReferencePanel.cs:
+ don't display useless Path column and mark it with FIXME
+ sort list of gac assemblies by name then version for
+ consistency, thanks to Rafael Teixeira for noticing
+
2005-07-20 Lluis Sanchez Gual <lluis at novell.com>
* Made internal lots of classes that don't really need to
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Dialogs/ReferenceDialog/GacReferencePanel.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Dialogs/ReferenceDialog/GacReferencePanel.cs 2005-07-20 16:54:25 UTC (rev 2680)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Dialogs/ReferenceDialog/GacReferencePanel.cs 2005-07-21 01:20:14 UTC (rev 2681)
@@ -43,9 +43,11 @@
treeView.AppendColumn (firstColumn);
treeView.AppendColumn (GettextCatalog.GetString ("Version"), new CellRendererText (), "text", 1);
- treeView.AppendColumn (GettextCatalog.GetString ("Path"), new CellRendererText (), "text", 2);
+ // FIXME: this seems useless
+ //treeView.AppendColumn (GettextCatalog.GetString ("Path"), new CellRendererText (), "text", 2);
store.SetSortColumnId (0, SortType.Ascending);
+ store.SetSortFunc (0, new TreeIterCompareFunc (SortTree));
PrintCache();
ScrolledWindow sc = new ScrolledWindow ();
@@ -55,7 +57,24 @@
ShowAll ();
BorderWidth = 6;
}
+
+ int SortTree (TreeModel model, TreeIter first, TreeIter second)
+ {
+ // first compare by name
+ string fname = (string) model.GetValue (first, 0);
+ string sname = (string) model.GetValue (second, 0);
+ int compare = String.Compare (fname, sname, true);
+ // they had the same name, so compare the version
+ if (compare == 0) {
+ string fversion = (string) model.GetValue (first, 1);
+ string sversion = (string) model.GetValue (second, 1);
+ compare = String.Compare (fversion, sversion, true);
+ }
+
+ return compare;
+ }
+
public void Reset ()
{
store.Clear ();
More information about the Monodevelop-patches-list
mailing list