避免用户能够多次点击更新
This commit is contained in:
parent
7a88e09f2f
commit
40e4e1bea7
3
Makefile
3
Makefile
|
@ -7,6 +7,3 @@ plugins:
|
||||||
cd plugin && make -j8
|
cd plugin && make -j8
|
||||||
updater:
|
updater:
|
||||||
cd backend && ./setup.py build
|
cd backend && ./setup.py build
|
||||||
clean:
|
|
||||||
cd plugin && make clean
|
|
||||||
|
|
||||||
|
|
|
@ -19,10 +19,6 @@ Build-Depends: debhelper (>= 9),
|
||||||
libqt5x11extras5-dev,
|
libqt5x11extras5-dev,
|
||||||
libxklavier-dev,
|
libxklavier-dev,
|
||||||
libkf5widgetsaddons-dev,
|
libkf5widgetsaddons-dev,
|
||||||
libkf5config-dev,
|
|
||||||
libkf5configwidgets-dev,
|
|
||||||
libkf5screen-dev,
|
|
||||||
libkf5screen-bin,
|
|
||||||
libkf5i18n-dev,
|
libkf5i18n-dev,
|
||||||
libkf5windowsystem-dev,
|
libkf5windowsystem-dev,
|
||||||
libkf5guiaddons-dev,
|
libkf5guiaddons-dev,
|
||||||
|
@ -30,31 +26,23 @@ Build-Depends: debhelper (>= 9),
|
||||||
libkf5xmlgui-dev,
|
libkf5xmlgui-dev,
|
||||||
libkf5globalaccel-dev,
|
libkf5globalaccel-dev,
|
||||||
qtdeclarative5-dev,
|
qtdeclarative5-dev,
|
||||||
libopencv-dev,
|
|
||||||
libdconf-dev,
|
libdconf-dev,
|
||||||
libmatemixer-dev,
|
libmatemixer-dev,
|
||||||
qtmultimedia5-dev,
|
qtmultimedia5-dev,
|
||||||
libxml2-dev,
|
libxml2-dev,
|
||||||
qtbase5-dev,
|
qtbase5-dev,
|
||||||
libcanberra-dev,
|
libcanberra-dev,
|
||||||
libx11-dev,
|
|
||||||
libxkbfile-dev,
|
|
||||||
libboost-dev,
|
libboost-dev,
|
||||||
qttools5-dev-tools,
|
qttools5-dev-tools,
|
||||||
libxcb-xkb-dev,
|
|
||||||
libpolkit-qt5-1-dev,
|
libpolkit-qt5-1-dev,
|
||||||
libpulse-dev,
|
libpulse-dev,
|
||||||
libkf5bluezqt-dev,
|
|
||||||
libkysec-dev,
|
libkysec-dev,
|
||||||
libpwquality-dev,
|
libpwquality-dev,
|
||||||
libudev-dev,
|
|
||||||
xserver-xorg-dev,
|
|
||||||
libupower-glib-dev,
|
|
||||||
libpam0g-dev,
|
libpam0g-dev,
|
||||||
yhkylin-backup-tools-dev(>=4.0.13-kylin19)[!sw64],
|
yhkylin-backup-tools-dev(>=4.0.13-kylin19)[!sw64],
|
||||||
libukui-log4qt-dev[!sw64],
|
libukui-log4qt-dev[!sw64],
|
||||||
libmate-desktop-dev,
|
libmate-desktop-dev,
|
||||||
ukui-control-center(>=3.1.1+2021-1026separate9),
|
libukcc-dev
|
||||||
Build-Depends-Indep: libxml-parser-perl,
|
Build-Depends-Indep: libxml-parser-perl,
|
||||||
intltool
|
intltool
|
||||||
Standards-Version: 3.8.0
|
Standards-Version: 3.8.0
|
||||||
|
|
|
@ -13,4 +13,4 @@ backend/build/lib/SystemUpdater/UpdateManagerVersion.py /usr/lib/python3.8/dist-
|
||||||
backend/build/lib/SystemUpdater/__init__.py /usr/lib/python3.8/dist-packages/SystemUpdater/
|
backend/build/lib/SystemUpdater/__init__.py /usr/lib/python3.8/dist-packages/SystemUpdater/
|
||||||
backend/build/lib/SystemUpdater/Core /usr/lib/python3.8/dist-packages/SystemUpdater/
|
backend/build/lib/SystemUpdater/Core /usr/lib/python3.8/dist-packages/SystemUpdater/
|
||||||
|
|
||||||
/plugin/libupgrade.so /usr/lib/*/ukui-control-center
|
plugin/libupgrade.so /usr/lib/
|
||||||
|
|
|
@ -8,3 +8,5 @@ if [ ! -f /var/cache/kylin-system-updater/kylin-system-updater.db ];then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
systemctl enable kylin-system-updater
|
systemctl enable kylin-system-updater
|
||||||
|
mkdir -p /usr/lib/`dpkg-architecture -qDEB_TARGET_MULTIARCH`/ukui-control-center/
|
||||||
|
mv /usr/lib/libupgrade.so /usr/lib/`dpkg-architecture -qDEB_TARGET_MULTIARCH`/ukui-control-center/
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
#!/usr/bin/make -f
|
#!/usr/bin/make -f
|
||||||
|
export DEB_HOST_GNU_TYPE=x86_64-linux-gnu
|
||||||
|
export DEB_TARGET_MULTIARCH=x86_64-linux-gnu
|
||||||
#export PYBUILD_INTERPRETERS=python3
|
#export PYBUILD_INTERPRETERS=python3
|
||||||
|
|
||||||
%:
|
%:
|
||||||
dh $@
|
dh $@
|
||||||
|
#override_dh_makeshlibs:
|
||||||
#--with=python3 --buildsystem=pybuild
|
#--with=python3 --buildsystem=pybuild
|
||||||
|
|
|
@ -98,7 +98,7 @@ void AppUpdateWid::showInstallStatues(QStringList appAptName,int progress,QStrin
|
||||||
if (!isUpdateAll && progress>50) {
|
if (!isUpdateAll && progress>50) {
|
||||||
updateAPPBtn->hide();
|
updateAPPBtn->hide();
|
||||||
appVersion->setText(tr("Being installed"));
|
appVersion->setText(tr("Being installed"));
|
||||||
appVersion->setToolTip(tr("Being installed"));
|
appVersion->setToolTip("");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -632,6 +632,8 @@ void AppUpdateWid::updateOneApp(bool status)
|
||||||
|
|
||||||
void AppUpdateWid::distUpgradePartial(bool status)
|
void AppUpdateWid::distUpgradePartial(bool status)
|
||||||
{
|
{
|
||||||
|
if(status)
|
||||||
|
emit startoneappupdate();
|
||||||
QStringList pkgname;
|
QStringList pkgname;
|
||||||
pkgname.append(appAllMsg.name);
|
pkgname.append(appAllMsg.name);
|
||||||
m_updateMutual->interface->asyncCall("DistUpgradePartial",status,pkgname);
|
m_updateMutual->interface->asyncCall("DistUpgradePartial",status,pkgname);
|
||||||
|
|
|
@ -140,6 +140,7 @@ signals:
|
||||||
void sendProgress(QString pkgName, int Progress, QString type);
|
void sendProgress(QString pkgName, int Progress, QString type);
|
||||||
void changeupdateall();
|
void changeupdateall();
|
||||||
void allappupdatefinishsignal();
|
void allappupdatefinishsignal();
|
||||||
|
void startoneappupdate();
|
||||||
|
|
||||||
|
|
||||||
// void aptFinish();
|
// void aptFinish();
|
||||||
|
|
|
@ -120,7 +120,6 @@ void TabWid::getAutoUpgradeStatus()
|
||||||
updateSource->killProcessSignal(pid.toInt(), 10);
|
updateSource->killProcessSignal(pid.toInt(), 10);
|
||||||
checkUpdateBtn->setEnabled(true);
|
checkUpdateBtn->setEnabled(true);
|
||||||
checkUpdateBtn->setText(tr("Check Update"));
|
checkUpdateBtn->setText(tr("Check Update"));
|
||||||
checkUpdateBtn->setToolTip(tr("Check Update"));
|
|
||||||
checkUpdateBtnClicked();
|
checkUpdateBtnClicked();
|
||||||
} else if (!ret.compare("install")){
|
} else if (!ret.compare("install")){
|
||||||
isAutoUpgrade = true;
|
isAutoUpgrade = true;
|
||||||
|
@ -128,7 +127,6 @@ void TabWid::getAutoUpgradeStatus()
|
||||||
isAllUpgrade = true;
|
isAllUpgrade = true;
|
||||||
checkUpdateBtn->hide();
|
checkUpdateBtn->hide();
|
||||||
checkUpdateBtn->setText(tr("UpdateAll"));
|
checkUpdateBtn->setText(tr("UpdateAll"));
|
||||||
checkUpdateBtn->setToolTip(tr("UpdateAll"));
|
|
||||||
bool ret = autoUpdateLoadUpgradeList(false);
|
bool ret = autoUpdateLoadUpgradeList(false);
|
||||||
if (!ret)
|
if (!ret)
|
||||||
updateMutual->disconnectDbusSignal();
|
updateMutual->disconnectDbusSignal();
|
||||||
|
@ -136,13 +134,11 @@ void TabWid::getAutoUpgradeStatus()
|
||||||
/*如果没有进行自动更新,那就不需要操作 */
|
/*如果没有进行自动更新,那就不需要操作 */
|
||||||
checkUpdateBtn->setEnabled(true);
|
checkUpdateBtn->setEnabled(true);
|
||||||
checkUpdateBtn->setText(tr("Check Update"));
|
checkUpdateBtn->setText(tr("Check Update"));
|
||||||
checkUpdateBtn->setToolTip(tr("Check Update"));
|
|
||||||
checkUpdateBtnClicked();
|
checkUpdateBtnClicked();
|
||||||
} else {
|
} else {
|
||||||
/*如果读不到,默认也不进行操作*/
|
/*如果读不到,默认也不进行操作*/
|
||||||
checkUpdateBtn->setEnabled(true);
|
checkUpdateBtn->setEnabled(true);
|
||||||
checkUpdateBtn->setText(tr("Check Update"));
|
checkUpdateBtn->setText(tr("Check Update"));
|
||||||
checkUpdateBtn->setToolTip(tr("Check Update"));
|
|
||||||
checkUpdateBtnClicked();
|
checkUpdateBtnClicked();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -172,7 +168,6 @@ bool TabWid::autoUpdateLoadUpgradeList(bool isBackUp)
|
||||||
lastRefreshTime->setText(tr("Last refresh:")+ updatetime);
|
lastRefreshTime->setText(tr("Last refresh:")+ updatetime);
|
||||||
lastRefreshTime->show();
|
lastRefreshTime->show();
|
||||||
checkUpdateBtn->setText(tr("Check Update"));
|
checkUpdateBtn->setText(tr("Check Update"));
|
||||||
checkUpdateBtn->setToolTip(tr("Check Update"));
|
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
QStringList list;
|
QStringList list;
|
||||||
|
@ -226,7 +221,6 @@ void TabWid::backupMessageBox(QString str)
|
||||||
// checkUpdateBtn->setText(tr("全部更新"));
|
// checkUpdateBtn->setText(tr("全部更新"));
|
||||||
versionInformationLab->setText(tr("Updatable app detected on your system!"));
|
versionInformationLab->setText(tr("Updatable app detected on your system!"));
|
||||||
checkUpdateBtn->setText(tr("UpdateAll"));
|
checkUpdateBtn->setText(tr("UpdateAll"));
|
||||||
checkUpdateBtn->setToolTip(tr("UpdateAll"));
|
|
||||||
foreach (AppUpdateWid *wid, widgetList) {
|
foreach (AppUpdateWid *wid, widgetList) {
|
||||||
wid->updateAPPBtn->show();
|
wid->updateAPPBtn->show();
|
||||||
}
|
}
|
||||||
|
@ -276,12 +270,10 @@ void TabWid::isCancelabled(bool status)
|
||||||
if(status)
|
if(status)
|
||||||
{
|
{
|
||||||
checkUpdateBtn->setText(tr("Cancel"));
|
checkUpdateBtn->setText(tr("Cancel"));
|
||||||
checkUpdateBtn->setToolTip(tr("Cancel"));
|
|
||||||
checkUpdateBtn->setEnabled(true);
|
checkUpdateBtn->setEnabled(true);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
checkUpdateBtn->setText(tr("Cancel"));
|
checkUpdateBtn->setText(tr("Cancel"));
|
||||||
checkUpdateBtn->setToolTip(tr("Cancel"));
|
|
||||||
checkUpdateBtn->setEnabled(false);
|
checkUpdateBtn->setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -291,7 +283,6 @@ void TabWid::DependResloveResult(bool ResloveStatus,bool ResloveResult,QStringLi
|
||||||
{
|
{
|
||||||
checkUpdateBtn->stop();
|
checkUpdateBtn->stop();
|
||||||
checkUpdateBtn->setText(tr("Calculated"));
|
checkUpdateBtn->setText(tr("Calculated"));
|
||||||
checkUpdateBtn->setToolTip(tr("Calculated"));
|
|
||||||
if (!ResloveResult)
|
if (!ResloveResult)
|
||||||
{
|
{
|
||||||
emit updateAllSignal(true);
|
emit updateAllSignal(true);
|
||||||
|
@ -431,7 +422,7 @@ void TabWid::backupProgress(int progress)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
versionInformationLab->setText(tr("System is backing up..."));
|
versionInformationLab->setText(tr("System is backing up..."));
|
||||||
//allProgressBar->setValue(progress);
|
allProgressBar->setValue(progress);
|
||||||
checkUpdateBtn->hide();
|
checkUpdateBtn->hide();
|
||||||
allProgressBar->show();
|
allProgressBar->show();
|
||||||
lastRefreshTime->hide();
|
lastRefreshTime->hide();
|
||||||
|
@ -471,7 +462,6 @@ void TabWid::backupHideUpdateBtn(int result)
|
||||||
checkUpdateBtn->setEnabled(true);
|
checkUpdateBtn->setEnabled(true);
|
||||||
// checkUpdateBtn->setText(tr("全部更新"));
|
// checkUpdateBtn->setText(tr("全部更新"));
|
||||||
checkUpdateBtn->setText(tr("UpdateAll"));
|
checkUpdateBtn->setText(tr("UpdateAll"));
|
||||||
checkUpdateBtn->setToolTip(tr("UpdateAll"));
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -602,7 +592,6 @@ void TabWid::slotUpdateCache(bool result,QStringList pkgname, QString error ,QSt
|
||||||
checkUpdateBtn->stop();
|
checkUpdateBtn->stop();
|
||||||
// checkUpdateBtn->setText(tr("检查更新"));
|
// checkUpdateBtn->setText(tr("检查更新"));
|
||||||
checkUpdateBtn->setText(tr("Check Update"));
|
checkUpdateBtn->setText(tr("Check Update"));
|
||||||
checkUpdateBtn->setToolTip(tr("Check Update"));
|
|
||||||
// versionInformationLab->setText(tr("软件源更新失败:")+failedInfo );
|
// versionInformationLab->setText(tr("软件源更新失败:")+failedInfo );
|
||||||
versionInformationLab->setText(tr("Software source update failed: ")+error);
|
versionInformationLab->setText(tr("Software source update failed: ")+error);
|
||||||
disconnect(updateSource->serviceInterface,SIGNAL(updateTemplateStatus(QString)),this,SLOT(slotUpdateTemplate(QString)));
|
disconnect(updateSource->serviceInterface,SIGNAL(updateTemplateStatus(QString)),this,SLOT(slotUpdateTemplate(QString)));
|
||||||
|
@ -635,7 +624,6 @@ void TabWid::allComponents()
|
||||||
scrollArea = new QScrollArea(this);
|
scrollArea = new QScrollArea(this);
|
||||||
|
|
||||||
updateTab = new QWidget(this); //更新页面
|
updateTab = new QWidget(this); //更新页面
|
||||||
updateTab->setMaximumSize(960,960);
|
|
||||||
AppMessage = new QVBoxLayout();
|
AppMessage = new QVBoxLayout();
|
||||||
AppMessage->setAlignment(Qt::AlignTop);
|
AppMessage->setAlignment(Qt::AlignTop);
|
||||||
updateTab->setLayout(AppMessage);
|
updateTab->setLayout(AppMessage);
|
||||||
|
@ -675,7 +663,6 @@ void TabWid::allComponents()
|
||||||
QHBoxLayout *historyUpdateLogLayout = new QHBoxLayout();
|
QHBoxLayout *historyUpdateLogLayout = new QHBoxLayout();
|
||||||
historyUpdateLog = new QPushButton(this); // 历史日志弹出窗口控制按钮
|
historyUpdateLog = new QPushButton(this); // 历史日志弹出窗口控制按钮
|
||||||
// historyUpdateLog->setText(tr("查看更新历史"));
|
// historyUpdateLog->setText(tr("查看更新历史"));
|
||||||
//~ contents_path /upgrade/View history
|
|
||||||
historyUpdateLog->setText(tr("View history"));
|
historyUpdateLog->setText(tr("View history"));
|
||||||
historyUpdateLogWid->setLayout(historyUpdateLogLayout);
|
historyUpdateLogWid->setLayout(historyUpdateLogLayout);
|
||||||
historyUpdateLogLayout->setAlignment(Qt::AlignLeft);
|
historyUpdateLogLayout->setAlignment(Qt::AlignLeft);
|
||||||
|
@ -745,7 +732,7 @@ void TabWid::allComponents()
|
||||||
|
|
||||||
updateSettingLab = new TitleLabel();
|
updateSettingLab = new TitleLabel();
|
||||||
// updateSettingLab->setText(tr("更新设置"));
|
// updateSettingLab->setText(tr("更新设置"));
|
||||||
//~ contents_path /Upgrade/Update Settings
|
//~ contents_path /upgrade/Update Settings
|
||||||
updateSettingLab->setText(tr("Update Settings"));
|
updateSettingLab->setText(tr("Update Settings"));
|
||||||
updateSettingLab->setFixedHeight(27);
|
updateSettingLab->setFixedHeight(27);
|
||||||
updateSettingWidget = new QWidget(this);
|
updateSettingWidget = new QWidget(this);
|
||||||
|
@ -757,7 +744,6 @@ void TabWid::allComponents()
|
||||||
isAutoCheckLayout = new QHBoxLayout();
|
isAutoCheckLayout = new QHBoxLayout();
|
||||||
isAutoCheckedLab = new QLabel();
|
isAutoCheckedLab = new QLabel();
|
||||||
// isAutoCheckedLab->setText(tr("允许通知可更新的应用"));
|
// isAutoCheckedLab->setText(tr("允许通知可更新的应用"));
|
||||||
//~ contents_path /Upgrade/Allowed to renewable notice
|
|
||||||
isAutoCheckedLab->setText(tr("Allowed to renewable notice"));
|
isAutoCheckedLab->setText(tr("Allowed to renewable notice"));
|
||||||
isAutoCheckSBtn = new SwitchButton();
|
isAutoCheckSBtn = new SwitchButton();
|
||||||
isAutoCheckWidget->setLayout(isAutoCheckLayout);
|
isAutoCheckWidget->setLayout(isAutoCheckLayout);
|
||||||
|
@ -825,7 +811,6 @@ void TabWid::allComponents()
|
||||||
isAutoUpgradeWidget->setFrameShape(QFrame::Box);
|
isAutoUpgradeWidget->setFrameShape(QFrame::Box);
|
||||||
isAutoUpgradeLayout = new QVBoxLayout();
|
isAutoUpgradeLayout = new QVBoxLayout();
|
||||||
isAutoUpgradeLab = new QLabel();
|
isAutoUpgradeLab = new QLabel();
|
||||||
//~ contents_path /Upgrade/Automatically download and install updates
|
|
||||||
isAutoUpgradeLab->setText(tr("Automatically download and install updates"));
|
isAutoUpgradeLab->setText(tr("Automatically download and install updates"));
|
||||||
autoUpgradeLab = new QLabel();
|
autoUpgradeLab = new QLabel();
|
||||||
autoUpgradeLab->setText(tr("After it is turned on, the system will automatically download and install updates when there is an available network and available backup and restore partitions."));
|
autoUpgradeLab->setText(tr("After it is turned on, the system will automatically download and install updates when there is an available network and available backup and restore partitions."));
|
||||||
|
@ -898,6 +883,7 @@ void TabWid::loadingOneUpdateMsgSlot(AppAllMsg msg)
|
||||||
connect(updateMutual,&UpdateDbus::sendFinishGetMsgSignal,appWidget,&AppUpdateWid::showUpdateBtn);
|
connect(updateMutual,&UpdateDbus::sendFinishGetMsgSignal,appWidget,&AppUpdateWid::showUpdateBtn);
|
||||||
connect(appWidget,&AppUpdateWid::filelockedSignal,this,&TabWid::waitCrucialInstalled);
|
connect(appWidget,&AppUpdateWid::filelockedSignal,this,&TabWid::waitCrucialInstalled);
|
||||||
connect(backup,&BackUp::bakeupFinish,appWidget,&AppUpdateWid::hideOrShowUpdateBtnSlot);
|
connect(backup,&BackUp::bakeupFinish,appWidget,&AppUpdateWid::hideOrShowUpdateBtnSlot);
|
||||||
|
connect(appWidget,&AppUpdateWid::startoneappupdate,this,&TabWid::startoneappupdateslot);
|
||||||
/*判断是否是后台自动更新*/
|
/*判断是否是后台自动更新*/
|
||||||
if (isAutoUpgrade) {
|
if (isAutoUpgrade) {
|
||||||
// connect(appWidget, &AppUpdateWid::sendProgress, this, &TabWid::getAllProgress);
|
// connect(appWidget, &AppUpdateWid::sendProgress, this, &TabWid::getAllProgress);
|
||||||
|
@ -945,7 +931,6 @@ void TabWid::loadingFinishedSlot(int size)
|
||||||
checkUpdateBtn->stop();
|
checkUpdateBtn->stop();
|
||||||
// checkUpdateBtn->setText(tr("检查更新"));
|
// checkUpdateBtn->setText(tr("检查更新"));
|
||||||
checkUpdateBtn->setText(tr("Check Update"));
|
checkUpdateBtn->setText(tr("Check Update"));
|
||||||
checkUpdateBtn->setToolTip(tr("Check Update"));
|
|
||||||
// versionInformationLab->setText(tr("您的系统已是最新!"));
|
// versionInformationLab->setText(tr("您的系统已是最新!"));
|
||||||
versionInformationLab->setText(tr("Your system is the latest!"));
|
versionInformationLab->setText(tr("Your system is the latest!"));
|
||||||
disconnect(updateMutual->interface,SIGNAL(UpdateDloadAndInstStaChanged(QStringList,int,QString,QString)),this,SLOT(getAllProgress(QStringList,int,QString,QString)));
|
disconnect(updateMutual->interface,SIGNAL(UpdateDloadAndInstStaChanged(QStringList,int,QString,QString)),this,SLOT(getAllProgress(QStringList,int,QString,QString)));
|
||||||
|
@ -970,7 +955,6 @@ void TabWid::loadingFinishedSlot(int size)
|
||||||
checkUpdateBtn->setEnabled(true);
|
checkUpdateBtn->setEnabled(true);
|
||||||
// checkUpdateBtn->setText(tr("全部更新"));
|
// checkUpdateBtn->setText(tr("全部更新"));
|
||||||
checkUpdateBtn->setText(tr("UpdateAll"));
|
checkUpdateBtn->setText(tr("UpdateAll"));
|
||||||
checkUpdateBtn->setToolTip(tr("UpdateAll"));
|
|
||||||
// versionInformationLab->setText(tr("检测到你的系统有可更新的应用!"));
|
// versionInformationLab->setText(tr("检测到你的系统有可更新的应用!"));
|
||||||
if (!isAutoUpgrade) {
|
if (!isAutoUpgrade) {
|
||||||
versionInformationLab->setText(tr("Updatable app detected on your system!"));
|
versionInformationLab->setText(tr("Updatable app detected on your system!"));
|
||||||
|
@ -988,7 +972,6 @@ void TabWid::allappupdatefinishSlot()
|
||||||
checkUpdateBtn->stop();
|
checkUpdateBtn->stop();
|
||||||
// checkUpdateBtn->setText(tr("检查更新"));
|
// checkUpdateBtn->setText(tr("检查更新"));
|
||||||
checkUpdateBtn->setText(tr("Check Update"));
|
checkUpdateBtn->setText(tr("Check Update"));
|
||||||
checkUpdateBtn->setToolTip(tr("Check Update"));
|
|
||||||
// versionInformationLab->setText(tr("您的系统已是最新!"));
|
// versionInformationLab->setText(tr("您的系统已是最新!"));
|
||||||
versionInformationLab->setText(tr("Your system is the latest!"));
|
versionInformationLab->setText(tr("Your system is the latest!"));
|
||||||
disconnect(updateMutual->interface,SIGNAL(UpdateDloadAndInstStaChanged(QStringList,int,QString,QString)),this,SLOT(getAllProgress(QStringList,int,QString,QString)));
|
disconnect(updateMutual->interface,SIGNAL(UpdateDloadAndInstStaChanged(QStringList,int,QString,QString)),this,SLOT(getAllProgress(QStringList,int,QString,QString)));
|
||||||
|
@ -1271,11 +1254,18 @@ void TabWid::slotCancelDownload()
|
||||||
checkUpdateBtn->setEnabled(true);
|
checkUpdateBtn->setEnabled(true);
|
||||||
// checkUpdateBtn->setText("全部更新");
|
// checkUpdateBtn->setText("全部更新");
|
||||||
checkUpdateBtn->setText(tr("UpdateAll"));
|
checkUpdateBtn->setText(tr("UpdateAll"));
|
||||||
checkUpdateBtn->setToolTip(tr("UpdateAll"));
|
|
||||||
checkUpdateBtn->setCheckable(true);
|
checkUpdateBtn->setCheckable(true);
|
||||||
versionInformationLab->setText(tr("update has been canceled!"));
|
versionInformationLab->setText(tr("update has been canceled!"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TabWid::startoneappupdateslot()
|
||||||
|
{
|
||||||
|
foreach (AppUpdateWid *wid, widgetList) {
|
||||||
|
if(wid->updateAPPBtn->text() == tr("Update"))
|
||||||
|
wid->updateAPPBtn->setEnabled(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void TabWid::hideUpdateBtnSlot(bool state,QStringList pkgname,QString error,QString reason)
|
void TabWid::hideUpdateBtnSlot(bool state,QStringList pkgname,QString error,QString reason)
|
||||||
{
|
{
|
||||||
Q_UNUSED(pkgname);
|
Q_UNUSED(pkgname);
|
||||||
|
@ -1283,7 +1273,6 @@ void TabWid::hideUpdateBtnSlot(bool state,QStringList pkgname,QString error,QStr
|
||||||
checkUpdateBtn->stop();
|
checkUpdateBtn->stop();
|
||||||
// checkUpdateBtn->setText(tr("检查更新"));
|
// checkUpdateBtn->setText(tr("检查更新"));
|
||||||
checkUpdateBtn->setText(tr("Check Update"));
|
checkUpdateBtn->setText(tr("Check Update"));
|
||||||
checkUpdateBtn->setToolTip(tr("Check Update"));
|
|
||||||
if(state) {
|
if(state) {
|
||||||
versionInformationLab->setText(tr("Your system is the latest!"));
|
versionInformationLab->setText(tr("Your system is the latest!"));
|
||||||
systemPortraitLab->setPixmap(QPixmap(":/img/plugins/upgrade/normal.png").scaled(96,96));
|
systemPortraitLab->setPixmap(QPixmap(":/img/plugins/upgrade/normal.png").scaled(96,96));
|
||||||
|
@ -1335,7 +1324,9 @@ void TabWid::oneappUpdateresultSlot(bool state,QStringList pkgname,QString error
|
||||||
checkUpdateBtn->stop();
|
checkUpdateBtn->stop();
|
||||||
// checkUpdateBtn->setText(tr("检查更新"));
|
// checkUpdateBtn->setText(tr("检查更新"));
|
||||||
checkUpdateBtn->setText(tr("UpdateAll"));
|
checkUpdateBtn->setText(tr("UpdateAll"));
|
||||||
checkUpdateBtn->setToolTip(tr("UpdateAll"));
|
foreach (AppUpdateWid *wid, widgetList) {
|
||||||
|
wid->updateAPPBtn->setEnabled(true);
|
||||||
|
}
|
||||||
if(state) {
|
if(state) {
|
||||||
versionInformationLab->setText(tr("Part of the update success!"));
|
versionInformationLab->setText(tr("Part of the update success!"));
|
||||||
systemPortraitLab->setPixmap(QPixmap(":/img/plugins/upgrade/normal.png").scaled(96,96));
|
systemPortraitLab->setPixmap(QPixmap(":/img/plugins/upgrade/normal.png").scaled(96,96));
|
||||||
|
@ -1370,7 +1361,6 @@ void TabWid::oneappUpdateresultSlot(bool state,QStringList pkgname,QString error
|
||||||
checkUpdateBtn->stop();
|
checkUpdateBtn->stop();
|
||||||
// checkUpdateBtn->setText(tr("检查更新"));
|
// checkUpdateBtn->setText(tr("检查更新"));
|
||||||
checkUpdateBtn->setText(tr("Check Update"));
|
checkUpdateBtn->setText(tr("Check Update"));
|
||||||
checkUpdateBtn->setToolTip(tr("Check Update"));
|
|
||||||
versionInformationLab->setText(tr("Your system is the latest!"));
|
versionInformationLab->setText(tr("Your system is the latest!"));
|
||||||
systemPortraitLab->setPixmap(QPixmap(":/img/plugins/upgrade/normal.png").scaled(96,96));
|
systemPortraitLab->setPixmap(QPixmap(":/img/plugins/upgrade/normal.png").scaled(96,96));
|
||||||
checkUpdateBtn->hide();
|
checkUpdateBtn->hide();
|
||||||
|
@ -1402,7 +1392,6 @@ void TabWid::updatecancel(void)
|
||||||
checkUpdateBtn->stop();
|
checkUpdateBtn->stop();
|
||||||
// checkUpdateBtn->setText(tr("检查更新"));
|
// checkUpdateBtn->setText(tr("检查更新"));
|
||||||
checkUpdateBtn->setText(tr("UpdateAll"));
|
checkUpdateBtn->setText(tr("UpdateAll"));
|
||||||
checkUpdateBtn->setToolTip(tr("UpdateAll"));
|
|
||||||
versionInformationLab->setText(tr("update has been canceled!"));
|
versionInformationLab->setText(tr("update has been canceled!"));
|
||||||
checkUpdateBtn->show();
|
checkUpdateBtn->show();
|
||||||
}
|
}
|
||||||
|
@ -1416,7 +1405,6 @@ void TabWid::changeUpdateAllSlot(bool isUpdate)
|
||||||
if(checkUpdateBtn->isEnabled() == false)
|
if(checkUpdateBtn->isEnabled() == false)
|
||||||
{
|
{
|
||||||
checkUpdateBtn->setText(tr("UpdateAll"));
|
checkUpdateBtn->setText(tr("UpdateAll"));
|
||||||
checkUpdateBtn->setToolTip(tr("UpdateAll"));
|
|
||||||
checkUpdateBtn->setEnabled(true);
|
checkUpdateBtn->setEnabled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1561,7 +1549,6 @@ void TabWid::updateAllApp(bool status)
|
||||||
{
|
{
|
||||||
if(!status){
|
if(!status){
|
||||||
checkUpdateBtn->setText(tr("Calculating"));
|
checkUpdateBtn->setText(tr("Calculating"));
|
||||||
checkUpdateBtn->setToolTip(tr("Calculating"));
|
|
||||||
}else{
|
}else{
|
||||||
foreach (AppUpdateWid *wid, widgetList) {
|
foreach (AppUpdateWid *wid, widgetList) {
|
||||||
wid->updateAPPBtn->hide();
|
wid->updateAPPBtn->hide();
|
||||||
|
|
|
@ -166,6 +166,7 @@ public slots:
|
||||||
void allappupdatefinishSlot();
|
void allappupdatefinishSlot();
|
||||||
void changeUpdateAllSlot(bool isUpdate);
|
void changeUpdateAllSlot(bool isUpdate);
|
||||||
void updatecancel(void);
|
void updatecancel(void);
|
||||||
|
void startoneappupdateslot(void);
|
||||||
|
|
||||||
void DownloadLimitSwitchChanged();
|
void DownloadLimitSwitchChanged();
|
||||||
void DownloadLimitValueChanged(const QString &);
|
void DownloadLimitValueChanged(const QString &);
|
||||||
|
|
Loading…
Reference in New Issue