Page 1 of 1
Add options to AppDock context menu
Posted: Fri Aug 16, 2013 8:09 pm
by javierdlr
Allready have the AppDock (using application_lib & RegisterApplication() ... ) icon (with only one default option 'Quit') and want to add a couple more of options to an AppDocky like on AmiUpdate.
Is there an "easy" way for such thing? Or do I have to add/link a Dummy_Docky.c (like TestApp.c app_lib example).
TIA
Re: Add options to AppDock context menu
Posted: Tue Aug 20, 2013 1:39 pm
by javierdlr
Ok did some tests, but I don't know where
<code>
..Object *item1 = PopupMenuItemObject, ..
</code>
'PopupMenuItemObject' comes from, can someone enlight me?
Is there a way to add items to AppDock's contextmenu (not a Docky)? :-/
TIA
Re: Add options to AppDock context menu
Posted: Wed Aug 21, 2013 6:44 pm
by chris
javierdlr wrote:Ok did some tests, but I don't know where
<code>
..Object *item1 = PopupMenuItemObject, ..
</code>
'PopupMenuItemObject' comes from, can someone enlight me?
Is there a way to add items to AppDock's contextmenu (not a Docky)? :-/
PopupMenuObject is probably from popupmenu.class.
If you figure out how to do this please can you enlighten the world, as I'd like to know too!
Re: Add options to AppDock context menu
Posted: Thu Aug 22, 2013 3:51 pm
by javierdlr
chris wrote:javierdlr wrote:Ok did some tests, but I don't know where
<code>
..Object *item1 = PopupMenuItemObject, ..
</code>
'PopupMenuItemObject' comes from, can someone enlight me?
Is there a way to add items to AppDock's contextmenu (not a Docky)? :-/
PopupMenuObject is probably from popupmenu.class.
If you figure out how to do this please can you enlighten the world, as I'd like to know too!
Now I can add items to contextmenu of the DOCKY/APPDOCKY (not the APPLICATION dock/icon):
http://www.os4coding.net/forum/add-opti ... mment-1645
Re: Add options to AppDock context menu
Posted: Fri Aug 23, 2013 7:06 pm
by javierdlr
Hi. Now I have contextmenu with some items

But how to "interconnect" the DOCKY (seems it's a separated task/process) with my main (mixer) program/task/process?
Via Messages and Ports? (
http://wiki.amigaos.net/index.php/Exec_ ... _and_Ports)
Does amidock/docky has some in-built function for such purpose?
My main problem now, from the AppDocky it works for rising/lowering/muting volume without problem, but to UNICONIFY mixer, it tries to create a new mixer instace, instead of uniconifying the already existing. Or maybe is some bad/missing code inside mixer? (I think this is the culprit)
Re: Add options to AppDock context menu
Posted: Thu Aug 29, 2013 3:31 pm
by trixie
@javierdlr
But how to "interconnect" the DOCKY (seems it's a separated task/process) with my main (mixer) program/task/process? Via Messages and Ports?
- In Mixer, create a public named message port.
- Before the program goes into the main event loop, obtain the signal bit for this port:
Code: Select all
yourSigBit = 1 << yourPort->mp_SigBit;
- Add the signal bit to Mixer's signal mask:
Code: Select all
wsig = cxSigMask | SIGBREAKF_CTRL_C | appSigMask| (1<<replymp->mp_SigBit) | yourSigBit;
- In the docky, FindPort() the named public port created by Mixer. Send whatever you want to send it as part of the message structure.
- In Mixer, when a message arrives at the named port, copy whatever data is contained in the structure, and reply to the message. Then use the local copy of the data for whatever is your purpose.
Re: Add options to AppDock context menu
Posted: Sat Aug 31, 2013 12:44 am
by javierdlr
THX trixie, yes it works fine adding my own MsgPort.
