39 event.Check(
Pgm().UseSystemPdfBrowser() );
52 event.Check( !
Pgm().UseSystemPdfBrowser() );
60 if( !
Pgm().GetPdfBrowserName() && !setPdfBrowserName )
63 _(
"You must choose a PDF viewer before using this option." ) );
64 setPdfBrowserName =
true;
67 if( setPdfBrowserName )
69 wxString mask( wxT(
"*" ) );
72 mask += wxT(
".exe" );
75 wxString wildcard = _(
"Executable files (" ) + mask + wxT(
")|" ) + mask;
80 wxFileDialog dlg(
this, _(
"Select Preferred PDF Browser" ), fn.GetPath(),
81 fn.GetFullPath(), wildcard,
82 wxFD_OPEN | wxFD_FILE_MUST_EXIST );
84 if( dlg.ShowModal() == wxID_CANCEL )
This file is part of the common library.
void OnUpdatePreferredPdfBrowser(wxUpdateUIEvent &event)
VTBL_ENTRY void ForceSystemPdfBrowser(bool aFlg)
Function ForceSystemPdfBrowser forces the use of system PDF browser, even if a preferred PDF browser ...
VTBL_ENTRY const wxString & GetPdfBrowserName() const
PGM_BASE & Pgm()
The global Program "get" accessor.
VTBL_ENTRY void WritePdfBrowserInfos()
Function WritePdfBrowserInfos saves the PDF browser choice to the common configuration.
void OnSelectDefaultPdfBrowser(wxCommandEvent &event)
KICAD_MANAGER_FRAME is the KiCad main frame.
VTBL_ENTRY void SetPdfBrowserName(const wxString &aFileName)
void OnUpdateDefaultPdfBrowser(wxUpdateUIEvent &event)
VTBL_ENTRY void ReadPdfBrowserInfos()
Function ReadPdfBrowserInfos reads the PDF browser choice from the common configuration.
void DisplayError(wxWindow *parent, const wxString &text, int displaytime)
Function DisplayError displays an error or warning message box with aMessage.
void OnSelectPreferredPdfBrowser(wxCommandEvent &event)