SYNERGY-936 New message for expired licenses
This commit is contained in:
parent
850fd20ff1
commit
dc66eb3167
3 changed files with 74 additions and 81 deletions
|
|
@ -174,27 +174,19 @@ LicenseManager::getTrialNotice() const
|
|||
QString Notice;
|
||||
|
||||
if (m_serialKey.isExpired(::time(0))){
|
||||
Notice = "<html><head/><body><p>Your %1 trial has expired. <a href="
|
||||
"\"https://members.symless.com/purchase\">"
|
||||
"<span style=\"text-decoration: underline;color:#0000ff;\">"
|
||||
"Buy now!</span></a></p></body></html>";
|
||||
Notice = Notice.arg(LicenseManager::getEditionName(activeEdition()));
|
||||
Notice = "<html><head/><body><p>"
|
||||
"Trial expired - "
|
||||
"<a href=\"https://members.symless.com/purchase\" style=\"color: #FFFFFF;\">Buy now</a>"
|
||||
"</p></body></html>";
|
||||
}
|
||||
else{
|
||||
Notice = "<html><head/><body><p><span style=\""
|
||||
"font-weight:600;\">%1</span> day%3 of "
|
||||
"your %2 trial remain%5. <a href="
|
||||
"\"https://members.symless.com/purchase\">"
|
||||
"<span style=\"text-decoration: underline;"
|
||||
" color:#0000ff;\">Buy now!</span></a>"
|
||||
Notice = "<html><head/><body><p>"
|
||||
"Trial expires in %1 day%2 - "
|
||||
"<a href=\"https://members.symless.com/purchase\" style=\"color: #FFFFFF;\">Buy now</a>"
|
||||
"</p></body></html>";
|
||||
|
||||
time_t daysLeft = m_serialKey.daysLeft(::time(0));
|
||||
Notice = Notice
|
||||
.arg (daysLeft)
|
||||
.arg (LicenseManager::getEditionName(activeEdition()))
|
||||
.arg ((daysLeft == 1) ? "" : "s")
|
||||
.arg ((daysLeft == 1) ? "s" : "");
|
||||
Notice = Notice.arg (daysLeft).arg ((daysLeft == 1) ? "" : "s");
|
||||
}
|
||||
|
||||
return Notice;
|
||||
|
|
@ -206,18 +198,15 @@ LicenseManager::getTemporaryNotice() const
|
|||
QString Notice;
|
||||
|
||||
if (m_serialKey.isExpired(::time(0))) {
|
||||
Notice = "<html><head/><body><p>Your license has expired. <a href="
|
||||
"\"https://members.symless.com/purchase\">"
|
||||
"<span style=\"text-decoration: underline;color:#0000ff;\">"
|
||||
"Renew now!</span></a></p></body></html>";
|
||||
Notice = "<html><head/><body><p>"
|
||||
"License expired - "
|
||||
"<a href=\"https://members.symless.com/purchase\" style=\"color: #FFFFFF;\">Renew now</a>"
|
||||
"</p></body></html>";
|
||||
}
|
||||
else if (m_serialKey.isExpiring(::time(0))) {
|
||||
Notice = "<html><head/><body><p><span style=\""
|
||||
"font-weight:600;\">%1</span> day%2 "
|
||||
"before your license expires.<a href="
|
||||
"\"https://members.symless.com/purchase\">"
|
||||
"<span style=\"text-decoration: underline;"
|
||||
" color:#0000ff;\">Renew now!</span></a>"
|
||||
Notice = "<html><head/><body><p>"
|
||||
"License expires in %1 day%2 - "
|
||||
"<a href=\"https://members.symless.com/purchase\" style=\"color: #FFFFFF;\">Renew now</a>"
|
||||
"</p></body></html>";
|
||||
|
||||
time_t daysLeft = m_serialKey.daysLeft(::time(0));
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ MainWindow::MainWindow (AppConfig& appConfig,
|
|||
setMinimumSize(size());
|
||||
#endif
|
||||
|
||||
m_trialWidget->hide();
|
||||
m_trialLabel->hide();
|
||||
|
||||
// hide padlock icon
|
||||
secureSocket(false);
|
||||
|
|
@ -1129,11 +1129,11 @@ void MainWindow::InvalidLicense()
|
|||
|
||||
void MainWindow::showLicenseNotice(const QString& notice)
|
||||
{
|
||||
this->m_trialWidget->hide();
|
||||
this->m_trialLabel->hide();
|
||||
|
||||
if (!notice.isEmpty()) {
|
||||
this->m_trialLabel->setText(notice);
|
||||
this->m_trialWidget->show();
|
||||
this->m_trialLabel->show();
|
||||
}
|
||||
|
||||
setWindowTitle (m_LicenseManager->activeEditionName());
|
||||
|
|
|
|||
|
|
@ -27,57 +27,6 @@
|
|||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QWidget" name="m_trialWidget" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>8</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../res/Synergy.qrc">:/res/icons/16x16/warning.png</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="m_trialLabel">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p><span style=" font-weight:600;">%1</span> days of your Synergy Pro trial remain. <a href="http://symless.com/pricing?src=gui"><span style=" text-decoration: underline; color:#0000ff;">Buy now!</span></a></p></body></html></string>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="m_pWidgetUpdate" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
|
|
@ -252,7 +201,7 @@
|
|||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><html><head/><body><p style="margin-left: 5px;">(<a href="#"><span style=" text-decoration: none; font-size: 13px; color:#007af4;">Settings</span></a>)</p></body></html></string>
|
||||
<string><html><head/><body><p style="margin-left: 5px;">(<a href="#"><span style=" text-decoration: none; font-size: 13px; color:#007af4;">Preferences</span></a>)</p></body></html></string>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
|
|
@ -818,6 +767,9 @@
|
|||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetDefaultConstraint</enum>
|
||||
</property>
|
||||
|
|
@ -854,6 +806,58 @@
|
|||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="m_trialLabel">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Arial</family>
|
||||
<pointsize>-1</pointsize>
|
||||
<weight>87</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font-size: 13px;
|
||||
font-weight: 700;
|
||||
padding: 3px 5px;
|
||||
border-radius: 3px;
|
||||
background-color: #EC4C47;
|
||||
color: #ffffff;
|
||||
top: 3px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><html><head/><body><p><span style=" font-weight:600;">%1</span> days of your Synergy Pro trial remain. <a href="http://symless.com/pricing?src=gui"><span style=" text-decoration: underline; color:#0000ff;">Buy now!</span></a></p></body></html></string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<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>
|
||||
<widget class="QPushButton" name="m_pButtonApply">
|
||||
<property name="enabled">
|
||||
|
|
|
|||
Loading…
Reference in a new issue