User Menu Editor module. - General Discussion and Assistance - CHDK Forum supplierdeeply

User Menu Editor module.

  • 23 Replies
  • 3797 Views
*

Offline philmoz

  • *****
  • 3116
    • Photos
User Menu Editor module.
« on: 15 / May / 2013, 06:14:54 »
Advertisements
In revision 2777 (trunk only) I've added an interactive editor for the User Menu to eventually replace the current clunky method of editing the menu.

To use the editor select 'User Menu Edit' from the Menu Settings menu.

This will start by displaying the User Menu with the title bar in red, and without the first 'Main Menu' entry.
Controls are:
- SET - invoke popup menu (see below)
- LEFT - move current item up
- RIGHT - move current item down
- ERASE - delete current item (with prompt)
- MENU - exit & save user menu

Pressing SET opens a popup menu with two three options:
- 'Add & Remove Menu items'
- 'Add script to User Menu'
- 'Add module to User Menu'

Selecting 'Add & Remove Menu items' will open the Main CHDK menu (again with the title in red).
The menu display excludes values for menu items (right hand side), separators, script parameters and the User Menu entry. Entries that are already in the User Menu are shown in green.
Controls here are:
- SET - enter sub menu, or go back a menu (on the Back entry)
- DISP - go back to previous menu
- MENU - exit back to previous edit state
- LEFT or ERASE - remove item from User Menu if it is in the menu already (with prompt)
- RIGHT - add item to User Menu if not there already (with prompt)

Selecting 'Add script to User Menu' opens the file browser in the scripts folder.
Selecting .bas or .lua file and pressing SET will add the script to the User Menu.

Selecting 'Add module to User Menu' opens the file browser in the modules folder.
Selecting a .flt file and pressing SET will add the module to the User Menu.

Testing and feedback welcome.

Phil.

Edit: Revision 2778 adds the ability to have simple modules in the User Menu.
Modules that don't appear in the other menus (e.g. CPU INFO) can be added to the user menu for quick access. Probably of most use when developing a new module.
Instructions above updated.

« Last Edit: 15 / May / 2013, 08:45:47 by philmoz »
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)

Re: User Menu Editor module.
« Reply #1 on: 15 / May / 2013, 08:18:13 »
In revision 2777 (trunk only) I've added an interactive editor for the User Menu to eventually replace the current clunky method of editing the menu.
Excellent!  Thanks for doing that - I use my user menu a lot and this is a big step.

Quote
Selecting 'Add script to User Menu' opens the file browser in the scripts folder.
Selecting .bas or .lua file and pressing SET will add the script to the User Menu.
Did you give any thought to the idea of adding an "execute script" menu item in addition the current "select script" menu item ?

Quote
Testing and feedback welcome.
I'll rebuild and play tonight!
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline philmoz

  • *****
  • 3116
    • Photos
Re: User Menu Editor module.
« Reply #2 on: 15 / May / 2013, 08:47:09 »
Quote
Selecting 'Add script to User Menu' opens the file browser in the scripts folder.
Selecting .bas or .lua file and pressing SET will add the script to the User Menu.
Did you give any thought to the idea of adding an "execute script" menu item in addition the current "select script" menu item ?

I know we've discussed this before; but I'm still unsure how the UI could work for this - any thoughts?

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)

*

Offline msl

  • *****
  • 1262
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: User Menu Editor module.
« Reply #3 on: 15 / May / 2013, 09:46:26 »
Very nice improvement! Thanks for that.

I have found some issues:

1. I miss a remove function for the script and module entries. This is only possible with the old edit function (erase/shoot half).

2. The prompt popup windows works not quite right. I get often a window with cryptic chars (see attached picture). Very rarely the window is displayed correctly. I can see no pattern, tested with trunk autobuild and translated German version.

msl
CHDK-DE:  CHDK-DE links


*

Offline philmoz

  • *****
  • 3116
    • Photos
Re: User Menu Editor module.
« Reply #4 on: 15 / May / 2013, 18:11:30 »
Very nice improvement! Thanks for that.

I have found some issues:

1. I miss a remove function for the script and module entries. This is only possible with the old edit function (erase/shoot half).

Press ERASE when you are editing the User Menu itself, not when selecting items from the Main menu to add/remove to the User Menu.

Quote
2. The prompt popup windows works not quite right. I get often a window with cryptic chars (see attached picture). Very rarely the window is displayed correctly. I can see no pattern, tested with trunk autobuild and translated German version.

