Starting with Delphi 2005 the IDE provides an API for plugins to add an entry to its about dialog. It’s pretty simple to use and many plugins and components use it nowadays. But there is one thing that in my opinion most of them get wrong. My first attempt looked like this:
if Supports(BorlandIDEServices, IOTAAboutBoxServices, AboutBoxServices) then begin bmSplashScreen := LoadBitmap(HInstance, 'SplashScreenBitMap'); Result := AboutBoxServices.AddPluginInfo( 'GExperts', 'GExperts is a [...]', bmSplashScreen, False, GetVersionStr, 'open source'); end;
and resulted in this:
The string "Product Licence Status:" annoyed me because it just didn’t make any sense. But since this is pretty much what most other plugin entries look like, I thought it just must be the way for it to look. But then I found this entry added by the Delphi Praxis Help-Booster:
No Prefix? WTF? How did he do it? I asked for input on Google+ but got no help, apart from Uwe Schuster’s rather cryptical answer
Read again and again the parameter list of AddPluginInfo and once you understood it, it will appear as expected.
which I just didn’t understand (even though he was right but …).
The solution hit me quite a few minutes later: Just supply an empty string to the LicenceStatus parameter and put the version information into the SKUName parameter.
if Supports(BorlandIDEServices, IOTAAboutBoxServices, AboutBoxServices) then begin bmSplashScreen := LoadBitmap(HInstance, 'SplashScreenBitMap'); Result := AboutBoxServices.AddPluginInfo( 'GExperts', 'GExperts is a [...]', bmSplashScreen, False, '', // leave this empty! GetVersionStr); end;
And it works:
I should really be used to feeling stupid by now.