diff --git a/aegisub/base_grid.cpp b/aegisub/base_grid.cpp index 575ef8630..e0e084670 100644 --- a/aegisub/base_grid.cpp +++ b/aegisub/base_grid.cpp @@ -757,6 +757,7 @@ void BaseGrid::SetColumnWidths() { } // O(n) widths + int styleLen = 0; int actorLen = 0; int effectLen = 0; int maxLayer = 0; @@ -775,6 +776,12 @@ void BaseGrid::SetColumnWidths() { if (fw > actorLen) actorLen = fw; } + // Style + if (!curDiag->Style.IsEmpty()) { + dc.GetTextExtent(curDiag->Style, &fw, &fh, NULL, NULL, &font); + if (fw > styleLen) styleLen = fw; + } + // Effect if (!curDiag->Effect.IsEmpty()) { dc.GetTextExtent(curDiag->Effect, &fw, &fh, NULL, NULL, &font); @@ -803,14 +810,9 @@ void BaseGrid::SetColumnWidths() { endLen = fw + 10; } - // Finish actor/effect - if (actorLen) actorLen += 10; - if (effectLen) effectLen += 10; - // Style length - int styleLen = 0; - AssStyle *curStyle; - if (AssFile::top) { + if (false && AssFile::top) { + AssStyle *curStyle; for (entryIter curIter=AssFile::top->Line.begin();curIter!=AssFile::top->Line.end();curIter++) { curStyle = AssEntry::GetAsStyle(*curIter); if (curStyle) { @@ -819,7 +821,11 @@ void BaseGrid::SetColumnWidths() { } } } - styleLen += 10; + + // Finish actor/effect/style + if (actorLen) actorLen += 10; + if (effectLen) effectLen += 10; + if (styleLen) styleLen += 10; // Set column widths colWidth[0] = labelLen; diff --git a/aegisub/changelog.txt b/aegisub/changelog.txt index 138692a86..de870ad66 100644 --- a/aegisub/changelog.txt +++ b/aegisub/changelog.txt @@ -1,7 +1,7 @@ Aegisub changelog Please visit http://aegisub.net to download latest version -= 1.11 beta - 2006.xx.xx =========================== += 2.00 - 2007.xx.xx =========================== - New Aegisub logo. (AMZ) - Automation 4 has replaced Automation 3, see the help file for more details (jfs) @@ -57,7 +57,8 @@ Please visit http://aegisub.net to download latest version - Actor and Effect fields now show a "ghosted" caption saying their name when they are not focused on and blank. (AMZ) - Aegisub now remembers if it was maximized when it was last quit, and restores its state when opening again. (AMZ) - A few minor tweaks to the Find dialogue. (AMZ) -- Tweaked the behavior of the margin boxes, now they no longer show padding zeroes. (AMZ) +- Tweaked the behavior of the margin boxes, now they no longer show padding zeros. (AMZ) +- Minor fix to the calculation of the grid's "Style" column width. (AMZ) = 1.10 beta - 2006.08.07 =========================== diff --git a/aegisub/dialog_style_editor.cpp b/aegisub/dialog_style_editor.cpp index 3b042743a..ddc2b31e0 100644 --- a/aegisub/dialog_style_editor.cpp +++ b/aegisub/dialog_style_editor.cpp @@ -394,7 +394,8 @@ void DialogStyleEditor::Apply (bool apply,bool close) { // Style name change if (work->name != newStyleName) { // See if user wants to update style name through script - int answer = wxMessageBox(_T("Do you want to change all instances of this style in the script to this new name?"),_T("Update script?"),wxYES_NO | wxCANCEL); + int answer = wxNO; + if (work->name != _T("Default")) answer = wxMessageBox(_T("Do you want to change all instances of this style in the script to this new name?"),_T("Update script?"),wxYES_NO | wxCANCEL); // Cancel if (answer == wxCANCEL) return; diff --git a/aegisub/frame_main.cpp b/aegisub/frame_main.cpp index 6b1d318e7..45616ff65 100644 --- a/aegisub/frame_main.cpp +++ b/aegisub/frame_main.cpp @@ -296,8 +296,8 @@ void FrameMain::InitMenu() { subtitlesMenu->Append(RecombineParent); AppendBitmapMenuItem(subtitlesMenu,MENU_SPLIT_BY_KARAOKE,_("Split Lines (by karaoke)"),_T("Uses karaoke timing to split line into multiple smaller lines"),wxBITMAP(blank_button)); subtitlesMenu->AppendSeparator(); - AppendBitmapMenuItem(subtitlesMenu,MENU_SWAP,_("&Swap Lines"),_T("Swaps the two selected lines"),wxBITMAP(blank_button)); - AppendBitmapMenuItem (subtitlesMenu,Menu_Edit_Select, _("&Select Lines...\t") + Hotkeys.GetText(_T("Select lines")), _("Selects lines based on defined criterea"),wxBITMAP(blank_button)); + AppendBitmapMenuItem(subtitlesMenu,MENU_SWAP,_("Swap Lines"),_T("Swaps the two selected lines"),wxBITMAP(blank_button)); + AppendBitmapMenuItem (subtitlesMenu,Menu_Edit_Select, _("Select Lines...\t") + Hotkeys.GetText(_T("Select lines")), _("Selects lines based on defined criterea"),wxBITMAP(blank_button)); subtitlesMenu->AppendSeparator(); AppendBitmapMenuItem (subtitlesMenu,Menu_Tools_Styles_Manager, _("&Styles Manager..."), _("Open styles manager"), wxBITMAP(style_toolbutton)); AppendBitmapMenuItem (subtitlesMenu,Menu_Tools_Styling, _("St&yling Assistant..."), _("Open styling assistant"), wxBITMAP(styling_toolbutton)); @@ -305,7 +305,7 @@ void FrameMain::InitMenu() { AppendBitmapMenuItem (subtitlesMenu,Menu_Tools_Resample,_("Resample resolution..."), _("Changes resolution and modifies subtitles to conform to change"), wxBITMAP(resample_toolbutton)); AppendBitmapMenuItem (subtitlesMenu,Menu_Tools_Fonts_Collector, _("&Fonts Collector..."),_("Open fonts collector"), wxBITMAP(font_collector_button)); #if USE_HUNSPELL == 1 - AppendBitmapMenuItem (subtitlesMenu,Menu_Tools_SpellCheck, _("Spe&ll checker..."),_("Open spell checker"), wxBITMAP(spellcheck_toolbutton)); + AppendBitmapMenuItem (subtitlesMenu,Menu_Tools_SpellCheck, _("Spe&ll Checker..."),_("Open spell checker"), wxBITMAP(spellcheck_toolbutton)); #endif MenuBar->Append(subtitlesMenu, _("&Subtitles"));