Skip to content

Commit

Permalink
Merge pull request #19 from seandepagnier/master
Browse files Browse the repository at this point in the history
sean's recent canges
  • Loading branch information
rgleason authored Jul 16, 2019
2 parents 808262f + 48a8f90 commit 665c05a
Show file tree
Hide file tree
Showing 6 changed files with 451 additions and 206 deletions.
585 changes: 403 additions & 182 deletions WeatherFax.fbp

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion data/WeatherFaxInternetRetrieval.xml
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@
<Area Name="A" lat1="10S" lat2="70N" lon1="20W" lon2="160E" />
</Region>
</Server>
<Server Name="German Weather DWD" Url="https://www.dwd.de/DWD/wetter/wv_spez/hobbymet/wetterkarten/">
<Server Name="German Weather DWD" Url="http://www.dwd.de/DWD/wetter/wv_spez/hobbymet/wetterkarten/">
<Region Name="European">
<Map Url="bwk_bodendruck_na_ana.png" Contents="Surface Anlys(4mb)" Area="A" />
<Map Url="ico_tkboden_na_024.png" Contents="24hr Forecast" Area="B" />
Expand Down
10 changes: 5 additions & 5 deletions src/WeatherFax.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,11 @@ void WeatherFax::OnLeftUp( wxMouseEvent& event )
{
m_tDownTimer.Stop();
}

void WeatherFax::OnDownTimer( wxTimerEvent & )
{
m_lFaxes->PopupMenu( m_menu4, m_downPos );
}
#endif

void WeatherFax::EnableDisplayControls(bool enable)
Expand Down Expand Up @@ -783,11 +788,6 @@ void WeatherFax::OnAbout( wxCommandEvent& event )
dlg.ShowModal();
}

void WeatherFax::OnDownTimer( wxTimerEvent & )
{
m_lFaxes->PopupMenu( m_menu4, m_downPos );
}

bool WeatherFax::DownloadFile( wxString filename )
{
const wxString url = m_weatherfax_pi.m_UpdateDataBaseUrl + filename;
Expand Down
7 changes: 5 additions & 2 deletions src/WeatherFax.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ class WeatherFax : public WeatherFaxBase
#endif
void OnLeftDown( wxMouseEvent& event );
void OnLeftUp( wxMouseEvent& event );
void OnDownTimer( wxTimerEvent & );

void OnClose( wxCloseEvent& event ) { Hide(); }
void EnableDisplayControls(bool enable);
Expand All @@ -98,7 +99,6 @@ class WeatherFax : public WeatherFaxBase
void OnInternet( wxCommandEvent& event );
void OnUpdateData( wxCommandEvent& event );
void OnAbout( wxCommandEvent& event );
void OnDownTimer( wxTimerEvent & );

bool Show( bool show = true );
void WizardFinished(WeatherFaxWizard *wizard);
Expand All @@ -125,8 +125,11 @@ class WeatherFax : public WeatherFaxBase
wxTimer m_tDeleteAudioWizard, m_tDownTimer;

private:
wxPoint m_downPos, m_startPos, m_startMouse;
bool DownloadFile( wxString filename );

#ifdef __OCPN__ANDROID__
wxPoint m_downPos, m_startPos, m_startMouse;
#endif
};

class FaxDecoder;
Expand Down
46 changes: 33 additions & 13 deletions src/WeatherFaxUI.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 1 2019)
// C++ code generated with wxFormBuilder (version Mar 28 2019)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
Expand Down Expand Up @@ -743,6 +743,26 @@ InternetRetrievalDialogBase::InternetRetrievalDialogBase( wxWindow* parent, wxWi
wxStaticBoxSizer* sbSizer121;
sbSizer121 = new wxStaticBoxSizer( new wxStaticBox( m_panel8, wxID_ANY, _("Regions") ), wxVERTICAL );

wxFlexGridSizer* fgSizer69;
fgSizer69 = new wxFlexGridSizer( 0, 1, 0, 0 );
fgSizer69->AddGrowableCol( 0 );
fgSizer69->AddGrowableRow( 0 );
fgSizer69->SetFlexibleDirection( wxBOTH );
fgSizer69->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );

wxFlexGridSizer* fgSizer281;
fgSizer281 = new wxFlexGridSizer( 0, 1, 0, 0 );
fgSizer281->AddGrowableCol( 0 );
fgSizer281->AddGrowableRow( 0 );
fgSizer281->SetFlexibleDirection( wxBOTH );
fgSizer281->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );

fgSizer281->SetMinSize( wxSize( -1,0 ) );
m_lRegions = new wxListBox( sbSizer121->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), 0, NULL, wxLB_EXTENDED );
m_lRegions->SetMinSize( wxSize( -1,0 ) );

fgSizer281->Add( m_lRegions, 0, wxALL|wxEXPAND, 5 );

