Skip to content

Commit

Permalink
Fixed version compile errors in wx 2.8.12
Browse files Browse the repository at this point in the history
  • Loading branch information
grodansparadis committed Apr 29, 2016
1 parent 5631d82 commit 9c6cf1d
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/vscp/common/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
#define VSCPD_MAJOR_VERSION 1
#define VSCPD_MINOR_VERSION 12
#define VSCPD_SUB_VERSION 2
#define VSCPD_BUILD_VERSION 14
#define VSCPD_BUILD_VERSION 15

#define VSCPD_DISPLAY_VERSION "1.12.2.14 Magnesium"
#define VSCPD_DISPLAY_VERSION "1.12.2.15 Magnesium"

#define VSCPD_COPYRIGHT "Copyright (C) 2000-2016, Grodans Paradis AB, http://www.paradiseofthefrog.com"
#define VSCPD_COPYRIGHT_HTML "Copyright (C) 2000-2016, <a href=\"mailto:[email protected]\">Paradise of the Frog</a>, <a href=\"http://www.paradiseofthefrog.com\">http://www.paradiseofthefrog.com</a>"
Expand Down
48 changes: 48 additions & 0 deletions src/vscp/vscpworks/frmdeviceconfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4274,13 +4274,21 @@ void frmDeviceConfig::OnButtonUpdateClick( wxCommandEvent& event )
doUpdate();
m_gridRegisters->SetFocus();
// Restore register selection
#if wxCHECK_VERSION(3,0,0)
m_gridRegisters->GoToCell( m_lastLeftRegisterClickRow, 0 );
#endif
m_gridRegisters->SelectRow( m_lastLeftRegisterClickRow );
#if wxCHECK_VERSION(3,0,0)
m_gridAbstractions->GoToCell( m_lastLeftAbstractionClickRow, 0 );
#endif
m_gridAbstractions->SelectRow( m_lastLeftAbstractionClickRow );
#if wxCHECK_VERSION(3,0,0)
m_gridDM->GoToCell( m_lastLeftDMClickRow, 0 );
#endif
m_gridDM->SelectRow( m_lastLeftDMClickRow );
#if wxCHECK_VERSION(3,0,0)
m_gridWizard->GoToCell( m_lastLeftWizardClickRow, 0 );
#endif
m_gridWizard->SelectRow( m_lastLeftWizardClickRow );
event.Skip( false );
}
Expand All @@ -4302,13 +4310,21 @@ void frmDeviceConfig::OnButtonUpdateAllClick( wxCommandEvent& event )
m_gridRegisters->SetFocus();

// Restore register selection
#if wxCHECK_VERSION(3,0,0)
m_gridRegisters->GoToCell( m_lastLeftRegisterClickRow, 0 );
#endif
m_gridRegisters->SelectRow( m_lastLeftRegisterClickRow );
#if wxCHECK_VERSION(3,0,0)
m_gridAbstractions->GoToCell( m_lastLeftAbstractionClickRow, 0 );
#endif
m_gridAbstractions->SelectRow( m_lastLeftAbstractionClickRow );
#if wxCHECK_VERSION(3,0,0)
m_gridDM->GoToCell( m_lastLeftDMClickRow, 0 );
#endif
m_gridDM->SelectRow( m_lastLeftDMClickRow );
#if wxCHECK_VERSION(3,0,0)
m_gridWizard->GoToCell( m_lastLeftWizardClickRow, 0 );
#endif
m_gridWizard->SelectRow( m_lastLeftWizardClickRow );

event.Skip(false);
Expand Down Expand Up @@ -5501,21 +5517,27 @@ void frmDeviceConfig::gotoRegisterPage( wxCommandEvent& WXUNUSED( event ) )

// Check for standard registers
if ( 0 == idx ) {
#if wxCHECK_VERSION(3,0,0)
m_gridRegisters->GoToCell( m_rowStandardRegisterStart, 0 );
#endif
m_gridRegisters->SelectRow( m_rowStandardRegisterStart );
}
// DM
else if ( 1 == idx ) {
int row = getRegisterGridRow( m_mdf.m_dmInfo.m_nStartOffset,
m_mdf.m_dmInfo.m_nStartPage );
#if wxCHECK_VERSION(3,0,0)
m_gridRegisters->GoToCell( row, 0 );
#endif
m_gridRegisters->SelectRow( row );
}
// Page n
else {
int row = getRegisterGridRow( 0,
pages.Item( idx - ( m_mdf.m_dmInfo.m_nRowCount ? 2 : 2 ) ) );
#if wxCHECK_VERSION(3,0,0)
m_gridRegisters->GoToCell( row, 0 );
#endif
m_gridRegisters->SelectRow( row );
}

Expand Down Expand Up @@ -5554,7 +5576,9 @@ void frmDeviceConfig::OnGotoRegister( wxCommandEvent& WXUNUSED( event ) )

int row = getRegisterGridRow( offset, page );

#if wxCHECK_VERSION(3,0,0)
m_gridRegisters->GoToCell( row, 0 );
#endif
m_gridRegisters->SelectRow( row );
}