msl

I assume this was pressing the RIGHT button to add the item to the user menu?
Can you post the German language file for me to test with please.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)

Re: User Menu Editor module.
« Reply #5 on: 15 / May / 2013, 21:48:19 »
Got a chance to play with it and so far, so good.

One little thing (rev2778) I notice is it that when adding items to the menu,  the "Information" popup box sometimes contains the name of the menu item being added and sometimes not. The Yes & No buttons are always there.  Sometime is you click "No" and then "Set" again,  the menu item appears in the "Information" box but most times it does not.   I tried long and short menu items but the string length did not seem to be related.

This is probably related to the bug msl reported earlier.

So will the plan be to elimate the old "edit" mode at some point?

Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline philmoz

  • *****
  • 3116
    • Photos
Re: User Menu Editor module.
« Reply #6 on: 15 / May / 2013, 22:56:27 »
Got a chance to play with it and so far, so good.

One little thing (rev2778) I notice is it that when adding items to the menu,  the "Information" popup box sometimes contains the name of the menu item being added and sometimes not. The Yes & No buttons are always there.  Sometime is you click "No" and then "Set" again,  the menu item appears in the "Information" box but most times it does not.   I tried long and short menu items but the string length did not seem to be related.

This is probably related to the bug msl reported earlier.

So will the plan be to elimate the old "edit" mode at some point?

Revision 2779 should, hopefully, fix the popup text issue.

I was going to leave the existing code until this version was working ok.

One question - is it worth keeping the 'Add script to User menu' option on the Script menu (small code overhead), or keep all user menu editing just in the module?

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)

Re: User Menu Editor module.
« Reply #7 on: 16 / May / 2013, 00:26:00 »
I was going to leave the existing code until this version was working ok.
One question - is it worth keeping the 'Add script to User menu' option on the Script menu (small code overhead), or keep all user menu editing just in the module?
As far as I'm concerned,  they can both go at the same time.

Somewhat unrelated question / concern.   Some of the 1.2.0 menu seems unbalanced (best word I could come up with).  Some random thoughts (and at least one of these is my "fault") :

1) Edge overlay, Zebra & Histogram are really just fancy OSD stuff.   Is there a better way to roll them into the OSD menu? (like Grid, Misc values, state display, ...  and colored icons)

2) There seems to be a bit of cross over between CHDK settings and Miscellaneous Stuff?  Should Console be in the Scripting menu ? And Games go to the main menu?  Enable half-press shortcut keys should be in Misc rather than CHDK settings?  As should "Enable Splash Screen on Load"?

3) Remote Parameters is very buried in the middle of CHDK Settings (personal bias here ....).  Thank goodness for the User Menu.

You get the idea.  Even I have to click for a while to find things I know are there.  A newbie or casual user is definitely going to struggle.    But how to go from here?   Propose some new menu arrangements and vote?  Say "to heck with it ... its a hack" and leave things where they lie? 
Ported :   A1200    SD940   G10    Powershot N    G16


Re: User Menu Editor module.
« Reply #8 on: 16 / May / 2013, 01:00:56 »
Revision 2779 should, hopefully, fix the popup text issue.
Confirmed.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 11991
Re: User Menu Editor module.
« Reply #9 on: 16 / May / 2013, 01:31:39 »
1) Edge overlay, Zebra & Histogram are really just fancy OSD stuff.   Is there a better way to roll them into the OSD menu? (like Grid, Misc values, state display, ...  and colored icons)
IMO, zebra and histogram are important photographic features that people might want to change relatively frequently, so it makes sense to have them at the top level. They are also complicated enough to warrant having their own menu. I would be against burying them under 3 levels of menu.

The others I care less about, but I'm not seeing any great benefit to moving them around again. CHDK is complicated enough that no matter what organization we choose, it's not going to be really intuitive.
Quote
2) There seems to be a bit of cross over between CHDK settings and Miscellaneous Stuff?
A lot of the stuff under miscellaneous is not settings (e.g. file browser does something). Some (like console) have both actions and settings, but they logically go together.
Quote
Enable half-press shortcut keys should be in Misc rather than CHDK settings?  As should "Enable Splash Screen on Load"?
These are settings, I don't see why they shouldn't stay in CHDK settings.
Don't forget what the H stands for.

 

Related Topics