Commit Graph

78 Commits

Author SHA1 Message Date
Jon Evans 5abf73e3c9 Never call ReCreateMenuBar inside a menu event handler
As of wxWidgets 3.2, the wxWidgets event handler runs code after the
the client event handler that depends on the menu still existing.
Because there are potentially many paths to call ReCreateMenuBar from
within a menu event handler, let's just wrap this action in a CallAfter
to make sure it happens after the wx handler call completes.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13149
2022-12-16 16:37:51 -05:00
jean-pierre charras be35b0783a Cvpcb: fix SaveAssociations. Save association to disk only from the Apply button. Previously, the association was saved to disk also on OK button click. 2022-04-30 09:48:47 +02:00
Jeff Young 3ff670d2a4 Disable ACTIONS::openPreferences for now.
wxWidgets needs to move the item to the KiCad menu on Mac, and it
can only find it if it has the id wxID_PREFERENCES.
2021-06-07 20:51:45 +01:00
jean-pierre charras 81c7fb61f8 Sub-menu "Preferences..." in main menu "Preferences": fix not working accelerator key.
Accelerator keys are disable in our WX_MENUBAR. A common ACTION_MENU is used and
"Preferences..." is now shown in Hotkeys list.
2021-05-29 18:09:49 +02:00
Jon Evans 18037e2f65 Rework bitmap system to load from archived PNGs
Bitmaps are now identified by an enum class instead of by pointers.
Bitmap loading and caching is now handled by a class in common, and
we no longer compile most bitmaps into the binary, so there is no
longer a bitmaps static library.

Instead, bitmaps are archived to a .tar.gz file which is installed
in ${KICAD_DATA}/resources/images.tar.gz

The source PNGs are checked in to Git as the original CPP files were,
so that people can build without the required dependencies to convert
SVGs to PNGs.

Initial support is also added for dark theme icons, although this
is not yet exposed in the GUI.

Stubs are present for multi-resolution image resources, but this is
not fully-baked yet and could use some refinement.
2021-03-11 08:37:35 -05:00
Jeff Young 7f8faffa3a Trim down ever-expanding context menu. 2020-12-01 14:04:01 +00:00
Ian McInerney 3d47eb0d49 Fix localization of the menu strings with accelerator strings
The accelerator strings really shouldn't be part of the translation,
and some translations have cause the accelerator keys to be incorrectly
handled. It is simpler to make it separate and just join them to the
translated string.

Make all accelerator modifiers use lowercased Ctrl instead of CTRL
to be the same as the other modifiers.

Fixes https://gitlab.com/kicad/code/kicad/issues/5992
2020-11-04 01:31:52 +00:00
Ian McInerney 3b05d7cddd Move more frames to the new UI condition framework
* Frames moved: cvpcb, cvpcb footprints frame, gerbview, pagelayout editor

This also introduces new EDITOR_CONDITIONS that are used to set the
conditions of very common editor settings.

Also, some IDs were converted to tools in the pagelayout editor.
2020-08-16 19:10:25 +00:00
Seth Hillbrand e19a7910f8 Revert "Revert "Set DoubleBuffering to reduce flicker""
This reverts commit c18cab6154.
2020-07-13 20:19:10 -07:00
Seth Hillbrand c18cab6154 Revert "Set DoubleBuffering to reduce flicker"
This reverts commit 106259f6e6.

In its place, we set double buffering to only menubars in an attempt to
find a soluton to #4785

Fixes https://gitlab.com/kicad/code/kicad/issues/4863
2020-07-11 09:43:30 -07:00
Ian McInerney 9d0ea66a96 Don't use the accelerator table in the menubars
It seems that the accelerator table causes issues with
keyboard events on MSW.

Fixes https://gitlab.com/kicad/code/kicad/issues/1941
2020-06-06 22:50:35 +00:00
Ian McInerney 4f7430f476 Add save item to cvpcb toolbar and make it conditional
ADD: Save icon to cvpcb toolbar and make it conditional
2019-12-19 15:35:11 +00:00
Ian McInerney 8493daf9ff Unify menu item creation for closing a window
* Push a function into CONDITIONAL_MENU that adds the item
* Modify the tooltip for close and exit items to have the
  program name

Fixes: lp:1835454
* https://bugs.launchpad.net/kicad/+bug/1835454
2019-08-14 09:35:15 +01:00
Ian McInerney 36b430562d cvpcb: Refactor events and cleanup formatting 2019-08-12 14:19:01 -04:00
Ian McInerney c3b2885f88 cvpcb: Split control tool in two and add cut/copy/paste 2019-08-12 14:19:01 -04:00
Ian McInerney 95430e131e cvpcb: cleanup include statements 2019-08-12 14:19:01 -04:00
Ian McInerney 06abda254a cvpcb: Add undo/redo functionality to the associations 2019-08-12 14:19:01 -04:00
Ian McInerney 72120e0a96 Actionize cvpcb 2019-08-12 14:19:01 -04:00
jean-pierre charras 66d2060942 Partial fix for missing language selection menu.
The fix is partial because in the list of languages the menuitem corresponding to the selected language is not checked.
2019-06-16 20:35:57 +02:00
Jeff Young a3f3fb39de Convert 3DViewer to new hotkey architecture. 2019-06-10 23:46:01 +01:00
Jeff Young 5e49517781 Move hotkeys to ACTION architecture. 2019-06-10 23:46:00 +01:00
Jeff Young 33773bad4d Yet more command conversions to ACTIONs. 2019-06-02 21:10:56 +01:00
Jeff Young 7d9a0b06e0 Push help menu down into EDA_BASE_FRAME. 2019-05-18 13:14:08 +01:00
Seth Hillbrand 2948f8a6bc cvpcb: Testing theory on save hotkey override
Bug #1807567 states the entering 's' in the string search textbox does
not get passed to the text box correctly when in the German language
under windows.  This likely means that the main window is firing wxSave
when it detects the 's' key.  By adjusting the id for the save and
continue action, we hope to allow the signal to pass through to the
textbox. This commit should otherwise be a NOP.

N.B. This appears to be the result of hooking wxEVT_CHAR_HOOK into
EDA_DRAW_PANEL::OnKeyEvent() (commit
53b1ec8146) that reverses the cascade of
events from bottom up rather than top down.  Fixing that is a longer
project and will likely be a side effect of switching fully to the new
tool architecture.
2019-02-14 20:50:50 -08:00
Jeff Young eaf5b913b6 Add Manage Symbol and Footprint Library tables to project frame.
Fixes: lp:1780604
* https://bugs.launchpad.net/kicad/+bug/1780604
2018-07-19 21:46:41 +01:00
Jeff Young 7841f8a466 Unified preferences dialog framework.
(cherry picked from commit 8ee3e77)
2018-07-17 15:11:17 +01:00
Jeff Young 75e91f4cfd Make sure Cvpcb doesn't use its own FP_LIB_TABLE.
It's just a vestige of when Cvpcb was a separate app.

Fixes: lp:1768251
* https://bugs.launchpad.net/kicad/+bug/1768251
2018-05-01 21:49:03 +01:00
Jeff Young baef22df9a Fix memory leak and push menu change to other apps.
Fixes: lp:1761848
* https://bugs.launchpad.net/kicad/+bug/1761848
2018-04-07 14:14:55 +01:00
Jeff Young b24b0d5dfe Dialog-ize CvPcb and implement proper Save.
Save now goes to disk (instead of just the in-memory schemaitc),
and the UI attempts to make this clear.
2018-03-25 19:21:27 +01:00
Seth Hillbrand 9bede6900c Standardize Kicad -> KiCad 2018-03-08 12:33:32 -08:00
Jeff Young 1afbfad44a Use "..." uniformly in menus.
See the bug report for some wording changes and a couple of
menu restructurings that were also cleaned up.

Fixes: lp:1597827
* https://bugs.launchpad.net/kicad/+bug/1597827
2018-02-10 17:32:28 -05:00
Wayne Stambaugh 4298d4ff4e Change missed UI string termonology from part/component to symbol. 2018-01-03 14:19:26 -05:00
Wayne Stambaugh f7ab50f791 UI string normalization.
Replace all instances of "component" and "part" with "symbol" when
referring to schematic and library symbols.

Replace all instances of "component" with "footprint" when referring to
board and library footprints.

Minor dialog layout fixes to some of the dialogs impacted by the UI
string changes.
2017-12-24 10:04:32 -05:00
Fabrizio Tappero d2d665e540 library option reviewed and renamed, minor menu text changes 2017-09-19 08:11:24 -04:00
jean-pierre charras 44b118f8cc Cvpcb: minor fixes in menubar (fix a comment and a few accelerator keys) 2017-06-11 10:44:36 +02:00
jean-pierre charras ee5565ae33 Cvpcb: EQU file association associates to all components
Fixes: lp:1697150
https://bugs.launchpad.net/kicad/+bug/1697150
2017-06-10 14:05:30 +02:00
Fabrizio Tappero ac9a64a173 general UI fix. Fixed a lot of icons and a lot of menu.
Also a few no longer used .cpp icon files are removed.
2017-06-02 11:51:11 +02:00
Wayne Stambaugh 129fa52b65 CvPcb: remove broken footprint documentation feature.
At one point, all of the footprints provided by the KiCad footprint
libraries were merged into a single pdf file.  The link to open this
file was provided on the toolbar.  Since the footprint libraries have
been split out into individual repositories, this file is no longer
created so the toolbar button and the underlying code to open this
file were removed.

