I am off to Tel Aviv and ICQ tonight so there will be only sporadic updates next week. Before I go though, one of my loyal readers mentioned that with the number of plugins available now, the Actions menu is getting crowded. We have been supporting multiple plugin command entry points for a while, but the latest AIM client built off of the Open AIM platform supports the following actions (to read all about plugin commands here is the documentation):
- AccCommandFlags_ActionsUi – command takes buddy names and will appear in Actions menus
- AccCommandFlags_BuddyUi – command takes buddy names and will appear in buddy context menus
- AccCommandFlags_GroupUi – command takes buddy group names and will appear in buddy group context menus
- AccCommandFlags_ImSessionUi -command takes IM session remote participant names and will appear in IM session menus (e.g., People menus)
- AccCommandFlags_PreferencesUi – command takes empty variant and will appear in Preferences/Setup UI
- AccCommandFlags_AboutUi – command takes empty variant and will appear in About box, plugin context menu or similar
- AccCommandFlags_PresenceUi – command takes empty variant and will appear in Presence UI
Now we also support flyout commands, via IAccCommand::put_Property(AccCommandProp_ParentId, …); For example here is the code from AIM MusicLink that could do the submenu support…
// Create Flyout Command Placeholder
CComPtr <IAccCommand> spiCommand;
piPluginInfo->AddCommand(kCommandId, &spiCommand);
CString menuCommand3;
menuCommand3.LoadString(IDS_ML_MENU_ITEM);
spiCommand->put_Property(AccCommandProp_Text, CComVariant(menuCommand3));
spiCommand->put_Property(AccCommandProp_Flags, CComVariant(AccCommandFlags_ActionsUi));
// add submenu by passing in the command ID of the above command
CComPtr <IAccCommand> spiSubCommand;
piPluginInfo->AddCommand(kShowLogCommandId, &spiSubCommand);
CString menuCommand;
menuCommand.LoadString(IDS_ML_SHOWLOG);
spiSubCommand->put_Property(AccCommandProp_Text, CComVariant(menuCommand));
spiSubCommand->put_Property(AccCommandProp_Flags, CComVariant(AccCommandFlags_ActionsUi));
spiSubCommand->put_Property(AccCommandProp_ParentId, CComVariant(kCommandId));
So as you can see we can easily manage the menus and keep them clean. I actually need to update a few of my plugins to take advantage of the flyout. As always keep the questions coming.