Expand All @@ -5565,7 +5589,9 @@ void frmDeviceConfig::OnGotoRegister( wxCommandEvent& WXUNUSED( event ) )

void frmDeviceConfig::OnGotoTop( wxCommandEvent& WXUNUSED( event ) )
{
#if wxCHECK_VERSION(3,0,0)
m_gridRegisters->GoToCell( 0, 0 );
#endif
m_gridRegisters->SelectRow( 0 );
}

Expand All @@ -5577,7 +5603,9 @@ void frmDeviceConfig::OnGotoPage1( wxCommandEvent& WXUNUSED( event ) )
{
int row = getRegisterGridRow( 0, 1 );

#if wxCHECK_VERSION(3,0,0)
m_gridRegisters->GoToCell( row, 0 );
#endif
m_gridRegisters->SelectRow( row );
}

Expand All @@ -5589,7 +5617,9 @@ void frmDeviceConfig::OnGotoPage2( wxCommandEvent& WXUNUSED( event ) )
{
int row = getRegisterGridRow( 0, 2 );

#if wxCHECK_VERSION(3,0,0)
m_gridRegisters->GoToCell( row, 0 );
#endif
m_gridRegisters->SelectRow( row );
}

Expand All @@ -5601,7 +5631,9 @@ void frmDeviceConfig::OnGotoPage3( wxCommandEvent& WXUNUSED( event ) )
{
int row = getRegisterGridRow( 0, 3 );

#if wxCHECK_VERSION(3,0,0)
m_gridRegisters->GoToCell( row, 0 );
#endif
m_gridRegisters->SelectRow( row );
}

Expand All @@ -5613,7 +5645,9 @@ void frmDeviceConfig::OnGotoPage4( wxCommandEvent& WXUNUSED( event ) )
{
int row = getRegisterGridRow( 0, 4 );

#if wxCHECK_VERSION(3,0,0)
m_gridRegisters->GoToCell( row, 0 );
#endif
m_gridRegisters->SelectRow( row );
}

Expand All @@ -5625,7 +5659,9 @@ void frmDeviceConfig::OnGotoPage5( wxCommandEvent& WXUNUSED( event ) )
{
int row = getRegisterGridRow( 0, 5 );

#if wxCHECK_VERSION(3,0,0)
m_gridRegisters->GoToCell( row, 0 );
#endif
m_gridRegisters->SelectRow( row );
}

Expand All @@ -5637,7 +5673,9 @@ void frmDeviceConfig::OnGotoPage6( wxCommandEvent& WXUNUSED( event ) )
{
int row = getRegisterGridRow( 0, 6 );

#if wxCHECK_VERSION(3,0,0)
m_gridRegisters->GoToCell( row, 0 );
#endif
m_gridRegisters->SelectRow( row );
}

Expand All @@ -5649,7 +5687,9 @@ void frmDeviceConfig::OnGotoPage7( wxCommandEvent& WXUNUSED( event ) )
{
int row = getRegisterGridRow( 0, 7 );

#if wxCHECK_VERSION(3,0,0)
m_gridRegisters->GoToCell( row, 0 );
#endif
m_gridRegisters->SelectRow( row );
}

Expand All @@ -5661,7 +5701,9 @@ void frmDeviceConfig::OnGotoPage8( wxCommandEvent& WXUNUSED( event ) )
{
int row = getRegisterGridRow( 0, 8 );

#if wxCHECK_VERSION(3,0,0)
m_gridRegisters->GoToCell( row, 0 );
#endif
m_gridRegisters->SelectRow( row );
}

Expand All @@ -5673,7 +5715,9 @@ void frmDeviceConfig::OnGotoPage9( wxCommandEvent& WXUNUSED( event ) )
{
int row = getRegisterGridRow( 0, 9 );

#if wxCHECK_VERSION(3,0,0)
m_gridRegisters->GoToCell( row, 0 );
#endif
m_gridRegisters->SelectRow( row );
}

Expand All @@ -5685,7 +5729,9 @@ void frmDeviceConfig::OnGotoDM( wxCommandEvent& WXUNUSED( event ) )
{
int row = getRegisterGridRow( m_mdf.m_dmInfo.m_nStartOffset,
m_mdf.m_dmInfo.m_nStartPage );
#if wxCHECK_VERSION(3,0,0)
m_gridRegisters->GoToCell( row, 0 );
#endif
m_gridRegisters->SelectRow( row );
}

Expand All @@ -5696,7 +5742,9 @@ void frmDeviceConfig::OnGotoDM( wxCommandEvent& WXUNUSED( event ) )

void frmDeviceConfig::OnGotoStandard( wxCommandEvent& WXUNUSED( event ) )
{
#if wxCHECK_VERSION(3,0,0)
m_gridRegisters->GoToCell( m_rowStandardRegisterStart, 0 );
#endif
m_gridRegisters->SelectRow( m_rowStandardRegisterStart );
}

Expand Down
Loading

0 comments on commit 9c6cf1d

Please sign in to comment.