Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#9224 - Calendar button map for Gigabeat F and other targets

Attached to Project: Rockbox
Opened by Teruaki Kawashima (teru) - Tuesday, 29 July 2008, 17:21 GMT+2
Last edited by Nils Wallménius (nls) - Saturday, 25 October 2008, 18:35 GMT+2
Task Type Patches
Category Plugins
Status Closed
Assigned To No-one
Player Type All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Private No

Details

This patch will make calendar plugin available for the targets with RTC.
1. I added button maps just like other plugins and fixed some codes.
2. use rb->memset to initialize struct variables.
3. draw lines if the LCD is large enough.
4. use List Widget to show memos and menu API for edit menu.

I tested this on my Gigabeat F21 and on the sim.
Sorry for my bad English.
   calendar.patch (31.2 KiB)
 apps/plugins/calendar.c                              |  627 +++++++++++--------
 apps/plugins/SOURCES                                 |    2 
 firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c |    4 
 3 files changed, 371 insertions(+), 262 deletions(-)

This task depends upon

Closed by  Nils Wallménius (nls)
Saturday, 25 October 2008, 18:35 GMT+2
Reason for closing:  Accepted
Additional comments about closing:  I committed the last patch with two small tweaks, thanks!
Comment by Justin Hannigan (Chronon) - Friday, 08 August 2008, 22:23 GMT+2
I will give this a test over the weekend.

Thanks.
Comment by Teruaki Kawashima (teru) - Saturday, 16 August 2008, 13:19 GMT+2
fix a bug that the display of month and year could overlap day.
   calendar-20080816.patch (31.1 KiB)
 apps/plugins/calendar.c                              |  620 +++++++++++--------
 apps/plugins/SOURCES                                 |    2 
 firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c |    4 
 3 files changed, 370 insertions(+), 256 deletions(-)

Comment by Teruaki Kawashima (teru) - Sunday, 14 September 2008, 11:15 GMT+2
updated to revision 18510 and reverted some changes.
   calendar-20080914.patch (26.2 KiB)
 apps/plugins/calendar.c |  540 ++++++++++++++++++++++++++++++------------------
 apps/plugins/SOURCES    |    2 
 2 files changed, 343 insertions(+), 199 deletions(-)

Comment by Nils Wallménius (nls) - Friday, 24 October 2008, 11:03 GMT+2
This is definitely the right thing to do with this plugin.
The patch needs to be synced to svn though.

edit: using DRMODE_COMPLEMENT and fillrect works well on monochrome displays but
it is not so nice on color displays since it fills the rectangle with the complement
color which is often not the same as the background color.
Comment by Teruaki Kawashima (teru) - Friday, 24 October 2008, 18:30 GMT+2
I made a patch without touching functions drawing calendar.
this patch does following things;
1.add button maps.
2.use List Widget to show memos.
3.use menu API for edit menu.
button maps needs to be tested.

Nils: then, what value should be set?
i don't understand well how the setting affects.
   calendar-20081024.patch (17.7 KiB)
 apps/plugins/calendar.c |  419 ++++++++++++++++++++++++++++++------------------
 apps/plugins/SOURCES    |    2 
 2 files changed, 268 insertions(+), 153 deletions(-)

Comment by Nils Wallménius (nls) - Saturday, 25 October 2008, 12:21 GMT+2
An example can be seen in the "set time and date" screen which uses
DRMODE_SOLID|DRMODE_INVERSEVID for the selected item this will draw the
text with background and foreground colors reversed but will not extend beyond
the text drawn so to get the visual effect i think you should fill a rectangle
with the background color first and then draw the text with DRMODE_SOLID|DRMODE_INVERSEVID set.
I forgot to mention that the effect is only visible when not using black and white as
fg/bg since they are each other's inverse it is pretty visible if you use different colors though.

The patch works fine for me but i want to suggest a few changes to the menu.
1) The "New" item is confusing I understand that it's meant as a sort of subtitle but
this doesn't work so well with rockbox' lists imho. I would suggest to either remove the "New" item
and call the others "New Daily" etc, or make "New" open a submenu that contains the different types of memos.
2) The "Return" menu item should be removed so that this works consistently with other lists in rockbox, which
you exit by pressing left (or equivalent button).

Button maps look good to me, if something should be changed people will complain after it's committed ;)

edit: forgot to mention, the "set time and date" screen is in screens.c and around line 570 the drawing is done.
Comment by Teruaki Kawashima (teru) - Saturday, 25 October 2008, 17:39 GMT+2
here is a updated patch.
Thank you for your suggestions.
   calendar-20081025.patch (20.6 KiB)
 apps/plugins/calendar.c |  469 ++++++++++++++++++++++++++++++------------------
 apps/plugins/SOURCES    |    2 
 2 files changed, 299 insertions(+), 172 deletions(-)

Loading...