forked from mia/Aegisub
Kill DialogStyleEditor::OnChooseFont, which has been unused for over four years
Originally committed to SVN as r5729.
This commit is contained in:
parent
7dfaa6427c
commit
557e61722b
2 changed files with 0 additions and 25 deletions
|
@ -448,30 +448,6 @@ void DialogStyleEditor::UpdateWorkStyle() {
|
|||
work->strikeout = BoxStrikeout->IsChecked();
|
||||
}
|
||||
|
||||
void DialogStyleEditor::OnChooseFont (wxCommandEvent &event) {
|
||||
wxFont oldfont (int(work->fontsize), wxFONTFAMILY_DEFAULT, (work->italic?wxFONTSTYLE_ITALIC:wxFONTSTYLE_NORMAL), (work->bold?wxFONTWEIGHT_BOLD:wxFONTWEIGHT_NORMAL), work->underline, work->font, wxFONTENCODING_DEFAULT);
|
||||
wxFont newfont = wxGetFontFromUser(this, oldfont);
|
||||
if (newfont.Ok()) {
|
||||
FontName->SetValue(newfont.GetFaceName());
|
||||
FontSize->SetValue(wxString::Format("%i", newfont.GetPointSize()));
|
||||
BoxBold->SetValue(newfont.GetWeight() == wxFONTWEIGHT_BOLD);
|
||||
BoxItalic->SetValue(newfont.GetStyle() == wxFONTSTYLE_ITALIC);
|
||||
BoxUnderline->SetValue(newfont.GetUnderlined());
|
||||
work->font = newfont.GetFaceName();
|
||||
work->fontsize = newfont.GetPointSize();
|
||||
work->bold = (newfont.GetWeight() == wxFONTWEIGHT_BOLD);
|
||||
work->italic = (newfont.GetStyle() == wxFONTSTYLE_ITALIC);
|
||||
work->underline = newfont.GetUnderlined();
|
||||
UpdateWorkStyle();
|
||||
if (SubsPreview) SubsPreview->SetStyle(*work);
|
||||
|
||||
// Comic sans warning
|
||||
if (newfont.GetFaceName() == "Comic Sans MS") {
|
||||
wxMessageBox(_("You have chosen to use the \"Comic Sans\" font. As the programmer and a typesetter, \nI must urge you to reconsider. Comic Sans is the most abused font in the history\nof computing, so please avoid using it unless it's REALLY suitable. Thanks."), _("Warning"), wxICON_EXCLAMATION | wxOK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// @brief Sets color for one of the four color buttons
|
||||
/// @param n Colour to set
|
||||
void DialogStyleEditor::OnSetColor (int n, wxCommandEvent& evt) {
|
||||
|
|
|
@ -145,7 +145,6 @@ class DialogStyleEditor : public wxDialog {
|
|||
int ControlToAlign (int n);
|
||||
void UpdateWorkStyle ();
|
||||
|
||||
void OnChooseFont (wxCommandEvent &event);
|
||||
void OnChildFocus (wxChildFocusEvent &event);
|
||||
void OnCommandPreviewUpdate (wxCommandEvent &event);
|
||||
|
||||
|
|
Loading…
Reference in a new issue