From foo-script@o2.pl Tue Jan 8 02:44:35 2013 From: foo-script@o2.pl (Adam 'foo-script' Rakowski) Date: Tue, 08 Jan 2013 03:44:35 +0100 Subject: [bug-gnutrition] A patch for config.py Message-ID: <50EB8813.1080809@o2.pl> I try to build gnutrition.exe (with py2exe), but there were a problem with config.py On Windows an environment variable 'HOME' usualy does not exist. -- Pozdrawiam AR -------------- next part -------------- A non-text attachment was scrubbed... Name: config.patch Type: text/x-patch Size: 487 bytes Desc: not available URL: From foo-script@o2.pl Wed Jan 9 20:36:43 2013 From: foo-script@o2.pl (Adam 'foo-script' Rakowski) Date: Wed, 09 Jan 2013 21:36:43 +0100 Subject: [bug-gnutrition] run_gnutrition,py.in patch Message-ID: <50EDD4DB.2010701@o2.pl> I've merged last patch into it. This one alters run-gnutrition.py. It is not processed by autotools anymore. All the paths are relative now. Removing run-gnutrition.py.in eliminated a hard-coded lookup paths, so after installation whole gnutrition directory can be moved to another place without crashing program. I've also removed a whole dir with autotools' cache. It is unnecessary in source distribution. Best regards, Adam -------------- next part -------------- A non-text attachment was scrubbed... Name: gnutrition-0.32.patch Type: text/x-patch Size: 120704 bytes Desc: not available URL: From jself@gnu.org Thu Jan 10 18:27:17 2013 From: jself@gnu.org (Jason Self) Date: Thu, 10 Jan 2013 13:27:17 -0500 Subject: [bug-gnutrition] run_gnutrition,py.in patch In-Reply-To: <50EDD4DB.2010701@o2.pl> References: <50EDD4DB.2010701@o2.pl> Message-ID: <20130110182717.GA24972@gnu.org> Thank you, they look good, I should have some free time to commit them in the next few days. -- Jason Self Project Maintainer GPG Key: 47486962 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: From ania.mineeva@gmail.com Sat Jan 12 13:55:39 2013 From: ania.mineeva@gmail.com (Anna Mineeva) Date: Sat, 12 Jan 2013 16:55:39 +0300 Subject: [bug-gnutrition] Graphic Designer For GNUtrition Message-ID: Hello! I am Anna, graphical- and 2d designer. I already have a successful experience on cooperating with open source projects http://www.gentoo.org/proj/en/miniconf/ (banners). I found that you are need the icons... https://savannah.gnu.org/people/viewjob.php?group_id=10277&job_id=569 ... Is it still actual? With best regards, Anna Mineeva -------------- next part -------------- An HTML attachment was scrubbed... URL: From jself@gnu.org Sun Jan 13 07:32:01 2013 From: jself@gnu.org (Jason Self) Date: Sun, 13 Jan 2013 02:32:01 -0500 Subject: [bug-gnutrition] Graphic Designer For GNUtrition In-Reply-To: References: Message-ID: <20130113073201.GA17873@gnu.org> Anna Mineeva wrote: > Hello! I am Anna, graphical- and 2d designer. > I already have a successful experience on cooperating with open source > projects http://www.gentoo.org/proj/en/miniconf/ (banners). > I found that you are need the icons... > https://savannah.gnu.org/people/viewjob.php?group_id=10277&job_id=569 ... > Is it still actual? Absolutely! I think the first that's needed is some sort of application icon. What do you think? -- Jason Self Project Maintainer GPG Key: 47486962 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: From jself@gnu.org Sun Jan 13 07:41:47 2013 From: jself@gnu.org (Jason Self) Date: Sun, 13 Jan 2013 02:41:47 -0500 Subject: [bug-gnutrition] run_gnutrition,py.in patch In-Reply-To: <50EDD4DB.2010701@o2.pl> References: <50EDD4DB.2010701@o2.pl> Message-ID: <20130113074147.GA22096@gnu.org> Your changes have been applied. There have been a number of changes since the last release. You may want to consider checking out the latest from the version control system. This will get you a copy: bzr branch bzr://bzr.savannah.gnu.org/gnutrition/trunk -- Jason Self Project Maintainer GPG Key: 47486962 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: From foo-script@o2.pl Tue Mar 12 02:39:20 2013 From: foo-script@o2.pl (Adam 'foo-script' Rakowski) Date: Tue, 12 Mar 2013 03:39:20 +0100 Subject: [bug-gnutrition] run_app.py : shutdown Message-ID: <513E9558.6020607@o2.pl> I've newest source from trunk. In run_app.py shutdown method constructs database and just after that, it closes db. Is there any reason to keep this function as it is? Why is it needed? [ btw: it causes a problem when db is not set and druid has been canceled - that's what I am trying to fix now ] -- Pozdrawiam AR From foo-script@o2.pl Tue Mar 12 22:32:30 2013 From: foo-script@o2.pl (Adam 'foo-script' Rakowski) Date: Tue, 12 Mar 2013 23:32:30 +0100 Subject: [bug-gnutrition] Fixes for: first run bug + subdirectory in gnutrition configuration dir Message-ID: <513FACFE.1000801@o2.pl> Gnutrition homedir is in.gnutrition/version_number. Fixing a problem with empty db and empty config when first-run druid has been canceled. If druid was canceled on first screen, then empty sqlite file was created and next time gnutrition tried to load data from this file. Similiar, the empty configuration file wasn't deleted when user cancels config-druid. -- Pozdrawiam AR -------------- next part -------------- A non-text attachment was scrubbed... Name: 20.patch Type: text/x-patch Size: 4003 bytes Desc: not available URL: From jself@gnu.org Wed Mar 27 15:05:53 2013 From: jself@gnu.org (Jason Self) Date: Wed, 27 Mar 2013 11:05:53 -0400 Subject: [bug-gnutrition] Fixes for: first run bug + subdirectory in gnutrition configuration dir In-Reply-To: <513FACFE.1000801@o2.pl> References: <513FACFE.1000801@o2.pl> Message-ID: <20130327150552.GB22610@gnu.org> Your patch has been applied. Please be sure to include appropriate changelog entries with patches. -- Jason Self Project Maintainer GPG Key: 47486962 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: From jrbruce86@gmail.com Mon May 20 20:18:14 2013 From: jrbruce86@gmail.com (jrbruce@vt.edu) Date: Mon, 20 May 2013 15:18:14 -0400 Subject: [bug-gnutrition] Error report (app freezes when adding multiple ingredients to recipe) and patch proposal Message-ID: Thanks for adding me to the listserve! I have been looking for a free app like this one for quite some, so would be happy to help improve it in any way I can. I noticed a small bug which was causing me issues whenever I tried to add more than 3 items to a recipe. Basically what would happen was that, in recipe_win.py during the 3rd call to the add_ingredient function, line 326 would end up leading to an infinite while loop and freezing the app altogether. I attached a very simple patch which appears to fix this issue. I hope this helps someone else also! (Here it is copied and pasted into the message) diff -cr ./src/recipe_win.py ../gnutrition-0.32_changed/src/recipe_win.py *** ./src/recipe_win.py 2012-09-01 12:43:08.000000000 -0400 --- ../gnutrition-0.32_changed/src/recipe_win.py 2013-05-20 14:56:23.575795964 -0400 *************** *** 320,329 **** def add_ingredient(self, ingr): match = 0 - ret = True iter1 = self.ui.treemodel.get_iter_root() if self.num_ingr > 0: ! while ret: try: ingr_in_recipe = self.ui.treemodel.get_value(iter1, 3) except TypeError: --- 320,328 ---- def add_ingredient(self, ingr): match = 0 iter1 = self.ui.treemodel.get_iter_root() if self.num_ingr > 0: ! while True: try: ingr_in_recipe = self.ui.treemodel.get_value(iter1, 3) except TypeError: *************** *** 331,337 **** if ingr_in_recipe.food_num == ingr.food_num: match = 1 break ! ret = self.ui.treemodel.iter_next(iter1) if match == 0: iter2 = self.ui.treemodel.append() --- 330,336 ---- if ingr_in_recipe.food_num == ingr.food_num: match = 1 break ! iter1 = self.ui.treemodel.iter_next(iter1) if match == 0: iter2 = self.ui.treemodel.append() Only in ../gnutrition-0.32_changed/src: recipe_win.py~ -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: application/octet-stream Size: 1528 bytes Desc: not available URL: From jrbruce86@gmail.com Tue May 21 05:33:52 2013 From: jrbruce86@gmail.com (jrbruce@vt.edu) Date: Tue, 21 May 2013 00:33:52 -0400 Subject: [bug-gnutrition] Another patch - database error "primary key must be unique" while saving a recipe to database Message-ID: Hi, Here is another patch which I made since the program was crashing everytime I tried to save more than one ingredient to a single recipe in the database. It was because the primary key was set as the recipe number which is not unique between ingredients within the same recipe. I changed the primary key to the food number. So just as long as you don't add the same food to a recipe more than once it won't crash. Still not perfect but an improvement nonetheless. This patch includes the previous one I proposed also since they are both so small. - Jake PS I know it has me logged in anonymously but my email is jrbruce86@gmail.com. Feel free to message me about anything related to the project. --------------------------------------------------------------------------------- Only in .: patch.diff diff -rc ./src/database.py ../gnutrition-0.32_changed/src/database.py *** ./src/database.py 2012-09-01 12:43:08.000000000 -0400 --- ../gnutrition-0.32_changed/src/database.py 2013-05-21 00:09:35.968388136 -0400 *************** *** 176,185 **** # create ingredient table self.create_table("CREATE TABLE ingredient " + ! "(recipe_no INTEGER PRIMARY KEY NOT NULL, " + "amount REAL NOT NULL, " + "Msre_Desc TEXT NOT NULL, " + ! "NDB_No INTEGER NOT NULL)", 'ingredient') # create recipe category table self.create_load_table("CREATE TABLE category " + --- 176,185 ---- # create ingredient table self.create_table("CREATE TABLE ingredient " + ! "(recipe_no INTEGER NOT NULL, " + "amount REAL NOT NULL, " + "Msre_Desc TEXT NOT NULL, " + ! "NDB_No INTEGER PRIMARY KEY NOT NULL)", 'ingredient') # create recipe category table self.create_load_table("CREATE TABLE category " + Only in ../gnutrition-0.32_changed/src: database.py~ diff -rc ./src/recipe_win.py ../gnutrition-0.32_changed/src/recipe_win.py *** ./src/recipe_win.py 2012-09-01 12:43:08.000000000 -0400 --- ../gnutrition-0.32_changed/src/recipe_win.py 2013-05-20 14:56:23.575795964 -0400 *************** *** 320,329 **** def add_ingredient(self, ingr): match = 0 - ret = True iter1 = self.ui.treemodel.get_iter_root() if self.num_ingr > 0: ! while ret: try: ingr_in_recipe = self.ui.treemodel.get_value(iter1, 3) except TypeError: --- 320,328 ---- def add_ingredient(self, ingr): match = 0 iter1 = self.ui.treemodel.get_iter_root() if self.num_ingr > 0: ! while True: try: ingr_in_recipe = self.ui.treemodel.get_value(iter1, 3) except TypeError: *************** *** 331,337 **** if ingr_in_recipe.food_num == ingr.food_num: match = 1 break ! ret = self.ui.treemodel.iter_next(iter1) if match == 0: iter2 = self.ui.treemodel.append() --- 330,336 ---- if ingr_in_recipe.food_num == ingr.food_num: match = 1 break ! iter1 = self.ui.treemodel.iter_next(iter1) if match == 0: iter2 = self.ui.treemodel.append() Only in ../gnutrition-0.32_changed/src: recipe_win.py~ -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: application/octet-stream Size: 2670 bytes Desc: not available URL: From jself@gnu.org Wed May 22 15:57:33 2013 From: jself@gnu.org (Jason Self) Date: Wed, 22 May 2013 07:57:33 -0700 (PDT) Subject: [bug-gnutrition] Error report (app freezes when adding multiple ingredients to recipe) and patch proposal In-Reply-To: Message-ID: <1369234653.15088@gnu.org> jrbruce@vt.edu wrote .. > Thanks for adding me to the listserve! I have been looking for a free > app like this one for quite some, so would be happy to help improve it > in any way I can. Sure - Any and all help is welcome. > I noticed a small bug which was causing me issues whenever I tried to > add more than 3 items to a recipe. Basically what would happen was > that, in recipe_win.py during the 3rd call to the add_ingredient > function, line 326 would end up leading to an infinite while loop and > freezing the app altogether. > > I attached a very simple patch which appears to fix this issue. I hope > this helps someone else also! Thank you very much! From jrbruce86@gmail.com Wed May 22 20:07:47 2013 From: jrbruce86@gmail.com (jrbruce@vt.edu) Date: Wed, 22 May 2013 15:07:47 -0400 Subject: [bug-gnutrition] Error report (app freezes when adding multiple ingredients to recipe) and patch proposal In-Reply-To: <1369234653.15088@gnu.org> References: <1369234653.15088@gnu.org> Message-ID: You're welcome! I found another two bugs that I'd like to bring up. I put all of my patches so far into a single .diff file attached, and this includes fixes for the following two newer bugs I came across also. 1. I'm not sure why I didn't encounter this before, but in person.py there is a small typo (num_portions is mispelled wum_portions). This randomly started causing the app to crash on startup, but fixing the typo seemed to resolve the issue. 2. In lines 230 and 233 of plan_win.py, the "+ ':00'" was causing the iter_for_time() to not return the right position and iterator. and this would make it impossible to add a recipe to the plan. Here is the patch (it is also attached to the email). If you wnat just the patch for the two errors let me know (this is a patch for all the bug fixes I've made on my computer so far): diff -rc ./src/database.py ../gnutrition-0.32_changed/src/database.py *** ./src/database.py 2012-09-01 12:43:08.000000000 -0400 --- ../gnutrition-0.32_changed/src/database.py 2013-05-21 00:09:35.968388136 -0400 *************** *** 176,185 **** # create ingredient table self.create_table("CREATE TABLE ingredient " + ! "(recipe_no INTEGER PRIMARY KEY NOT NULL, " + "amount REAL NOT NULL, " + "Msre_Desc TEXT NOT NULL, " + ! "NDB_No INTEGER NOT NULL)", 'ingredient') # create recipe category table self.create_load_table("CREATE TABLE category " + --- 176,185 ---- # create ingredient table self.create_table("CREATE TABLE ingredient " + ! "(recipe_no INTEGER NOT NULL, " + "amount REAL NOT NULL, " + "Msre_Desc TEXT NOT NULL, " + ! "NDB_No INTEGER PRIMARY KEY NOT NULL)", 'ingredient') # create recipe category table self.create_load_table("CREATE TABLE category " + Only in ../gnutrition-0.32_changed/src: database.py~ diff -rc ./src/person.py ../gnutrition-0.32_changed/src/person.py *** ./src/person.py 2012-09-01 12:43:08.000000000 -0400 --- ../gnutrition-0.32_changed/src/person.py 2013-05-22 14:48:54.177184979 -0400 *************** *** 91,97 **** result = self.db.get_result() if result and len(result) != 0: ! for person_num, date, time, wum_portions, recipe_num in result: self.db.query("INSERT INTO recipe_plan_temp VALUES" + " ('%d', '%s', '%s', '%f', '%d' )" % (person_num, str(date), str(time), num_portions, --- 91,97 ---- result = self.db.get_result() if result and len(result) != 0: ! for person_num, date, time, num_portions, recipe_num in result: self.db.query("INSERT INTO recipe_plan_temp VALUES" + " ('%d', '%s', '%s', '%f', '%d' )" % (person_num, str(date), str(time), num_portions, Only in ../gnutrition-0.32_changed/src: person.py~ diff -rc ./src/plan_win.py ../gnutrition-0.32_changed/src/plan_win.py *** ./src/plan_win.py 2012-09-01 12:43:08.000000000 -0400 --- ../gnutrition-0.32_changed/src/plan_win.py 2013-05-22 14:50:04.809535227 -0400 *************** *** 221,229 **** value_list = string.split(value, ':') if int(value_list[0]) < 10: #time_string2 = '0' + value + ':00' ! time_string2 = value + ':00' else: ! time_string2 = value + ':00' if time_string1 == time_string2: return iter, pos pos = pos + 1 --- 221,229 ---- value_list = string.split(value, ':') if int(value_list[0]) < 10: #time_string2 = '0' + value + ':00' ! time_string2 = value# + ':00' else: ! time_string2 = value# + ':00' if time_string1 == time_string2: return iter, pos pos = pos + 1 Only in ../gnutrition-0.32_changed/src: plan_win.py~ diff -rc ./src/recipe_win.py ../gnutrition-0.32_changed/src/recipe_win.py *** ./src/recipe_win.py 2012-09-01 12:43:08.000000000 -0400 --- ../gnutrition-0.32_changed/src/recipe_win.py 2013-05-20 14:56:23.575795964 -0400 *************** *** 320,329 **** def add_ingredient(self, ingr): match = 0 - ret = True iter1 = self.ui.treemodel.get_iter_root() if self.num_ingr > 0: ! while ret: try: ingr_in_recipe = self.ui.treemodel.get_value(iter1, 3) except TypeError: --- 320,328 ---- def add_ingredient(self, ingr): match = 0 iter1 = self.ui.treemodel.get_iter_root() if self.num_ingr > 0: ! while True: try: ingr_in_recipe = self.ui.treemodel.get_value(iter1, 3) except TypeError: *************** *** 331,337 **** if ingr_in_recipe.food_num == ingr.food_num: match = 1 break ! ret = self.ui.treemodel.iter_next(iter1) if match == 0: iter2 = self.ui.treemodel.append() --- 330,336 ---- if ingr_in_recipe.food_num == ingr.food_num: match = 1 break ! iter1 = self.ui.treemodel.iter_next(iter1) if match == 0: iter2 = self.ui.treemodel.append() Only in ../gnutrition-0.32_changed/src: recipe_win.py~ On Wed, May 22, 2013 at 10:57 AM, Jason Self wrote: > jrbruce@vt.edu wrote .. >> Thanks for adding me to the listserve! I have been looking for a free >> app like this one for quite some, so would be happy to help improve it >> in any way I can. > > Sure - Any and all help is welcome. > >> I noticed a small bug which was causing me issues whenever I tried to >> add more than 3 items to a recipe. Basically what would happen was >> that, in recipe_win.py during the 3rd call to the add_ingredient >> function, line 326 would end up leading to an infinite while loop and >> freezing the app altogether. >> >> I attached a very simple patch which appears to fix this issue. I hope >> this helps someone else also! > > Thank you very much! > > _______________________________________________ > https://lists.gnu.org/mailman/listinfo/bug-gnutrition -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: application/octet-stream Size: 4806 bytes Desc: not available URL: From jself@gnu.org Thu May 23 23:29:54 2013 From: jself@gnu.org (Jason Self) Date: Thu, 23 May 2013 15:29:54 -0700 (PDT) Subject: [bug-gnutrition] Error report (app freezes when adding multiple ingredients to recipe) and patch proposal In-Reply-To: Message-ID: <1369348194.24653@gnu.org> > Here is the patch (it is also attached to the email). If you wnat just > the patch for the two errors let me know (this is a patch for all the > bug fixes I've made on my computer so far): In general separating logical changes into separate patches is best. Also, would you be willing to assign the copyright for your work on GNUtrition to the Free Software Foundation? From jrbruce86@gmail.com Thu May 23 23:44:39 2013 From: jrbruce86@gmail.com (jrbruce@vt.edu) Date: Thu, 23 May 2013 18:44:39 -0400 Subject: [bug-gnutrition] Error report (app freezes when adding multiple ingredients to recipe) and patch proposal In-Reply-To: <1369348194.24653@gnu.org> References: <1369348194.24653@gnu.org> Message-ID: Sure I can send in the separate patches tonight or tomorrow, time permitting. I'll make sure the keep them separate in the future. I'm totally willing to assign any and all copyrights to FSF. Just glad to see any changes I propose to help improve the app. On Thu, May 23, 2013 at 6:29 PM, Jason Self wrote: >> Here is the patch (it is also attached to the email). If you wnat just >> the patch for the two errors let me know (this is a patch for all the >> bug fixes I've made on my computer so far): > > In general separating logical changes into separate patches is best. > > Also, would you be willing to assign the copyright for your work on > GNUtrition to the Free Software Foundation? > > _______________________________________________ > https://lists.gnu.org/mailman/listinfo/bug-gnutrition From jrbruce86@gmail.com Wed May 29 05:46:21 2013 From: jrbruce86@gmail.com (jrbruce@vt.edu) Date: Wed, 29 May 2013 00:46:21 -0400 Subject: [bug-gnutrition] Error report (app freezes when adding multiple ingredients to recipe) and patch proposal In-Reply-To: References: <1369348194.24653@gnu.org> Message-ID: Here are all 4 of my patches separated out and a README file which describes each of them. I also included a single patch which applies all 4 of them at once. - Jake On Thu, May 23, 2013 at 6:44 PM, jrbruce@vt.edu wrote: > Sure I can send in the separate patches tonight or tomorrow, time > permitting. I'll make sure the keep them separate in the future. > > I'm totally willing to assign any and all copyrights to FSF. Just glad > to see any changes I propose to help improve the app. > > > > On Thu, May 23, 2013 at 6:29 PM, Jason Self wrote: >>> Here is the patch (it is also attached to the email). If you wnat just >>> the patch for the two errors let me know (this is a patch for all the >>> bug fixes I've made on my computer so far): >> >> In general separating logical changes into separate patches is best. >> >> Also, would you be willing to assign the copyright for your work on >> GNUtrition to the Free Software Foundation? >> >> _______________________________________________ >> https://lists.gnu.org/mailman/listinfo/bug-gnutrition -------------- next part -------------- A non-text attachment was scrubbed... Name: patch1.diff Type: application/octet-stream Size: 1528 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: patch2.diff Type: application/octet-stream Size: 1034 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: patch3.diff Type: application/octet-stream Size: 1120 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: patch4.diff Type: application/octet-stream Size: 1124 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: patchall.diff Type: application/octet-stream Size: 4806 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: README Type: application/octet-stream Size: 1310 bytes Desc: not available URL: From jrbruce86@gmail.com Thu May 30 02:34:57 2013 From: jrbruce86@gmail.com (jrbruce@vt.edu) Date: Wed, 29 May 2013 21:34:57 -0400 Subject: [bug-gnutrition] Error report (app freezes when adding multiple ingredients to recipe) and patch proposal In-Reply-To: References: <1369348194.24653@gnu.org> Message-ID: Here is another patch I made since the app was freezing whenever I tried to add a measurement already in grams to a plan's total. Just setting the gm_per_measure to 1 when the measurement is already in grams prevented the app from freezing. diff -rc ./src/plan_compute_dlg.py ../gnutrition-0.32-changed/src/plan_compute_dlg.py *** ./src/plan_compute_dlg.py 2012-09-01 12:43:08.000000000 -0400 --- ../gnutrition-0.32-changed/src/plan_compute_dlg.py 2013-05-29 21:14:00.772001848 -0400 *************** *** 124,129 **** --- 124,131 ---- return self.db.get_result() #HERE: take into account Amount unit modifier def get_gm_per_measure(self, food_num, msre_desc): + if msre_desc == "gm" : + return 1 self.db.query("SELECT Gm_wgt FROM weight WHERE " + "NDB_No = '%d' AND Msre_Desc = '%s'" %(food_num, msre_desc)) return float(self.db.get_single_result()) Only in ../gnutrition-0.32-changed/src: plan_compute_dlg.py~ On Wed, May 29, 2013 at 12:46 AM, jrbruce@vt.edu wrote: > Here are all 4 of my patches separated out and a README file which > describes each of them. I also included a single patch which applies > all 4 of them at once. > > - Jake > > On Thu, May 23, 2013 at 6:44 PM, jrbruce@vt.edu wrote: >> Sure I can send in the separate patches tonight or tomorrow, time >> permitting. I'll make sure the keep them separate in the future. >> >> I'm totally willing to assign any and all copyrights to FSF. Just glad >> to see any changes I propose to help improve the app. >> >> >> >> On Thu, May 23, 2013 at 6:29 PM, Jason Self wrote: >>>> Here is the patch (it is also attached to the email). If you wnat just >>>> the patch for the two errors let me know (this is a patch for all the >>>> bug fixes I've made on my computer so far): >>> >>> In general separating logical changes into separate patches is best. >>> >>> Also, would you be willing to assign the copyright for your work on >>> GNUtrition to the Free Software Foundation? >>> >>> _______________________________________________ >>> https://lists.gnu.org/mailman/listinfo/bug-gnutrition -------------- next part -------------- A non-text attachment was scrubbed... Name: patch5.diff Type: application/octet-stream Size: 741 bytes Desc: not available URL: From jrbruce86@gmail.com Thu May 30 03:35:36 2013 From: jrbruce86@gmail.com (jrbruce@vt.edu) Date: Wed, 29 May 2013 22:35:36 -0400 Subject: [bug-gnutrition] Error report (app freezes when adding multiple ingredients to recipe) and patch proposal In-Reply-To: References: <1369348194.24653@gnu.org> Message-ID: Here is another simple patch that addresses the same problem as patch5 but which occurs from the recipe window rather than the plan window. diff -rc ./src/nutr_composition_dlg.py ../gnutrition-0.32-changed-just6/src/nutr_composition_dlg.py *** ./src/nutr_composition_dlg.py 2012-09-01 12:43:08.000000000 -0400 --- ../gnutrition-0.32-changed-just6/src/nutr_composition_dlg.py 2013-05-29 22:24:27.071431972 -0400 *************** *** 93,102 **** "WHERE NDB_No ='%d'" % (food_num)) list_food_nutr = self.db.get_result() ! self.db.query("SELECT Gm_wgt FROM weight " + ! "WHERE NDB_No ='{0:d}' AND Msre_Desc ='{1:s}'".format( food_num, msre_desc)) ! gm_per_msre = self.db.get_single_result() for i in range(len(self.list_nutr_tot)): tot_nutr_num, tot_nutr_val = self.list_nutr_tot[i] --- 93,105 ---- "WHERE NDB_No ='%d'" % (food_num)) list_food_nutr = self.db.get_result() ! ! gm_per_msre = 1 ! if msre_desc != "gm" : ! self.db.query("SELECT Gm_wgt FROM weight " + ! "WHERE NDB_No ='{0:d}' AND Msre_Desc ='{1:s}'".format( food_num, msre_desc)) ! gm_per_msre = self.db.get_single_result() for i in range(len(self.list_nutr_tot)): tot_nutr_num, tot_nutr_val = self.list_nutr_tot[i] On Wed, May 29, 2013 at 9:34 PM, jrbruce@vt.edu wrote: > Here is another patch I made since the app was freezing whenever I > tried to add a measurement already in grams to a plan's total. Just > setting the gm_per_measure to 1 when the measurement is already in > grams prevented the app from freezing. > > diff -rc ./src/plan_compute_dlg.py > ../gnutrition-0.32-changed/src/plan_compute_dlg.py > *** ./src/plan_compute_dlg.py 2012-09-01 12:43:08.000000000 -0400 > --- ../gnutrition-0.32-changed/src/plan_compute_dlg.py 2013-05-29 > 21:14:00.772001848 -0400 > *************** > *** 124,129 **** > --- 124,131 ---- > return self.db.get_result() > #HERE: take into account Amount unit modifier > def get_gm_per_measure(self, food_num, msre_desc): > + if msre_desc == "gm" : > + return 1 > self.db.query("SELECT Gm_wgt FROM weight WHERE " + > "NDB_No = '%d' AND Msre_Desc = '%s'" %(food_num, msre_desc)) > return float(self.db.get_single_result()) > Only in ../gnutrition-0.32-changed/src: plan_compute_dlg.py~ > > > > On Wed, May 29, 2013 at 12:46 AM, jrbruce@vt.edu wrote: >> Here are all 4 of my patches separated out and a README file which >> describes each of them. I also included a single patch which applies >> all 4 of them at once. >> >> - Jake >> >> On Thu, May 23, 2013 at 6:44 PM, jrbruce@vt.edu wrote: >>> Sure I can send in the separate patches tonight or tomorrow, time >>> permitting. I'll make sure the keep them separate in the future. >>> >>> I'm totally willing to assign any and all copyrights to FSF. Just glad >>> to see any changes I propose to help improve the app. >>> >>> >>> >>> On Thu, May 23, 2013 at 6:29 PM, Jason Self wrote: >>>>> Here is the patch (it is also attached to the email). If you wnat just >>>>> the patch for the two errors let me know (this is a patch for all the >>>>> bug fixes I've made on my computer so far): >>>> >>>> In general separating logical changes into separate patches is best. >>>> >>>> Also, would you be willing to assign the copyright for your work on >>>> GNUtrition to the Free Software Foundation? >>>> >>>> _______________________________________________ >>>> https://lists.gnu.org/mailman/listinfo/bug-gnutrition -------------- next part -------------- A non-text attachment was scrubbed... Name: patch6.diff Type: application/octet-stream Size: 1286 bytes Desc: not available URL: From jself@gnu.org Mon Jun 3 17:35:55 2013 From: jself@gnu.org (Jason Self) Date: Mon, 03 Jun 2013 09:35:55 -0700 (PDT) Subject: [bug-gnutrition] Units in Gnutrition In-Reply-To: <2e800212.756673f1.51a76f35.e07e9@o2.pl> Message-ID: <1370277355.7716@gnu.org> Adam Rakowski wrote .. > Hi Jason, > > I have forked Gnutrition (local repository) to play with internationalization. Awesome! :) > Now I turn the database to SI units. What kind of volume ounces were used in Gnutrition: > american ounce or international. It appears to be international avoirdupois ounce: http://en.wikipedia.org/wiki/Ounce Commonly used in the U.S. From smithbone@gmail.com Wed Aug 14 18:29:58 2013 From: smithbone@gmail.com (Richard Smith) Date: Wed, 14 Aug 2013 13:29:58 -0400 Subject: [bug-gnutrition] Failed build/install on Kubuntu 12.04.2 LTS Message-ID: <520BBE96.3020206@gmail.com> I'd like to check out gnutrition but I'm having some difficulty getting it installed and running. I've tried both released and the current devel branch from the repository bzr://bzr.savannah.gnu.org/gnutrition/trunk/ The released version .32 fails to make for me with the following. make[1]: Entering directory `/home/src/gnutrition-0.32/doc' db2html gnutrition.sgml output is gnutrition Using catalogs: /etc/sgml/catalog Using stylesheet: /usr/share/docbook-utils/docbook-utils.dsl#html Working on: /home/src/gnutrition-0.32/doc/gnutrition.sgml openjade:/home/src/gnutrition-0.32/doc/gnutrition.sgml:1:59:W: cannot generate system identifier for public text "-//Davenport//DTD DocBook V3.0//EN" openjade:/home/src/gnutrition-0.32/doc/gnutrition.sgml:1:60:E: reference to entity "BOOK" for which no system identifier could be generated openjade:/home/src/gnutrition-0.32/doc/gnutrition.sgml:1:0: entity was defined here openjade:/home/src/gnutrition-0.32/doc/gnutrition.sgml:1:60:E: DTD did not contain element declaration for document type name openjade:/home/src/gnutrition-0.32/doc/gnutrition.sgml:2:6:E: element "BOOK" undefined openjade:/home/src/gnutrition-0.32/doc/gnutrition.sgml:3:12:E: element "BOOKINFO" undefined Lots of other undefined elements. The trunk version makes and installs but only after I manually made the /usr/local/share/gnutrition directory. However, it does not run in the general case. It fails with an import error importing 'src.run_app'. Looking at the gnutrition startup code I don't see how its supposed to work. The app tries to find the location of the $prefix/share/gnutrition but its starting with the current local directory rather than the full path to $prefix/bin/gnutrition so in my case it ends up adding '/home/share/gnutrition' to the path rather than '/usr/local/share/gnutrition'. If I change the working directory to /usr/local/bin first and then run gnutrition it loads and runs. Seems like the install procedure failed to correctly identify and setup $prefix. Did I not do something correctly? I installed by running autogen.sh, make, and sudo make install. -- Richard A. Smith From rsiddharth@ninthfloor.org Mon Sep 16 05:38:41 2013 From: rsiddharth@ninthfloor.org (rsiddharth) Date: Mon, 16 Sep 2013 04:38:41 +0000 Subject: [bug-gnutrition] GNUtrition Icon Message-ID: <20130916043839.GA5701@ninthfloor.org> Hey, There is a request for a GNUtrition icon in savannah[1]. I made one: http://rsiddharth.ninth.su/art/gnutrition.svg [Public Domain] Description: Its head is like that of GNU's horn and the base is like that of a carrot. All in all, it is a GNUish Carrot. Please let me know if you're using this icon for this project. Thanks. [1]: https://savannah.gnu.org/people/viewjob.php?group_id=10277&job_id=569 -- rsiddharth -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 490 bytes Desc: Digital signature URL: From jself@gnu.org Fri Mar 29 19:05:41 2013 From: jself@gnu.org (Jason Self) Date: Fri, 29 Mar 2013 15:05:41 -0400 Subject: [help-gnutrition] Add and edit custom nutritional information Message-ID: <20130329190541.GA31865@gnu.org> Sarah asked: > Is it possible to add a new custom food and manually enter the nutritional > information? How to do this? > > Can I modify the nutritional information of an existing food? Sure. There's no currently no way to do it from within GNUtrition but everything is stored in the database so use any program that can work with SQLite databases should work for you. Just edit the database directly. I plan to add this ability to GNUtrition in a future version. Database documentation can be found online at the USDA website: http://www.ars.usda.gov/Services/docs.htm?docid=8964 -- Jason Self Project Maintainer GPG Key: 47486962 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: From sarahmiller921@googlemail.com Fri Mar 29 19:26:23 2013 From: sarahmiller921@googlemail.com (Sarah Miller) Date: Fri, 29 Mar 2013 20:26:23 +0100 Subject: [help-gnutrition] Add and edit custom nutritional information In-Reply-To: <20130329190541.GA31865@gnu.org> References: <20130329190541.GA31865@gnu.org> Message-ID: Thanks! Would be great to see this feature soon! On Fri, Mar 29, 2013 at 8:05 PM, Jason Self wrote: > Sarah asked: > > Is it possible to add a new custom food and manually enter the > nutritional > > information? How to do this? > > > > Can I modify the nutritional information of an existing food? > > Sure. There's no currently no way to do it from within GNUtrition but > everything is stored in the database so use any program that can work > with SQLite databases should work for you. Just edit the database directly. > > I plan to add this ability to GNUtrition in a future version. > > Database documentation can be found online at the USDA website: > http://www.ars.usda.gov/Services/docs.htm?docid=8964 > > -- > Jason Self > Project Maintainer > GPG Key: 47486962 > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.10 (GNU/Linux) > > iEYEARECAAYFAlFV5gUACgkQb8syyUdIaWIMyQCghDP+tTXMzrQtn29xfz8j2izn > mVMAnApHtWSOotQQqVQdO/7Ohbj2UOTd > =3MP5 > -----END PGP SIGNATURE----- > > _______________________________________________ > https://lists.gnu.org/mailman/listinfo/help-gnutrition > -------------- next part -------------- An HTML attachment was scrubbed... URL: