← Back to team overview

kicad-developers team mailing list archive

[PATCH] GerbView: Minor cleanup of Menus + Toolbar for consistency.

 

replace: File -> File(s) when wxFD_MULTIPLE
replace: Load -> Open
replace: Erase -> Clear
add Excellon / Gerber where it makes sense
re-sort File menu

Regards,

Clemens
>From 058dc2b1eea83876f314eaa338c7193af52fdbb5 Mon Sep 17 00:00:00 2001
From: Clemens Koller <cko@xxxxxxxxx>
Date: Tue, 27 Feb 2018 23:30:50 +0100
Subject: GerbView: Minor cleanup of Menus + Toolbar for consistency.

replace: File -> File(s) when wxFD_MULTIPLE
replace: Load -> Open
replace: Erase -> Clear
add Excellon / Gerber where it makes sense
re-sort File menu

diff --git a/gerbview/files.cpp b/gerbview/files.cpp
index 381ade3f5..9bd899e2c 100644
--- a/gerbview/files.cpp
+++ b/gerbview/files.cpp
@@ -197,7 +197,7 @@ bool GERBVIEW_FRAME::LoadGerberFiles( const wxString& aFullFileName )
                 currentPath.RemoveLast();
         }
 
-        wxFileDialog dlg( this, _( "Open Gerber File" ),
+        wxFileDialog dlg( this, _( "Open Gerber File(s)" ),
                           currentPath,
                           filename.GetFullName(),
                           filetypes,
@@ -337,7 +337,7 @@ bool GERBVIEW_FRAME::LoadExcellonFiles( const wxString& aFullFileName )
         else
             currentPath = m_mruPath;
 
-        wxFileDialog dlg( this, _( "Open Drill File" ),
+        wxFileDialog dlg( this, _( "Open Excellon Drill File(s)" ),
                           currentPath, filename.GetFullName(), filetypes,
                           wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_MULTIPLE | wxFD_CHANGE_DIR );
 
diff --git a/gerbview/menubar.cpp b/gerbview/menubar.cpp
index 9dae741ab..a3ac0ab0e 100644
--- a/gerbview/menubar.cpp
+++ b/gerbview/menubar.cpp
@@ -59,28 +59,28 @@ void GERBVIEW_FRAME::ReCreateMenuBar()
     // Menu File:
     wxMenu* fileMenu = new wxMenu;
 
-    // Load Gerber files
+    // Open Gerber file(s)
     AddMenuItem( fileMenu, wxID_FILE,
-                 _( "Load &Gerber File..." ),
-                 _( "Load a new Gerber file on the current layer. Previous data will be deleted" ),
+                 _( "Open &Gerber File(s)..." ),
+                 _( "Open Gerber file(s) on the current layer. Previous data will be deleted" ),
                  KiBitmap( load_gerber_xpm ) );
 
-    // Load Excellon drill files
+    // Open Excellon drill file(s)
     AddMenuItem( fileMenu, ID_GERBVIEW_LOAD_DRILL_FILE,
-                 _( "Load &EXCELLON Drill File..." ),
-                 _( "Load excellon drill file" ),
+                 _( "Open &Excellon Drill File(s)..." ),
+                 _( "Open Excellon drill file(s) on the current layer. Previous data will be deleted" ),
                  KiBitmap( gerbview_drill_file_xpm ) );
 
-    // Load Gerber job files
+    // Open Gerber job files
     AddMenuItem( fileMenu, ID_GERBVIEW_LOAD_JOB_FILE,
-                 _( "Load Gerber &Job File..." ),
-                 _( "Load a Gerber job file, and load gerber files depending on the job" ),
+                 _( "Open Gerber &Job File..." ),
+                 _( "Open a Gerber job file, and it's associated gerber files depending on the job" ),
                  KiBitmap( gerber_job_file_xpm ) );
 
-    // Load Zip archive files
+    // Open Zip archive files
     AddMenuItem( fileMenu, ID_GERBVIEW_LOAD_ZIP_ARCHIVE_FILE,
-                 _( "Load &Zip Archive File..." ),
-                 _( "Load a zipped archive (Gerber and drill) file" ),
+                 _( "Open &Zip Archive File..." ),
+                 _( "Open a zipped archive (Gerber and Drill) file" ),
                  KiBitmap( zip_xpm ) );
 
     // Recent gerber files
@@ -111,22 +111,8 @@ void GERBVIEW_FRAME::ReCreateMenuBar()
     m_drillFileHistory.UseMenu( openRecentDrlMenu );
     m_drillFileHistory.AddFilesToMenu( );
     AddMenuItem( fileMenu, openRecentDrlMenu, wxID_ANY,
-                 _( "Open Recent Dri&ll File" ),
-                 _( "Open a recently opened drill file" ),
-                 KiBitmap( recent_xpm ) );
-
-    // Recent drill files
-    static wxMenu* openRecentZipArchiveMenu;
-
-    if( openRecentZipArchiveMenu )
-        m_zipFileHistory.RemoveMenu( openRecentZipArchiveMenu );
-
-    openRecentZipArchiveMenu = new wxMenu();
-    m_zipFileHistory.UseMenu( openRecentZipArchiveMenu );
-    m_zipFileHistory.AddFilesToMenu( );
-    AddMenuItem( fileMenu, openRecentZipArchiveMenu, wxID_ANY,
-                 _( "Open Recent Zip &Archive File" ),
-                 _( "Open a recently opened zip archive file" ),
+                 _( "Open Recent Excellon Dri&ll File" ),
+                 _( "Open a recently opened Excellon drill file" ),
                  KiBitmap( recent_xpm ) );
 
     // Recent job files
@@ -139,17 +125,31 @@ void GERBVIEW_FRAME::ReCreateMenuBar()
     m_jobFileHistory.UseMenu( openRecentJobFilesMenu );
     m_jobFileHistory.AddFilesToMenu( );
     AddMenuItem( fileMenu, openRecentJobFilesMenu, wxID_ANY,
-                 _( "Open Recent &Job File" ),
+                 _( "Open Recent Gerber &Job File" ),
                  _( "Open a recently opened gerber job file" ),
                  KiBitmap( recent_xpm ) );
 
+    // Recent Zip archive
+    static wxMenu* openRecentZipArchiveMenu;
+
+    if( openRecentZipArchiveMenu )
+        m_zipFileHistory.RemoveMenu( openRecentZipArchiveMenu );
+
+    openRecentZipArchiveMenu = new wxMenu();
+    m_zipFileHistory.UseMenu( openRecentZipArchiveMenu );
+    m_zipFileHistory.AddFilesToMenu( );
+    AddMenuItem( fileMenu, openRecentZipArchiveMenu, wxID_ANY,
+                 _( "Open Recent Zip &Archive File" ),
+                 _( "Open a recently opened zip archive file" ),
+                 KiBitmap( recent_xpm ) );
+
     // Separator
     fileMenu->AppendSeparator();
 
     // Clear all
     AddMenuItem( fileMenu,
                  ID_GERBVIEW_ERASE_ALL,
-                 _( "Clear &All" ),
+                 _( "Clear &All Layers" ),
                  _( "Clear all layers. All data will be deleted" ),
                  KiBitmap( delete_gerber_xpm ) );
 
@@ -168,7 +168,7 @@ void GERBVIEW_FRAME::ReCreateMenuBar()
 
     // Print
     AddMenuItem( fileMenu, wxID_PRINT,
-                 _( "&Print..." ), _( "Print gerber" ),
+                 _( "&Print..." ), _( "Print layers" ),
                  KiBitmap( print_button_xpm ) );
 
     // Separator
@@ -250,7 +250,7 @@ void GERBVIEW_FRAME::ReCreateMenuBar()
     // Erase graphic layer
     AddMenuItem( miscellaneousMenu, ID_GERBVIEW_ERASE_CURR_LAYER,
                  _( "&Clear Current Layer" ),
-                 _( "Erase the graphic layer currently selected" ),
+                 _( "Clear the graphic layer currently selected" ),
                  KiBitmap( delete_sheet_xpm ) );
 
     // Separator
diff --git a/gerbview/toolbars_gerber.cpp b/gerbview/toolbars_gerber.cpp
index 2448d0e6b..7a1bbea57 100644
--- a/gerbview/toolbars_gerber.cpp
+++ b/gerbview/toolbars_gerber.cpp
@@ -54,14 +54,14 @@ void GERBVIEW_FRAME::ReCreateHToolbar( void )
     // Set up toolbar
     m_mainToolBar->AddTool( ID_GERBVIEW_ERASE_ALL, wxEmptyString,
                             KiScaledBitmap( delete_gerber_xpm, this ),
-                            _( "Erase all layers" ) );
+                            _( "Clear all layers" ) );
 
     m_mainToolBar->AddTool( wxID_FILE, wxEmptyString, KiScaledBitmap( load_gerber_xpm, this ),
-                            _( "Load a new Gerber file on the current layer. Previous data will be deleted" ) );
+                            _( "Open Gerber file(s) on the current layer. Previous data will be deleted" ) );
 
     m_mainToolBar->AddTool( ID_GERBVIEW_LOAD_DRILL_FILE, wxEmptyString,
                             KiScaledBitmap( gerbview_drill_file_xpm, this ),
-                            _( "Load an excellon drill file on the current layer. Previous data will be deleted" ) );
+                            _( "Open Excellon drill file(s) on the current layer. Previous data will be deleted" ) );
 
     KiScaledSeparator( m_mainToolBar, this );
     m_mainToolBar->AddTool( ID_GERBVIEW_SET_PAGE_BORDER, wxEmptyString, KiScaledBitmap( sheetset_xpm, this ),
@@ -225,7 +225,7 @@ void GERBVIEW_FRAME::ReCreateOptToolbar( void )
 
     m_optionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_POLAR_COORD, wxEmptyString,
                                KiScaledBitmap( polar_coord_xpm, this ),
-                               _( "Turn polar coordinate on" ), wxITEM_CHECK );
+                               _( "Turn polar coordinates on" ), wxITEM_CHECK );
 
     m_optionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_UNIT_INCH, wxEmptyString,
                                KiScaledBitmap( unit_inch_xpm, this ),

Follow ups