mirror of https://github.com/odrling/Aegisub
Avoid having to include preferences.h in app.cpp
This commit is contained in:
parent
e485c469e2
commit
625bd7a767
|
@ -46,7 +46,6 @@
|
||||||
#include "../main.h"
|
#include "../main.h"
|
||||||
#include "../options.h"
|
#include "../options.h"
|
||||||
#include "../project.h"
|
#include "../project.h"
|
||||||
#include "../preferences.h"
|
|
||||||
#include "../utils.h"
|
#include "../utils.h"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
@ -209,7 +208,7 @@ struct app_options final : public Command {
|
||||||
|
|
||||||
void operator()(agi::Context *c) override {
|
void operator()(agi::Context *c) override {
|
||||||
try {
|
try {
|
||||||
while (Preferences(c->parent).ShowModal() < 0);
|
ShowPreferences(c->parent);
|
||||||
} catch (agi::Exception& e) {
|
} catch (agi::Exception& e) {
|
||||||
LOG_E("config/init") << "Caught exception: " << e.GetMessage();
|
LOG_E("config/init") << "Caught exception: " << e.GetMessage();
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,20 +56,21 @@ int GetSelectedChoices(wxWindow *parent, wxArrayInt& selections, wxString const&
|
||||||
|
|
||||||
std::string CreateDummyVideo(wxWindow *parent);
|
std::string CreateDummyVideo(wxWindow *parent);
|
||||||
|
|
||||||
|
bool ShowPasteOverDialog(wxWindow *parent);
|
||||||
|
bool ShowPlainTextImportDialog();
|
||||||
void ShowAboutDialog(wxWindow *parent);
|
void ShowAboutDialog(wxWindow *parent);
|
||||||
void ShowAttachmentsDialog(wxWindow *parent, AssFile *file);
|
void ShowAttachmentsDialog(wxWindow *parent, AssFile *file);
|
||||||
void ShowSelectLinesDialog(agi::Context *c);
|
void ShowAutomationDialog(agi::Context *c);
|
||||||
void ShowExportDialog(agi::Context *c);
|
void ShowExportDialog(agi::Context *c);
|
||||||
void ShowPropertiesDialog(agi::Context *c);
|
|
||||||
void ShowFontsCollectorDialog(agi::Context *c);
|
void ShowFontsCollectorDialog(agi::Context *c);
|
||||||
bool ShowPlainTextImportDialog();
|
void ShowJumpToDialog(agi::Context *c);
|
||||||
void ShowKanjiTimerDialog(agi::Context *c);
|
void ShowKanjiTimerDialog(agi::Context *c);
|
||||||
bool ShowPasteOverDialog(wxWindow *parent);
|
void ShowLogWindow(agi::Context *c);
|
||||||
void ShowSpellcheckerDialog(agi::Context *c);
|
void ShowPreferences(wxWindow *parent);
|
||||||
|
void ShowPropertiesDialog(agi::Context *c);
|
||||||
|
void ShowSelectLinesDialog(agi::Context *c);
|
||||||
void ShowShiftTimesDialog(agi::Context *c);
|
void ShowShiftTimesDialog(agi::Context *c);
|
||||||
|
void ShowSpellcheckerDialog(agi::Context *c);
|
||||||
void ShowStyleManagerDialog(agi::Context *c);
|
void ShowStyleManagerDialog(agi::Context *c);
|
||||||
void ShowTimingProcessorDialog(agi::Context *c);
|
void ShowTimingProcessorDialog(agi::Context *c);
|
||||||
void ShowJumpToDialog(agi::Context *c);
|
void ShowVideoDetailsDialog(agi::Context *c);
|
||||||
void ShowVideoDetailsDialog(agi::Context *c);
|
|
||||||
void ShowLogWindow(agi::Context *c);
|
|
||||||
void ShowAutomationDialog(agi::Context *c);
|
|
||||||
|
|
|
@ -733,3 +733,7 @@ Preferences::Preferences(wxWindow *parent): wxDialog(parent, -1, _("Preferences"
|
||||||
Bind(wxEVT_BUTTON, std::bind(&HelpButton::OpenPage, "Options"), wxID_HELP);
|
Bind(wxEVT_BUTTON, std::bind(&HelpButton::OpenPage, "Options"), wxID_HELP);
|
||||||
defaultButton->Bind(wxEVT_BUTTON, &Preferences::OnResetDefault, this);
|
defaultButton->Bind(wxEVT_BUTTON, &Preferences::OnResetDefault, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ShowPreferences(wxWindow *parent) {
|
||||||
|
while (Preferences(parent).ShowModal() < 0);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue