feat: Add a setting to allow the version to be shown in the windows title
fixes: #8538 replaces: #9351
This commit is contained in:
parent
281b3b8d07
commit
c63fd21c8e
10 changed files with 40 additions and 2 deletions
|
|
@ -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] |
|
| 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] |
|
| 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] |
|
| 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. |
|
| 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]|
|
| 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 ShowGenericClientFailureDialog = QStringLiteral("gui/showGenericClientFailureDialog");
|
||||||
inline static const auto ShownFirstConnectedMessage = QStringLiteral("gui/shownFirstConnectedMessage");
|
inline static const auto ShownFirstConnectedMessage = QStringLiteral("gui/shownFirstConnectedMessage");
|
||||||
inline static const auto ShownServerFirstStartMessage = QStringLiteral("gui/shownServerFirstStartMessage");
|
inline static const auto ShownServerFirstStartMessage = QStringLiteral("gui/shownServerFirstStartMessage");
|
||||||
|
inline static const auto ShowVersionInTitle = QStringLiteral("gui/showVersionInTitle");
|
||||||
};
|
};
|
||||||
struct Log
|
struct Log
|
||||||
{
|
{
|
||||||
|
|
@ -215,6 +216,7 @@ private:
|
||||||
, Settings::Gui::ShowGenericClientFailureDialog
|
, Settings::Gui::ShowGenericClientFailureDialog
|
||||||
, Settings::Gui::ShownFirstConnectedMessage
|
, Settings::Gui::ShownFirstConnectedMessage
|
||||||
, Settings::Gui::ShownServerFirstStartMessage
|
, Settings::Gui::ShownServerFirstStartMessage
|
||||||
|
, Settings::Gui::ShowVersionInTitle
|
||||||
, Settings::Security::Certificate
|
, Settings::Security::Certificate
|
||||||
, Settings::Security::CheckPeers
|
, Settings::Security::CheckPeers
|
||||||
, Settings::Security::KeySize
|
, Settings::Security::KeySize
|
||||||
|
|
@ -229,6 +231,7 @@ private:
|
||||||
, Settings::Gui::AutoStartCore
|
, Settings::Gui::AutoStartCore
|
||||||
, Settings::Gui::ShownFirstConnectedMessage
|
, Settings::Gui::ShownFirstConnectedMessage
|
||||||
, Settings::Gui::ShownServerFirstStartMessage
|
, Settings::Gui::ShownServerFirstStartMessage
|
||||||
|
, Settings::Gui::ShowVersionInTitle
|
||||||
, Settings::Core::PreventSleep
|
, Settings::Core::PreventSleep
|
||||||
, Settings::Core::UseWlClipboard
|
, Settings::Core::UseWlClipboard
|
||||||
, Settings::Server::ExternalConfig
|
, Settings::Server::ExternalConfig
|
||||||
|
|
|
||||||
|
|
@ -195,8 +195,6 @@ void MainWindow::restoreWindow()
|
||||||
|
|
||||||
void MainWindow::setupControls()
|
void MainWindow::setupControls()
|
||||||
{
|
{
|
||||||
setWindowTitle(kAppName);
|
|
||||||
|
|
||||||
secureSocket(false);
|
secureSocket(false);
|
||||||
|
|
||||||
ui->btnConfigureServer->setIcon(QIcon::fromTheme(QStringLiteral("configure")));
|
ui->btnConfigureServer->setIcon(QIcon::fromTheme(QStringLiteral("configure")));
|
||||||
|
|
@ -702,8 +700,15 @@ void MainWindow::setupTrayIcon()
|
||||||
|
|
||||||
void MainWindow::applyConfig()
|
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())
|
if (const auto host = Settings::value(Settings::Client::RemoteHost).toString(); !host.isEmpty())
|
||||||
ui->lineHostname->setText(host);
|
ui->lineHostname->setText(host);
|
||||||
|
|
||||||
updateLocalFingerprint();
|
updateLocalFingerprint();
|
||||||
setTrayIcon();
|
setTrayIcon();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -190,6 +190,7 @@ void SettingsDialog::accept()
|
||||||
Settings::setValue(Settings::Core::Language, I18N::nativeTo639Name(ui->comboLanguage->currentText()));
|
Settings::setValue(Settings::Core::Language, I18N::nativeTo639Name(ui->comboLanguage->currentText()));
|
||||||
Settings::setValue(Settings::Log::GuiDebug, ui->cbGuiDebug->isChecked());
|
Settings::setValue(Settings::Log::GuiDebug, ui->cbGuiDebug->isChecked());
|
||||||
Settings::setValue(Settings::Core::UseWlClipboard, ui->cbUseWlClipboard->isChecked());
|
Settings::setValue(Settings::Core::UseWlClipboard, ui->cbUseWlClipboard->isChecked());
|
||||||
|
Settings::setValue(Settings::Gui::ShowVersionInTitle, ui->cbShowVersion->isChecked());
|
||||||
|
|
||||||
Settings::ProcessMode mode;
|
Settings::ProcessMode mode;
|
||||||
if (ui->groupService->isChecked())
|
if (ui->groupService->isChecked())
|
||||||
|
|
@ -217,6 +218,7 @@ void SettingsDialog::loadFromConfig()
|
||||||
ui->sbScrollSpeed->setValue(Settings::value(Settings::Client::ScrollSpeed).toInt());
|
ui->sbScrollSpeed->setValue(Settings::value(Settings::Client::ScrollSpeed).toInt());
|
||||||
ui->cbGuiDebug->setChecked(Settings::value(Settings::Log::GuiDebug).toBool());
|
ui->cbGuiDebug->setChecked(Settings::value(Settings::Log::GuiDebug).toBool());
|
||||||
ui->cbUseWlClipboard->setChecked(Settings::value(Settings::Core::UseWlClipboard).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>();
|
const auto processMode = Settings::value(Settings::Core::ProcessMode).value<Settings::ProcessMode>();
|
||||||
ui->groupService->setChecked(processMode == Settings::ProcessMode::Service);
|
ui->groupService->setChecked(processMode == Settings::ProcessMode::Service);
|
||||||
|
|
|
||||||
|
|
@ -111,6 +111,13 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="cbShowVersion">
|
||||||
|
<property name="text">
|
||||||
|
<string>Include version in the window title</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="cbAutoHide">
|
<widget class="QCheckBox" name="cbAutoHide">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
|
|
||||||
|
|
@ -1320,6 +1320,10 @@ Al habilitar esta opción, se deshabilitará la interfaz gráfica de usuario (GU
|
||||||
<source>Automatic</source>
|
<source>Automatic</source>
|
||||||
<translation type="unfinished">Automática</translation>
|
<translation type="unfinished">Automática</translation>
|
||||||
</message>
|
</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>
|
||||||
<context>
|
<context>
|
||||||
<name>i18n</name>
|
<name>i18n</name>
|
||||||
|
|
|
||||||
|
|
@ -1320,6 +1320,10 @@ L'abilitazione di questa impostazione disabiliterà l'interfaccia graf
|
||||||
<source>Automatic</source>
|
<source>Automatic</source>
|
||||||
<translation type="unfinished">Automatica</translation>
|
<translation type="unfinished">Automatica</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Include version in the window title</source>
|
||||||
|
<translation type="unfinished">Includi la versione nel titolo della finestra</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>i18n</name>
|
<name>i18n</name>
|
||||||
|
|
|
||||||
|
|
@ -1321,6 +1321,10 @@ Enabling this setting will disable the server config GUI.</source>
|
||||||
<source>Automatic</source>
|
<source>Automatic</source>
|
||||||
<translation type="unfinished">自動</translation>
|
<translation type="unfinished">自動</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Include version in the window title</source>
|
||||||
|
<translation type="unfinished">ウィンドウタイトルにバージョン情報を含める</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>i18n</name>
|
<name>i18n</name>
|
||||||
|
|
|
||||||
|
|
@ -1319,6 +1319,10 @@ Enabling this setting will disable the server config GUI.</source>
|
||||||
<source>Automatic</source>
|
<source>Automatic</source>
|
||||||
<translation>Автоматически</translation>
|
<translation>Автоматически</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Include version in the window title</source>
|
||||||
|
<translation type="unfinished">Включить номер версии в заголовок окна</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>i18n</name>
|
<name>i18n</name>
|
||||||
|
|
|
||||||
|
|
@ -1321,6 +1321,10 @@ Enabling this setting will disable the server config GUI.</source>
|
||||||
<source>Automatic</source>
|
<source>Automatic</source>
|
||||||
<translation type="unfinished">自动的</translation>
|
<translation type="unfinished">自动的</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Include version in the window title</source>
|
||||||
|
<translation type="unfinished">在窗口标题中包含版本信息</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>i18n</name>
|
<name>i18n</name>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue