mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-12-15 21:32:05 +08:00
Compare commits
7 Commits
4.2.3test4
...
4.2.2
| Author | SHA1 | Date | |
|---|---|---|---|
| 4ce19e25e5 | |||
| 41a6a3fc04 | |||
| 682a6e38d6 | |||
| 36d273dd5e | |||
| 8850cfd4a3 | |||
| bec8a14baf | |||
| 8918e63484 |
48
debian/changelog
vendored
48
debian/changelog
vendored
@@ -1,39 +1,3 @@
|
||||
spark-store (4.2.3~test4) stable; urgency=medium
|
||||
|
||||
* 修复: aptss 无法安装
|
||||
|
||||
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
|
||||
|
||||
spark-store (4.2.3~test3) stable; urgency=medium
|
||||
|
||||
* 调整:打包时从 debian/changelog 自动获取构建版本号并写入关于窗口保证与deb一致
|
||||
* 新增:支持 DTK 5.6.4 关于对话框“版本特性”显示功能。目前只在deepin编译安装时开启
|
||||
* 修复:修复下载列表对话框中,点击某个 item 取消下载按钮后下载列表无法再次显示的问题
|
||||
* 修复:多个应用安装可能会出现某一个应用没有安装
|
||||
* 修复:修复下载按钮点击/双击/拖动时,主窗口动作与下载管理对话框动作同时触发问题
|
||||
* aptss 获取线路信息 转到从 d. 服务器获取
|
||||
|
||||
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
|
||||
|
||||
spark-store (4.2.3~test2) stable; urgency=medium
|
||||
|
||||
* 调整:开启安装包加固
|
||||
* 添加:zh_TW翻译
|
||||
|
||||
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
|
||||
|
||||
|
||||
spark-store (4.2.3~test1) stable; urgency=medium
|
||||
|
||||
* 修复:因判断安装状态错误创建多个相同任务的bug
|
||||
* 测试中:尝试修复安装结束的闪退问题 https://gitee.com/deepin-community-store/spark-store/commit/cb093dcc2bb0a193db89aa0ce5f20ea9cc5d56eb
|
||||
* 修复:Deepin 显示开发者模式未开启
|
||||
* 修复:从托盘打开主窗口时透明度动画不流畅
|
||||
* 修复:主窗口关闭后,从托盘打开关于窗口会被主窗口遮挡
|
||||
|
||||
-- shenmo <shenmo@spark-app.store> Sun, 05 Feb 2023 23:00:00 +0800
|
||||
|
||||
|
||||
spark-store (4.2.2) stable; urgency=medium
|
||||
|
||||
* 调整:脚本应用的transhell支持转为source导入
|
||||
@@ -52,7 +16,6 @@ spark-store (4.2.1) stable; urgency=medium
|
||||
|
||||
--shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
|
||||
|
||||
|
||||
spark-store (4.2) stable; urgency=medium
|
||||
|
||||
* 调整:UOS开发者模式提示现在不会那么挤了
|
||||
@@ -62,14 +25,12 @@ spark-store (4.2) stable; urgency=medium
|
||||
|
||||
--shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
|
||||
|
||||
|
||||
spark-store (4.2~test3) stable; urgency=medium
|
||||
|
||||
* 修复: aptss ssupdates
|
||||
|
||||
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
|
||||
|
||||
|
||||
spark-store (4.2~test2) stable; urgency=medium
|
||||
|
||||
* 修复: 420t1版本中ssinstall有时会重新下载软件包的问题
|
||||
@@ -77,10 +38,8 @@ spark-store (4.2~test2) stable; urgency=medium
|
||||
* 调整: aptss在进行任何操作前均检测是否存在Packages文件,若存在,则不进行ssupdate
|
||||
* 调整: 修改apt-fast源代码以指定conf位置为/tmp/apt-fast,这部分不再使用bwrap模拟
|
||||
* 新增: aptss检测Package文件支持分目录(目前指定为store)
|
||||
|
||||
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
|
||||
|
||||
|
||||
spark-store (4.2~test1) stable; urgency=medium
|
||||
|
||||
* 新增: aptss支持显示报错
|
||||
@@ -89,7 +48,6 @@ spark-store (4.2~test1) stable; urgency=medium
|
||||
|
||||
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
|
||||
|
||||
|
||||
spark-store (4.1.2) stable; urgency=medium
|
||||
|
||||
* feat: 初步的wayland支持
|
||||
@@ -122,9 +80,10 @@ spark-store (4.1.2) stable; urgency=medium
|
||||
* chore: 暂时去除没有意义的 DBus 接口,使用 DGuiApplicationHelper::newProcessInstance 获取新进程的启动参数
|
||||
* chore: 更新翻译文件,去除已经不存在的翻译
|
||||
|
||||
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
|
||||
|
||||
|
||||
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
|
||||
|
||||
spark-store (4.1.2~test2) stable; urgency=medium
|
||||
|
||||
* feat: ssinstall支持从单独文件夹中校验软件包
|
||||
@@ -133,7 +92,6 @@ spark-store (4.1.2~test2) stable; urgency=medium
|
||||
|
||||
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
|
||||
|
||||
|
||||
spark-store (4.1.2~test1) stable; urgency=medium
|
||||
|
||||
* feat: 初步的wayland支持
|
||||
@@ -163,6 +121,7 @@ spark-store (4.1.2~test1) stable; urgency=medium
|
||||
* chore: 暂时去除没有意义的 DBus 接口,使用 DGuiApplicationHelper::newProcessInstance 获取新进程的启动参数
|
||||
* chore: 更新翻译文件,去除已经不存在的翻译
|
||||
|
||||
|
||||
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
|
||||
|
||||
|
||||
@@ -247,7 +206,6 @@ spark-store (3.3.3~test3) stable; urgency=medium
|
||||
|
||||
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
|
||||
|
||||
|
||||
spark-store (3.3.3~test2) stable; urgency=medium
|
||||
|
||||
* bug fix: 更新和检查更新出错时不报错.此更新需要一个推送
|
||||
|
||||
4
debian/control
vendored
4
debian/control
vendored
@@ -20,9 +20,9 @@ Build-Depends:
|
||||
qtwayland5-dev-tools,
|
||||
gcc,
|
||||
g++
|
||||
Standards-Version: 4.0.0
|
||||
Homepage: https://www.spark-app.store/
|
||||
|
||||
Standards-Version: 3.0
|
||||
Homepage: https://www.spark-app.store/
|
||||
Package: spark-store
|
||||
Architecture: any
|
||||
Depends:${shlibs:Depends}, ${misc:Depends},
|
||||
|
||||
11
debian/rules
vendored
11
debian/rules
vendored
@@ -1,11 +1,10 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
export QT_SELECT = qt5
|
||||
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||
export QT_SELECT=5
|
||||
include /usr/share/dpkg/default.mk
|
||||
|
||||
DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
|
||||
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
|
||||
DH_AUTO_ARGS = --parallel --buildsystem=qmake
|
||||
|
||||
# Uncomment this to turn on verbose mode.
|
||||
#export DH_VERBOSE=1
|
||||
@@ -19,17 +18,19 @@ override_dh_auto_clean:
|
||||
override_dh_auto_configure:
|
||||
mkdir -p $(CURDIR)/build
|
||||
|
||||
qmake BUILD_VERSION=$(DEB_VERSION_UPSTREAM) spark-store-project.pro \
|
||||
dh_auto_configure MAKEFLAGS=-j$(JOBS) -- spark-store-project.pro \
|
||||
-spec linux-g++ CONFIG+=qtquickcompiler \
|
||||
-o $(CURDIR)/build/
|
||||
|
||||
|
||||
override_dh_auto_build:
|
||||
make MAKEFLAGS="$(MAKEFLAGS)" -C $(CURDIR)/build
|
||||
make -C $(CURDIR)/build -j$(JOBS)
|
||||
|
||||
override_dh_auto_install:
|
||||
make -C $(CURDIR)/build install \
|
||||
INSTALL_ROOT=$(CURDIR)/debian/spark-store
|
||||
|
||||
|
||||
# Ignore the dpkg-shlibdeps: warning (it uses none of the library's symbols)
|
||||
# Qt Mutidedia lib will ref to network libraray.
|
||||
override_dh_shlibdeps:
|
||||
|
||||
20
debian/spark-store.postinst
vendored
20
debian/spark-store.postinst
vendored
@@ -2,8 +2,9 @@
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
|
||||
# Enable i386 arch
|
||||
echo "Enabling i386 arch..."
|
||||
echo "Enable i386 arch..."
|
||||
dpkg --add-architecture i386
|
||||
|
||||
# config for aptss
|
||||
@@ -11,7 +12,10 @@ case "$1" in
|
||||
ln -s -f /etc/apt/sources.list /etc/aptss/sources.list
|
||||
|
||||
# Remove the sources.list file
|
||||
rm -f /etc/apt/sources.list.d/sparkstore.list
|
||||
if [ -e /etc/apt/sources.list.d/sparkstore.list ];then
|
||||
rm /etc/apt/sources.list.d/sparkstore.list
|
||||
fi
|
||||
|
||||
|
||||
# Check if /usr/local/bin existed
|
||||
mkdir -p /usr/local/bin
|
||||
@@ -30,9 +34,9 @@ case "$1" in
|
||||
# Create symbol links for SSINSTALL
|
||||
ln -s -f /opt/durapps/spark-store/bin/auto-install-policy/store.spark-app.ssinstall.policy /usr/share/polkit-1/actions/store.spark-app.ssinstall.policy
|
||||
|
||||
# Compile sender module
|
||||
echo "Compiling the Sender module..."
|
||||
gcc -Wformat -Wformat-security -Werror=format-security /opt/durapps/spark-store/bin/ss-feedback/sender-d.sh.c -o /opt/durapps/spark-store/bin/ss-feedback/sender-d
|
||||
|
||||
gcc /opt/durapps/spark-store/bin/ss-feedback/sender-d.sh.c -o /opt/durapps/spark-store/bin/ss-feedback/sender-d
|
||||
|
||||
# Install key
|
||||
mkdir -p /tmp/spark-store-install/
|
||||
@@ -40,13 +44,17 @@ case "$1" in
|
||||
gpg --dearmor /tmp/spark-store-install/spark-store.asc
|
||||
cp -f /tmp/spark-store-install/spark-store.asc.gpg /etc/apt/trusted.gpg.d/spark-store.gpg
|
||||
|
||||
|
||||
|
||||
# Run apt update to avoid users being fucked up by the non-exist dependency problem
|
||||
# Now abandoned as aptss now run ssupdate everytime
|
||||
#aptss ssupdate
|
||||
|
||||
|
||||
# Start upgrade detect service
|
||||
systemctl enable spark-update-notifier
|
||||
systemctl start spark-update-notifier
|
||||
service spark-update-notifier start
|
||||
|
||||
|
||||
# Update certain caches
|
||||
update-icon-caches /usr/share/icons/hicolor || true
|
||||
@@ -59,6 +67,8 @@ case "$1" in
|
||||
|
||||
# Remove temp dir
|
||||
rm -rf /tmp/spark-store-install
|
||||
|
||||
|
||||
;;
|
||||
|
||||
triggered)
|
||||
|
||||
47
debian/spark-store.prerm
vendored
47
debian/spark-store.prerm
vendored
@@ -2,34 +2,47 @@
|
||||
|
||||
if [ "$1" = "remove" ] || [ "$1" = "purge" ];then
|
||||
# Remove residual symbol links
|
||||
rm -f /usr/local/bin/spark-store
|
||||
rm -f /usr/local/bin/ssinstall
|
||||
rm -f /usr/local/bin/ssaudit
|
||||
rm -f /usr/local/bin/spark-dstore-patch
|
||||
rm -f /usr/local/bin/ussinstall
|
||||
rm -f /usr/local/bin/ussremove
|
||||
rm -f /usr/local/bin/ss-apt-fast
|
||||
rm -f /usr/bin/aptss
|
||||
rm /usr/local/bin/spark-store
|
||||
rm /usr/local/bin/ssinstall
|
||||
rm /usr/local/bin/ssaudit
|
||||
rm /usr/local/bin/spark-dstore-patch
|
||||
rm /usr/local/bin/ussinstall
|
||||
rm /usr/local/bin/ussremove
|
||||
rm /usr/local/bin/ss-apt-fast
|
||||
rm /usr/bin/aptss
|
||||
|
||||
rm -rf /etc/aptss/
|
||||
|
||||
# Remove Sender module
|
||||
rm -f /opt/durapps/spark-store/bin/ss-feedback/sender-d
|
||||
rm /opt/durapps/spark-store/bin/ss-feedback/sender-d
|
||||
|
||||
# Remove residual symbol links to stop upgrade detect
|
||||
rm -f /etc/xdg/autostart/spark-update-notifier.desktop
|
||||
# Remove residual symbol links to stop upgrade detect if exist
|
||||
if [ -e /etc/xdg/autostart/spark-update-notifier.desktop ];then
|
||||
rm /etc/xdg/autostart/spark-update-notifier.desktop
|
||||
fi
|
||||
|
||||
# Shutdown services
|
||||
systemctl stop spark-update-notifier
|
||||
service spark-update-notifier stop
|
||||
|
||||
# Stop update detect service
|
||||
systemctl disable spark-update-notifier
|
||||
|
||||
|
||||
|
||||
# Clean the auto install polkit file if exist
|
||||
rm -f /usr/share/polkit-1/actions/store.spark-app.ssinstall.policy
|
||||
if [ -f "/usr/share/polkit-1/actions/store.spark-app.ssinstall.policy" ] ; then
|
||||
rm /usr/share/polkit-1/actions/store.spark-app.ssinstall.policy
|
||||
fi
|
||||
|
||||
# Remove gpg key file
|
||||
rm -f /etc/apt/trusted.gpg.d/spark-store.gpg
|
||||
apt-key del '9D9A A859 F750 24B1 A1EC E16E 0E41 D354 A29A 440C'
|
||||
else
|
||||
echo "非卸载操作,不进行配置清理"
|
||||
if [ -f "/etc/apt/trusted.gpg.d/spark-store.gpg" ] ; then
|
||||
rm /etc/apt/trusted.gpg.d/spark-store.gpg
|
||||
fi
|
||||
|
||||
apt-key del '9D9A A859 F750 24B1 A1EC E16E 0E41 D354 A29A 440C'
|
||||
|
||||
else
|
||||
|
||||
echo "非卸载操作,不进行配置清理"
|
||||
|
||||
fi
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 2d49950909e0327b0ad72e008cb82ac97b7bae0e Mon Sep 17 00:00:00 2001
|
||||
From abbfbf12c1ea9853039e6864d0ede91973189ce6 Mon Sep 17 00:00:00 2001
|
||||
From: zinface <zinface@163.com>
|
||||
Date: Sun, 11 Dec 2022 22:27:23 +0800
|
||||
Subject: [PATCH 01/11] =?UTF-8?q?repo:=20=E4=B8=80=E6=AC=A1=E6=80=A7?=
|
||||
Subject: [PATCH 01/10] =?UTF-8?q?repo:=20=E4=B8=80=E6=AC=A1=E6=80=A7?=
|
||||
=?UTF-8?q?=E5=AF=BC=E5=85=A5=20spark=20=E9=AA=A8=E6=9E=B6=E4=BB=A5?=
|
||||
=?UTF-8?q?=E5=8F=98=E4=B8=BA=20cmake=20=E6=9E=84=E5=BB=BA?=
|
||||
MIME-Version: 1.0
|
||||
@@ -1789,10 +1789,10 @@ index 0000000..0fa070b
|
||||
2.20.1
|
||||
|
||||
|
||||
From d2524f967848e6ba0d2c8a097183264d0d197d68 Mon Sep 17 00:00:00 2001
|
||||
From d1974334ce60291894b53f6839b78f3147aaa233 Mon Sep 17 00:00:00 2001
|
||||
From: zinface <zinface@163.com>
|
||||
Date: Sun, 11 Dec 2022 22:37:26 +0800
|
||||
Subject: [PATCH 02/11] =?UTF-8?q?repo:=20=E5=A4=84=E7=90=86=20deb=20?=
|
||||
Subject: [PATCH 02/10] =?UTF-8?q?repo:=20=E5=A4=84=E7=90=86=20deb=20?=
|
||||
=?UTF-8?q?=E5=AE=89=E8=A3=85=E8=84=9A=E6=9C=AC=E7=9A=84=E9=97=AE=E9=A2=98?=
|
||||
=?UTF-8?q?=EF=BC=8C=E5=AE=8C=E6=88=90=20cmake=20=E5=8C=96=E6=9E=84?=
|
||||
=?UTF-8?q?=E5=BB=BA?=
|
||||
@@ -1856,10 +1856,10 @@ index 2ab24e7..38ad2d7 100644
|
||||
2.20.1
|
||||
|
||||
|
||||
From 7cd97a939b63143921936b9db3978d14f18a4f33 Mon Sep 17 00:00:00 2001
|
||||
From 5a978c7db6c34d7dcd4aa56d94605e51245004a5 Mon Sep 17 00:00:00 2001
|
||||
From: zinface <zinface@163.com>
|
||||
Date: Mon, 12 Dec 2022 00:50:01 +0800
|
||||
Subject: [PATCH 03/11] =?UTF-8?q?docs:=20=E6=B7=BB=E5=8A=A0=20Spark=20?=
|
||||
Subject: [PATCH 03/10] =?UTF-8?q?docs:=20=E6=B7=BB=E5=8A=A0=20Spark=20?=
|
||||
=?UTF-8?q?=E6=9E=84=E5=BB=BA=20=E4=B8=8E=20CMake=20=E6=9E=84=E5=BB=BA?=
|
||||
=?UTF-8?q?=E7=B3=BB=E7=BB=9F=E9=A2=84=E8=A7=88=E6=96=87=E6=A1=A3?=
|
||||
MIME-Version: 1.0
|
||||
@@ -2184,10 +2184,10 @@ index 0000000..a807009
|
||||
2.20.1
|
||||
|
||||
|
||||
From bb128568ab7d1463c0002ffff470ad5c93364c99 Mon Sep 17 00:00:00 2001
|
||||
From 4b5b4bc91a42cc860efbe1728f2dba9f255ea954 Mon Sep 17 00:00:00 2001
|
||||
From: zinface <zinface@163.com>
|
||||
Date: Thu, 15 Dec 2022 19:59:46 +0800
|
||||
Subject: [PATCH 04/11] =?UTF-8?q?repo:=20=E6=9B=B4=E6=96=B0=E7=94=A8?=
|
||||
Subject: [PATCH 04/10] =?UTF-8?q?repo:=20=E6=9B=B4=E6=96=B0=E7=94=A8?=
|
||||
=?UTF-8?q?=E4=BA=8E=20Qt5=20Svg=20=E4=BE=9D=E8=B5=96=E7=9A=84=E6=9E=84?=
|
||||
=?UTF-8?q?=E5=BB=BA=E5=86=85=E5=AE=B9?=
|
||||
MIME-Version: 1.0
|
||||
@@ -2236,10 +2236,10 @@ index b56399f..67e29b6 100644
|
||||
2.20.1
|
||||
|
||||
|
||||
From 877a52f4b753f55e087a6c58794d690fabb6ddbb Mon Sep 17 00:00:00 2001
|
||||
From ede820a7267afa113a2d8b4f93f45fa6c1b4b23b Mon Sep 17 00:00:00 2001
|
||||
From: zinface <zinface@163.com>
|
||||
Date: Mon, 19 Dec 2022 02:58:17 +0800
|
||||
Subject: [PATCH 05/11] =?UTF-8?q?repo:=20=E6=9B=B4=E6=96=B0=E7=94=A8?=
|
||||
Subject: [PATCH 05/10] =?UTF-8?q?repo:=20=E6=9B=B4=E6=96=B0=E7=94=A8?=
|
||||
=?UTF-8?q?=E4=BA=8E=E6=94=AF=E6=8C=81=20BaseWidgetOpacity=20=E5=9F=BA?=
|
||||
=?UTF-8?q?=E7=A1=80=E7=B1=BB=E7=9A=84=E6=9E=84=E5=BB=BA?=
|
||||
MIME-Version: 1.0
|
||||
@@ -2283,10 +2283,10 @@ index 14530e1..b5e32d8 100644
|
||||
2.20.1
|
||||
|
||||
|
||||
From f89bb6a145f2a77fa0e1b55b3ad17ade69c53a69 Mon Sep 17 00:00:00 2001
|
||||
From b63790722efa275977b2033a1beeb21b730c1895 Mon Sep 17 00:00:00 2001
|
||||
From: zinface <zinface@163.com>
|
||||
Date: Mon, 30 Jan 2023 20:48:25 +0800
|
||||
Subject: [PATCH 06/11] =?UTF-8?q?spark:=20=E5=88=9B=E5=BB=BA=E6=96=B0?=
|
||||
Subject: [PATCH 06/10] =?UTF-8?q?spark:=20=E5=88=9B=E5=BB=BA=E6=96=B0?=
|
||||
=?UTF-8?q?=E7=9A=84=E6=A8=A1=E5=9D=97=E7=94=A8=E4=BA=8E=20debian/changelo?=
|
||||
=?UTF-8?q?g=20=E7=9A=84=E7=89=88=E6=9C=AC=E5=8F=B7=E9=87=8D=E5=86=99?=
|
||||
=?UTF-8?q?=E8=A7=84=E5=88=99?=
|
||||
@@ -2388,10 +2388,10 @@ index 0000000..9d8bca2
|
||||
2.20.1
|
||||
|
||||
|
||||
From b26bac7572ab7477ab4b94174fbdece759be8bc7 Mon Sep 17 00:00:00 2001
|
||||
From cca243c18b125a0e24a08c06a358ee04f0861884 Mon Sep 17 00:00:00 2001
|
||||
From: zinface <zinface@163.com>
|
||||
Date: Mon, 30 Jan 2023 21:23:15 +0800
|
||||
Subject: [PATCH 07/11] =?UTF-8?q?spark:=20=E5=AF=B9=20SparkDebianChangelog?=
|
||||
Subject: [PATCH 07/10] =?UTF-8?q?spark:=20=E5=AF=B9=20SparkDebianChangelog?=
|
||||
=?UTF-8?q?Version.cmake=20=E6=A8=A1=E5=9D=97=E7=9A=84=E6=89=A9=E5=B1=95?=
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
@@ -2459,10 +2459,10 @@ index 9d8bca2..65e1c16 100644
|
||||
2.20.1
|
||||
|
||||
|
||||
From 26f00f79a2b8613477059beb6c2f492bc24a7bb5 Mon Sep 17 00:00:00 2001
|
||||
From f3595a55f567fc01a5928fea8e4b89f99cf8793e Mon Sep 17 00:00:00 2001
|
||||
From: zinface <zinface@163.com>
|
||||
Date: Mon, 30 Jan 2023 23:17:24 +0800
|
||||
Subject: [PATCH 08/11] =?UTF-8?q?repo:=20=E5=A4=84=E7=90=86=20v4.2.2=20?=
|
||||
Subject: [PATCH 08/10] =?UTF-8?q?repo:=20=E5=A4=84=E7=90=86=20v4.2.2=20?=
|
||||
=?UTF-8?q?=E7=89=88=E6=9C=AC=E6=97=B6=E6=9C=9F=E6=96=B0=E5=A2=9E=E7=9A=84?=
|
||||
=?UTF-8?q?=E5=AE=89=E8=A3=85=E6=96=87=E4=BB=B6?=
|
||||
MIME-Version: 1.0
|
||||
@@ -2509,10 +2509,10 @@ index bbb958a..c7ea53b 100644
|
||||
2.20.1
|
||||
|
||||
|
||||
From e4401b16037cb3b1b10c59f4c7a0fa3c2cd563b3 Mon Sep 17 00:00:00 2001
|
||||
From da9ef6f95ea7be97595b1e3285ac8e98a34c8c0a Mon Sep 17 00:00:00 2001
|
||||
From: zinface <zinface@163.com>
|
||||
Date: Mon, 30 Jan 2023 23:18:44 +0800
|
||||
Subject: [PATCH 09/11] =?UTF-8?q?spark:=20=E5=AF=B9=20SparkTranslatorConfi?=
|
||||
Subject: [PATCH 09/10] =?UTF-8?q?spark:=20=E5=AF=B9=20SparkTranslatorConfi?=
|
||||
=?UTF-8?q?g.cmake=20=E6=A8=A1=E5=9D=97=E7=9A=84=E6=89=A9=E5=B1=95?=
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
@@ -2544,10 +2544,10 @@ index 272dd9d..689e70d 100644
|
||||
2.20.1
|
||||
|
||||
|
||||
From 2d8046099776e3909359ce49818ae28378af930c Mon Sep 17 00:00:00 2001
|
||||
From 22eea0e930a073cac8e6dd750b6389044668dcd6 Mon Sep 17 00:00:00 2001
|
||||
From: zinface <zinface@163.com>
|
||||
Date: Mon, 30 Jan 2023 23:20:12 +0800
|
||||
Subject: [PATCH 10/11] =?UTF-8?q?make:=20=E5=A4=84=E7=90=86=E9=BB=98?=
|
||||
Subject: [PATCH 10/10] =?UTF-8?q?make:=20=E5=A4=84=E7=90=86=E9=BB=98?=
|
||||
=?UTF-8?q?=E8=AE=A4=20make=20=E7=9B=AE=E6=A0=87=E4=B8=BA=20override-versi?=
|
||||
=?UTF-8?q?on=20=E7=9A=84=E9=97=AE=E9=A2=98?=
|
||||
MIME-Version: 1.0
|
||||
@@ -2594,36 +2594,3 @@ index 81ca078..076502c 100644
|
||||
--
|
||||
2.20.1
|
||||
|
||||
|
||||
From 043e6fb78e2bcb1a6fecefe2ba9aceb9df84e96e Mon Sep 17 00:00:00 2001
|
||||
From: zinface <zinface@163.com>
|
||||
Date: Sun, 5 Feb 2023 16:09:40 +0800
|
||||
Subject: [PATCH 11/11] =?UTF-8?q?spark:=20=E5=A4=84=E7=90=86=E7=89=88?=
|
||||
=?UTF-8?q?=E6=9C=AC=E5=8F=B7=204.2.3~test1=20=E6=97=B6=E9=BB=98=E8=AE=A4?=
|
||||
=?UTF-8?q?=E7=9A=84=E6=88=AA=E5=8F=96=E5=AD=97=E7=AC=A6=E6=95=B0=E8=BF=87?=
|
||||
=?UTF-8?q?=E7=9F=AD=E9=97=AE=E9=A2=98?=
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
---
|
||||
cmake/SparkDebianChangelogVersion.cmake | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/cmake/SparkDebianChangelogVersion.cmake b/cmake/SparkDebianChangelogVersion.cmake
|
||||
index 65e1c16..3ed5fa2 100644
|
||||
--- a/cmake/SparkDebianChangelogVersion.cmake
|
||||
+++ b/cmake/SparkDebianChangelogVersion.cmake
|
||||
@@ -40,7 +40,8 @@ macro(spark_debian_changelog_override_version _CHANGELOG_FILE_PATH)
|
||||
|
||||
message("> V = ${CHANGELOG_FILE_PATH}")
|
||||
if(CHANGELOG_FILE_EXISTS)
|
||||
- file(READ ${CHANGELOG_FILE_PATH} CHANGELOG_CONTENT LIMIT 20)
|
||||
+ file(READ ${CHANGELOG_FILE_PATH} CHANGELOG_CONTENT LIMIT 30)
|
||||
+ # fix: spark-store (4.2.3~test1) 已经超过 20 字符位,所以使用 30 进行保守计算
|
||||
|
||||
string(FIND ${CHANGELOG_CONTENT} "(" V_PRE) # +1 to V_BEGIN
|
||||
string(FIND ${CHANGELOG_CONTENT} ")" V_END)
|
||||
--
|
||||
2.20.1
|
||||
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
{
|
||||
"magic": "dsg.config.meta",
|
||||
"version": "1.0",
|
||||
"contents": {
|
||||
"featureUpdated": {
|
||||
"value": false,
|
||||
"serial": 0,
|
||||
"flags": [],
|
||||
"name": "Whether the application has new feature updates",
|
||||
"name[zh_CN]": "配置应用的更新状态",
|
||||
"description": "Configure the update status of the application",
|
||||
"permissions": "readwrite",
|
||||
"visibility": "public"
|
||||
},
|
||||
"autoDisplayFeature": {
|
||||
"value": false,
|
||||
"serial": 0,
|
||||
"flags": [],
|
||||
"name": "The application automatically display new features once",
|
||||
"name[zh_CN]": "配置应用是否自动展示一次新特性",
|
||||
"description": "The application automatically display updated contents once",
|
||||
"permissions": "readwrite",
|
||||
"visibility": "public"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,12 +14,6 @@ SUBDIRS += \
|
||||
src/spark-dstore-patch \
|
||||
src/spark-store.pro
|
||||
|
||||
# https://wiki.debian.org/Hardening
|
||||
QMAKE_CFLAGS *= $(shell dpkg-buildflags --get CFLAGS)
|
||||
QMAKE_CPPFLAGS *= $(shell dpkg-buildflags --get CPPFLAGS)
|
||||
QMAKE_CXXFLAGS *= $(shell dpkg-buildflags --get CXXFLAGS)
|
||||
QMAKE_LFLAGS *= $(shell dpkg-buildflags --get LDFLAGS)
|
||||
|
||||
# Update translation files
|
||||
CONFIG(release, debug|release) {
|
||||
system(bash $${PWD}/translate_update.sh)
|
||||
|
||||
@@ -1,14 +1,9 @@
|
||||
#include "application.h"
|
||||
#include "mainwindow-dtk.h"
|
||||
#include "utils/utils.h"
|
||||
|
||||
#include <DPlatformWindowHandle>
|
||||
#include <DLog>
|
||||
#include <DGuiApplicationHelper>
|
||||
#include <DAboutDialog>
|
||||
#if (DTK_VERSION >= DTK_VERSION_CHECK(5, 6, 4, 0))
|
||||
#include <DFeatureDisplayDialog>
|
||||
#endif
|
||||
|
||||
#include <QSettings>
|
||||
#include <QStandardPaths>
|
||||
@@ -47,34 +42,19 @@ Application::Application(int &argc, char **argv)
|
||||
// 初始化日志模块 (默认日志位置 ~/.cache/spark-union/spark-store)
|
||||
DLogManager::registerConsoleAppender();
|
||||
DLogManager::registerFileAppender();
|
||||
|
||||
// 获取版本特性信息
|
||||
m_featuresJsonObj = Utils::parseFeatureJsonFile();
|
||||
}
|
||||
|
||||
void Application::handleAboutAction()
|
||||
{
|
||||
if (aboutDialog() && aboutDialog()->parent() == m_mainWindow) {
|
||||
if (aboutDialog()) {
|
||||
DApplication::handleAboutAction();
|
||||
return;
|
||||
}
|
||||
|
||||
initAboutDialog();
|
||||
#if (DTK_VERSION >= DTK_VERSION_CHECK(5, 6, 4, 0))
|
||||
initFeatureDisplayDialog(); // 初始化版本特性对话框
|
||||
#endif
|
||||
DApplication::handleAboutAction();
|
||||
}
|
||||
|
||||
bool Application::notify(QObject *receiver, QEvent *event)
|
||||
{
|
||||
if (m_mainWindow) {
|
||||
m_mainWindow->notify(receiver, event);
|
||||
}
|
||||
|
||||
return DApplication::notify(receiver, event);
|
||||
}
|
||||
|
||||
void Application::checkAppConfigLocation()
|
||||
{
|
||||
QDir dir(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation));
|
||||
@@ -84,56 +64,30 @@ void Application::checkAppConfigLocation()
|
||||
}
|
||||
}
|
||||
|
||||
void Application::setBuildDateTime(const QString &buildDateTime)
|
||||
void Application::setVersionAndBuildDateTime(const QString &version, const QString &buildDateTime)
|
||||
{
|
||||
m_version = version;
|
||||
m_buildDateTime = buildDateTime;
|
||||
|
||||
QSettings config(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/config.ini", QSettings::IniFormat);
|
||||
if (config.value("build/version").toString() != QString(APP_VERSION)) {
|
||||
if (config.value("build/version").toString() != m_version) {
|
||||
qDebug() << "Spark Store has been updated!";
|
||||
|
||||
config.setValue("build/version", QString(APP_VERSION));
|
||||
config.setValue("build/time", buildDateTime);
|
||||
config.setValue("build/version", m_version);
|
||||
config.setValue("build/time", m_buildDateTime);
|
||||
config.sync();
|
||||
}
|
||||
|
||||
setApplicationVersion(DApplication::buildVersion(QString(APP_VERSION) + "-" + "Flamescion" + "-" + buildDateTime));
|
||||
}
|
||||
|
||||
void Application::setMainWindow(MainWindow *window)
|
||||
{
|
||||
m_mainWindow = window;
|
||||
if (aboutDialog() == nullptr || aboutDialog()->parent() != m_mainWindow)
|
||||
{
|
||||
initAboutDialog();
|
||||
}
|
||||
#if (DTK_VERSION >= DTK_VERSION_CHECK(5, 6, 4, 0))
|
||||
if (featureDisplayDialog() == nullptr || featureDisplayDialog()->parent() != m_mainWindow)
|
||||
{
|
||||
initFeatureDisplayDialog(); // 初始化版本特性对话框
|
||||
}
|
||||
#endif
|
||||
setApplicationVersion(DApplication::buildVersion(config.value("build/version").toString() + "-" + "Flamescion" + "-" + config.value("build/time").toString()));
|
||||
}
|
||||
|
||||
void Application::initAboutDialog()
|
||||
{
|
||||
if (m_mainWindow == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (aboutDialog())
|
||||
{
|
||||
aboutDialog()->deleteLater();
|
||||
setAboutDialog(nullptr);
|
||||
}
|
||||
|
||||
// 自定义 DAboutDialog
|
||||
DAboutDialog *dialog = new DAboutDialog(m_mainWindow);
|
||||
DAboutDialog *dialog = new DAboutDialog(activeWindow());
|
||||
dialog->setProductName(productName());
|
||||
dialog->setProductIcon(productIcon());
|
||||
dialog->setVersion(translate("DAboutDialog", "Version: %1").arg(applicationVersion()));
|
||||
#if (DTK_VERSION >= DTK_VERSION_CHECK(5, 6, 4, 0))
|
||||
dialog->setVersion(applicationVersion());
|
||||
#endif
|
||||
// 根据 shenmo 要求,不显示组织 Logo
|
||||
// dialog->setCompanyLogo(QPixmap(":/icon/Logo-Spark.png"));
|
||||
dialog->setCompanyLogo(QPixmap());
|
||||
@@ -143,70 +97,9 @@ void Application::initAboutDialog()
|
||||
dialog->setLicense(translate("DAboutDialog", "%1 is released under %2").arg(productName()).arg(applicationLicense()));
|
||||
|
||||
setAboutDialog(dialog);
|
||||
connect(aboutDialog(), &DAboutDialog::destroyed, this, [=]() {
|
||||
connect(aboutDialog(), &DAboutDialog::destroyed, this, [=] {
|
||||
setAboutDialog(nullptr);
|
||||
});
|
||||
|
||||
dialog->hide();
|
||||
}
|
||||
|
||||
#if (DTK_VERSION >= DTK_VERSION_CHECK(5, 6, 4, 0))
|
||||
/**
|
||||
* @brief Application::initFeatureDisplayDialog 初始化版本特性对话框
|
||||
*/
|
||||
void Application::initFeatureDisplayDialog()
|
||||
{
|
||||
if (featureDisplayDialog())
|
||||
{
|
||||
featureDisplayDialog()->deleteLater();
|
||||
setFeatureDisplayDialog(nullptr);
|
||||
}
|
||||
|
||||
// 自定义 DFeatureDisplayDialog
|
||||
DFeatureDisplayDialog *dialog = new DFeatureDisplayDialog(m_mainWindow);
|
||||
// 标题
|
||||
dialog->setTitle(m_featuresJsonObj.value("title").toString());
|
||||
// NOTE: json 文件中支持多语言;考虑到维护性,不放入翻译文件处理
|
||||
if (m_featuresJsonObj.contains(QString("title[%1]").arg(QLocale::system().name())))
|
||||
{
|
||||
dialog->setTitle(m_featuresJsonObj.value(QString("title[%1]").arg(QLocale::system().name())).toString());
|
||||
}
|
||||
|
||||
// 特性项
|
||||
QList<DFeatureItem *> items;
|
||||
foreach (const QJsonValue &jsonValue, m_featuresJsonObj.value("items").toArray())
|
||||
{
|
||||
QJsonObject jsonObj = jsonValue.toObject();
|
||||
QString name = jsonObj.value("name").toString();
|
||||
if (jsonObj.contains(QString("name[%1]").arg(QLocale::system().name())))
|
||||
{
|
||||
name = jsonObj.value(QString("name[%1]").arg(QLocale::system().name())).toString();
|
||||
}
|
||||
QString description = jsonObj.value("description").toString();
|
||||
if (jsonObj.contains(QString("description[%1]").arg(QLocale::system().name())))
|
||||
{
|
||||
description = jsonObj.value(QString("description[%1]").arg(QLocale::system().name())).toString();
|
||||
}
|
||||
|
||||
DFeatureItem *item = new DFeatureItem(QIcon::fromTheme("spark-store"), name, description, dialog);
|
||||
items.append(item);
|
||||
}
|
||||
dialog->addItems(items); // NOTE: 也支持 addItem 依次添加单个 item
|
||||
|
||||
// “了解更多”链接按钮
|
||||
dialog->setLinkUrl(m_featuresJsonObj.value("linkUrl").toString());
|
||||
dialog->setLinkButtonVisible(m_featuresJsonObj.value("linkButtonVisible").toBool());
|
||||
|
||||
setFeatureDisplayDialog(dialog);
|
||||
connect(featureDisplayDialog(), &DFeatureDisplayDialog::destroyed, this, [=]() {
|
||||
setFeatureDisplayDialog(nullptr);
|
||||
});
|
||||
#if (DTK_VERSION >= DTK_VERSION_CHECK(5, 6, 4, 0))
|
||||
connect(aboutDialog(), &DAboutDialog::featureActivated, this, [=]() {
|
||||
featureDisplayDialog()->show();
|
||||
});
|
||||
#endif
|
||||
|
||||
dialog->hide();
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -3,11 +3,8 @@
|
||||
|
||||
#include <DApplication>
|
||||
|
||||
#include <QJsonObject>
|
||||
|
||||
DWIDGET_USE_NAMESPACE
|
||||
|
||||
class MainWindow;
|
||||
class Application : public DApplication
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -15,23 +12,17 @@ class Application : public DApplication
|
||||
public:
|
||||
Application(int &argc, char **argv);
|
||||
void handleAboutAction() override;
|
||||
bool notify(QObject *receiver, QEvent *event) override;
|
||||
|
||||
static void checkAppConfigLocation();
|
||||
|
||||
void setBuildDateTime(const QString &buildDateTime);
|
||||
void setMainWindow(MainWindow *window);
|
||||
void setVersionAndBuildDateTime(const QString &version, const QString &buildDateTime);
|
||||
|
||||
private:
|
||||
void initAboutDialog();
|
||||
#if (DTK_VERSION >= DTK_VERSION_CHECK(5, 6, 4, 0))
|
||||
void initFeatureDisplayDialog();
|
||||
#endif
|
||||
|
||||
private:
|
||||
QJsonObject m_featuresJsonObj;
|
||||
|
||||
MainWindow *m_mainWindow = nullptr;
|
||||
QString m_version;
|
||||
QString m_buildDateTime;
|
||||
};
|
||||
|
||||
#endif // APPLICATION_H
|
||||
|
||||
@@ -44,7 +44,6 @@
|
||||
<file>icon/light/text.svg</file>
|
||||
<file>icon/light/update.svg</file>
|
||||
<file>icon/logo.svg</file>
|
||||
<file>json/features.json</file>
|
||||
<file>tags/a2d-small.png</file>
|
||||
<file>tags/a2d.png</file>
|
||||
<file>tags/community-small.png</file>
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
{
|
||||
"title": "Features",
|
||||
"title[zh_CN]": "版本特性",
|
||||
"items": [
|
||||
{
|
||||
"icon": "/usr/share/icons/hicolor/scalable/apps/spark-store.svg",
|
||||
"name": "Feature 1",
|
||||
"name[zh_CN]": "特性 1",
|
||||
"description": "Please click the learn more button to check",
|
||||
"description[zh_CN]": "请点击 了解更多 按钮来获取特性"
|
||||
},
|
||||
{
|
||||
"icon": ":/icon/logo.svg",
|
||||
"name": "Feature 2",
|
||||
"description": "Feature 2 detailed description..."
|
||||
},
|
||||
{
|
||||
"icon": "spark-store",
|
||||
"name": "Fix 1",
|
||||
"description": "Fix 1 detailed description..."
|
||||
}
|
||||
],
|
||||
"linkUrl": "https://gitee.com/deepin-community-store/spark-store/releases/4.2.3test3",
|
||||
"linkButtonVisible": true
|
||||
}
|
||||
@@ -1,7 +1,9 @@
|
||||
#include "downloadworker.h"
|
||||
|
||||
#include <QEventLoop>
|
||||
#include <QProcess>
|
||||
#include <QRegularExpression>
|
||||
#include <QDir>
|
||||
#include <QtConcurrent>
|
||||
#include <QStandardPaths>
|
||||
|
||||
@@ -143,19 +145,17 @@ void DownloadController::startDownload(const QString &url)
|
||||
command.append(aria2NoSeeds.toUtf8());
|
||||
}
|
||||
qDebug() << command;
|
||||
auto cmd = new QProcess(this);
|
||||
cmd->setProcessChannelMode(QProcess::MergedChannels);
|
||||
cmd->setProgram("aria2c");
|
||||
cmd->setArguments(command);
|
||||
cmd->start();
|
||||
cmd->waitForStarted(); //等待启动完成
|
||||
|
||||
bool downloadSuccess = true;
|
||||
QProcess cmd;
|
||||
cmd.setProcessChannelMode(QProcess::MergedChannels);
|
||||
cmd.setProgram("aria2c");
|
||||
cmd.setArguments(command);
|
||||
cmd.start();
|
||||
cmd.waitForStarted(-1); //等待启动完成
|
||||
|
||||
connect(&cmd, &QProcess::readyReadStandardOutput, [&]()
|
||||
QObject::connect(cmd, &QProcess::readyReadStandardOutput, [&]()
|
||||
{
|
||||
//通过读取输出计算下载速度
|
||||
QString message = cmd.readAllStandardOutput().data();
|
||||
QString message = cmd->readAllStandardOutput().data();
|
||||
// qDebug() << message;
|
||||
message = message.replace(" ", "");
|
||||
QStringList list;
|
||||
@@ -195,21 +195,17 @@ void DownloadController::startDownload(const QString &url)
|
||||
emit downloadProcess(speedInfo, downloadSizeRecord, fileSize);
|
||||
}
|
||||
});
|
||||
connect(&cmd, &QProcess::readyReadStandardError, [&]()
|
||||
QObject::connect(cmd, &QProcess::readyReadStandardError, [&]()
|
||||
{
|
||||
emit errorOccur(cmd.readAllStandardError().data());
|
||||
downloadSuccess = false;
|
||||
cmd.close();
|
||||
emit errorOccur(cmd->readAllStandardError().data());
|
||||
return;
|
||||
});
|
||||
|
||||
pidNumber = cmd.processId();
|
||||
|
||||
cmd.waitForFinished(-1);
|
||||
cmd.close();
|
||||
|
||||
if(!downloadSuccess)
|
||||
auto pidNumber = cmd->processId();
|
||||
this->pidNumber = pidNumber;
|
||||
while (cmd->waitForFinished(-1))
|
||||
{
|
||||
return;
|
||||
continue;
|
||||
}
|
||||
|
||||
// 统计下载量
|
||||
@@ -222,7 +218,7 @@ void DownloadController::startDownload(const QString &url)
|
||||
mailProcess.start(SenderdPath.toUtf8(), QStringList() << metaUrl << "HD70642");
|
||||
mailProcess.waitForStarted();
|
||||
mailProcess.waitForFinished(3000);
|
||||
mailProcess.close();
|
||||
mailProcess.deleteLater();
|
||||
|
||||
emit downloadFinished(); });
|
||||
}
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
#define DOWNLOADWORKER_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QVector>
|
||||
#include <QList>
|
||||
#include <QFile>
|
||||
#include <QNetworkReply>
|
||||
|
||||
class DownloadController : public QObject
|
||||
{
|
||||
@@ -17,19 +19,23 @@ public:
|
||||
qint64 getFileSize(const QString& url);
|
||||
QString replaceDomain(const QString& url, const QString domain);
|
||||
|
||||
private:
|
||||
int threadNum;
|
||||
int pidNumber = -1;
|
||||
QString filename;
|
||||
qint64 fileSize;
|
||||
QVector<QPair<qint64, qint64>> ranges;
|
||||
QFile *file;
|
||||
bool finished = false;
|
||||
QVector<QString> domains;
|
||||
|
||||
|
||||
|
||||
signals:
|
||||
void errorOccur(const QString& msg);
|
||||
void downloadProcess(QString, qint64, qint64);
|
||||
void downloadFinished();
|
||||
|
||||
private:
|
||||
int threadNum;
|
||||
qint64 pidNumber = -1;
|
||||
QString filename;
|
||||
qint64 fileSize;
|
||||
QVector<QPair<qint64, qint64>> ranges;
|
||||
bool finished = false;
|
||||
QVector<QString> domains;
|
||||
};
|
||||
|
||||
#endif // FILEDOWNLOADWORKER_H
|
||||
|
||||
72
src/main.cpp
72
src/main.cpp
@@ -1,6 +1,5 @@
|
||||
#include "application.h"
|
||||
#include "mainwindow-dtk.h"
|
||||
#include "utils/utils.h"
|
||||
|
||||
#include <DSysInfo>
|
||||
#include <DApplicationSettings>
|
||||
@@ -15,23 +14,85 @@
|
||||
DCORE_USE_NAMESPACE
|
||||
DWIDGET_USE_NAMESPACE
|
||||
|
||||
#define UOSCheckFile "/var/lib/deepin/developer-mode/enabled"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
// Get build time
|
||||
static const QString version = "4.2.2";
|
||||
static const QDate buildDate = QLocale(QLocale::English).toDate(QString(__DATE__).replace(" ", " 0"), "MMM dd yyyy");
|
||||
static const QTime buildTime = QTime::fromString(__TIME__, "hh:mm:ss");
|
||||
static const QString buildDateTime = buildDate.toString("yyyy.MM.dd") + "-" + buildTime.toString("hh:mm:ss");
|
||||
|
||||
// 设置桌面环境环境变量
|
||||
bool isDeepinOS = true;
|
||||
if (!QString(qgetenv("XDG_CURRENT_DESKTOP")).toLower().startsWith("deepin"))
|
||||
{
|
||||
qputenv("XDG_CURRENT_DESKTOP", "Deepin");
|
||||
isDeepinOS = false;
|
||||
}
|
||||
|
||||
bool isWayland = false;
|
||||
auto e = QProcessEnvironment::systemEnvironment();
|
||||
QString XDG_SESSION_TYPE = e.value(QStringLiteral("XDG_SESSION_TYPE"));
|
||||
QString WAYLAND_DISPLAY = e.value(QStringLiteral("WAYLAND_DISPLAY"));
|
||||
if (XDG_SESSION_TYPE == QLatin1String("wayland") || WAYLAND_DISPLAY.contains(QLatin1String("wayland"), Qt::CaseInsensitive))
|
||||
{
|
||||
isWayland = true;
|
||||
}
|
||||
|
||||
// NOTE: 提前设置组织名称和应用名称,避免配置文件位置错误
|
||||
DApplication::setOrganizationName("spark-union");
|
||||
DApplication::setApplicationName("spark-store");
|
||||
Application::checkAppConfigLocation(); // 检查 ~/.config/spark-union/spark-store 文件夹是否存在
|
||||
|
||||
// 初始化 config.ini 配置文件
|
||||
Utils::initConfig();
|
||||
QSettings config(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/config.ini", QSettings::IniFormat);
|
||||
config.setValue("build/isWayland", isWayland);
|
||||
config.setValue("build/isDeepinOS", isDeepinOS);
|
||||
// Check config file, if there is no wayland config, then set it to default, which means use wayland if possible.
|
||||
if (!config.contains("build/useWayland"))
|
||||
{
|
||||
config.setValue("build/useWayland", true);
|
||||
}
|
||||
config.sync(); // 写入更改至 config.ini,并同步最新内容
|
||||
|
||||
bool useWayland = config.value("build/useWayland").toBool();
|
||||
qDebug() << "System Wayland enabled:" << isWayland << ". Spark Wayland enabled:" << useWayland;
|
||||
|
||||
// Set display backend
|
||||
Utils::setQPAPlatform();
|
||||
if (isWayland && useWayland && !(Dtk::Core::DSysInfo::isDDE() || isDeepinOS))
|
||||
{
|
||||
qputenv("QT_QPA_PLATFORM", "wayland");
|
||||
}
|
||||
else if (isWayland && useWayland && (Dtk::Core::DSysInfo::isDDE() && isDeepinOS))
|
||||
{
|
||||
qputenv("QT_QPA_PLATFORM", "dwayland");
|
||||
}
|
||||
else
|
||||
{
|
||||
qputenv("QT_QPA_PLATFORM", "dxcb");
|
||||
}
|
||||
|
||||
// Check UOS developer mode.
|
||||
QFile UOSDevelopFile(UOSCheckFile);
|
||||
if (isDeepinOS && UOSDevelopFile.exists() && UOSDevelopFile.open(QFile::ReadOnly | QFile::Text))
|
||||
{
|
||||
config.setValue("UOS/isUOS", true);
|
||||
QString lineData = UOSDevelopFile.readLine();
|
||||
bool devmode = lineData.trimmed().toInt();
|
||||
qDebug() << "UOS Developer Mode Status:" << devmode;
|
||||
config.setValue("UOS/EnableDeveloperMode", devmode);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (config.contains("UOS/isUOS"))
|
||||
{
|
||||
config.remove("UOS/isUOS");
|
||||
config.remove("UOS/EnableDeveloperMode");
|
||||
}
|
||||
}
|
||||
UOSDevelopFile.close();
|
||||
config.sync(); // 写入更改至 config.ini,并同步最新内容
|
||||
|
||||
// 龙芯机器配置,使得 DApplication 能正确加载 QTWEBENGINE
|
||||
qputenv("DTK_FORCE_RASTER_WIDGETS", "FALSE");
|
||||
@@ -58,7 +119,7 @@ int main(int argc, char *argv[])
|
||||
int fakeArgc = argc + 2; // QCoreApplication 的 argc 要用引用,避免 c++ 编译器优化
|
||||
Application a(fakeArgc, fakeArgs.data());
|
||||
// 设置版本和构建时间
|
||||
a.setBuildDateTime(buildDateTime);
|
||||
a.setVersionAndBuildDateTime(version, buildDateTime);
|
||||
|
||||
// 限制单实例运行
|
||||
if (!a.setSingleInstance("spark-store"))
|
||||
@@ -70,7 +131,6 @@ int main(int argc, char *argv[])
|
||||
DApplicationSettings settings; // 定义 DApplicationSettings,自动保存主题设置
|
||||
|
||||
MainWindow w;
|
||||
a.setMainWindow(&w); // 设置应用程序主窗口,用于初始化关于对话框
|
||||
// 让打开时界面显示在正中
|
||||
Dtk::Widget::moveToCenter(&w);
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
#include "utils/widgetanimation.h"
|
||||
#include "widgets/common/progressbutton.h"
|
||||
#include "widgets/downloadlistwidget.h"
|
||||
#include "widgets/common/downloaditem.h"
|
||||
#include "dbus/dbussparkstoreservice.h"
|
||||
#include "application.h"
|
||||
|
||||
@@ -11,9 +10,7 @@
|
||||
#include <DWidgetUtil>
|
||||
#include <DGuiApplicationHelper>
|
||||
|
||||
#include <QDesktopServices>
|
||||
#include <QAbstractButton>
|
||||
#include <QtConcurrent>
|
||||
|
||||
#define AppPageApplist 0
|
||||
#define AppPageSearchlist 1
|
||||
@@ -77,7 +74,10 @@ void MainWindow::onNewProcessInstance(qint64 pid, const QStringList &arguments)
|
||||
{
|
||||
Q_UNUSED(pid)
|
||||
|
||||
onGetUrl(arguments.value(1, ""));
|
||||
if (arguments.size() > 1)
|
||||
{
|
||||
onGetUrl(arguments.value(1));
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::openUrl(const QString &url)
|
||||
@@ -134,9 +134,6 @@ void MainWindow::initTitleBar()
|
||||
searchEdit->setPlaceholderText(tr("Search or enter spk://"));
|
||||
|
||||
downloadButton = new ProgressButton(ui->titlebar);
|
||||
downloadButton->setDownloadListWidget(downloadlistwidget);
|
||||
downloadButton->setFocusPolicy(Qt::FocusPolicy::ClickFocus);
|
||||
downloadlistwidget->setFocusProxy(downloadButton);
|
||||
|
||||
QWidget *w_titlebar = new QWidget(ui->titlebar);
|
||||
QHBoxLayout *ly_titlebar = new QHBoxLayout(w_titlebar);
|
||||
@@ -144,7 +141,7 @@ void MainWindow::initTitleBar()
|
||||
ly_titlebar->addWidget(backButton);
|
||||
// Check wayland configs
|
||||
QSettings config(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/config.ini", QSettings::IniFormat);
|
||||
if (!config.value("runtime/isDDE").toBool() && config.value("runtime/useWayland").toBool())
|
||||
if (!config.value("build/isDeepinOS").toBool() && config.value("build/useWayland").toBool())
|
||||
{
|
||||
// Wayland 搜索栏居中
|
||||
ly_titlebar->addStretch(WaylandSearchCenter);
|
||||
@@ -221,9 +218,8 @@ void MainWindow::initLeftMenu()
|
||||
|
||||
void MainWindow::initTrayIcon()
|
||||
{
|
||||
trayIcon->setToolTip(tr("Spark Store"));
|
||||
|
||||
QMenu *menu = new QMenu(this);
|
||||
|
||||
QAction *showAction = new QAction(QObject::tr("Show MainWindow"), menu);
|
||||
QAction *aboutAction = new QAction(qApp->translate("TitleBarMenu", "About"), menu);
|
||||
QAction *exitAction = new QAction(qApp->translate("TitleBarMenu", "Exit"), menu);
|
||||
@@ -302,6 +298,14 @@ void MainWindow::initConnections()
|
||||
ui->appintopage->setTheme(themeType == DGuiApplicationHelper::DarkType);
|
||||
ui->settingspage->setTheme(themeType == DGuiApplicationHelper::DarkType); });
|
||||
|
||||
connect(downloadButton, &ProgressButton::clicked, [=]()
|
||||
{
|
||||
QPoint pos;
|
||||
pos.setX(downloadButton->mapToGlobal(QPoint(0, 0)).x() + downloadButton->width() / 2 - downloadlistwidget->width() / 2);
|
||||
pos.setY(downloadButton->mapToGlobal(QPoint(0, 0)).y() + downloadButton->height() + 5);
|
||||
downloadlistwidget->m_move(pos.x(), pos.y());
|
||||
downloadlistwidget->show(); });
|
||||
|
||||
// appintopage按下下载按钮时标题栏下载列表按钮抖动
|
||||
connect(ui->appintopage, &AppIntoPage::clickedDownloadBtn, [=]()
|
||||
{
|
||||
@@ -418,35 +422,6 @@ void MainWindow::updateUi(int now)
|
||||
switchPage(AppPageApplist);
|
||||
}
|
||||
|
||||
void MainWindow::notify(QObject *receiver, QEvent *event)
|
||||
{
|
||||
if (!receiver) {
|
||||
return;
|
||||
}
|
||||
|
||||
Dtk::Widget::DStyle *o_ptr = qobject_cast<Dtk::Widget::DStyle *>(receiver);
|
||||
if (o_ptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (receiver->inherits("QWidgetWindow")
|
||||
|| receiver->inherits("QStyleSheetStyle")) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (event->type() == QEvent::FocusIn) {
|
||||
QList<QObject *> list = downloadButton->findChildren<QObject *>(QString(), Qt::FindChildrenRecursively);
|
||||
list << downloadlistwidget->findChildren<QObject *>(QString(), Qt::FindChildrenRecursively);
|
||||
if (receiver != downloadButton && receiver != downloadlistwidget && !list.contains(receiver)) {
|
||||
downloadlistwidget->hide();
|
||||
}
|
||||
} else if (event->type() == QEvent::FocusOut) {
|
||||
if (!downloadlistwidget->isActiveWindow() && !isActiveWindow()) {
|
||||
downloadlistwidget->hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_pushButton_14_clicked()
|
||||
{
|
||||
// Check UOS
|
||||
|
||||
@@ -25,7 +25,7 @@ class MainWindow : public BaseWidgetOpacity
|
||||
|
||||
public:
|
||||
explicit MainWindow(QWidget *parent = nullptr);
|
||||
~MainWindow() override;
|
||||
~MainWindow();
|
||||
|
||||
void openUrl(const QString &url);
|
||||
|
||||
@@ -41,9 +41,6 @@ private:
|
||||
void switchPage(int now);
|
||||
void updateUi(int now);
|
||||
|
||||
public slots:
|
||||
void notify(QObject *receiver, QEvent *event);
|
||||
|
||||
private slots:
|
||||
//接受来自dbus的url
|
||||
void onGetUrl(const QString &url);
|
||||
|
||||
@@ -1,42 +1,82 @@
|
||||
#include "appintopage.h"
|
||||
#include "ui_appintopage.h"
|
||||
#include "backend/sparkapi.h"
|
||||
#include "widgets/downloadlistwidget.h"
|
||||
#include "widgets/common/downloaditem.h"
|
||||
#include "backend/image_show.h"
|
||||
#include "application.h"
|
||||
#include "utils/utils.h"
|
||||
|
||||
#include <QtConcurrent>
|
||||
#include <QClipboard>
|
||||
|
||||
AppIntoPage::AppIntoPage(QWidget *parent)
|
||||
: QWidget(parent)
|
||||
, ui(new Ui::AppIntoPage)
|
||||
, api(new SparkAPI(this))
|
||||
AppIntoPage::AppIntoPage(QWidget *parent) : QWidget(parent),
|
||||
ui(new Ui::AppIntoPage)
|
||||
{
|
||||
initUI();
|
||||
initConnections();
|
||||
}
|
||||
|
||||
AppIntoPage::~AppIntoPage()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void AppIntoPage::openUrl(const QUrl &url)
|
||||
ui->setupUi(this);
|
||||
ui->listWidget->setViewMode(QListView::IconMode);
|
||||
ui->listWidget->setMovement(QListView::Static);
|
||||
ui->listWidget->setMaximumHeight(200);
|
||||
ui->listWidget->setFlow(QListView::TopToBottom);
|
||||
api1 = new SparkAPI(this);
|
||||
connect(api1, &SparkAPI::finishedRAW, [=](QString download_times)
|
||||
{
|
||||
download_times.remove(QRegExp("\\n"));
|
||||
ui->download_times->setText(download_times);
|
||||
qDebug()<<"Download Times:"+download_times; });
|
||||
clear();
|
||||
}
|
||||
|
||||
// qDebug() << url;
|
||||
spk = url;
|
||||
|
||||
SparkAPI *api1 = new SparkAPI(this);
|
||||
connect(api1, &SparkAPI::finishedObject, [=](const QJsonObject &appinfo)
|
||||
void AppIntoPage::clear()
|
||||
{
|
||||
ui->tag_a2d->hide();
|
||||
ui->tag_uos->hide();
|
||||
ui->tag_dtk5->hide();
|
||||
ui->tag_deepin->hide();
|
||||
ui->tag_dwine2->hide();
|
||||
ui->tag_dwine5->hide();
|
||||
ui->tag_ubuntu->hide();
|
||||
ui->tag_community->hide();
|
||||
ui->icon->clear();
|
||||
ui->title->clear();
|
||||
ui->author->clear();
|
||||
ui->label_2->clear();
|
||||
ui->downloadButton->hide();
|
||||
ui->downloadButton->setEnabled(false);
|
||||
ui->pushButton_3->hide();
|
||||
int n = ui->listWidget->count();
|
||||
for (int i = 0; i < n; i++)
|
||||
{
|
||||
QListWidgetItem *item = ui->listWidget->takeItem(0);
|
||||
QWidget *card = ui->listWidget->itemWidget(item);
|
||||
delete card;
|
||||
card = NULL;
|
||||
delete item;
|
||||
item = NULL;
|
||||
}
|
||||
ui->listWidget->clear();
|
||||
}
|
||||
void AppIntoPage::setDownloadWidget(DownloadListWidget *w)
|
||||
{
|
||||
dw = w;
|
||||
connect(w, &DownloadListWidget::downloadFinished, [=]()
|
||||
{ isDownloading(SparkAPI::getServerUrl() + "store" + spk.path() + "/" + info["Filename"].toString()); });
|
||||
}
|
||||
void AppIntoPage::openUrl(QUrl url)
|
||||
{
|
||||
spk = url;
|
||||
SparkAPI *api = new SparkAPI(this);
|
||||
clear();
|
||||
connect(api, &SparkAPI::finishedObject, [=](QJsonObject appinfo)
|
||||
{
|
||||
info = appinfo;
|
||||
|
||||
// 显示基本信息
|
||||
info = appinfo;
|
||||
// qDebug()<<url;
|
||||
//获取图标
|
||||
QNetworkRequest request;
|
||||
QNetworkAccessManager *naManager = new QNetworkAccessManager(this);
|
||||
qDebug()<<api->getImgServerUrl()+"store"+url.path().replace("+","%2B") + "/icon.png";
|
||||
request.setUrl(QUrl(api->getImgServerUrl()+"store"+url.path().replace("+","%2B") + "/icon.png"));
|
||||
request.setRawHeader("User-Agent", "Mozilla/5.0");
|
||||
request.setRawHeader("Content-Type", "charset='utf-8'");
|
||||
naManager->get(request);
|
||||
QObject::connect(naManager,&QNetworkAccessManager::finished,[=](QNetworkReply *reply){
|
||||
QByteArray jpegData = reply->readAll();
|
||||
iconpixmap.loadFromData(jpegData);
|
||||
iconpixmap.scaled(210, 200, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
|
||||
ui->icon->setPixmap(iconpixmap);
|
||||
ui->icon->setScaledContents(true);
|
||||
});
|
||||
ui->title->setText(info["Name"].toString());
|
||||
ui->version->setText(info["Version"].toString());
|
||||
ui->author->setText(info["Author"].toString());
|
||||
@@ -48,62 +88,6 @@ void AppIntoPage::openUrl(const QUrl &url)
|
||||
ui->d_contributor->setText(info["Contributor"].toString());
|
||||
ui->label_2->setText(info["More"].toString());
|
||||
|
||||
// 显示 tags
|
||||
QStringList taglist = info["Tags"].toString().split(";", QString::SkipEmptyParts);
|
||||
setAppinfoTags(taglist);
|
||||
|
||||
// 获取图标
|
||||
QNetworkRequest request;
|
||||
QNetworkAccessManager *manager = new QNetworkAccessManager(this);
|
||||
qDebug() << api->getImgServerUrl() + "store" + url.path() + "/icon.png";
|
||||
request.setUrl(QUrl(api->getImgServerUrl() + "store" + url.path() + "/icon.png"));
|
||||
request.setRawHeader("User-Agent", "Mozilla/5.0");
|
||||
request.setRawHeader("Content-Type", "charset='utf-8'");
|
||||
manager->get(request);
|
||||
QObject::connect(manager, &QNetworkAccessManager::finished, [=](QNetworkReply *reply)
|
||||
{
|
||||
QByteArray jpegData = reply->readAll();
|
||||
iconpixmap.loadFromData(jpegData);
|
||||
iconpixmap.scaled(210, 200, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
|
||||
ui->icon->setPixmap(iconpixmap);
|
||||
ui->icon->setScaledContents(true);
|
||||
|
||||
manager->deleteLater(); });
|
||||
|
||||
// 获取截图
|
||||
QJsonParseError error;
|
||||
QJsonArray array = QJsonDocument::fromJson(info.value("img_urls").toString().toUtf8(), &error).array();
|
||||
QStringList imglist;
|
||||
foreach (const QJsonValue &value, array) {
|
||||
QString imgUrl = value.toString();
|
||||
imglist.append(imgUrl);
|
||||
}
|
||||
qDebug() << imglist;
|
||||
|
||||
for (int i = 0; i < imglist.size(); i++)
|
||||
{
|
||||
QNetworkRequest request;
|
||||
QNetworkAccessManager *manager = new QNetworkAccessManager(this);
|
||||
request.setUrl(QUrl(imglist.value(i)));
|
||||
request.setRawHeader("User-Agent", "Mozilla/5.0");
|
||||
request.setRawHeader("Content-Type", "charset='utf-8'");
|
||||
manager->get(request);
|
||||
QObject::connect(manager, &QNetworkAccessManager::finished, [=](QNetworkReply *reply)
|
||||
{
|
||||
QByteArray jpegData = reply->readAll();
|
||||
QPixmap pixmap;
|
||||
pixmap.loadFromData(jpegData);
|
||||
pixmap.scaled(100, 100, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
|
||||
image_show *img=new image_show(this);
|
||||
img->setImage(pixmap);
|
||||
//img->setScaledContents(true);
|
||||
QListWidgetItem* pItem = new QListWidgetItem();
|
||||
pItem->setSizeHint(QSize(280, 200));
|
||||
ui->listWidget->addItem(pItem);
|
||||
ui->listWidget->setItemWidget(pItem, img);
|
||||
|
||||
manager->deleteLater(); });
|
||||
}
|
||||
|
||||
// Check UOS
|
||||
QSettings config(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/config.ini", QSettings::IniFormat);
|
||||
@@ -151,6 +135,9 @@ void AppIntoPage::openUrl(const QUrl &url)
|
||||
isUpdated = false;
|
||||
}
|
||||
|
||||
QObject::connect(naManager, &QNetworkAccessManager::finished, [=]()
|
||||
{
|
||||
|
||||
if (isInstalled)
|
||||
{
|
||||
if (isUpdated)
|
||||
@@ -172,160 +159,84 @@ void AppIntoPage::openUrl(const QUrl &url)
|
||||
{
|
||||
ui->downloadButton->setText(tr("Download"));
|
||||
ui->downloadButton->setEnabled(true);
|
||||
ui->downloadButton->show();
|
||||
}
|
||||
|
||||
isDownloading(SparkAPI::getServerUrl() + "store" + spk.path() + "/" + info["Filename"].toString());
|
||||
ui->downloadButton->show();
|
||||
} });
|
||||
}
|
||||
|
||||
api1->disconnect();
|
||||
api1->deleteLater(); });
|
||||
|
||||
api1->getAppInfo(url);
|
||||
|
||||
api->getAppDownloadTimes(url);
|
||||
QStringList taglist = info["Tags"].toString().split(";");
|
||||
QString tmp=info["img_urls"].toString();
|
||||
qDebug() << tmp;
|
||||
if (tmp.left(2) == "[\"")
|
||||
{
|
||||
tmp.remove(0, 2);
|
||||
}
|
||||
if (tmp.right(2) == "\"]")
|
||||
{
|
||||
tmp.remove(tmp.size() - 2, tmp.size());
|
||||
}
|
||||
QStringList imglist = tmp.split("\",\"");
|
||||
qDebug() << imglist;
|
||||
for (int i = 0; i < imglist.size(); i++)
|
||||
{
|
||||
QNetworkRequest request;
|
||||
QNetworkAccessManager *iconNaManager = new QNetworkAccessManager(this);
|
||||
request.setUrl(QUrl(imglist[i].replace("+", "%2B")));
|
||||
request.setRawHeader("User-Agent", "Mozilla/5.0");
|
||||
request.setRawHeader("Content-Type", "charset='utf-8'");
|
||||
iconNaManager->get(request);
|
||||
QObject::connect(iconNaManager, &QNetworkAccessManager::finished, [=](QNetworkReply *reply)
|
||||
{
|
||||
QByteArray jpegData = reply->readAll();
|
||||
QPixmap pixmap;
|
||||
pixmap.loadFromData(jpegData);
|
||||
pixmap.scaled(100, 100, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
|
||||
image_show *img=new image_show(this);
|
||||
img->setImage(pixmap);
|
||||
//img->setScaledContents(true);
|
||||
QListWidgetItem* pItem = new QListWidgetItem();
|
||||
pItem->setSizeHint(QSize(280, 200));
|
||||
ui->listWidget->addItem(pItem);
|
||||
ui->listWidget->setItemWidget(pItem, img);
|
||||
});
|
||||
}
|
||||
this->sltAppinfoTags(&taglist);
|
||||
disconnect(api,&SparkAPI::finished,nullptr,nullptr);
|
||||
api->deleteLater(); });
|
||||
api->getAppInfo(url);
|
||||
api1->getAppDownloadTimes(url);
|
||||
}
|
||||
|
||||
void AppIntoPage::clear()
|
||||
void AppIntoPage::isDownloading(QUrl url)
|
||||
{
|
||||
ui->tag_a2d->hide();
|
||||
ui->tag_uos->hide();
|
||||
ui->tag_dtk5->hide();
|
||||
ui->tag_deepin->hide();
|
||||
ui->tag_dwine2->hide();
|
||||
ui->tag_dwine5->hide();
|
||||
ui->tag_ubuntu->hide();
|
||||
ui->tag_community->hide();
|
||||
ui->icon->clear();
|
||||
ui->title->clear();
|
||||
ui->author->clear();
|
||||
ui->label_2->clear();
|
||||
ui->downloadButton->hide();
|
||||
ui->downloadButton->setEnabled(false);
|
||||
ui->pushButton_3->hide();
|
||||
|
||||
// QListWidgetItem *item = nullptr;
|
||||
// while ((item = ui->listWidget->takeItem(0)) != nullptr)
|
||||
// {
|
||||
// QWidget *card = ui->listWidget->itemWidget(item);
|
||||
// if (card)
|
||||
// {
|
||||
// card->deleteLater();
|
||||
// card = nullptr;
|
||||
// }
|
||||
// delete item;
|
||||
// item = nullptr;
|
||||
// }
|
||||
|
||||
ui->listWidget->clear(); // NOTE: QListWidget::clear() 会析构所有 items
|
||||
}
|
||||
|
||||
void AppIntoPage::setTheme(bool dark)
|
||||
if (dw->getUrlList().lastIndexOf(url) == -1)
|
||||
{
|
||||
if (dark)
|
||||
{
|
||||
QString frameStyleSheet ="#frame,#frame_2,#frame_3,#frame_4 {background-color: #252525; border-radius: 14px; border: 1px solid rgb(64, 64, 64);}\
|
||||
QLabel#cardtitle,QLabel#title,QLabel#title_1,QLabel#title_2,QLabel#title_3 {color: #FFFFFF}";
|
||||
ui->frame->setStyleSheet(frameStyleSheet);
|
||||
ui->frame_2->setStyleSheet(frameStyleSheet);
|
||||
ui->frame_3->setStyleSheet(frameStyleSheet);
|
||||
ui->frame_4->setStyleSheet(frameStyleSheet);
|
||||
|
||||
ui->icon_1->setPixmap(QPixmap(":/icon/dark/box.svg"));
|
||||
ui->icon_2->setPixmap(QPixmap(":/icon/dark/box.svg"));
|
||||
ui->icon_3->setPixmap(QPixmap(":/icon/dark/calendar.svg"));
|
||||
ui->icon_4->setPixmap(QPixmap(":/icon/dark/text.svg"));
|
||||
ui->icon_5->setPixmap(QPixmap(":/icon/dark/folder.svg"));
|
||||
ui->icon_6->setPixmap(QPixmap(":/icon/dark/globe.svg"));
|
||||
ui->downloadButton->setEnabled(true);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
//亮色模式
|
||||
QString frameStyleSheet ="#frame,#frame_2,#frame_3,#frame_4 {background-color: #fbfbfb; border-radius: 14px; border: 1px solid rgb(229,229,229);}\
|
||||
QLabel#cardtitle,QLabel#title,QLabel#title_1,QLabel#title_2,QLabel#title_3 {color: #000000}";
|
||||
ui->frame->setStyleSheet(frameStyleSheet);
|
||||
ui->frame_2->setStyleSheet(frameStyleSheet);
|
||||
ui->frame_3->setStyleSheet(frameStyleSheet);
|
||||
ui->frame_4->setStyleSheet(frameStyleSheet);
|
||||
|
||||
ui->icon_1->setPixmap(QPixmap(":/icon/light/box.svg"));
|
||||
ui->icon_2->setPixmap(QPixmap(":/icon/light/box.svg"));
|
||||
ui->icon_3->setPixmap(QPixmap(":/icon/light/calendar.svg"));
|
||||
ui->icon_4->setPixmap(QPixmap(":/icon/light/text.svg"));
|
||||
ui->icon_5->setPixmap(QPixmap(":/icon/light/folder.svg"));
|
||||
ui->icon_6->setPixmap(QPixmap(":/icon/light/globe.svg"));
|
||||
}
|
||||
}
|
||||
|
||||
void AppIntoPage::setDownloadWidget(DownloadListWidget *w)
|
||||
{
|
||||
if (dw)
|
||||
{
|
||||
dw->deleteLater();
|
||||
dw = nullptr;
|
||||
}
|
||||
|
||||
dw = w;
|
||||
connect(w, &DownloadListWidget::downloadFinished, [=]()
|
||||
{ isDownloading(SparkAPI::getServerUrl() + "store" + spk.path() + "/" + info["Filename"].toString()); });
|
||||
}
|
||||
|
||||
void AppIntoPage::initUI()
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
ui->listWidget->setViewMode(QListView::IconMode);
|
||||
ui->listWidget->setFlow(QListView::TopToBottom);
|
||||
ui->listWidget->setMovement(QListView::Static);
|
||||
ui->listWidget->setMaximumHeight(200);
|
||||
|
||||
clear();
|
||||
}
|
||||
|
||||
void AppIntoPage::initConnections()
|
||||
{
|
||||
connect(api, &SparkAPI::finishedRAW, [=](QString download_times)
|
||||
{
|
||||
download_times = download_times.trimmed();
|
||||
qDebug() << "Download Times:" + download_times;
|
||||
ui->download_times->setText(download_times); });
|
||||
}
|
||||
|
||||
void AppIntoPage::isDownloading(const QUrl &url)
|
||||
{
|
||||
int index = dw->getUrlList().lastIndexOf(url);
|
||||
if (index == -1)
|
||||
{
|
||||
ui->downloadButton->setEnabled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
DownloadItem *item = dw->getDIList().at(index);
|
||||
if (item == nullptr)
|
||||
{
|
||||
ui->downloadButton->setEnabled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
ui->downloadButton->setEnabled(false);
|
||||
}
|
||||
|
||||
ui->pushButton_3->hide();
|
||||
if (item->download == 2)
|
||||
if (dw->getDIList()[dw->getUrlList().lastIndexOf(url)]->download == 2)
|
||||
{
|
||||
ui->downloadButton->setEnabled(true);
|
||||
ui->downloadButton->setText(tr("Download"));
|
||||
}
|
||||
if (item->download == 1)
|
||||
if (dw->getDIList()[dw->getUrlList().lastIndexOf(url)]->download == 1)
|
||||
{
|
||||
ui->downloadButton->setEnabled(true);
|
||||
ui->downloadButton->setText(tr("Install"));
|
||||
}
|
||||
if (item->isInstall)
|
||||
if (dw->getDIList()[dw->getUrlList().lastIndexOf(url)]->isInstall)
|
||||
{
|
||||
ui->downloadButton->setEnabled(false);
|
||||
ui->downloadButton->setText(tr("Installing"));
|
||||
return;
|
||||
}
|
||||
if (item->download == 3)
|
||||
if (dw->getDIList()[dw->getUrlList().lastIndexOf(url)]->download == 3)
|
||||
{
|
||||
ui->downloadButton->setEnabled(true);
|
||||
ui->downloadButton->setText(tr("Reinstall"));
|
||||
@@ -334,9 +245,9 @@ void AppIntoPage::isDownloading(const QUrl &url)
|
||||
}
|
||||
}
|
||||
|
||||
void AppIntoPage::setAppinfoTags(const QStringList &tagList)
|
||||
void AppIntoPage::sltAppinfoTags(QStringList *tagList)
|
||||
{
|
||||
foreach (const QString &tag, tagList)
|
||||
foreach (const QString &tag, *tagList)
|
||||
{
|
||||
if (tag == "community")
|
||||
{
|
||||
@@ -372,42 +283,69 @@ void AppIntoPage::setAppinfoTags(const QStringList &tagList)
|
||||
}
|
||||
}
|
||||
}
|
||||
void AppIntoPage::setTheme(bool dark)
|
||||
{
|
||||
if (dark)
|
||||
{
|
||||
QString frameStyleSheet ="#frame,#frame_2,#frame_3,#frame_4 {background-color: #252525; border-radius: 14px; border: 1px solid rgb(64, 64, 64);}\
|
||||
QLabel#cardtitle,QLabel#title,QLabel#title_1,QLabel#title_2,QLabel#title_3 {color: #FFFFFF}";
|
||||
ui->frame->setStyleSheet(frameStyleSheet);
|
||||
ui->frame_2->setStyleSheet(frameStyleSheet);
|
||||
ui->frame_3->setStyleSheet(frameStyleSheet);
|
||||
ui->frame_4->setStyleSheet(frameStyleSheet);
|
||||
|
||||
ui->icon_1->setPixmap(QPixmap(":/icon/dark/box.svg"));
|
||||
ui->icon_2->setPixmap(QPixmap(":/icon/dark/box.svg"));
|
||||
ui->icon_3->setPixmap(QPixmap(":/icon/dark/calendar.svg"));
|
||||
ui->icon_4->setPixmap(QPixmap(":/icon/dark/text.svg"));
|
||||
ui->icon_5->setPixmap(QPixmap(":/icon/dark/folder.svg"));
|
||||
ui->icon_6->setPixmap(QPixmap(":/icon/dark/globe.svg"));
|
||||
}else {
|
||||
//亮色模式
|
||||
QString frameStyleSheet ="#frame,#frame_2,#frame_3,#frame_4 {background-color: #fbfbfb; border-radius: 14px; border: 1px solid rgb(229,229,229);}\
|
||||
QLabel#cardtitle,QLabel#title,QLabel#title_1,QLabel#title_2,QLabel#title_3 {color: #000000}";
|
||||
ui->frame->setStyleSheet(frameStyleSheet);
|
||||
ui->frame_2->setStyleSheet(frameStyleSheet);
|
||||
ui->frame_3->setStyleSheet(frameStyleSheet);
|
||||
ui->frame_4->setStyleSheet(frameStyleSheet);
|
||||
|
||||
ui->icon_1->setPixmap(QPixmap(":/icon/light/box.svg"));
|
||||
ui->icon_2->setPixmap(QPixmap(":/icon/light/box.svg"));
|
||||
ui->icon_3->setPixmap(QPixmap(":/icon/light/calendar.svg"));
|
||||
ui->icon_4->setPixmap(QPixmap(":/icon/light/text.svg"));
|
||||
ui->icon_5->setPixmap(QPixmap(":/icon/light/folder.svg"));
|
||||
ui->icon_6->setPixmap(QPixmap(":/icon/light/globe.svg"));
|
||||
}
|
||||
}
|
||||
AppIntoPage::~AppIntoPage()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void AppIntoPage::on_downloadButton_clicked()
|
||||
{
|
||||
QString downloadUrl = SparkAPI::getServerUrl() + "store" + spk.path() + "/" + info["Filename"].toString();
|
||||
if (ui->downloadButton->text() == tr("Install"))
|
||||
{
|
||||
DownloadItem *item = dw->getDIList()[dw->getUrlList().lastIndexOf(downloadUrl)];
|
||||
if (item == nullptr)
|
||||
dw->getDIList()[dw->getUrlList().lastIndexOf(SparkAPI::getServerUrl() + "store" + spk.path() + "/" + info["Filename"].toString())]->install(0);
|
||||
isDownloading(SparkAPI::getServerUrl() + "store" + spk.path() + "/" + info["Filename"].toString());
|
||||
QObject::connect(dw->getDIList()[dw->getUrlList().lastIndexOf(SparkAPI::getServerUrl() + "store" + spk.path() + "/" + info["Filename"].toString())], &DownloadItem::finished, [=]()
|
||||
{
|
||||
isDownloading(SparkAPI::getServerUrl()+"store"+spk.path()+"/"+info["Filename"].toString());
|
||||
disconnect(dw->getDIList()[dw->getUrlList().lastIndexOf(SparkAPI::getServerUrl()+"store"+spk.path()+"/"+info["Filename"].toString())],&DownloadItem::finished,nullptr,nullptr); });
|
||||
return;
|
||||
}
|
||||
|
||||
connect(item, &DownloadItem::finished, [=]() { isDownloading(downloadUrl); });
|
||||
|
||||
item->install(0);
|
||||
isDownloading(downloadUrl);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
emit clickedDownloadBtn();
|
||||
|
||||
DownloadItem *item = dw->addItem(info["Name"].toString(), info["Filename"].toString(), info["Pkgname"].toString(), iconpixmap, downloadUrl);
|
||||
if (item == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
dw->addItem(info["Name"].toString(), info["Filename"].toString(), info["Pkgname"].toString(), iconpixmap, SparkAPI::getServerUrl() + "store" + spk.path() + "/" + info["Filename"].toString());
|
||||
if (ui->downloadButton->text() == tr("Reinstall"))
|
||||
{
|
||||
item->reinstall = true;
|
||||
dw->getDIList()[dw->allDownload - 1]->reinstall = true;
|
||||
}
|
||||
ui->downloadButton->setEnabled(false);
|
||||
connect(item, &DownloadItem::finished, [=]() { isDownloading(downloadUrl); });
|
||||
|
||||
isDownloading(downloadUrl);
|
||||
QObject::connect(dw->getDIList()[dw->getUrlList().lastIndexOf(SparkAPI::getServerUrl() + "store" + spk.path() + "/" + info["Filename"].toString())], &DownloadItem::finished, [=]()
|
||||
{
|
||||
isDownloading(SparkAPI::getServerUrl()+"store"+spk.path()+"/"+info["Filename"].toString());
|
||||
disconnect(dw->getDIList()[dw->getUrlList().lastIndexOf(SparkAPI::getServerUrl()+"store"+spk.path()+"/"+info["Filename"].toString())],&DownloadItem::finished,nullptr,nullptr); });
|
||||
isDownloading(SparkAPI::getServerUrl() + "store" + spk.path() + "/" + info["Filename"].toString());
|
||||
}
|
||||
|
||||
void AppIntoPage::on_pushButton_3_clicked()
|
||||
@@ -442,9 +380,9 @@ void AppIntoPage::on_pushButton_3_clicked()
|
||||
void AppIntoPage::on_shareButton_clicked()
|
||||
{
|
||||
qDebug() << "Share" << spk;
|
||||
Application::clipboard()->setText(spk.toString());
|
||||
|
||||
Utils::sendNotification("spark-store", tr("Spark Store"), tr("The URL has been copied to the clipboard"));
|
||||
QClipboard *clipboard = QApplication::clipboard();
|
||||
clipboard->setText(spk.toString());
|
||||
}
|
||||
|
||||
void AppIntoPage::on_updateButton_clicked()
|
||||
|
||||
@@ -2,52 +2,51 @@
|
||||
#define APPINTOPAGE_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QJsonObject>
|
||||
#include <QUrl>
|
||||
|
||||
#include <QString>
|
||||
#include <QtConcurrent>
|
||||
#include <QClipboard>
|
||||
#include "backend/sparkapi.h"
|
||||
#include "backend/image_show.h"
|
||||
#include "widgets/downloadlistwidget.h"
|
||||
#include "utils/utils.h"
|
||||
namespace Ui {
|
||||
class AppIntoPage;
|
||||
}
|
||||
|
||||
class SparkAPI;
|
||||
class DownloadListWidget;
|
||||
class AppIntoPage : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit AppIntoPage(QWidget *parent = nullptr);
|
||||
~AppIntoPage() override;
|
||||
|
||||
void openUrl(const QUrl &url);
|
||||
void clear();
|
||||
void setTheme(bool dark);
|
||||
void setDownloadWidget(DownloadListWidget *w);
|
||||
|
||||
private:
|
||||
void initUI();
|
||||
void initConnections();
|
||||
void isDownloading(const QUrl &url);
|
||||
void setAppinfoTags(const QStringList &tagList);
|
||||
|
||||
signals:
|
||||
void clickedDownloadBtn();
|
||||
void setTheme(bool dark);
|
||||
void openUrl(QUrl url);
|
||||
explicit AppIntoPage(QWidget *parent = nullptr);
|
||||
~AppIntoPage();
|
||||
|
||||
private slots:
|
||||
void on_downloadButton_clicked();
|
||||
|
||||
void on_pushButton_3_clicked();
|
||||
|
||||
void on_shareButton_clicked();
|
||||
|
||||
void on_updateButton_clicked();
|
||||
|
||||
private:
|
||||
Ui::AppIntoPage *ui;
|
||||
|
||||
SparkAPI *api;
|
||||
DownloadListWidget *dw = nullptr;
|
||||
|
||||
SparkAPI *api1;
|
||||
QJsonObject info;
|
||||
QPixmap iconpixmap;
|
||||
QUrl spk;
|
||||
void isDownloading(QUrl url);
|
||||
void sltAppinfoTags(QStringList *tagList);
|
||||
DownloadListWidget *dw;
|
||||
Ui::AppIntoPage *ui;
|
||||
|
||||
signals:
|
||||
void clickedDownloadBtn();
|
||||
};
|
||||
|
||||
#endif // APPINTOPAGE_H
|
||||
|
||||
@@ -22,11 +22,6 @@ DEFINES += QT_DEPRECATED_WARNINGS
|
||||
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||
|
||||
# Get build version from qmake
|
||||
VERSION = $$BUILD_VERSION
|
||||
isEmpty(VERSION): VERSION = 4.0.0
|
||||
DEFINES += APP_VERSION=\\\"'$${VERSION}'\\\"
|
||||
|
||||
# Disable qWarning / qDebug output in Release
|
||||
# CONFIG(release, debug|release): DEFINES += QT_NO_WARNING_OUTPUT QT_NO_DEBUG_OUTPUT
|
||||
|
||||
@@ -94,8 +89,7 @@ RESOURCES += \
|
||||
TRANSLATIONS += \
|
||||
../translations/spark-store_en.ts \
|
||||
../translations/spark-store_fr.ts \
|
||||
../translations/spark-store_zh_CN.ts \
|
||||
../translations/spark-store_zh_TW.ts
|
||||
../translations/spark-store_zh_CN.ts
|
||||
|
||||
# Default rules for deployment.
|
||||
qnx: target.path = /tmp/$${TARGET}/bin
|
||||
|
||||
@@ -1,33 +1,19 @@
|
||||
#include "utils.h"
|
||||
#include "application.h"
|
||||
|
||||
#include <DSysInfo>
|
||||
|
||||
#include <QDBusInterface>
|
||||
#include <QProcessEnvironment>
|
||||
#include <QSettings>
|
||||
#include <QStandardPaths>
|
||||
#include <QFile>
|
||||
#include <QJsonDocument>
|
||||
|
||||
#define UOSDeveloperModeFile "/var/lib/deepin/developer-mode/enabled"
|
||||
|
||||
/**
|
||||
* @author chatGPT
|
||||
* @brief Utils::sendNotification 发送系统通知
|
||||
* @param icon 图标名称
|
||||
* @param title 通知标题
|
||||
* @param body 通知内容
|
||||
*/
|
||||
void Utils::sendNotification(const QString &icon, const QString &title, const QString &body)
|
||||
Utils::Utils()
|
||||
{
|
||||
QDBusInterface interface("org.freedesktop.Notifications",
|
||||
}
|
||||
|
||||
// Author: chatGPT
|
||||
void Utils::sendNotification(QString icon, QString title, QString body)
|
||||
{
|
||||
QDBusInterface iface("org.freedesktop.Notifications",
|
||||
"/org/freedesktop/Notifications",
|
||||
"org.freedesktop.Notifications");
|
||||
|
||||
QVariantList args;
|
||||
args << Application::applicationName() // the name of the application
|
||||
<< static_cast<quint32>(0) // replaces the previous notification with the same ID
|
||||
args << QCoreApplication::applicationName() // the name of the application
|
||||
<< (uint)0 // replaces the previous notification with the same ID
|
||||
<< icon // the application icon of the notification
|
||||
<< title // the title of the notification
|
||||
<< body // the body of the notification
|
||||
@@ -35,181 +21,5 @@ void Utils::sendNotification(const QString &icon, const QString &title, const QS
|
||||
<< QVariantMap() // no hints
|
||||
<< -1; // no timeout
|
||||
|
||||
interface.callWithArgumentList(QDBus::AutoDetect, "Notify", args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Utils::isDDE 判断是否使用 DDE 桌面环境
|
||||
* @return
|
||||
*/
|
||||
bool Utils::isDDE()
|
||||
{
|
||||
bool isDDE = true;
|
||||
if (!QString::fromUtf8(qgetenv("XDG_CURRENT_DESKTOP")).toLower().startsWith("deepin"))
|
||||
{
|
||||
qputenv("XDG_CURRENT_DESKTOP", "Deepin");
|
||||
isDDE = false;
|
||||
}
|
||||
|
||||
return isDDE;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Utils::isWayland 判断是否使用 wayland 显示协议
|
||||
* @return bool true: 使用 wayland 显示协议 false: 使用 x11 显示协议
|
||||
*/
|
||||
bool Utils::isWayland()
|
||||
{
|
||||
bool isWayland = false;
|
||||
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
||||
QString XDG_SESSION_TYPE = env.value(QStringLiteral("XDG_SESSION_TYPE"));
|
||||
QString WAYLAND_DISPLAY = env.value(QStringLiteral("WAYLAND_DISPLAY"));
|
||||
if (XDG_SESSION_TYPE == QLatin1String("wayland") || WAYLAND_DISPLAY.contains(QLatin1String("wayland"), Qt::CaseInsensitive))
|
||||
{
|
||||
isWayland = true;
|
||||
}
|
||||
|
||||
return isWayland;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Utils::initConfig 初始化 config.ini 配置文件,去除废弃字段
|
||||
*/
|
||||
void Utils::initConfig()
|
||||
{
|
||||
// WARNING: 请在 组织名称 和 应用程序名称 初始化完成后调用
|
||||
bool useWayland = true;
|
||||
|
||||
QSettings config(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/config.ini", QSettings::IniFormat);
|
||||
if (config.contains("build/useWayland"))
|
||||
{
|
||||
useWayland = config.value("build/useWayland").toBool();
|
||||
}
|
||||
config.remove("build/isDeepinOS");
|
||||
config.remove("build/isWayland");
|
||||
config.remove("build/useWayland");
|
||||
|
||||
config.setValue("runtime/isDDE", isDDE());
|
||||
config.setValue("runtime/isWayland", isWayland());
|
||||
// Check config file, if there is no wayland config, then set it to default, which means use wayland if possible.
|
||||
if (!config.contains("runtime/useWayland"))
|
||||
{
|
||||
config.setValue("runtime/useWayland", useWayland);
|
||||
}
|
||||
config.sync(); // 写入更改至 config.ini,并同步最新内容
|
||||
|
||||
checkUOSDeveloperMode(); // Check UOS developer mode
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Utils::isUOS 判断是否为 UOS 操作系统
|
||||
* @return bool true: UOS 操作系统 false: 非 UOS 操作系统
|
||||
*/
|
||||
bool Utils::isUOS()
|
||||
{
|
||||
// WARNING: 请在 组织名称 和 应用程序名称 初始化完成后调用
|
||||
bool isUOS = false;
|
||||
|
||||
QSettings config(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/config.ini", QSettings::IniFormat);
|
||||
if (Dtk::Core::DSysInfo::productType() == Dtk::Core::DSysInfo::Uos)
|
||||
{
|
||||
isUOS = true;
|
||||
config.setValue("UOS/isUOS", true);
|
||||
}
|
||||
else
|
||||
{
|
||||
isUOS = false;
|
||||
config.remove("UOS");
|
||||
}
|
||||
config.sync(); // 写入更改至 config.ini,并同步最新内容
|
||||
|
||||
return isUOS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Utils::setQPAPlatform Set display backend
|
||||
*/
|
||||
void Utils::setQPAPlatform()
|
||||
{
|
||||
// WARNING: 请在 initConfig() 执行后调用
|
||||
bool isDDE = Utils::isDDE(); // WARNING: 只能执行一次,后续执行时环境变量已经被覆盖,导致判断错误
|
||||
bool isWayland = Utils::isWayland();
|
||||
|
||||
QSettings config(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/config.ini", QSettings::IniFormat);
|
||||
bool useWayland = config.value("runtime/useWayland").toBool();
|
||||
|
||||
qDebug() << "System Wayland enabled:" << isWayland << "Spark Wayland enabled:" << useWayland;
|
||||
|
||||
if (isWayland && useWayland && !(Dtk::Core::DSysInfo::isDeepin() || isDDE))
|
||||
{
|
||||
qputenv("QT_QPA_PLATFORM", "wayland");
|
||||
}
|
||||
else if (isWayland && useWayland && (Dtk::Core::DSysInfo::isDeepin() && isDDE))
|
||||
{
|
||||
qputenv("QT_QPA_PLATFORM", "dwayland");
|
||||
}
|
||||
else
|
||||
{
|
||||
qputenv("QT_QPA_PLATFORM", "dxcb");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Utils::checkUOSDeveloperMode Check UOS developer mode
|
||||
*/
|
||||
void Utils::checkUOSDeveloperMode()
|
||||
{
|
||||
QSettings config(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/config.ini", QSettings::IniFormat);
|
||||
|
||||
QFile file(UOSDeveloperModeFile);
|
||||
if (Utils::isUOS() && file.exists() && file.open(QFile::ReadOnly | QFile::Text))
|
||||
{
|
||||
QString lineData = QString::fromUtf8(file.readLine());
|
||||
bool devmode = lineData.trimmed().toInt();
|
||||
qDebug() << "UOS Developer Mode Status:" << devmode;
|
||||
config.setValue("UOS/EnableDeveloperMode", devmode);
|
||||
}
|
||||
else
|
||||
{
|
||||
/**
|
||||
* NOTE: Utils::isUOS() 中,判断为非 UOS 时已经从 config 中删除 UOS 组,
|
||||
* 此处若包含该字段则一定是 UOS,直接写入开发者模式开关状态即可
|
||||
*/
|
||||
if (config.contains("UOS/EnableDeveloperMode"))
|
||||
{
|
||||
config.setValue("UOS/EnableDeveloperMode", false);
|
||||
}
|
||||
}
|
||||
file.close();
|
||||
config.sync(); // 写入更改至 config.ini,并同步最新内容
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Utils::parseFeatureJsonFile 解析版本特性 json 文件
|
||||
* @return 返回 QJsonObject
|
||||
*/
|
||||
QJsonObject Utils::parseFeatureJsonFile()
|
||||
{
|
||||
QFile file(":/json/features.json");
|
||||
if (!file.open(QFile::ReadOnly))
|
||||
{
|
||||
qWarning() << Q_FUNC_INFO << "features.json open failed";
|
||||
return QJsonObject();
|
||||
}
|
||||
|
||||
QJsonParseError error;
|
||||
QJsonDocument jsonDoc = QJsonDocument::fromJson(file.readAll(), &error);
|
||||
if (error.error != QJsonParseError::NoError || jsonDoc.isNull())
|
||||
{
|
||||
qWarning() << Q_FUNC_INFO << "features.json validate failed:" << error.errorString();
|
||||
return QJsonObject();
|
||||
}
|
||||
|
||||
if (jsonDoc.isEmpty() || !jsonDoc.isObject())
|
||||
{
|
||||
qWarning() << Q_FUNC_INFO << "features jsonDoc parse failed:" << jsonDoc;
|
||||
return QJsonObject();
|
||||
}
|
||||
|
||||
return jsonDoc.object();
|
||||
iface.callWithArgumentList(QDBus::AutoDetect, "Notify", args);
|
||||
}
|
||||
|
||||
@@ -2,19 +2,13 @@
|
||||
#define UTILS_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QJsonObject>
|
||||
#include <QtDBus>
|
||||
|
||||
class Utils
|
||||
{
|
||||
public:
|
||||
static void sendNotification(const QString &icon, const QString &title, const QString &body);
|
||||
static bool isDDE();
|
||||
static bool isWayland();
|
||||
static void initConfig();
|
||||
static bool isUOS();
|
||||
static void setQPAPlatform();
|
||||
static void checkUOSDeveloperMode();
|
||||
static QJsonObject parseFeatureJsonFile();
|
||||
Utils();
|
||||
static void sendNotification(QString icon,QString title,QString body);
|
||||
};
|
||||
|
||||
#endif // UTILS_H
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
#include "widgetanimation.h"
|
||||
#include "widgets/base/basewidgetopacity.h"
|
||||
|
||||
WidgetAnimation::WidgetAnimation()
|
||||
{
|
||||
}
|
||||
|
||||
void WidgetAnimation::widgetShake(QWidget *pWidget, int nRange)
|
||||
{
|
||||
@@ -25,35 +28,27 @@ void WidgetAnimation::widgetShake(QWidget *pWidget, int nRange)
|
||||
QPropertyAnimation *WidgetAnimation::createWidgetOpacity(QWidget *pWidget, bool isAppear)
|
||||
{
|
||||
QPropertyAnimation *animation = new QPropertyAnimation(pWidget, "windowOpacity", pWidget);
|
||||
// 设置动画时间(单位:毫秒)
|
||||
animation->setDuration(500);
|
||||
if (isAppear)
|
||||
{
|
||||
// 设置动画效果
|
||||
animation->setEasingCurve(QEasingCurve::Linear);
|
||||
// 设置动画步长值,以及在该位置时显示的透明度(即动画关键帧)
|
||||
animation->setKeyValueAt(0.0, 0.0);
|
||||
animation->setKeyValueAt(1.0, 1.0);
|
||||
// 设置动画时间(单位:毫秒)
|
||||
animation->setDuration(500);
|
||||
// 设置动画步长值,以及在该位置时显示的透明度
|
||||
if (isAppear)
|
||||
{
|
||||
animation->setKeyValueAt(0, 0);
|
||||
// m_animation->setKeyValueAt(0.5, 0);
|
||||
animation->setKeyValueAt(1, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
animation->setEasingCurve(QEasingCurve::OutQuart);
|
||||
animation->setKeyValueAt(0.0, 1.0);
|
||||
animation->setKeyValueAt(1.0, 0.0);
|
||||
|
||||
QObject::connect(animation, &QPropertyAnimation::finished, pWidget, [=]() { pWidget->close(); });
|
||||
animation->setKeyValueAt(0, 1);
|
||||
animation->setKeyValueAt(1, 0);
|
||||
}
|
||||
|
||||
QObject::connect(animation, &QPropertyAnimation::valueChanged, pWidget, [=]()
|
||||
{
|
||||
pWidget->update(); // NOTE: 保证窗口透明度动画平滑
|
||||
});
|
||||
|
||||
return animation;
|
||||
}
|
||||
|
||||
void WidgetAnimation::widgetOpacity(QWidget *pWidget, bool isAppear)
|
||||
{
|
||||
// 启动/关闭动画
|
||||
createWidgetOpacity(pWidget, isAppear)->start(QPropertyAnimation::DeleteWhenStopped);
|
||||
// 开始动画
|
||||
createWidgetOpacity(pWidget, isAppear)->start();
|
||||
}
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
#ifndef WIDGETANIMATION_H
|
||||
#define WIDGETANIMATION_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QWidget>
|
||||
#include <QPropertyAnimation>
|
||||
|
||||
class WidgetAnimation
|
||||
{
|
||||
public:
|
||||
WidgetAnimation();
|
||||
static void widgetShake(QWidget *pWidget, int nRange);
|
||||
|
||||
static QPropertyAnimation* createWidgetOpacity(QWidget *pWidget, bool isAppear);
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "basewidgetopacity.h"
|
||||
#include "utils/widgetanimation.h"
|
||||
#include "utils/utils.h"
|
||||
|
||||
#include <QSettings>
|
||||
#include <QStandardPaths>
|
||||
@@ -9,6 +8,7 @@
|
||||
|
||||
BaseWidgetOpacity::BaseWidgetOpacity(QWidget *parent) : DBlurEffectWidget(parent)
|
||||
{
|
||||
// WidgetAnimation::widgetOpacity(this,true);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -19,7 +19,7 @@ void BaseWidgetOpacity::showEvent(QShowEvent *event)
|
||||
{
|
||||
// FIXME: wayland 不支持直接设置窗口透明度,需要调用 wayland 相关库(考虑抄控制中心“窗口移动时启用透明特效”代码?)
|
||||
QSettings config(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/config.ini", QSettings::IniFormat);
|
||||
bool isWayland = Utils::isWayland();
|
||||
bool isWayland = config.value("build/isWayland").toBool();
|
||||
if (!isWayland)
|
||||
{
|
||||
if (!showWindowAnimation)
|
||||
@@ -32,15 +32,13 @@ void BaseWidgetOpacity::showEvent(QShowEvent *event)
|
||||
DBlurEffectWidget::showEvent(event);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 窗口关闭事件
|
||||
* @param event
|
||||
*/
|
||||
/// @brief 窗口关闭事件
|
||||
/// @param event
|
||||
void BaseWidgetOpacity::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
// FIXME: wayland 不支持直接设置窗口透明度,需要调用 wayland 相关库(考虑抄控制中心“窗口移动时启用透明特效”代码?)
|
||||
QSettings config(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/config.ini", QSettings::IniFormat);
|
||||
bool isWayland = Utils::isWayland();
|
||||
bool isWayland = config.value("build/isWayland").toBool();
|
||||
if (isWayland)
|
||||
{
|
||||
return DBlurEffectWidget::closeEvent(event);
|
||||
@@ -49,8 +47,23 @@ void BaseWidgetOpacity::closeEvent(QCloseEvent *event)
|
||||
if (!closeWindowAnimation)
|
||||
{
|
||||
closeWindowAnimation = true;
|
||||
WidgetAnimation::widgetOpacity(this, false);
|
||||
|
||||
QPropertyAnimation *animation = new QPropertyAnimation(this, "windowOpacity");
|
||||
animation->setEasingCurve(QEasingCurve::OutQuart);
|
||||
animation->setDuration(500);
|
||||
animation->setStartValue(1.0);
|
||||
animation->setEndValue(0.0);
|
||||
|
||||
QObject::connect(animation, &QPropertyAnimation::valueChanged, this, [=](const QVariant &value)
|
||||
{
|
||||
this->update();
|
||||
// setWindowTitle(QString("ヾ(⌒∇⌒*)See You♪ - %1%").arg(int(value.toFloat() * 100)));
|
||||
});
|
||||
|
||||
QObject::connect(animation, &QPropertyAnimation::finished, this, [=]()
|
||||
{ this->close(); });
|
||||
|
||||
animation->start();
|
||||
event->ignore();
|
||||
}
|
||||
else
|
||||
|
||||
@@ -61,21 +61,8 @@ QString DownloadItem::getName()
|
||||
return ui->label_filename->text();
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************
|
||||
* @brief 告知界面,准备安装
|
||||
* @param
|
||||
* @note 如果正在安装,返回-1
|
||||
* @Sample usage: DownloadItem::install(0);
|
||||
**************************************************************/
|
||||
int DownloadItem::readyInstall()
|
||||
void DownloadItem::readyInstall()
|
||||
{
|
||||
// 检查是否正在安装,如果是返回错误 -1
|
||||
if (isInstall)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!close)
|
||||
{
|
||||
ui->progressBar->hide();
|
||||
@@ -83,9 +70,7 @@ int DownloadItem::readyInstall()
|
||||
ui->pushButton_install->show();
|
||||
DownloadItem::install(0);
|
||||
ui->pushButton_2->hide();
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void DownloadItem::setFileName(QString fileName)
|
||||
@@ -108,12 +93,6 @@ void DownloadItem::setSpeed(QString s)
|
||||
speed = s;
|
||||
}
|
||||
|
||||
/***************************************************************
|
||||
* @brief 安装当前应用
|
||||
* @param int t, t为安装方式,可以为 0,1,2
|
||||
* @note 备注
|
||||
* @Sample usage: DownloadItem::install(0);
|
||||
**************************************************************/
|
||||
void DownloadItem::install(int t)
|
||||
{
|
||||
if (!isInstall)
|
||||
@@ -126,50 +105,6 @@ void DownloadItem::install(int t)
|
||||
ui->label_2->setToolTip(tr("Installing"));
|
||||
|
||||
QtConcurrent::run([=]()
|
||||
{
|
||||
slotAsyncInstall(t);
|
||||
});
|
||||
|
||||
qDebug() << ui->label_filename->text().toUtf8();
|
||||
}
|
||||
}
|
||||
|
||||
void DownloadItem::on_pushButton_install_clicked()
|
||||
{
|
||||
DownloadItem::install(0);
|
||||
}
|
||||
|
||||
void DownloadItem::on_pushButton_2_clicked()
|
||||
{
|
||||
ui->label_2->setText(tr("Download canceled"));
|
||||
ui->label_2->setToolTip(tr("Download canceled"));
|
||||
download = 2;
|
||||
ui->pushButton_2->setEnabled(false);
|
||||
ui->progressBar->hide();
|
||||
close = true;
|
||||
}
|
||||
|
||||
void DownloadItem::on_pushButton_3_clicked()
|
||||
{
|
||||
textbrowser->setLineWidth(0);
|
||||
textbrowser->setText(out);
|
||||
textbrowser->setMinimumHeight(500);
|
||||
|
||||
output_w->setMinimumHeight(600);
|
||||
output_w->setAttribute(Qt::WA_TranslucentBackground);
|
||||
output_w->setTitle(ui->label->text());
|
||||
output_w->layout()->setMargin(20);
|
||||
output_w->layout()->addWidget(textbrowser);
|
||||
output_w->show();
|
||||
}
|
||||
|
||||
/***************************************************************
|
||||
* @brief 实际安装应用
|
||||
* @param int t, t为安装方式,可以为 0,1,2
|
||||
* @note 备注
|
||||
* @Sample usage: slotAsyncInstall(0);
|
||||
**************************************************************/
|
||||
void DownloadItem::slotAsyncInstall(int t)
|
||||
{
|
||||
QProcess installer;
|
||||
switch(t)
|
||||
@@ -238,5 +173,37 @@ void DownloadItem::slotAsyncInstall(int t)
|
||||
|
||||
ui->widget_spinner->hide();
|
||||
DownloadItem::isInstall = false;
|
||||
emit finished();
|
||||
emit finished(); });
|
||||
// emit finished();
|
||||
qDebug() << ui->label_filename->text().toUtf8();
|
||||
}
|
||||
}
|
||||
|
||||
void DownloadItem::on_pushButton_install_clicked()
|
||||
{
|
||||
DownloadItem::install(0);
|
||||
}
|
||||
|
||||
void DownloadItem::on_pushButton_2_clicked()
|
||||
{
|
||||
ui->label_2->setText(tr("Download canceled"));
|
||||
ui->label_2->setToolTip(tr("Download canceled"));
|
||||
download = 2;
|
||||
ui->pushButton_2->setEnabled(false);
|
||||
ui->progressBar->hide();
|
||||
close = true;
|
||||
}
|
||||
|
||||
void DownloadItem::on_pushButton_3_clicked()
|
||||
{
|
||||
textbrowser->setLineWidth(0);
|
||||
textbrowser->setText(out);
|
||||
textbrowser->setMinimumHeight(500);
|
||||
|
||||
output_w->setMinimumHeight(600);
|
||||
output_w->setAttribute(Qt::WA_TranslucentBackground);
|
||||
output_w->setTitle(ui->label->text());
|
||||
output_w->layout()->setMargin(20);
|
||||
output_w->layout()->addWidget(textbrowser);
|
||||
output_w->show();
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ public:
|
||||
void setMax(qint64);
|
||||
void setName(QString);
|
||||
QString getName();
|
||||
int readyInstall();
|
||||
void readyInstall();
|
||||
|
||||
void setFileName(QString);
|
||||
void seticon(const QPixmap);
|
||||
@@ -59,8 +59,6 @@ private slots:
|
||||
void on_pushButton_2_clicked();
|
||||
void on_pushButton_3_clicked();
|
||||
|
||||
void slotAsyncInstall(int t);
|
||||
|
||||
signals:
|
||||
void finished();
|
||||
};
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
#include "progressbutton.h"
|
||||
#include "widgets/downloadlistwidget.h"
|
||||
|
||||
#include <QPainter>
|
||||
#include <QPainterPath>
|
||||
#include <QMoveEvent>
|
||||
#include <QRect>
|
||||
#include <QConicalGradient>
|
||||
#include <QVariantAnimation>
|
||||
#include <QSvgRenderer>
|
||||
|
||||
ProgressButton::ProgressButton(QWidget *parent)
|
||||
: QWidget{parent}
|
||||
{
|
||||
// this->setWindowFlags(Qt::FramelessWindowHint);
|
||||
// this->setAttribute(Qt::WA_TranslucentBackground, true);
|
||||
setMinimumSize(36, 36);
|
||||
|
||||
this->setAttribute(Qt::WA_TranslucentBackground, true);
|
||||
setMinimumWidth(36);
|
||||
setMinimumHeight(36);
|
||||
svgPath = "";
|
||||
backColor = Qt::transparent;
|
||||
setMouseTracking(true);
|
||||
|
||||
connect(this, &ProgressButton::startProcessing, this, &ProgressButton::operationProcessing, Qt::QueuedConnection);
|
||||
}
|
||||
@@ -23,6 +23,69 @@ ProgressButton::~ProgressButton()
|
||||
{
|
||||
}
|
||||
|
||||
void ProgressButton::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
QPainter painter(this);
|
||||
painter.setRenderHint(QPainter::Antialiasing, true);
|
||||
auto rect = event->rect();
|
||||
|
||||
if (buttonState == state::normal || buttonState == state::hover)
|
||||
{
|
||||
auto radiu = (rect.height() - 6) / 2;
|
||||
painter.translate(rect.center());
|
||||
painter.setPen(Qt::transparent);
|
||||
painter.setBrush(QColor(buttonState == state::normal ? color : color.darker()));
|
||||
// painter.drawEllipse(QPoint(0,0),radiu,radiu);
|
||||
|
||||
// radiu -= 3;
|
||||
painter.setBrush(backColor);
|
||||
painter.drawEllipse(QPoint(0, 0), radiu, radiu);
|
||||
|
||||
QSvgRenderer m_svgRender;
|
||||
m_svgRender.load(svgPath);
|
||||
m_svgRender.render(&painter, QRectF(-radiu / 2, -radiu / 2, radiu, radiu));
|
||||
}
|
||||
else if (buttonState == state::openProgress)
|
||||
{
|
||||
painter.translate(rect.center());
|
||||
auto radiu = (rect.height() - 6) / 2 - 3;
|
||||
painter.setBrush(backColor);
|
||||
painter.setPen(QPen(backColor, 3));
|
||||
painter.drawEllipse(QPoint(0, 0), radiu, radiu);
|
||||
|
||||
painter.setPen(QPen(backColor, 3));
|
||||
|
||||
QSvgRenderer m_svgRender;
|
||||
m_svgRender.load(svgPath);
|
||||
m_svgRender.render(&painter, QRectF(-radiu / 2, -radiu / 2, radiu, radiu));
|
||||
|
||||
QRect rect = QRect(-radiu, -radiu,
|
||||
radiu * 2, radiu * 2);
|
||||
|
||||
painter.setPen(QPen(color.darker(100), 3));
|
||||
auto angle = progress * 360 / 100;
|
||||
painter.drawArc(rect.adjusted(-3, -3, 3, 3), 90 * 16, -static_cast<int>(angle * 16));
|
||||
}
|
||||
else if (buttonState == state::closeProgress)
|
||||
{
|
||||
auto radiu = (rect.height() - 6) / 2;
|
||||
painter.translate(rect.center());
|
||||
painter.setPen(Qt::transparent);
|
||||
painter.setBrush(QColor(0, 0, 0, 63));
|
||||
painter.drawEllipse(QPoint(0, 0), radiu, radiu);
|
||||
|
||||
radiu -= 3;
|
||||
painter.setBrush(backColor);
|
||||
painter.drawEllipse(QPoint(0, 0), radiu, radiu);
|
||||
|
||||
painter.setPen(QPen(color, 3, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
|
||||
painter.drawLine(QPoint(-radiu / 3, 0),
|
||||
QPoint(-radiu / 5, radiu / 3));
|
||||
painter.drawLine(QPoint(-radiu / 5, radiu / 3),
|
||||
QPoint(radiu / 4, -radiu / 4));
|
||||
}
|
||||
}
|
||||
|
||||
void ProgressButton::setProgress(int progress)
|
||||
{
|
||||
buttonState = state::openProgress;
|
||||
@@ -36,19 +99,14 @@ void ProgressButton::setProgress(int progress)
|
||||
{
|
||||
buttonState = state::closeProgress;
|
||||
update();
|
||||
WaterDrop *waterDrop = new WaterDrop(parentWidget());
|
||||
waterDrop->move(geometry().center());
|
||||
auto waterDrop = new WaterDrop();
|
||||
waterDrop->move(this->mapToGlobal(this->rect().center()));
|
||||
waterDrop->show();
|
||||
}
|
||||
repaint();
|
||||
update();
|
||||
}
|
||||
|
||||
void ProgressButton::setDownloadListWidget(DownloadListWidget *widget)
|
||||
{
|
||||
m_downloadListWidget = widget;
|
||||
}
|
||||
|
||||
void ProgressButton::setIcon(QString svgPATH)
|
||||
{
|
||||
svgPath = svgPATH;
|
||||
@@ -67,56 +125,6 @@ void ProgressButton::setColor(QColor color)
|
||||
update();
|
||||
}
|
||||
|
||||
void ProgressButton::mousePressEvent(QMouseEvent *event)
|
||||
{
|
||||
m_mouseMoved = false;
|
||||
m_isDownloadListWidgetVisible = m_downloadListWidget->isVisible();
|
||||
m_downloadListWidget->hide();
|
||||
QWidget::mousePressEvent(event);
|
||||
}
|
||||
|
||||
void ProgressButton::mouseReleaseEvent(QMouseEvent *event)
|
||||
{
|
||||
if (buttonState == state::hover || buttonState == state::normal)
|
||||
{
|
||||
widthChangeValue = (this->width() - 6) / 2;
|
||||
update();
|
||||
}
|
||||
else if (buttonState == state::closeProgress)
|
||||
{
|
||||
update();
|
||||
}
|
||||
|
||||
if (m_mouseMoved) {
|
||||
return QWidget::mouseReleaseEvent(event);
|
||||
}
|
||||
|
||||
if (m_isDownloadListWidgetVisible) {
|
||||
m_downloadListWidget->hide();
|
||||
} else {
|
||||
QPoint pos(this->mapToGlobal(QPoint(0, 0)));
|
||||
pos += QPoint(width() / 2 - m_downloadListWidget->width() / 2, height() + 5);
|
||||
m_downloadListWidget->m_move(pos.x(), pos.y());
|
||||
m_downloadListWidget->setWindowState(windowState() & Qt::WindowState::WindowActive);
|
||||
m_downloadListWidget->activateWindow();
|
||||
m_downloadListWidget->show();
|
||||
m_downloadListWidget->raise();
|
||||
}
|
||||
m_isDownloadListWidgetVisible = m_downloadListWidget->isVisible();
|
||||
QWidget::mouseReleaseEvent(event);
|
||||
}
|
||||
|
||||
void ProgressButton::mouseDoubleClickEvent(QMouseEvent *event)
|
||||
{
|
||||
event->accept();
|
||||
}
|
||||
|
||||
void ProgressButton::mouseMoveEvent(QMouseEvent *event)
|
||||
{
|
||||
m_mouseMoved = true;
|
||||
QWidget::mouseMoveEvent(event);
|
||||
}
|
||||
|
||||
void ProgressButton::leaveEvent(QEvent *event)
|
||||
{
|
||||
if (buttonState == state::hover)
|
||||
@@ -127,68 +135,19 @@ void ProgressButton::leaveEvent(QEvent *event)
|
||||
QWidget::leaveEvent(event);
|
||||
}
|
||||
|
||||
void ProgressButton::paintEvent(QPaintEvent *event)
|
||||
void ProgressButton::mousePressEvent(QMouseEvent *event)
|
||||
{
|
||||
QPainter painter(this);
|
||||
painter.setRenderHint(QPainter::Antialiasing, true);
|
||||
QRect rect = event->rect();
|
||||
|
||||
if (buttonState == state::normal || buttonState == state::hover)
|
||||
if (buttonState == state::hover || buttonState == state::normal)
|
||||
{
|
||||
int radius = (rect.height() - 6) / 2;
|
||||
painter.translate(rect.center());
|
||||
painter.setPen(Qt::transparent);
|
||||
painter.setBrush(QColor(buttonState == state::normal ? color : color.darker()));
|
||||
// painter.drawEllipse(QPoint(0, 0), radius, radius);
|
||||
|
||||
// radiu -= 3;
|
||||
painter.setBrush(backColor);
|
||||
painter.drawEllipse(QPoint(0, 0), radius, radius);
|
||||
|
||||
QSvgRenderer m_svgRender;
|
||||
m_svgRender.load(svgPath);
|
||||
m_svgRender.render(&painter, QRectF(-radius / 2, -radius / 2, radius, radius));
|
||||
}
|
||||
else if (buttonState == state::openProgress)
|
||||
{
|
||||
painter.translate(rect.center());
|
||||
int radius = (rect.height() - 6) / 2 - 3;
|
||||
painter.setBrush(backColor);
|
||||
painter.setPen(QPen(backColor, 3));
|
||||
painter.drawEllipse(QPoint(0, 0), radius, radius);
|
||||
|
||||
painter.setPen(QPen(backColor, 3));
|
||||
|
||||
QSvgRenderer m_svgRender;
|
||||
m_svgRender.load(svgPath);
|
||||
m_svgRender.render(&painter, QRectF(-radius / 2, -radius / 2, radius, radius));
|
||||
|
||||
QRect rect = QRect(-radius, -radius,
|
||||
radius * 2, radius * 2);
|
||||
|
||||
painter.setPen(QPen(color.darker(100), 3));
|
||||
qreal angle = progress * 360 / 100 * 1.0;
|
||||
painter.drawArc(rect.adjusted(-3, -3, 3, 3), 90 * 16, -qIntCast(angle * 16));
|
||||
widthChangeValue = (this->width() - 6) / 2;
|
||||
update();
|
||||
}
|
||||
else if (buttonState == state::closeProgress)
|
||||
{
|
||||
auto radius = (rect.height() - 6) / 2;
|
||||
painter.translate(rect.center());
|
||||
painter.setPen(Qt::transparent);
|
||||
painter.setBrush(QColor(0, 0, 0, 63));
|
||||
painter.drawEllipse(QPoint(0, 0), radius, radius);
|
||||
|
||||
radius -= 3;
|
||||
painter.setBrush(backColor);
|
||||
painter.drawEllipse(QPoint(0, 0), radius, radius);
|
||||
|
||||
painter.setPen(QPen(color, 3, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
|
||||
painter.drawLine(QPoint(-radius / 3, 0),
|
||||
QPoint(-radius / 5, radius / 3));
|
||||
painter.drawLine(QPoint(-radius / 5, radius / 3),
|
||||
QPoint(radius / 4, -radius / 4));
|
||||
update();
|
||||
}
|
||||
QWidget::paintEvent(event);
|
||||
emit clicked();
|
||||
QWidget::mousePressEvent(event);
|
||||
}
|
||||
|
||||
void ProgressButton::operationProcessing()
|
||||
@@ -197,15 +156,13 @@ void ProgressButton::operationProcessing()
|
||||
|
||||
const int RADIUS = 60;
|
||||
WaterDrop::WaterDrop(QWidget *parent)
|
||||
: QWidget(parent)
|
||||
, m_waterDropAnimation(new QVariantAnimation(this))
|
||||
, m_animationRadius(0)
|
||||
: QWidget(parent), m_waterDropAnimation(nullptr), m_animationRadius(0)
|
||||
{
|
||||
this->setFixedSize(QSize(RADIUS * 2, RADIUS * 2));
|
||||
// this->setWindowFlags(Qt::FramelessWindowHint | Qt::Tool);
|
||||
// this->setAttribute(Qt::WA_TranslucentBackground);
|
||||
// this->setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
this->setWindowFlags(Qt::FramelessWindowHint | Qt::Tool);
|
||||
this->setAttribute(Qt::WA_TranslucentBackground);
|
||||
this->setAttribute(Qt::WA_DeleteOnClose);
|
||||
m_waterDropAnimation = new QVariantAnimation(this);
|
||||
// m_waterDropAnimation->setEasingCurve(QEasingCurve(static_cast<QEasingCurve::Type>(QRandomGenerator::global()->bounded(40))));
|
||||
}
|
||||
|
||||
@@ -222,9 +179,9 @@ void WaterDrop::show()
|
||||
m_waterDropAnimation->setEndValue(RADIUS);
|
||||
m_waterDropAnimation->setDuration(350);
|
||||
|
||||
connect(m_waterDropAnimation, &QVariantAnimation::valueChanged, this, &WaterDrop::onRadiusChanged);
|
||||
connect(m_waterDropAnimation, &QVariantAnimation::valueChanged, this, &WaterDrop::onRaduisChanged);
|
||||
connect(m_waterDropAnimation, &QVariantAnimation::finished, this, &WaterDrop::close);
|
||||
m_waterDropAnimation->start(QVariantAnimation::DeleteWhenStopped);
|
||||
m_waterDropAnimation->start();
|
||||
QWidget::show();
|
||||
}
|
||||
|
||||
@@ -232,15 +189,14 @@ void WaterDrop::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
QPainter painter(this);
|
||||
painter.setRenderHint(QPainter::Antialiasing);
|
||||
QPen pen(QBrush(QColor("#ffff80")), 5.0);
|
||||
QPen pen;
|
||||
pen.setColor(QColor(0xffffff80));
|
||||
pen.setWidth(5);
|
||||
painter.setPen(pen);
|
||||
painter.drawEllipse(event->rect().center(), m_animationRadius, m_animationRadius);
|
||||
|
||||
QWidget::paintEvent(event);
|
||||
}
|
||||
|
||||
void WaterDrop::onRadiusChanged(const QVariant &value)
|
||||
void WaterDrop::onRaduisChanged(QVariant value)
|
||||
{
|
||||
m_animationRadius = value.toInt();
|
||||
update();
|
||||
|
||||
@@ -1,62 +1,53 @@
|
||||
#ifndef PROGRESSBUTTON_H
|
||||
#define PROGRESSBUTTON_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QTimer>
|
||||
#include <QVariantAnimation>
|
||||
|
||||
class DownloadListWidget;
|
||||
#include <QtWidgets/QWidget>
|
||||
|
||||
#include <QPaintEvent>
|
||||
|
||||
#include <QTimer>
|
||||
#include <QTimerEvent>
|
||||
#include<QColor>
|
||||
#include <QList>
|
||||
#include <QMouseEvent>
|
||||
|
||||
|
||||
class ProgressButton : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ProgressButton(QWidget *parent = nullptr);
|
||||
~ProgressButton() override;
|
||||
|
||||
ProgressButton(QWidget *parent = nullptr);
|
||||
void setIcon(QString svgPATH);
|
||||
void setBackgroundColor(QColor color);
|
||||
void setColor(QColor color);
|
||||
void setProgress(int progress);
|
||||
|
||||
void setDownloadListWidget(DownloadListWidget *widget);
|
||||
|
||||
protected:
|
||||
void mousePressEvent(QMouseEvent *event) override;
|
||||
void mouseReleaseEvent(QMouseEvent *event) override;
|
||||
void mouseDoubleClickEvent(QMouseEvent *event) override;
|
||||
void mouseMoveEvent(QMouseEvent *event) override;
|
||||
void leaveEvent(QEvent *event) override;
|
||||
void paintEvent(QPaintEvent *event) override;
|
||||
|
||||
~ProgressButton();
|
||||
signals:
|
||||
void startProcessing();
|
||||
void clicked();
|
||||
|
||||
private slots:
|
||||
void operationProcessing();
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *event)override;
|
||||
void leaveEvent(QEvent *event)override;
|
||||
void mousePressEvent(QMouseEvent *event)override;
|
||||
|
||||
private:
|
||||
enum state
|
||||
enum class state
|
||||
{
|
||||
normal,
|
||||
hover,
|
||||
openProgress,
|
||||
closeProgress,
|
||||
recovery
|
||||
};
|
||||
|
||||
DownloadListWidget *m_downloadListWidget = nullptr;
|
||||
|
||||
state buttonState{state::normal};
|
||||
}
|
||||
buttonState{state::normal};
|
||||
QColor backColor;
|
||||
QColor color;
|
||||
QString svgPath;
|
||||
int widthChangeValue{0};
|
||||
void operationProcessing();
|
||||
int progress{0};//处理百分比
|
||||
|
||||
bool m_mouseMoved = false;
|
||||
bool m_isDownloadListWidgetVisible = true;
|
||||
};
|
||||
|
||||
class WaterDrop : public QWidget
|
||||
@@ -64,19 +55,19 @@ class WaterDrop : public QWidget
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit WaterDrop(QWidget *parent = nullptr);
|
||||
WaterDrop(QWidget *parent = Q_NULLPTR);
|
||||
void show();
|
||||
void move(const QPoint &point);
|
||||
|
||||
protected:
|
||||
private:
|
||||
void paintEvent(QPaintEvent *event);
|
||||
|
||||
private slots:
|
||||
void onRadiusChanged(const QVariant &value);
|
||||
void onRaduisChanged(QVariant value);
|
||||
|
||||
private:
|
||||
QVariantAnimation *m_waterDropAnimation = nullptr;
|
||||
class QVariantAnimation* m_waterDropAnimation;
|
||||
int m_animationRadius;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif // PROGRESSBUTTON_H
|
||||
|
||||
@@ -1,15 +1,8 @@
|
||||
#include "downloadlistwidget.h"
|
||||
#include "ui_downloadlistwidget.h"
|
||||
#include "widgets/common/downloaditem.h"
|
||||
#include "backend/sparkapi.h"
|
||||
#include "backend/downloadworker.h"
|
||||
#include "utils/utils.h"
|
||||
#include "application.h"
|
||||
|
||||
#include <QDesktopServices>
|
||||
#include <QtConcurrent>
|
||||
#include <QGraphicsOpacityEffect>
|
||||
#include <QPropertyAnimation>
|
||||
#include <QDebug>
|
||||
|
||||
DownloadListWidget::DownloadListWidget(QWidget *parent) : DBlurEffectWidget(parent),
|
||||
ui(new Ui::DownloadListWidget)
|
||||
{
|
||||
@@ -61,29 +54,36 @@ DownloadListWidget::~DownloadListWidget()
|
||||
{
|
||||
if (downloadController)
|
||||
{
|
||||
downloadController->disconnect();
|
||||
downloadController->stopDownload();
|
||||
// 这里没有释放 downloadController,使用懒汉式单例
|
||||
}
|
||||
|
||||
clearItem();
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void DownloadListWidget::clearItem()
|
||||
{
|
||||
ui->listWidget->vScrollBar->scrollTop();
|
||||
int n = ui->listWidget->count();
|
||||
for (int i = 0; i < n; i++)
|
||||
{
|
||||
QListWidgetItem *item = ui->listWidget->takeItem(0);
|
||||
QWidget *card = ui->listWidget->itemWidget(item);
|
||||
delete card;
|
||||
card = NULL;
|
||||
delete item;
|
||||
item = NULL;
|
||||
}
|
||||
ui->listWidget->clear();
|
||||
}
|
||||
|
||||
DownloadItem* DownloadListWidget::addItem(QString name, QString fileName, QString pkgName, const QPixmap icon, QString downloadurl)
|
||||
void DownloadListWidget::addItem(QString name, QString fileName, QString pkgName, const QPixmap icon, QString downloadurl)
|
||||
{
|
||||
if (fileName.isEmpty())
|
||||
{
|
||||
return nullptr;
|
||||
return;
|
||||
}
|
||||
urList.append(downloadurl);
|
||||
allDownload += 1;
|
||||
DownloadItem *di = new DownloadItem;
|
||||
DownloadItem *di = new DownloadItem(this);
|
||||
dlist << downloadurl;
|
||||
downloaditemlist << di;
|
||||
di->setName(name);
|
||||
@@ -99,8 +99,6 @@ DownloadItem* DownloadListWidget::addItem(QString name, QString fileName, QStrin
|
||||
nowDownload += 1;
|
||||
startRequest(urList.at(nowDownload - 1), fileName); // 进行链接请求
|
||||
}
|
||||
|
||||
return di;
|
||||
}
|
||||
|
||||
QList<DownloadItem *> DownloadListWidget::getDIList()
|
||||
@@ -121,18 +119,7 @@ void DownloadListWidget::startRequest(QUrl url, QString fileName)
|
||||
isdownload = true;
|
||||
downloaditemlist[allDownload - 1]->free = false;
|
||||
|
||||
// 使用懒汉式单例来存储downloadController
|
||||
if (downloadController == nullptr)
|
||||
{
|
||||
downloadController = new DownloadController; // 并发下载,在第一次点击下载按钮的时候才会初始化
|
||||
}
|
||||
|
||||
if (downloadController)
|
||||
{
|
||||
downloadController->disconnect();
|
||||
downloadController->stopDownload();
|
||||
}
|
||||
|
||||
downloadController = new DownloadController(this); // 并发下载,在点击下载按钮的时候才会初始化
|
||||
connect(downloadController, &DownloadController::downloadProcess, this, &DownloadListWidget::updateDataReadProgress);
|
||||
connect(downloadController, &DownloadController::downloadFinished, this, &DownloadListWidget::httpFinished);
|
||||
// connect(downloadController, &DownloadController::errorOccur, this, [=](QString msg){this->sendNotification(msg);});
|
||||
@@ -140,24 +127,11 @@ void DownloadListWidget::startRequest(QUrl url, QString fileName)
|
||||
downloadController->startDownload(url.toString());
|
||||
}
|
||||
|
||||
/***************************************************************
|
||||
* @brief 下载列表完成下载的回调函数
|
||||
* @param
|
||||
* @note 如果正在安装,则在新开的线程空间中等待上一个安装完
|
||||
* @Sample usage:
|
||||
**************************************************************/
|
||||
void DownloadListWidget::httpFinished() // 完成下载
|
||||
{
|
||||
isdownload = false;
|
||||
isBusy = false;
|
||||
|
||||
QtConcurrent::run([=]()
|
||||
{
|
||||
while (downloaditemlist[nowDownload - 1]->readyInstall() == -1)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
downloaditemlist[nowDownload - 1]->readyInstall();
|
||||
downloaditemlist[nowDownload - 1]->free = true;
|
||||
emit downloadFinished();
|
||||
if (nowDownload < allDownload)
|
||||
@@ -177,7 +151,6 @@ void DownloadListWidget::httpFinished() // 完成下载
|
||||
QString fileName = downloaditemlist[nowDownload - 1]->getName();
|
||||
startRequest(urList.at(nowDownload - 1), fileName);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void DownloadListWidget::updateDataReadProgress(QString speedInfo, qint64 bytesRead, qint64 totalBytes)
|
||||
@@ -208,7 +181,21 @@ void DownloadListWidget::m_move(int x, int y)
|
||||
move(x, y);
|
||||
return;
|
||||
}
|
||||
|
||||
bool DownloadListWidget::eventFilter(QObject *watched, QEvent *event)
|
||||
{
|
||||
if (Q_NULLPTR == watched)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (QEvent::ActivationChange == event->type())
|
||||
{
|
||||
if (QApplication::activeWindow() != this)
|
||||
{
|
||||
this->close();
|
||||
}
|
||||
}
|
||||
return QWidget::eventFilter(watched, event);
|
||||
}
|
||||
void DownloadListWidget::mouseMoveEvent(QMouseEvent *event)
|
||||
{
|
||||
setGeometry(m_rect);
|
||||
|
||||
@@ -1,35 +1,33 @@
|
||||
#ifndef DOWNLOADLISTWIDGET_H
|
||||
#define DOWNLOADLISTWIDGET_H
|
||||
|
||||
#include <DBlurEffectWidget>
|
||||
|
||||
#include <QWidget>
|
||||
#include <QTimer>
|
||||
|
||||
#include <DBlurEffectWidget>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QDesktopServices>
|
||||
#include "widgets/common/downloaditem.h"
|
||||
#include "backend/sparkapi.h"
|
||||
#include "backend/downloadworker.h"
|
||||
#include "utils/utils.h"
|
||||
DWIDGET_USE_NAMESPACE
|
||||
namespace Ui {
|
||||
class DownloadListWidget;
|
||||
}
|
||||
|
||||
DWIDGET_USE_NAMESPACE
|
||||
|
||||
class DownloadItem;
|
||||
class DownloadController;
|
||||
class DownloadListWidget : public DBlurEffectWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DownloadItem *addItem(QString name, QString fileName, QString pkgName, const QPixmap icon, QString downloadurl);
|
||||
void addItem(QString name, QString fileName, QString pkgName, const QPixmap icon, QString downloadurl);
|
||||
int nowDownload = 0;
|
||||
int allDownload = 0;
|
||||
QList<DownloadItem *> getDIList();
|
||||
QList<QUrl> getUrlList();
|
||||
void m_move(int x, int y);
|
||||
explicit DownloadListWidget(QWidget *parent = nullptr);
|
||||
~DownloadListWidget() override;
|
||||
|
||||
protected:
|
||||
void mouseMoveEvent(QMouseEvent *event) override;
|
||||
~DownloadListWidget();
|
||||
|
||||
private:
|
||||
int isdownload = false;
|
||||
@@ -37,7 +35,7 @@ private:
|
||||
QStringList dlist;
|
||||
QList<QUrl> urList;
|
||||
QList<DownloadItem *> downloaditemlist;
|
||||
DownloadController *downloadController = nullptr;
|
||||
DownloadController *downloadController;
|
||||
int nowdownload = 0;
|
||||
QString theSpeed;
|
||||
QTimer download_speed;
|
||||
@@ -50,13 +48,13 @@ private:
|
||||
void clearItem();
|
||||
QRect m_rect;
|
||||
Ui::DownloadListWidget *ui;
|
||||
|
||||
private slots:
|
||||
bool eventFilter(QObject *, QEvent *);
|
||||
void mouseMoveEvent(QMouseEvent *event);
|
||||
void on_pushButton_clicked();
|
||||
signals:
|
||||
void downloadFinished();
|
||||
void downloadProgress(int i);
|
||||
|
||||
private slots:
|
||||
void on_pushButton_clicked();
|
||||
};
|
||||
|
||||
#endif // DOWNLOADLISTWIDGET_H
|
||||
|
||||
14
tool/aptss
14
tool/aptss
@@ -8,7 +8,7 @@ mkdir -p /tmp/aptss-conf/
|
||||
echo "从服务器获取配置和镜像列表..."
|
||||
echo "Getting server and mirror lists..."
|
||||
echo
|
||||
curl --progress-bar -o /tmp/aptss-conf/apt-fast.conf "https://d.store.deepinos.org.cn/apt-fast.conf"
|
||||
curl --progress-bar -o /tmp/aptss-conf/apt-fast.conf "https://gitee.com/deepin-community-store/repo_auto_update_script/raw/master/mirror-list-for-apt-fast/apt-fast.conf"
|
||||
chmod -R 755 /tmp/aptss-conf
|
||||
|
||||
fi
|
||||
@@ -21,10 +21,10 @@ mkdir -p /tmp/aptss-conf/
|
||||
echo "从服务器获取配置和镜像列表..."
|
||||
echo "Getting server and mirror lists..."
|
||||
echo
|
||||
curl --silent -o /tmp/aptss-conf/apt-fast.conf "https://d.store.deepinos.org.cn/apt-fast.conf"
|
||||
curl --silent -o /tmp/aptss-conf/apt-fast.conf "https://gitee.com/deepin-community-store/repo_auto_update_script/raw/master/mirror-list-for-apt-fast/apt-fast.conf"
|
||||
chmod -R 755 /tmp/aptss-conf
|
||||
|
||||
sudo curl --silent -o /opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list "https://d.store.deepinos.org.cn/sparkstore.list"
|
||||
sudo curl --silent -o /opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list "https://gitee.com/deepin-community-store/repo_auto_update_script/raw/master/mirror-list-for-apt-fast/sources.list.d/sparkstore.list"
|
||||
sudo bwrap --dev-bind / / --bind '/opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list' /etc/apt/sources.list.d/sparkstore.list apt update -o Dir::Etc::sourcelist="sources.list.d/sparkstore.list" -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0"
|
||||
|
||||
#只更新星火源
|
||||
@@ -69,23 +69,23 @@ mkdir -p /tmp/aptss-conf/
|
||||
echo "从服务器获取配置和镜像列表..."
|
||||
echo "Getting server and mirror lists..."
|
||||
echo
|
||||
curl --silent -o /tmp/aptss-conf/apt-fast.conf "https://d.store.deepinos.org.cn/apt-fast.conf"
|
||||
curl --silent -o /tmp/aptss-conf/apt-fast.conf "https://gitee.com/deepin-community-store/repo_auto_update_script/raw/master/mirror-list-for-apt-fast/apt-fast.conf"
|
||||
chmod -R 755 /tmp/aptss-conf
|
||||
|
||||
sudo curl --silent -o /opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list "https://d.store.deepinos.org.cn/sparkstore.list"
|
||||
sudo curl --silent -o /opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list "https://gitee.com/deepin-community-store/repo_auto_update_script/raw/master/mirror-list-for-apt-fast/sources.list.d/sparkstore.list"
|
||||
sudo bwrap --dev-bind / / --bind '/opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list' /etc/apt/sources.list.d/sparkstore.list apt update -o Dir::Etc::sourcelist="sources.list.d/sparkstore.list" -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0"
|
||||
|
||||
#只更新星火源
|
||||
|
||||
elif [ "$1" = "update" ];then
|
||||
sudo curl --progress-bar -o /opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list "https://d.store.deepinos.org.cn/sparkstore.list"
|
||||
sudo curl --progress-bar -o /opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list "https://gitee.com/deepin-community-store/repo_auto_update_script/raw/master/mirror-list-for-apt-fast/sources.list.d/sparkstore.list"
|
||||
|
||||
|
||||
mkdir -p /tmp/aptss-conf/
|
||||
echo "从服务器获取配置和镜像列表..."
|
||||
echo "Getting server and mirror lists..."
|
||||
echo
|
||||
curl --progress-bar -o /tmp/aptss-conf/apt-fast.conf "https://d.store.deepinos.org.cn/apt-fast.conf"
|
||||
curl --progress-bar -o /tmp/aptss-conf/apt-fast.conf "https://gitee.com/deepin-community-store/repo_auto_update_script/raw/master/mirror-list-for-apt-fast/apt-fast.conf"
|
||||
chmod -R 755 /tmp/aptss-conf
|
||||
### 额外一份拿来给aptss自动补全用
|
||||
bwrap --dev-bind / / \
|
||||
|
||||
@@ -54,7 +54,7 @@ fi
|
||||
|
||||
DEBPATH=`realpath $1`
|
||||
|
||||
if [ ! -e "/var/lib/apt/lists/d.store.deepinos.org.cn_Packages" ] && [ ! -e "/var/lib/apt/lists/d.store.deepinos.org.cn_store_Packages" ] && [ ! -e "/var/lib/apt/lists/mirrors.sdu.edu.cn_spark-store-repository_store_Packages" ];then
|
||||
if [ ! -e "/var/lib/apt/lists/d.store.deepinos.org.cn_Packages" ] && [ ! -e "/var/lib/apt/lists/d.store.deepinos.org.cn_store_Packages" ];then
|
||||
echo "接收星火仓库软件信息中..."
|
||||
aptss ssupdate
|
||||
fi
|
||||
@@ -64,12 +64,9 @@ fi
|
||||
if [ -e "/var/lib/apt/lists/d.store.deepinos.org.cn_store_Packages" ];then
|
||||
PACKAGES_DATA_PATH="/var/lib/apt/lists/d.store.deepinos.org.cn_store_Packages"
|
||||
echo "星火仓库的Packages位置为 $PACKAGES_DATA_PATH,是单目录仓库配置"
|
||||
elif [ -e "/var/lib/apt/lists/d.store.deepinos.org.cn_Packages" ];then
|
||||
else
|
||||
PACKAGES_DATA_PATH="/var/lib/apt/lists/d.store.deepinos.org.cn_Packages"
|
||||
echo "星火仓库的Packages位置为 $PACKAGES_DATA_PATH,是根目录仓库配置"
|
||||
else
|
||||
PACKAGES_DATA_PATH="/var/lib/apt/lists/mirrors.sdu.edu.cn_spark-store-repository_store_Packages"
|
||||
echo "星火仓库的Packages位置为 $PACKAGES_DATA_PATH,是SDU镜像仓库配置"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
#!/bin/bash
|
||||
TRANSHELL_CONTENT_UPDATE_CHEKING_PLEASE_WAIT="正在檢查更新,請稍候…"
|
||||
TRANSHELL_CONTENT_SPARK_STORE_UPGRADE_MODEL="星火商店更新模塊"
|
||||
TRANSHELL_CONTENT_CHECK_UPDATE_PROCESS_ERROR_PRESS_CONFIRM_TO_CHECK="檢查更新行程出現錯誤! 按確定查看報錯,可用於回報"
|
||||
TRANSHELL_CONTENT_I_ALREDY_COPIED_THE_LOG_HERE_AND_WILL_USE_IT_TO_FEEDBACK="我已複製了此文字方塊中的日誌,且將會在回報時附上。 迴響通路可以在右上角選單的設定中找到 "
|
||||
TRANSHELL_CONTENT_FEEDBACK_CAN_BE_FOUND_IN_THE_SETTINGS="回報入口在商店右上角的設定裏"
|
||||
TRANSHELL_CONTENT_NO_NEED_TO_UPGRADE="沒有軟體需要更新\n但是你並沒有站在世界之巔"
|
||||
TRANSHELL_CONTENT_CAN_NOT_UPGRADE_FOR_BEING_HOLD="(无法更新:已被标记为保留)"
|
||||
TRANSHELL_CONTENT_CHOOSE_APP_TO_UPGRADE="选择你想更新的应用"
|
||||
TRANSHELL_CONTENT_CHOOSE="选择"
|
||||
TRANSHELL_CONTENT_PKG_NAME="包名"
|
||||
TRANSHELL_CONTENT_NEW_VERSION="新版本"
|
||||
TRANSHELL_CONTENT_UPGRADE_FROM="从该版本更新"
|
||||
TRANSHELL_CONTENT_NO_APP_IS_CHOSEN="没有选中任何軟體\n但是你並沒有站在世界之巔"
|
||||
TRANSHELL_CONTENT_UPGRADING_PLEASE_WAIT="正在更新 $PKG_UPGRADE ,请稍候..."
|
||||
TRANSHELL_CONTENT_CHOSEN_APP_UPGRADE_FINISHED="选中的軟體已经更新完毕"
|
||||
TRANSHELL_CONTENT_APP_UGRADE_PROCESS_ERROR_PRESS_CONFIRM_TO_CHECK="更新出现错误!按确定查看报错,可用于反馈"
|
||||
@@ -1,12 +0,0 @@
|
||||
#!/bin/bash
|
||||
TRANSHELL_CONTENT_CLOSE="关闭"
|
||||
TRANSHELL_CONTENT_OPEN="开启"
|
||||
TRANSHELL_CONTENT_WELCOME_AND_CHOOSE_ONE_TO_RUN="欢迎使用星火更新和安装设置工具\n请在以下操作中选择一个进行~"
|
||||
TRANSHELL_CONTENT_OPTIONS="操作选项"
|
||||
TRANSHELL_CONTENT_OPEN_OR_CLOSE_UPGRADE_CHECK="$text_update_open星火更新检测工具(如果开启则会在系统启动后自动检测更新。如有更新则会弹出通知)"
|
||||
TRANSHELL_CONTENT_CHECK_FOR_UPDATE="查看可更新软件包列表"
|
||||
TRANSHELL_CONTENT_EXIT="退出"
|
||||
TRANSHELL_CONTENT_CLOSING_UPGRADE_CHECK="执行关闭自动更新检测,请授权"
|
||||
TRANSHELL_CONTENT_CLOSED="已关闭"
|
||||
TRANSHELL_CONTENT_OPENING_UPGRADE_CHECK="执行启动自动更新检测,请授权"
|
||||
TRANSHELL_CONTENT_OPENED="已开启"
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/bin/bash
|
||||
TRANSHELL_CONTENT_NETWORK_FAIL="网络错误!为防止阻塞dpkg,停止"
|
||||
TRANSHELL_CONTENT_UPDATE_ERROR_AND_WAIT_15_SEC="更新出现异常状况,等待十五秒"
|
||||
TRANSHELL_CONTENT_SPARK_STORE_UPGRADE_NOTIFY="星火更新提醒"
|
||||
TRANSHELL_CONTENT_THERE_ARE_APPS_TO_UPGRADE="星火商店仓库中有$update_app_number个软件包可以更新啦!请到星火商店的菜单处理"
|
||||
@@ -10,9 +10,9 @@
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.ui" line="244"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="173"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="315"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="430"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="160"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="226"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="368"/>
|
||||
<source>Download</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@@ -175,51 +175,51 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.cpp" line="47"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="87"/>
|
||||
<source>Click Open</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.cpp" line="112"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="96"/>
|
||||
<source>Developer Mode Disabled</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.cpp" line="158"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="331"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="403"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="145"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="242"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="339"/>
|
||||
<source>Reinstall</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.cpp" line="165"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="152"/>
|
||||
<source>Upgrade</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.cpp" line="320"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="379"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="231"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="327"/>
|
||||
<source>Install</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.cpp" line="325"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="236"/>
|
||||
<source>Installing</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.cpp" line="434"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="447"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="372"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="383"/>
|
||||
<source>Spark Store</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.cpp" line="434"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="372"/>
|
||||
<source>Uninstall succeeded</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.cpp" line="447"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="383"/>
|
||||
<source>The URL has been copied to the clipboard</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@@ -240,12 +240,12 @@
|
||||
<context>
|
||||
<name>DAboutDialog</name>
|
||||
<message>
|
||||
<location filename="../src/application.cpp" line="133"/>
|
||||
<location filename="../src/application.cpp" line="90"/>
|
||||
<source>Version: %1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/application.cpp" line="143"/>
|
||||
<location filename="../src/application.cpp" line="97"/>
|
||||
<source>%1 is released under %2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@@ -299,59 +299,59 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="213"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="224"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="232"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="148"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="159"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="167"/>
|
||||
<source>Spark Store</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="125"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="126"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="104"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="105"/>
|
||||
<source>Installing</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="213"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="148"/>
|
||||
<source>Installation complete.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="214"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="215"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="149"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="150"/>
|
||||
<source>Finish</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="222"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="157"/>
|
||||
<source>Retry</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="224"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="159"/>
|
||||
<source>Error happened in dpkg progress , you can try it again.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="225"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="226"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="160"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="161"/>
|
||||
<source>Error happened in dpkg progress , you can try it again</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="232"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="167"/>
|
||||
<source>dpkg progress had been aborted,you can retry installation.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="233"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="234"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="168"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="169"/>
|
||||
<source>dpkg progress had been aborted,you can retry installation</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="144"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="145"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="189"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="190"/>
|
||||
<source>Download canceled</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@@ -452,33 +452,32 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="170"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="161"/>
|
||||
<source>Submit App</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="171"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="162"/>
|
||||
<source>Submit App with client(Recommanded)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="172"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="163"/>
|
||||
<source>Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="173"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="164"/>
|
||||
<source>APP Upgrade and Install Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="129"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="224"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="123"/>
|
||||
<source>Spark Store</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="134"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="128"/>
|
||||
<source>Search or enter spk://</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@@ -486,29 +485,29 @@
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../src/application.cpp" line="33"/>
|
||||
<location filename="../src/application.cpp" line="34"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="109"/>
|
||||
<location filename="../src/application.cpp" line="28"/>
|
||||
<location filename="../src/application.cpp" line="29"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="103"/>
|
||||
<source>Spark Store</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/application.cpp" line="38"/>
|
||||
<location filename="../src/application.cpp" line="33"/>
|
||||
<source><span style=' font-size:10pt;font-weight:60;'>An appstore powered by community</span><br/><a href='https://www.spark-app.store/'>https://www.spark-app.store</a><br/><span style=' font-size:12pt;'>Spark developers</span></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/application.cpp" line="140"/>
|
||||
<location filename="../src/application.cpp" line="94"/>
|
||||
<source>Spark Project</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/downloadlistwidget.cpp" line="17"/>
|
||||
<location filename="../src/widgets/downloadlistwidget.cpp" line="10"/>
|
||||
<source>Download list</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="227"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="217"/>
|
||||
<source>Show MainWindow</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@@ -619,12 +618,12 @@
|
||||
<context>
|
||||
<name>TitleBarMenu</name>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="228"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="218"/>
|
||||
<source>About</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="229"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="219"/>
|
||||
<source>Exit</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.ui" line="244"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="173"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="315"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="430"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="160"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="226"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="368"/>
|
||||
<source>Download</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@@ -175,51 +175,51 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.cpp" line="47"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="87"/>
|
||||
<source>Click Open</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.cpp" line="112"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="96"/>
|
||||
<source>Developer Mode Disabled</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.cpp" line="158"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="331"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="403"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="145"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="242"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="339"/>
|
||||
<source>Reinstall</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.cpp" line="165"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="152"/>
|
||||
<source>Upgrade</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.cpp" line="320"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="379"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="231"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="327"/>
|
||||
<source>Install</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.cpp" line="325"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="236"/>
|
||||
<source>Installing</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.cpp" line="434"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="447"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="372"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="383"/>
|
||||
<source>Spark Store</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.cpp" line="434"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="372"/>
|
||||
<source>Uninstall succeeded</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.cpp" line="447"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="383"/>
|
||||
<source>The URL has been copied to the clipboard</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@@ -240,12 +240,12 @@
|
||||
<context>
|
||||
<name>DAboutDialog</name>
|
||||
<message>
|
||||
<location filename="../src/application.cpp" line="133"/>
|
||||
<location filename="../src/application.cpp" line="90"/>
|
||||
<source>Version: %1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/application.cpp" line="143"/>
|
||||
<location filename="../src/application.cpp" line="97"/>
|
||||
<source>%1 is released under %2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@@ -299,59 +299,59 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="213"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="224"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="232"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="148"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="159"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="167"/>
|
||||
<source>Spark Store</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="125"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="126"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="104"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="105"/>
|
||||
<source>Installing</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="213"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="148"/>
|
||||
<source>Installation complete.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="214"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="215"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="149"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="150"/>
|
||||
<source>Finish</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="222"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="157"/>
|
||||
<source>Retry</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="224"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="159"/>
|
||||
<source>Error happened in dpkg progress , you can try it again.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="225"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="226"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="160"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="161"/>
|
||||
<source>Error happened in dpkg progress , you can try it again</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="232"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="167"/>
|
||||
<source>dpkg progress had been aborted,you can retry installation.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="233"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="234"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="168"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="169"/>
|
||||
<source>dpkg progress had been aborted,you can retry installation</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="144"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="145"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="189"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="190"/>
|
||||
<source>Download canceled</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@@ -452,33 +452,32 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="170"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="161"/>
|
||||
<source>Submit App</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="171"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="162"/>
|
||||
<source>Submit App with client(Recommanded)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="172"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="163"/>
|
||||
<source>Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="173"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="164"/>
|
||||
<source>APP Upgrade and Install Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="129"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="224"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="123"/>
|
||||
<source>Spark Store</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="134"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="128"/>
|
||||
<source>Search or enter spk://</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@@ -486,29 +485,29 @@
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../src/application.cpp" line="33"/>
|
||||
<location filename="../src/application.cpp" line="34"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="109"/>
|
||||
<location filename="../src/application.cpp" line="28"/>
|
||||
<location filename="../src/application.cpp" line="29"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="103"/>
|
||||
<source>Spark Store</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/application.cpp" line="38"/>
|
||||
<location filename="../src/application.cpp" line="33"/>
|
||||
<source><span style=' font-size:10pt;font-weight:60;'>An appstore powered by community</span><br/><a href='https://www.spark-app.store/'>https://www.spark-app.store</a><br/><span style=' font-size:12pt;'>Spark developers</span></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/application.cpp" line="140"/>
|
||||
<location filename="../src/application.cpp" line="94"/>
|
||||
<source>Spark Project</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/downloadlistwidget.cpp" line="17"/>
|
||||
<location filename="../src/widgets/downloadlistwidget.cpp" line="10"/>
|
||||
<source>Download list</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="227"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="217"/>
|
||||
<source>Show MainWindow</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@@ -619,12 +618,12 @@
|
||||
<context>
|
||||
<name>TitleBarMenu</name>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="228"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="218"/>
|
||||
<source>About</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="229"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="219"/>
|
||||
<source>Exit</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.ui" line="244"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="173"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="315"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="430"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="160"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="226"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="368"/>
|
||||
<source>Download</source>
|
||||
<translation>下载</translation>
|
||||
</message>
|
||||
@@ -175,51 +175,51 @@
|
||||
<translation>软件官网</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.cpp" line="47"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="87"/>
|
||||
<source>Click Open</source>
|
||||
<translation>点击跳转</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.cpp" line="112"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="96"/>
|
||||
<source>Developer Mode Disabled</source>
|
||||
<translation>开发者模式未开启</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.cpp" line="158"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="331"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="403"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="145"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="242"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="339"/>
|
||||
<source>Reinstall</source>
|
||||
<translation>重新安装</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.cpp" line="165"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="152"/>
|
||||
<source>Upgrade</source>
|
||||
<translation>升级</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.cpp" line="320"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="379"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="231"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="327"/>
|
||||
<source>Install</source>
|
||||
<translation>安装</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.cpp" line="325"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="236"/>
|
||||
<source>Installing</source>
|
||||
<translation>正在安装</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.cpp" line="434"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="447"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="372"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="383"/>
|
||||
<source>Spark Store</source>
|
||||
<translation>星火应用商店</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.cpp" line="434"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="372"/>
|
||||
<source>Uninstall succeeded</source>
|
||||
<translation>卸载成功</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.cpp" line="447"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="383"/>
|
||||
<source>The URL has been copied to the clipboard</source>
|
||||
<translation>链接已复制到剪贴板</translation>
|
||||
</message>
|
||||
@@ -240,12 +240,12 @@
|
||||
<context>
|
||||
<name>DAboutDialog</name>
|
||||
<message>
|
||||
<location filename="../src/application.cpp" line="133"/>
|
||||
<location filename="../src/application.cpp" line="90"/>
|
||||
<source>Version: %1</source>
|
||||
<translation>版本:%1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/application.cpp" line="143"/>
|
||||
<location filename="../src/application.cpp" line="97"/>
|
||||
<source>%1 is released under %2</source>
|
||||
<translation>%1遵循%2协议发布</translation>
|
||||
</message>
|
||||
@@ -299,59 +299,59 @@
|
||||
<translation>下载完成.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="213"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="224"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="232"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="148"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="159"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="167"/>
|
||||
<source>Spark Store</source>
|
||||
<translation>星火应用商店</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="125"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="126"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="104"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="105"/>
|
||||
<source>Installing</source>
|
||||
<translation>正在安装</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="213"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="148"/>
|
||||
<source>Installation complete.</source>
|
||||
<translation>安装完成.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="214"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="215"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="149"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="150"/>
|
||||
<source>Finish</source>
|
||||
<translation>完成</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="222"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="157"/>
|
||||
<source>Retry</source>
|
||||
<translation>重试</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="224"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="159"/>
|
||||
<source>Error happened in dpkg progress , you can try it again.</source>
|
||||
<translation>安装被中止,可重新安装。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="225"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="226"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="160"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="161"/>
|
||||
<source>Error happened in dpkg progress , you can try it again</source>
|
||||
<translation>dpkg出现错误,可重新安装</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="232"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="167"/>
|
||||
<source>dpkg progress had been aborted,you can retry installation.</source>
|
||||
<translation>dpkg进程被中断,您可重试安装。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="233"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="234"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="168"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="169"/>
|
||||
<source>dpkg progress had been aborted,you can retry installation</source>
|
||||
<translation>安装被中止,可重新安装</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="144"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="145"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="189"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="190"/>
|
||||
<source>Download canceled</source>
|
||||
<translation>下载已取消</translation>
|
||||
</message>
|
||||
@@ -452,33 +452,32 @@
|
||||
<translation>更新</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="170"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="161"/>
|
||||
<source>Submit App</source>
|
||||
<translation>投递应用</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="171"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="162"/>
|
||||
<source>Submit App with client(Recommanded)</source>
|
||||
<translation>使用本地投稿器投递应用(推荐)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="172"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="163"/>
|
||||
<source>Settings</source>
|
||||
<translation>设置</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="173"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="164"/>
|
||||
<source>APP Upgrade and Install Settings</source>
|
||||
<translation>应用更新和安装设置</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="129"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="224"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="123"/>
|
||||
<source>Spark Store</source>
|
||||
<translation>星火应用商店</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="134"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="128"/>
|
||||
<source>Search or enter spk://</source>
|
||||
<translation>搜索或打开链接</translation>
|
||||
</message>
|
||||
@@ -486,29 +485,29 @@
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../src/application.cpp" line="33"/>
|
||||
<location filename="../src/application.cpp" line="34"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="109"/>
|
||||
<location filename="../src/application.cpp" line="28"/>
|
||||
<location filename="../src/application.cpp" line="29"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="103"/>
|
||||
<source>Spark Store</source>
|
||||
<translation>星火应用商店</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/application.cpp" line="38"/>
|
||||
<location filename="../src/application.cpp" line="33"/>
|
||||
<source><span style=' font-size:10pt;font-weight:60;'>An appstore powered by community</span><br/><a href='https://www.spark-app.store/'>https://www.spark-app.store</a><br/><span style=' font-size:12pt;'>Spark developers</span></source>
|
||||
<translation><span style=' font-size:10pt;font-weight:60;'>一款由社区提供的应用商店</span><br/><a href='https://www.spark-app.store/'>https://www.spark-app.store</a><br/><span style=' font-size:12pt;'>星火计划开发者</span></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/application.cpp" line="140"/>
|
||||
<location filename="../src/application.cpp" line="94"/>
|
||||
<source>Spark Project</source>
|
||||
<translation>星火计划</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/downloadlistwidget.cpp" line="17"/>
|
||||
<location filename="../src/widgets/downloadlistwidget.cpp" line="10"/>
|
||||
<source>Download list</source>
|
||||
<translation>下载列表</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="227"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="217"/>
|
||||
<source>Show MainWindow</source>
|
||||
<translation>显示主窗口</translation>
|
||||
</message>
|
||||
@@ -619,12 +618,12 @@
|
||||
<context>
|
||||
<name>TitleBarMenu</name>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="228"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="218"/>
|
||||
<source>About</source>
|
||||
<translation>关于</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="229"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="219"/>
|
||||
<source>Exit</source>
|
||||
<translation>退出</translation>
|
||||
</message>
|
||||
|
||||
@@ -1,632 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="zh_TW">
|
||||
<context>
|
||||
<name>AppIntoPage</name>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.ui" line="14"/>
|
||||
<source>Form</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.ui" line="244"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="173"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="315"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="430"/>
|
||||
<source>Download</source>
|
||||
<translation>下载</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.ui" line="290"/>
|
||||
<source>Uninstall</source>
|
||||
<translation>移除安裝</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.ui" line="346"/>
|
||||
<source>0</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.ui" line="356"/>
|
||||
<source>Download Times</source>
|
||||
<translation>下載次數</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.ui" line="410"/>
|
||||
<location filename="../src/pages/appintopage.ui" line="413"/>
|
||||
<source><html><head/><body><p>This app is developed by community user,we give this tag to honor those who contribute to the Linux Ecology</p></body></html></source>
|
||||
<translation><html><head/><body><p>这款应用是社区开发者开发的,我们为社区开发者颁发这款勋章以表彰他们对Linux生态的贡献</p></body></html></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.ui" line="416"/>
|
||||
<source><html><head/><body><p><img src=":/tags/community-small.png"/></p></body></html></source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.ui" line="435"/>
|
||||
<source><html><head/><body><p><img src=":/tags/ubuntu-small.png"/></p></body></html></source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.ui" line="448"/>
|
||||
<location filename="../src/pages/appintopage.ui" line="451"/>
|
||||
<source><html><head/><body><p>Capable to UOS home 20</p></body></html></source>
|
||||
<translation><html><head/><body><p>支持UOS家庭版 20</p></body></html></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.ui" line="454"/>
|
||||
<source><html><head/><body><p><img src=":/tags/uos-small.png"/></p></body></html></source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.ui" line="467"/>
|
||||
<location filename="../src/pages/appintopage.ui" line="470"/>
|
||||
<source><html><head/><body><p>A deepin-wine2 app. Spark Store will automatically configure the wine kit for you.</p></body></html></source>
|
||||
<translation>这是一款 deepin-wine2 应用。星火商店会为你自动配置wine环境</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.ui" line="473"/>
|
||||
<source><html><head/><body><p><img src=":/tags/dwine2-small.png"/></p></body></html></source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.ui" line="486"/>
|
||||
<location filename="../src/pages/appintopage.ui" line="489"/>
|
||||
<source><html><head/><body><p>This is a DTK5 app,which means it would have better effect on Deepin Desktop Environment</p></body></html></source>
|
||||
<translation><html><head/><body><p>这是一款DTK5应用,请使用深度桌面环境来获得最完美的体验</p></body></html></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.ui" line="492"/>
|
||||
<source><html><head/><body><p><img src=":/tags/dtk-small.png"/></p></body></html></source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.ui" line="505"/>
|
||||
<location filename="../src/pages/appintopage.ui" line="508"/>
|
||||
<source><html><head/><body><p>Capable to deepin 20</p></body></html></source>
|
||||
<translation><html><head/><body><p>支持deepin 20</p></body></html></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.ui" line="511"/>
|
||||
<source><html><head/><body><p><img src=":/tags/deepin-small.png"/></p></body></html></source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.ui" line="524"/>
|
||||
<location filename="../src/pages/appintopage.ui" line="527"/>
|
||||
<source><html><head/><body><p>An Appimage to deb app.</p></body></html></source>
|
||||
<translation><html><head/><body><p>这是一款Appimage转制应用.</p></body></html></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.ui" line="530"/>
|
||||
<source><html><head/><body><p><img src=":/tags/a2d-small.png"/></p></body></html></source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.ui" line="549"/>
|
||||
<source><html><head/><body><p><img src=":/tags/dwine5-small.png"/></p></body></html></source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.ui" line="602"/>
|
||||
<source>Share</source>
|
||||
<translation>Spk共享链接</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.ui" line="609"/>
|
||||
<source>APP Feedback</source>
|
||||
<translation>軟件錯誤回報</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.ui" line="1068"/>
|
||||
<source>Description</source>
|
||||
<translation>軟體詳細資料</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.ui" line="903"/>
|
||||
<source>Screen capture</source>
|
||||
<translation>軟體演示</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.ui" line="429"/>
|
||||
<location filename="../src/pages/appintopage.ui" line="432"/>
|
||||
<source><html><head/><body><p>Capable to Ubuntu 22.04</p></body></html></source>
|
||||
<translation><html><head/><body><p>支持Ubuntu 22.04</p></body></html></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.ui" line="543"/>
|
||||
<location filename="../src/pages/appintopage.ui" line="546"/>
|
||||
<source><html><head/><body><p>A Wine app.Spark Store will automatically configure the wine kit for you</p></body></html></source>
|
||||
<translation>这是一款 Wine 应用。星火商店会为你自动配置wine环境</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.ui" line="765"/>
|
||||
<source>Introduction</source>
|
||||
<translation>軟體介紹</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.ui" line="1161"/>
|
||||
<source>Update</source>
|
||||
<translation>更新时间</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.ui" line="1190"/>
|
||||
<source>Contributor</source>
|
||||
<translation>投稿用户</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.ui" line="1197"/>
|
||||
<source>Pkgname</source>
|
||||
<translation>软件包名</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.ui" line="1303"/>
|
||||
<source>Author</source>
|
||||
<translation>软件作者</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.ui" line="1339"/>
|
||||
<source>Size</source>
|
||||
<translation>软件大小</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.ui" line="1375"/>
|
||||
<source>Website</source>
|
||||
<translation>软件官网</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.cpp" line="47"/>
|
||||
<source>Click Open</source>
|
||||
<translation>点击跳转</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.cpp" line="112"/>
|
||||
<source>Developer Mode Disabled</source>
|
||||
<translation>开发者模式未开启</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.cpp" line="158"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="331"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="403"/>
|
||||
<source>Reinstall</source>
|
||||
<translation>重新安裝</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.cpp" line="165"/>
|
||||
<source>Upgrade</source>
|
||||
<translation>升级</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.cpp" line="320"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="379"/>
|
||||
<source>Install</source>
|
||||
<translation>安装</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.cpp" line="325"/>
|
||||
<source>Installing</source>
|
||||
<translation>正在安装</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.cpp" line="434"/>
|
||||
<location filename="../src/pages/appintopage.cpp" line="447"/>
|
||||
<source>Spark Store</source>
|
||||
<translation>星火应用商店</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.cpp" line="434"/>
|
||||
<source>Uninstall succeeded</source>
|
||||
<translation>卸载成功</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.cpp" line="447"/>
|
||||
<source>The URL has been copied to the clipboard</source>
|
||||
<translation>链接已复制到剪贴板</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>AppListPage</name>
|
||||
<message>
|
||||
<location filename="../src/pages/applistpage.ui" line="14"/>
|
||||
<source>Form</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/applistpage.ui" line="60"/>
|
||||
<source>about:blank</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DAboutDialog</name>
|
||||
<message>
|
||||
<location filename="../src/application.cpp" line="133"/>
|
||||
<source>Version: %1</source>
|
||||
<translation>版本:%1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/application.cpp" line="143"/>
|
||||
<source>%1 is released under %2</source>
|
||||
<translation>%1遵循%2协议发布</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DownloadItem</name>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.ui" line="32"/>
|
||||
<source>Form</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.ui" line="74"/>
|
||||
<source>icon</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.ui" line="134"/>
|
||||
<source>TextLabel</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.ui" line="121"/>
|
||||
<source>Name</source>
|
||||
<translation>软件名</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.ui" line="226"/>
|
||||
<source>Waiting to download</source>
|
||||
<translation>正在等待下载</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.ui" line="277"/>
|
||||
<source>Install</source>
|
||||
<translation>安裝</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.ui" line="296"/>
|
||||
<source>Cancel</source>
|
||||
<translation>取消</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.ui" line="315"/>
|
||||
<source>Info</source>
|
||||
<translation>详情</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="43"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="44"/>
|
||||
<source>Download Complete.</source>
|
||||
<translation>下載完成.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="213"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="224"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="232"/>
|
||||
<source>Spark Store</source>
|
||||
<translation>星火应用商店</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="125"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="126"/>
|
||||
<source>Installing</source>
|
||||
<translation>正在安裝</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="213"/>
|
||||
<source>Installation complete.</source>
|
||||
<translation>安裝完成.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="214"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="215"/>
|
||||
<source>Finish</source>
|
||||
<translation>完成</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="222"/>
|
||||
<source>Retry</source>
|
||||
<translation>重试</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="224"/>
|
||||
<source>Error happened in dpkg progress , you can try it again.</source>
|
||||
<translation>安装被中止,可重新安装。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="225"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="226"/>
|
||||
<source>Error happened in dpkg progress , you can try it again</source>
|
||||
<translation>dpkg出现错误,可重新安装</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="232"/>
|
||||
<source>dpkg progress had been aborted,you can retry installation.</source>
|
||||
<translation>dpkg进程被中断,您可重试安装。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="233"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="234"/>
|
||||
<source>dpkg progress had been aborted,you can retry installation</source>
|
||||
<translation>安装被中止,可重新安装</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="144"/>
|
||||
<location filename="../src/widgets/common/downloaditem.cpp" line="145"/>
|
||||
<source>Download canceled</source>
|
||||
<translation>下载已取消</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DownloadListWidget</name>
|
||||
<message>
|
||||
<location filename="../src/widgets/downloadlistwidget.ui" line="14"/>
|
||||
<source>Form</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/downloadlistwidget.ui" line="41"/>
|
||||
<source>The list is currently empty. Go and download some softwares!</source>
|
||||
<translation>当前下载列表为空。去下载些软件吧!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/downloadlistwidget.ui" line="116"/>
|
||||
<source>Open download directory</source>
|
||||
<translation>打开下载文件夹</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.ui" line="14"/>
|
||||
<source>MainWindow</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.ui" line="166"/>
|
||||
<source>Home</source>
|
||||
<translation>首頁</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.ui" line="203"/>
|
||||
<source>Network</source>
|
||||
<translation>網路</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.ui" line="231"/>
|
||||
<source>Chat</source>
|
||||
<translation>聊天</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.ui" line="259"/>
|
||||
<source>Music</source>
|
||||
<translation>音樂</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.ui" line="287"/>
|
||||
<source>Video</source>
|
||||
<translation>播放</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.ui" line="315"/>
|
||||
<source>Picture</source>
|
||||
<translation>圖片</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.ui" line="343"/>
|
||||
<source>Game</source>
|
||||
<translation>遊戲</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.ui" line="371"/>
|
||||
<source>Office</source>
|
||||
<translation>辦公</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.ui" line="399"/>
|
||||
<source>Reading</source>
|
||||
<translation>閱讀</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.ui" line="427"/>
|
||||
<source>Development</source>
|
||||
<translation>開發</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.ui" line="455"/>
|
||||
<source>Tool</source>
|
||||
<translation>工具</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.ui" line="483"/>
|
||||
<source>Theme</source>
|
||||
<translation>主題</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.ui" line="511"/>
|
||||
<source>Other</source>
|
||||
<translation>其他</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.ui" line="539"/>
|
||||
<source>APP Upgrade</source>
|
||||
<translation>軟體更新</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="170"/>
|
||||
<source>Submit App</source>
|
||||
<translation>上傳軟體</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="171"/>
|
||||
<source>Submit App with client(Recommanded)</source>
|
||||
<translation>從客戶端上傳軟體(推薦的)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="172"/>
|
||||
<source>Settings</source>
|
||||
<translation>設定</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="173"/>
|
||||
<source>APP Upgrade and Install Settings</source>
|
||||
<translation>軟體升級 和 安裝設定</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="129"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="224"/>
|
||||
<source>Spark Store</source>
|
||||
<translation>星火应用商店</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="134"/>
|
||||
<source>Search or enter spk://</source>
|
||||
<translation>搜索或打开链接</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../src/application.cpp" line="33"/>
|
||||
<location filename="../src/application.cpp" line="34"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="109"/>
|
||||
<source>Spark Store</source>
|
||||
<translation>星火应用商店</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/application.cpp" line="38"/>
|
||||
<source><span style=' font-size:10pt;font-weight:60;'>An appstore powered by community</span><br/><a href='https://www.spark-app.store/'>https://www.spark-app.store</a><br/><span style=' font-size:12pt;'>Spark developers</span></source>
|
||||
<translation><span style=' font-size:10pt;font-weight:60;'>一款由社区提供的应用商店</span><br/><a href='https://www.spark-app.store/'>https://www.spark-app.store</a><br/><span style=' font-size:12pt;'>星火计划开发者</span></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/application.cpp" line="140"/>
|
||||
<source>Spark Project</source>
|
||||
<translation>星火计划</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widgets/downloadlistwidget.cpp" line="17"/>
|
||||
<source>Download list</source>
|
||||
<translation>下载列表</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="227"/>
|
||||
<source>Show MainWindow</source>
|
||||
<translation>显示主窗口</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsPage</name>
|
||||
<message>
|
||||
<location filename="../src/pages/settingspage.ui" line="14"/>
|
||||
<source>Form</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/settingspage.ui" line="91"/>
|
||||
<source>Line Settings</source>
|
||||
<translation>线路设置</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/settingspage.ui" line="107"/>
|
||||
<source>Choose Line:</source>
|
||||
<translation>线路选择:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/settingspage.ui" line="130"/>
|
||||
<source>Refresh</source>
|
||||
<translation>刷新</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/settingspage.ui" line="143"/>
|
||||
<source>Take effect when restart</source>
|
||||
<translation>重启商店后生效</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/settingspage.ui" line="185"/>
|
||||
<source><html><head/><body><p>Check update for Spark Store. </p></body></html></source>
|
||||
<translation>检查星火应用商店更新</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/settingspage.ui" line="202"/>
|
||||
<source>Update</source>
|
||||
<translation>更新</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/settingspage.ui" line="195"/>
|
||||
<source>Spark Store Update</source>
|
||||
<translation>星火应用商店更新检测</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/settingspage.ui" line="230"/>
|
||||
<source>Temp</source>
|
||||
<translation>缓存目录</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/settingspage.ui" line="243"/>
|
||||
<source>Since the dictionary is at /tmp,It would be cleaned automatically when system reboot.</source>
|
||||
<translation>因为这个目录位于/tmp下,所以即使你不手动清空的话,其也将在系统重启时自动清空。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/settingspage.ui" line="250"/>
|
||||
<source>0B</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/settingspage.ui" line="257"/>
|
||||
<source>Location:/tmp/spark-store</source>
|
||||
<translation>目录位置:/tmp/spark-store</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/settingspage.ui" line="277"/>
|
||||
<source>Clean</source>
|
||||
<translation>清空</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/settingspage.ui" line="290"/>
|
||||
<source>Size:</source>
|
||||
<translation>目录大小:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/settingspage.ui" line="297"/>
|
||||
<source>Clear Web Cache</source>
|
||||
<translation>清理网页缓存</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/settingspage.ui" line="318"/>
|
||||
<source>About us</source>
|
||||
<translation>关于我们</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/settingspage.ui" line="325"/>
|
||||
<source><html><head/><body><p>We are <span style=" font-weight:600;">NOT</span> the official team, just like you, we are just one of the many Linux/deepin system enthusiasts and users, we develop and run the &quot;Spark Store&quot;! &quot;, is to bring the community together to share useful software, or to participate in development together, so that we all use the latest and greatest software. </p><p>We don't make a profit from this, all developers and maintainers don't get paid, and we rely on the community's donations to us for most of our expenses, which we are grateful for and which allow us not to spend too much energy worrying about funding. </p><p>Our service and software are free for everyone to use, communicate, and learn, but you must comply with local laws and regulations in the process of your use, otherwise any problems have nothing to do with us. </p><p>If any part of the store infringes your rights, please tell us &lt;jifengshenmo@outlook.com&gt; we will remove the infringing content as soon as possible. </p><p>If you'd like to get involved with us too, whether you're involved in development, design, pitching or submitting work, we welcome you to join us. </p><p>Connect us on Spark IM: <a href="https://chat.shenmo.tech"><span style=" text-decoration: underline; color:#0000ff;">https://chat.shenmo.tech<br/></span></a>Our QQ Group number:872690351</p></body></html></source>
|
||||
<translation><html><head/><body><p>我们并<span style=" font-weight:600;">不是</span>官方团队,和你一样,我们也只是众多Linux/deepin系统爱好者和用户之中的一员,我们开发并且运营这个“Spark应用商店”,是为了让社区的朋友们一起分享好用的软件,或者一起参与开发,让大家都用到最新的,最优秀的软件。</p><p>我们并没有因此盈利,所有开发和维护人员都不会获得报酬,我们的主要支出大部分依赖于社区对我们的捐助,很感谢大家,这部分捐助让我们并不需要耗费太多精力去担心资金问题。</p><p>我们的服务和开发的软件都是免费供给大家使用,交流,学习的,但是在您的使用过程中一定要遵守当地的法律法规,否则出现任何问题和我们无关。</p><p>如果商店中任何一部分有侵犯您权益的行为,请告知我们 &lt;jifengshenmo@outlook.com&gt; ,我们会第一时间删除侵权内容。</p><p>如果你也想参与我们,不管是参与开发,设计,投递还是投稿作品,我们都欢迎你的加入。</p><p>在 Spark IM 联系我们:<a href="https://chat.shenmo.tech"><span style=" text-decoration: underline; color:#0000ff;">https://chat.shenmo.tech<br/></span></a>QQ 群:872690351</p></body></html></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/settingspage.cpp" line="213"/>
|
||||
<source>Updating, please wait...</source>
|
||||
<translation>正在更新,请稍候……</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/settingspage.cpp" line="235"/>
|
||||
<source>Spark Store</source>
|
||||
<translation>星火应用商店</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/settingspage.cpp" line="235"/>
|
||||
<source>Temporary cache was cleaned</source>
|
||||
<translation>缓存目录已清空</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>TitleBarMenu</name>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="228"/>
|
||||
<source>About</source>
|
||||
<translation>关于</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="229"/>
|
||||
<source>Exit</source>
|
||||
<translation>退出</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
Reference in New Issue
Block a user