diff --git a/build/Aegisub/Aegisub.vcxproj b/build/Aegisub/Aegisub.vcxproj
index 7d6b05077..d65900d02 100644
--- a/build/Aegisub/Aegisub.vcxproj
+++ b/build/Aegisub/Aegisub.vcxproj
@@ -142,38 +142,15 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/build/Aegisub/Aegisub.vcxproj.filters b/build/Aegisub/Aegisub.vcxproj.filters
index 75c0d3d9f..fac782817 100644
--- a/build/Aegisub/Aegisub.vcxproj.filters
+++ b/build/Aegisub/Aegisub.vcxproj.filters
@@ -219,18 +219,6 @@
Audio
-
- Features\Attachments
-
-
- Video\UI
-
-
- Video\UI
-
-
- Features\Style editor
-
Features\Style editor
@@ -240,18 +228,9 @@
Features\Font collector
-
- Features\Font collector
-
-
- Video\UI
-
Video\UI
-
- Features\Export
-
Features\Export
@@ -267,27 +246,12 @@
Automation\Lua
-
- Automation\UI
-
-
- Features\Paste Over
-
-
- Features\Shift Times
-
Features\Translation Assistant
Features\Colour picker
-
- Features\Colour picker
-
-
- Features\Karaoke copier
-
Video\UI
@@ -324,30 +288,15 @@
Subtitle formats
-
- Features\Spell checker
-
Features\Spell checker
Features\Thesaurus
-
- Features\Resolution resampler
-
-
- Features\Import
-
-
- Features\Timing post-processor
-
Features\Styling assistant
-
- Features\Update checker
-
Video
@@ -510,36 +459,21 @@
Features\About box
-
- Features\About box
-
-
- Features\Conditional select lines
-
Features\Search-replace
-
- Utilities\UI utilities
-
Utilities\UI utilities
Utilities\UI utilities
-
- Utilities\Logging
-
Utilities\Logging
Utilities
-
- Features\File properties
-
ASS
@@ -591,9 +525,6 @@
Controls
-
- Features\Autosave
-
ASS
@@ -618,15 +549,15 @@
Subtitle formats
-
- Features\Resolution resampler
-
Video\Providers
Main UI
+
+ Features
+
@@ -1192,4 +1123,4 @@
-
+
\ No newline at end of file
diff --git a/src/colour_button.cpp b/src/colour_button.cpp
index 85791098d..1e37d81c7 100644
--- a/src/colour_button.cpp
+++ b/src/colour_button.cpp
@@ -17,7 +17,7 @@
#include "colour_button.h"
#include "compat.h"
-#include "dialog_colorpicker.h"
+#include "dialogs.h"
#include
diff --git a/src/command/app.cpp b/src/command/app.cpp
index d867140b7..d6ca8f216 100644
--- a/src/command/app.cpp
+++ b/src/command/app.cpp
@@ -37,11 +37,9 @@
#include
#include "../compat.h"
-#include "../dialog_about.h"
#include "../dialog_detached_video.h"
-#include "../dialog_log.h"
#include "../dialog_manager.h"
-#include "../dialog_version_check.h"
+#include "../dialogs.h"
#include "../frame_main.h"
#include "../include/aegisub/context.h"
#include "../libresrc/libresrc.h"
@@ -62,7 +60,7 @@ struct app_about final : public Command {
STR_HELP("About Aegisub")
void operator()(agi::Context *c) override {
- AboutScreen(c->parent).ShowModal();
+ ShowAboutDialog(c->parent);
}
};
@@ -186,7 +184,7 @@ struct app_log final : public Command {
STR_HELP("View the event log")
void operator()(agi::Context *c) override {
- c->dialog->Show(c);
+ ShowLogWindow(c);
}
};
diff --git a/src/command/automation.cpp b/src/command/automation.cpp
index 83d435bb0..fb8fe282e 100644
--- a/src/command/automation.cpp
+++ b/src/command/automation.cpp
@@ -32,8 +32,7 @@
#include "command.h"
#include "../auto4_base.h"
-#include "../dialog_automation.h"
-#include "../dialog_manager.h"
+#include "../dialogs.h"
#include "../frame_main.h"
#include "../include/aegisub/context.h"
#include "../libresrc/libresrc.h"
@@ -80,7 +79,7 @@ struct open_manager final : public Command {
STR_HELP("Open automation manager")
void operator()(agi::Context *c) override {
- c->dialog->Show(c);
+ ShowAutomationDialog(c);
}
};
diff --git a/src/command/edit.cpp b/src/command/edit.cpp
index 5153921d5..a78fe090d 100644
--- a/src/command/edit.cpp
+++ b/src/command/edit.cpp
@@ -36,9 +36,8 @@
#include "../ass_karaoke.h"
#include "../ass_style.h"
#include "../compat.h"
-#include "../dialog_colorpicker.h"
-#include "../dialog_paste_over.h"
#include "../dialog_search_replace.h"
+#include "../dialogs.h"
#include "../include/aegisub/context.h"
#include "../initial_line_state.h"
#include "../libresrc/libresrc.h"
@@ -138,7 +137,7 @@ void paste_lines(agi::Context *c, bool paste_over, Paster&& paste_line) {
AssDialogue *paste_over(wxWindow *parent, std::vector& pasteOverOptions, AssDialogue *new_line, AssDialogue *old_line) {
if (pasteOverOptions.empty()) {
- if (DialogPasteOver(parent).ShowModal()) return nullptr;
+ if (!ShowPasteOverDialog(parent)) return nullptr;
pasteOverOptions = OPT_GET("Tool/Paste Lines Over/Fields")->GetListBool();
}
diff --git a/src/command/subtitle.cpp b/src/command/subtitle.cpp
index b20cda562..c95590690 100644
--- a/src/command/subtitle.cpp
+++ b/src/command/subtitle.cpp
@@ -34,12 +34,8 @@
#include "../ass_dialogue.h"
#include "../ass_file.h"
#include "../compat.h"
-#include "../dialog_attachments.h"
-#include "../dialog_autosave.h"
-#include "../dialog_manager.h"
-#include "../dialog_properties.h"
#include "../dialog_search_replace.h"
-#include "../dialog_spellchecker.h"
+#include "../dialogs.h"
#include "../include/aegisub/context.h"
#include "../libresrc/libresrc.h"
#include "../options.h"
@@ -85,7 +81,7 @@ struct subtitle_attachment final : public Command {
void operator()(agi::Context *c) override {
c->videoController->Stop();
- DialogAttachments(c->parent, c->ass.get()).ShowModal();
+ ShowAttachmentsDialog(c->parent, c->ass.get());
}
};
@@ -255,9 +251,9 @@ struct subtitle_open_autosave final : public Command {
void operator()(agi::Context *c) override {
if (c->subsController->TryToClose() == wxCANCEL) return;
- DialogAutosave dialog(c->parent);
- if (dialog.ShowModal() == wxID_OK)
- c->project->LoadSubtitles(dialog.ChosenFile());
+ auto file = PickAutosaveFile(c->parent);
+ if (!file.empty())
+ c->project->LoadSubtitles(file);
}
};
@@ -307,7 +303,7 @@ struct subtitle_properties final : public Command {
void operator()(agi::Context *c) override {
c->videoController->Stop();
- DialogProperties(c).ShowModal();
+ ShowPropertiesDialog(c);
}
};
@@ -417,7 +413,7 @@ struct subtitle_spellcheck final : public Command {
void operator()(agi::Context *c) override {
c->videoController->Stop();
- c->dialog->Show(c);
+ ShowSpellcheckerDialog(c);
}
};
}
diff --git a/src/command/time.cpp b/src/command/time.cpp
index 9ebaa16ea..da21265b0 100644
--- a/src/command/time.cpp
+++ b/src/command/time.cpp
@@ -36,8 +36,7 @@
#include "../async_video_provider.h"
#include "../audio_controller.h"
#include "../audio_timing.h"
-#include "../dialog_manager.h"
-#include "../dialog_shift_times.h"
+#include "../dialogs.h"
#include "../include/aegisub/context.h"
#include "../libresrc/libresrc.h"
#include "../options.h"
@@ -156,7 +155,7 @@ struct time_shift final : public Command {
STR_HELP("Shift subtitles by time or frames")
void operator()(agi::Context *c) override {
- c->dialog->Show(c);
+ ShowShiftTimesDialog(c);
}
};
diff --git a/src/command/tool.cpp b/src/command/tool.cpp
index 5be716035..82ce746a3 100644
--- a/src/command/tool.cpp
+++ b/src/command/tool.cpp
@@ -32,16 +32,10 @@
#include "command.h"
#include "../compat.h"
-#include "../dialog_export.h"
-#include "../dialog_fonts_collector.h"
-#include "../dialog_kara_timing_copy.h"
#include "../dialog_manager.h"
-#include "../dialog_resample.h"
-#include "../dialog_selection.h"
-#include "../dialog_style_manager.h"
#include "../dialog_styling_assistant.h"
-#include "../dialog_timing_processor.h"
#include "../dialog_translation.h"
+#include "../dialogs.h"
#include "../include/aegisub/context.h"
#include "../libresrc/libresrc.h"
#include "../options.h"
@@ -79,7 +73,7 @@ struct tool_export final : public Command {
void operator()(agi::Context *c) override {
c->videoController->Stop();
- DialogExport(c).ShowModal();
+ ShowExportDialog(c);
}
};
@@ -91,7 +85,7 @@ struct tool_font_collector final : public Command {
STR_HELP("Open fonts collector")
void operator()(agi::Context *c) override {
- c->dialog->Show(c);
+ ShowFontsCollectorDialog(c);
}
};
@@ -103,7 +97,7 @@ struct tool_line_select final : public Command {
STR_HELP("Select lines based on defined criteria")
void operator()(agi::Context *c) override {
- c->dialog->Show(c);
+ ShowSelectLinesDialog(c);
}
};
@@ -117,7 +111,7 @@ struct tool_resampleres final : public Command {
void operator()(agi::Context *c) override {
c->videoController->Stop();
ResampleSettings settings;
- if (DialogResample(c, settings).ShowModal() == wxID_OK)
+ if (PromptForResampleSettings(c, settings))
ResampleResolution(c->ass.get(), settings);
}
};
@@ -172,7 +166,7 @@ struct tool_style_manager final : public Command {
STR_HELP("Open the styles manager")
void operator()(agi::Context *c) override {
- c->dialog->Show(c);
+ ShowStyleManagerDialog(c);
}
};
@@ -184,7 +178,7 @@ struct tool_time_kanji final : public Command {
STR_HELP("Open the Kanji timer copier")
void operator()(agi::Context *c) override {
- DialogKanjiTimer(c).ShowModal();
+ ShowKanjiTimerDialog(c);
}
};
@@ -196,7 +190,7 @@ struct tool_time_postprocess final : public Command {
STR_HELP("Post-process the subtitle timing to add lead-ins and lead-outs, snap timing to scene changes, etc.")
void operator()(agi::Context *c) override {
- DialogTimingProcessor(c).ShowModal();
+ ShowTimingProcessorDialog(c);
}
};
diff --git a/src/command/video.cpp b/src/command/video.cpp
index 48ff9d8a0..f4823ab57 100644
--- a/src/command/video.cpp
+++ b/src/command/video.cpp
@@ -36,10 +36,8 @@
#include "../async_video_provider.h"
#include "../compat.h"
#include "../dialog_detached_video.h"
-#include "../dialog_dummy_video.h"
-#include "../dialog_jumpto.h"
#include "../dialog_manager.h"
-#include "../dialog_video_details.h"
+#include "../dialogs.h"
#include "../frame_main.h"
#include "../include/aegisub/context.h"
#include "../include/aegisub/subtitles_provider.h"
@@ -270,7 +268,7 @@ struct video_details final : public validator_video_loaded {
void operator()(agi::Context *c) override {
c->videoController->Stop();
- DialogVideoDetails(c).ShowModal();
+ ShowVideoDetailsDialog(c);
}
};
@@ -529,7 +527,7 @@ struct video_jump final : public validator_video_loaded {
void operator()(agi::Context *c) override {
c->videoController->Stop();
- DialogJumpTo(c).ShowModal();
+ ShowJumpToDialog(c);
c->videoSlider->SetFocus();
}
};
@@ -584,7 +582,7 @@ struct video_open_dummy final : public Command {
STR_HELP("Open a placeholder video clip with solid color")
void operator()(agi::Context *c) override {
- std::string fn = DialogDummyVideo::CreateDummyVideo(c->parent);
+ std::string fn = CreateDummyVideo(c->parent);
if (!fn.empty())
c->project->LoadVideo(fn);
}
diff --git a/src/dialog_about.cpp b/src/dialog_about.cpp
index a8cb6dd76..75d51f0cf 100644
--- a/src/dialog_about.cpp
+++ b/src/dialog_about.cpp
@@ -27,12 +27,11 @@
//
// Aegisub Project http://www.aegisub.org/
-/// @file dialog_about.cpp
-/// @brief About-dialogue box
-/// @ingroup configuration_ui
-///
+#include "libresrc/libresrc.h"
+#include "version.h"
#include
+#include
#include
#include
#include
@@ -40,110 +39,114 @@
#include
#include
-#include "dialog_about.h"
-#include "libresrc/libresrc.h"
-#include "version.h"
-
-AboutScreen::AboutScreen(wxWindow *parent)
-: wxDialog (parent, -1, _("About Aegisub"), wxDefaultPosition, wxDefaultSize, wxCAPTION | wxCLOSE_BOX , _("About Aegisub"))
-{
- // Generate library string
- wxString libString = "Aegisub includes portions from the following other projects:\n";
- libString += " wxWidgets - Copyright (c) Julian Smart, Robert Roebling et al;\n";
- libString += " wxStyledTextCtrl - Copyright (c) Robin Dunn, Neil Hodgson;\n";
- libString += " Scintilla - Copyright (c) Neil Hodgson;\n";
- libString += " Boost - Copyright (c) Beman Dawes, David Abrahams et al;\n";
- libString += " UniversalCharDet - Copyright (c) Netscape Communications Corp.;\n";
- libString += " ICU - Copyright (c) International Business Machines Corp.;\n";
- libString += " Lua - Copyright (c) Lua.org, PUC-Rio;\n";
- libString += " LuaJIT - Copyright (c) Mike Pall;\n";
- libString += " luabins - Copyright (c) Alexander Gladysh;\n";
+namespace {
+struct AboutScreen : wxDialog {
+ AboutScreen(wxWindow *parent)
+ : wxDialog(parent, -1, _("About Aegisub"), wxDefaultPosition, wxDefaultSize, wxCAPTION | wxCLOSE_BOX, _("About Aegisub"))
+ {
+ // Generate library string
+ wxString libString = "Aegisub includes portions from the following other projects:\n";
+ libString += " wxWidgets - Copyright (c) Julian Smart, Robert Roebling et al;\n";
+ libString += " wxStyledTextCtrl - Copyright (c) Robin Dunn, Neil Hodgson;\n";
+ libString += " Scintilla - Copyright (c) Neil Hodgson;\n";
+ libString += " Boost - Copyright (c) Beman Dawes, David Abrahams et al;\n";
+ libString += " UniversalCharDet - Copyright (c) Netscape Communications Corp.;\n";
+ libString += " ICU - Copyright (c) International Business Machines Corp.;\n";
+ libString += " Lua - Copyright (c) Lua.org, PUC-Rio;\n";
+ libString += " LuaJIT - Copyright (c) Mike Pall;\n";
+ libString += " luabins - Copyright (c) Alexander Gladysh;\n";
#ifdef WITH_HUNSPELL
- libString += " Hunspell - Copyright (c) Kevin Hendricks;\n";
+ libString += " Hunspell - Copyright (c) Kevin Hendricks;\n";
#endif
#ifdef WITH_PORTAUDIO
- libString += " PortAudio - Copyright (c) Ross Bencina, Phil Burk;\n";
+ libString += " PortAudio - Copyright (c) Ross Bencina, Phil Burk;\n";
#endif
#ifdef WITH_FFMS2
- libString += " FFmpeg - Copyright (c) Fabrice Bellard;\n";
- libString += " FFMS2 - Copyright (c) Fredrik Mellbin;\n";
+ libString += " FFmpeg - Copyright (c) Fabrice Bellard;\n";
+ libString += " FFMS2 - Copyright (c) Fredrik Mellbin;\n";
#endif
#ifdef WITH_AVISYNTH
- libString += " Avisynth 2.5 - Copyright (c) Ben Rudiak-Gould et al;\n";
+ libString += " Avisynth 2.5 - Copyright (c) Ben Rudiak-Gould et al;\n";
#endif
#ifdef WITH_CSRI
- libString += " csri - Copyright (c) David Lamparter;\n";
+ libString += " csri - Copyright (c) David Lamparter;\n";
# ifdef __WINDOWS__
- libString += " vsfilter - Copyright (c) Gabest et al;\n";
+ libString += " vsfilter - Copyright (c) Gabest et al;\n";
# endif
#endif
- libString += " libass - Copyright (c) Evgeniy Stepanov, Grigori Goronzy;\n";
+ libString += " libass - Copyright (c) Evgeniy Stepanov, Grigori Goronzy;\n";
#ifdef __WINDOWS__
- libString += " Matroska Parser - Copyright (c) Mike Matsnev;\n";
+ libString += " Matroska Parser - Copyright (c) Mike Matsnev;\n";
#endif
- libString += " Freetype - Copyright (c) David Turner, Robert Wilhelm, Werner Lemberg;\n";
- libString += " Fontconfig - Copyright (c) Keith Packard et al;\n";
+ libString += " Freetype - Copyright (c) David Turner, Robert Wilhelm, Werner Lemberg;\n";
+ libString += " Fontconfig - Copyright (c) Keith Packard et al;\n";
#ifdef WITH_FFTW3
- libString += " FFTW - Copyright (c) Matteo Frigo, Massachusetts Institute of Technology;\n";
+ libString += " FFTW - Copyright (c) Matteo Frigo, Massachusetts Institute of Technology;\n";
#endif
- wxString translatorCredit = _("Translated into LANGUAGE by PERSON\n");
- if (translatorCredit == "Translated into LANGUAGE by PERSON\n") translatorCredit.Clear();
+ wxString translatorCredit = _("Translated into LANGUAGE by PERSON\n");
+ if (translatorCredit == "Translated into LANGUAGE by PERSON\n") translatorCredit.Clear();
- // Generate about string
- wxString aboutString;
- aboutString += wxString("Aegisub ") + GetAegisubShortVersionString() + ".\n";
- aboutString += "Copyright (c) 2005-2014 Rodrigo Braz Monteiro, Niels Martin Hansen, Thomas Goyne et al.\n\n";
- aboutString += "Programmers:\n";
- aboutString += " Alysson Souza e Silva\n";
- aboutString += " Amar Takhar\n";
- aboutString += " Dan Donovan\n";
- aboutString += " Daniel Moscoviter\n";
- aboutString += " David Conrad\n";
- aboutString += " David Lamparter\n";
- aboutString += " Eric Batalitzky\n";
- aboutString += " Evgeniy Stepanov\n";
- aboutString += " Fredrik Mellbin\n";
- aboutString += " Grigori Goronzy\n";
- aboutString += " Karl Blomster\n";
- aboutString += " Mike Matsnev\n";
- aboutString += " Moritz Brunner\n";
- aboutString += " Muhammad Lukman Nasaruddin\n";
- aboutString += " Niels Martin Hansen\n";
- aboutString += " Patryk Pomykalski\n";
- aboutString += " Ravi Pinjala\n";
- aboutString += " Rodrigo Braz Monteiro\n";
- aboutString += " Simone Cociancich\n";
- aboutString += " Thomas Goyne\n";
- aboutString += "User manual written by:\n";
- aboutString += " Karl Blomster\n";
- aboutString += " Niels Martin Hansen\n";
- aboutString += " Rodrigo Braz Monteiro\n";
- aboutString += "Icons by:\n";
- aboutString += " Philip Cash\n";
- aboutString += "Additional thanks to:\n";
- aboutString += " Mentar\n";
- aboutString += " Sigurd Tao Lyngse\n";
- aboutString += " Everyone in the Aegisub IRC channel\n";
- aboutString += " Everyone who ever reported a bug\n";
- aboutString += translatorCredit;
- aboutString += "\n" + libString;
- aboutString += _("\nSee the help file for full credits.\n");
- aboutString += wxString::Format(_("Built by %s on %s."), GetAegisubBuildCredit(), GetAegisubBuildTime());
+ // Generate about string
+ wxString aboutString;
+ aboutString += wxString("Aegisub ") + GetAegisubShortVersionString() + ".\n";
+ aboutString += "Copyright (c) 2005-2014 Rodrigo Braz Monteiro, Niels Martin Hansen, Thomas Goyne et al.\n\n";
+ aboutString += "Programmers:\n";
+ aboutString += " Alysson Souza e Silva\n";
+ aboutString += " Amar Takhar\n";
+ aboutString += " Dan Donovan\n";
+ aboutString += " Daniel Moscoviter\n";
+ aboutString += " David Conrad\n";
+ aboutString += " David Lamparter\n";
+ aboutString += " Eric Batalitzky\n";
+ aboutString += " Evgeniy Stepanov\n";
+ aboutString += " Fredrik Mellbin\n";
+ aboutString += " Grigori Goronzy\n";
+ aboutString += " Karl Blomster\n";
+ aboutString += " Mike Matsnev\n";
+ aboutString += " Moritz Brunner\n";
+ aboutString += " Muhammad Lukman Nasaruddin\n";
+ aboutString += " Niels Martin Hansen\n";
+ aboutString += " Patryk Pomykalski\n";
+ aboutString += " Ravi Pinjala\n";
+ aboutString += " Rodrigo Braz Monteiro\n";
+ aboutString += " Simone Cociancich\n";
+ aboutString += " Thomas Goyne\n";
+ aboutString += "User manual written by:\n";
+ aboutString += " Karl Blomster\n";
+ aboutString += " Niels Martin Hansen\n";
+ aboutString += " Rodrigo Braz Monteiro\n";
+ aboutString += "Icons by:\n";
+ aboutString += " Philip Cash\n";
+ aboutString += "Additional thanks to:\n";
+ aboutString += " Mentar\n";
+ aboutString += " Sigurd Tao Lyngse\n";
+ aboutString += " Everyone in the Aegisub IRC channel\n";
+ aboutString += " Everyone who ever reported a bug\n";
+ aboutString += translatorCredit;
+ aboutString += "\n" + libString;
+ aboutString += _("\nSee the help file for full credits.\n");
+ aboutString += wxString::Format(_("Built by %s on %s."), GetAegisubBuildCredit(), GetAegisubBuildTime());
- // Replace copyright symbol
- wxChar copySymbol = 0xA9;
- aboutString.Replace("(c)",wxString(copySymbol));
+ // Replace copyright symbol
+ wxChar copySymbol = 0xA9;
+ aboutString.Replace("(c)", wxString(copySymbol));
- wxTextCtrl *textctrl = new wxTextCtrl(this, -1, aboutString, wxDefaultPosition, wxSize(-1,200), wxTE_MULTILINE|wxTE_READONLY|wxBORDER_NONE);
+ wxTextCtrl *textctrl = new wxTextCtrl(this, -1, aboutString, wxDefaultPosition, wxSize(-1, 200), wxTE_MULTILINE | wxTE_READONLY | wxBORDER_NONE);
- wxSizer *MainSizer = new wxBoxSizer(wxVERTICAL);
- MainSizer->Add(new wxStaticBitmap(this, -1, GETIMAGE(splash)), 0, wxCENTER, 0);
- MainSizer->Add(new wxStaticLine(this, wxID_ANY), 0, wxEXPAND|wxALL, 0);
- MainSizer->Add(textctrl, 0, wxEXPAND|wxALL, 0);
- MainSizer->Add(new wxStaticLine(this, wxID_ANY), 0, wxEXPAND|wxALL, 0);
- MainSizer->Add(CreateButtonSizer(wxOK), 0, wxEXPAND|wxALL, 6);
+ wxSizer *MainSizer = new wxBoxSizer(wxVERTICAL);
+ MainSizer->Add(new wxStaticBitmap(this, -1, GETIMAGE(splash)), 0, wxCENTER, 0);
+ MainSizer->Add(new wxStaticLine(this, wxID_ANY), 0, wxEXPAND | wxALL, 0);
+ MainSizer->Add(textctrl, 0, wxEXPAND | wxALL, 0);
+ MainSizer->Add(new wxStaticLine(this, wxID_ANY), 0, wxEXPAND | wxALL, 0);
+ MainSizer->Add(CreateButtonSizer(wxOK), 0, wxEXPAND | wxALL, 6);
- SetSizerAndFit(MainSizer);
- CentreOnParent();
+ SetSizerAndFit(MainSizer);
+ CentreOnParent();
+ }
+};
+}
+
+void ShowAboutDialog(wxWindow *parent) {
+ AboutScreen(parent).ShowModal();
}
diff --git a/src/dialog_about.h b/src/dialog_about.h
deleted file mode 100644
index 751c5161e..000000000
--- a/src/dialog_about.h
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright (c) 2005, Rodrigo Braz Monteiro
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// * Redistributions of source code must retain the above copyright notice,
-// this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following disclaimer in the documentation
-// and/or other materials provided with the distribution.
-// * Neither the name of the Aegisub Group nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Aegisub Project http://www.aegisub.org/
-
-/// @file dialog_about.h
-/// @see dialog_about.cpp
-/// @ingroup configuration_ui
-///
-
-#include
-
-/// @class AboutScreen
-/// @brief About dialogue.
-class AboutScreen: public wxDialog {
-public:
- AboutScreen(wxWindow *parent);
-};
diff --git a/src/dialog_attachments.cpp b/src/dialog_attachments.cpp
index ce7100a55..4e20be6cd 100644
--- a/src/dialog_attachments.cpp
+++ b/src/dialog_attachments.cpp
@@ -27,19 +27,6 @@
//
// Aegisub Project http://www.aegisub.org/
-/// @file dialog_attachments.cpp
-/// @brief Manage files attached to the subtitle file
-/// @ingroup tools_ui
-///
-
-#include "dialog_attachments.h"
-
-#include
-#include
-#include
-#include
-#include
-
#include "ass_attachment.h"
#include "ass_file.h"
#include "compat.h"
@@ -48,6 +35,34 @@
#include "options.h"
#include "utils.h"
+#include
+#include
+#include
+#include
+#include
+#include
+
+namespace {
+class DialogAttachments final : public wxDialog {
+ AssFile *ass;
+
+ wxListView *listView;
+ wxButton *extractButton;
+ wxButton *deleteButton;
+
+ void OnAttachFont(wxCommandEvent &event);
+ void OnAttachGraphics(wxCommandEvent &event);
+ void OnExtract(wxCommandEvent &event);
+ void OnDelete(wxCommandEvent &event);
+ void OnListClick(wxListEvent &event);
+
+ void UpdateList();
+ void AttachFile(wxFileDialog &diag, wxString const& commit_msg);
+
+public:
+ DialogAttachments(wxWindow *parent, AssFile *ass);
+};
+
DialogAttachments::DialogAttachments(wxWindow *parent, AssFile *ass)
: wxDialog(parent, -1, _("Attachment List"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE)
, ass(ass)
@@ -182,3 +197,8 @@ void DialogAttachments::OnListClick(wxListEvent &) {
extractButton->Enable(hasSel);
deleteButton->Enable(hasSel);
}
+}
+
+void ShowAttachmentsDialog(wxWindow *parent, AssFile *file) {
+ DialogAttachments(parent, file).ShowModal();
+}
diff --git a/src/dialog_attachments.h b/src/dialog_attachments.h
deleted file mode 100644
index 4329a9d89..000000000
--- a/src/dialog_attachments.h
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright (c) 2006, Rodrigo Braz Monteiro
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// * Redistributions of source code must retain the above copyright notice,
-// this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following disclaimer in the documentation
-// and/or other materials provided with the distribution.
-// * Neither the name of the Aegisub Group nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Aegisub Project http://www.aegisub.org/
-
-/// @file dialog_attachments.h
-/// @see dialog_attachments.cpp
-/// @ingroup tools_ui
-///
-
-class AssFile;
-class wxFileDialog;
-class wxListView;
-class wxListEvent;
-
-#include
-
-class DialogAttachments final : public wxDialog {
- AssFile *ass;
-
- wxListView *listView;
- wxButton *extractButton;
- wxButton *deleteButton;
-
- void OnAttachFont(wxCommandEvent &event);
- void OnAttachGraphics(wxCommandEvent &event);
- void OnExtract(wxCommandEvent &event);
- void OnDelete(wxCommandEvent &event);
- void OnListClick(wxListEvent &event);
-
- void UpdateList();
- void AttachFile(wxFileDialog &diag, wxString const& commit_msg);
-
-public:
- DialogAttachments(wxWindow *parent, AssFile *ass);
-};
diff --git a/src/dialog_automation.cpp b/src/dialog_automation.cpp
index 2ba546868..52a877954 100644
--- a/src/dialog_automation.cpp
+++ b/src/dialog_automation.cpp
@@ -27,16 +27,10 @@
//
// Aegisub Project http://www.aegisub.org/
-/// @file dialog_automation.cpp
-/// @brief Manage loaded Automation scripts
-/// @ingroup secondary_ui
-///
-
-#include "dialog_automation.h"
-
#include "auto4_base.h"
#include "compat.h"
#include "command/command.h"
+#include "dialog_manager.h"
#include "help_button.h"
#include "include/aegisub/context.h"
#include "libresrc/libresrc.h"
@@ -44,16 +38,71 @@
#include "main.h"
#include "subtitle_format.h"
+#include
+
#include
#include
+#include
#include
+#include
#include
#include
#include
#include
#include
+namespace {
+/// Struct to attach a flag for global/local to scripts
+struct ExtraScriptInfo {
+ Automation4::Script *script;
+ bool is_global;
+};
+
+class DialogAutomation final : public wxDialog {
+ agi::Context *context;
+
+ /// Currently loaded scripts
+ std::vector script_info;
+
+ /// File-local script manager
+ Automation4::ScriptManager *local_manager;
+
+ /// Listener for external changes to the local scripts
+ agi::signal::Connection local_scripts_changed;
+
+ /// Global script manager
+ Automation4::ScriptManager *global_manager;
+
+ /// Listener for external changes to the global scripts
+ agi::signal::Connection global_scripts_changed;
+
+
+ /// List of loaded scripts
+ wxListView *list;
+
+ /// Unload a local script
+ wxButton *remove_button;
+
+ /// Reload a script
+ wxButton *reload_button;
+
+ void RebuildList();
+ void AddScript(Automation4::Script *script, bool is_global);
+ void SetScriptInfo(int i, Automation4::Script *script);
+ void UpdateDisplay();
+
+ void OnAdd(wxCommandEvent &);
+ void OnRemove(wxCommandEvent &);
+ void OnReload(wxCommandEvent &);
+
+ void OnInfo(wxCommandEvent &);
+ void OnReloadAutoload(wxCommandEvent &);
+
+public:
+ DialogAutomation(agi::Context *context);
+};
+
DialogAutomation::DialogAutomation(agi::Context *c)
: wxDialog(c->parent, -1, _("Automation Manager"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
, context(c)
@@ -261,3 +310,8 @@ void DialogAutomation::OnReloadAutoload(wxCommandEvent &)
{
global_manager->Reload();
}
+}
+
+void ShowAutomationDialog(agi::Context *c) {
+ c->dialog->Show(c);
+}
diff --git a/src/dialog_automation.h b/src/dialog_automation.h
deleted file mode 100644
index fc4c5fa61..000000000
--- a/src/dialog_automation.h
+++ /dev/null
@@ -1,101 +0,0 @@
-// Copyright (c) 2005, Niels Martin Hansen
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// * Redistributions of source code must retain the above copyright notice,
-// this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following disclaimer in the documentation
-// and/or other materials provided with the distribution.
-// * Neither the name of the Aegisub Group nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Aegisub Project http://www.aegisub.org/
-
-/// @file dialog_automation.h
-/// @see dialog_automation.cpp
-/// @ingroup secondary_ui
-///
-
-#include
-
-#include
-
-#include
-
-namespace Automation4 {
- class ScriptManager;
- class AutoloadScriptManager;
- class Script;
-}
-
-namespace agi { struct Context; }
-
-class wxButton;
-class wxListEvent;
-class wxListView;
-
-class DialogAutomation final : public wxDialog {
- agi::Context *context;
-
- /// Struct to attach a flag for global/local to scripts
- struct ExtraScriptInfo {
- Automation4::Script *script;
- bool is_global;
- };
-
- /// Currently loaded scripts
- std::vector script_info;
-
- /// File-local script manager
- Automation4::ScriptManager *local_manager;
-
- /// Listener for external changes to the local scripts
- agi::signal::Connection local_scripts_changed;
-
- /// Global script manager
- Automation4::ScriptManager *global_manager;
-
- /// Listener for external changes to the global scripts
- agi::signal::Connection global_scripts_changed;
-
-
- /// List of loaded scripts
- wxListView *list;
-
- /// Unload a local script
- wxButton *remove_button;
-
- /// Reload a script
- wxButton *reload_button;
-
- void RebuildList();
- void AddScript(Automation4::Script *script, bool is_global);
- void SetScriptInfo(int i, Automation4::Script *script);
- void UpdateDisplay();
-
- void OnAdd(wxCommandEvent &);
- void OnRemove(wxCommandEvent &);
- void OnReload(wxCommandEvent &);
-
- void OnInfo(wxCommandEvent &);
- void OnReloadAutoload(wxCommandEvent &);
-
-public:
- DialogAutomation(agi::Context *context);
-};
diff --git a/src/dialog_autosave.cpp b/src/dialog_autosave.cpp
index 25df63304..5c015aebb 100644
--- a/src/dialog_autosave.cpp
+++ b/src/dialog_autosave.cpp
@@ -14,24 +14,51 @@
//
// Aegisub Project http://www.aegisub.org/
-#include "dialog_autosave.h"
-
#include "compat.h"
#include "libresrc/libresrc.h"
#include "options.h"
#include
+#include
#include
-
#include