diff --git a/RecipeGeneratorWindow.cs b/RecipeGeneratorWindow.cs
--- a/RecipeGeneratorWindow.cs
+++ b/RecipeGeneratorWindow.cs
@@ -154,6 +154,7 @@ namespace DesertPaintLab
reagentEnabledCell.Activatable = true;
reagentEnabledCell.Sensitive = true;
reagentEnabledCell.Mode = Gtk.CellRendererMode.Activatable;
+ reagentEnabledCell.Visible = true;
reagentEnabledCell.Toggled += new Gtk.ToggledHandler(OnReagentEnableToggled);
reagentEnabledColumn.PackStart (reagentEnabledCell, true);
//reagentEnabledColumn.AddAttribute(reagentEnabledCell, "active", 0);
@@ -161,6 +162,7 @@ namespace DesertPaintLab
Gtk.TreeViewColumn reagentNameColumn = new Gtk.TreeViewColumn ();
reagentNameColumn.Title = "Ingredient";
Gtk.CellRendererText reagentNameCell = new Gtk.CellRendererText ();
+ reagentNameCell.Mode = Gtk.CellRendererMode.Inert;
reagentNameColumn.PackStart (reagentNameCell, true);
reagentNameColumn.AddAttribute(reagentNameCell, "text", 1);
reagentNameColumn.Expand = true;
@@ -171,6 +173,7 @@ namespace DesertPaintLab
reagentCostCell.Edited += OnReagentCostChanged;
reagentCostCell.Editable = true;
reagentCostCell.Sensitive = true;
+ reagentCostCell.Mode = Gtk.CellRendererMode.Editable;
reagentCostColumn.PackStart (reagentCostCell, true);
//reagentCostColumn.AddAttribute(reagentCostCell, "text", 0);
@@ -180,6 +183,7 @@ namespace DesertPaintLab
reagentMaxCell.Edited += OnReagentQuantityChanged;
reagentMaxCell.Editable = true;
reagentMaxCell.Sensitive = true;
+ reagentCostCell.Mode = Gtk.CellRendererMode.Editable;
reagentMaxColumn.PackStart (reagentMaxCell, true);
//reagentMaxColumn.AddAttribute(reagentMaxCell, "text", 0);
@@ -196,11 +200,14 @@ namespace DesertPaintLab
// Assign the model to the TreeView
reagentListView.Model = reagentListStore;
+ reagentListView.Sensitive = true;
reagentListView.AppendColumn(reagentEnabledColumn);
reagentListView.AppendColumn(reagentNameColumn);
reagentListView.AppendColumn(reagentCostColumn);
reagentListView.AppendColumn(reagentMaxColumn);
+
+ reagentListView.
ShowAll();
}
@@ -331,7 +338,7 @@ namespace DesertPaintLab
maxRecipeSpinButton.Sensitive = true;
fullQuantitySpinButton.Sensitive = true;
fullQuantityDepthSpinButton.Sensitive = true;
- reagentListView.Sensitive = false;
+ reagentListView.Sensitive = true;
//generator = null; // don't. Hang on to generator for resume.
profile.SaveRecipes();
if (canceling)
@@ -510,6 +517,7 @@ namespace DesertPaintLab
Gtk.CellRendererToggle toggle = (cell as Gtk.CellRendererToggle);
toggle.Active = reagent.Enabled;
toggle.Activatable = !reagent.IsCatalyst;
+ toggle.Mode = reagent.IsCatalyst ? Gtk.CellRendererMode.Inert : Gtk.CellRendererMode.Activatable;
}
private void RenderReagentCost (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
{
@@ -558,16 +566,12 @@ namespace DesertPaintLab
private void OnReagentEnableToggled(object o, Gtk.ToggledArgs args)
{
- Gtk.CellRendererToggle btn = (Gtk.CellRendererToggle)o;
Gtk.TreeIter iter;
reagentListStore.GetIter (out iter, new Gtk.TreePath (args.Path));
Reagent reagent = (Reagent) reagentListStore.GetValue (iter, 0);
- if (btn.Active != reagent.Enabled)
- {
- reagent.Enabled = btn.Active;
- SaveReagentSettings();
- }
+ reagent.Enabled = !reagent.Enabled;
+ SaveReagentSettings();
}
private void SaveReagentSettings()
diff --git a/gtk-gui/gui.stetic b/gtk-gui/gui.stetic
--- a/gtk-gui/gui.stetic
+++ b/gtk-gui/gui.stetic
@@ -6,7 +6,7 @@
-
+