feat: Add a setting to allow the version to be shown in the windows title
fixes: #8538 replaces: #9351
This commit is contained in:
committed by
Chris Rizzitello
parent
281b3b8d07
commit
c63fd21c8e
@ -104,6 +104,7 @@ This section contains options used by the GUI it will begin with `[gui]`
|
||||
| showGenericClientFailureDialog | `true` or `false` | When `true` client connection errors will not show popup error messages [default: true] |
|
||||
| shownFirstConnectedMessage | `true` or `false` | When `true` GUI has shown the user the message for connecting the first time [default: false] |
|
||||
| shownServerFirstStartMessage | `true` or `false` | When `true` GUI has shown the user the Deskflow server is now running message [default: false] |
|
||||
| shownVerionInTitle | `true` or `false` | When `true` GUI will include the version in the window title [default: false] |
|
||||
| startCoreWithGui | `true` or `false` | When true the Core will be started with the GUI. It is set to the Core's state on exit. |
|
||||
| updateCheckUrl | URL | The URL to use when checking for a new version number, it should return a version [default: https://api.deskflow.org/version]|
|
||||
|
||||
|
||||
@ -75,6 +75,7 @@ public:
|
||||
inline static const auto ShowGenericClientFailureDialog = QStringLiteral("gui/showGenericClientFailureDialog");
|
||||
inline static const auto ShownFirstConnectedMessage = QStringLiteral("gui/shownFirstConnectedMessage");
|
||||
inline static const auto ShownServerFirstStartMessage = QStringLiteral("gui/shownServerFirstStartMessage");
|
||||
inline static const auto ShowVersionInTitle = QStringLiteral("gui/showVersionInTitle");
|
||||
};
|
||||
struct Log
|
||||
{
|
||||
@ -215,6 +216,7 @@ private:
|
||||
, Settings::Gui::ShowGenericClientFailureDialog
|
||||
, Settings::Gui::ShownFirstConnectedMessage
|
||||
, Settings::Gui::ShownServerFirstStartMessage
|
||||
, Settings::Gui::ShowVersionInTitle
|
||||
, Settings::Security::Certificate
|
||||
, Settings::Security::CheckPeers
|
||||
, Settings::Security::KeySize
|
||||
@ -229,6 +231,7 @@ private:
|
||||
, Settings::Gui::AutoStartCore
|
||||
, Settings::Gui::ShownFirstConnectedMessage
|
||||
, Settings::Gui::ShownServerFirstStartMessage
|
||||
, Settings::Gui::ShowVersionInTitle
|
||||
, Settings::Core::PreventSleep
|
||||
, Settings::Core::UseWlClipboard
|
||||
, Settings::Server::ExternalConfig
|
||||
|
||||
@ -195,8 +195,6 @@ void MainWindow::restoreWindow()
|
||||
|
||||
void MainWindow::setupControls()
|
||||
{
|
||||
setWindowTitle(kAppName);
|
||||
|
||||
secureSocket(false);
|
||||
|
||||
ui->btnConfigureServer->setIcon(QIcon::fromTheme(QStringLiteral("configure")));
|
||||
@ -702,8 +700,15 @@ void MainWindow::setupTrayIcon()
|
||||
|
||||
void MainWindow::applyConfig()
|
||||
{
|
||||
if (Settings::value(Settings::Gui::ShowVersionInTitle).toBool()) {
|
||||
setWindowTitle(QStringLiteral("%1 - %2").arg(kAppName, kDisplayVersion));
|
||||
} else {
|
||||
setWindowTitle(kAppName);
|
||||
}
|
||||
|
||||
if (const auto host = Settings::value(Settings::Client::RemoteHost).toString(); !host.isEmpty())
|
||||
ui->lineHostname->setText(host);
|
||||
|
||||
updateLocalFingerprint();
|
||||
setTrayIcon();
|
||||
|
||||
|
||||
@ -190,6 +190,7 @@ void SettingsDialog::accept()
|
||||
Settings::setValue(Settings::Core::Language, I18N::nativeTo639Name(ui->comboLanguage->currentText()));
|
||||
Settings::setValue(Settings::Log::GuiDebug, ui->cbGuiDebug->isChecked());
|
||||
Settings::setValue(Settings::Core::UseWlClipboard, ui->cbUseWlClipboard->isChecked());
|
||||
Settings::setValue(Settings::Gui::ShowVersionInTitle, ui->cbShowVersion->isChecked());
|
||||
|
||||
Settings::ProcessMode mode;
|
||||
if (ui->groupService->isChecked())
|
||||
@ -217,6 +218,7 @@ void SettingsDialog::loadFromConfig()
|
||||
ui->sbScrollSpeed->setValue(Settings::value(Settings::Client::ScrollSpeed).toInt());
|
||||
ui->cbGuiDebug->setChecked(Settings::value(Settings::Log::GuiDebug).toBool());
|
||||
ui->cbUseWlClipboard->setChecked(Settings::value(Settings::Core::UseWlClipboard).toBool());
|
||||
ui->cbShowVersion->setChecked(Settings::value(Settings::Gui::ShowVersionInTitle).toBool());
|
||||
|
||||
const auto processMode = Settings::value(Settings::Core::ProcessMode).value<Settings::ProcessMode>();
|
||||
ui->groupService->setChecked(processMode == Settings::ProcessMode::Service);
|
||||
|
||||
@ -111,6 +111,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cbShowVersion">
|
||||
<property name="text">
|
||||
<string>Include version in the window title</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cbAutoHide">
|
||||
<property name="text">
|
||||
|
||||
@ -1320,6 +1320,10 @@ Al habilitar esta opción, se deshabilitará la interfaz gráfica de usuario (GU
|
||||
<source>Automatic</source>
|
||||
<translation type="unfinished">Automática</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Include version in the window title</source>
|
||||
<translation type="unfinished">Incluir la versión en el título de la ventana</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>i18n</name>
|
||||
|
||||
@ -1320,6 +1320,10 @@ L'abilitazione di questa impostazione disabiliterà l'interfaccia graf
|
||||
<source>Automatic</source>
|
||||
<translation type="unfinished">Automatica</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Include version in the window title</source>
|
||||
<translation type="unfinished">Includi la versione nel titolo della finestra</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>i18n</name>
|
||||
|
||||
@ -1321,6 +1321,10 @@ Enabling this setting will disable the server config GUI.</source>
|
||||
<source>Automatic</source>
|
||||
<translation type="unfinished">自動</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Include version in the window title</source>
|
||||
<translation type="unfinished">ウィンドウタイトルにバージョン情報を含める</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>i18n</name>
|
||||
|
||||
@ -1319,6 +1319,10 @@ Enabling this setting will disable the server config GUI.</source>
|
||||
<source>Automatic</source>
|
||||
<translation>Автоматически</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Include version in the window title</source>
|
||||
<translation type="unfinished">Включить номер версии в заголовок окна</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>i18n</name>
|
||||
|
||||
@ -1321,6 +1321,10 @@ Enabling this setting will disable the server config GUI.</source>
|
||||
<source>Automatic</source>
|
||||
<translation type="unfinished">自动的</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Include version in the window title</source>
|
||||
<translation type="unfinished">在窗口标题中包含版本信息</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>i18n</name>
|
||||
|
||||
Reference in New Issue
Block a user