mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-14 17:14:07 +01:00
Remove duplication of enum definition
This commit is contained in:
@@ -80,18 +80,6 @@ enum {
|
|||||||
CONTROL_GROUP_EXPORT
|
CONTROL_GROUP_EXPORT
|
||||||
};
|
};
|
||||||
|
|
||||||
// Post Timer Recording Actions
|
|
||||||
// Ensure this matches the enum in Menus.cpp
|
|
||||||
enum {
|
|
||||||
POST_TIMER_RECORD_STOPPED = -3,
|
|
||||||
POST_TIMER_RECORD_CANCEL_WAIT,
|
|
||||||
POST_TIMER_RECORD_CANCEL,
|
|
||||||
POST_TIMER_RECORD_NOTHING,
|
|
||||||
POST_TIMER_RECORD_CLOSE,
|
|
||||||
POST_TIMER_RECORD_RESTART,
|
|
||||||
POST_TIMER_RECORD_SHUTDOWN
|
|
||||||
};
|
|
||||||
|
|
||||||
// The slow timer interval is used to update the start and end times, which only show
|
// The slow timer interval is used to update the start and end times, which only show
|
||||||
// time to the nearest second. So we only need an update once a second.
|
// time to the nearest second. So we only need an update once a second.
|
||||||
const int kSlowTimerInterval = 1000; // ms
|
const int kSlowTimerInterval = 1000; // ms
|
||||||
|
|||||||
@@ -36,6 +36,20 @@ enum TimerRecordCompletedActions {
|
|||||||
TR_ACTION_EXPORTED = 0x00000002
|
TR_ACTION_EXPORTED = 0x00000002
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum {
|
||||||
|
POST_TIMER_RECORD_STOPPED = -3,
|
||||||
|
POST_TIMER_RECORD_CANCEL_WAIT,
|
||||||
|
POST_TIMER_RECORD_CANCEL,
|
||||||
|
|
||||||
|
POST_TIMER_RECORD_NOTHING = 0,
|
||||||
|
POST_TIMER_RECORD_CLOSE,
|
||||||
|
|
||||||
|
#ifdef __WINDOWS__
|
||||||
|
POST_TIMER_RECORD_RESTART,
|
||||||
|
POST_TIMER_RECORD_SHUTDOWN
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
class AudacityProject;
|
class AudacityProject;
|
||||||
|
|
||||||
class TimerRecordPathCtrl final : public wxTextCtrl
|
class TimerRecordPathCtrl final : public wxTextCtrl
|
||||||
|
|||||||
@@ -71,18 +71,6 @@ bool MakeReadyToPlay(AudacityProject &project)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Post Timer Recording Actions
|
|
||||||
// Ensure this matches the enum in TimerRecordDialog.cpp
|
|
||||||
enum {
|
|
||||||
POST_TIMER_RECORD_STOPPED = -3,
|
|
||||||
POST_TIMER_RECORD_CANCEL_WAIT,
|
|
||||||
POST_TIMER_RECORD_CANCEL,
|
|
||||||
POST_TIMER_RECORD_NOTHING,
|
|
||||||
POST_TIMER_RECORD_CLOSE,
|
|
||||||
POST_TIMER_RECORD_RESTART,
|
|
||||||
POST_TIMER_RECORD_SHUTDOWN
|
|
||||||
};
|
|
||||||
|
|
||||||
// Returns true if this project was stopped, otherwise false.
|
// Returns true if this project was stopped, otherwise false.
|
||||||
// (it may though have stopped another project playing)
|
// (it may though have stopped another project playing)
|
||||||
bool DoStopPlaying(const CommandContext &context)
|
bool DoStopPlaying(const CommandContext &context)
|
||||||
@@ -371,20 +359,19 @@ void OnTimerRecord(const CommandContext &context)
|
|||||||
} );
|
} );
|
||||||
ProjectManager::Get(project).SetSkipSavePrompt(true);
|
ProjectManager::Get(project).SetSkipSavePrompt(true);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#ifdef __WINDOWS__
|
||||||
case POST_TIMER_RECORD_RESTART:
|
case POST_TIMER_RECORD_RESTART:
|
||||||
// Restart System
|
// Restart System
|
||||||
ProjectManager::Get(project).SetSkipSavePrompt(true);
|
ProjectManager::Get(project).SetSkipSavePrompt(true);
|
||||||
#ifdef __WINDOWS__
|
|
||||||
system("shutdown /r /f /t 30");
|
system("shutdown /r /f /t 30");
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
case POST_TIMER_RECORD_SHUTDOWN:
|
case POST_TIMER_RECORD_SHUTDOWN:
|
||||||
// Shutdown System
|
// Shutdown System
|
||||||
ProjectManager::Get(project).SetSkipSavePrompt(true);
|
ProjectManager::Get(project).SetSkipSavePrompt(true);
|
||||||
#ifdef __WINDOWS__
|
|
||||||
system("shutdown /s /f /t 30");
|
system("shutdown /s /f /t 30");
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user