Improve a few CvPcb menu strings.

Fixes lp:702785

https://bugs.launchpad.net/ubuntu/+source/kicad/+bug/702785
2016-10-11 15:08:40 -04:00
Simon Wells 145cd47d5c Move copy version information code to about dialog. 2016-03-11 11:40:24 -05:00
jean-pierre charras 53b52b08c9 CvPcb, filtering fp list by wildcard: Remove dialog to enter the filtering pattern. Use a wxTextCtrl permanently shown in toolbar. The fplist is updated immediately after editing the pattern. 2016-02-25 14:57:59 +01:00
jean-pierre charras a28b1cefc3 CvPcb: serious code cleanup (work in progress): Remove dead or outdated code. Fix a lot of coding style issues. Use better code in many places. No new features. 2016-02-25 10:52:29 +01:00
lukasz.iwaszkiewicz@gmail.com 0829446c86 Add CvPcb footprint search and filter by name. 2016-02-24 17:30:35 +01:00
jean-pierre charras 7313b28e2a Cvpcb: minor change in menubar: change menu name "files" to "Save" (there is no more files to read or save). Pcbnew, pad properies editor: show Axis (pad origin) in GAL mode (it was already shown in legacy mode). 2016-02-13 16:34:52 +01:00
Wayne Stambaugh 74f00d4027 Minor string and coding policy fixes.
* Make the about dialog help string consistent across all menus.
* Improve print preview window and print initialization error messages.
* The usual smattering of coding policy fixes.
2015-10-08 09:52:03 -04:00
Simon Wells c0d9fc1b5c Changed about menu items to just say About Kicad as its a common about dialog across the project 2015-09-24 06:59:31 +12:00
Simon Wells 1b26ca59b1 Added getting started to the remaining menus and fixed the icons 2015-09-24 06:29:21 +12:00
Dick Hollenbeck 8fb520249e Use KiwayExpress messaging for CvPcb footprint assignment instead of *.cmp file.
* Remove global s_NetObjectslist.
* Separate out non-owning version of NETLIST_OBJECTS_LIST into NETLIST_OBJECTS.
* Fix double free pertaining to ~NETLIST_READER().
* Remove all file-io from CvPCB.
* Remove exe launcher cvpcb, retain only cvpcb.kiface, since cvpcb.kiface has no file i/o.
* Add void CVPCB_MAINFRAME::KiwayMailIn( KIWAY_EXPRESS& mail ) and teach it to use old
  netlist loading code with a STRING_LINE_READER LINE_READER.
* Fix BEGIN_EVENT_TABLE( CVPCB_MAINFRAME, KIWAY_PLAYER )
2015-06-07 14:18:45 -04:00
Wayne Stambaugh ad9ec412f5 UI consistency and assertion fixes.
* Use "Close" in the file menu of every main frame window instead of the
  mismatch of the terms "Close", "Exit", and "Quit".
* Change the terminology in the Pcbnew graphic text edit dialog to match the
  module text edit dialog.
* Improve the layout of the Pcbnew graphic text dialog.
* Fix some wxPrintf parameter type assertions for 64 bit time_t.
* Fix all (at least I think I got all of them) duplicate menu accelerator
  characters.
2015-04-23 15:43:45 -04:00
Wayne Stambaugh 45d0448bb9 Add path (environment variable) configuration dialog.
* Create new dialog to edit environment variables.
* Add helper class ENV_VAR_ITEM to manage environment variable values and
  if they were defined externally.
* A path configuration dialog access to KiCad, CvPcb, Pcbnew, and Footprint Editor
  window menus.
* Add validator for environment variables.
2015-03-29 17:22:53 -04:00
Wayne Stambaugh ec8bf0c13a Library configuration menu naming improvements.
* Add footprint and drop table from the Pcbnew footprint library table menu
  entry to make it clear to new users.
* Add component to the Eeschema library configuration menu entry.
2015-03-23 11:44:19 -04:00