1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-04-29 23:29:41 +02:00

wxMSW 2.8.11 doesn't allow multiple timers to have the same ID, so use wxID_ANY

for timers
This commit is contained in:
businessmanprogrammersteve 2010-02-05 00:13:52 +00:00
parent 594dc3767c
commit 4fc182e812
5 changed files with 9 additions and 14 deletions

View File

@ -706,7 +706,7 @@ BEGIN_EVENT_TABLE(AudacityProject, wxFrame)
EVT_COMMAND_SCROLL_LINEDOWN(HSBarID, AudacityProject::OnScrollRightButton)
EVT_COMMAND_SCROLL(HSBarID, AudacityProject::OnScroll)
EVT_COMMAND_SCROLL(VSBarID, AudacityProject::OnScroll)
EVT_TIMER(AudacityProjectTimerID, AudacityProject::OnTimer)
EVT_TIMER(wxID_ANY, AudacityProject::OnTimer)
// Fires for menu with ID #1...first menu defined
EVT_UPDATE_UI(1, AudacityProject::OnUpdateUI)
EVT_ICONIZE(AudacityProject::OnIconize)
@ -992,7 +992,7 @@ AudacityProject::AudacityProject(wxWindow * parent, wxWindowID id,
mStatusBar->SetStatusText(msg);
mLastStatusUpdateTime = ::wxGetUTCTime();
mTimer = new wxTimer(this, AudacityProjectTimerID);
mTimer = new wxTimer(this, wxID_ANY);
mTimer->Start(200);
#if wxUSE_DRAG_AND_DROP

View File

@ -40,8 +40,6 @@
#include <wx/intl.h>
#include <wx/dcclient.h>
const int AudacityProjectTimerID = 5200;
class wxWindow;
class wxDialog;
class wxBoxSizer;

View File

@ -34,7 +34,6 @@
#include "Internat.h"
#define MAX_PROG 1000
#define TIMER_ID 7000
enum { // control IDs
ID_DATEPICKER_START = 10000,
@ -62,7 +61,7 @@ BEGIN_EVENT_TABLE(TimerRecordDialog, wxDialog)
EVT_BUTTON(wxID_OK, TimerRecordDialog::OnOK)
EVT_TIMER(TIMER_ID, TimerRecordDialog::OnTimer)
EVT_TIMER(wxID_ANY, TimerRecordDialog::OnTimer)
END_EVENT_TABLE()
TimerRecordDialog::TimerRecordDialog(wxWindow* parent)
@ -88,7 +87,7 @@ TimerRecordDialog::TimerRecordDialog(wxWindow* parent)
m_pTimeTextCtrl_Duration->SetFocus();
m_pTimeTextCtrl_Duration->SetFieldFocus(3);
m_timer.SetOwner(this, TIMER_ID);
m_timer.SetOwner(this, wxID_ANY);
m_timer.Start(kTimerInterval);
}

View File

@ -89,7 +89,6 @@ const wxRect kDummyRect = wxRect(-9999, -9999, 0, 0);
enum {
kToggleButtonID = 5000,
kTimerID
};
WX_DEFINE_OBJARRAY(wxArrayRect);
@ -108,7 +107,7 @@ public:
BEGIN_EVENT_TABLE(ExpandingToolBar, wxPanel)
EVT_SIZE(ExpandingToolBar::OnSize)
EVT_TIMER(kTimerID, ExpandingToolBar::OnTimer)
EVT_TIMER(wxID_ANY, ExpandingToolBar::OnTimer)
EVT_BUTTON(kToggleButtonID, ExpandingToolBar::OnToggle)
END_EVENT_TABLE()
@ -165,7 +164,7 @@ ExpandingToolBar::ExpandingToolBar(wxWindow* parent,
mToggleButton->UseDisabledAsDownHiliteImage(true);
SetAutoLayout(true);
mTimer.SetOwner(this, kTimerID);
mTimer.SetOwner(this, wxID_ANY);
}
ExpandingToolBar::~ExpandingToolBar()

View File

@ -168,8 +168,7 @@ bool MeterUpdateQueue::Get(MeterUpdateMsg &msg)
//
enum {
OnMeterUpdateID = 6000,
OnDisableMeterID,
OnDisableMeterID = 6000,
OnMonitorID,
OnHorizontalID,
OnAutomatedInputLevelAdjustmentID,
@ -185,7 +184,7 @@ enum {
};
BEGIN_EVENT_TABLE(Meter, wxPanel)
EVT_TIMER(OnMeterUpdateID, Meter::OnMeterUpdate)
EVT_TIMER(wxID_ANY, Meter::OnMeterUpdate)
EVT_MOUSE_EVENTS(Meter::OnMouse)
EVT_ERASE_BACKGROUND(Meter::OnErase)
EVT_PAINT(Meter::OnPaint)
@ -285,7 +284,7 @@ Meter::Meter(wxWindow* parent, wxWindowID id,
mRuler.SetFonts(GetFont(), GetFont(), GetFont());
mTimer.SetOwner(this, OnMeterUpdateID);
mTimer.SetOwner(this, wxID_ANY);
Reset(44100.0, true);
for(i=0; i<kMaxMeterBars; i++) {
mBar[i].clipping = false;