wxFlexGridSizer* fgSizer291;
fgSizer291 = new wxFlexGridSizer( 0, 2, 0, 0 );
fgSizer291->SetFlexibleDirection( wxBOTH );
Expand All @@ -755,20 +775,18 @@ InternetRetrievalDialogBase::InternetRetrievalDialogBase( wxWindow* parent, wxWi
fgSizer291->Add( m_bNoRegions, 0, wxALL, 5 );


sbSizer121->Add( fgSizer291, 1, 0, 5 );
fgSizer281->Add( fgSizer291, 1, 0, 5 );

wxFlexGridSizer* fgSizer281;
fgSizer281 = new wxFlexGridSizer( 0, 1, 0, 0 );
fgSizer281->AddGrowableCol( 0 );
fgSizer281->AddGrowableRow( 0 );
fgSizer281->SetFlexibleDirection( wxBOTH );
fgSizer281->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );

m_lRegions = new wxListBox( sbSizer121->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), 0, NULL, wxLB_EXTENDED );
fgSizer281->Add( m_lRegions, 0, wxALL|wxEXPAND, 5 );
fgSizer69->Add( fgSizer281, 2, wxEXPAND, 5 );

m_bClose = new wxButton( sbSizer121->GetStaticBox(), wxID_ANY, _("Close"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
m_bClose->SetMinSize( wxSize( -1,30 ) );

sbSizer121->Add( fgSizer281, 2, wxEXPAND, 5 );
fgSizer69->Add( m_bClose, 0, wxALIGN_RIGHT|wxALL, 5 );


sbSizer121->Add( fgSizer69, 1, wxEXPAND, 5 );


fgSizer42->Add( sbSizer121, 1, wxEXPAND, 5 );
Expand Down Expand Up @@ -803,9 +821,10 @@ InternetRetrievalDialogBase::InternetRetrievalDialogBase( wxWindow* parent, wxWi
m_bAllServers->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( InternetRetrievalDialogBase::OnAllServers ), NULL, this );
m_bNoServers->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( InternetRetrievalDialogBase::OnNoServers ), NULL, this );
m_lServers->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( InternetRetrievalDialogBase::OnFilterServers ), NULL, this );
m_lRegions->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( InternetRetrievalDialogBase::OnFilterRegions ), NULL, this );
m_bAllRegions->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( InternetRetrievalDialogBase::OnAllRegions ), NULL, this );
m_bNoRegions->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( InternetRetrievalDialogBase::OnNoRegions ), NULL, this );
m_lRegions->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( InternetRetrievalDialogBase::OnFilterRegions ), NULL, this );
m_bClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( InternetRetrievalDialogBase::OnClose ), NULL, this );
}

InternetRetrievalDialogBase::~InternetRetrievalDialogBase()
Expand All @@ -826,9 +845,10 @@ InternetRetrievalDialogBase::~InternetRetrievalDialogBase()
m_bAllServers->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( InternetRetrievalDialogBase::OnAllServers ), NULL, this );
m_bNoServers->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( InternetRetrievalDialogBase::OnNoServers ), NULL, this );
m_lServers->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( InternetRetrievalDialogBase::OnFilterServers ), NULL, this );
m_lRegions->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( InternetRetrievalDialogBase::OnFilterRegions ), NULL, this );
m_bAllRegions->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( InternetRetrievalDialogBase::OnAllRegions ), NULL, this );
m_bNoRegions->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( InternetRetrievalDialogBase::OnNoRegions ), NULL, this );
m_lRegions->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( InternetRetrievalDialogBase::OnFilterRegions ), NULL, this );
m_bClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( InternetRetrievalDialogBase::OnClose ), NULL, this );

}

Expand Down
7 changes: 4 additions & 3 deletions src/WeatherFaxUI.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 1 2019)
// C++ code generated with wxFormBuilder (version Mar 28 2019)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
Expand Down Expand Up @@ -207,9 +207,10 @@ class InternetRetrievalDialogBase : public wxDialog
wxButton* m_bAllServers;
wxButton* m_bNoServers;
wxListBox* m_lServers;
wxListBox* m_lRegions;
wxButton* m_bAllRegions;
wxButton* m_bNoRegions;
wxListBox* m_lRegions;
wxButton* m_bClose;

// Virtual event handlers, overide them in your derived class
virtual void OnRetrieve( wxMouseEvent& event ) { event.Skip(); }
Expand All @@ -224,9 +225,9 @@ class InternetRetrievalDialogBase : public wxDialog
virtual void OnAllServers( wxCommandEvent& event ) { event.Skip(); }
virtual void OnNoServers( wxCommandEvent& event ) { event.Skip(); }
virtual void OnFilterServers( wxCommandEvent& event ) { event.Skip(); }
virtual void OnFilterRegions( wxCommandEvent& event ) { event.Skip(); }
virtual void OnAllRegions( wxCommandEvent& event ) { event.Skip(); }
virtual void OnNoRegions( wxCommandEvent& event ) { event.Skip(); }
virtual void OnFilterRegions( wxCommandEvent& event ) { event.Skip(); }


public:
Expand Down

0 comments on commit 665c05a

Please sign in to comment.