More update manager UI improvements.
This commit is contained in:
parent
6276e54932
commit
6a12462e50
@ -147,17 +147,8 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||||
<property name="leftMargin">
|
<property name="margin">
|
||||||
<number>32</number>
|
<number>28</number>
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>42</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>32</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>32</number>
|
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
@ -184,6 +175,49 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_5">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>5</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="hintIcon">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16</width>
|
||||||
|
<height>16</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="pixmap">
|
||||||
|
<pixmap resource="../res/Icons.qrc">:/icons/information.png</pixmap>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="hintLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>$(HINT_TEXT)</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="verticalSpacer">
|
<spacer name="verticalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
@ -199,6 +233,9 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -507,6 +544,17 @@
|
|||||||
<include location="../res/Images.qrc"/>
|
<include location="../res/Images.qrc"/>
|
||||||
<include location="../res/Images.qrc"/>
|
<include location="../res/Images.qrc"/>
|
||||||
<include location="../res/Images.qrc"/>
|
<include location="../res/Images.qrc"/>
|
||||||
|
<include location="../res/Images.qrc"/>
|
||||||
|
<include location="../res/Icons.qrc"/>
|
||||||
|
<include location="../res/Images.qrc"/>
|
||||||
|
<include location="../res/Icons.qrc"/>
|
||||||
|
<include location="../res/Images.qrc"/>
|
||||||
|
<include location="../res/Icons.qrc"/>
|
||||||
|
<include location="../res/Images.qrc"/>
|
||||||
|
<include location="../res/Icons.qrc"/>
|
||||||
|
<include location="../res/Images.qrc"/>
|
||||||
|
<include location="../res/Icons.qrc"/>
|
||||||
|
<include location="../res/Images.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections>
|
<connections>
|
||||||
<connection>
|
<connection>
|
||||||
|
@ -10,8 +10,10 @@
|
|||||||
<file>icons/arrow_down.png</file>
|
<file>icons/arrow_down.png</file>
|
||||||
<file>icons/arrow_up.png</file>
|
<file>icons/arrow_up.png</file>
|
||||||
<file>icons/arrow_refresh.png</file>
|
<file>icons/arrow_refresh.png</file>
|
||||||
|
<file>icons/bell.png</file>
|
||||||
<file>icons/bin.png</file>
|
<file>icons/bin.png</file>
|
||||||
<file>icons/bomb.png</file>
|
<file>icons/bomb.png</file>
|
||||||
|
<file>icons/bug.png</file>
|
||||||
<file>icons/calendar.png</file>
|
<file>icons/calendar.png</file>
|
||||||
<file>icons/cancel.png</file>
|
<file>icons/cancel.png</file>
|
||||||
<file>icons/cd.png</file>
|
<file>icons/cd.png</file>
|
||||||
@ -53,6 +55,7 @@
|
|||||||
<file>icons/play.png</file>
|
<file>icons/play.png</file>
|
||||||
<file>icons/resultset_next.png</file>
|
<file>icons/resultset_next.png</file>
|
||||||
<file>icons/script_edit.png</file>
|
<file>icons/script_edit.png</file>
|
||||||
|
<file>icons/server_error.png</file>
|
||||||
<file>icons/sound.png</file>
|
<file>icons/sound.png</file>
|
||||||
<file>icons/star.png</file>
|
<file>icons/star.png</file>
|
||||||
<file>icons/table_edit.png</file>
|
<file>icons/table_edit.png</file>
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
#define VER_LAMEXP_MAJOR 4
|
#define VER_LAMEXP_MAJOR 4
|
||||||
#define VER_LAMEXP_MINOR_HI 0
|
#define VER_LAMEXP_MINOR_HI 0
|
||||||
#define VER_LAMEXP_MINOR_LO 0
|
#define VER_LAMEXP_MINOR_LO 0
|
||||||
#define VER_LAMEXP_BUILD 134
|
#define VER_LAMEXP_BUILD 136
|
||||||
#define VER_LAMEXP_SUFFIX TechPreview
|
#define VER_LAMEXP_SUFFIX TechPreview
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -146,6 +146,8 @@ void UpdateDialog::showEvent(QShowEvent *event)
|
|||||||
retryButton->hide();
|
retryButton->hide();
|
||||||
logButton->hide();
|
logButton->hide();
|
||||||
infoLabel->hide();
|
infoLabel->hide();
|
||||||
|
hintLabel->hide();
|
||||||
|
hintIcon->hide();
|
||||||
|
|
||||||
int counter = 2;
|
int counter = 2;
|
||||||
for(int i = 0; known_hosts[i]; i++) counter++;
|
for(int i = 0; known_hosts[i]; i++) counter++;
|
||||||
@ -160,6 +162,18 @@ void UpdateDialog::closeEvent(QCloseEvent *event)
|
|||||||
if(!closeButton->isEnabled()) event->ignore();
|
if(!closeButton->isEnabled()) event->ignore();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void UpdateDialog::keyPressEvent(QKeyEvent *e)
|
||||||
|
{
|
||||||
|
if(e->key() == Qt::Key_F11)
|
||||||
|
{
|
||||||
|
if(closeButton->isEnabled()) logButtonClicked();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
QDialog::keyPressEvent(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void UpdateDialog::updateInit(void)
|
void UpdateDialog::updateInit(void)
|
||||||
{
|
{
|
||||||
setMinimumSize(size());
|
setMinimumSize(size());
|
||||||
@ -181,6 +195,8 @@ void UpdateDialog::checkForUpdates(void)
|
|||||||
retryButton->setEnabled(false);
|
retryButton->setEnabled(false);
|
||||||
logButton->setEnabled(false);
|
logButton->setEnabled(false);
|
||||||
if(infoLabel->isVisible()) infoLabel->hide();
|
if(infoLabel->isVisible()) infoLabel->hide();
|
||||||
|
if(hintLabel->isVisible()) hintLabel->hide();
|
||||||
|
if(hintIcon->isVisible()) hintIcon->hide();
|
||||||
|
|
||||||
QApplication::processEvents();
|
QApplication::processEvents();
|
||||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||||
@ -212,8 +228,12 @@ void UpdateDialog::checkForUpdates(void)
|
|||||||
closeButton->setEnabled(true);
|
closeButton->setEnabled(true);
|
||||||
retryButton->setEnabled(true);
|
retryButton->setEnabled(true);
|
||||||
logButton->setEnabled(true);
|
logButton->setEnabled(true);
|
||||||
statusLabel->setText("Connectivity test faild. Please check your internet connection!");
|
statusLabel->setText("Network connectivity test has faild!");
|
||||||
progressBar->setValue(progressBar->maximum());
|
progressBar->setValue(progressBar->maximum());
|
||||||
|
hintIcon->setPixmap(QIcon(":/icons/error.png").pixmap(16,16));
|
||||||
|
hintLabel->setText("Please make sure your internet connection is working properly and try again.");
|
||||||
|
hintIcon->show();
|
||||||
|
hintLabel->show();
|
||||||
LAMEXP_DELETE(m_updateInfo);
|
LAMEXP_DELETE(m_updateInfo);
|
||||||
if(m_settings->soundsEnabled()) PlaySound(MAKEINTRESOURCE(IDR_WAVE_ERROR), GetModuleHandle(NULL), SND_RESOURCE | SND_ASYNC);
|
if(m_settings->soundsEnabled()) PlaySound(MAKEINTRESOURCE(IDR_WAVE_ERROR), GetModuleHandle(NULL), SND_RESOURCE | SND_ASYNC);
|
||||||
QApplication::restoreOverrideCursor();
|
QApplication::restoreOverrideCursor();
|
||||||
@ -246,8 +266,12 @@ void UpdateDialog::checkForUpdates(void)
|
|||||||
closeButton->setEnabled(true);
|
closeButton->setEnabled(true);
|
||||||
retryButton->setEnabled(true);
|
retryButton->setEnabled(true);
|
||||||
logButton->setEnabled(true);
|
logButton->setEnabled(true);
|
||||||
statusLabel->setText("Failed to fetch update information from server. Try again later!");
|
statusLabel->setText("Failed to fetch update information from server!");
|
||||||
progressBar->setValue(progressBar->maximum());
|
progressBar->setValue(progressBar->maximum());
|
||||||
|
hintIcon->setPixmap(QIcon(":/icons/server_error.png").pixmap(16,16));
|
||||||
|
hintLabel->setText("Sorry, the update server might be busy at this time. Plase try again later.");
|
||||||
|
hintIcon->show();
|
||||||
|
hintLabel->show();
|
||||||
LAMEXP_DELETE(m_updateInfo);
|
LAMEXP_DELETE(m_updateInfo);
|
||||||
if(m_settings->soundsEnabled()) PlaySound(MAKEINTRESOURCE(IDR_WAVE_ERROR), GetModuleHandle(NULL), SND_RESOURCE | SND_ASYNC);
|
if(m_settings->soundsEnabled()) PlaySound(MAKEINTRESOURCE(IDR_WAVE_ERROR), GetModuleHandle(NULL), SND_RESOURCE | SND_ASYNC);
|
||||||
return;
|
return;
|
||||||
@ -261,17 +285,29 @@ void UpdateDialog::checkForUpdates(void)
|
|||||||
if(m_updateInfo->m_buildNo > lamexp_version_build())
|
if(m_updateInfo->m_buildNo > lamexp_version_build())
|
||||||
{
|
{
|
||||||
installButton->setEnabled(true);
|
installButton->setEnabled(true);
|
||||||
statusLabel->setText("A new version of LameXP is available. Update highly recommended!");
|
statusLabel->setText("A new version of LameXP is available!");
|
||||||
|
hintIcon->setPixmap(QIcon(":/icons/bell.png").pixmap(16,16));
|
||||||
|
hintLabel->setText("We highly recommend all users to install this update as soon as possible.");
|
||||||
|
hintIcon->show();
|
||||||
|
hintLabel->show();
|
||||||
MessageBeep(MB_ICONINFORMATION);
|
MessageBeep(MB_ICONINFORMATION);
|
||||||
}
|
}
|
||||||
else if(m_updateInfo->m_buildNo == lamexp_version_build())
|
else if(m_updateInfo->m_buildNo == lamexp_version_build())
|
||||||
{
|
{
|
||||||
statusLabel->setText("No new updates avialbale. Your version of LameXP is up-to-date.");
|
statusLabel->setText("No new updates avialbale at this time.");
|
||||||
|
hintIcon->setPixmap(QIcon(":/icons/information.png").pixmap(16,16));
|
||||||
|
hintLabel->setText("Your version of LameXP is still up-to-date. Please check for updates regularly!");
|
||||||
|
hintIcon->show();
|
||||||
|
hintLabel->show();
|
||||||
MessageBeep(MB_ICONINFORMATION);
|
MessageBeep(MB_ICONINFORMATION);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
statusLabel->setText("Your version appears to be newer than the latest release.");
|
statusLabel->setText("Your version appears to be newer than the latest release.");
|
||||||
|
hintIcon->setPixmap(QIcon(":/icons/bug.png").pixmap(16,16));
|
||||||
|
hintLabel->setText("This usually indicates your are currently using a pre-release version of LameXP.");
|
||||||
|
hintIcon->show();
|
||||||
|
hintLabel->show();
|
||||||
MessageBeep(MB_ICONEXCLAMATION);
|
MessageBeep(MB_ICONEXCLAMATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,6 +48,7 @@ private slots:
|
|||||||
protected:
|
protected:
|
||||||
void showEvent(QShowEvent *event);
|
void showEvent(QShowEvent *event);
|
||||||
void closeEvent(QCloseEvent *event);
|
void closeEvent(QCloseEvent *event);
|
||||||
|
void keyPressEvent(QKeyEvent *e);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool tryUpdateMirror(UpdateInfo *updateInfo, const QString &url);
|
bool tryUpdateMirror(UpdateInfo *updateInfo, const QString &url);
|
||||||
|
Loading…
Reference in New Issue
Block a user