Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Patches
  • Category Plugins
  • Assigned To No-one
  • Operating System Archos Recorder
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by teru - 2008-10-13
Last edited by nls - 2008-10-24

FS#9487 - calendar plugin fix

this patch fixes these bugs.
1. curosr disappears when move to January from Dec.
curosr indicates 32, 33… 2. it shows empty memo when you select monday after memo is add.
this is because memos_in_memory is incremented improperly after memos are loaded.
3. weekly memos are also shown monthly.
e.g. add weekly memo to 1st September at first.
then, select 1st Octember, and it will show the memo you added to 1 September.

and I made some changes.
1. modify function save_memo to rename ‘~temp’ to ‘.memo’ instead of copying content.
2. look after array size.
3. modify some indent.

Closed by  nls
2008-10-24 08:41
Reason for closing:  Accepted
Additional comments about closing:   Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407

committed, thanks!

nls commented on 2008-10-20 20:32

Looks nice but we need your Real Name ™ for the credits to commit this.
Also why is it necessary to have 13 months in the days_in_month array?

teru commented on 2008-10-21 08:35

Maybe it is not necessary.
I just used days_in_month[][0] because it is not used.
days_in_month is used in the next_month to decrease shown→mday.
And it cause the curosr disappearance bug that shown→mday is not decreased propery.
to decrease shown→mday propery, i made change below

@@ -612,7 +610,7 @@

       shown->year++;
       leap_year = is_leap_year(shown->year);
   }

- else if (step > 0)
+ if (step > 0)

       shown->mday = shown->mday - days_in_month[leap_year][shown->mon-1];
   else if (shown->mday > days_in_month[leap_year][shown->mon])
       shown->mday = days_in_month[leap_year][shown->mon];

and set 31 to days_in_month[][0] for the case shown→mon is 1.
I thought this is natural fix…

Another way is maybe like this.

@@ -612,4 +610,5 @@

       shown->year++;
       leap_year = is_leap_year(shown->year);

+ if (step > 0) shown→mday -= 31;

   }
   else if (step > 0)

And my real name is "Teruaki Kawashima".

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing