mirror of
https://github.com/cookiengineer/audacity
synced 2025-09-19 09:30:52 +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:
parent
594dc3767c
commit
4fc182e812
@ -706,7 +706,7 @@ BEGIN_EVENT_TABLE(AudacityProject, wxFrame)
|
|||||||
EVT_COMMAND_SCROLL_LINEDOWN(HSBarID, AudacityProject::OnScrollRightButton)
|
EVT_COMMAND_SCROLL_LINEDOWN(HSBarID, AudacityProject::OnScrollRightButton)
|
||||||
EVT_COMMAND_SCROLL(HSBarID, AudacityProject::OnScroll)
|
EVT_COMMAND_SCROLL(HSBarID, AudacityProject::OnScroll)
|
||||||
EVT_COMMAND_SCROLL(VSBarID, 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
|
// Fires for menu with ID #1...first menu defined
|
||||||
EVT_UPDATE_UI(1, AudacityProject::OnUpdateUI)
|
EVT_UPDATE_UI(1, AudacityProject::OnUpdateUI)
|
||||||
EVT_ICONIZE(AudacityProject::OnIconize)
|
EVT_ICONIZE(AudacityProject::OnIconize)
|
||||||
@ -992,7 +992,7 @@ AudacityProject::AudacityProject(wxWindow * parent, wxWindowID id,
|
|||||||
mStatusBar->SetStatusText(msg);
|
mStatusBar->SetStatusText(msg);
|
||||||
mLastStatusUpdateTime = ::wxGetUTCTime();
|
mLastStatusUpdateTime = ::wxGetUTCTime();
|
||||||
|
|
||||||
mTimer = new wxTimer(this, AudacityProjectTimerID);
|
mTimer = new wxTimer(this, wxID_ANY);
|
||||||
mTimer->Start(200);
|
mTimer->Start(200);
|
||||||
|
|
||||||
#if wxUSE_DRAG_AND_DROP
|
#if wxUSE_DRAG_AND_DROP
|
||||||
|
@ -40,8 +40,6 @@
|
|||||||
#include <wx/intl.h>
|
#include <wx/intl.h>
|
||||||
#include <wx/dcclient.h>
|
#include <wx/dcclient.h>
|
||||||
|
|
||||||
const int AudacityProjectTimerID = 5200;
|
|
||||||
|
|
||||||
class wxWindow;
|
class wxWindow;
|
||||||
class wxDialog;
|
class wxDialog;
|
||||||
class wxBoxSizer;
|
class wxBoxSizer;
|
||||||
|
@ -34,7 +34,6 @@
|
|||||||
#include "Internat.h"
|
#include "Internat.h"
|
||||||
|
|
||||||
#define MAX_PROG 1000
|
#define MAX_PROG 1000
|
||||||
#define TIMER_ID 7000
|
|
||||||
|
|
||||||
enum { // control IDs
|
enum { // control IDs
|
||||||
ID_DATEPICKER_START = 10000,
|
ID_DATEPICKER_START = 10000,
|
||||||
@ -62,7 +61,7 @@ BEGIN_EVENT_TABLE(TimerRecordDialog, wxDialog)
|
|||||||
|
|
||||||
EVT_BUTTON(wxID_OK, TimerRecordDialog::OnOK)
|
EVT_BUTTON(wxID_OK, TimerRecordDialog::OnOK)
|
||||||
|
|
||||||
EVT_TIMER(TIMER_ID, TimerRecordDialog::OnTimer)
|
EVT_TIMER(wxID_ANY, TimerRecordDialog::OnTimer)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
TimerRecordDialog::TimerRecordDialog(wxWindow* parent)
|
TimerRecordDialog::TimerRecordDialog(wxWindow* parent)
|
||||||
@ -88,7 +87,7 @@ TimerRecordDialog::TimerRecordDialog(wxWindow* parent)
|
|||||||
m_pTimeTextCtrl_Duration->SetFocus();
|
m_pTimeTextCtrl_Duration->SetFocus();
|
||||||
m_pTimeTextCtrl_Duration->SetFieldFocus(3);
|
m_pTimeTextCtrl_Duration->SetFieldFocus(3);
|
||||||
|
|
||||||
m_timer.SetOwner(this, TIMER_ID);
|
m_timer.SetOwner(this, wxID_ANY);
|
||||||
m_timer.Start(kTimerInterval);
|
m_timer.Start(kTimerInterval);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -89,7 +89,6 @@ const wxRect kDummyRect = wxRect(-9999, -9999, 0, 0);
|
|||||||
|
|
||||||
enum {
|
enum {
|
||||||
kToggleButtonID = 5000,
|
kToggleButtonID = 5000,
|
||||||
kTimerID
|
|
||||||
};
|
};
|
||||||
|
|
||||||
WX_DEFINE_OBJARRAY(wxArrayRect);
|
WX_DEFINE_OBJARRAY(wxArrayRect);
|
||||||
@ -108,7 +107,7 @@ public:
|
|||||||
|
|
||||||
BEGIN_EVENT_TABLE(ExpandingToolBar, wxPanel)
|
BEGIN_EVENT_TABLE(ExpandingToolBar, wxPanel)
|
||||||
EVT_SIZE(ExpandingToolBar::OnSize)
|
EVT_SIZE(ExpandingToolBar::OnSize)
|
||||||
EVT_TIMER(kTimerID, ExpandingToolBar::OnTimer)
|
EVT_TIMER(wxID_ANY, ExpandingToolBar::OnTimer)
|
||||||
EVT_BUTTON(kToggleButtonID, ExpandingToolBar::OnToggle)
|
EVT_BUTTON(kToggleButtonID, ExpandingToolBar::OnToggle)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
@ -165,7 +164,7 @@ ExpandingToolBar::ExpandingToolBar(wxWindow* parent,
|
|||||||
mToggleButton->UseDisabledAsDownHiliteImage(true);
|
mToggleButton->UseDisabledAsDownHiliteImage(true);
|
||||||
|
|
||||||
SetAutoLayout(true);
|
SetAutoLayout(true);
|
||||||
mTimer.SetOwner(this, kTimerID);
|
mTimer.SetOwner(this, wxID_ANY);
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingToolBar::~ExpandingToolBar()
|
ExpandingToolBar::~ExpandingToolBar()
|
||||||
|
@ -168,8 +168,7 @@ bool MeterUpdateQueue::Get(MeterUpdateMsg &msg)
|
|||||||
//
|
//
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
OnMeterUpdateID = 6000,
|
OnDisableMeterID = 6000,
|
||||||
OnDisableMeterID,
|
|
||||||
OnMonitorID,
|
OnMonitorID,
|
||||||
OnHorizontalID,
|
OnHorizontalID,
|
||||||
OnAutomatedInputLevelAdjustmentID,
|
OnAutomatedInputLevelAdjustmentID,
|
||||||
@ -185,7 +184,7 @@ enum {
|
|||||||
};
|
};
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(Meter, wxPanel)
|
BEGIN_EVENT_TABLE(Meter, wxPanel)
|
||||||
EVT_TIMER(OnMeterUpdateID, Meter::OnMeterUpdate)
|
EVT_TIMER(wxID_ANY, Meter::OnMeterUpdate)
|
||||||
EVT_MOUSE_EVENTS(Meter::OnMouse)
|
EVT_MOUSE_EVENTS(Meter::OnMouse)
|
||||||
EVT_ERASE_BACKGROUND(Meter::OnErase)
|
EVT_ERASE_BACKGROUND(Meter::OnErase)
|
||||||
EVT_PAINT(Meter::OnPaint)
|
EVT_PAINT(Meter::OnPaint)
|
||||||
@ -285,7 +284,7 @@ Meter::Meter(wxWindow* parent, wxWindowID id,
|
|||||||
|
|
||||||
mRuler.SetFonts(GetFont(), GetFont(), GetFont());
|
mRuler.SetFonts(GetFont(), GetFont(), GetFont());
|
||||||
|
|
||||||
mTimer.SetOwner(this, OnMeterUpdateID);
|
mTimer.SetOwner(this, wxID_ANY);
|
||||||
Reset(44100.0, true);
|
Reset(44100.0, true);
|
||||||
for(i=0; i<kMaxMeterBars; i++) {
|
for(i=0; i<kMaxMeterBars; i++) {
|
||||||
mBar[i].clipping = false;
|
mBar[i].clipping = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user