← Back to team overview

kicad-developers team mailing list archive

Re: pcbnew module editor toolbar items now in menubar -- patch

 

On 7/21/2010 3:52 AM, Jerry Jacobs wrote:
> Because almost all toolbar items are not in the menubar of the module
> editor I wrote a small patch.
> Maybe someone can take care of the few TODO's inside the patch which I
> was not able to get.

Jerry,

Most of your TODO's suggest creating new IDs for the module editor instead of
reusing the IDs from PCBNew.  Is there any technical reason to do this?  As
long as the ID is descriptive enough than I see no reason to create another ID
specifically for the module editor.  We already reuse wxID_CUT, wxID_COPY,
wxID_PASTE, etc.  I did some ID rationalization a while back that significantly
reduced the number of redundant IDs and unnecessary recompiling.  I would
rather avoid adding new IDs unless there is a good reason to do so.

> 
> The File -> Close  needs a ID handler and need's to be fixed.
> And maybe some entries should not be selectable in some cases like
> undo,redo and the placement of components if there is no module
> loaded or new module created.
> 
> Maybe all the *modedit* files can better be moved to a subdirectory if
> the code will be growing.
> And also moving the dialog_*  files. Because we get
> already a nice amount of files and directories are handy to sort things up.

This is good idea for the eeschema subdirectory as well as it is getting rather
unwieldy.

> 
> See the attached patch, it applies to rev 2418 without problems.

Your patch has some code formatting issues.  There are some indenting alignment
problems.

+        item = new wxMenuItem( openSubmenu,
+                    ID_MODEDIT_IMPORT_PART,
+                    _( "from File" ),
+                    _( "Import a footprint module from a existing file" ) );

should be

+        item = new wxMenuItem( openSubmenu,
+                               ID_MODEDIT_IMPORT_PART,
+                               _( "from File" ),
+                               _( "Import a footprint module from a existing
file" ) );

There is also some trailing white space as well.  If your editor supports
showing white space, you may want to turn it on.  Uncrustify will also remove
any trailing white space.

Thanks,

Wayne

> 
> 
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp



Follow ups

References