Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
// Copyright (c) 2005-2010, Niels Martin Hansen
|
|
|
|
// Copyright (c) 2005-2010, Rodrigo Braz Monteiro
|
|
|
|
// Copyright (c) 2010, Amar Takhar
|
|
|
|
// 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/
|
|
|
|
|
|
|
|
#include "command.h"
|
|
|
|
|
2011-12-26 23:21:19 +01:00
|
|
|
#include "../compat.h"
|
2012-03-09 01:23:41 +01:00
|
|
|
#include "../dialog_manager.h"
|
2013-01-07 02:50:09 +01:00
|
|
|
#include "../dialog_styling_assistant.h"
|
2011-01-05 19:40:37 +01:00
|
|
|
#include "../dialog_translation.h"
|
2014-05-22 21:07:15 +02:00
|
|
|
#include "../dialogs.h"
|
2013-01-07 02:50:09 +01:00
|
|
|
#include "../include/aegisub/context.h"
|
2013-12-25 22:36:37 +01:00
|
|
|
#include "../libresrc/libresrc.h"
|
2013-01-30 04:35:37 +01:00
|
|
|
#include "../options.h"
|
2013-07-05 01:28:43 +02:00
|
|
|
#include "../resolution_resampler.h"
|
2014-05-22 01:23:28 +02:00
|
|
|
#include "../video_controller.h"
|
Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
|
2013-01-04 16:01:50 +01:00
|
|
|
#include <libaegisub/fs.h>
|
2013-01-30 04:35:37 +01:00
|
|
|
#include <libaegisub/path.h>
|
2014-04-23 22:53:24 +02:00
|
|
|
#include <libaegisub/make_unique.h>
|
2013-01-04 16:01:50 +01:00
|
|
|
|
|
|
|
#include <wx/msgdlg.h>
|
|
|
|
#include <wx/utils.h>
|
|
|
|
|
2011-07-15 06:05:01 +02:00
|
|
|
namespace {
|
|
|
|
using cmd::Command;
|
Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
|
2014-03-13 02:39:07 +01:00
|
|
|
struct tool_assdraw final : public Command {
|
Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
CMD_NAME("tool/assdraw")
|
2013-12-25 22:36:37 +01:00
|
|
|
CMD_ICON(assdraw)
|
Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
STR_MENU("ASSDraw3...")
|
|
|
|
STR_DISP("ASSDraw3")
|
2013-10-25 22:54:20 +02:00
|
|
|
STR_HELP("Launch the ASSDraw3 tool for vector drawing")
|
Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
|
2013-11-21 18:13:36 +01:00
|
|
|
void operator()(agi::Context *) override {
|
2013-01-30 04:35:37 +01:00
|
|
|
wxExecute("\"" + config::path->Decode("?data/ASSDraw3.exe").wstring() + "\"");
|
Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2014-03-13 02:39:07 +01:00
|
|
|
struct tool_export final : public Command {
|
Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
CMD_NAME("tool/export")
|
2013-12-25 22:36:37 +01:00
|
|
|
CMD_ICON(export_menu)
|
2011-11-18 06:00:20 +01:00
|
|
|
STR_MENU("&Export Subtitles...")
|
Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
STR_DISP("Export Subtitles")
|
2013-10-25 22:54:20 +02:00
|
|
|
STR_HELP("Save a copy of subtitles in a different format or with processing applied to it")
|
Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
|
2013-11-21 18:13:36 +01:00
|
|
|
void operator()(agi::Context *c) override {
|
2011-01-16 08:16:54 +01:00
|
|
|
c->videoController->Stop();
|
2014-05-22 21:07:15 +02:00
|
|
|
ShowExportDialog(c);
|
Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2014-03-13 02:39:07 +01:00
|
|
|
struct tool_font_collector final : public Command {
|
Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
CMD_NAME("tool/font_collector")
|
2013-12-25 22:36:37 +01:00
|
|
|
CMD_ICON(font_collector_button)
|
2011-10-01 20:35:12 +02:00
|
|
|
STR_MENU("&Fonts Collector...")
|
Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
STR_DISP("Fonts Collector")
|
2012-02-01 19:47:26 +01:00
|
|
|
STR_HELP("Open fonts collector")
|
Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
|
2013-11-21 18:13:36 +01:00
|
|
|
void operator()(agi::Context *c) override {
|
2014-05-22 21:07:15 +02:00
|
|
|
ShowFontsCollectorDialog(c);
|
Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2014-03-13 02:39:07 +01:00
|
|
|
struct tool_line_select final : public Command {
|
Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
CMD_NAME("tool/line/select")
|
2013-12-25 22:36:37 +01:00
|
|
|
CMD_ICON(select_lines_button)
|
2011-11-18 06:00:20 +01:00
|
|
|
STR_MENU("S&elect Lines...")
|
Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
STR_DISP("Select Lines")
|
2013-10-25 22:54:20 +02:00
|
|
|
STR_HELP("Select lines based on defined criteria")
|
Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
|
2013-11-21 18:13:36 +01:00
|
|
|
void operator()(agi::Context *c) override {
|
2014-05-22 21:07:15 +02:00
|
|
|
ShowSelectLinesDialog(c);
|
Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2014-03-13 02:39:07 +01:00
|
|
|
struct tool_resampleres final : public Command {
|
Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
CMD_NAME("tool/resampleres")
|
2013-12-25 22:36:37 +01:00
|
|
|
CMD_ICON(resample_toolbutton)
|
2011-11-18 06:00:20 +01:00
|
|
|
STR_MENU("&Resample Resolution...")
|
Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
STR_DISP("Resample Resolution")
|
2013-10-25 22:54:20 +02:00
|
|
|
STR_HELP("Resample subtitles to maintain their current appearance at a different script resolution")
|
Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
|
2013-11-21 18:13:36 +01:00
|
|
|
void operator()(agi::Context *c) override {
|
2011-01-16 08:16:54 +01:00
|
|
|
c->videoController->Stop();
|
2012-03-25 06:04:59 +02:00
|
|
|
ResampleSettings settings;
|
2014-05-22 21:07:15 +02:00
|
|
|
if (PromptForResampleSettings(c, settings))
|
2014-03-25 22:49:26 +01:00
|
|
|
ResampleResolution(c->ass.get(), settings);
|
Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2014-03-13 02:39:07 +01:00
|
|
|
struct tool_style_assistant final : public Command {
|
Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
CMD_NAME("tool/style/assistant")
|
2013-12-25 22:36:37 +01:00
|
|
|
CMD_ICON(styling_toolbutton)
|
2011-10-01 20:35:12 +02:00
|
|
|
STR_MENU("St&yling Assistant...")
|
Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
STR_DISP("Styling Assistant")
|
2012-02-01 19:47:26 +01:00
|
|
|
STR_HELP("Open styling assistant")
|
Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
|
2013-11-21 18:13:36 +01:00
|
|
|
void operator()(agi::Context *c) override {
|
2012-03-09 01:23:41 +01:00
|
|
|
c->dialog->Show<DialogStyling>(c);
|
Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2011-07-27 07:36:09 +02:00
|
|
|
struct tool_styling_assistant_validator : public Command {
|
|
|
|
CMD_TYPE(COMMAND_VALIDATE)
|
|
|
|
|
2013-11-21 18:13:36 +01:00
|
|
|
bool Validate(const agi::Context *c) override {
|
2012-03-09 01:23:41 +01:00
|
|
|
return !!c->dialog->Get<DialogStyling>();
|
2011-07-27 07:36:09 +02:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2014-03-13 02:39:07 +01:00
|
|
|
struct tool_styling_assistant_commit final : public tool_styling_assistant_validator {
|
2011-07-27 07:36:09 +02:00
|
|
|
CMD_NAME("tool/styling_assistant/commit")
|
|
|
|
STR_MENU("&Accept changes")
|
|
|
|
STR_DISP("Accept changes")
|
2012-02-01 19:47:26 +01:00
|
|
|
STR_HELP("Commit changes and move to the next line")
|
2011-07-27 07:36:09 +02:00
|
|
|
|
2013-11-21 18:13:36 +01:00
|
|
|
void operator()(agi::Context *c) override {
|
2012-03-09 01:23:41 +01:00
|
|
|
c->dialog->Get<DialogStyling>()->Commit(true);
|
2011-07-27 07:36:09 +02:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2014-03-13 02:39:07 +01:00
|
|
|
struct tool_styling_assistant_preview final : public tool_styling_assistant_validator {
|
2011-07-27 07:36:09 +02:00
|
|
|
CMD_NAME("tool/styling_assistant/preview")
|
|
|
|
STR_MENU("&Preview changes")
|
|
|
|
STR_DISP("Preview changes")
|
2012-02-01 19:47:26 +01:00
|
|
|
STR_HELP("Commit changes and stay on the current line")
|
2011-07-27 07:36:09 +02:00
|
|
|
|
2013-11-21 18:13:36 +01:00
|
|
|
void operator()(agi::Context *c) override {
|
2012-03-09 01:23:41 +01:00
|
|
|
c->dialog->Get<DialogStyling>()->Commit(false);
|
2011-07-27 07:36:09 +02:00
|
|
|
}
|
|
|
|
};
|
Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
|
2014-03-13 02:39:07 +01:00
|
|
|
struct tool_style_manager final : public Command {
|
Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
CMD_NAME("tool/style/manager")
|
2013-12-25 22:36:37 +01:00
|
|
|
CMD_ICON(style_toolbutton)
|
2011-10-01 20:35:12 +02:00
|
|
|
STR_MENU("&Styles Manager...")
|
Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
STR_DISP("Styles Manager")
|
2013-10-25 22:54:20 +02:00
|
|
|
STR_HELP("Open the styles manager")
|
Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
|
2013-11-21 18:13:36 +01:00
|
|
|
void operator()(agi::Context *c) override {
|
2014-05-22 21:07:15 +02:00
|
|
|
ShowStyleManagerDialog(c);
|
Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2014-03-13 02:39:07 +01:00
|
|
|
struct tool_time_kanji final : public Command {
|
Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
CMD_NAME("tool/time/kanji")
|
2013-12-25 22:36:37 +01:00
|
|
|
CMD_ICON(kara_timing_copier)
|
2011-11-18 06:00:20 +01:00
|
|
|
STR_MENU("&Kanji Timer...")
|
Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
STR_DISP("Kanji Timer")
|
2013-10-25 22:54:20 +02:00
|
|
|
STR_HELP("Open the Kanji timer copier")
|
Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
|
2013-11-21 18:13:36 +01:00
|
|
|
void operator()(agi::Context *c) override {
|
2014-05-22 21:07:15 +02:00
|
|
|
ShowKanjiTimerDialog(c);
|
Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2014-03-13 02:39:07 +01:00
|
|
|
struct tool_time_postprocess final : public Command {
|
Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
CMD_NAME("tool/time/postprocess")
|
2013-12-25 22:36:37 +01:00
|
|
|
CMD_ICON(timing_processor_toolbutton)
|
2011-11-18 06:00:20 +01:00
|
|
|
STR_MENU("&Timing Post-Processor...")
|
Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
STR_DISP("Timing Post-Processor")
|
2013-10-25 22:54:20 +02:00
|
|
|
STR_HELP("Post-process the subtitle timing to add lead-ins and lead-outs, snap timing to scene changes, etc.")
|
Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
|
2013-11-21 18:13:36 +01:00
|
|
|
void operator()(agi::Context *c) override {
|
2014-05-22 21:07:15 +02:00
|
|
|
ShowTimingProcessorDialog(c);
|
Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2014-03-13 02:39:07 +01:00
|
|
|
struct tool_translation_assistant final : public Command {
|
Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
CMD_NAME("tool/translation_assistant")
|
2013-12-25 22:36:37 +01:00
|
|
|
CMD_ICON(translation_toolbutton)
|
2011-10-01 20:35:12 +02:00
|
|
|
STR_MENU("&Translation Assistant...")
|
Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
STR_DISP("Translation Assistant")
|
2012-02-01 19:47:26 +01:00
|
|
|
STR_HELP("Open translation assistant")
|
Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
|
2013-11-21 18:13:36 +01:00
|
|
|
void operator()(agi::Context *c) override {
|
2011-01-16 08:16:54 +01:00
|
|
|
c->videoController->Stop();
|
2011-12-26 23:21:19 +01:00
|
|
|
try {
|
2012-03-09 01:23:41 +01:00
|
|
|
c->dialog->ShowModal<DialogTranslation>(c);
|
2011-12-26 23:21:19 +01:00
|
|
|
}
|
2014-06-11 00:12:12 +02:00
|
|
|
catch (DialogTranslation::NothingToTranslate const&) {
|
|
|
|
wxMessageBox(_("There is nothing to translate in the file."));
|
2011-12-26 23:21:19 +01:00
|
|
|
}
|
2011-07-27 07:36:15 +02:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
struct tool_translation_assistant_validator : public Command {
|
|
|
|
CMD_TYPE(COMMAND_VALIDATE)
|
|
|
|
|
2013-11-21 18:13:36 +01:00
|
|
|
bool Validate(const agi::Context *c) override {
|
2012-03-09 01:23:41 +01:00
|
|
|
return !!c->dialog->Get<DialogTranslation>();
|
2011-07-27 07:36:15 +02:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2014-03-13 02:39:07 +01:00
|
|
|
struct tool_translation_assistant_commit final : public tool_translation_assistant_validator {
|
2011-07-27 07:36:15 +02:00
|
|
|
CMD_NAME("tool/translation_assistant/commit")
|
|
|
|
STR_MENU("&Accept changes")
|
|
|
|
STR_DISP("Accept changes")
|
2012-02-01 19:47:26 +01:00
|
|
|
STR_HELP("Commit changes and move to the next line")
|
2011-07-27 07:36:15 +02:00
|
|
|
|
2013-11-21 18:13:36 +01:00
|
|
|
void operator()(agi::Context *c) override {
|
2012-03-09 01:23:41 +01:00
|
|
|
c->dialog->Get<DialogTranslation>()->Commit(true);
|
2011-07-27 07:36:15 +02:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2014-03-13 02:39:07 +01:00
|
|
|
struct tool_translation_assistant_preview final : public tool_translation_assistant_validator {
|
2011-07-27 07:36:15 +02:00
|
|
|
CMD_NAME("tool/translation_assistant/preview")
|
|
|
|
STR_MENU("&Preview changes")
|
|
|
|
STR_DISP("Preview changes")
|
2012-02-01 19:47:26 +01:00
|
|
|
STR_HELP("Commit changes and stay on the current line")
|
2011-07-27 07:36:15 +02:00
|
|
|
|
2013-11-21 18:13:36 +01:00
|
|
|
void operator()(agi::Context *c) override {
|
2012-03-09 01:23:41 +01:00
|
|
|
c->dialog->Get<DialogTranslation>()->Commit(false);
|
2011-07-27 07:36:15 +02:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2014-03-13 02:39:07 +01:00
|
|
|
struct tool_translation_assistant_next final : public tool_translation_assistant_validator {
|
2011-07-27 07:36:15 +02:00
|
|
|
CMD_NAME("tool/translation_assistant/next")
|
2012-01-08 02:05:25 +01:00
|
|
|
STR_MENU("&Next Line")
|
|
|
|
STR_DISP("Next Line")
|
2012-02-01 19:47:26 +01:00
|
|
|
STR_HELP("Move to the next line without committing changes")
|
2011-07-27 07:36:15 +02:00
|
|
|
|
2013-11-21 18:13:36 +01:00
|
|
|
void operator()(agi::Context *c) override {
|
2012-03-09 01:23:41 +01:00
|
|
|
c->dialog->Get<DialogTranslation>()->NextBlock();
|
2011-07-27 07:36:15 +02:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2014-03-13 02:39:07 +01:00
|
|
|
struct tool_translation_assistant_prev final : public tool_translation_assistant_validator {
|
2011-07-27 07:36:15 +02:00
|
|
|
CMD_NAME("tool/translation_assistant/prev")
|
2012-01-08 02:05:25 +01:00
|
|
|
STR_MENU("&Previous Line")
|
|
|
|
STR_DISP("Previous Line")
|
2012-02-01 19:47:26 +01:00
|
|
|
STR_HELP("Move to the previous line without committing changes")
|
2011-07-27 07:36:15 +02:00
|
|
|
|
2013-11-21 18:13:36 +01:00
|
|
|
void operator()(agi::Context *c) override {
|
2012-03-09 01:23:41 +01:00
|
|
|
c->dialog->Get<DialogTranslation>()->PrevBlock();
|
Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
}
|
|
|
|
};
|
2011-07-27 07:36:15 +02:00
|
|
|
|
2014-03-13 02:39:07 +01:00
|
|
|
struct tool_translation_assistant_insert final : public tool_translation_assistant_validator {
|
2011-07-27 07:36:15 +02:00
|
|
|
CMD_NAME("tool/translation_assistant/insert_original")
|
|
|
|
STR_MENU("&Insert Original")
|
|
|
|
STR_DISP("Insert Original")
|
2012-02-01 19:47:26 +01:00
|
|
|
STR_HELP("Insert the untranslated text")
|
2011-07-27 07:36:15 +02:00
|
|
|
|
2013-11-21 18:13:36 +01:00
|
|
|
void operator()(agi::Context *c) override {
|
2012-03-09 01:23:41 +01:00
|
|
|
c->dialog->Get<DialogTranslation>()->InsertOriginal();
|
2011-07-27 07:36:15 +02:00
|
|
|
}
|
|
|
|
};
|
2014-12-29 05:31:48 +01:00
|
|
|
}
|
Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
|
2011-07-15 06:05:01 +02:00
|
|
|
namespace cmd {
|
|
|
|
void init_tool() {
|
2014-04-23 22:53:24 +02:00
|
|
|
reg(agi::make_unique<tool_export>());
|
|
|
|
reg(agi::make_unique<tool_font_collector>());
|
|
|
|
reg(agi::make_unique<tool_line_select>());
|
|
|
|
reg(agi::make_unique<tool_resampleres>());
|
|
|
|
reg(agi::make_unique<tool_style_assistant>());
|
|
|
|
reg(agi::make_unique<tool_styling_assistant_commit>());
|
|
|
|
reg(agi::make_unique<tool_styling_assistant_preview>());
|
|
|
|
reg(agi::make_unique<tool_style_manager>());
|
|
|
|
reg(agi::make_unique<tool_time_kanji>());
|
|
|
|
reg(agi::make_unique<tool_time_postprocess>());
|
|
|
|
reg(agi::make_unique<tool_translation_assistant>());
|
2013-01-04 16:01:50 +01:00
|
|
|
#ifdef _WIN32
|
2013-01-30 04:35:37 +01:00
|
|
|
if (agi::fs::FileExists(config::path->Decode("?data/ASSDraw3.exe")))
|
2014-04-23 22:53:24 +02:00
|
|
|
reg(agi::make_unique<tool_assdraw>());
|
2011-07-16 01:44:03 +02:00
|
|
|
#endif
|
2014-04-23 22:53:24 +02:00
|
|
|
reg(agi::make_unique<tool_translation_assistant_commit>());
|
|
|
|
reg(agi::make_unique<tool_translation_assistant_preview>());
|
|
|
|
reg(agi::make_unique<tool_translation_assistant_next>());
|
|
|
|
reg(agi::make_unique<tool_translation_assistant_prev>());
|
|
|
|
reg(agi::make_unique<tool_translation_assistant_insert>());
|
2011-07-15 06:05:01 +02:00
|
|
|
}
|
Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 14:00:46 +01:00
|
|
|
}
|