From 312c16b3bf1ecd68bf2fbda5cea4ab21511069e2 Mon Sep 17 00:00:00 2001 From: Jerry Jacobs Date: Thu, 12 May 2011 20:47:56 +0200 Subject: [PATCH] Minor UI changes that affect OS X, see CHANGELOG.txt --- CHANGELOG.txt | 16 ++++++++++++++++ common/gestfich.cpp | 12 +++++++++++- cvpcb/Info.plist | 2 +- eeschema/Info.plist | 2 +- gerbview/Info.plist | 15 ++++++++++++++- kicad/Info.plist | 2 +- kicad/tree_project_frame.cpp | 19 +++++-------------- pcbnew/Info.plist | 2 +- pcbnew/menubar_pcbframe.cpp | 2 +- 9 files changed, 51 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index f40ede4e34..fa61dd14af 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -4,6 +4,22 @@ KiCad ChangeLog 2010 Please add newer entries at the top, list the date and your name with email address. +2011-Apr-12, UPDATE Jerry Jacobs +================================================================================ +Minor UI changes that affect OS X platform. + - Fix for opening the help contents + - Fix for opening files with the default editor + - Fix for opening PDF files + +Solved all with the BSD open command, for other OS'es which have X11 and +utilities they can use the xdg-open command which I added to the pdf viewer tries +list. + +Kicad projectview: +Remove not-existing files when a empty project is created, this confuses when +users try to open it. Show a entry that the project is empty instead of these +void files. + 2011-Apr-6, UPDATE Jerry Jacobs ================================================================================ Cleanup of all the menubar code to have the same style, remove the C comments. diff --git a/common/gestfich.cpp b/common/gestfich.cpp index 69e7ceec10..e66f162f41 100644 --- a/common/gestfich.cpp +++ b/common/gestfich.cpp @@ -540,7 +540,15 @@ wxString& WinEDA_App::GetEditorName() // We get the preferred editor name from environment variable first. if( editorname.IsEmpty() ) { - wxGetEnv( wxT( "EDITOR" ), &editorname ); + // If there is no EDITOR variable set, try the desktop default + if(!wxGetEnv( wxT( "EDITOR" ), &editorname )) + { +#ifdef __WXOSX__ + editorname = "/usr/bin/open"; +#elif __WXX11__ + editorname = "/usr/bin/xdg-open"; +#endif + } } if( editorname.IsEmpty() ) // We must get a preferred editor name { @@ -622,6 +630,8 @@ bool OpenPDF( const wxString& file ) wxT( "/usr/bin/konqueror" ), wxT( "/usr/bin/kpdf" ), wxT( "/usr/bin/xpdf" ), + wxT( "/usr/bin/open" ), // BSD and OSX file & dir opener + wxT( "/usr/bin/xdg-open" ), // Freedesktop file & dir opener wxT( "" ), }; diff --git a/cvpcb/Info.plist b/cvpcb/Info.plist index 9349baf0f5..3885457278 100644 --- a/cvpcb/Info.plist +++ b/cvpcb/Info.plist @@ -33,7 +33,7 @@ CFBundleLongVersionString CFBundleName - cvpcb + CvPCB CFBundlePackageType APPL CFBundleShortVersionString diff --git a/eeschema/Info.plist b/eeschema/Info.plist index 60ac3df0e6..6f5027a0da 100644 --- a/eeschema/Info.plist +++ b/eeschema/Info.plist @@ -32,7 +32,7 @@ CFBundleLongVersionString CFBundleName - eeschema + EESchema CFBundlePackageType APPL CFBundleShortVersionString diff --git a/gerbview/Info.plist b/gerbview/Info.plist index 520e931002..41d76aad0e 100644 --- a/gerbview/Info.plist +++ b/gerbview/Info.plist @@ -8,11 +8,24 @@ CFBundleTypeExtensions pen + gba gbr gbx + gbo + gbl + gtl + gto + gta + gbp + gbp + gbs + gts + gtp + gbx lgr ger pho + drl CFBundleTypeIconFile gerbview_doc.icns @@ -37,7 +50,7 @@ CFBundleLongVersionString CFBundleName - gerbview + GerbView CFBundlePackageType APPL CFBundleShortVersionString diff --git a/kicad/Info.plist b/kicad/Info.plist index 340744289b..e5ef4376d9 100644 --- a/kicad/Info.plist +++ b/kicad/Info.plist @@ -32,7 +32,7 @@ CFBundleLongVersionString CFBundleName - kicad + KiCad CFBundlePackageType APPL CFBundleShortVersionString diff --git a/kicad/tree_project_frame.cpp b/kicad/tree_project_frame.cpp index 2058188df2..128b49d97a 100644 --- a/kicad/tree_project_frame.cpp +++ b/kicad/tree_project_frame.cpp @@ -698,19 +698,6 @@ void TREE_PROJECT_FRAME::ReCreateTreePrj() wxEmptyString, m_TreeProject ) ); - fn.SetExt( SchematicFileExtension ); - - // Add at least a .sch / .brd if not existing: - if( !fn.FileExists() ) - AddFile( fn.GetFullName(), m_root ); - - fn.SetExt( PcbFileExtension ); - - if( !fn.FileExists( ) ) - AddFile( fn.GetFullName(), m_root ); - - fn.SetExt( ProjectFileExtension ); - // Now adding all current files if available if( prjOpened ) { @@ -726,7 +713,11 @@ void TREE_PROJECT_FRAME::ReCreateTreePrj() cont = dir.GetNext( &filename ); } - } + } + else + { + m_TreeProject->AppendItem( m_root, "Empty project" ); + } m_TreeProject->Expand( rootcellule ); diff --git a/pcbnew/Info.plist b/pcbnew/Info.plist index af353d69ff..b708119566 100644 --- a/pcbnew/Info.plist +++ b/pcbnew/Info.plist @@ -30,7 +30,7 @@ CFBundleLongVersionString CFBundleName - pcbnew + PCBNew CFBundlePackageType APPL CFBundleShortVersionString diff --git a/pcbnew/menubar_pcbframe.cpp b/pcbnew/menubar_pcbframe.cpp index 2f39eedb23..6708b8e0a9 100644 --- a/pcbnew/menubar_pcbframe.cpp +++ b/pcbnew/menubar_pcbframe.cpp @@ -613,7 +613,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() // About item = new wxMenuItem( helpMenu, wxID_ABOUT, - _( "&About" ), + _( "&About PCBNew" ), _( "About PCBnew printed circuit board designer" )); SET_BITMAP( info_xpm ); helpMenu->Append( item );