Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
Plugin Settings Icons
Pecan:
--- Quote ---4203 / mandrav 0 minutes * Binary .cbplugin files can now contain icons for the "Settings" dialogs. The two supported icon files should be named <plugin_name>.png and <plugin_name>-off.png.
* Updated all settings dialogs to locate icons through configmanager.
* If a settings icon for a plugin cannot be located, the generic-plugin icon will be used.
--- End quote ---
Beautiful!
thank you
Should the <plugin>.png's be loose in the .cbplugin file or zipped together in the <plugin>.zip along with the <plugin>.manifest.
mandrav:
Sample plugin (named TestPlugin) contents:
TestPlugin.cbplugin:
TestPlugin.dll <-- the plugin
TestPlugin.zip <-- its resources
TestPlugin.png <-- the highlighted settings icon
TestPlugin-off.png <-- the non-highlighted settings icon
These are the "easy" stuff to support, since they share a common base name (the plugin's name). To add support for, e.g. toolbar images, will take a little longer...
EDIT: for those wondering, the problem is not how to define additional files to be installed but rather how to know what files each plugin needs when exporting (saving).
mandrav:
OK, done with it.
Now binary plugins (.cbplugin) can also contain extra files to be installed/uninstalled/exported. Just define them inside the plugin's manifest XML.
E.g.:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_plugin_manifest_file>
<SdkVersion major="1" minor="10" release="0" />
<Plugin name="Autosave">
<Value title="Autosave" />
<Value version="0.1" />
<Value description="Saves your work in regular intervals" />
<Value author="Thomas Denk" />
<Value authorEmail="" />
<Value authorWebsite="http://www.codeblocks.org" />
<Value thanksTo="" />
<Value license="GPL" />
</Plugin>
<Extra file="images/16x16/bookmark_add.png" />
<Extra file="images/16x16/editcopy.png" />
</CodeBlocks_plugin_manifest_file>
Just make sure you define only your plugin's extra files as there is no check if they're needed by other plugins when deleting them...
dmoore:
until now, I've been keeping bitmaps in <Plugin-name>.zip
so long as they have an XRC associated with them, they are easy to load and manage.
mandrav:
--- Quote from: dmoore on July 02, 2007, 03:54:05 pm ---until now, I've been keeping bitmaps in <Plugin-name>.zip
so long as they have an XRC associated with them, they are easy to load and manage.
--- End quote ---
Yes, most plugins are like that.
Navigation
[0] Message Index
[#] Next page
Go to full version