[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gnutrition] Error report (app freezes when adding multiple ingr
Re: [bug-gnutrition] Error report (app freezes when adding multiple ingredients to recipe) and patch proposal
Wed, 29 May 2013 21:34:57 -0400
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
*** ./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
*** 124,129 ****
--- 124,131 ----
#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))
Only in ../gnutrition-0.32-changed/src: plan_compute_dlg.py~
On Wed, May 29, 2013 at 12:46 AM, address@hidden <address@hidden> 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, address@hidden <address@hidden> 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 <address@hidden> 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?
Description: Binary data