From e0d76b60d0d060a91480a76ea85c3a9d77f199a4 Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Tue, 14 Oct 2014 22:02:42 +0200 Subject: [PATCH] Change button label and made it translatable --- cockatrice/src/dlg_settings.cpp | 5 +++-- cockatrice/src/dlg_settings.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cockatrice/src/dlg_settings.cpp b/cockatrice/src/dlg_settings.cpp index 0a9fe61a..ae7e4cc2 100644 --- a/cockatrice/src/dlg_settings.cpp +++ b/cockatrice/src/dlg_settings.cpp @@ -504,7 +504,7 @@ UserInterfaceSettingsPage::UserInterfaceSettingsPage() connect(soundPathClearButton, SIGNAL(clicked()), this, SLOT(soundPathClearButtonClicked())); QPushButton *soundPathButton = new QPushButton("..."); connect(soundPathButton, SIGNAL(clicked()), this, SLOT(soundPathButtonClicked())); - QPushButton *soundTestButton = new QPushButton(QString("Play test sound")); + soundTestButton = new QPushButton(); connect(soundTestButton, SIGNAL(clicked()), soundEngine, SLOT(cuckoo())); QGridLayout *soundGrid = new QGridLayout; @@ -513,7 +513,7 @@ UserInterfaceSettingsPage::UserInterfaceSettingsPage() soundGrid->addWidget(soundPathEdit, 1, 1); soundGrid->addWidget(soundPathClearButton, 1, 2); soundGrid->addWidget(soundPathButton, 1, 3); - soundGrid->addWidget(soundTestButton, 1, 4); + soundGrid->addWidget(soundTestButton, 2, 1); soundGroupBox = new QGroupBox; soundGroupBox->setLayout(soundGrid); @@ -542,6 +542,7 @@ void UserInterfaceSettingsPage::retranslateUi() tapAnimationCheckBox->setText(tr("&Tap/untap animation")); soundEnabledCheckBox->setText(tr("Enable &sounds")); soundPathLabel->setText(tr("Path to sounds directory:")); + soundTestButton->setText(tr("Test system sound engine")); } void UserInterfaceSettingsPage::soundPathClearButtonClicked() diff --git a/cockatrice/src/dlg_settings.h b/cockatrice/src/dlg_settings.h index 0303ceef..de46f1b1 100644 --- a/cockatrice/src/dlg_settings.h +++ b/cockatrice/src/dlg_settings.h @@ -92,6 +92,7 @@ private: QLabel *soundPathLabel; QLineEdit *soundPathEdit; QGroupBox *generalGroupBox, *animationGroupBox, *soundGroupBox; + QPushButton *soundTestButton; public: UserInterfaceSettingsPage(); void retranslateUi();