mirror of
https://github.com/blawar/GLideN64.git
synced 2024-06-25 05:49:34 +00:00
UI: All strings are translatable
This commit is contained in:
parent
716bcee896
commit
8df408c0f8
|
@ -1,5 +1,7 @@
|
|||
#include "AboutDialog.h"
|
||||
#include "ui_AboutDialog.h"
|
||||
#include <QPushButton>
|
||||
#include <QDialogButtonBox>
|
||||
|
||||
AboutDialog::AboutDialog(QWidget *parent, Qt::WindowFlags f) :
|
||||
QDialog(parent, f),
|
||||
|
@ -12,3 +14,8 @@ AboutDialog::~AboutDialog()
|
|||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void AboutDialog::_init()
|
||||
{
|
||||
ui->buttonBox->button(QDialogButtonBox::Close)->setText(tr("Close"));
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ public:
|
|||
~AboutDialog();
|
||||
|
||||
private:
|
||||
void _init();
|
||||
Ui::AboutDialog *ui;
|
||||
};
|
||||
|
||||
|
|
|
@ -283,6 +283,11 @@ void ConfigDialog::_init()
|
|||
ui->fpsCheckBox->setChecked(config.onScreenDisplay.fps != 0);
|
||||
ui->visCheckBox->setChecked(config.onScreenDisplay.vis != 0);
|
||||
ui->percentCheckBox->setChecked(config.onScreenDisplay.percent != 0);
|
||||
|
||||
// Buttons
|
||||
ui->buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK"));
|
||||
ui->buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel"));
|
||||
ui->buttonBox->button(QDialogButtonBox::RestoreDefaults)->setText(tr("Restore Defaults"));
|
||||
}
|
||||
|
||||
void ConfigDialog::_getTranslations(QStringList & _translationFiles) const
|
||||
|
@ -525,11 +530,13 @@ void ConfigDialog::on_aliasingSlider_valueChanged(int value)
|
|||
void ConfigDialog::on_buttonBox_clicked(QAbstractButton *button)
|
||||
{
|
||||
if ((QPushButton *)button == ui->buttonBox->button(QDialogButtonBox::RestoreDefaults)) {
|
||||
QMessageBox msgBox(QMessageBox::Question, "GLideN64",
|
||||
"Do you really want to reset all settings to defaults?",
|
||||
QMessageBox msgBox(QMessageBox::Warning, tr("Restore Defaults"),
|
||||
tr("Are you sure you want to reset all settings to default?"),
|
||||
QMessageBox::RestoreDefaults | QMessageBox::Cancel, this
|
||||
);
|
||||
msgBox.setDefaultButton(QMessageBox::Cancel);
|
||||
msgBox.setButtonText(QMessageBox::RestoreDefaults, tr("Restore Defaults"));
|
||||
msgBox.setButtonText(QMessageBox::Cancel, tr("Cancel"));
|
||||
if (msgBox.exec() == QMessageBox::RestoreDefaults) {
|
||||
config.resetToDefaults();
|
||||
_init();
|
||||
|
@ -564,7 +571,8 @@ void ConfigDialog::on_windowedResolutionComboBox_currentIndexChanged(int index)
|
|||
ui->windowedResolutionComboBox->clearFocus();
|
||||
}
|
||||
|
||||
void ConfigDialog::on_windowedResolutionComboBox_currentTextChanged(QString text) {
|
||||
void ConfigDialog::on_windowedResolutionComboBox_currentTextChanged(QString text)
|
||||
{
|
||||
if (text == tr("Custom"))
|
||||
ui->windowedResolutionComboBox->setCurrentText("");
|
||||
}
|
||||
|
@ -608,7 +616,7 @@ void ConfigDialog::on_fontSizeSpinBox_valueChanged(int value)
|
|||
|
||||
void ConfigDialog::on_tabWidget_currentChanged(int tab)
|
||||
{
|
||||
if (!m_fontsInited && ui->tabWidget->tabText(tab) == "OSD") {
|
||||
if (!m_fontsInited && ui->tabWidget->tabText(tab) == tr("OSD")) {
|
||||
ui->tabWidget->setCursor(QCursor(Qt::WaitCursor));
|
||||
|
||||
QMap<QString, QStringList> internalFontList;
|
||||
|
|
|
@ -3733,9 +3733,6 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::RestoreDefaults</set>
|
||||
</property>
|
||||
|
@ -4152,11 +4149,11 @@
|
|||
</connection>
|
||||
</connections>
|
||||
<buttongroups>
|
||||
<buttongroup name="aspectButtonGroup"/>
|
||||
<buttongroup name="osdButtonGroup"/>
|
||||
<buttongroup name="fixTexrectCoordsButtonGroup"/>
|
||||
<buttongroup name="factorButtonGroup"/>
|
||||
<buttongroup name="screenshotButtonGroup"/>
|
||||
<buttongroup name="bloomBlendModeButtonGroup"/>
|
||||
<buttongroup name="factorButtonGroup"/>
|
||||
<buttongroup name="aspectButtonGroup"/>
|
||||
<buttongroup name="fixTexrectCoordsButtonGroup"/>
|
||||
<buttongroup name="screenshotButtonGroup"/>
|
||||
<buttongroup name="osdButtonGroup"/>
|
||||
</buttongroups>
|
||||
</ui>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include <windows.h>
|
||||
#include <QObject>
|
||||
#include "FullscreenResolutions.h"
|
||||
#include "../Config.h"
|
||||
|
||||
|
@ -29,7 +30,6 @@ void _fillFullscreenRefreshRateList(QStringList & _listRefreshRates, int & _rate
|
|||
_rateIdx = 0;
|
||||
|
||||
int i = 0;
|
||||
char text[128];
|
||||
DEVMODE deviceMode;
|
||||
while (EnumDisplaySettings(NULL, i++, &deviceMode) != 0)
|
||||
{
|
||||
|
@ -46,8 +46,7 @@ void _fillFullscreenRefreshRateList(QStringList & _listRefreshRates, int & _rate
|
|||
(deviceMode.dmPelsHeight == fullscreen.selected.height)) {
|
||||
|
||||
fullscreen.refreshRate[j] = deviceMode.dmDisplayFrequency;
|
||||
sprintf(text, "%i Hz", deviceMode.dmDisplayFrequency);
|
||||
_listRefreshRates.append(text);
|
||||
_listRefreshRates.append(QString::number(deviceMode.dmDisplayFrequency) + QObject::tr(" Hz"));
|
||||
|
||||
if (fullscreen.selected.refreshRate == deviceMode.dmDisplayFrequency)
|
||||
_rateIdx = fullscreen.numRefreshRates;
|
||||
|
|
Loading…
Reference in New Issue
Block a user