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/
|
|
|
|
//
|
|
|
|
// $Id$
|
|
|
|
|
|
|
|
/// @file subtitle.cpp
|
|
|
|
/// @brief subtitle/ commands.
|
|
|
|
/// @ingroup command
|
|
|
|
///
|
|
|
|
|
2011-01-05 19:40:37 +01:00
|
|
|
#include "../config.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
|
|
|
|
|
|
|
#ifndef AGI_PRE
|
2011-01-08 13:10:40 +01:00
|
|
|
#include <wx/filename.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
|
|
|
#include <wx/filedlg.h>
|
|
|
|
#include <wx/choicdlg.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <libaegisub/charset_conv.h>
|
|
|
|
|
|
|
|
#include "command.h"
|
|
|
|
|
2011-01-16 08:15:24 +01:00
|
|
|
#include "../ass_dialogue.h"
|
2011-01-05 19:40:37 +01:00
|
|
|
#include "../ass_file.h"
|
|
|
|
#include "../compat.h"
|
|
|
|
#include "../dialog_attachments.h"
|
|
|
|
#include "../dialog_properties.h"
|
|
|
|
#include "../dialog_search_replace.h"
|
|
|
|
#include "../dialog_spellchecker.h"
|
|
|
|
#include "../frame_main.h"
|
|
|
|
#include "../include/aegisub/context.h"
|
|
|
|
#include "../main.h"
|
|
|
|
#include "../subs_grid.h"
|
|
|
|
#include "../video_context.h"
|
2011-01-18 06:13:26 +01:00
|
|
|
#include "../utils.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
|
|
|
|
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
|
|
|
/// @defgroup cmd-subtitle Subtitle commands.
|
|
|
|
/// @{
|
|
|
|
|
2011-07-15 06:05:22 +02:00
|
|
|
struct validate_nonempty_selection : public Command {
|
2011-07-15 06:05:56 +02:00
|
|
|
CMD_TYPE(COMMAND_VALIDATE)
|
2011-07-15 06:05:22 +02:00
|
|
|
bool Validate(const agi::Context *c) {
|
|
|
|
return !c->selectionController->GetSelectedSet().empty();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
struct validate_nonempty_selection_video_loaded : public Command {
|
2011-07-15 06:05:56 +02:00
|
|
|
CMD_TYPE(COMMAND_VALIDATE)
|
2011-07-15 06:05:22 +02:00
|
|
|
bool Validate(const agi::Context *c) {
|
|
|
|
return c->videoController->IsLoaded() && !c->selectionController->GetSelectedSet().empty();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
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
|
|
|
/// Open the attachment list.
|
2011-01-16 08:15:32 +01:00
|
|
|
struct subtitle_attachment : 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("subtitle/attachment")
|
2011-11-18 06:00:20 +01:00
|
|
|
STR_MENU("A&ttachments...")
|
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("Attachments")
|
|
|
|
STR_HELP("Open the attachment list.")
|
|
|
|
|
|
|
|
void operator()(agi::Context *c) {
|
2011-01-16 08:16:54 +01:00
|
|
|
c->videoController->Stop();
|
2011-01-16 08:15:24 +01:00
|
|
|
DialogAttachments(c->parent, c->ass).ShowModal();
|
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
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/// Find words in subtitles.
|
2011-01-16 08:15:32 +01:00
|
|
|
struct subtitle_find : 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("subtitle/find")
|
2011-10-01 20:35:12 +02:00
|
|
|
STR_MENU("&Find...")
|
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("Find")
|
|
|
|
STR_HELP("Find words in subtitles.")
|
|
|
|
|
|
|
|
void operator()(agi::Context *c) {
|
2011-01-16 08:16:54 +01:00
|
|
|
c->videoController->Stop();
|
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
|
|
|
Search.OpenDialog(false);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/// Find next match of last word.
|
2011-01-16 08:15:32 +01:00
|
|
|
struct subtitle_find_next : 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("subtitle/find/next")
|
2011-11-18 06:00:20 +01:00
|
|
|
STR_MENU("Find &Next")
|
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("Find Next")
|
|
|
|
STR_HELP("Find next match of last word.")
|
|
|
|
|
|
|
|
void operator()(agi::Context *c) {
|
2011-01-16 08:16:54 +01:00
|
|
|
c->videoController->Stop();
|
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
|
|
|
Search.FindNext();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2011-01-16 08:15:24 +01:00
|
|
|
static void insert_subtitle_at_video(agi::Context *c, bool after) {
|
2011-01-16 08:16:54 +01:00
|
|
|
int n = c->subsGrid->GetFirstSelRow();
|
2011-01-16 08:15:24 +01:00
|
|
|
|
|
|
|
// Create line to add
|
|
|
|
AssDialogue *def = new AssDialogue;
|
2011-01-16 08:16:54 +01:00
|
|
|
int video_ms = c->videoController->TimeAtFrame(c->videoController->GetFrameN(), agi::vfr::START);
|
2011-01-16 08:15:24 +01:00
|
|
|
def->Start.SetMS(video_ms);
|
|
|
|
def->End.SetMS(video_ms + OPT_GET("Timing/Default Duration")->GetInt());
|
2011-01-16 08:16:54 +01:00
|
|
|
def->Style = c->subsGrid->GetDialogue(n)->Style;
|
2011-01-16 08:15:24 +01:00
|
|
|
|
|
|
|
// Insert it
|
2011-01-16 08:16:54 +01:00
|
|
|
c->subsGrid->BeginBatch();
|
|
|
|
c->subsGrid->InsertLine(def, n, after);
|
|
|
|
c->subsGrid->SelectRow(n + after);
|
|
|
|
c->subsGrid->SetActiveLine(def);
|
|
|
|
c->subsGrid->EndBatch();
|
2011-01-16 08:15:24 +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
|
|
|
|
|
|
|
/// Inserts a line after current.
|
2011-07-15 06:05:22 +02:00
|
|
|
struct subtitle_insert_after : public validate_nonempty_selection {
|
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("subtitle/insert/after")
|
|
|
|
STR_MENU("&After Current")
|
|
|
|
STR_DISP("After Current")
|
|
|
|
STR_HELP("Inserts a line after current.")
|
|
|
|
|
|
|
|
void operator()(agi::Context *c) {
|
2011-01-16 08:16:54 +01:00
|
|
|
int n = c->subsGrid->GetFirstSelRow();
|
|
|
|
int nrows = c->subsGrid->GetRows();
|
2011-01-16 08:15:24 +01:00
|
|
|
|
|
|
|
// Create line to add
|
|
|
|
AssDialogue *def = new AssDialogue;
|
|
|
|
if (n == nrows-1) {
|
2011-01-16 08:16:54 +01:00
|
|
|
def->Start = c->subsGrid->GetDialogue(n)->End;
|
|
|
|
def->End = c->subsGrid->GetDialogue(n)->End;
|
2011-01-16 08:15:24 +01:00
|
|
|
def->End.SetMS(def->End.GetMS()+OPT_GET("Timing/Default Duration")->GetInt());
|
|
|
|
}
|
|
|
|
else {
|
2011-01-16 08:16:54 +01:00
|
|
|
def->Start = c->subsGrid->GetDialogue(n)->End;
|
|
|
|
def->End = c->subsGrid->GetDialogue(n+1)->Start;
|
2011-01-16 08:15:24 +01:00
|
|
|
}
|
|
|
|
if (def->End.GetMS() < def->Start.GetMS()) def->End.SetMS(def->Start.GetMS()+OPT_GET("Timing/Default Duration")->GetInt());
|
2011-01-16 08:16:54 +01:00
|
|
|
def->Style = c->subsGrid->GetDialogue(n)->Style;
|
2011-01-16 08:15:24 +01:00
|
|
|
|
|
|
|
// Insert it
|
2011-01-16 08:16:54 +01:00
|
|
|
c->subsGrid->BeginBatch();
|
|
|
|
c->subsGrid->InsertLine(def, n, true);
|
|
|
|
c->subsGrid->SelectRow(n + 1);
|
|
|
|
c->subsGrid->SetActiveLine(def);
|
|
|
|
c->subsGrid->EndBatch();
|
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
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
/// Inserts a line after current, starting at video time.
|
2011-07-15 06:05:22 +02:00
|
|
|
struct subtitle_insert_after_videotime : public validate_nonempty_selection_video_loaded {
|
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("subtitle/insert/after/videotime")
|
|
|
|
STR_MENU("After Current, at Video Time")
|
|
|
|
STR_DISP("After Current, at Video Time")
|
|
|
|
STR_HELP("Inserts a line after current, starting at video time.")
|
|
|
|
|
|
|
|
void operator()(agi::Context *c) {
|
2011-01-16 08:15:24 +01:00
|
|
|
insert_subtitle_at_video(c, true);
|
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
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/// Inserts a line before current.
|
2011-07-15 06:05:22 +02:00
|
|
|
struct subtitle_insert_before : public validate_nonempty_selection {
|
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("subtitle/insert/before")
|
|
|
|
STR_MENU("&Before Current")
|
|
|
|
STR_DISP("Before Current")
|
|
|
|
STR_HELP("Inserts a line before current.")
|
|
|
|
|
|
|
|
void operator()(agi::Context *c) {
|
2011-01-16 08:16:54 +01:00
|
|
|
int n = c->subsGrid->GetFirstSelRow();
|
2011-01-16 08:15:24 +01:00
|
|
|
|
|
|
|
// Create line to add
|
|
|
|
AssDialogue *def = new AssDialogue;
|
|
|
|
if (n == 0) {
|
|
|
|
def->Start.SetMS(0);
|
2011-01-16 08:16:54 +01:00
|
|
|
def->End = c->subsGrid->GetDialogue(n)->Start;
|
2011-01-16 08:15:24 +01:00
|
|
|
}
|
2011-01-16 08:16:54 +01:00
|
|
|
else if (c->subsGrid->GetDialogue(n-1)->End.GetMS() > c->subsGrid->GetDialogue(n)->Start.GetMS()) {
|
|
|
|
def->Start.SetMS(c->subsGrid->GetDialogue(n)->Start.GetMS()-OPT_GET("Timing/Default Duration")->GetInt());
|
|
|
|
def->End = c->subsGrid->GetDialogue(n)->Start;
|
2011-01-16 08:15:24 +01:00
|
|
|
}
|
|
|
|
else {
|
2011-01-16 08:16:54 +01:00
|
|
|
def->Start = c->subsGrid->GetDialogue(n-1)->End;
|
|
|
|
def->End = c->subsGrid->GetDialogue(n)->Start;
|
2011-01-16 08:15:24 +01:00
|
|
|
}
|
|
|
|
if (def->End.GetMS() < def->Start.GetMS()) def->End.SetMS(def->Start.GetMS()+OPT_GET("Timing/Default Duration")->GetInt());
|
2011-01-16 08:16:54 +01:00
|
|
|
def->Style = c->subsGrid->GetDialogue(n)->Style;
|
2011-01-16 08:15:24 +01:00
|
|
|
|
|
|
|
// Insert it
|
2011-01-16 08:16:54 +01:00
|
|
|
c->subsGrid->BeginBatch();
|
|
|
|
c->subsGrid->InsertLine(def, n, false);
|
|
|
|
c->subsGrid->SelectRow(n);
|
|
|
|
c->subsGrid->SetActiveLine(def);
|
|
|
|
c->subsGrid->EndBatch();
|
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
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/// Inserts a line before current, starting at video time.
|
2011-07-15 06:05:22 +02:00
|
|
|
struct subtitle_insert_before_videotime : public validate_nonempty_selection_video_loaded {
|
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("subtitle/insert/before/videotime")
|
|
|
|
STR_MENU("Before Current, at Video Time")
|
|
|
|
STR_DISP("Before Current, at Video Time")
|
|
|
|
STR_HELP("Inserts a line before current, starting at video time.")
|
|
|
|
|
|
|
|
void operator()(agi::Context *c) {
|
2011-01-16 08:15:24 +01:00
|
|
|
insert_subtitle_at_video(c, false);
|
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
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/// New subtitles.
|
2011-01-16 08:15:32 +01:00
|
|
|
struct subtitle_new : 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("subtitle/new")
|
|
|
|
STR_MENU("&New Subtitles")
|
|
|
|
STR_DISP("New Subtitles")
|
|
|
|
STR_HELP("New subtitles.")
|
|
|
|
|
|
|
|
void operator()(agi::Context *c) {
|
2011-01-16 08:16:40 +01:00
|
|
|
c->ass->LoadDefault();
|
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
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/// Opens a subtitles file.
|
2011-01-16 08:15:32 +01:00
|
|
|
struct subtitle_open : 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("subtitle/open")
|
2011-10-01 20:35:12 +02:00
|
|
|
STR_MENU("&Open 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("Open Subtitles")
|
|
|
|
STR_HELP("Opens a subtitles file.")
|
|
|
|
|
|
|
|
void operator()(agi::Context *c) {
|
|
|
|
wxString path = lagi_wxString(OPT_GET("Path/Last/Subtitles")->GetString());
|
2011-09-28 21:43:11 +02:00
|
|
|
wxString filename = wxFileSelector(_("Open subtitles file"),path,"","",AssFile::GetWildcardList(0),wxFD_OPEN | wxFD_FILE_MUST_EXIST);
|
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
|
|
|
if (!filename.empty()) {
|
|
|
|
wxGetApp().frame->LoadSubtitles(filename);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/// Opens a subtitles file with a specific charset.
|
2011-01-16 08:15:32 +01:00
|
|
|
struct subtitle_open_charset : 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("subtitle/open/charset")
|
2011-11-18 06:00:20 +01:00
|
|
|
STR_MENU("Open Subtitles with &Charset...")
|
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("Open Subtitles with Charset")
|
|
|
|
STR_HELP("Opens a subtitles file with a specific charset.")
|
|
|
|
|
|
|
|
void operator()(agi::Context *c) {
|
|
|
|
// Initialize charsets
|
|
|
|
wxString path = lagi_wxString(OPT_GET("Path/Last/Subtitles")->GetString());
|
|
|
|
|
|
|
|
// Get options and load
|
2011-09-28 21:43:11 +02:00
|
|
|
wxString filename = wxFileSelector(_("Open subtitles file"),path,"","",AssFile::GetWildcardList(0),wxFD_OPEN | wxFD_FILE_MUST_EXIST);
|
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
|
|
|
if (!filename.empty()) {
|
|
|
|
wxString charset = wxGetSingleChoice(_("Choose charset code:"), _("Charset"), agi::charset::GetEncodingsList<wxArrayString>(), c->parent, -1, -1, true, 250, 200);
|
|
|
|
if (!charset.empty()) {
|
|
|
|
wxGetApp().frame->LoadSubtitles(filename,charset);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/// Opens the subtitles from the current video file.
|
2011-01-16 08:15:32 +01:00
|
|
|
struct subtitle_open_video : 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("subtitle/open/video")
|
|
|
|
STR_MENU("Open Subtitles from &Video")
|
|
|
|
STR_DISP("Open Subtitles from Video")
|
|
|
|
STR_HELP("Opens the subtitles from the current video file.")
|
2011-07-15 06:05:56 +02:00
|
|
|
CMD_TYPE(COMMAND_VALIDATE)
|
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
|
|
|
|
|
|
|
void operator()(agi::Context *c) {
|
2011-12-06 01:17:54 +01:00
|
|
|
wxGetApp().frame->LoadSubtitles(c->videoController->GetVideoName(), "binary");
|
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:22 +02:00
|
|
|
|
|
|
|
bool Validate(const agi::Context *c) {
|
|
|
|
return c->videoController->IsLoaded() && c->videoController->HasSubtitles();
|
|
|
|
}
|
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
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/// Open script properties window.
|
2011-01-16 08:15:32 +01:00
|
|
|
struct subtitle_properties : 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("subtitle/properties")
|
2011-10-01 20:35:12 +02:00
|
|
|
STR_MENU("&Properties...")
|
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("Properties")
|
|
|
|
STR_HELP("Open script properties window.")
|
|
|
|
|
|
|
|
void operator()(agi::Context *c) {
|
2011-01-16 08:16:54 +01:00
|
|
|
c->videoController->Stop();
|
2011-01-20 06:57:38 +01:00
|
|
|
DialogProperties(c).ShowModal();
|
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-01-20 06:57:15 +01:00
|
|
|
static void save_subtitles(agi::Context *c, wxString filename) {
|
|
|
|
if (filename.empty()) {
|
|
|
|
c->videoController->Stop();
|
|
|
|
wxString path = lagi_wxString(OPT_GET("Path/Last/Subtitles")->GetString());
|
|
|
|
wxFileName origPath(c->ass->filename);
|
|
|
|
filename = wxFileSelector(_("Save subtitles file"), path, origPath.GetName() + ".ass", "ass", AssFile::GetWildcardList(1), wxFD_SAVE | wxFD_OVERWRITE_PROMPT, c->parent);
|
2011-01-20 06:57:38 +01:00
|
|
|
if (filename.empty()) return;
|
2011-01-20 06:57:15 +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-01-20 06:57:15 +01:00
|
|
|
try {
|
|
|
|
c->ass->Save(filename, true, true);
|
|
|
|
}
|
|
|
|
catch (const agi::Exception& err) {
|
|
|
|
wxMessageBox(lagi_wxString(err.GetMessage()), "Error", wxOK | wxICON_ERROR, NULL);
|
|
|
|
}
|
2011-09-28 21:43:11 +02:00
|
|
|
catch (const char *err) {
|
2011-01-20 06:57:38 +01:00
|
|
|
wxMessageBox(err, "Error", wxOK | wxICON_ERROR, NULL);
|
2011-01-20 06:57:15 +01:00
|
|
|
}
|
|
|
|
catch (...) {
|
2011-01-20 06:57:38 +01:00
|
|
|
wxMessageBox("Unknown error", "Error", wxOK | wxICON_ERROR, NULL);
|
2011-01-20 06:57:15 +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
|
|
|
|
|
|
|
/// Saves subtitles.
|
2011-01-16 08:15:32 +01:00
|
|
|
struct subtitle_save : 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("subtitle/save")
|
|
|
|
STR_MENU("&Save Subtitles")
|
|
|
|
STR_DISP("Save Subtitles")
|
|
|
|
STR_HELP("Saves subtitles.")
|
2011-11-16 23:43:56 +01:00
|
|
|
CMD_TYPE(COMMAND_VALIDATE)
|
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
|
|
|
|
|
|
|
void operator()(agi::Context *c) {
|
2011-01-20 06:57:15 +01:00
|
|
|
save_subtitles(c, c->ass->CanSave() ? c->ass->filename : "");
|
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-11-16 23:43:56 +01:00
|
|
|
|
|
|
|
bool Validate(const agi::Context *c) {
|
|
|
|
return c->ass->IsModified();
|
|
|
|
}
|
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
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/// Saves subtitles with another name.
|
2011-01-16 08:15:32 +01:00
|
|
|
struct subtitle_save_as : 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("subtitle/save/as")
|
2011-11-18 06:00:20 +01:00
|
|
|
STR_MENU("Save Subtitles &as...")
|
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("Save Subtitles as")
|
|
|
|
STR_HELP("Saves subtitles with another name.")
|
|
|
|
|
|
|
|
void operator()(agi::Context *c) {
|
2011-01-20 06:57:15 +01:00
|
|
|
save_subtitles(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-01-18 06:13:26 +01:00
|
|
|
/// Selects all dialogue lines
|
|
|
|
struct subtitle_select_all : public Command {
|
|
|
|
CMD_NAME("subtitle/select/all")
|
2011-11-18 06:00:20 +01:00
|
|
|
STR_MENU("Select &All")
|
2011-01-18 06:13:26 +01:00
|
|
|
STR_DISP("Select All")
|
|
|
|
STR_HELP("Selects all dialogue lines.")
|
|
|
|
|
|
|
|
void operator()(agi::Context *c) {
|
|
|
|
SelectionController<AssDialogue>::Selection sel;
|
|
|
|
transform(c->ass->Line.begin(), c->ass->Line.end(),
|
|
|
|
inserter(sel, sel.begin()), cast<AssDialogue*>());
|
|
|
|
sel.erase(0);
|
|
|
|
c->selectionController->SetSelectedSet(sel);
|
|
|
|
}
|
|
|
|
};
|
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
|
|
|
|
|
|
|
/// Selects all lines that are currently visible on video frame.
|
2011-01-18 06:13:26 +01:00
|
|
|
struct subtitle_select_visible : 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("subtitle/select/visible")
|
|
|
|
STR_MENU("Select Visible")
|
|
|
|
STR_DISP("Select Visible")
|
|
|
|
STR_HELP("Selects all lines that are currently visible on video frame.")
|
2011-07-15 06:05:56 +02:00
|
|
|
CMD_TYPE(COMMAND_VALIDATE)
|
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
|
|
|
|
|
|
|
void operator()(agi::Context *c) {
|
2011-09-15 07:17:43 +02:00
|
|
|
if (!c->videoController->IsLoaded()) return;
|
2011-01-16 08:16:54 +01:00
|
|
|
c->videoController->Stop();
|
2011-09-15 07:17:43 +02:00
|
|
|
|
|
|
|
SubtitleSelectionController::Selection new_selection;
|
|
|
|
int frame = c->videoController->GetFrameN();
|
|
|
|
|
|
|
|
for (entryIter it = c->ass->Line.begin(); it != c->ass->Line.end(); ++it) {
|
|
|
|
AssDialogue *diag = dynamic_cast<AssDialogue*>(*it);
|
|
|
|
if (diag &&
|
|
|
|
c->videoController->FrameAtTime(diag->Start.GetMS(), agi::vfr::START) <= frame &&
|
|
|
|
c->videoController->FrameAtTime(diag->End.GetMS(), agi::vfr::END) >= frame)
|
|
|
|
{
|
|
|
|
if (new_selection.empty())
|
|
|
|
c->selectionController->SetActiveLine(diag);
|
|
|
|
new_selection.insert(diag);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
c->selectionController->SetSelectedSet(new_selection);
|
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:22 +02:00
|
|
|
|
2011-11-16 23:43:45 +01:00
|
|
|
bool Validate(const agi::Context *c) {
|
2011-07-15 06:05:22 +02:00
|
|
|
return c->videoController->IsLoaded();
|
|
|
|
}
|
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
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/// Open spell checker.
|
2011-01-16 08:15:32 +01:00
|
|
|
struct subtitle_spellcheck : 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("subtitle/spellcheck")
|
2011-11-18 06:00:20 +01:00
|
|
|
STR_MENU("Spell &Checker...")
|
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("Spell Checker")
|
|
|
|
STR_HELP("Open spell checker.")
|
|
|
|
|
|
|
|
void operator()(agi::Context *c) {
|
2011-01-16 08:16:54 +01:00
|
|
|
c->videoController->Stop();
|
2011-01-16 08:16:13 +01:00
|
|
|
new DialogSpellChecker(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-01-16 08:15:32 +01:00
|
|
|
struct subtitle_tags_show : 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("subtitle/tags/show")
|
|
|
|
STR_MENU("XXX: No idea")
|
|
|
|
STR_DISP("XXX: No idea")
|
|
|
|
STR_HELP("XXX: No idea")
|
|
|
|
|
|
|
|
void operator()(agi::Context *c) {
|
|
|
|
//XXX: see grid.cpp:grid_tags_hide()
|
|
|
|
}
|
|
|
|
};
|
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
|
|
|
|
|
|
|
/// @}
|
|
|
|
|
2011-07-15 06:05:01 +02:00
|
|
|
namespace cmd {
|
|
|
|
void init_subtitle() {
|
|
|
|
reg(new subtitle_attachment);
|
|
|
|
reg(new subtitle_find);
|
|
|
|
reg(new subtitle_find_next);
|
|
|
|
reg(new subtitle_insert_after);
|
|
|
|
reg(new subtitle_insert_after_videotime);
|
|
|
|
reg(new subtitle_insert_before);
|
|
|
|
reg(new subtitle_insert_before_videotime);
|
|
|
|
reg(new subtitle_new);
|
|
|
|
reg(new subtitle_open);
|
|
|
|
reg(new subtitle_open_charset);
|
|
|
|
reg(new subtitle_open_video);
|
|
|
|
reg(new subtitle_properties);
|
|
|
|
reg(new subtitle_save);
|
|
|
|
reg(new subtitle_save_as);
|
|
|
|
reg(new subtitle_select_all);
|
|
|
|
reg(new subtitle_select_visible);
|
|
|
|
reg(new subtitle_spellcheck);
|
|
|
|
reg(new subtitle_tags_show);
|
|
|
|
}
|
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
|
|
|
}
|