diff --git a/CHANGELOG.md b/CHANGELOG.md index a471405..c94abe8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ Change log ========== +* 🎁 Add "Update" / "Help" menu entries + +1.1.0 +----- + * 💊 Fix METAR value translation into Aerofly Weather object (wind speed, visibility) 1.0.1 diff --git a/README.md b/README.md index 632426a..f9c369c 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Requirements Installation ------------ -1. Download the current release ZIP from https://github.com/fboes/aerofly-wettergeraet/releases. +1. Download the current release ZIP from https://github.com/fboes/aerofly-wettergeraet/releases/latest. 2. Unpack the ZIP file to some sensible location. 3. Create a shortcut on your desktop by right-clicking `aerofly-wettergeraet-desktop.exe` > "Send to" > "Desktop (Create shortcut)". 3. Start the desktop application by clicking on the desktop link. diff --git a/src/WettergeraetDesktop/Frame.cpp b/src/WettergeraetDesktop/Frame.cpp index 981ccce..d267c83 100644 --- a/src/WettergeraetDesktop/Frame.cpp +++ b/src/WettergeraetDesktop/Frame.cpp @@ -21,10 +21,14 @@ Frame::Frame(const wxString& title, int argc, char * argv[]) : wxFrame(nullptr, { wxMenu *file = new wxMenu; file->Append(wxID_OPEN, wxT("&Load 'main.mcf'")); + file->AppendSeparator(); file->Append(wxID_EXIT, wxT("&Exit")); menubar->Append(file, wxT("&File")); wxMenu *help = new wxMenu; + help->Append(wxID_HELP, wxT("View &help")); + help->Append(EL_MENU_UPDATE, wxT("Check for &updates")); + help->AppendSeparator(); help->Append(wxID_ABOUT, wxT("&About")); menubar->Append(help, wxT("&Help")); } @@ -342,10 +346,22 @@ void Frame::actionLoadMainMcf(wxCommandEvent& WXUNUSED(event)) this->loadMainMcf(); } +void Frame::actionUpdate(wxCommandEvent& WXUNUSED(event)) +{ + wxLaunchDefaultBrowser("https://github.com/fboes/aerofly-wettergeraet/releases/latest"); +} + +void Frame::actionHelp(wxCommandEvent& WXUNUSED(event)) +{ + wxLaunchDefaultBrowser("https://github.com/fboes/aerofly-wettergeraet/blob/master/README.md"); +} + wxBEGIN_EVENT_TABLE(Frame, wxFrame) EVT_BUTTON(Frame::EL_BUTTON_FETCH, Frame::actionFetch) //EVT_BUTTON(Frame::EL_BUTTON_PARSE, Frame::actionParse) EVT_BUTTON(wxID_SAVE, Frame::actionSave) +EVT_MENU(wxID_HELP, Frame::actionHelp) +EVT_MENU(EL_MENU_UPDATE, Frame::actionUpdate) EVT_MENU(wxID_ABOUT, Frame::actionAbout) EVT_MENU(wxID_EXIT, Frame::actionExit) EVT_MENU(wxID_OPEN, Frame::actionLoadMainMcf) diff --git a/src/WettergeraetDesktop/Frame.h b/src/WettergeraetDesktop/Frame.h index c57a1e7..d98a68f 100644 --- a/src/WettergeraetDesktop/Frame.h +++ b/src/WettergeraetDesktop/Frame.h @@ -44,6 +44,7 @@ class Frame : public wxFrame static const unsigned short EL_CTRL_METAR = 4; static const unsigned short EL_CTRL_DATETIME = 5; static const unsigned short EL_CTRL_SLIDER = 6; + static const unsigned short EL_MENU_UPDATE = 7; Frame(const wxString& title, int argc, char * argv[]); virtual ~Frame(); @@ -70,4 +71,8 @@ class Frame : public wxFrame virtual void actionAbout(wxCommandEvent&); virtual void actionLoadMainMcf(wxCommandEvent&); + + virtual void actionUpdate(wxCommandEvent&); + + virtual void actionHelp(wxCommandEvent&); };