bug-gnutrition
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gnutrition] Error report (app freezes when adding multiple ingr


From: address@hidden
Subject: Re: [bug-gnutrition] Error report (app freezes when adding multiple ingredients to recipe) and patch proposal
Date: 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
../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, 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?
>>>
>>> _______________________________________________
>>> https://lists.gnu.org/mailman/listinfo/bug-gnutrition

Attachment: patch5.diff
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]