[chronojump] ExecuteAuto shows exercise count
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] ExecuteAuto shows exercise count
- Date: Fri, 10 Oct 2014 16:22:48 +0000 (UTC)
commit c1784ecb69f7f1a616519d9a2580afc389c256c0
Author: Xavier de Blas <xaviblas gmail com>
Date: Fri Oct 10 12:58:09 2014 +0200
ExecuteAuto shows exercise count
src/gui/executeAuto.cs | 18 ++++++++++++------
src/utilGtk.cs | 4 +---
2 files changed, 13 insertions(+), 9 deletions(-)
---
diff --git a/src/gui/executeAuto.cs b/src/gui/executeAuto.cs
index a01f6fa..6dd6211 100644
--- a/src/gui/executeAuto.cs
+++ b/src/gui/executeAuto.cs
@@ -221,24 +221,27 @@ public class ExecuteAutoWindow
private void createTreeviewSeries()
{
treeviewSerie1Array = new ArrayList(0);
- store_serie1 = new TreeStore(typeof (string));
+ store_serie1 = new TreeStore(typeof (string), typeof (string));
treeview_serie1.Model = store_serie1;
treeview_serie1.HeadersVisible=false;
UtilGtk.CreateCols(treeview_serie1, store_serie1, "", 0, true);
+ UtilGtk.CreateCols(treeview_serie1, store_serie1, "", 1, true);
treeview_serie1.Selection.Mode = SelectionMode.None;
treeviewSerie2Array = new ArrayList(0);
- store_serie2 = new TreeStore(typeof (string));
+ store_serie2 = new TreeStore(typeof (string), typeof (string));
treeview_serie2.Model = store_serie2;
treeview_serie2.HeadersVisible=false;
UtilGtk.CreateCols(treeview_serie2, store_serie2, "", 0, true);
+ UtilGtk.CreateCols(treeview_serie2, store_serie2, "", 1, true);
treeview_serie2.Selection.Mode = SelectionMode.None;
treeviewSerie3Array = new ArrayList(0);
- store_serie3 = new TreeStore(typeof (string));
+ store_serie3 = new TreeStore(typeof (string), typeof (string));
treeview_serie3.Model = store_serie3;
treeview_serie3.HeadersVisible=false;
UtilGtk.CreateCols(treeview_serie3, store_serie3, "", 0, true);
+ UtilGtk.CreateCols(treeview_serie3, store_serie3, "", 1, true);
treeview_serie3.Selection.Mode = SelectionMode.None;
}
@@ -251,15 +254,18 @@ public class ExecuteAutoWindow
if(o == (object) button_add1)
{
treeviewSerie1Array.Add(tc);
- UtilGtk.TreeviewAddRow(treeview_serie1, store_serie1, tc.trName);
+ UtilGtk.TreeviewAddRow(treeview_serie1, store_serie1,
+ new String [] { treeviewSerie1Array.Count.ToString(), tc.trName } );
} else if(o == (object) button_add2)
{
treeviewSerie2Array.Add(tc);
- UtilGtk.TreeviewAddRow(treeview_serie2, store_serie2, tc.trName);
+ UtilGtk.TreeviewAddRow(treeview_serie2, store_serie2,
+ new String [] { treeviewSerie2Array.Count.ToString(), tc.trName } );
} else
{ //button_add3
treeviewSerie3Array.Add(tc);
- UtilGtk.TreeviewAddRow(treeview_serie3, store_serie3, tc.trName);
+ UtilGtk.TreeviewAddRow(treeview_serie3, store_serie3,
+ new String [] { treeviewSerie3Array.Count.ToString(), tc.trName } );
}
//a test is added, sensitivize "next" button
diff --git a/src/utilGtk.cs b/src/utilGtk.cs
index 7f4605c..1154c54 100644
--- a/src/utilGtk.cs
+++ b/src/utilGtk.cs
@@ -234,8 +234,7 @@ public class UtilGtk
return tv;
}
- //this is used only in a row with only one column
- public static void TreeviewAddRow(Gtk.TreeView tv, TreeStore store, string row) {
+ public static void TreeviewAddRow(Gtk.TreeView tv, TreeStore store, string [] row) {
TreeIter iter = new TreeIter();
bool iterOk = store.GetIterFirst(out iter);
@@ -244,7 +243,6 @@ public class UtilGtk
//scroll treeview if needed
TreePath path = store.GetPath (iter);
tv.ScrollToCell (path, null, true, 0, 0);
-
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]