[Kicad-developers] Python script offered as example for Action Plugin and wxFormBuilder integration

2017-08-11 Thread Greg Smith
What is the process of getting a python example script into KiCad distribution?
What is the recommended copyright notice that I should place at the top of the 
file?
Suggestions on coding style, functionality, integration technique are welcome!
This python script is usable example of how to integrate a gui built with 
wxFormBuilder andimplementing Action Plugin feature provided in KiCad. It has 
been tested with recent nightly KiCad build (Windows 7).
It is a short functional example 187 lines long (at the moment) adding (IMHO) 
much needed functionality to KiCad pcbnew.
The github repository is here:https://github.com/HiGregSmith/LayerViewSet 

And the KiCad Forums thread is 
here:https://forum.kicad.info/t/announcing-layerviewset-a-python-script-for-manipulating-visible-layers/7400
   


___
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] minor icons and text improvement in Archive Footprint Menu bar.

2017-08-11 Thread Fabrizio Tappero
Hello,
the following patches add two new improved icons (and delete the old one)
for the "archive footprint" menu in pcbnew as in the pic:


[image: Inline image 1]

Cheers
Fabrizio
From 47dc9d216721baf44bc0822c096adf91132ddc9a Mon Sep 17 00:00:00 2001
From: Fabrizio Tappero 
Date: Fri, 11 Aug 2017 11:01:28 +0200
Subject: [PATCH] delete library upgrade icon and make two new icons for the
 archive footprint menu in pcbnew

---
 bitmaps_png/CMakeLists.txt |   3 +-
 bitmaps_png/cpp_26/library_archive.cpp |  92 +++
 bitmaps_png/cpp_26/library_archive_as.cpp  | 101 
 bitmaps_png/cpp_26/library_update.cpp  | 104 
 bitmaps_png/sources/library_archive.svg| 175 +++
 bitmaps_png/sources/library_archive_as.svg | 184 +
 bitmaps_png/sources/library_update.svg | 138 --
 include/bitmaps.h  |   3 +-
 pcbnew/menubar_pcbframe.cpp|  12 +-
 9 files changed, 562 insertions(+), 250 deletions(-)
 create mode 100644 bitmaps_png/cpp_26/library_archive.cpp
 create mode 100644 bitmaps_png/cpp_26/library_archive_as.cpp
 delete mode 100644 bitmaps_png/cpp_26/library_update.cpp
 create mode 100644 bitmaps_png/sources/library_archive.svg
 create mode 100644 bitmaps_png/sources/library_archive_as.svg
 delete mode 100644 bitmaps_png/sources/library_update.svg

