refactor: SettingsDialog add a reset button for settings, and tooltips for the buttonbox buttons
This commit is contained in:
committed by
Chris Rizzitello
parent
457c31fbaf
commit
58963de10f
@ -84,6 +84,7 @@ void SettingsDialog::initConnections() const
|
||||
|
||||
connect(ui->buttonBox, &QDialogButtonBox::accepted, this, &SettingsDialog::accept);
|
||||
connect(ui->buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
|
||||
connect(ui->buttonBox->button(QDialogButtonBox::Reset), &QPushButton::clicked, this, &SettingsDialog::loadFromConfig);
|
||||
|
||||
connect(ui->groupSecurity, &QGroupBox::toggled, this, &SettingsDialog::updateTlsControlsEnabled);
|
||||
connect(ui->groupService, &QGroupBox::toggled, this, &SettingsDialog::updateControls);
|
||||
@ -187,6 +188,9 @@ void SettingsDialog::updateText()
|
||||
ui->comboLogLevel->setItemData(5, tr("Debug entries"), Qt::ToolTipRole);
|
||||
ui->comboLogLevel->setItemData(6, tr("More debug output"), Qt::ToolTipRole);
|
||||
ui->comboLogLevel->setItemData(7, tr("Verbose debug output"), Qt::ToolTipRole);
|
||||
ui->buttonBox->button(QDialogButtonBox::Save)->setToolTip(tr("Close and save changes"));
|
||||
ui->buttonBox->button(QDialogButtonBox::Cancel)->setToolTip(tr("Close and forget changes"));
|
||||
ui->buttonBox->button(QDialogButtonBox::Reset)->setToolTip(tr("Reset to stored values"));
|
||||
}
|
||||
|
||||
void SettingsDialog::accept()
|
||||
@ -397,6 +401,7 @@ void SettingsDialog::setButtonBoxEnabledButtons() const
|
||||
{
|
||||
const bool modified = isModified();
|
||||
ui->buttonBox->button(QDialogButtonBox::Save)->setEnabled(modified);
|
||||
ui->buttonBox->button(QDialogButtonBox::Reset)->setEnabled(modified);
|
||||
}
|
||||
|
||||
SettingsDialog::~SettingsDialog() = default;
|
||||
|
||||
@ -711,7 +711,7 @@
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::StandardButton::Cancel|QDialogButtonBox::StandardButton::Save</set>
|
||||
<set>QDialogButtonBox::StandardButton::Cancel|QDialogButtonBox::StandardButton::Reset|QDialogButtonBox::StandardButton::Save</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@ -1315,6 +1315,18 @@ Al habilitar esta opción, se deshabilitará la interfaz gráfica de usuario (GU
|
||||
<source>Verbose debug output</source>
|
||||
<translation type="unfinished">Salida de depuración detallada</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Close and save changes</source>
|
||||
<translation type="unfinished">Cerrar y guardar los cambios</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Close and forget changes</source>
|
||||
<translation type="unfinished">Cerrar y olvidar los cambios</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Reset to stored values</source>
|
||||
<translation type="unfinished">Restablecer los valores almacenados</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>TLS Certificate Regenerated</source>
|
||||
<translation type="unfinished">Certificado TLS regenerado</translation>
|
||||
|
||||
@ -1315,6 +1315,18 @@ L'abilitazione di questa impostazione disabiliterà l'interfaccia graf
|
||||
<source>Verbose debug output</source>
|
||||
<translation>Output di debug dettagliato</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Close and save changes</source>
|
||||
<translation type="unfinished">Chiudi e salva le modifiche</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Close and forget changes</source>
|
||||
<translation type="unfinished">Chiudi e dimentica le modifiche</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Reset to stored values</source>
|
||||
<translation type="unfinished">Ripristina i valori memorizzati</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>TLS Certificate Regenerated</source>
|
||||
<translation>Certificato TLS rigenerato</translation>
|
||||
|
||||
@ -1344,6 +1344,18 @@ Enabling this setting will disable the server config GUI.</source>
|
||||
<source>Verbose debug output</source>
|
||||
<translation>詳細なデバッグ出力</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Close and save changes</source>
|
||||
<translation>変更を保存して閉じる</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Close and forget changes</source>
|
||||
<translation>変更を破棄して閉じる</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Reset to stored values</source>
|
||||
<translation>変更前の値にリセットする</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Enable wl-clipboard support</source>
|
||||
<translation>wl-clipboard によるクリップボード対応を有効にする</translation>
|
||||
|
||||
@ -1342,6 +1342,18 @@ Enabling this setting will disable the server config GUI.</source>
|
||||
<source>Verbose debug output</source>
|
||||
<translation>상세 디버그 출력</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Close and save changes</source>
|
||||
<translation type="unfinished">닫기 및 변경 사항 저장</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Close and forget changes</source>
|
||||
<translation type="unfinished">설정을 저장하고 나면 변경 사항은 더 이상 신경 쓸 필요가 없습니다</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Reset to stored values</source>
|
||||
<translation type="unfinished">저장된 값으로 재설정</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Enable wl-clipboard support</source>
|
||||
<translation>wl-clipboard 지원 사용</translation>
|
||||
|
||||
@ -1346,6 +1346,18 @@ Enabling this setting will disable the server config GUI.</source>
|
||||
<source>Verbose debug output</source>
|
||||
<translation>Подробный вывод отладки</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Close and save changes</source>
|
||||
<translation type="unfinished">Закрыть и сохранить изменения</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Close and forget changes</source>
|
||||
<translation type="unfinished">Закройте изменения и забудьте о них</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Reset to stored values</source>
|
||||
<translation type="unfinished">Сбросить до сохраненных значений</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source><html><head/><body><p>Requires the wl-clipboard package</p><p>When using wl-clipboard v2.2.1, there is a focus stealing bug that may make Deskflow harder to use. This has been fixed when using the wl-clipboard master branch, unless your Compositor lacks wlroots-data-control protocol support.</p></body></html></source>
|
||||
<translation><html><head/><body><p>Требуется пакет wl-clipboard. В версии 2.2.1 есть ошибка перехвата фокуса.</p></body></html></translation>
|
||||
|
||||
@ -175,7 +175,7 @@ p, li { white-space: pre-wrap; }
|
||||
</message>
|
||||
<message>
|
||||
<source>Close and forget changes</source>
|
||||
<translation type="unfinished">关闭并忘记更改</translation>
|
||||
<translation>关闭并放弃修改</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Reset to stored values</source>
|
||||
@ -1344,6 +1344,18 @@ Enabling this setting will disable the server config GUI.</source>
|
||||
<source>Verbose debug output</source>
|
||||
<translation>详细调试输出</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Close and save changes</source>
|
||||
<translation type="unfinished">关闭并保存更改</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Close and forget changes</source>
|
||||
<translation>关闭并放弃修改</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Reset to stored values</source>
|
||||
<translation type="unfinished">重置为存储值</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Enable wl-clipboard support</source>
|
||||
<translation>启用 wl-clipboard 支持</translation>
|
||||
|
||||
Reference in New Issue
Block a user