From c7fd04a739b6c5f46bf0bd4f4dbcb7d799498f53 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Thu, 11 Oct 2012 18:52:36 -0700 Subject: [PATCH] Rename ASS -> Ass in symbol names Most types and functions used Ass, but a decent number used ASS, so make them consistent. --- aegisub/src/ass_attachment.h | 2 +- aegisub/src/ass_dialogue.cpp | 8 ++++---- aegisub/src/ass_dialogue.h | 14 +++++++------- aegisub/src/ass_entry.h | 4 ++-- aegisub/src/ass_file.cpp | 2 +- aegisub/src/ass_karaoke.cpp | 2 +- aegisub/src/ass_override.cpp | 6 +++--- aegisub/src/ass_override.h | 14 +++++++------- aegisub/src/ass_style.cpp | 10 +++++----- aegisub/src/ass_style.h | 4 ++-- aegisub/src/ass_time.cpp | 2 +- aegisub/src/ass_time.h | 2 +- aegisub/src/audio_display.cpp | 2 +- aegisub/src/auto4_lua_assfile.cpp | 8 ++++---- aegisub/src/base_grid.cpp | 6 +++--- aegisub/src/command/edit.cpp | 12 ++++++------ aegisub/src/dialog_colorpicker.cpp | 20 ++++++++++---------- aegisub/src/dialog_jumpto.cpp | 2 +- aegisub/src/dialog_resample.cpp | 2 +- aegisub/src/dialog_style_editor.cpp | 2 +- aegisub/src/dialog_translation.cpp | 8 ++++---- aegisub/src/export_framerate.cpp | 2 +- aegisub/src/font_file_lister.cpp | 2 +- aegisub/src/mkv_wrap.cpp | 8 ++++---- aegisub/src/spline.cpp | 4 ++-- aegisub/src/spline.h | 4 ++-- aegisub/src/subtitle_format.cpp | 2 +- aegisub/src/subtitle_format_ass.cpp | 12 ++++++------ aegisub/src/subtitle_format_ass.h | 4 ++-- aegisub/src/subtitle_format_ebu3264.cpp | 2 +- aegisub/src/subtitle_format_srt.cpp | 4 ++-- aegisub/src/subtitle_format_ttxt.cpp | 4 ++-- aegisub/src/subtitle_format_txt.cpp | 2 +- aegisub/src/timeedit_ctrl.cpp | 8 ++++---- aegisub/src/video_box.cpp | 2 +- aegisub/src/visual_tool.cpp | 4 ++-- aegisub/src/visual_tool_vector_clip.cpp | 4 ++-- 37 files changed, 100 insertions(+), 100 deletions(-) diff --git a/aegisub/src/ass_attachment.h b/aegisub/src/ass_attachment.h index 0e6f47988..3d9ee4987 100644 --- a/aegisub/src/ass_attachment.h +++ b/aegisub/src/ass_attachment.h @@ -76,7 +76,7 @@ public: wxString GetFileName(bool raw=false) const; const wxString GetEntryData() const; - ASS_EntryType GetType() const { return ENTRY_ATTACHMENT; } + AssEntryType GetType() const { return ENTRY_ATTACHMENT; } AssEntry *Clone() const; AssAttachment(wxString const& name, wxString const& group); diff --git a/aegisub/src/ass_dialogue.cpp b/aegisub/src/ass_dialogue.cpp index b0c6f015e..8d7b0f8bc 100644 --- a/aegisub/src/ass_dialogue.cpp +++ b/aegisub/src/ass_dialogue.cpp @@ -173,8 +173,8 @@ wxString AssDialogue::GetData(bool ssa) const { "%s: %s,%s,%s,%s,%s,%d,%d,%d,%s,%s", Comment ? "Comment" : "Dialogue", ssa ? "Marked=0" : wxString::Format("%01d", Layer), - Start.GetASSFormated(), - End.GetASSFormated(), + Start.GetAssFormated(), + End.GetAssFormated(), s, a, Margin[0], Margin[1], Margin[2], e, @@ -270,7 +270,7 @@ std::vector AssDialogue::ParseTags() const { return Blocks; } -void AssDialogue::ParseASSTags() { +void AssDialogue::ParseAssTags() { ClearBlocks(); Blocks = ParseTags(); } @@ -280,7 +280,7 @@ void AssDialogue::StripTags () { } void AssDialogue::StripTag (wxString tagName) { - ParseASSTags(); + ParseAssTags(); wxString final; // Look for blocks diff --git a/aegisub/src/ass_dialogue.h b/aegisub/src/ass_dialogue.h index 0a1511304..04d14dd84 100644 --- a/aegisub/src/ass_dialogue.h +++ b/aegisub/src/ass_dialogue.h @@ -41,7 +41,7 @@ #include "ass_entry.h" #include "ass_time.h" -enum ASS_BlockType { +enum AssBlockType { BLOCK_BASE, BLOCK_PLAIN, BLOCK_OVERRIDE, @@ -79,13 +79,13 @@ public: AssDialogueBlock(wxString const& text) : text(text) { } virtual ~AssDialogueBlock() { } - virtual ASS_BlockType GetType() const = 0; + virtual AssBlockType GetType() const = 0; virtual wxString GetText() { return text; } }; class AssDialogueBlockPlain : public AssDialogueBlock { public: - ASS_BlockType GetType() const { return BLOCK_PLAIN; } + AssBlockType GetType() const { return BLOCK_PLAIN; } AssDialogueBlockPlain(wxString const& text = wxString()) : AssDialogueBlock(text) { } }; @@ -93,7 +93,7 @@ class AssDialogueBlockDrawing : public AssDialogueBlock { public: int Scale; - ASS_BlockType GetType() const { return BLOCK_DRAWING; } + AssBlockType GetType() const { return BLOCK_DRAWING; } AssDialogueBlockDrawing(wxString const& text, int scale) : AssDialogueBlock(text), Scale(scale) { } void TransformCoords(int trans_x,int trans_y,double mult_x,double mult_y); }; @@ -105,7 +105,7 @@ public: std::vector Tags; - ASS_BlockType GetType() const { return BLOCK_OVERRIDE; } + AssBlockType GetType() const { return BLOCK_OVERRIDE; } wxString GetText(); void ParseTags(); void AddTag(wxString const& tag); @@ -143,7 +143,7 @@ public: /// Raw text data wxString Text; - ASS_EntryType GetType() const { return ENTRY_DIALOGUE; } + AssEntryType GetType() const { return ENTRY_DIALOGUE; } /// @brief Parse raw ASS data into everything else /// @param data ASS line @@ -151,7 +151,7 @@ public: bool Parse(wxString const& data); /// Parse text as ASS to generate block information - void ParseASSTags(); + void ParseAssTags(); /// Parse text as ASS and return block information std::vector ParseTags() const; diff --git a/aegisub/src/ass_entry.h b/aegisub/src/ass_entry.h index e66779e3d..5200996e6 100644 --- a/aegisub/src/ass_entry.h +++ b/aegisub/src/ass_entry.h @@ -47,7 +47,7 @@ class AssDialogue; class AssStyle; class AssAttachment; -enum ASS_EntryType { +enum AssEntryType { ENTRY_BASE, ENTRY_DIALOGUE, ENTRY_STYLE, @@ -89,7 +89,7 @@ public: virtual AssEntry *Clone() const; /// Get this entry's fully-derived type - virtual ASS_EntryType GetType() const { return ENTRY_BASE; } + virtual AssEntryType GetType() const { return ENTRY_BASE; } /// @brief Get this line's raw entry data in ASS format virtual const wxString GetEntryData() const { return data; } diff --git a/aegisub/src/ass_file.cpp b/aegisub/src/ass_file.cpp index d7ef3d5df..fa2190137 100644 --- a/aegisub/src/ass_file.cpp +++ b/aegisub/src/ass_file.cpp @@ -95,7 +95,7 @@ void AssFile::Load(const wxString &_filename, wxString charset, bool addToRecent // Check if the file has at least one style and at least one dialogue line for (entryIter it = temp.Line.begin(); it != temp.Line.end(); ++it) { - ASS_EntryType type = (*it)->GetType(); + AssEntryType type = (*it)->GetType(); if (type == ENTRY_STYLE) found_style = true; if (type == ENTRY_DIALOGUE) found_dialogue = true; if (found_style && found_dialogue) break; diff --git a/aegisub/src/ass_karaoke.cpp b/aegisub/src/ass_karaoke.cpp index 04ccc667e..8ffb89e00 100644 --- a/aegisub/src/ass_karaoke.cpp +++ b/aegisub/src/ass_karaoke.cpp @@ -61,7 +61,7 @@ AssKaraoke::AssKaraoke(AssDialogue *line, bool auto_split, bool normalize) void AssKaraoke::SetLine(AssDialogue *line, bool auto_split, bool normalize) { active_line = line; - line->ParseASSTags(); + line->ParseAssTags(); syls.clear(); Syllable syl; diff --git a/aegisub/src/ass_override.cpp b/aegisub/src/ass_override.cpp index 7e7e0e368..016160af4 100644 --- a/aegisub/src/ass_override.cpp +++ b/aegisub/src/ass_override.cpp @@ -123,17 +123,17 @@ void AssDialogueBlockOverride::ProcessParameters(AssDialogueBlockOverride::Proce } } -AssOverrideParamProto::AssOverrideParamProto(VariableDataType type,int opt,ASS_ParameterClass classi) +AssOverrideParamProto::AssOverrideParamProto(VariableDataType type,int opt,AssParameterClass classi) : optional(opt) , type(type) , classification(classi) { } -void AssOverrideTagProto::AddParam(VariableDataType type, ASS_ParameterClass classi, int opt) { +void AssOverrideTagProto::AddParam(VariableDataType type, AssParameterClass classi, int opt) { params.push_back(AssOverrideParamProto(type, opt, classi)); } -void AssOverrideTagProto::Set(wxString newName, VariableDataType type, ASS_ParameterClass classi, int opt) { +void AssOverrideTagProto::Set(wxString newName, VariableDataType type, AssParameterClass classi, int opt) { name = newName; params.push_back(AssOverrideParamProto(type, opt, classi)); } diff --git a/aegisub/src/ass_override.h b/aegisub/src/ass_override.h index c17c3e5c8..5f23bf7c2 100644 --- a/aegisub/src/ass_override.h +++ b/aegisub/src/ass_override.h @@ -41,7 +41,7 @@ #include "variable_data.h" /// Type of parameter; probably only used by the resample tool -enum ASS_ParameterClass { +enum AssParameterClass { PARCLASS_NORMAL, PARCLASS_ABSOLUTE_SIZE, PARCLASS_ABSOLUTE_POS_X, @@ -58,7 +58,7 @@ enum ASS_ParameterClass { /// indicated number. Note that only arguments not at the end need to be marked /// as optional; this is just to know which parameters to skip when there are /// earlier optional arguments -enum ASS_ParameterOptional { +enum AssParameterOptional { NOT_OPTIONAL = 0xFF, OPTIONAL_1 = 0x01, OPTIONAL_2 = 0x02, @@ -75,7 +75,7 @@ enum ASS_ParameterOptional { class AssOverrideParameter : public VariableData { public: /// Type of parameter - ASS_ParameterClass classification; + AssParameterClass classification; /// Is the parameter's value actually given? bool omitted; @@ -96,9 +96,9 @@ struct AssOverrideParamProto { VariableDataType type; /// Semantic type of this parameter - ASS_ParameterClass classification; + AssParameterClass classification; - AssOverrideParamProto (VariableDataType type, int opt=NOT_OPTIONAL, ASS_ParameterClass classi=PARCLASS_NORMAL); + AssOverrideParamProto (VariableDataType type, int opt=NOT_OPTIONAL, AssParameterClass classi=PARCLASS_NORMAL); }; /// DOCME @@ -115,13 +115,13 @@ struct AssOverrideTagProto { /// @param type Data type of the parameter /// @param classi Semantic type of the parameter /// @param opt Situations in which this parameter is present - void AddParam(VariableDataType type, ASS_ParameterClass classi = PARCLASS_NORMAL, int opt = NOT_OPTIONAL); + void AddParam(VariableDataType type, AssParameterClass classi = PARCLASS_NORMAL, int opt = NOT_OPTIONAL); /// @brief Convenience function for single-argument tags /// @param name Name of the tag, with slash /// @param type Data type of the parameter /// @param classi Semantic type of the parameter /// @param opt Situations in which this parameter is present - void Set(wxString name, VariableDataType type, ASS_ParameterClass classi = PARCLASS_NORMAL, int opt = NOT_OPTIONAL); + void Set(wxString name, VariableDataType type, AssParameterClass classi = PARCLASS_NORMAL, int opt = NOT_OPTIONAL); }; /// DOCME diff --git a/aegisub/src/ass_style.cpp b/aegisub/src/ass_style.cpp index d3f12c8ea..1d05f1cea 100644 --- a/aegisub/src/ass_style.cpp +++ b/aegisub/src/ass_style.cpp @@ -117,7 +117,7 @@ void AssColor::SetWXColor(const wxColor &color) { /// @param stripped /// @param isStyle /// @return -wxString AssColor::GetASSFormatted(bool alpha,bool stripped,bool isStyle) const { +wxString AssColor::GetAssFormatted(bool alpha,bool stripped,bool isStyle) const { wxString work; if (!stripped) work += "&H"; if (alpha) work += wxString::Format("%02X",a); @@ -311,10 +311,10 @@ void AssStyle::UpdateData() { final = wxString::Format("Style: %s,%s,%g,%s,%s,%s,%s,%d,%d,%d,%d,%g,%g,%g,%g,%d,%g,%g,%i,%i,%i,%i,%i", name, font, fontsize, - primary.GetASSFormatted(true,false,true), - secondary.GetASSFormatted(true,false,true), - outline.GetASSFormatted(true,false,true), - shadow.GetASSFormatted(true,false,true), + primary.GetAssFormatted(true,false,true), + secondary.GetAssFormatted(true,false,true), + outline.GetAssFormatted(true,false,true), + shadow.GetAssFormatted(true,false,true), (bold? -1 : 0), (italic ? -1 : 0), (underline?-1:0),(strikeout?-1:0), scalex,scaley,spacing,angle, diff --git a/aegisub/src/ass_style.h b/aegisub/src/ass_style.h index 64360589f..8f1de7d78 100644 --- a/aegisub/src/ass_style.h +++ b/aegisub/src/ass_style.h @@ -61,7 +61,7 @@ struct AssColor { wxColor GetWXColor() const; // Return as a wxColor void SetWXColor(const wxColor &color); // Sets from a wxColor void Parse(wxString const& value); // Parse SSA or ASS-style color - wxString GetASSFormatted(bool alpha,bool stripped=false,bool isStyle=false) const; // Gets color formated in ASS format + wxString GetAssFormatted(bool alpha,bool stripped=false,bool isStyle=false) const; // Gets color formated in ASS format wxString GetSSAFormatted() const; }; @@ -108,7 +108,7 @@ public: AssStyle& operator=(AssStyle const&); wxString GetSSAText() const; - ASS_EntryType GetType() const { return ENTRY_STYLE; } + AssEntryType GetType() const { return ENTRY_STYLE; } AssEntry *Clone() const; /// Convert an ASS alignment to the equivalent SSA alignment diff --git a/aegisub/src/ass_time.cpp b/aegisub/src/ass_time.cpp index 6a2ddb864..e9b98e6be 100644 --- a/aegisub/src/ass_time.cpp +++ b/aegisub/src/ass_time.cpp @@ -79,7 +79,7 @@ AssTime::AssTime(wxString const& text) time = mid(0, time, 10 * 60 * 60 * 1000 - 1); } -wxString AssTime::GetASSFormated(bool msPrecision) const { +wxString AssTime::GetAssFormated(bool msPrecision) const { wxChar ret[] = { '0' + GetTimeHours(), ':', diff --git a/aegisub/src/ass_time.h b/aegisub/src/ass_time.h index 7e6f8c311..688f9364f 100644 --- a/aegisub/src/ass_time.h +++ b/aegisub/src/ass_time.h @@ -66,7 +66,7 @@ public: /// Return the time as a string /// @param ms Use milliseconds precision, for non-ASS formats - wxString GetASSFormated(bool ms=false) const; + wxString GetAssFormated(bool ms=false) const; }; /// @class SmpteFormatter diff --git a/aegisub/src/audio_display.cpp b/aegisub/src/audio_display.cpp index 534cc2d35..567ae44ba 100644 --- a/aegisub/src/audio_display.cpp +++ b/aegisub/src/audio_display.cpp @@ -968,7 +968,7 @@ void AudioDisplay::SetTrackCursor(int new_pos, bool show_time) if (show_time) { AssTime new_label_time = TimeFromAbsoluteX(track_cursor_pos); - track_cursor_label = new_label_time.GetASSFormated(); + track_cursor_label = new_label_time.GetAssFormated(); track_cursor_label_rect.x += new_pos - old_pos; RefreshRect(track_cursor_label_rect, false); } diff --git a/aegisub/src/auto4_lua_assfile.cpp b/aegisub/src/auto4_lua_assfile.cpp index f457ecae3..3d1d582d6 100644 --- a/aegisub/src/auto4_lua_assfile.cpp +++ b/aegisub/src/auto4_lua_assfile.cpp @@ -241,10 +241,10 @@ namespace Automation4 { set_field(L, "fontname", sty->font); set_field(L, "fontsize", sty->fontsize); - set_field(L, "color1", sty->primary.GetASSFormatted(true)); - set_field(L, "color2", sty->secondary.GetASSFormatted(true)); - set_field(L, "color3", sty->outline.GetASSFormatted(true)); - set_field(L, "color4", sty->shadow.GetASSFormatted(true)); + set_field(L, "color1", sty->primary.GetAssFormatted(true)); + set_field(L, "color2", sty->secondary.GetAssFormatted(true)); + set_field(L, "color3", sty->outline.GetAssFormatted(true)); + set_field(L, "color4", sty->shadow.GetAssFormatted(true)); set_field(L, "bold", sty->bold); set_field(L, "italic", sty->italic); diff --git a/aegisub/src/base_grid.cpp b/aegisub/src/base_grid.cpp index 34bcc3a5f..cebbd5392 100644 --- a/aegisub/src/base_grid.cpp +++ b/aegisub/src/base_grid.cpp @@ -597,8 +597,8 @@ void BaseGrid::GetRowStrings(int row, AssDialogue *line, bool *paint_columns, wx if (paint_columns[3]) strings[3] = wxString::Format("%d", context->videoController->FrameAtTime(line->End, agi::vfr::END)); } else { - if (paint_columns[2]) strings[2] = line->Start.GetASSFormated(); - if (paint_columns[3]) strings[3] = line->End.GetASSFormated(); + if (paint_columns[2]) strings[2] = line->Start.GetAssFormated(); + if (paint_columns[3]) strings[3] = line->End.GetAssFormated(); } if (paint_columns[4]) strings[4] = line->Style; if (paint_columns[5]) strings[5] = line->Actor; @@ -833,7 +833,7 @@ void BaseGrid::SetColumnWidths() { int startLen = 0; int endLen = 0; if (!byFrame) - startLen = endLen = dc.GetTextExtent(AssTime().GetASSFormated()).GetWidth(); + startLen = endLen = dc.GetTextExtent(AssTime().GetAssFormated()).GetWidth(); // O(n) widths bool showMargin[3] = { false, false, false }; diff --git a/aegisub/src/command/edit.cpp b/aegisub/src/command/edit.cpp index adf99e0c3..7108b668a 100644 --- a/aegisub/src/command/edit.cpp +++ b/aegisub/src/command/edit.cpp @@ -202,7 +202,7 @@ int block_at_pos(wxString const& text, int pos) { void set_tag(const agi::Context *c, wxString const& tag, wxString const& value, int &sel_start, int &sel_end, bool at_end = false) { AssDialogue * const line = c->selectionController->GetActiveLine(); if (line->Blocks.empty()) - line->ParseASSTags(); + line->ParseAssTags(); int start = at_end ? sel_end : sel_start; int blockn = block_at_pos(line->Text, start); @@ -239,7 +239,7 @@ void set_tag(const agi::Context *c, wxString const& tag, wxString const& value, if (plain || blockn < 0) { line->Text = line->Text.Left(start) + "{" + insert + "}" + line->Text.Mid(start); shift += 2; - line->ParseASSTags(); + line->ParseAssTags(); } else if(ovr) { wxString alt; @@ -296,7 +296,7 @@ void toggle_override_tag(const agi::Context *c, bool (AssStyle::*field), const c AssStyle const* const style = c->ass->GetStyle(line->Style); bool state = style ? style->*field : AssStyle().*field; - line->ParseASSTags(); + line->ParseAssTags(); int sel_start = c->textSelectionController->GetSelectionStart(); int sel_end = c->textSelectionController->GetSelectionEnd(); int blockn = block_at_pos(line->Text, sel_start); @@ -315,7 +315,7 @@ void got_color(const agi::Context *c, const char *tag, int *commit_id, wxColour if (new_color.Ok()) { int sel_start = c->textSelectionController->GetSelectionStart(); int sel_end = c->textSelectionController->GetSelectionEnd(); - set_tag(c, tag, AssColor(new_color).GetASSFormatted(false), sel_start, sel_end); + set_tag(c, tag, AssColor(new_color).GetAssFormatted(false), sel_start, sel_end); commit_text(c, _("set color"), sel_start, sel_end, commit_id); } } @@ -325,7 +325,7 @@ void show_color_picker(const agi::Context *c, AssColor (AssStyle::*field), const AssStyle const* const style = c->ass->GetStyle(line->Style); wxColor color = (style ? style->*field : AssStyle().*field).GetWXColor(); - line->ParseASSTags(); + line->ParseAssTags(); int sel_start = c->textSelectionController->GetSelectionStart(); int sel_end = c->textSelectionController->GetSelectionEnd(); @@ -439,7 +439,7 @@ struct edit_font : public Command { void operator()(agi::Context *c) { AssDialogue *const line = c->selectionController->GetActiveLine(); - line->ParseASSTags(); + line->ParseAssTags(); const int blockn = block_at_pos(line->Text, c->textSelectionController->GetInsertionPoint()); const AssStyle *style = c->ass->GetStyle(line->Style); diff --git a/aegisub/src/dialog_colorpicker.cpp b/aegisub/src/dialog_colorpicker.cpp index ed16d8566..91cf250f5 100644 --- a/aegisub/src/dialog_colorpicker.cpp +++ b/aegisub/src/dialog_colorpicker.cpp @@ -238,7 +238,7 @@ class DialogColorPicker : public wxDialog { /// Update all other controls as a result of modifying an HSV control void UpdateFromHSV(bool dirty = true); /// Update all other controls as a result of modifying the ASS format control - void UpdateFromASS(); + void UpdateFromAss(); /// Update all other controls as a result of modifying the HTML format control void UpdateFromHTML(); @@ -472,7 +472,7 @@ wxString ColorPickerRecent::StoreToString() { wxString res; for (int i = 0; i < rows*cols; i++) { - res << AssColor(colors[i]).GetASSFormatted(false, false, false) << " "; + res << AssColor(colors[i]).GetAssFormatted(false, false, false) << " "; } return res.Trim(true); } @@ -502,7 +502,7 @@ void ColorPickerRecent::OnClick(wxMouseEvent &evt) if (i >= 0 && i < (int)colors.size()) { wxCommandEvent evnt(EVT_RECENT_SELECT, GetId()); - evnt.SetString(AssColor(colors[i]).GetASSFormatted(false, false, false)); + evnt.SetString(AssColor(colors[i]).GetAssFormatted(false, false, false)); AddPendingEvent(evnt); } } @@ -576,7 +576,7 @@ void ColorPickerScreenDropper::OnMouse(wxMouseEvent &evt) wxColour color(pdi.Red(), pdi.Green(), pdi.Blue(), wxALPHA_OPAQUE); wxCommandEvent evnt(EVT_DROPPER_SELECT, GetId()); - evnt.SetString(AssColor(color).GetASSFormatted(false, false, false)); + evnt.SetString(AssColor(color).GetAssFormatted(false, false, false)); AddPendingEvent(evnt); } } @@ -792,7 +792,7 @@ DialogColorPicker::DialogColorPicker(wxWindow *parent, wxColour initial_color, s hsv_input[i]->Bind(wxEVT_COMMAND_SPINCTRL_UPDATED, bind(&DialogColorPicker::UpdateFromHSV, this, true)); hsv_input[i]->Bind(wxEVT_COMMAND_TEXT_UPDATED, bind(&DialogColorPicker::UpdateFromHSV, this, true)); } - ass_input->Bind(wxEVT_COMMAND_TEXT_UPDATED, bind(&DialogColorPicker::UpdateFromASS, this)); + ass_input->Bind(wxEVT_COMMAND_TEXT_UPDATED, bind(&DialogColorPicker::UpdateFromAss, this)); html_input->Bind(wxEVT_COMMAND_TEXT_UPDATED, bind(&DialogColorPicker::UpdateFromHTML, this)); screen_dropper_icon->Bind(wxEVT_MOTION, &DialogColorPicker::OnDropperMouse, this); @@ -901,7 +901,7 @@ void DialogColorPicker::UpdateFromRGB(bool dirty) SetHSL(r, g, b); SetHSV(r, g, b); cur_color = wxColour(r, g, b, wxALPHA_OPAQUE); - ass_input->ChangeValue(AssColor(cur_color).GetASSFormatted(false, false, false)); + ass_input->ChangeValue(AssColor(cur_color).GetAssFormatted(false, false, false)); html_input->ChangeValue(color_to_html(cur_color)); if (dirty) @@ -920,7 +920,7 @@ void DialogColorPicker::UpdateFromHSL(bool dirty) SetRGB(r, g, b); SetHSV(r, g, b); - ass_input->ChangeValue(AssColor(cur_color).GetASSFormatted(false, false, false)); + ass_input->ChangeValue(AssColor(cur_color).GetAssFormatted(false, false, false)); html_input->ChangeValue(color_to_html(cur_color)); if (dirty) @@ -938,7 +938,7 @@ void DialogColorPicker::UpdateFromHSV(bool dirty) hsv_to_rgb(h, s, v, &r, &g, &b); SetRGB(r, g, b); SetHSL(r, g, b); - ass_input->ChangeValue(AssColor(cur_color).GetASSFormatted(false, false, false)); + ass_input->ChangeValue(AssColor(cur_color).GetAssFormatted(false, false, false)); html_input->ChangeValue(color_to_html(cur_color)); if (dirty) @@ -947,7 +947,7 @@ void DialogColorPicker::UpdateFromHSV(bool dirty) } /// @brief Use the value entered in the ASS hex control to update the other controls -void DialogColorPicker::UpdateFromASS() +void DialogColorPicker::UpdateFromAss() { unsigned char r, g, b; AssColor ass; @@ -975,7 +975,7 @@ void DialogColorPicker::UpdateFromHTML() SetRGB(r, g, b); SetHSL(r, g, b); SetHSV(r, g, b); - ass_input->ChangeValue(AssColor(cur_color).GetASSFormatted(false, false, false)); + ass_input->ChangeValue(AssColor(cur_color).GetAssFormatted(false, false, false)); spectrum_dirty = true; UpdateSpectrumDisplay(); diff --git a/aegisub/src/dialog_jumpto.cpp b/aegisub/src/dialog_jumpto.cpp index bbe995610..635eedef7 100644 --- a/aegisub/src/dialog_jumpto.cpp +++ b/aegisub/src/dialog_jumpto.cpp @@ -69,7 +69,7 @@ DialogJumpTo::DialogJumpTo(agi::Context *c) JumpFrame = new wxTextCtrl(this,-1,"",wxDefaultPosition,wxSize(-1,-1),wxTE_PROCESS_ENTER, NumValidator((int)jumpframe)); JumpFrame->SetMaxLength(maxLength.size()); - JumpTime = new TimeEdit(this, -1, c, AssTime(c->videoController->TimeAtFrame(jumpframe)).GetASSFormated(), wxSize(-1,-1)); + JumpTime = new TimeEdit(this, -1, c, AssTime(c->videoController->TimeAtFrame(jumpframe)).GetAssFormated(), wxSize(-1,-1)); wxGridSizer *TimesSizer = new wxGridSizer(2, 5, 5); diff --git a/aegisub/src/dialog_resample.cpp b/aegisub/src/dialog_resample.cpp index 4ce3ecb16..4be62afd0 100644 --- a/aegisub/src/dialog_resample.cpp +++ b/aegisub/src/dialog_resample.cpp @@ -205,7 +205,7 @@ namespace { void resample_line(resample_state *state, AssEntry *line) { AssDialogue *diag = dynamic_cast(line); if (diag && !(diag->Comment && (diag->Effect.StartsWith("template") || diag->Effect.StartsWith("code")))) { - diag->ParseASSTags(); + diag->ParseAssTags(); diag->ProcessParameters(resample_tags, state); for (size_t i = 0; i < diag->Blocks.size(); ++i) { diff --git a/aegisub/src/dialog_style_editor.cpp b/aegisub/src/dialog_style_editor.cpp index d6da9ace6..e1587b24b 100644 --- a/aegisub/src/dialog_style_editor.cpp +++ b/aegisub/src/dialog_style_editor.cpp @@ -100,7 +100,7 @@ class StyleRenamer { found_any = true; } - diag->ParseASSTags(); + diag->ParseAssTags(); diag->ProcessParameters(&StyleRenamer::ProcessTag, this); if (replace) diag->UpdateText(); diff --git a/aegisub/src/dialog_translation.cpp b/aegisub/src/dialog_translation.cpp index 75b62079d..82bea8d1b 100644 --- a/aegisub/src/dialog_translation.cpp +++ b/aegisub/src/dialog_translation.cpp @@ -161,7 +161,7 @@ DialogTranslation::DialogTranslation(agi::Context *c) Bind(wxEVT_KEY_DOWN, &DialogTranslation::OnKeyDown, this); - active_line->ParseASSTags(); + active_line->ParseAssTags(); if (bad_block(active_line->Blocks[0])) { if (!NextBlock()) throw NothingToTranslate(STD_STR(_("There is nothing to translate in the file."))); @@ -177,7 +177,7 @@ void DialogTranslation::OnActiveLineChanged(AssDialogue *new_line) { if (switching_lines) return; active_line = new_line; - active_line->ParseASSTags(); + active_line->ParseAssTags(); cur_block = 0; line_number = count_if(c->ass->Line.begin(), find(c->ass->Line.begin(), c->ass->Line.end(), active_line), cast()) + 1; @@ -207,7 +207,7 @@ bool DialogTranslation::NextBlock() { active_line->ClearBlocks(); active_line = new_line; - active_line->ParseASSTags(); + active_line->ParseAssTags(); cur_block = 0; ++line_number; } @@ -230,7 +230,7 @@ bool DialogTranslation::PrevBlock() { active_line->ClearBlocks(); active_line = new_line; - active_line->ParseASSTags(); + active_line->ParseAssTags(); cur_block = active_line->Blocks.size() - 1; --line_number; } diff --git a/aegisub/src/export_framerate.cpp b/aegisub/src/export_framerate.cpp index b9160bf91..6a3dfc88b 100644 --- a/aegisub/src/export_framerate.cpp +++ b/aegisub/src/export_framerate.cpp @@ -221,7 +221,7 @@ void AssTransformFramerateFilter::TransformFrameRate(AssFile *subs) { newEnd = trunc_cs(ConvertTime(curDialogue->End) + 9); // Process stuff - curDialogue->ParseASSTags(); + curDialogue->ParseAssTags(); curDialogue->ProcessParameters(TransformTimeTags, this); curDialogue->Start = newStart; curDialogue->End = newEnd; diff --git a/aegisub/src/font_file_lister.cpp b/aegisub/src/font_file_lister.cpp index b439adf6e..195ac44b8 100644 --- a/aegisub/src/font_file_lister.cpp +++ b/aegisub/src/font_file_lister.cpp @@ -49,7 +49,7 @@ FontCollector::FontCollector(FontCollectorStatusCallback status_callback, FontFi void FontCollector::ProcessDialogueLine(AssDialogue *line, int index) { if (line->Comment) return; - line->ParseASSTags(); + line->ParseAssTags(); StyleInfo style = styles[line->Style]; StyleInfo initial = style; diff --git a/aegisub/src/mkv_wrap.cpp b/aegisub/src/mkv_wrap.cpp index a82101d70..7bd65e6c0 100644 --- a/aegisub/src/mkv_wrap.cpp +++ b/aegisub/src/mkv_wrap.cpp @@ -117,11 +117,11 @@ static void read_subtitles(agi::ProgressSink *ps, MatroskaFile *file, MkvStdIO * blockString.BeforeFirst(',', &afterOrder).ToLong(&order); afterOrder.BeforeFirst(',', &afterLayer).ToLong(&layer); - subList[order] = wxString::Format("Dialogue: %d,%s,%s,%s", (int)layer, subStart.GetASSFormated(), subEnd.GetASSFormated(), afterLayer); + subList[order] = wxString::Format("Dialogue: %d,%s,%s,%s", (int)layer, subStart.GetAssFormated(), subEnd.GetAssFormated(), afterLayer); } // Process SRT else { - blockString = wxString::Format("Dialogue: 0,%s,%s,%s", subStart.GetASSFormated(), subEnd.GetASSFormated(), blockString); + blockString = wxString::Format("Dialogue: 0,%s,%s,%s", subStart.GetAssFormated(), subEnd.GetAssFormated(), blockString); blockString.Replace("\r\n","\\N"); blockString.Replace("\r","\\N"); blockString.Replace("\n","\\N"); @@ -138,7 +138,7 @@ static void read_subtitles(agi::ProgressSink *ps, MatroskaFile *file, MkvStdIO * int version = ssa; AssAttachment *attach = 0; for (std::map::iterator it = subList.begin(); it != subList.end(); ++it) { - ASSSubtitleFormat::AddLine(target, it->second, &version, &attach); + AssSubtitleFormat::AddLine(target, it->second, &version, &attach); } } @@ -209,7 +209,7 @@ void MatroskaWrapper::GetSubtitles(wxString const& filename, AssFile *target) { AssAttachment *attach = 0; wxStringTokenizer token(privString, "\r\n", wxTOKEN_STRTOK); while (token.HasMoreTokens()) - ASSSubtitleFormat::AddLine(target, token.GetNextToken(), &version, &attach); + AssSubtitleFormat::AddLine(target, token.GetNextToken(), &version, &attach); } // Load default if it's SRT else { diff --git a/aegisub/src/spline.cpp b/aegisub/src/spline.cpp index d7c702c12..4a3d75a1f 100644 --- a/aegisub/src/spline.cpp +++ b/aegisub/src/spline.cpp @@ -67,7 +67,7 @@ void Spline::SetScale(int new_scale) { scale = 1 << (raw_scale - 1); } -wxString Spline::EncodeToASS() const { +wxString Spline::EncodeToAss() const { wxString result; result.reserve(size() * 10); char last = 0; @@ -107,7 +107,7 @@ wxString Spline::EncodeToASS() const { return result; } -void Spline::DecodeFromASS(wxString str) { +void Spline::DecodeFromAss(wxString str) { // Clear current clear(); std::vector stack; diff --git a/aegisub/src/spline.h b/aegisub/src/spline.h index 19bdf9fc1..daeb76865 100644 --- a/aegisub/src/spline.h +++ b/aegisub/src/spline.h @@ -64,10 +64,10 @@ public: Spline(const VisualToolBase &scale); /// Encode to an ASS vector drawing - wxString EncodeToASS() const; + wxString EncodeToAss() const; /// Decode an ASS vector drawing - void DecodeFromASS(wxString str); + void DecodeFromAss(wxString str); /// Set the scale /// @param new_scale Power-of-two to scale coordinates by diff --git a/aegisub/src/subtitle_format.cpp b/aegisub/src/subtitle_format.cpp index 000a76a4c..a2a865144 100644 --- a/aegisub/src/subtitle_format.cpp +++ b/aegisub/src/subtitle_format.cpp @@ -313,7 +313,7 @@ std::list SubtitleFormat::formats; void SubtitleFormat::LoadFormats() { if (formats.empty()) { - new ASSSubtitleFormat; + new AssSubtitleFormat; new Ebu3264SubtitleFormat; new EncoreSubtitleFormat; new MKVSubtitleFormat; diff --git a/aegisub/src/subtitle_format_ass.cpp b/aegisub/src/subtitle_format_ass.cpp index 7b7a46ebf..3f9cd6d63 100644 --- a/aegisub/src/subtitle_format_ass.cpp +++ b/aegisub/src/subtitle_format_ass.cpp @@ -48,26 +48,26 @@ DEFINE_SIMPLE_EXCEPTION(AssParseError, SubtitleFormatParseError, "subtitle_io/parse/ass") -ASSSubtitleFormat::ASSSubtitleFormat() +AssSubtitleFormat::AssSubtitleFormat() : SubtitleFormat("Advanced Substation Alpha") { } -wxArrayString ASSSubtitleFormat::GetReadWildcards() const { +wxArrayString AssSubtitleFormat::GetReadWildcards() const { wxArrayString formats; formats.Add("ass"); formats.Add("ssa"); return formats; } -wxArrayString ASSSubtitleFormat::GetWriteWildcards() const { +wxArrayString AssSubtitleFormat::GetWriteWildcards() const { wxArrayString formats; formats.Add("ass"); formats.Add("ssa"); return formats; } -void ASSSubtitleFormat::ReadFile(AssFile *target, wxString const& filename, wxString const& encoding) const { +void AssSubtitleFormat::ReadFile(AssFile *target, wxString const& filename, wxString const& encoding) const { target->Clear(); TextFileReader file(filename, encoding); @@ -86,7 +86,7 @@ void ASSSubtitleFormat::ReadFile(AssFile *target, wxString const& filename, wxSt } } -void ASSSubtitleFormat::WriteFile(const AssFile *src, wxString const& filename, wxString const& encoding) const { +void AssSubtitleFormat::WriteFile(const AssFile *src, wxString const& filename, wxString const& encoding) const { TextFileWriter file(filename, encoding); bool ssa = filename.Right(4).Lower() == ".ssa"; @@ -102,7 +102,7 @@ void ASSSubtitleFormat::WriteFile(const AssFile *src, wxString const& filename, } } -void ASSSubtitleFormat::AddLine(AssFile *target, wxString data, int *version, AssAttachment **attach) { +void AssSubtitleFormat::AddLine(AssFile *target, wxString data, int *version, AssAttachment **attach) { // Is this line an attachment filename? bool isFilename = data.StartsWith("fontname: ") || data.StartsWith("filename: "); diff --git a/aegisub/src/subtitle_format_ass.h b/aegisub/src/subtitle_format_ass.h index 19959c728..2c4989df5 100644 --- a/aegisub/src/subtitle_format_ass.h +++ b/aegisub/src/subtitle_format_ass.h @@ -43,9 +43,9 @@ class AssAttachment; /// @brief DOCME /// /// DOCME -class ASSSubtitleFormat : public SubtitleFormat { +class AssSubtitleFormat : public SubtitleFormat { public: - ASSSubtitleFormat(); + AssSubtitleFormat(); wxArrayString GetReadWildcards() const; wxArrayString GetWriteWildcards() const; diff --git a/aegisub/src/subtitle_format_ebu3264.cpp b/aegisub/src/subtitle_format_ebu3264.cpp index 8f98f1b8d..0d60481d0 100644 --- a/aegisub/src/subtitle_format_ebu3264.cpp +++ b/aegisub/src/subtitle_format_ebu3264.cpp @@ -268,7 +268,7 @@ namespace // Helper for finding special characters wxRegEx special_char_search("\\\\[nN]| ", wxRE_ADVANCED); - line->ParseASSTags(); + line->ParseAssTags(); text_rows.clear(); text_rows.push_back(EbuTextRow()); diff --git a/aegisub/src/subtitle_format_srt.cpp b/aegisub/src/subtitle_format_srt.cpp index a1c747903..298b05e07 100644 --- a/aegisub/src/subtitle_format_srt.cpp +++ b/aegisub/src/subtitle_format_srt.cpp @@ -215,7 +215,7 @@ public: else if (attr_name == "color") { wxColour wxcl = html_to_color(attr_value); - wxString colorstr = AssColor(wxcl).GetASSFormatted(false, false, false); + wxString colorstr = AssColor(wxcl).GetAssFormatted(false, false, false); new_attribs.color = wxString::Format("{\\c%s}", colorstr); } // remove this attribute to prepare for the next @@ -567,7 +567,7 @@ wxString SRTSubtitleFormat::ConvertTags(AssDialogue *diag) const { tag_states['u'] = false; tag_states['s'] = false; - diag->ParseASSTags(); + diag->ParseAssTags(); for (size_t i = 0; i < diag->Blocks.size(); ++i) { if (AssDialogueBlockOverride* block = dynamic_cast(diag->Blocks[i])) { diff --git a/aegisub/src/subtitle_format_ttxt.cpp b/aegisub/src/subtitle_format_ttxt.cpp index 2ada5ba95..964edb910 100644 --- a/aegisub/src/subtitle_format_ttxt.cpp +++ b/aegisub/src/subtitle_format_ttxt.cpp @@ -246,7 +246,7 @@ void TTXTSubtitleFormat::WriteLine(wxXmlNode *root, AssDialogue *prev, AssDialog // If it doesn't start at the end of previous, add blank if (prev && prev->End != line->Start) { wxXmlNode *node = new wxXmlNode(wxXML_ELEMENT_NODE, "TextSample"); - node->AddAttribute("sampleTime", "0" + prev->End.GetASSFormated(true)); + node->AddAttribute("sampleTime", "0" + prev->End.GetAssFormated(true)); node->AddAttribute("xml:space", "preserve"); root->AddChild(node); node->AddChild(new wxXmlNode(wxXML_TEXT_NODE, "", "")); @@ -254,7 +254,7 @@ void TTXTSubtitleFormat::WriteLine(wxXmlNode *root, AssDialogue *prev, AssDialog // Generate and insert node wxXmlNode *node = new wxXmlNode(wxXML_ELEMENT_NODE, "TextSample"); - node->AddAttribute("sampleTime", "0" + line->Start.GetASSFormated(true)); + node->AddAttribute("sampleTime", "0" + line->Start.GetAssFormated(true)); node->AddAttribute("xml:space", "preserve"); root->AddChild(node); node->AddChild(new wxXmlNode(wxXML_TEXT_NODE, "", line->Text)); diff --git a/aegisub/src/subtitle_format_txt.cpp b/aegisub/src/subtitle_format_txt.cpp index e6f460a3d..e50c9a1ec 100644 --- a/aegisub/src/subtitle_format_txt.cpp +++ b/aegisub/src/subtitle_format_txt.cpp @@ -164,7 +164,7 @@ void TXTSubtitleFormat::WriteFile(const AssFile *src, wxString const& filename, wxString out_text; if (strip_formatting) { - dia->ParseASSTags(); + dia->ParseAssTags(); for (std::vector::iterator block = dia->Blocks.begin(); block != dia->Blocks.end(); ++block) { if ((*block)->GetType() == BLOCK_PLAIN) { out_text += (*block)->GetText(); diff --git a/aegisub/src/timeedit_ctrl.cpp b/aegisub/src/timeedit_ctrl.cpp index 1d6be4054..78d9d894b 100644 --- a/aegisub/src/timeedit_ctrl.cpp +++ b/aegisub/src/timeedit_ctrl.cpp @@ -87,7 +87,7 @@ TimeEdit::TimeEdit(wxWindow* parent, wxWindowID id, agi::Context *c, const wxStr SetValidator(val); // Other stuff - if (!value) SetValue(time.GetASSFormated()); + if (!value) SetValue(time.GetAssFormated()); Bind(wxEVT_COMMAND_MENU_SELECTED, std::tr1::bind(&TimeEdit::CopyTime, this), Time_Edit_Copy); Bind(wxEVT_COMMAND_MENU_SELECTED, std::tr1::bind(&TimeEdit::PasteTime, this), Time_Edit_Paste); @@ -136,7 +136,7 @@ void TimeEdit::UpdateText() { if (byFrame) ChangeValue(wxString::Format("%d", c->videoController->FrameAtTime(time, isEnd ? agi::vfr::END : agi::vfr::START))); else - ChangeValue(time.GetASSFormated()); + ChangeValue(time.GetAssFormated()); } void TimeEdit::OnKeyDown(wxKeyEvent &event) { @@ -197,7 +197,7 @@ void TimeEdit::OnKeyDown(wxKeyEvent &event) { // Overwrite the digit time = text.Left(start) + (char)key + text.Mid(start + 1); - SetValue(time.GetASSFormated()); + SetValue(time.GetAssFormated()); SetInsertionPoint(start + 1); } @@ -246,7 +246,7 @@ void TimeEdit::PasteTime() { wxTheClipboard->Close(); AssTime tempTime(text); - if (tempTime.GetASSFormated() == text) { + if (tempTime.GetAssFormated() == text) { SetTime(tempTime); SetSelection(0, GetValue().size()); diff --git a/aegisub/src/video_box.cpp b/aegisub/src/video_box.cpp index 6963872a8..ea97128b7 100644 --- a/aegisub/src/video_box.cpp +++ b/aegisub/src/video_box.cpp @@ -159,7 +159,7 @@ void VideoBox::UpdateTimeBoxes() { int time = context->videoController->TimeAtFrame(frame, agi::vfr::EXACT); // Set the text box for frame number and time - VideoPosition->SetValue(wxString::Format("%s - %d", AssTime(time).GetASSFormated(true), frame)); + VideoPosition->SetValue(wxString::Format("%s - %d", AssTime(time).GetAssFormated(true), frame)); if (binary_search(context->videoController->GetKeyFrames().begin(), context->videoController->GetKeyFrames().end(), frame)) { // Set the background color to indicate this is a keyframe VideoPosition->SetBackgroundColour(lagi_wxColour(OPT_GET("Colour/Subtitle Grid/Background/Selection")->GetColour())); diff --git a/aegisub/src/visual_tool.cpp b/aegisub/src/visual_tool.cpp index acac21d7c..5b324e1d4 100644 --- a/aegisub/src/visual_tool.cpp +++ b/aegisub/src/visual_tool.cpp @@ -366,7 +366,7 @@ typedef const std::vector * param_vec; // Parse line on creation and unparse at the end of scope struct scoped_tag_parse { AssDialogue *diag; - scoped_tag_parse(AssDialogue *diag) : diag(diag) { diag->ParseASSTags(); } + scoped_tag_parse(AssDialogue *diag) : diag(diag) { diag->ParseAssTags(); } ~scoped_tag_parse() { diag->ClearBlocks(); } }; @@ -572,7 +572,7 @@ void VisualToolBase::SetOverride(AssDialogue* line, wxString const& tag, wxStrin wxString insert = tag + value; // Get block at start - line->ParseASSTags(); + line->ParseAssTags(); AssDialogueBlock *block = line->Blocks.front(); // Get current block as plain or override diff --git a/aegisub/src/visual_tool_vector_clip.cpp b/aegisub/src/visual_tool_vector_clip.cpp index 78a0e53a3..2907a92a9 100644 --- a/aegisub/src/visual_tool_vector_clip.cpp +++ b/aegisub/src/visual_tool_vector_clip.cpp @@ -203,7 +203,7 @@ void VisualToolVectorClip::Save() { wxString value = "("; if (spline.GetScale() != 1) value += wxString::Format("%d,", spline.GetScale()); - value += spline.EncodeToASS() + ")"; + value += spline.EncodeToAss() + ")"; SetOverride(active_line, tag, value); } @@ -398,7 +398,7 @@ void VisualToolVectorClip::DoRefresh() { int scale; vect = GetLineVectorClip(active_line, scale, inverse); spline.SetScale(scale); - spline.DecodeFromASS(vect); + spline.DecodeFromAss(vect); MakeFeatures(); SelectAll();