diff --git a/bitmaps_png/CMakeLists.txt b/bitmaps_png/CMakeLists.txt
index 7e4c65f..40003dc 100644
--- a/bitmaps_png/CMakeLists.txt
+++ b/bitmaps_png/CMakeLists.txt
@@ -307,7 +307,8 @@ set( BMAPS_MID
 lib_next
 lib_previous
 library_browse
-library_update
+library_archive
+library_archive_as
 library
 library_table
 lines90
diff --git a/bitmaps_png/cpp_26/library_archive.cpp b/bitmaps_png/cpp_26/library_archive.cpp
new file mode 100644
index 000..c47b35d
--- /dev/null
+++ b/bitmaps_png/cpp_26/library_archive.cpp
@@ -0,0 +1,92 @@
+
+/* Do not modify this file, it was automatically generated by the
+ * PNG2cpp CMake script, using a *.png file as input.
+ */
+
+#include 
+
+static const unsigned char png[] = {
+ 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
+ 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c,
+ 0xce, 0x00, 0x00, 0x04, 0xb2, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xad, 0x96, 0x6f, 0x4c, 0x13,
+ 0x67, 0x1c, 0xc7, 0xab, 0x6f, 0x16, 0x5f, 0x2d, 0x4b, 0xb6, 0xbd, 0x5a, 0x66, 0x7b, 0x85, 0x21,
+ 0x10, 0xa7, 0x73, 0x31, 0xc0, 0x16, 0xf9, 0xd3, 0x76, 0xc5, 0x0d, 0x45, 0xdd, 0x14, 0x90, 0xe9,
+ 0x8b, 0x4d, 0xa2, 0xc9, 0xb2, 0x64, 0xa0, 0x06, 0x5b, 0xc0, 0x49, 0x70, 0x73, 0x23, 0x28, 0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xea, 

Re: [Kicad-developers] PCBNew, Archive Footprint Menu - suggest better text

2017-08-11 Thread Fabrizio Tappero
Hi Wayne,
I understand. I am considering all your comments and I propose few minor
improvements.

I will submitting a patch shortly with minor text and icon modifications.

Cheers
Fabrizio


On Thu, Aug 10, 2017 at 7:16 PM, Wayne Stambaugh 
wrote:

> On 8/10/2017 12:56 PM, Fabrizio Tappero wrote:
> > Hi Wayne,
> > I understand. Maybe somebody else can clear up this issue.
> >
> > Regarding the "Archive Footprints in Footprint Library Table Entry", I
> > am not sure people would actually know what a "library table entry",
> > wouldn they? maybe "Archive Footprints in New Library"?
>
> It's hard to say but "Archive Footprints in New Library" is misleading.
> If you are choosing a library from the library table, then it already
> exists.  Perhaps "Archive Footprints in Existing Library" would be less
> confusing but the user will still be limited to fp lib table entries
> rather than any path of the user's choosing.  I also noticed that the
> dialog showing the list of fp lib table entries for the user to select
> showed all of the entries rather than only the entries that the user has
> write permission so there is that issue as well.
>
> >
> > cheers
> > Fabrizio
> >
> >
> > On Thu, Aug 10, 2017 at 6:33 PM, Wayne Stambaugh  > > wrote:
> >
> > I'm not sure about this myself.  I took a look at the code and I
> still
> > don't fully understand why there are multiple options.
> >
> > The ID_MENU_ARCHIVE_MODULES_IN_LIBRARY command appears to only
> allow you
> > to save the footprints in the current board to a library already
> listed
> > in the footprint library table.  I'm not sure this is necessary since
> > you could easily select an existing pretty footprint library (in the
> > footprint library table or otherwise) and overwrite it without
> limiting
> > the choices to the footprint library table.  The best description I
> can
> > think of for this is "Archive Footprints in Footprint Library Table
> > Entry".  This would a least be accurate.
> >
> > The ID_MENU_CREATE_LIBRARY_AND_ARCHIVE_MODULES command appears to
> allow
> > you to save the footprints in the current board to either a new
> library
> > path chosen by the user or overwrite an existing pretty footprint
> > library.  I would think that this option alone would be sufficient
> but
> > maybe I'm not seeing why the command above needed.  The best
> description
> > I can think of for this is "Archive Footprints in Library".  You
> could
> > use this option to perform the same operation above.
> >
> > It seems to med a better approach would be to just have a single
> archive
> > command and prompt the user for either a library table entry or
> library
> > path.  At least this would be easier to understand for the user.  I
> > didn't write this code so maybe I am missing something.
> >
> > On 8/9/2017 6:24 AM, Fabrizio Tappero wrote:
> > > Hello,
> > > I am tinkering the appearance of some icons and I would like to
> > improve
> > > the following menu by adding specific archive icons and make some
> > of the
> > > text a little clearer.
> > >
> > > This is the current code:
> > >
> > > //- archive submenu
> > > -
> > > wxMenu* submenuarchive = new wxMenu();
> > >
> > > AddMenuItem( submenuarchive, ID_MENU_ARCHIVE_MODULES_IN_
> LIBRARY,
> > >  _( " Footprints in Project Library." ),
> > >  _( "Archive footprints in existing library in
> > footprint
> > > Lib table"
> > > "(does not remove other footprints in this
> > library)" ),
> > >  KiBitmap( library_update_xpm ) );
> > >
> > > AddMenuItem( submenuarchive,
> > ID_MENU_CREATE_LIBRARY_AND_ARCHIVE_MODULES,
> > >  _( " Library and Archive Footprints." ),
> > >  _( "Archive all footprints in new library\n"
> > > "(if the library already exists it will be
> > deleted)" ),
> > >  KiBitmap( library_xpm ) );
> > >
> > > AddMenuItem( aParentMenu, submenuarchive,
> > >  ID_MENU_ARCHIVE_MODULES,
> > >  _( "Arc Footprints" ),
> > >  _( "Archive or add footprints in library file" ),
> > >  KiBitmap( library_xpm ) );
> > >
> > > I would propose these changes:
> > >
> > > _( " Footprints in Default Project Library" ),
> > > _( "Archive all footprints in existing default project library
> file"
> > > "(does not remove other footprints in this library)" ),
> > > "(the content of default library is maintained)" ),
> > >
> > >  _( " New Library and Archive Footprints" ),
> > > _( "Archive all