You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(39) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(7) |
Jun
(31) |
Jul
(12) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: Nguyen T. N. <nhu...@av...> - 2006-09-14 02:33:21
|
Dear, I'm a developer of Avasys Vietnam Co, Ltd. One of major works in my = company is writing printer drivers under Linux, Mac and Window.=20 I know about you through sourceforge.net. More information about LxBank = sofware I want to get, please give me!=20 That is: Which types of printers Neelix - recipe management system used? Does = this application use mini printer and which are they? Thanks in advanced! Best regard. |
From: Hans F. <fu...@us...> - 2004-07-14 04:30:57
|
Update of /cvsroot/neelix/neelix/view/qt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv992/view/qt Modified Files: qt.rb Log Message: fixed bug where after creating the initial cookbook you couldn't add an initial category Index: qt.rb =================================================================== RCS file: /cvsroot/neelix/neelix/view/qt/qt.rb,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- qt.rb 3 Jul 2004 05:58:52 -0000 1.10 +++ qt.rb 14 Jul 2004 04:30:48 -0000 1.11 @@ -94,6 +94,7 @@ i.open = true i.setRenameEnabled(0,true) @shelf.currentItem = i + shelf_currentChanged i.startRename(0) end # assumption: @shelf.currentItem.data === Cookbook |
From: Hans F. <fu...@us...> - 2004-07-14 00:29:22
|
Update of /cvsroot/neelix/neelix In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29909 Modified Files: Makefile Log Message: faster rsync Index: Makefile =================================================================== RCS file: /cvsroot/neelix/neelix/Makefile,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- Makefile 30 Jun 2004 14:34:05 -0000 1.9 +++ Makefile 14 Jul 2004 00:29:13 -0000 1.10 @@ -14,7 +14,7 @@ $(rdoc) -d -o rdoc model/*.rb view/qt/*.rb presenter/*.rb *.rb web: doc - rsync -rv rdoc screenshot.png shell.sf.net:neelix/htdocs + rsync -rz rdoc screenshot.png shell.sf.net:neelix/htdocs dbclean: make -C db clean |
From: Hans F. <fu...@us...> - 2004-07-03 05:59:02
|
Update of /cvsroot/neelix/neelix/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12348/model Modified Files: model.rb Log Message: Just took out a few debug statements and fixed a few minor bugs. Also removed menu entries that we're not using yet from the UI. Now we just need to figure out how to package this thing. Jamis, you've ventured into gems. Would that be appropriate in this case? Index: model.rb =================================================================== RCS file: /cvsroot/neelix/neelix/model/model.rb,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- model.rb 3 Jul 2004 00:39:46 -0000 1.16 +++ model.rb 3 Jul 2004 05:58:50 -0000 1.17 @@ -275,7 +275,6 @@ # fix ordering @ingredients.each_with_index do |ingredient,index| ingredient.position = index - puts "#{ingredient}: #{index}" end } |
From: Hans F. <fu...@us...> - 2004-07-03 05:59:01
|
Update of /cvsroot/neelix/neelix/view/qt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12348/view/qt Modified Files: mw.ui qt.rb Log Message: Just took out a few debug statements and fixed a few minor bugs. Also removed menu entries that we're not using yet from the UI. Now we just need to figure out how to package this thing. Jamis, you've ventured into gems. Would that be appropriate in this case? Index: mw.ui =================================================================== RCS file: /cvsroot/neelix/neelix/view/qt/mw.ui,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- mw.ui 30 Jun 2004 14:34:06 -0000 1.7 +++ mw.ui 3 Jul 2004 05:58:51 -0000 1.8 @@ -9,7 +9,7 @@ <x>0</x> <y>0</y> <width>747</width> - <height>540</height> + <height>543</height> </rect> </property> <property name="caption"> @@ -357,9 +357,6 @@ <cstring>MenuBar</cstring> </property> <item text="&File" name="fileMenu"> - <action name="fileNewAction"/> - <action name="fileOpenAction"/> - <action name="fileSaveAsAction"/> <separator/> <action name="fileExitAction"/> </item> Index: qt.rb =================================================================== RCS file: /cvsroot/neelix/neelix/view/qt/qt.rb,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- qt.rb 3 Jul 2004 00:39:47 -0000 1.9 +++ qt.rb 3 Jul 2004 05:58:52 -0000 1.10 @@ -233,16 +233,13 @@ def ingredient_moved(section,fromIndex,toIndex) r = @shelf.currentItem.data - puts "from #{fromIndex} to #{toIndex} ingred #{r.ingredients[fromIndex]}" - toIndex -= 1 if fromIndex < toIndex r.ingredients.insert(toIndex, r.ingredients.delete_at(fromIndex)) - - puts r.ingredients end def recipename_changed(text) @shelf.currentItem.data.name = text + @shelf.currentItem.setText(0,text) end def author_changed(text) @shelf.currentItem.data.author = text |
From: Von F. <fu...@us...> - 2004-07-03 00:40:07
|
Update of /cvsroot/neelix/neelix/view/qt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4917/view/qt Modified Files: qt.rb Log Message: fixed move ingredient bug: observer wasn't getting notified on insert Index: qt.rb =================================================================== RCS file: /cvsroot/neelix/neelix/view/qt/qt.rb,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- qt.rb 2 Jul 2004 17:39:28 -0000 1.8 +++ qt.rb 3 Jul 2004 00:39:47 -0000 1.9 @@ -233,14 +233,11 @@ def ingredient_moved(section,fromIndex,toIndex) r = @shelf.currentItem.data - ary = r.ingredients - puts "from #{fromIndex} to #{toIndex}" + puts "from #{fromIndex} to #{toIndex} ingred #{r.ingredients[fromIndex]}" + + toIndex -= 1 if fromIndex < toIndex + r.ingredients.insert(toIndex, r.ingredients.delete_at(fromIndex)) - if toIndex >= ary.size - ary << ary.delete_at(fromIndex) - else - ary.insert(toIndex, ary.delete_at(fromIndex)) - end puts r.ingredients end |
From: Von F. <fu...@us...> - 2004-07-03 00:40:07
|
Update of /cvsroot/neelix/neelix/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4917/model Modified Files: model.rb Log Message: fixed move ingredient bug: observer wasn't getting notified on insert Index: model.rb =================================================================== RCS file: /cvsroot/neelix/neelix/model/model.rb,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- model.rb 2 Jul 2004 17:39:27 -0000 1.15 +++ model.rb 3 Jul 2004 00:39:46 -0000 1.16 @@ -50,7 +50,7 @@ # wrap the methods that need to cause a notification. TODO Do we have them # all? too many? - wrap_method :<<, :[]=, :clear, :collect!, :compact!, :delete, :delete_at, :delete_if, :flatten!, :map!, :pop, :push, :reject!, :replace, :reverse!, :shift, :slice!, :sort!, :uniq!, :unshift + wrap_method :<<, :[]=, :clear, :collect!, :compact!, :delete, :delete_at, :delete_if, :flatten!, :map!, :pop, :push, :reject!, :replace, :reverse!, :shift, :slice!, :sort!, :uniq!, :unshift, :insert #wrap_method :assoc, :collect, :compact, :concat, :flatten, :rassoc, :reverse, :slice, :sort, :uniq end @@ -275,9 +275,11 @@ # fix ordering @ingredients.each_with_index do |ingredient,index| ingredient.position = index + puts "#{ingredient}: #{index}" end + } - @ingredients.each { |i| i.add_observer { @ingredients.notify_observers } } + #@ingredients.each { |i| i.add_observer { @ingredients.notify_observers } } end def name |
From: Hans F. <fu...@us...> - 2004-07-02 17:39:37
|
Update of /cvsroot/neelix/neelix/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25218/model Modified Files: model.rb Log Message: Everything seems to be working with one exception. There's a bug regarding moving ingredients that I haven't pinned down yet. Sometimes the ingredient goes off into limbo (in the db, but not on screen, so you have to restart), but other times it doesn't. Once that bug is fixed, we're ready to clean up and package it 0.1.0! Index: model.rb =================================================================== RCS file: /cvsroot/neelix/neelix/model/model.rb,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- model.rb 2 Jul 2004 00:25:58 -0000 1.14 +++ model.rb 2 Jul 2004 17:39:27 -0000 1.15 @@ -271,6 +271,11 @@ (old_ingredients - @ingredients).each do |ingredient| @dbh.do("update ingredient set recipe_id=? where ingredient_id=?", nil, ingredient.id) end + + # fix ordering + @ingredients.each_with_index do |ingredient,index| + ingredient.position = index + end } @ingredients.each { |i| i.add_observer { @ingredients.notify_observers } } end |
From: Hans F. <fu...@us...> - 2004-07-02 17:39:36
|
Update of /cvsroot/neelix/neelix/db In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25218/db Modified Files: db.xml Log Message: Everything seems to be working with one exception. There's a bug regarding moving ingredients that I haven't pinned down yet. Sometimes the ingredient goes off into limbo (in the db, but not on screen, so you have to restart), but other times it doesn't. Once that bug is fixed, we're ready to clean up and package it 0.1.0! Index: db.xml =================================================================== RCS file: /cvsroot/neelix/neelix/db/db.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- db.xml 20 Dec 2003 06:38:35 -0000 1.2 +++ db.xml 2 Jul 2004 17:39:26 -0000 1.3 @@ -54,7 +54,7 @@ <!-- CREATE TABLE ingredient ( ingredient_id int NOT NULL auto_increment PRIMARY KEY, - recipe_id int NOT NULL, + recipe_id int, measure_id int NOT NULL, food_id int NOT NULL, quantity float NOT NULL, @@ -63,7 +63,7 @@ ); --> <col name="ingredient_id" type="int"><not_null/><auto_increment/><primary_key/></col> - <col name="recipe_id" type="int"><not_null/></col> + <col name="recipe_id" type="int"/> <col name="measure_id" type="int"><not_null/></col> <col name="food_id" type="int"><not_null/></col> <col name="quantity" type="float"/> |
From: Hans F. <fu...@us...> - 2004-07-02 17:39:36
|
Update of /cvsroot/neelix/neelix/view/qt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25218/view/qt Modified Files: qt.rb Log Message: Everything seems to be working with one exception. There's a bug regarding moving ingredients that I haven't pinned down yet. Sometimes the ingredient goes off into limbo (in the db, but not on screen, so you have to restart), but other times it doesn't. Once that bug is fixed, we're ready to clean up and package it 0.1.0! Index: qt.rb =================================================================== RCS file: /cvsroot/neelix/neelix/view/qt/qt.rb,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- qt.rb 30 Jun 2004 14:34:06 -0000 1.7 +++ qt.rb 2 Jul 2004 17:39:28 -0000 1.8 @@ -7,13 +7,21 @@ end class Neelix + slots 'ingredient_moved(int,int,int)' + def postinitialize(app) @app = app - build_shelf + @counterStack.enabled = false - @shelf.currentItem = @shelf.firstChild - @ingredients_table.rowMovingEnabled = false + + @ingredients_table.rowMovingEnabled = true @ingredients_table.columnMovingEnabled = false + Qt::Object.connect( + @ingredients_table.verticalHeader, SIGNAL("indexChange(int,int,int)"), + self, SLOT("ingredient_moved(int,int,int)")) + + build_shelf + @shelf.currentItem = @shelf.firstChild shelf_currentChanged end def build_shelf @@ -51,7 +59,6 @@ @ingredients_table.numRows = r.ingredients.size r.ingredients.sort.each_with_index do |ing,j| - puts "#{ing}, #{j}" @ingredients_table.setText(j,0,ing.quantity.to_s) @ingredients_table.setText(j,1,ing.measure.to_s) @ingredients_table.setText(j,2,ing.food.to_s) @@ -126,8 +133,10 @@ m = Presenter::findCreateMeasure("") f = Presenter::findCreateFood("") i = $replicator.create('ingredient', - {'recipe_id',r.id, 'quantity','', 'measure_id',m.id, + {'recipe_id',r.id, 'quantity',nil, 'measure_id',m.id, 'food_id',f.id, 'modifier',nil}) + r.ingredients.insert(@ingredients_table.currentRow+1, i) + r.ingredients.pop refresh_recipe(r) end @@ -220,6 +229,21 @@ end end + # assumption: @shelf.currentItem.data === Recipe + def ingredient_moved(section,fromIndex,toIndex) + r = @shelf.currentItem.data + + ary = r.ingredients + puts "from #{fromIndex} to #{toIndex}" + + if toIndex >= ary.size + ary << ary.delete_at(fromIndex) + else + ary.insert(toIndex, ary.delete_at(fromIndex)) + end + puts r.ingredients + end + def recipename_changed(text) @shelf.currentItem.data.name = text end |
From: Jacob F. <lu...@us...> - 2004-07-02 00:26:09
|
Update of /cvsroot/neelix/neelix/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28236/model Modified Files: model.rb Log Message: Fixed so ingredients are immediately deleted from DB when removed from a recipe. They're instead orphaned and then the ingredient must be explicitly deleted (added Ingredient.delete). Also added checks so you can't perform operations on an ingredient that's been deleted from DB, in case a reference to is still floats around somewhere. Added quick method to delete all observers from an observable, gets called in ingredient deletion process to minimize the number of those lingering references. Index: model.rb =================================================================== RCS file: /cvsroot/neelix/neelix/model/model.rb,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- model.rb 29 Jun 2004 14:24:06 -0000 1.13 +++ model.rb 2 Jul 2004 00:25:58 -0000 1.14 @@ -17,6 +17,11 @@ @observers.delete(callback) end + # Delete all observer callbacks + def delete_all_observers( &callback ) + @observers = [] + end + protected # Notify the observers by executing the callbacks. def notify_observers @@ -150,40 +155,49 @@ end def recipe + raise "Operating on invalidated ingredient" if @id.nil? $replication.get('recipe',@dbh.select_one("select recipe_id from ingredient where ingredient_id=?",@id)['recipe_id']) end def measure + raise "Operating on invalidated ingredient" if @id.nil? $replicator.get('measure',@dbh.select_one("select measure_id from ingredient where ingredient_id=?",@id)['measure_id']) end def measure=(m) + raise "Operating on invalidated ingredient" if @id.nil? @dbh.do("update ingredient set measure_id=? where ingredient_id=?", m.id, @id) notify_observers m end def food + raise "Operating on invalidated ingredient" if @id.nil? $replicator.get('food',@dbh.select_one("select food_id from ingredient where ingredient_id=?",@id)['food_id']) end def food=(f) + raise "Operating on invalidated ingredient" if @id.nil? @dbh.do("update ingredient set food_id=? where ingredient_id=?", f.id, @id) notify_observers f end def quantity + raise "Operating on invalidated ingredient" if @id.nil? @dbh.select_one("select quantity from ingredient where ingredient_id=?",@id)['quantity'] end def quantity=(q) + raise "Operating on invalidated ingredient" if @id.nil? @dbh.do("update ingredient set quantity=? where ingredient_id=?", q, @id) notify_observers q end def modifier + raise "Operating on invalidated ingredient" if @id.nil? @dbh.select_one("select modifier from ingredient where ingredient_id=?",@id)['modifier'] end def modifier=(m) + raise "Operating on invalidated ingredient" if @id.nil? @dbh.do("update ingredient set modifier=? where ingredient_id=?", m, @id) notify_observers m @@ -191,9 +205,11 @@ # The position in the list of ingredients def position + raise "Operating on invalidated ingredient" if @id.nil? @dbh.select_one("select position from ingredient where ingredient_id=?",@id)['position'] end def position=(p) + raise "Operating on invalidated ingredient" if @id.nil? p2 = position if p2 != p then @dbh.do("update ingredient set position=? where ingredient_id=?", p, @id) @@ -203,14 +219,22 @@ end def to_s + raise "Operating on invalidated ingredient" if @id.nil? s = "#{quantity} #{measure} #{food}" m = modifier s += " (#{m})" if m return s end def <=>(other) + raise "Operating on invalidated ingredient" if @id.nil? self.position <=> other.position end + def delete + raise "Operating on invalidated ingredient" if @id.nil? + @dbh.do("delete from ingredient where ingredient_id=?",@id) + @id = nil + delete_all_observers + end end # A Recipe is a collection of ingredients and some metadata about the recipe. @@ -241,9 +265,11 @@ @dbh.do("update ingredient set recipe_id=? where ingredient_id=?",@id,ingredient.id) end - # remove any no longer used from the DB + # remove any no longer used from the recipe (ingredient is now + # orphaned, requires explicit deletion by party that removed it, + # unless only being moved. Vacuuming will catch any refugees) (old_ingredients - @ingredients).each do |ingredient| - @dbh.do("delete from ingredient where ingredient_id=?",ingredient.id) + @dbh.do("update ingredient set recipe_id=? where ingredient_id=?", nil, ingredient.id) end } @ingredients.each { |i| i.add_observer { @ingredients.notify_observers } } |
From: Jacob F. <lu...@us...> - 2004-07-02 00:26:09
|
Update of /cvsroot/neelix/neelix/presenter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28236/presenter Modified Files: presenter.rb Log Message: Fixed so ingredients are immediately deleted from DB when removed from a recipe. They're instead orphaned and then the ingredient must be explicitly deleted (added Ingredient.delete). Also added checks so you can't perform operations on an ingredient that's been deleted from DB, in case a reference to is still floats around somewhere. Added quick method to delete all observers from an observable, gets called in ingredient deletion process to minimize the number of those lingering references. Index: presenter.rb =================================================================== RCS file: /cvsroot/neelix/neelix/presenter/presenter.rb,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- presenter.rb 30 Jun 2004 14:34:06 -0000 1.8 +++ presenter.rb 2 Jul 2004 00:25:58 -0000 1.9 @@ -15,6 +15,7 @@ sorted_ingredients = recipe.ingredients.sort ingredient = sorted_ingredients[i] recipe.ingredients.delete(ingredient) + ingredient.delete end def Presenter::addIngredient(recipe, ingredient) end |
From: Jacob F. <lu...@us...> - 2004-07-02 00:26:08
|
Update of /cvsroot/neelix/neelix In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28236 Added Files: VACUUM Log Message: Fixed so ingredients are immediately deleted from DB when removed from a recipe. They're instead orphaned and then the ingredient must be explicitly deleted (added Ingredient.delete). Also added checks so you can't perform operations on an ingredient that's been deleted from DB, in case a reference to is still floats around somewhere. Added quick method to delete all observers from an observable, gets called in ingredient deletion process to minimize the number of those lingering references. --- NEW FILE: VACUUM --- orphaned ingredients = { select i.ingredient_id from ingredient i left join recipe r on i.recipe_id=r.recipe_id where r.recipe_id is null } |
From: Hans F. <fu...@us...> - 2004-06-30 14:34:18
|
Update of /cvsroot/neelix/neelix In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5558 Modified Files: Makefile TODO Log Message: Can delete ingredients. Still working on proper add ingredient. It adds now, but just to the end of the list. I'd like it to add to after the current item. More important would be allowing reordering, then adding to the end isn't such a big deal. Both require the swapping idiom which is currently broken I think. See the bug on the bug tracker. http://sourceforge.net/tracker/index.php?func=detail&aid=982778&group_id=93954&atid=606159 Index: Makefile =================================================================== RCS file: /cvsroot/neelix/neelix/Makefile,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- Makefile 29 Jun 2004 14:24:06 -0000 1.8 +++ Makefile 30 Jun 2004 14:34:05 -0000 1.9 @@ -16,8 +16,10 @@ web: doc rsync -rv rdoc screenshot.png shell.sf.net:neelix/htdocs +dbclean: + make -C db clean clean: rm -rf rdoc make -C db clean -.PHONY: doc all qt web db clean +.PHONY: doc all qt web db clean dbclean Index: TODO =================================================================== RCS file: /cvsroot/neelix/neelix/TODO,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- TODO 29 Jun 2004 14:24:06 -0000 1.5 +++ TODO 30 Jun 2004 14:34:05 -0000 1.6 @@ -1,7 +1,9 @@ 0.1.0 - target: July 4, 2004 Finish Menu functionality -Finish Ingredient dialog. - - reordering,addition,deletion of ingredients + - figure out runtime binding to a database, then implement the following + - new + - open + - save as (aka cp ;-) 0.2.0 - meal plans |
From: Hans F. <fu...@us...> - 2004-06-30 14:34:18
|
Update of /cvsroot/neelix/neelix/presenter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5558/presenter Modified Files: presenter.rb Log Message: Can delete ingredients. Still working on proper add ingredient. It adds now, but just to the end of the list. I'd like it to add to after the current item. More important would be allowing reordering, then adding to the end isn't such a big deal. Both require the swapping idiom which is currently broken I think. See the bug on the bug tracker. http://sourceforge.net/tracker/index.php?func=detail&aid=982778&group_id=93954&atid=606159 Index: presenter.rb =================================================================== RCS file: /cvsroot/neelix/neelix/presenter/presenter.rb,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- presenter.rb 29 Jun 2004 14:24:07 -0000 1.7 +++ presenter.rb 30 Jun 2004 14:34:06 -0000 1.8 @@ -1,6 +1,7 @@ # UI-independent (or mostly so) code that is also independent of the model. module Presenter def Presenter::promoteIngredient(recipe, i) + puts "#{recipe} #{i}" raise "Can't promote first ingredient" unless i > 0 sorted_ingredients = recipe.ingredients.sort sorted_ingredients[i].position, sorted_ingredients[i - 1].position = sorted_ingredients[i - 1].position, sorted_ingredients[i].position |
From: Hans F. <fu...@us...> - 2004-06-30 14:34:17
|
Update of /cvsroot/neelix/neelix/view/qt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5558/view/qt Modified Files: mw.ui qt.rb Log Message: Can delete ingredients. Still working on proper add ingredient. It adds now, but just to the end of the list. I'd like it to add to after the current item. More important would be allowing reordering, then adding to the end isn't such a big deal. Both require the swapping idiom which is currently broken I think. See the bug on the bug tracker. http://sourceforge.net/tracker/index.php?func=detail&aid=982778&group_id=93954&atid=606159 Index: mw.ui =================================================================== RCS file: /cvsroot/neelix/neelix/view/qt/mw.ui,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- mw.ui 29 Jun 2004 14:24:07 -0000 1.6 +++ mw.ui 30 Jun 2004 14:34:06 -0000 1.7 @@ -9,7 +9,7 @@ <x>0</x> <y>0</y> <width>747</width> - <height>537</height> + <height>540</height> </rect> </property> <property name="caption"> Index: qt.rb =================================================================== RCS file: /cvsroot/neelix/neelix/view/qt/qt.rb,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- qt.rb 29 Jun 2004 14:24:07 -0000 1.6 +++ qt.rb 30 Jun 2004 14:34:06 -0000 1.7 @@ -7,10 +7,13 @@ end class Neelix - def postinitialize + def postinitialize(app) + @app = app build_shelf @counterStack.enabled = false @shelf.currentItem = @shelf.firstChild + @ingredients_table.rowMovingEnabled = false + @ingredients_table.columnMovingEnabled = false shelf_currentChanged end def build_shelf @@ -47,7 +50,8 @@ @yields_entry.text = r.yields @ingredients_table.numRows = r.ingredients.size - r.ingredients.each_with_index do |ing,j| + r.ingredients.sort.each_with_index do |ing,j| + puts "#{ing}, #{j}" @ingredients_table.setText(j,0,ing.quantity.to_s) @ingredients_table.setText(j,1,ing.measure.to_s) @ingredients_table.setText(j,2,ing.food.to_s) @@ -68,7 +72,6 @@ # fileNew # fileOpen # fileSaveAs - # editAdd_Ingredient # exit def fileExit @@ -117,10 +120,30 @@ @recipe_entry.setFocus @recipe_entry.selectAll end + # assumption: @shelf.currentItem.data === Recipe + def editAdd_Ingredient + r = @shelf.currentItem.data + m = Presenter::findCreateMeasure("") + f = Presenter::findCreateFood("") + i = $replicator.create('ingredient', + {'recipe_id',r.id, 'quantity','', 'measure_id',m.id, + 'food_id',f.id, 'modifier',nil}) + + refresh_recipe(r) + end def editDelete i = @shelf.currentItem d = i.data + if @app.focusWidget == @ingredients_table + return if @ingredients_table.numRows < 1 + r = d + row = @ingredients_table.currentRow + Presenter::deleteIngredient(r,row) + refresh_recipe(r) + return + end + case d when Cookbook Presenter::deleteCookbook(d) @@ -214,15 +237,16 @@ text = @ingredients_table.text(row,col) case col when 0 # quantity - recipe.ingredients[row].quantity = text + recipe.ingredients.sort[row].quantity = text when 1 # measure - recipe.ingredients[row].measure = Presenter::findCreateMeasure(text) + recipe.ingredients.sort[row].measure = Presenter::findCreateMeasure(text) when 2 # food - recipe.ingredients[row].food = Presenter::findCreateFood(text) + recipe.ingredients.sort[row].food = Presenter::findCreateFood(text) when 3 # modifier - recipe.ingredients[row].modifier = text + recipe.ingredients.sort[row].modifier = text end adjust_columns + refresh_recipe(recipe) end def directions_changed() @shelf.currentItem.data.directions = @directions_edit.text @@ -234,7 +258,7 @@ a = Qt::Application.new(ARGV) w = Neelix.new -w.postinitialize +w.postinitialize(a) w.resize(800,600) # run |
From: Hans F. <fu...@us...> - 2004-06-29 14:24:17
|
Update of /cvsroot/neelix/neelix/view/qt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29132/view/qt Modified Files: mw.ui qt.rb Log Message: Delete now works, if you're running an up-to-date cvs tree of qtruby. The trick is the i.dispose call. If you have an older qtruby, it will do the delete in the db before crashing. Index: mw.ui =================================================================== RCS file: /cvsroot/neelix/neelix/view/qt/mw.ui,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- mw.ui 25 Jun 2004 04:27:18 -0000 1.5 +++ mw.ui 29 Jun 2004 14:24:07 -0000 1.6 @@ -9,7 +9,7 @@ <x>0</x> <y>0</y> <width>747</width> - <height>531</height> + <height>537</height> </rect> </property> <property name="caption"> @@ -284,7 +284,7 @@ <cstring>tab</cstring> </property> <attribute name="title"> - <string>Directions</string> + <string>&Directions</string> </attribute> <hbox> <property name="name"> @@ -297,6 +297,18 @@ <property name="enabled"> <bool>true</bool> </property> + <property name="textFormat"> + <enum>PlainText</enum> + </property> + <property name="wordWrap"> + <enum>FixedColumnWidth</enum> + </property> + <property name="wrapColumnOrWidth"> + <number>72</number> + </property> + <property name="tabChangesFocus"> + <bool>true</bool> + </property> </widget> </hbox> </widget> @@ -305,7 +317,7 @@ <cstring>tab</cstring> </property> <attribute name="title"> - <string>Notes</string> + <string>&Notes</string> </attribute> <hbox> <property name="name"> @@ -315,6 +327,18 @@ <property name="name"> <cstring>note_edit</cstring> </property> + <property name="textFormat"> + <enum>PlainText</enum> + </property> + <property name="wordWrap"> + <enum>FixedColumnWidth</enum> + </property> + <property name="wrapColumnOrWidth"> + <number>72</number> + </property> + <property name="tabChangesFocus"> + <bool>true</bool> + </property> </widget> </hbox> </widget> @@ -617,9 +641,9 @@ <tabstop>tottime_entry</tabstop> <tabstop>yields_entry</tabstop> <tabstop>ingredients_table</tabstop> - <tabstop>editTab</tabstop> <tabstop>directions_edit</tabstop> <tabstop>note_edit</tabstop> + <tabstop>editTab</tabstop> </tabstops> <slots> <slot>recipename_changed(const QString&)</slot> @@ -641,6 +665,7 @@ <slot>editAdd_Recipe()</slot> <slot>author_changed(const QString&)</slot> <slot>fileNew()</slot> + <slot>shelf_selectionChanged()</slot> </slots> <layoutdefaults spacing="6" margin="11"/> </UI> Index: qt.rb =================================================================== RCS file: /cvsroot/neelix/neelix/view/qt/qt.rb,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- qt.rb 25 Jun 2004 04:27:18 -0000 1.5 +++ qt.rb 29 Jun 2004 14:24:07 -0000 1.6 @@ -11,6 +11,7 @@ build_shelf @counterStack.enabled = false @shelf.currentItem = @shelf.firstChild + shelf_currentChanged end def build_shelf $replicator.cookbooks.each do |cookbook| @@ -68,8 +69,8 @@ # fileOpen # fileSaveAs # editAdd_Ingredient - # editDelete + # exit def fileExit $qApp.quit end @@ -116,11 +117,36 @@ @recipe_entry.setFocus @recipe_entry.selectAll end + def editDelete + i = @shelf.currentItem + d = i.data + + case d + when Cookbook + Presenter::deleteCookbook(d) + when Category + Presenter::deleteCategory(i.parent.data, d) + when Recipe + Presenter::deleteRecipe(i.parent.data, d) + end + + i.dispose + end def helpAbout AboutDialog.new.exec end def shelf_currentChanged + if not @shelf.currentItem + @counterStack.enabled = false + @editAdd_CookbookAction.enabled = true + @editAdd_CategoryAction.enabled = false + @editAdd_RecipeAction.enabled = false + @editAdd_IngredientAction.enabled = false + @editDeleteAction.enabled = false + return + end + i = @shelf.currentItem.data self.counter_currentItem = i @@ -134,6 +160,7 @@ @editAdd_CategoryAction.enabled = true @editAdd_RecipeAction.enabled = false @editAdd_IngredientAction.enabled = false + @editDeleteAction.enabled = true when Category @counterStack.enabled = false @@ -141,6 +168,7 @@ @editAdd_CategoryAction.enabled = false @editAdd_RecipeAction.enabled = true @editAdd_IngredientAction.enabled = false + @editDeleteAction.enabled = true when Recipe @counterStack.enabled = true @@ -148,6 +176,15 @@ @editAdd_CategoryAction.enabled = false @editAdd_RecipeAction.enabled = false @editAdd_IngredientAction.enabled = true + @editDeleteAction.enabled = true + else + @counterStack.enabled = false + + @editAdd_CookbookAction.enabled = true + @editAdd_CategoryAction.enabled = false + @editAdd_RecipeAction.enabled = false + @editAdd_IngredientAction.enabled = false + @editDeleteAction.enabled = false end end def shelf_item_renamed(item,col,text) |
From: Hans F. <fu...@us...> - 2004-06-29 14:24:16
|
Update of /cvsroot/neelix/neelix/presenter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29132/presenter Modified Files: presenter.rb Log Message: Delete now works, if you're running an up-to-date cvs tree of qtruby. The trick is the i.dispose call. If you have an older qtruby, it will do the delete in the db before crashing. Index: presenter.rb =================================================================== RCS file: /cvsroot/neelix/neelix/presenter/presenter.rb,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- presenter.rb 25 Jun 2004 02:45:31 -0000 1.6 +++ presenter.rb 29 Jun 2004 14:24:07 -0000 1.7 @@ -33,6 +33,25 @@ f = $replicator.create('food',{'name'=>text}) if not f f end + + # Delete the given cookbook. + def Presenter::deleteCookbook(cookbook) + $replicator.cookbooks.delete(cookbook) + end + + # TODO The following two functions don't actually remove things from the + # database. They just remove associations. After prolonged use the database + # will be full of cruft. We can handle this with a vacuum or do something + # smarter here eventually. + + # Delete the given category from the given cookbook. + def Presenter::deleteCategory(cookbook,category) + cookbook.categories.delete(category) + end + # Delete the given recipe from the given category. + def Presenter::deleteRecipe(category,recipe) + category.recipes.delete(recipe) + end end # vim:ts=8:sw=2:nowrap |
From: Hans F. <fu...@us...> - 2004-06-29 14:24:16
|
Update of /cvsroot/neelix/neelix In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29132 Modified Files: Makefile TODO Log Message: Delete now works, if you're running an up-to-date cvs tree of qtruby. The trick is the i.dispose call. If you have an older qtruby, it will do the delete in the db before crashing. Index: Makefile =================================================================== RCS file: /cvsroot/neelix/neelix/Makefile,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- Makefile 25 Jun 2004 04:27:17 -0000 1.7 +++ Makefile 29 Jun 2004 14:24:06 -0000 1.8 @@ -17,7 +17,7 @@ rsync -rv rdoc screenshot.png shell.sf.net:neelix/htdocs clean: - rm -rf doc + rm -rf rdoc make -C db clean .PHONY: doc all qt web db clean Index: TODO =================================================================== RCS file: /cvsroot/neelix/neelix/TODO,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- TODO 25 Jun 2004 02:45:31 -0000 1.4 +++ TODO 29 Jun 2004 14:24:06 -0000 1.5 @@ -2,9 +2,6 @@ Finish Menu functionality Finish Ingredient dialog. - reordering,addition,deletion of ingredients -Recipe management (within categories) (add/del/sort/move) -Category management (add/del/sort/move) -Cookbook mgmt (add/del/sort) 0.2.0 - meal plans |
From: Hans F. <fu...@us...> - 2004-06-29 14:24:16
|
Update of /cvsroot/neelix/neelix/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29132/model Modified Files: model.rb Log Message: Delete now works, if you're running an up-to-date cvs tree of qtruby. The trick is the i.dispose call. If you have an older qtruby, it will do the delete in the db before crashing. Index: model.rb =================================================================== RCS file: /cvsroot/neelix/neelix/model/model.rb,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- model.rb 25 Jun 2004 04:27:18 -0000 1.12 +++ model.rb 29 Jun 2004 14:24:06 -0000 1.13 @@ -451,7 +451,6 @@ # remove any no longer used from the DB (old_cookbooks - @cookbooks).each do |cookbook| - puts cookbook @dbh.do("delete from cookbook where cookbook_id=?",cookbook.id) end end |
From: Hans F. <fu...@us...> - 2004-06-25 04:27:27
|
Update of /cvsroot/neelix/neelix/view/qt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9681/view/qt Modified Files: mw.ui qt.rb Log Message: Adding stuff (except ingredient) works Index: mw.ui =================================================================== RCS file: /cvsroot/neelix/neelix/view/qt/mw.ui,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- mw.ui 25 Jun 2004 02:45:31 -0000 1.4 +++ mw.ui 25 Jun 2004 04:27:18 -0000 1.5 @@ -9,7 +9,7 @@ <x>0</x> <y>0</y> <width>747</width> - <height>528</height> + <height>531</height> </rect> </property> <property name="caption"> @@ -339,6 +339,14 @@ <separator/> <action name="fileExitAction"/> </item> + <item text="&Edit" name="unnamed"> + <action name="editAdd_CookbookAction"/> + <action name="editAdd_CategoryAction"/> + <action name="editAdd_RecipeAction"/> + <action name="editAdd_IngredientAction"/> + <separator/> + <action name="editDeleteAction"/> + </item> <item text="&Help" name="helpMenu"> <action name="helpAboutAction"/> </item> @@ -422,6 +430,58 @@ <string></string> </property> </action> + <action> + <property name="name"> + <cstring>editAdd_CookbookAction</cstring> + </property> + <property name="text"> + <string>Add C&ookbook</string> + </property> + </action> + <action> + <property name="name"> + <cstring>editAdd_CategoryAction</cstring> + </property> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>Add C&ategory</string> + </property> + </action> + <action> + <property name="name"> + <cstring>editAdd_RecipeAction</cstring> + </property> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>Add &Recipe</string> + </property> + </action> + <action> + <property name="name"> + <cstring>editAdd_IngredientAction</cstring> + </property> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>Add &Ingredient</string> + </property> + </action> + <action> + <property name="name"> + <cstring>editDeleteAction</cstring> + </property> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>&Delete</string> + </property> + </action> </actions> <images> <image name="image0"> @@ -513,6 +573,42 @@ <receiver>Neelix</receiver> <slot>ingredient_changed(int,int)</slot> </connection> + <connection> + <sender>editDeleteAction</sender> + <signal>activated()</signal> + <receiver>Neelix</receiver> + <slot>editDelete()</slot> + </connection> + <connection> + <sender>editAdd_CookbookAction</sender> + <signal>activated()</signal> + <receiver>Neelix</receiver> + <slot>editAdd_Cookbook()</slot> + </connection> + <connection> + <sender>editAdd_CategoryAction</sender> + <signal>activated()</signal> + <receiver>Neelix</receiver> + <slot>editAdd_Category()</slot> + </connection> + <connection> + <sender>editAdd_RecipeAction</sender> + <signal>activated()</signal> + <receiver>Neelix</receiver> + <slot>editAdd_Recipe()</slot> + </connection> + <connection> + <sender>editAdd_IngredientAction</sender> + <signal>activated()</signal> + <receiver>Neelix</receiver> + <slot>editAdd_Ingredient()</slot> + </connection> + <connection> + <sender>fileNewAction</sender> + <signal>activated()</signal> + <receiver>Neelix</receiver> + <slot>fileNew()</slot> + </connection> </connections> <tabstops> <tabstop>shelf</tabstop> @@ -537,8 +633,14 @@ <slot>yields_changed(const QString&)</slot> <slot>directions_changed()</slot> <slot>note_changed(const QString&)</slot> - <slot>author_changed(const QString &)</slot> + <slot>editDelete()</slot> <slot>note_changed()</slot> + <slot>editAdd_Category()</slot> + <slot>editAdd_Cookbook()</slot> + <slot>editAdd_Ingredient()</slot> + <slot>editAdd_Recipe()</slot> + <slot>author_changed(const QString&)</slot> + <slot>fileNew()</slot> </slots> <layoutdefaults spacing="6" margin="11"/> </UI> Index: qt.rb =================================================================== RCS file: /cvsroot/neelix/neelix/view/qt/qt.rb,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- qt.rb 25 Jun 2004 02:45:31 -0000 1.4 +++ qt.rb 25 Jun 2004 04:27:18 -0000 1.5 @@ -9,6 +9,7 @@ class Neelix def postinitialize build_shelf + @counterStack.enabled = false @shelf.currentItem = @shelf.firstChild end def build_shelf @@ -62,9 +63,59 @@ end end + # TODO + # fileNew + # fileOpen + # fileSaveAs + # editAdd_Ingredient + # editDelete + def fileExit $qApp.quit end + def editAdd_Cookbook + c = $replicator.create('cookbook',{'name',"New Cookbook"}) + # FIXME hmm, next 4 lines are duplicate code from build_shelf. + # what we really want is a synctree function like in the abandoned fxruby + # code + i = Qt::ListViewItem.new(@shelf,c.name) + i.data = c + i.open = true + i.setRenameEnabled(0,true) + @shelf.currentItem = i + i.startRename(0) + end + # assumption: @shelf.currentItem.data === Cookbook + def editAdd_Category + o = @shelf.currentItem.data + a = $replicator.create('category', + {'cookbook_id',o.id,'name',"New Category"}) + # FIXME hmm, next 4 lines are duplicate code from build_shelf. + # what we really want is a synctree function like in the abandoned fxruby + # code + i = Qt::ListViewItem.new(@shelf.currentItem,a.name) + i.data = a + i.open = true + i.setRenameEnabled(0,true) + @shelf.currentItem = i + i.startRename(0) + end + # assumption: @shelf.currentItem.data === Category + def editAdd_Recipe + a = @shelf.currentItem.data + r = $replicator.create('recipe', {'name',"New Recipe"}) + a.recipes << r + # FIXME hmm, next 4 lines are duplicate code from build_shelf. + # what we really want is a synctree function like in the abandoned fxruby + # code + i = Qt::ListViewItem.new(@shelf.currentItem,r.name) + i.data = r + i.open = true + i.setRenameEnabled(0,true) + @shelf.currentItem = i + @recipe_entry.setFocus + @recipe_entry.selectAll + end def helpAbout AboutDialog.new.exec end @@ -72,13 +123,31 @@ def shelf_currentChanged i = @shelf.currentItem.data self.counter_currentItem = i + + # counterStack enabled or disabled? + # enable/disable menu items case i when Cookbook @counterStack.enabled = false + + @editAdd_CookbookAction.enabled = true + @editAdd_CategoryAction.enabled = true + @editAdd_RecipeAction.enabled = false + @editAdd_IngredientAction.enabled = false when Category @counterStack.enabled = false + + @editAdd_CookbookAction.enabled = true + @editAdd_CategoryAction.enabled = false + @editAdd_RecipeAction.enabled = true + @editAdd_IngredientAction.enabled = false when Recipe @counterStack.enabled = true + + @editAdd_CookbookAction.enabled = true + @editAdd_CategoryAction.enabled = false + @editAdd_RecipeAction.enabled = false + @editAdd_IngredientAction.enabled = true end end def shelf_item_renamed(item,col,text) |
From: Hans F. <fu...@us...> - 2004-06-25 04:27:26
|
Update of /cvsroot/neelix/neelix In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9681 Modified Files: Makefile Log Message: Adding stuff (except ingredient) works Index: Makefile =================================================================== RCS file: /cvsroot/neelix/neelix/Makefile,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Makefile 20 Jun 2004 15:15:07 -0000 1.6 +++ Makefile 25 Jun 2004 04:27:17 -0000 1.7 @@ -1,9 +1,9 @@ -all: qt db/hans.db +all: qt db qt: make -C view/qt -#%: -# make -C db $@ +db: + make -C db hans.db # this assumes the current debian package name (rdoc plain seems to conflict # with ri plain and I can't live without ri) @@ -11,7 +11,13 @@ # I'm assuming dot is available to make the cool relation graphs. (-d) rdoc=rdoc1.8 doc: - $(rdoc) -d -o doc model/*.rb view/*.rb presenter/*.rb *.rb - if [ $(USER) = fugalh ]; then rsync -r doc shell.sf.net:neelix/htdocs/rdoc; fi + $(rdoc) -d -o rdoc model/*.rb view/qt/*.rb presenter/*.rb *.rb -.PHONY: doc all qt +web: doc + rsync -rv rdoc screenshot.png shell.sf.net:neelix/htdocs + +clean: + rm -rf doc + make -C db clean + +.PHONY: doc all qt web db clean |
From: Hans F. <fu...@us...> - 2004-06-25 04:27:26
|
Update of /cvsroot/neelix/neelix/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9681/model Modified Files: model.rb Log Message: Adding stuff (except ingredient) works Index: model.rb =================================================================== RCS file: /cvsroot/neelix/neelix/model/model.rb,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- model.rb 10 Jun 2004 14:35:22 -0000 1.11 +++ model.rb 25 Jun 2004 04:27:18 -0000 1.12 @@ -520,7 +520,13 @@ nil end - # create a new <type> with the hash of values given. + # create a new <type> with the hash of <values> given. + # cookbook:: name + # category:: cookbook_id, name + # recipe:: name + # ingredient:: recipe_id, measure_id, quantity, food_id, modifier + # food:: name + # measure:: (nothing) def create(type,values) check_dbh |
From: Hans F. <fu...@us...> - 2004-06-25 02:46:44
|
Update of /cvsroot/neelix/neelix In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24011 Added Files: fatbot.png Log Message: Courtesy of Gort's icons. --- NEW FILE: fatbot.png --- (This appears to be a binary file; contents omitted.) |
From: Hans F. <fu...@us...> - 2004-06-25 02:45:42
|
Update of /cvsroot/neelix/neelix/view/qt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23395/view/qt Modified Files: mw.ui qt.rb Log Message: Editing measure and food complete. Note I didn't use the find_food function in the replicator. Yeah, putting it all in the presenter means we can't take advantage of SQL, but OTOH not using SQL is more database-agnostic and not likely to be a performance hit. "Premature optimization is the root of all evil" and all that. Index: mw.ui =================================================================== RCS file: /cvsroot/neelix/neelix/view/qt/mw.ui,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- mw.ui 24 Jun 2004 04:09:45 -0000 1.3 +++ mw.ui 25 Jun 2004 02:45:31 -0000 1.4 @@ -9,13 +9,19 @@ <x>0</x> <y>0</y> <width>747</width> - <height>525</height> + <height>528</height> </rect> </property> <property name="caption"> <string>Neelix</string> <comment>Recipe Management System</comment> </property> + <property name="icon"> + <pixmap>image0</pixmap> + </property> + <property name="iconText"> + <string>Neelix</string> + </property> <vbox> <property name="name"> <cstring>unnamed</cstring> @@ -345,7 +351,7 @@ <cstring>fileNewAction</cstring> </property> <property name="iconSet"> - <iconset>image0</iconset> + <iconset>image1</iconset> </property> <property name="text"> <string>New</string> @@ -362,7 +368,7 @@ <cstring>fileOpenAction</cstring> </property> <property name="iconSet"> - <iconset>image1</iconset> + <iconset>image2</iconset> </property> <property name="text"> <string>Open</string> @@ -419,9 +425,12 @@ </actions> <images> <image name="image0"> - <data format="XPM.GZ" length="721">789cedd2b10ac2301405d03d5ff148b62056035241fc04c5511087f425a2432b681d44fc777ba329d6b47fe07d19dee50cc9904cd376b3229d896b6deb13131fed85b4bb95e57db75f3e8434869a93d3548e841c13d3fa5c79ecaad9d52404b540351e83caa833c6a03ad4798e41f5a86c30a816f510126ee94d14d52611fb8e2ad49070a4445ca4447ca4446ca444da07fecac7ffd2956ebe64f81ff4c873215e0583a9b0</data> + <data format="XPM.GZ" length="1452">789c7594dd6e13311085eff314abcc5d845ad20205211e01c42512e2c21e7bfc6f4b502e10e2dd39e36cd34dd59e36cd9eec97b13d67b6d787e5dbd7cfcbe17af7ebdedc275e389a9fcbc1fd6eedcff71f9ffeeef6b7370b7e8f77cb71ff6ab7bf5a78f932bad76bc235bd9e526bd41ea7d406b537536abbdadb29b543ed9b29b555eddb29b556edbb29b5acf66e4aad53fb7e4aad57fb614aada835536a8b5a3ba536aae529b549ad9b529bd5fa29b54dad4ccdb39f455b9d3fdd32f8dc58761e5ff5121ea90d4314a2381f534a19afc2869e3244d59b0a24372827c765ad74668862a7c10284a489cda95477821e1822674db728d39aa126e46289d65d32954dafec2356aad41af558bc8fb3d0ca10356346b5be60ad4cbe616930be6f196b4d18c3b22844b60d2a22258e2de383191d85d09d98c9a6414e24bab865a20fbdf7810ea243c4c50df1c54bdb32e21cdb5aabf78c4a3853f14eb0ff2dc38c140a3a8cdb09ad462b41a40da31186e1d040dcc97966d170e5f9cc80e053d61d63c4220ee353bb59e33f31163f3a74f813cc3a1a7a35086e6532ba1ceae8c1f48ea108c043c041c5e8aed73a9d6bb5554f0fb23a0f83f75a020b9df7236c71f481c43cce9e8aeec9398cc2c35a57ca3840cc082c2669b128e695d96481af31ba5c0ada274d41bc977a9117ee6315d1496d82eee51ca314bb659cc54e0455b47f98c1223ea1105f321ab962599f0b5d51d7ba9c8daa73010469c53c0b3967b7738810e6e12db378e71440c692e26316571a84ee9975e6754fb1949c90e1e88f8cf3e7471829e814ccd8780ed0ca844ecf2a7bdacecf4bba784e9f079efcdf7849fb7f1f77ff0148de81f6</data> </image> <image name="image1"> + <data format="XPM.GZ" length="721">789cedd2b10ac2301405d03d5ff148b62056035241fc04c5511087f425a2432b681d44fc777ba329d6b47fe07d19dee50cc9904cd376b3229d896b6deb13131fed85b4bb95e57db75f3e8434869a93d3548e841c13d3fa5c79ecaad9d52404b540351e83caa833c6a03ad4798e41f5a86c30a816f510126ee94d14d52611fb8e2ad49070a4445ca4447ca4446ca444da07fecac7ffd2956ebe64f81ff4c873215e0583a9b0</data> + </image> + <image name="image2"> <data format="XPM.GZ" length="691">789cad914d0ac2301085f739c5d0d915b11a140ae211149782b898448b2e5a41eb42c4bb9b9fa6a67644045f0299978f37134896c27ab5803413979aeaa3067da033a4bb6b59de36dbf95d245282d953182703910c41c3f254ed6d8da6c69193b5dada7c924b6fc9dac2c85b156c51b83eacfe41d0c89defc4dfa2dd7c37fc44b025a179043c4152a4b055f4365414ad0e8901fd94c1ae5e19441da9211c68e7f44098d3074d86019e70a0210c089958df7ffb31134fa13797a8</data> </image> </images> Index: qt.rb =================================================================== RCS file: /cvsroot/neelix/neelix/view/qt/qt.rb,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- qt.rb 25 Jun 2004 02:23:56 -0000 1.3 +++ qt.rb 25 Jun 2004 02:45:31 -0000 1.4 @@ -1,3 +1,4 @@ +require 'presenter/presenter.rb' require 'view/qt/mw.rb' require 'view/qt/aboutdialog.rb' @@ -104,19 +105,18 @@ end def ingredient_changed(row,col) recipe = @shelf.currentItem.data + text = @ingredients_table.text(row,col) case col when 0 # quantity - recipe.ingredients[row].quantity = @ingredients_table.text(row,col) + recipe.ingredients[row].quantity = text when 1 # measure - #recipe.ingredients[row].measure = @ingredients_table.text(row,col) - puts "implement me: ingredient_changed(#{row},#{col}) (measure)" + recipe.ingredients[row].measure = Presenter::findCreateMeasure(text) when 2 # food - #recipe.ingredients[row].food = @ingredients_table.text(row,col) - puts "implement me: ingredient_changed(#{row},#{col}) (food)" + recipe.ingredients[row].food = Presenter::findCreateFood(text) when 3 # modifier - recipe.ingredients[row].modifier = @ingredients_table.text(row,col) + recipe.ingredients[row].modifier = text end - + adjust_columns end def directions_changed() @shelf.currentItem.data.directions = @directions_edit.text |