Page 1 of 1

Hamburger menu to always use default icon unless otherwise stated

Posted: 10 Jan 2023 23:48
by kiwichick
Currently, if we add a path on its own (ie: no caption or state), the path's default icon is used. However, if we add a caption or state for that path, the default icon is no longer used and a custom one must be entered. Can an option be added to always use the default icon unless otherwise stated? Maybe something like the state field eg: 0 (default) = use default icon, 1 = use no icon, [path_to_icon] = uses custom icon.

Re: Hamburger menu to always use default icon unless otherwise stated

Posted: 16 Jan 2023 17:11
by admin
Show an example, please.

Re: Hamburger menu to always use default icon unless otherwise stated

Posted: 16 Jan 2023 21:51
by kiwichick
admin wrote: 16 Jan 2023 17:11 Show an example, please.
Sorry, Don, I don't understand what you mean. Show an example of what?

Re: Hamburger menu to always use default icon unless otherwise stated

Posted: 16 Jan 2023 22:07
by admin
The syntax you use to state a caption for a path.

Re: Hamburger menu to always use default icon unless otherwise stated

Posted: 16 Jan 2023 22:42
by kiwichick
admin wrote: 16 Jan 2023 22:07 The syntax you use to state a caption for a path.
As stated in the Help file path;caption;
Here is what happens.
1) If I use just the path the menu will display the icon the PortableApps folder uses:
C:\PortableApps;

2) If I add a caption the icon, no icon is displayed:
C:\PortableApps;My Portable Apps;

3) The same if I add a state, no icon is displayed:
C:\PortableApps;My Portable Apps;;1;

4) Now a custom icon path is required even if it's still the icon the PortableApps folder uses. So, I'd have to add this:
C:\PortableApps;My Portable Apps;C:\PortableApps;
Or this:
C:\PortableApps;My Portable Apps;C:\PortableApps;1;

It's not really a big deal to do this but, to me, it seems unnecessary to have to add an icon path just because a caption is added. Using bits like 'state' does would be must easier. As I suggested:
0 (default) = use default icon (the icon switch could also be left blank to use the default icon, as in number 3 above)
1 = use no icon
[path_to_icon] = use custom icon

Re: Hamburger menu to always use default icon unless otherwise stated

Posted: 17 Jan 2023 08:10
by admin
It was mostly due to the fact that you are adding a trailing ";" to your lines which is not necessary (and not in the docs AFAIK). The next beta will tolerate this. :)

Re: Hamburger menu to always use default icon unless otherwise stated

Posted: 17 Jan 2023 22:05
by kiwichick
admin wrote: 17 Jan 2023 08:10 It was mostly due to the fact that you are adding a trailing ";" to your lines which is not necessary (and not in the docs AFAIK). The next beta will tolerate this. :)
Sorry, Don, I thought I'd tried with and without trailing ; and got the same result. But you are correct - well mostly. It works when adding only the caption, but not when adding the state. Then the icon must be specified. Probably because state comes after icon and icon can't be 'skipped'.

Re: Hamburger menu to always use default icon unless otherwise stated

Posted: 17 Jan 2023 22:07
by admin
It should all work in the current beta, doesn't it?

Re: Hamburger menu to always use default icon unless otherwise stated

Posted: 17 Jan 2023 22:21
by kiwichick
admin wrote: 17 Jan 2023 22:07 It should all work in the current beta, doesn't it?
Oh geez, my apologies!!!! I thought you meant only the trailing ; had been changed. Nothing about allowing empty parts was mentioned in the beta history info. I've updated and yes, all works great now. Thank you so much :appl:

Re: Hamburger menu to always use default icon unless otherwise stated

Posted: 20 Jan 2023 22:35
by jupe
I assume because of this change, there seems to have been a side effect, if containing a trailing sep after [data] field, the icon is the (?) now when no icon source is provided, and the caption isn't a path.

eg. popupmenu("caption 1;;<crlf>caption 2;");

Re: Hamburger menu to always use default icon unless otherwise stated

Posted: 21 Jan 2023 09:25
by admin
Right. Fix comes. :tup: