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

2018-08-27 Thread Wayne Stambaugh
Andrew, I merged your patch into the development branch. Thank you for your contribution. Cheers, Wayne On 8/27/2018 12:26 AM, Andrew Lutsenko wrote: > Awesome! > > I updated the docs for plugin writers. Please see attached file. > > On Sun, Aug 26, 2018 at 7:48 PM Seth Hillbrand

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

2018-08-26 Thread Andrew Lutsenko
Awesome! I updated the docs for plugin writers. Please see attached file. On Sun, Aug 26, 2018 at 7:48 PM Seth Hillbrand wrote: > Merged. > > Thank you for your contribution to KiCad! > > -Seth > > Am So., 26. Aug. 2018 um 13:27 Uhr schrieb Andrew Lutsenko < > anlutse...@gmail.com>: > >>

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

2018-08-26 Thread Seth Hillbrand
Merged. Thank you for your contribution to KiCad! -Seth Am So., 26. Aug. 2018 um 13:27 Uhr schrieb Andrew Lutsenko < anlutse...@gmail.com>: > Thanks all for the review. > > Now that proposal is approved I'm not sure what next steps are. Only docs > I could find on launchpad are about bazaar. >

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

2018-08-24 Thread Rene Pöschl
One can however archive a repo. (We did that with all the old library repos.) I am not sure if the automatic synchronization with the lauchpad code would still work for archived repos. On 23/08/18 20:31, José Ignacio wrote: Pull requests cannot be disabled on Github On Thu, Aug 23, 2018 at

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

2018-08-24 Thread Wayne Stambaugh
On 08/23/2018 02:46 PM, Carsten Schoenert wrote: > Am 23.08.18 um 20:31 schrieb José Ignacio: >> Pull requests cannot be disabled on Github > > That's unfortunately true, but there is a "plugin" available for > disabling pull requests. > > http://nopullrequests.com/ > Thanks for the tip but

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

2018-08-23 Thread Andrew Lutsenko
Thanks, I opened merge request on launchpad: https://code.launchpad.net/~qu1ck/kicad/+git/kicad/+merge/353677 > ACTION_PLUGINS::GetActionButton. Takes an integer and picks the element from the actions list vector. But std::vector[] doesn't provide bounds checking. You could use at() and catch

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

2018-08-23 Thread Carsten Schoenert
Am 23.08.18 um 20:31 schrieb José Ignacio: > Pull requests cannot be disabled on Github That's unfortunately true, but there is a "plugin" available for disabling pull requests. http://nopullrequests.com/ -- Regards Carsten Schoenert ___ Mailing

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

2018-08-23 Thread José Ignacio
Pull requests cannot be disabled on Github On Thu, Aug 23, 2018 at 1:26 PM, Carsten Schoenert wrote: > Hello Wayne, > > Am 23.08.18 um 20:01 schrieb Wayne Stambaugh: > > We do not use github for kicad source development. It is merely a > > mirror for user convenience. Please do not open any

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

2018-08-23 Thread Carsten Schoenert
Hello Wayne, Am 23.08.18 um 20:01 schrieb Wayne Stambaugh: > We do not use github for kicad source development. It is merely a > mirror for user convenience. Please do not open any issues on github > for the kicad source mirror. I'd suggest to disable all these kind of features on GitHub then

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

2018-08-23 Thread Wayne Stambaugh
On 8/23/2018 3:50 AM, Andrew Lutsenko wrote: > I fixed whitespace issue and formatting (at least what I caught). > Fixed a bug that would not load plugin list properly if one plugin was > removed and another was added at the same time. > Also made plugin buttons scale same as the main buttons. >

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

2018-08-23 Thread Seth Hillbrand
Am Do., 23. Aug. 2018 um 00:51 Uhr schrieb Andrew Lutsenko < anlutse...@gmail.com>: > I fixed whitespace issue and formatting (at least what I caught). > Fixed a bug that would not load plugin list properly if one plugin was > removed and another was added at the same time. > Also made plugin

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

2018-08-23 Thread Andrew Lutsenko
I fixed whitespace issue and formatting (at least what I caught). Fixed a bug that would not load plugin list properly if one plugin was removed and another was added at the same time. Also made plugin buttons scale same as the main buttons. Please see updated patch attached. > You should

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

2018-08-22 Thread Seth Hillbrand
Thanks Andrew, I'll have a chance to test this in detail this weekend. The movie looks really nice. Short comments: - You should protect array dereference indices to prevent overflow. It would be a good idea to define a specific "no icon" index (-1 maybe? or 0) that returns a default icon (0)

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

2018-08-22 Thread Fabrizio Tappero
I really like it!! Very cool work. Thank you. Fabrizio On Aug 22, 2018 1:29 PM, "Andrew Lutsenko" wrote: Hi Seth, I built the settings dialog for action plugins. You can reorder and enable/disable buttons for each plugin individually. Short demo: https://i.imgur.com/33iJC7b.gif Squashed

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

2018-08-22 Thread Andrew Lutsenko
Hi Seth, I built the settings dialog for action plugins. You can reorder and enable/disable buttons for each plugin individually. Short demo: https://i.imgur.com/33iJC7b.gif Squashed patch is attached. I've tested it on win, debian8 and debian9. If it's easier to review diff can be viewed here

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

2018-08-17 Thread Andrew Lutsenko
Hi Seth, That makes sense. I will keep working on this feature and will ping this thread again once user configuration is implemented. Thanks, Andrew On Fri, Aug 17, 2018 at 10:03 AM Seth Hillbrand wrote: > Hi Andrew- > > I like the patch idea and your implementation approach is good. > > The

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

2018-08-17 Thread Seth Hillbrand
Hi Andrew- I like the patch idea and your implementation approach is good. The coding style policy is located at https://kicad-source-mirror.readthedocs.io/en/stable/Documentation/development/coding-style-policy/ We're not totally consistent but we try to ensure any new code follows it and clean

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

2018-08-17 Thread Andrew Lutsenko
I found and fixed couple compilation issues and also implemented option to not show toolbar icon, just have the icon in menus. (Not user configurable, just for plugin writers, another attribute they can set). Also fixed formatting according to your directions, thanks. Patches are attached. If

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

2018-08-17 Thread Clemens Koller
Hi, Andrew! On 17/08/2018 07.10, Andrew Lutsenko wrote: > Or are you asking to update docs in the repo? I suggested to have your sample pluging and icon bundled with your patch, ready for git to apply (once committers agree...). Clemens On 17/08/2018 07.10, Andrew Lutsenko wrote: > Hi

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

2018-08-17 Thread Andrew Lutsenko
Hi Seth I just checked out new preferences in pcbnew, looks much more organized than before. I totally can add a new tab there "pcbnew->Action plugins" and list the plugins there with option to remove toolbar icon. But that is a non-negligible amount of work. Will you hold off on merging my

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

2018-08-16 Thread Andrey Kuznetsov
Please do not throw errors like unable to load icon to users, that is extremely annoying to users. It is the developer's responsibility to make sure the icon is loaded correctly, not the users, so users should not be bothered, since they cannot do anything about it anyway. On Thu, Aug 16, 2018 at

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

2018-08-16 Thread Seth Hillbrand
Hi Andrew- I like the idea. Aside from minor formatting (headers get 1 space between function defs, need a space before the if block), the patch looks good. However, I wouldn't want everything showing on my toolbar (speaking as someone who has 10 plugins installed, 5 of which get regular use).

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

2018-08-16 Thread Andrew Lutsenko
Hi Konstantin, Thanks for feedback. I like the idea that plugin writers can opt out of showing the button on toolbar, I will add this. Ultimately user should have control over it. If all plugin writers start adding icons top toolbar will run out of space. User should be able to choose which

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

2018-08-16 Thread Andrew Lutsenko
Hi Clemens, See sample plugin attached. Extract it into kicad's share/scripting/plugins folder. One of other scanned directories that are documented in kicadplugins.i should

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

2018-08-16 Thread Константин Барановский
чт, 16 авг. 2018 г. в 12:26, Andrew Lutsenko : > 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

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

2018-08-16 Thread Clemens Koller
Hello, Andrew! I am somehow missing the Python example you are giving in your patch. Can you add this a simple example to the sources to get a basic/dummy skeleton working right from scratch? Regards, Clemens On 15/08/2018 11.31, Andrew Lutsenko wrote: > Hi KiCad devs, > > I am proposing

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

2018-08-16 Thread Andrew Lutsenko
Ok, tested this further and thought that it's silly that buttons on toolbar have icons but menu items have generic hammer. Second patch adds icons to menu and fixes compatibility with plugins that don't define icon. [image: actionmenu.png] If icon file doesn't exist or can't be loaded (wrong

[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