mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-12-13 20:32:05 +08:00
Merge remote-tracking branch 'upstream/dev' into dev
This commit is contained in:
@@ -157,7 +157,7 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>主页</string>
|
||||
<string>Home</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
@@ -194,7 +194,7 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>网络</string>
|
||||
<string>Network</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
@@ -222,7 +222,7 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>社交</string>
|
||||
<string>Chat</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
@@ -250,7 +250,7 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>音乐</string>
|
||||
<string>Music</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
@@ -278,7 +278,7 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>视频</string>
|
||||
<string>Video</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
@@ -306,7 +306,7 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>图像</string>
|
||||
<string>Picture</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
@@ -334,7 +334,7 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>游戏</string>
|
||||
<string>Game</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
@@ -362,7 +362,7 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>办公</string>
|
||||
<string>Office</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
@@ -390,7 +390,7 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>阅读</string>
|
||||
<string>Reading</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
@@ -418,7 +418,7 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>开发</string>
|
||||
<string>Development</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
@@ -446,7 +446,7 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>工具</string>
|
||||
<string>Tool</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
@@ -474,7 +474,7 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>主题</string>
|
||||
<string>Theme</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
@@ -502,7 +502,7 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>其他</string>
|
||||
<string>Other</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
@@ -530,7 +530,7 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>更新</string>
|
||||
<string>APP Upgrade</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>false</bool>
|
||||
|
||||
@@ -454,10 +454,10 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>A deepin-wine2 app.If you are using ubuntu or other non-deepin distro,you should deploy deepin-wine2 by your self.</p></body></html></string>
|
||||
<string><html><head/><body><p>A deepin-wine2 app. Spark Store will automatically configure the wine kit for you.</p></body></html></string>
|
||||
</property>
|
||||
<property name="whatsThis">
|
||||
<string><html><head/><body><p>A deepin-wine2 app.If you are using ubuntu or other non-deepin distro,you should deploy deepin-wine2 by your self.</p></body></html></string>
|
||||
<string><html><head/><body><p>A deepin-wine2 app. Spark Store will automatically configure the wine kit for you.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><html><head/><body><p><img src=":/tags/dwine2-small.png"/></p></body></html></string>
|
||||
@@ -530,10 +530,10 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>A deepin-wine5 app.If you are using ubuntu or other non-deepin distro,you should deploy deepin-wine5 by your self.</p></body></html></string>
|
||||
<string><html><head/><body><p>A deepin-wine5 app.Spark Store will automatically configure the wine kit for you</p></body></html></string>
|
||||
</property>
|
||||
<property name="whatsThis">
|
||||
<string><html><head/><body><p>A deepin-wine5 app.If you are using ubuntu or other non-deepin distro,you should deploy deepin-wine5 by your self.</p></body></html></string>
|
||||
<string><html><head/><body><p>A deepin-wine5 app.Spark Store will automatically configure the wine kit for you</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><html><head/><body><p><img src=":/tags/dwine5-small.png"/></p></body></html></string>
|
||||
@@ -666,7 +666,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>482</width>
|
||||
<width>485</width>
|
||||
<height>601</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
||||
@@ -163,33 +163,6 @@
|
||||
<item>
|
||||
<widget class="QWidget" name="widget_8" native="true">
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="1" column="0" colspan="4">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">color:#808080</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>Check update for Spark Store. </p></body></html></string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QPushButton" name="pushButton_updateApt">
|
||||
<property name="text">
|
||||
<string>Update</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Spark Store Update</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
@@ -203,10 +176,37 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="4">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">color:#808080</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>Check update for Spark Store. </p></body></html></string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Spark Store Update</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QPushButton" name="pushButton_updateApt">
|
||||
<property name="text">
|
||||
<string>Update</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="label_aptserver">
|
||||
<property name="text">
|
||||
<string>Server</string>
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -327,6 +327,9 @@
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
||||
@@ -11,10 +11,6 @@ DownloadItem::DownloadItem(QWidget *parent) :
|
||||
reinstall(false),
|
||||
close(false),
|
||||
ui(new Ui::DownloadItem),
|
||||
menu_install(new QMenu),
|
||||
action_dpkg(new QAction),
|
||||
action_deepin(new QAction),
|
||||
action_gdebi(new QAction),
|
||||
output_w(new DDialog),
|
||||
textbrowser(new QTextBrowser)
|
||||
{
|
||||
@@ -27,35 +23,6 @@ DownloadItem::DownloadItem(QWidget *parent) :
|
||||
ui->pushButton_3->hide();
|
||||
ui->widget_spinner->start();
|
||||
ui->widget_spinner->hide();
|
||||
action_dpkg->setText(tr("Spark Store App Installer"));
|
||||
action_deepin->setText(tr("deepin deb installer"));
|
||||
action_gdebi->setText(tr("gdebi"));
|
||||
|
||||
connect(action_dpkg,&QAction::triggered,[=](){DownloadItem::install(0);});
|
||||
connect(action_deepin,&QAction::triggered,[=](){DownloadItem::install(1);});
|
||||
connect(action_gdebi,&QAction::triggered,[=](){DownloadItem::install(2);});
|
||||
|
||||
// ssinstall 命令存在时再加入该选项
|
||||
QFile ssinstall("/usr/local/bin/ssinstall");
|
||||
ssinstall.open(QIODevice::ReadOnly);
|
||||
if(ssinstall.isOpen())
|
||||
{
|
||||
menu_install->addAction(action_dpkg);
|
||||
}
|
||||
|
||||
// QFile deepin("/usr/bin/deepin-deb-installer");
|
||||
// deepin.open(QIODevice::ReadOnly);
|
||||
// if(deepin.isOpen())
|
||||
// {
|
||||
// menu_install->addAction(action_deepin);
|
||||
// }
|
||||
// QFile gdebi("/usr/bin/gdebi");
|
||||
// gdebi.open(QIODevice::ReadOnly);
|
||||
// if(gdebi.isOpen())
|
||||
// {
|
||||
// menu_install->addAction(action_gdebi);
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
DownloadItem::~DownloadItem()
|
||||
@@ -94,8 +61,8 @@ void DownloadItem::readyInstall()
|
||||
{
|
||||
ui->progressBar->hide();
|
||||
ui->pushButton_install->setEnabled(true);
|
||||
DownloadItem::install(0);
|
||||
ui->pushButton_install->show();
|
||||
DownloadItem::install(0);
|
||||
ui->pushButton_2->hide();
|
||||
}
|
||||
}
|
||||
@@ -171,6 +138,7 @@ void DownloadItem::install(int t)
|
||||
if(error == 0)
|
||||
{
|
||||
ui->pushButton_install->hide();
|
||||
Utils::sendNotification("spark-store",tr("Spark Store"),tr("Installation complete."));
|
||||
ui->label_2->setText(tr("Finish"));
|
||||
ui->pushButton_3->show();
|
||||
}
|
||||
@@ -178,12 +146,14 @@ void DownloadItem::install(int t)
|
||||
{
|
||||
ui->pushButton_install->show();
|
||||
ui->pushButton_install->setText(tr("Retry"));
|
||||
Utils::sendNotification("spark-store",tr("Spark Store"),tr("Error happened in dpkg progress , you can try it again."));
|
||||
ui->label_2->setText(tr("Error happened in dpkg progress , you can try it again"));
|
||||
ui->pushButton_3->show();
|
||||
}
|
||||
|
||||
if(notRoot)
|
||||
{
|
||||
Utils::sendNotification("spark-store",tr("Spark Store"),tr("dpkg progress had been aborted,you can retry installation."));
|
||||
ui->label_2->setText(tr("dpkg progress had been aborted,you can retry installation"));
|
||||
ui->pushButton_install->show();
|
||||
ui->pushButton_3->hide();
|
||||
@@ -200,8 +170,7 @@ void DownloadItem::install(int t)
|
||||
|
||||
void DownloadItem::on_pushButton_install_clicked()
|
||||
{
|
||||
// 弹出菜单
|
||||
menu_install->exec(cursor().pos());
|
||||
DownloadItem::install(0);
|
||||
}
|
||||
|
||||
void DownloadItem::on_pushButton_2_clicked()
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <QTextBrowser>
|
||||
#include <QMenu>
|
||||
#include <QAction>
|
||||
|
||||
#include "utils/utils.h"
|
||||
#include <DDialog>
|
||||
DWIDGET_USE_NAMESPACE
|
||||
|
||||
|
||||
@@ -105,6 +105,9 @@
|
||||
<property name="text">
|
||||
<string>Name</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
@@ -160,7 +163,7 @@
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
|
||||
@@ -125,7 +125,6 @@ void DownloadListWidget::httpFinished() // 完成下载
|
||||
isBusy = false;
|
||||
downloaditemlist[nowDownload - 1]->readyInstall();
|
||||
downloaditemlist[nowDownload - 1]->free = true;
|
||||
Utils::sendNotification("spark-store",tr("Spark Store"),tr("The download is complete. Please click the download button on the title Bar to open the download list for installation"));
|
||||
emit downloadFinished();
|
||||
if(nowDownload < allDownload)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user