how to make my own menu item - ? - General Discussion and Assistance - CHDK Forum

how to make my own menu item - ?

  • 4 Replies
  • 6581 Views
*

Offline jetzt

  • ****
  • 316
  • [A710IS,(SD200)]
how to make my own menu item - ?
« on: 21 / December / 2007, 13:14:40 »
Advertisements
I recently started compiling CHDK myself,
to start easyly i only modifyed the calendar.
Now I would like to create my own menu item, how do I do this?
I tried to list my gui_stopwatch in the gui.c but with no success.
I'm sure it's only a small beginner's error, bur I'm a newbe and I get these ... errors.
So please help me a bit.

Additional info:
OS: WinXP (Not only stupid Win user, but mostly.)
ERROR:
Code: [Select]
>> Entering to core
gui.c -> gui.o
gui.c:138: warning: initialization makes integer from pointer without a cast
gui.c: In function `gui_draw_stopwatch':
gui.c:1218: error: `GUI_MODE_STOPWATCH' undeclared (first use in this function)
gui.c:1218: error: (Each undeclared identifier is reported only once
gui.c:1218: error: for each function it appears in.)
E:\CHDK_A710is\buildenvironment\bin\gmake[1]: *** [gui.o] Error 1
gmake: *** [all-recursive] Error 1

*

Offline GrAnd

  • ****
  • 916
  • [A610, S3IS]
    • CHDK
Re: how to make my own menu item - ?
« Reply #1 on: 21 / December / 2007, 14:31:16 »
Did you define the 'GUI_MODE_STOPWATCH' in the 'include/gui.h' ?
CHDK Developer.

*

Offline jetzt

  • ****
  • 316
  • [A710IS,(SD200)]
Thank you
« Reply #2 on: 21 / December / 2007, 15:59:26 »
 ::) I knew that it was such a simple thing, but it's a bit tricky as the Instructions in the wiki say:
Quote
core - The core of the CHDK. If you like to add something or modify the existing functionality, this is probably the only folder you need to look into. (Maybe also 'lib' and 'include'.)
I only read the bold version ...

ok, enough of that, thank you
I now have a new error,
Quote
gui.c:138: warning: initialization makes integer from pointer without a cast
,
but I'm going to solve it^^

*

Offline jetzt

  • ****
  • 316
  • [A710IS,(SD200)]
Re: how to make my own menu item - ?
« Reply #3 on: 23 / December / 2007, 06:15:56 »
I've solved the the above error now, but it seems that somehow my kbd_proc. isn't called.
(And if I don't call it form gui_stopwatch_init the gui_stopwatch function [from gui_calender] isn't called, too.)
So again a few tipps where I have to register my 'stopwatch' would be great.
Thanks in advance. :D

If you want to I could then also add it to the "Modifying the sorce" section in the wiki.

*

Offline GrAnd

  • ****
  • 916
  • [A610, S3IS]
    • CHDK
Re: how to make my own menu item - ?
« Reply #4 on: 23 / December / 2007, 06:46:34 »
As I do not have your sources to look into, I can't give a direct answer on your question.
In general, it's not so difficult to implement new menu item. See, for example, how it was done for 'GUI_MODE_CALENDAR' and do it similar.
CHDK Developer.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal