check box to enable custom icon?

How would you make a check box switch between a default icon and a custom icon? I don’t know that much about python ,but figured a if or else statement? If that’s kinda on the right track I can’t get it working.

Well after 3 days I got it figured out. 10 thumbs up to those that can create all these addons. Took a day to figure out how to get custom icon to show up, another day to figure out how to get addon preferences to show up, and a day trying to get the check box to enable the icon. At first I had the check box enabling both the default icon and the custom icon. Then I tried to have a check box for each icon ,but the default only showed up when I had both the default and custom icon box checked. Anyways after hours of messing around I got it.

Custom Icon Enabled

Default icon when not checked.

Attachments