чт, 16 авг. 2018 г. в 12:26, Andrew Lutsenko <anlutse...@gmail.com>:

> If icon file doesn't exist or can't be loaded (wrong format for example)
> pcbnew will throw an error message
> and will continue with no button for that plugin and generic hammer icon
> in menu.
>

Hi Andrew!
 I think will be better to add the separate option that will controls
visibility of plugin on toolbar. For example:

import os
import pcbnew
import wx

class Plugin1(pcbnew.ActionPlugin):

    def defaults(self):
        self.name = "Dummy Plugin 1"
        self.category = "Read PCB"
        self.description = ""
        *self.show_on_toolbar = true*
        self.icon_file_name = os.path.join(os.path.dirname(__file__),
'icon.png')

    def Run(self):
        wx.MessageBox("Plugin 1")

Plugin1().register()

Also, probles with icon don't must take affect on visibility of toolbar
button. Just use default icon.

Anyway, good work. Thanks.
_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp

Reply via email to