Commit d68940c4 authored by jean-pierre charras's avatar jean-pierre charras
Browse files

Minor fixes.

parent 87d2caa4
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -302,6 +302,8 @@ static void InitKiCadAboutNew( AboutAppInfo& info )
        new Contributor( wxT( "Iñigo Zuluagaz" ),       wxT( "inigo_zuluaga@yahoo.es" ),        wxT( "Icons by" ),      KiBitmapNew( edit_module_xpm ) ) );
    info.AddArtist(
        new Contributor( wxT( "Fabrizio Tappero" ),     wxT( "fabrizio.tappero@gmail.com" ),    wxT( "New icons by" ),  KiBitmapNew( edit_module_xpm ) ) );
    info.AddArtist(
        new Contributor( wxT( "Konstantin Baranovskiy" ), wxT( "baranovskiykonstantin@gmail.com" ),    wxT( "New icons by" ),  KiBitmapNew( edit_module_xpm ) ) );
    info.AddArtist(
        new Contributor( wxT( "Renie Marquet" ),        wxT( "reniemarquet@uol.com.br" ),       wxT( "3D modules by" ), KiBitmapNew( three_d_xpm ) ) );
    info.AddArtist(
+4 −0
Original line number Diff line number Diff line
@@ -19,6 +19,9 @@ void EDA_APP::ReadPdfBrowserInfos()
    wxASSERT( m_commonSettings != NULL );

    m_PdfBrowser = m_commonSettings->Read( wxT( "PdfBrowserName" ), wxEmptyString );
    int tmp;
    m_commonSettings->Read( wxT( "UseSystemBrowser" ), &tmp, 0 );
    m_useSystemPdfBrowser = tmp != 0;
}


@@ -27,6 +30,7 @@ void EDA_APP::WritePdfBrowserInfos()
    wxASSERT( m_commonSettings != NULL );

    m_commonSettings->Write( wxT( "PdfBrowserName" ), m_PdfBrowser );
    m_commonSettings->Write( wxT( "UseSystemBrowser" ), m_useSystemPdfBrowser );
}


+1 −0
Original line number Diff line number Diff line
@@ -273,6 +273,7 @@ EDA_APP::EDA_APP()
    m_Locale = NULL;
    m_projectSettings = NULL;
    m_commonSettings = NULL;
    ForceSystemPdfBrowser( false );
}


+22 −1
Original line number Diff line number Diff line
@@ -97,6 +97,9 @@ protected:

    /// The file name of the the program selected for browsing pdf files.
    wxString            m_PdfBrowser;
    /// true to use the selected PDF browser, if exists, or false to use the default
    bool                m_useSystemPdfBrowser;

    wxPathList          m_searchPaths;
    wxFileHistory       m_fileHistory;
    wxString            m_HelpFileName;
@@ -150,11 +153,29 @@ public:

    wxLocale* GetLocale() { return m_Locale; }

    /**
     * @return the full file name of the prefered PDF browser
     * ( the file name is empty if no prefered there is no PDF browser selected
     */
    wxString GetPdfBrowserFileName() const { return m_PdfBrowser; }

    /**
     * Set the name of a prefered PDF browser, which could be an alternate browser
     * to the system PDF browser.
     */
    void SetPdfBrowserFileName( const wxString& aFileName ) { m_PdfBrowser = aFileName; }

    bool UseSystemPdfBrowser() const { return m_PdfBrowser.IsEmpty(); }
    /**
     * @return true if the PDF browser is the default (system) PDF browser
     * and false if the PDF browser is the prefered (selected) browser
     * returns false if there is no selected browser
     */
    bool UseSystemPdfBrowser() const { return m_useSystemPdfBrowser || m_PdfBrowser.IsEmpty(); }

    /**
     * force the use of system PDF browser, even if a preferend PDF browser is set
     */
    void ForceSystemPdfBrowser( bool aFlg ) { m_useSystemPdfBrowser = aFlg; }

    wxFileHistory& GetFileHistory() { return m_fileHistory; }

Loading