changeset 10:3277cb2ecb71

Re #26: GTK# wrappers * Swap ordering of columns, as "value, text" causes crashes but "text, value" doesn't - no idea why
author IBBoard <dev@ibboard.co.uk>
date Sat, 16 Jan 2010 15:32:49 +0000
parents d0e26a896d72
children 43d0b0ec1657
files ComboBoxUtils.cs
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ComboBoxUtils.cs	Sat Jan 16 15:10:41 2010 +0000
+++ b/ComboBoxUtils.cs	Sat Jan 16 15:32:49 2010 +0000
@@ -22,13 +22,13 @@
 			combo.Clear();
 			CellRendererText cell = new CellRendererText();
 			combo.PackStart(cell, false);
-			combo.AddAttribute(cell, "text", 1);
-			ListStore store = new ListStore(typeof(LIST_TYPE), typeof(string));
+			combo.AddAttribute(cell, "text", 0);
+			ListStore store = new ListStore(typeof(string), typeof(LIST_TYPE));
 			combo.Model = store;
 		
 			foreach (LIST_TYPE item in itemList)
 			{
-				store.AppendValues(item, toStringMethod(item));
+				store.AppendValues(toStringMethod(item), item);
 			}
 		}