Skip to content
Snippets Groups Projects
Commit 3da2361c authored by Andreas Traczyk's avatar Andreas Traczyk
Browse files

mainwindow: include "beta" in app title

Change-Id: Ie22e7bcadc0f0a19a0050670bc087d761acba5a9
parent b747b3d8
No related branches found
No related tags found
No related merge requests found
...@@ -20,8 +20,11 @@ ...@@ -20,8 +20,11 @@
pragma Singleton pragma Singleton
import QtQuick 2.14 import QtQuick 2.14
import net.jami.Helpers 1.0
Item { Item {
readonly property string appTitle: "Jami" + (UpdateManager.isCurrentVersionBeta() ? " (BETA)" : "")
// Misc // Misc
property string contactSearchConversation: qsTr("Find a user or search for a conversation") property string contactSearchConversation: qsTr("Find a user or search for a conversation")
property string contactSearchInvitations: qsTr("Search your invitations") property string contactSearchInvitations: qsTr("Search your invitations")
...@@ -29,7 +32,7 @@ Item { ...@@ -29,7 +32,7 @@ Item {
property string description: qsTr("Jami is free software for universal communication which respects the freedoms and the privacy of its users.") property string description: qsTr("Jami is free software for universal communication which respects the freedoms and the privacy of its users.")
// AboutPopUp // AboutPopUp
property string version: qsTr("Version") property string version: qsTr("Version") + (UpdateManager.isCurrentVersionBeta() ? " (BETA)" : "")
property string companyDeclarationYear: "© 2015-2020 Savoir-faire Linux Inc." property string companyDeclarationYear: "© 2015-2020 Savoir-faire Linux Inc."
property string slogan: "Together" property string slogan: "Together"
property string declaration: qsTr("Jami is a free software for universal communication which respects the freedom and privacy of its users.") property string declaration: qsTr("Jami is a free software for universal communication which respects the freedom and privacy of its users.")
......
...@@ -181,7 +181,7 @@ Window { ...@@ -181,7 +181,7 @@ Window {
} }
title: "Jami" title: JamiStrings.appTitle
visible: true visible: true
width: mainViewWindowPreferredWidth width: mainViewWindowPreferredWidth
height: mainViewWindowPreferredHeight height: mainViewWindowPreferredHeight
......
...@@ -138,7 +138,8 @@ registerTypes() ...@@ -138,7 +138,8 @@ registerTypes()
QML_REGISTERSINGLETONTYPE_CUSTOM("net.jami.Models", AVModel, 1, 0, &LRCInstance::avModel()) QML_REGISTERSINGLETONTYPE_CUSTOM("net.jami.Models", AVModel, 1, 0, &LRCInstance::avModel())
QML_REGISTERSINGLETONTYPE_CUSTOM("net.jami.Models", PluginModel, 1, 0, &LRCInstance::pluginModel()) QML_REGISTERSINGLETONTYPE_CUSTOM("net.jami.Models", PluginModel, 1, 0, &LRCInstance::pluginModel())
QML_REGISTERSINGLETONTYPE_CUSTOM("net.jami.Models", RenderManager, 1, 0, LRCInstance::renderer()) QML_REGISTERSINGLETONTYPE_CUSTOM("net.jami.Models", RenderManager, 1, 0, LRCInstance::renderer())
QML_REGISTERSINGLETONTYPE_CUSTOM("net.jami.Models", UpdateManager, 1, 0, LRCInstance::getUpdateManager())
QML_REGISTERSINGLETONTYPE_CUSTOM("net.jami.Helpers", UpdateManager, 1, 0, LRCInstance::getUpdateManager())
/* /*
* Qml singleton components * Qml singleton components
......
...@@ -25,6 +25,7 @@ import QtQuick.Layouts 1.3 ...@@ -25,6 +25,7 @@ import QtQuick.Layouts 1.3
import net.jami.Adapters 1.0 import net.jami.Adapters 1.0
import net.jami.Enums 1.0 import net.jami.Enums 1.0
import net.jami.Models 1.0 import net.jami.Models 1.0
import net.jami.Helpers 1.0
import "../../commoncomponents" import "../../commoncomponents"
ColumnLayout { ColumnLayout {
...@@ -81,6 +82,8 @@ ColumnLayout { ...@@ -81,6 +82,8 @@ ColumnLayout {
MaterialButton { MaterialButton {
id: installBetaButton id: installBetaButton
visible: !UpdateManager.isCurrentVersionBeta()
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
Layout.preferredWidth: JamiTheme.preferredFieldWidth Layout.preferredWidth: JamiTheme.preferredFieldWidth
Layout.preferredHeight: JamiTheme.preferredFieldHeight Layout.preferredHeight: JamiTheme.preferredFieldHeight
......
...@@ -57,6 +57,12 @@ UpdateManager::setAutoUpdateCheck(bool state) ...@@ -57,6 +57,12 @@ UpdateManager::setAutoUpdateCheck(bool state)
updateTimer_->start(updatePeriod); updateTimer_->start(updatePeriod);
} }
bool
UpdateManager::isCurrentVersionBeta()
{
return isBeta;
}
void void
UpdateManager::checkForUpdates(bool quiet) UpdateManager::checkForUpdates(bool quiet)
{ {
......
...@@ -34,6 +34,7 @@ public: ...@@ -34,6 +34,7 @@ public:
Q_INVOKABLE void applyUpdates(bool beta = false); Q_INVOKABLE void applyUpdates(bool beta = false);
Q_INVOKABLE void cancelUpdate(); Q_INVOKABLE void cancelUpdate();
Q_INVOKABLE void setAutoUpdateCheck(bool state); Q_INVOKABLE void setAutoUpdateCheck(bool state);
Q_INVOKABLE bool isCurrentVersionBeta();
signals: signals:
void updateCheckReplyReceived(bool ok, bool found = false); void updateCheckReplyReceived(bool ok, bool found = false);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment