|
From: <lu...@us...> - 2003-12-22 23:38:01
|
Update of /cvsroot/neelix/neelix/view
In directory sc8-pr-cvs1:/tmp/cvs-serv6968/view
Modified Files:
fox.rb
Log Message:
refactored the promote/demote/delete ingredient functionality into presenter
methods
Index: fox.rb
===================================================================
RCS file: /cvsroot/neelix/neelix/view/fox.rb,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- fox.rb 20 Dec 2003 19:00:15 -0000 1.12
+++ fox.rb 22 Dec 2003 23:37:58 -0000 1.13
@@ -1,5 +1,6 @@
require 'fox'
include Fox
+require 'presenter/presenter'
class CookbookForm < FXVerticalFrame
def initialize(parent,o)
@@ -121,7 +122,7 @@
end
if not selectedIndices.empty? then
index = selectedIndices.first
- @recipe.ingredients.promote(@recipe.ingredients[index])
+ Presenter::promoteIngredient(@recipe, index)
@ingredientList.selectItem(index - 1, true)
end
end
@@ -131,7 +132,7 @@
@ingredientList.itemSelected?(i)
end
selectedIndices.each do |index|
- @recipe.ingredients.delete_at(index)
+ Presenter::deleteIngredient(@recipe, index)
end
end
@@ -163,7 +164,7 @@
def refreshIngredients
@ingredientList.clearItems
- @recipe.ingredients.each do |ingredient|
+ @recipe.ingredients.sort.each do |ingredient|
@ingredientList.appendItem(ingredient.to_s)
end
end
|