Re: [Kicad-developers] [PATCH] -Wcatch-value in kicad2step.cpp

2018-08-15 Thread Wayne Stambaugh
Nick,

I just pushed it.  Thanks for the reminder.

Cheers,

Wayne

On 8/15/2018 2:59 AM, Nick Østergaard wrote:
> Any update on this? It does not look like it is merged.
> Den tor. 26. jul. 2018 kl. 17.17 skrev John Beard :
>>
>> Hi,
>>
>> Another -Wcatch-value warning, this time in kicad2step.cpp.
>>
>> Cheers,
>>
>> John
>> ___
>> 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
> 
> ___
> 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
> 

___
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


Re: [Kicad-developers] [PATCH] -Wcatch-value in kicad2step.cpp

2018-08-15 Thread Wayne Stambaugh
John,

I committed your patch.  Sorry it took so long.  It got lost in the mess
that is my inbox.

Thanks,

Wayne

On 7/26/2018 11:17 AM, John Beard wrote:
> Hi,
> 
> Another -Wcatch-value warning, this time in kicad2step.cpp.
> 
> Cheers,
> 
> John
> 
> 
> 
> ___
> 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
> 

___
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


[Kicad-developers] [PATCH] RFC: toolbar button support for action plugins

2018-08-15 Thread Andrew Lutsenko
Hi KiCad devs,

I am proposing an addition to plugin system.
Probably most will agree that menus suck. Toolbars suck less :)

In my plugin I added a dirty hack to modify top toolbar from plugin init
code to add a button
that calls plugins run() method. It is broken on linux X11 and is not a
sustainable way others
can add buttons in their plugins. But having a button was quite popular
among users so I
decided to implement this functionality directly in pcbnew.

I introduced one more field plugin writers can define in defaults() that
contains path to png icon
and if that string is not empty, pcbnew will attempt to load that icon and
add a button to top
toolbar with action that calls the same run() method. I traced in code how
plugin action menu
is generated and added similar logic for buttons.

Here is how the result looks like:

https://i.imgur.com/f3xg1FE.gif

Sample dummy plugin __init__.py code:

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.icon_file_name = os.path.join(os.path.dirname(__file__),
'icon.png')

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

Plugin1().register()

It's as simple as that.

The patch is attached. It probably needs some error checking but seems to
be working great.
Tested in win64 so far.
I'm open to suggestions on how to get it to good state, I will also test on
linux asap.

Regards,
Andrew


0001-Add-toolbar-buttons-for-action-plugins.patch
Description: Binary data
___
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


Re: [Kicad-developers] [PATCH] -Wcatch-value in kicad2step.cpp

2018-08-15 Thread Nick Østergaard
Any update on this? It does not look like it is merged.
Den tor. 26. jul. 2018 kl. 17.17 skrev John Beard :
>
> Hi,
>
> Another -Wcatch-value warning, this time in kicad2step.cpp.
>
> Cheers,
>
> John
> ___
> 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

___
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