Commit 7ce7bd73 authored by Ming Rui Zhang's avatar Ming Rui Zhang

beta: add differentiation between release version and beta version

- update mechanism also changes

Change-Id: I7fb8614431413d1d550cf9b32a206ee25a234c53
parent b81e9d1b
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include "aboutdialog.h" #include "aboutdialog.h"
#include "ui_aboutdialog.h" #include "ui_aboutdialog.h"
#include "utils.h"
#include "version.h" #include "version.h"
AboutDialog::AboutDialog(QWidget *parent) : AboutDialog::AboutDialog(QWidget *parent) :
...@@ -30,7 +31,7 @@ AboutDialog::AboutDialog(QWidget *parent) : ...@@ -30,7 +31,7 @@ AboutDialog::AboutDialog(QWidget *parent) :
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
this->setFixedSize(this->width(),this->height()); this->setFixedSize(this->width(),this->height());
ui->creditsWidget->hide(); ui->creditsWidget->hide();
ui->gitVersionLabel->setText(QString("%1: %2").arg(tr("version"), QString(VERSION_STRING))); ui->gitVersionLabel->setText(QString("%1: %2").arg(isBeta ? tr("beta version") : tr("version"), QString(VERSION_STRING)));
ui->creditsBrowser->setHtml("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">" ui->creditsBrowser->setHtml("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">" "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">"
...@@ -47,6 +48,7 @@ AboutDialog::AboutDialog(QWidget *parent) : ...@@ -47,6 +48,7 @@ AboutDialog::AboutDialog(QWidget *parent) :
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Anthony Léonard</p>" "<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Anthony Léonard</p>"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Cyrille Béraud</p>" "<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Cyrille Béraud</p>"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Dorina Mosku</p>" "<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Dorina Mosku</p>"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Eden Abitbol</p>"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Édric Milaret</p>" "<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Édric Milaret</p>"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Éloi Bail</p>" "<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Éloi Bail</p>"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Emmanuel Lepage-Vallée</p>" "<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Emmanuel Lepage-Vallée</p>"
...@@ -56,20 +58,25 @@ AboutDialog::AboutDialog(QWidget *parent) : ...@@ -56,20 +58,25 @@ AboutDialog::AboutDialog(QWidget *parent) :
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Julien Grossholtz</p>" "<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Julien Grossholtz</p>"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Kateryna Kostiuk</p>" "<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Kateryna Kostiuk</p>"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Loïc Siret</p>" "<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Loïc Siret</p>"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Mingrui Zhang</p>"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Mohamed Amine Younes Bouacida</p>"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Nicolas Jäger</p>" "<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Nicolas Jäger</p>"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Nicolas Reynaud</p>" "<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Nicolas Reynaud</p>"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Olivier Gregoire</p>" "<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Olivier Gregoire</p>"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Olivier Soldano</p>" "<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Olivier Soldano</p>"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Patrick Keroulas</p>" "<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Patrick Keroulas</p>"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Philippe Gorley</p>" "<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Philippe Gorley</p>"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Pierre Lespagnol</p>"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Rayan Osseiran</p>"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Romain Bertozzi</p>" "<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Romain Bertozzi</p>"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Sébastien Blin</p>" "<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Sébastien Blin</p>"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Seva Ivanov</p>"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Silbino Gonçalves Matado</p>" "<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Silbino Gonçalves Matado</p>"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Simon Désaulniers</p>" "<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Simon Désaulniers</p>"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Stepan Salenikovich</p>" "<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Stepan Salenikovich</p>"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Simon Zeni</p>" "<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Simon Zeni</p>"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Thibault Wittemberg</p>" "<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Thibault Wittemberg</p>"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Vsevolod Ivanov</p>"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Yang Wang</p>"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:600;\">" "<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:600;\">"
+ tr("Artwork by:") + "</span></p>" + tr("Artwork by:") + "</span></p>"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Marianne Forget</p>" "<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Marianne Forget</p>"
...@@ -85,17 +92,15 @@ AboutDialog::~AboutDialog() ...@@ -85,17 +92,15 @@ AboutDialog::~AboutDialog()
} }
void void
AboutDialog::on_aboutButton_toggled(bool checked) AboutDialog::on_aboutButton_clicked()
{ {
ui->creditsButton->setChecked(!checked); ui->aboutWidget->setVisible(true);
ui->aboutWidget->setVisible(checked); ui->creditsWidget->setVisible(false);
ui->creditsWidget->setVisible(!checked);
} }
void void
AboutDialog::on_creditsButton_clicked(bool checked) AboutDialog::on_creditsButton_clicked()
{ {
ui->aboutButton->setChecked(!checked); ui->creditsWidget->setVisible(true);
ui->creditsWidget->setVisible(checked); ui->aboutWidget->setVisible(false);
ui->aboutWidget->setVisible(!checked);
} }
...@@ -34,8 +34,8 @@ public: ...@@ -34,8 +34,8 @@ public:
//UI SLOTS //UI SLOTS
private slots: private slots:
void on_aboutButton_toggled(bool checked); void on_aboutButton_clicked();
void on_creditsButton_clicked(bool checked); void on_creditsButton_clicked();
private: private:
Ui::AboutDialog *ui; Ui::AboutDialog *ui;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>674</width> <width>674</width>
<height>555</height> <height>616</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
...@@ -439,7 +439,7 @@ ...@@ -439,7 +439,7 @@
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,0,0,0"> <layout class="QHBoxLayout" name="horizontalLayout" stretch="0,0,0,0,0">
<property name="topMargin"> <property name="topMargin">
<number>0</number> <number>0</number>
</property> </property>
...@@ -458,30 +458,58 @@ ...@@ -458,30 +458,58 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="aboutButton"> <widget class="QPushButton" name="aboutButton">
<property name="minimumSize">
<size>
<width>98</width>
<height>30</height>
</size>
</property>
<property name="toolTip"> <property name="toolTip">
<string>about button</string> <string>About</string>
</property> </property>
<property name="text"> <property name="text">
<string>About</string> <string>About</string>
</property> </property>
<property name="checkable"> <property name="checkable">
<bool>true</bool> <bool>false</bool>
</property> </property>
<property name="checked"> <property name="checked">
<bool>true</bool> <bool>false</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item> <item>
<widget class="QPushButton" name="creditsButton"> <widget class="QPushButton" name="creditsButton">
<property name="minimumSize">
<size>
<width>98</width>
<height>30</height>
</size>
</property>
<property name="toolTip"> <property name="toolTip">
<string>credits button</string> <string>Credits</string>
</property> </property>
<property name="text"> <property name="text">
<string>Credits</string> <string>Credits</string>
</property> </property>
<property name="checkable"> <property name="checkable">
<bool>true</bool> <bool>false</bool>
</property> </property>
</widget> </widget>
</item> </item>
......
...@@ -46,6 +46,8 @@ MainWindow::MainWindow(QWidget* parent) ...@@ -46,6 +46,8 @@ MainWindow::MainWindow(QWidget* parent)
{ {
ui->setupUi(this); ui->setupUi(this);
setWindowTitle(isBeta ? "Jami (Beta)" : "Jami");
for (int i = 0; i < ui->navStack->count(); ++i) { for (int i = 0; i < ui->navStack->count(); ++i) {
if (auto navWidget = dynamic_cast<NavWidget*>(ui->navStack->widget(i))) { if (auto navWidget = dynamic_cast<NavWidget*>(ui->navStack->widget(i))) {
connect(navWidget, &NavWidget::NavigationRequested, connect(navWidget, &NavWidget::NavigationRequested,
...@@ -54,13 +56,6 @@ MainWindow::MainWindow(QWidget* parent) ...@@ -54,13 +56,6 @@ MainWindow::MainWindow(QWidget* parent)
if (auto navWidget = dynamic_cast<NavWidget*>(ui->navStack->widget(i))) { if (auto navWidget = dynamic_cast<NavWidget*>(ui->navStack->widget(i))) {
navWidget->navigated(scr == i); navWidget->navigated(scr == i);
} }
if (scr == ScreenEnum::WizardScreen) {
setWindowTitle(QObject::tr("Setup account"));
} else if (scr == ScreenEnum::SetttingsScreen) {
setWindowTitle(QObject::tr("Settings"));
} else {
setWindowTitle(QStringLiteral("Jami"));
}
} }
Utils::setStackWidget(ui->navStack, ui->navStack->widget(scr)); Utils::setStackWidget(ui->navStack, ui->navStack->widget(scr));
}); });
...@@ -91,10 +86,8 @@ MainWindow::MainWindow(QWidget* parent) ...@@ -91,10 +86,8 @@ MainWindow::MainWindow(QWidget* parent)
readSettingsFromRegistry(); readSettingsFromRegistry();
startScreen = ScreenEnum::CallScreen; startScreen = ScreenEnum::CallScreen;
emit LRCInstance::instance().accountListChanged(); emit LRCInstance::instance().accountListChanged();
setWindowTitle(QStringLiteral("Jami"));
} else { } else {
startScreen = ScreenEnum::WizardScreen; startScreen = ScreenEnum::WizardScreen;
setWindowTitle(QStringLiteral("Log In"));
} }
Utils::setStackWidget(ui->navStack, ui->navStack->widget(startScreen)); Utils::setStackWidget(ui->navStack, ui->navStack->widget(startScreen));
......
...@@ -121,6 +121,10 @@ SettingsWidget::SettingsWidget(QWidget* parent) ...@@ -121,6 +121,10 @@ SettingsWidget::SettingsWidget(QWidget* parent)
ui->lookupStatusLabel->setMovie(lookupSpinnerMovie_); ui->lookupStatusLabel->setMovie(lookupSpinnerMovie_);
ui->lookupStatusLabel->hide(); ui->lookupStatusLabel->hide();
ui->autoUpdateCheckBox->setText(QString("Check for updates automatically") + QString(isBeta ? " (Beta)" : ""));
ui->checkUpdateButton->setText(QString("Check for updates now") + QString(isBeta ? " (Beta)" : ""));
ui->installBetaButton->setVisible(!isBeta);
// btnExitSettings // btnExitSettings
connect(ui->btnExitSettings, &QPushButton::clicked, this, &SettingsWidget::leaveSettingsSlot); connect(ui->btnExitSettings, &QPushButton::clicked, this, &SettingsWidget::leaveSettingsSlot);
...@@ -240,6 +244,11 @@ SettingsWidget::SettingsWidget(QWidget* parent) ...@@ -240,6 +244,11 @@ SettingsWidget::SettingsWidget(QWidget* parent)
connect(ui->autoUpdateCheckBox, &QAbstractButton::clicked, this, &SettingsWidget::slotSetUpdateAutomatic); connect(ui->autoUpdateCheckBox, &QAbstractButton::clicked, this, &SettingsWidget::slotSetUpdateAutomatic);
connect(ui->installBetaButton, &QAbstractButton::clicked,
[this] {
Utils::applyUpdates(true, this);
});
// audio / visual settings // audio / visual settings
connect(ui->alwaysRecordingCheckBox, &QAbstractButton::clicked, this, &SettingsWidget::slotAlwaysRecordingClicked); connect(ui->alwaysRecordingCheckBox, &QAbstractButton::clicked, this, &SettingsWidget::slotAlwaysRecordingClicked);
......
...@@ -715,7 +715,7 @@ ...@@ -715,7 +715,7 @@
</font> </font>
</property> </property>
<property name="icon"> <property name="icon">
<iconset> <iconset resource="ressources.qrc">
<normaloff>:/images/icons/round-folder-24px.svg</normaloff>:/images/icons/round-folder-24px.svg</iconset> <normaloff>:/images/icons/round-folder-24px.svg</normaloff>:/images/icons/round-folder-24px.svg</iconset>
</property> </property>
<property name="iconSize"> <property name="iconSize">
...@@ -1060,7 +1060,7 @@ ...@@ -1060,7 +1060,7 @@
<string/> <string/>
</property> </property>
<property name="icon"> <property name="icon">
<iconset> <iconset resource="ressources.qrc">
<normaloff>:/images/icons/round-folder-24px.svg</normaloff>:/images/icons/round-folder-24px.svg</iconset> <normaloff>:/images/icons/round-folder-24px.svg</normaloff>:/images/icons/round-folder-24px.svg</iconset>
</property> </property>
<property name="iconSize"> <property name="iconSize">
...@@ -1124,10 +1124,7 @@ ...@@ -1124,10 +1124,7 @@
</spacer> </spacer>
</item> </item>
<item> <item>
<layout class="QVBoxLayout" name="verticalLayout_16"> <layout class="QGridLayout" name="gridLayout">
<property name="spacing">
<number>14</number>
</property>
<property name="leftMargin"> <property name="leftMargin">
<number>20</number> <number>20</number>
</property> </property>
...@@ -1137,7 +1134,7 @@ ...@@ -1137,7 +1134,7 @@
<property name="bottomMargin"> <property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </property>
<item> <item row="1" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_6"> <layout class="QHBoxLayout" name="horizontalLayout_6">
<property name="spacing"> <property name="spacing">
<number>12</number> <number>12</number>
...@@ -1183,7 +1180,7 @@ ...@@ -1183,7 +1180,7 @@
</item> </item>
</layout> </layout>
</item> </item>
<item> <item row="2" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_17"> <layout class="QHBoxLayout" name="horizontalLayout_17">
<property name="topMargin"> <property name="topMargin">
<number>0</number> <number>0</number>
...@@ -1214,7 +1211,7 @@ ...@@ -1214,7 +1211,7 @@
</font> </font>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string>Check for updates now button</string> <string>Check for updates now</string>
</property> </property>
<property name="text"> <property name="text">
<string>Check for updates now</string> <string>Check for updates now</string>
...@@ -1229,7 +1226,57 @@ ...@@ -1229,7 +1226,57 @@
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>40</width> <width>40</width>
<height>20</height> <height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="3" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_27">
<item>
<widget class="QPushButton" name="installBetaButton">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>30</height>
</size>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="toolTip">
<string>Install the newest beta version</string>
</property>
<property name="text">
<string>Install the latest beta version</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_32">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>0</height>
</size> </size>
</property> </property>
</spacer> </spacer>
...@@ -1416,7 +1463,7 @@ ...@@ -1416,7 +1463,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>706</width> <width>745</width>
<height>1398</height> <height>1398</height>
</rect> </rect>
</property> </property>
...@@ -2739,7 +2786,7 @@ ...@@ -2739,7 +2786,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>683</width> <width>745</width>
<height>874</height> <height>874</height>
</rect> </rect>
</property> </property>
......
...@@ -115,14 +115,16 @@ QPushButton#btnAcceptInvite:pressed, QPushButton#btnIgnoreInvite:pressed, QPushB ...@@ -115,14 +115,16 @@ QPushButton#btnAcceptInvite:pressed, QPushButton#btnIgnoreInvite:pressed, QPushB
QPushButton#imBackButton:hover, QPushButton#btnAudioCall:hover, QPushButton#btnVideoCall:hover, QPushButton#imBackButton:hover, QPushButton#btnAudioCall:hover, QPushButton#btnVideoCall:hover,
QPushButton#sendContactRequestButton:hover, QPushButton#sendButton:hover, QPushButton#sendIMButton:hover, QPushButton#sendContactRequestButton:hover, QPushButton#sendButton:hover, QPushButton#sendIMButton:hover,
QPushButton#btnExitSettings:hover, QPushButton#btnDeleteAccept:hover, QPushButton#btnDeleteCancel:hover, QPushButton#btnExitSettings:hover, QPushButton#btnDeleteAccept:hover, QPushButton#btnDeleteCancel:hover,
QPushButton#btnUpdateAccept:hover, QPushButton#btnUpdateCancel:hover { QPushButton#aboutButton:hover, QPushButton#creditsButton:hover, QPushButton#updateCancelBtn:hover,
QPushButton#updateAcceptBtn:hover, QPushButton#installBetaButton:hover {
background-color: rgb(237, 237, 237); background-color: rgb(237, 237, 237);
} }
QPushButton#imBackButton:pressed, QPushButton#btnAudioCall:pressed, QPushButton#btnVideoCall:pressed, QPushButton#imBackButton:pressed, QPushButton#btnAudioCall:pressed, QPushButton#btnVideoCall:pressed,
QPushButton#sendContactRequestButton:pressed, QPushButton#sendButton:pressed, QPushButton#sendIMButton:pressed, QPushButton#sendContactRequestButton:pressed, QPushButton#sendButton:pressed, QPushButton#sendIMButton:pressed,
QPushButton#btnExitSettings:pressed, QPushButton#btnDeleteAccept:pressed, QPushButton#btnDeleteCancel:pressed, QPushButton#btnExitSettings:pressed, QPushButton#btnDeleteAccept:pressed, QPushButton#btnDeleteCancel:pressed,
QPushButton#btnUpdateAccept:pressed, QPushButton#btnUpdateCancel:pressed { QPushButton#aboutButton:pressed, QPushButton#creditsButton:pressed, QPushButton#updateCancelBtn:pressed,
QPushButton#updateAcceptBtn:pressed, QPushButton#installBetaButton:pressed {
background-color: rgb(212, 212, 212); background-color: rgb(212, 212, 212);
} }
...@@ -552,6 +554,10 @@ QLabel#warningLabel{ ...@@ -552,6 +554,10 @@ QLabel#warningLabel{
color: red; color: red;
} }
QLabel#labelWarning {
color: darkorange;
}
QLabel#accountIdLabel{ QLabel#accountIdLabel{
color: LightSlateGrey; color: LightSlateGrey;
font-style: italic; font-style: italic;
......
...@@ -18,6 +18,10 @@ ...@@ -18,6 +18,10 @@
#include "ui_updateconfirmdialog.h" #include "ui_updateconfirmdialog.h"
#include "updateconfirmdialog.h" #include "updateconfirmdialog.h"
#include <QDesktopServices>
#include <QFontMetrics>
#include <QUrl>
UpdateConfirmDialog::UpdateConfirmDialog(QWidget* parent) UpdateConfirmDialog::UpdateConfirmDialog(QWidget* parent)
: QDialog(parent) : QDialog(parent)
, ui(new Ui::UpdateConfirmDialog) , ui(new Ui::UpdateConfirmDialog)
...@@ -32,12 +36,54 @@ UpdateConfirmDialog::~UpdateConfirmDialog() ...@@ -32,12 +36,54 @@ UpdateConfirmDialog::~UpdateConfirmDialog()
delete ui; delete ui;
} }
void UpdateConfirmDialog::on_updateCancelBtn_clicked() void
UpdateConfirmDialog::changeToUpdateToBetaVersionText()
{
connect(ui->labelWarning, &QLabel::linkActivated,
[this] (const QString& link) {
QDesktopServices::openUrl(QUrl(link));
});
ui->labelWarning->setWordWrap(true);
ui->updateAcceptBtn->setToolTip("Install Beta Version");
ui->updateCancelBtn->setToolTip("Cancel Installation");
setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
setMaximumHeight(INT_MAX);
setMaximumWidth(INT_MAX);
// inital constraint of Text
ui->labelWarning->setAlignment(Qt::AlignHCenter | Qt::AlignTop);
ui->labelWarning->setMinimumHeight(300);
ui->labelWarning->setMinimumWidth(350);
QString warning { QString("Please be aware that this will uninstall your current Release version.<br>"
"You can always download the latest Release version on our website.<br>") };
// reset size to be able to contain all text
auto rect = ui->labelWarning->fontMetrics().boundingRect(ui->labelWarning->rect(), Qt::AlignCenter | Qt::TextWordWrap, warning);
ui->labelWarning->setText(warning);
ui->labelWarning->setMinimumHeight(rect.height());
ui->labelWarning->setMinimumWidth(rect.width());
setWindowTitle("Jami Beta Installation");
ui->labelDeletion->setText("Install the latest Beta version?");
setMaximumHeight(height() + rect.height());
setMinimumHeight(height() + rect.height());
setMaximumWidth(rect.width() + 40);
setMinimumWidth(rect.width() + 40);
setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
}
void
UpdateConfirmDialog::on_updateCancelBtn_clicked()
{ {
done(DialogCode::Rejected); done(DialogCode::Rejected);
} }
void UpdateConfirmDialog::on_updateAcceptBtn_clicked() void
UpdateConfirmDialog::on_updateAcceptBtn_clicked()
{ {
done(DialogCode::Accepted); done(DialogCode::Accepted);
} }
...@@ -31,6 +31,8 @@ public: ...@@ -31,6 +31,8 @@ public:
UpdateConfirmDialog(QWidget* parent = nullptr); UpdateConfirmDialog(QWidget* parent = nullptr);
~UpdateConfirmDialog(); ~UpdateConfirmDialog();
void changeToUpdateToBetaVersionText();
private slots: private slots:
void on_updateCancelBtn_clicked(); void on_updateCancelBtn_clicked();
void on_updateAcceptBtn_clicked(); void on_updateAcceptBtn_clicked();
......
...@@ -88,41 +88,74 @@ ...@@ -88,41 +88,74 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item alignment="Qt::AlignHCenter"> <item>
<widget class="QLabel" name="labelWarning"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="sizePolicy"> <property name="spacing">
<sizepolicy hsizetype="Fixed" vsizetype="Expanding"> <number>0</number>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>250</width>
<height>0</height>
</size>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: red;</string>
</property>
<property name="text">
<string>This update will restart Jami automatically</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="margin">
<number>3</number>
</property> </property>
</widget> <item>
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>10</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="labelWarning">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>250</width>
<height>0</height>
</size>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This update will restart Jami automatically&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
<property name="alignment">
<set>Qt::AlignHCenter|Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
<property name="margin">
<number>3</number>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>10</width>
<height>20</height>
</size>
</property>
</spacer>
</item>