46#define URL_GET_INVOLVED wxS( "https://kicad.org/contribute/" )
47#define URL_DONATE wxS( "https://go.kicad.org/app-donate" )
48#define URL_DOCUMENTATION wxS( "https://docs.kicad.org/" )
53 wxS(
"https://gitlab.com/kicad/code/kicad/-/issues/new?issuable_template=bare&issue[description]=%s" );
65 m_frame = getEditFrame<EDA_BASE_FRAME>();
101 if( dlg.ShowModal() == wxID_OK )
155 wxCHECK_MSG(
editor !=
nullptr, 0, wxT(
"Cannot open/create the editor frame" ) );
158 if(
editor->IsIconized() )
165 if( wxWindow::FindFocus() !=
editor )
169 if( wxWindow* blocking_win =
editor->Kiway().GetBlockingDialog() )
171 blocking_win->Raise();
172 blocking_win->SetFocus();
186 +
Pgm().GetLocale()->GetName().BeforeLast(
'_' ) + wxT(
"/" );
197 const wxChar* names[2] = {
198 wxT(
"getting_started_in_kicad" ),
199 wxT(
"Getting_Started_in_KiCad" )
204 for(
auto&
name : names )
208 if( !helpFile.IsEmpty() )
214 msg = wxString::Format(
_(
"Help file '%s' or\n'%s' could not be found.\n"
215 "Do you want to access the KiCad online help?" ),
216 names[0], names[1] );
217 wxMessageDialog dlg(
nullptr, msg,
_(
"File Not Found" ),
218 wxYES_NO | wxNO_DEFAULT | wxCANCEL );
220 if( dlg.ShowModal() != wxID_YES )
223 helpFile = baseUrl + names[0] + wxS(
"/" );
234 msg = wxString::Format(
_(
"Help file '%s' could not be found.\n"
235 "Do you want to access the KiCad online help?" ),
237 wxMessageDialog dlg(
nullptr, msg,
_(
"File Not Found" ),
238 wxYES_NO | wxNO_DEFAULT | wxCANCEL );
240 if( dlg.ShowModal() != wxID_YES )
243 helpFile = baseUrl + base_name + wxS(
"/" );
264 msg.Printf(
_(
"Could not launch the default browser.\n"
265 "For information on how to help the KiCad project, visit %s" ),
267 wxMessageBox( msg,
_(
"Get involved with KiCad" ), wxOK,
m_frame );
279 msg.Printf(
_(
"Could not launch the default browser.\n"
280 "To donate to the KiCad project, visit %s" ),
282 wxMessageBox( msg,
_(
"Donate to KiCad" ), wxOK,
m_frame );
303 wxLaunchDefaultBrowser( url_string );
BASE_SCREEN class implementation.
wxString GetMajorMinorVersion()
Get only the major and minor version in a string major.minor.
wxString GetVersionInfoData(const wxString &aTitle, bool aHtml, bool aBrief)
Create a version info string for bug reports and the about dialog.
static TOOL_ACTION reportBug
Cursor control event types.
static TOOL_ACTION showSymbolLibTable
static TOOL_ACTION showSymbolEditor
static TOOL_ACTION showSymbolBrowser
static TOOL_ACTION donate
static TOOL_ACTION listHotKeys
static TOOL_ACTION openPreferences
static TOOL_ACTION getInvolved
static TOOL_ACTION showFootprintLibTable
static TOOL_ACTION showFootprintEditor
static TOOL_ACTION configurePaths
static TOOL_ACTION gettingStarted
static TOOL_ACTION showFootprintBrowser
int ConfigurePaths(const TOOL_EVENT &aEvent)
int ShowHelp(const TOOL_EVENT &aEvent)
EDA_BASE_FRAME * m_frame
< Pointer to the currently used edit frame.
int ShowLibraryTable(const TOOL_EVENT &aEvent)
int ListHotKeys(const TOOL_EVENT &aEvent)
static wxString m_bugReportUrl
URL to launch a new issue with pre-populated description.
int GetInvolved(const TOOL_EVENT &aEvent)
int ReportBug(const TOOL_EVENT &aEvent)
Sets up handlers for various events.
int ShowPlayer(const TOOL_EVENT &aEvent)
int Donate(const TOOL_EVENT &aEvent)
void Reset(RESET_REASON aReason) override
Bring the tool to a known, initial state.
int OpenPreferences(const TOOL_EVENT &aEvent)
static wxString m_bugReportTemplate
Issue template to use for reporting bugs (this should not be translated)
void setTransitions() override
This method is meant to be overridden in order to specify handlers for events.
virtual wxString help_name()
const wxString & GetUntranslatedAboutTitle() const
void OnPreferences(wxCommandEvent &event)
Displays the preferences and settings of all opened editors paged dialog.
std::string Escape(const std::string &aUrl)
Escapes a string for use as a URL.
PROJECT & Prj() const
Return a reference to the PROJECT associated with this KIWAY.
KIWAY & Kiway() const
Return a reference to the KIWAY that this object has an opportunity to participate in.
A wxFrame capable of the OpenProjectFiles function, meaning it can load a portion of a KiCad project.
virtual void CommonSettingsChanged(bool aEnvVarsChanged, bool aTextVarsChanged)
Call CommonSettingsChanged() on all KIWAY_PLAYERs.
virtual KIWAY_PLAYER * Player(FRAME_T aFrameType, bool doCreate=true, wxTopLevelWindow *aParent=nullptr)
Return the KIWAY_PLAYER* given a FRAME_T.
virtual KIFACE * KiFACE(FACE_T aFaceId, bool doLoad=true)
Return the KIFACE* given a FACE_T.
bool WarnUserIfOperatingSystemUnsupported()
Checks if the operating system is explicitly unsupported and displays a disclaimer message box.
#define URL_DOCUMENTATION
bool GetAssociatedDocument(wxWindow *aParent, const wxString &aDocName, PROJECT *aProject, SEARCH_STACK *aPaths)
Open a document (file) with the suitable browser.
This file is part of the common library.
FRAME_T
The set of EDA_BASE_FRAME derivatives, typically stored in EDA_BASE_FRAME::m_Ident.
@ DIALOG_PCB_LIBRARY_TABLE
@ DIALOG_SCH_LIBRARY_TABLE
void DisplayHotkeyList(EDA_BASE_FRAME *aParent)
Display the current hotkey list.
wxString SearchHelpFileFullPath(const wxString &aBaseName)
Return the help file's full path.
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
std::vector< FAB_LAYER_COLOR > dummy
Implement a participant in the KIWAY alchemy.