diff --git a/src/application.cpp b/src/application.cpp index ef453cb..cede3ef 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -137,9 +137,9 @@ void Application::initAboutDialog() 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 + if (runtimeDtkVersion() >= DTK_VERSION_CHECK(5, 6, 4, 0)) { + dialog->setVersion(applicationVersion()); + } // 根据 shenmo 要求,不显示组织 Logo // dialog->setCompanyLogo(QPixmap(":/icon/Logo-Spark.png")); dialog->setCompanyLogo(QPixmap()); diff --git a/src/pages/appintopage.cpp b/src/pages/appintopage.cpp index f2e24bd..15e6252 100644 --- a/src/pages/appintopage.cpp +++ b/src/pages/appintopage.cpp @@ -6,6 +6,7 @@ #include "backend/image_show.h" #include "application.h" #include "utils/utils.h" +#include "pages/settingspage.h" #include #include @@ -380,6 +381,10 @@ void AppIntoPage::setAppinfoTags(const QStringList &tagList) void AppIntoPage::notifyUserUnsupportedTags(bool ubuntuSupport, bool deepinSupport, bool uosSupport) { + if (!SettingsPage::needUncompatibleNotification) { + return; + } + bool isDeepin = Dtk::Core::DSysInfo::productType() == Dtk::Core::DSysInfo::Deepin; bool isUOS = Dtk::Core::DSysInfo::productType() == Dtk::Core::DSysInfo::Uos; bool checkdeepin = (isDeepin && !deepinSupport); diff --git a/src/pages/settingspage.cpp b/src/pages/settingspage.cpp index a0bf537..87e90c6 100644 --- a/src/pages/settingspage.cpp +++ b/src/pages/settingspage.cpp @@ -11,6 +11,7 @@ #define DEFAULT_SERVER_URL "https://cdn.d.store.deepinos.org.cn/" #define DEFAULT_CHECK_DOMAIN "deepinos" +bool SettingsPage::needUncompatibleNotification = true; bool SettingsPage::isdownload = false; SettingsPage::SettingsPage(QWidget *parent) @@ -99,6 +100,9 @@ void SettingsPage::initConfig() SparkAPI::setServerUrl(config.value("server/choose").toString()); } configCanSave = true; //  防止触发保存配置信号 + + needUncompatibleNotification = config.value("other/uncompatibleNotification", needUncompatibleNotification).toBool(); + ui->checkBox->setChecked(needUncompatibleNotification); } SettingsPage::~SettingsPage() @@ -252,3 +256,11 @@ void SettingsPage::on_pushButton_clearWebCache_clicked() cacheDir.removeRecursively(); }); } + +void SettingsPage::on_checkBox_clicked(bool checked) +{ + needUncompatibleNotification = checked; + QSettings config(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/config.ini", QSettings::IniFormat); + config.setValue("other/uncompatibleNotification", needUncompatibleNotification); + config.sync(); +} diff --git a/src/pages/settingspage.h b/src/pages/settingspage.h index f65347f..d1e9267 100644 --- a/src/pages/settingspage.h +++ b/src/pages/settingspage.h @@ -30,6 +30,11 @@ private slots: void on_pushButton_clearWebCache_clicked(); + void on_checkBox_clicked(bool checked); + +public: + static bool needUncompatibleNotification; + private: static bool isdownload; bool configCanSave; diff --git a/src/pages/settingspage.ui b/src/pages/settingspage.ui index 5792ca4..3e9fbe8 100644 --- a/src/pages/settingspage.ui +++ b/src/pages/settingspage.ui @@ -54,7 +54,7 @@ 0 - + @@ -67,21 +67,21 @@ true - + 0 0 743 - 839 + 950 - + - + 18 @@ -93,10 +93,10 @@ - + - + 100 @@ -132,7 +132,7 @@ - + 160 @@ -145,7 +145,7 @@ - + Qt::Horizontal @@ -161,10 +161,10 @@ - + - + Qt::Horizontal @@ -177,7 +177,7 @@ - + color:#808080 @@ -190,7 +190,7 @@ - + Spark Store Update @@ -217,10 +217,44 @@ - + + + + + + + 18 + + + + Other Settings + + + + + + + + + + Enable notification for apps not compatible with current system + + + true + + + + + + + + + + + - + 18 @@ -232,10 +266,10 @@ - + - + color:#808080 @@ -252,14 +286,14 @@ - + Location:/tmp/spark-store - + Qt::Horizontal @@ -279,7 +313,7 @@ - + 80 @@ -305,10 +339,10 @@ - + - + 18 @@ -320,7 +354,7 @@ - + <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 <a href="mailto:jifengshenmo@outlook.com"><span style=" text-decoration: underline; color:#0082fa;">jifengshenmo@outlook.com</span></a> 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><span style=" text-decoration: underline; color:#0000ff;"><br/></span>Our contact method can be found at <a href="https://blog.shenmo.tech/post/%E6%95%85%E9%9A%9C%E5%85%AC%E5%91%8A/"><span style=" text-decoration: underline; color:#0082fa;">Here</span></a></p></body></html> @@ -337,7 +371,7 @@ - + Qt::Vertical diff --git a/translations/spark-store_en.ts b/translations/spark-store_en.ts index 6cceda9..e13a3b6 100644 --- a/translations/spark-store_en.ts +++ b/translations/spark-store_en.ts @@ -10,9 +10,9 @@ - - - + + + Download @@ -175,79 +175,79 @@ - + Click Open - + Developer Mode Disabled - - - + + + Reinstall - + Upgrade - - + + Install - + Installing - - - - + + + + Warning - + The current application does not support deepin, there may be problems - + The current application does not support UOS, there may be problems - + The current application does not support Ubuntu, there may be problems - + The current application does not support current platform, there may be problems - - + + Spark Store - + Uninstall succeeded - + The URL has been copied to the clipboard @@ -577,62 +577,72 @@ + Other Settings + + + + + Enable notification for apps not compatible with current system + + + + Temp - + Since the dictionary is at /tmp,It would be cleaned automatically when system reboot. - + 0B 0B - + Location:/tmp/spark-store - + Clean - + Size: - + Clear Web Cache - + About us - + <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 <a href="mailto:jifengshenmo@outlook.com"><span style=" text-decoration: underline; color:#0082fa;">jifengshenmo@outlook.com</span></a> 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><span style=" text-decoration: underline; color:#0000ff;"><br/></span>Our contact method can be found at <a href="https://blog.shenmo.tech/post/%E6%95%85%E9%9A%9C%E5%85%AC%E5%91%8A/"><span style=" text-decoration: underline; color:#0082fa;">Here</span></a></p></body></html> - + Updating, please wait... - + Spark Store - + Temporary cache was cleaned diff --git a/translations/spark-store_fr.ts b/translations/spark-store_fr.ts index 7794988..7404e92 100644 --- a/translations/spark-store_fr.ts +++ b/translations/spark-store_fr.ts @@ -10,9 +10,9 @@ - - - + + + Download @@ -175,79 +175,79 @@ - + Click Open - + Developer Mode Disabled - - - + + + Reinstall - + Upgrade - - + + Install - + Installing - - - - + + + + Warning - + The current application does not support deepin, there may be problems - + The current application does not support UOS, there may be problems - + The current application does not support Ubuntu, there may be problems - + The current application does not support current platform, there may be problems - - + + Spark Store - + Uninstall succeeded - + The URL has been copied to the clipboard @@ -577,62 +577,72 @@ + Other Settings + + + + + Enable notification for apps not compatible with current system + + + + Temp - + Since the dictionary is at /tmp,It would be cleaned automatically when system reboot. - + 0B 0B - + Location:/tmp/spark-store - + Clean - + Size: - + Clear Web Cache - + About us - + <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 <a href="mailto:jifengshenmo@outlook.com"><span style=" text-decoration: underline; color:#0082fa;">jifengshenmo@outlook.com</span></a> 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><span style=" text-decoration: underline; color:#0000ff;"><br/></span>Our contact method can be found at <a href="https://blog.shenmo.tech/post/%E6%95%85%E9%9A%9C%E5%85%AC%E5%91%8A/"><span style=" text-decoration: underline; color:#0082fa;">Here</span></a></p></body></html> - + Updating, please wait... - + Spark Store - + Temporary cache was cleaned diff --git a/translations/spark-store_zh_CN.ts b/translations/spark-store_zh_CN.ts index 8e7de18..48c412f 100644 --- a/translations/spark-store_zh_CN.ts +++ b/translations/spark-store_zh_CN.ts @@ -10,9 +10,9 @@ - - - + + + Download 下载 @@ -175,79 +175,79 @@ 软件官网 - + Click Open 点击跳转 - + Developer Mode Disabled 开发者模式未开启 - - - + + + Reinstall 重新安装 - + Upgrade 升级 - - + + Install 安装 - + Installing 正在安装 - - - - + + + + Warning 警告 - + The current application does not support deepin, there may be problems 当前应用不支持deepin,安装后可能会出现问题 - + The current application does not support UOS, there may be problems 当前应用不支持UOS,安装后可能会出现问题 - + The current application does not support Ubuntu, there may be problems 当前应用不支持Ubuntu,安装后可能会出现问题 - + The current application does not support current platform, there may be problems 当前应用不支持平台,安装后可能会出现问题 - - + + Spark Store 星火应用商店 - + Uninstall succeeded 卸载成功 - + The URL has been copied to the clipboard 链接已复制到剪贴板 @@ -369,22 +369,6 @@ dpkg progress had been aborted,please check the install info or try to reinstall. dpkg出现错误,请检查安装详情或尝试重新安装 - - Error happened in dpkg progress , you can try it again. - 安装被中止,可重新安装。 - - - Error happened in dpkg progress , you can try it again - dpkg出现错误,可重新安装 - - - dpkg progress had been aborted,you can retry installation. - dpkg进程被中断,您可重试安装。 - - - dpkg progress had been aborted,you can retry installation - 安装被中止,可重新安装 - @@ -593,62 +577,72 @@ + Other Settings + 其他设置 + + + + Enable notification for apps not compatible with current system + 开启应用不兼容当前系统提示 + + + Temp 缓存目录 - + Since the dictionary is at /tmp,It would be cleaned automatically when system reboot. 因为这个目录位于/tmp下,所以即使你不手动清空的话,其也将在系统重启时自动清空。 - + 0B - + Location:/tmp/spark-store 目录位置:/tmp/spark-store - + Clean 清空 - + Size: 目录大小: - + Clear Web Cache 清理网页缓存 - + About us 关于我们 - + <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 <a href="mailto:jifengshenmo@outlook.com"><span style=" text-decoration: underline; color:#0082fa;">jifengshenmo@outlook.com</span></a> 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><span style=" text-decoration: underline; color:#0000ff;"><br/></span>Our contact method can be found at <a href="https://blog.shenmo.tech/post/%E6%95%85%E9%9A%9C%E5%85%AC%E5%91%8A/"><span style=" text-decoration: underline; color:#0082fa;">Here</span></a></p></body></html> <html><head/><body><p>我们并<span style=" font-weight:600;">不是</span>官方团队,和你一样,我们也只是众多Linux/deepin系统爱好者和用户之中的一员,我们开发并且运营这个“Spark应用商店”,是为了让社区的朋友们一起分享好用的软件,或者一起参与开发,让大家都用到最新的,最优秀的软件。</p><p>我们并没有因此盈利,所有开发和维护人员都不会获得报酬,我们的主要支出大部分依赖于社区对我们的捐助,很感谢大家,这部分捐助让我们并不需要耗费太多精力去担心资金问题。</p><p>我们的服务和开发的软件都是免费供给大家使用,交流,学习的,但是在您的使用过程中一定要遵守当地的法律法规,否则出现任何问题和我们无关。</p><p>如果商店中任何一部分有侵犯您权益的行为,请告知我们 <a href="mailto:jifengshenmo@outlook.com"><span style=" text-decoration: underline; color:#0082fa;">jifengshenmo@outlook.com</span></a> ,我们会第一时间删除侵权内容。</p><p>如果你也想参与我们,不管是参与开发,设计,投递还是投稿作品,我们都欢迎你的加入。<p><span style=" text-decoration: underline; color:#0000ff;"><br/></span>请点击<a href="https://blog.shenmo.tech/post/%E6%95%85%E9%9A%9C%E5%85%AC%E5%91%8A/"><span style=" text-decoration: underline; color:#0082fa;">这里</span></a>来联系我们,加群</p></body></html> - + Updating, please wait... 正在更新,请稍候…… - + Spark Store 星火应用商店 - + Temporary cache was cleaned 缓存目录已清空 diff --git a/translations/spark-store_zh_TW.ts b/translations/spark-store_zh_TW.ts index 8fc5d6e..417b8e8 100644 --- a/translations/spark-store_zh_TW.ts +++ b/translations/spark-store_zh_TW.ts @@ -10,9 +10,9 @@ - - - + + + Download 下载 @@ -175,79 +175,79 @@ 软件官网 - + Click Open 点击跳转 - + Developer Mode Disabled 开发者模式未开启 - - - + + + Reinstall 重新安裝 - + Upgrade 升级 - - + + Install 安装 - + Installing 正在安装 - - - - + + + + Warning - + The current application does not support deepin, there may be problems - + The current application does not support UOS, there may be problems - + The current application does not support Ubuntu, there may be problems - + The current application does not support current platform, there may be problems - - + + Spark Store 星火应用商店 - + Uninstall succeeded 卸载成功 - + The URL has been copied to the clipboard 链接已复制到剪贴板 @@ -360,30 +360,14 @@ Error happened in dpkg progress , please check the install info or try to reinstall. - + 安裝被中止,請檢查安裝詳情或嘗試重新安裝 dpkg progress had been aborted,please check the install info or try to reinstall. - - - - Error happened in dpkg progress , you can try it again. - 安装被中止,可重新安装。 - - - Error happened in dpkg progress , you can try it again - dpkg出现错误,可重新安装 - - - dpkg progress had been aborted,you can retry installation. - dpkg进程被中断,您可重试安装。 - - - dpkg progress had been aborted,you can retry installation - 安装被中止,可重新安装 + dpkg出現錯誤,請檢查安裝詳情或嘗試重新安裝 @@ -593,62 +577,72 @@ + Other Settings + 其他設定 + + + + Enable notification for apps not compatible with current system + 開啟應用不相容當前系統提示 + + + Temp 缓存目录 - + Since the dictionary is at /tmp,It would be cleaned automatically when system reboot. 因为这个目录位于/tmp下,所以即使你不手动清空的话,其也将在系统重启时自动清空。 - + 0B - + Location:/tmp/spark-store 目录位置:/tmp/spark-store - + Clean 清空 - + Size: 目录大小: - + Clear Web Cache 清理网页缓存 - + About us 关于我们 - + <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 <a href="mailto:jifengshenmo@outlook.com"><span style=" text-decoration: underline; color:#0082fa;">jifengshenmo@outlook.com</span></a> 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><span style=" text-decoration: underline; color:#0000ff;"><br/></span>Our contact method can be found at <a href="https://blog.shenmo.tech/post/%E6%95%85%E9%9A%9C%E5%85%AC%E5%91%8A/"><span style=" text-decoration: underline; color:#0082fa;">Here</span></a></p></body></html> - + <html><head/><body><p>我們並<span style=" font-weight:600;">不是</span>官方團隊,和你一樣,我們也只是眾多Linux/deepin系統愛好者和使用者之中的一員,我們開發並且運營這個“Spark應用商店”,是為了讓社羣的朋友們一起分享好用的軟體,或者一起參與開發,讓大家都用到最新的,最優秀的軟體。</p><p>我們並沒有因此盈利,所有開發和維護人員都不會獲得報酬,我們的主要支出大部分依賴於社羣對我們的捐助,很感謝大家,這部分捐助讓我們並不需要耗費太多精力去擔心資金問題。</p><p>我們的服務和開發的軟體都是免費供給大家使用,交流,學習的,但是在您的使用過程中一定要遵守當地的法律法規,否則出現任何問題和我們無關。</p><p>如果商店中任何一部分有侵犯您權益的行為,請告知我們 <a href="mailto:jifengshenmo@outlook.com"><span style=" text-decoration: underline; color:#0082fa;">jifengshenmo@outlook.com</span></a> ,我們會第一時間刪除侵權內容。</p><p>如果你也想參與我們,不管是參與開發,設計,投遞還是投稿作品,我們都歡迎你的加入。<p><span style=" text-decoration: underline; color:#0000ff;"><br/></span>請點選<a href="https://blog.shenmo.tech/post/%E6%95%85%E9%9A%9C%E5%85%AC%E5%91%8A/"><span style=" text-decoration: underline; color:#0082fa;">這裡</span></a>來聯絡我們,加群</p></body></html> - + Updating, please wait... 正在更新,请稍候…… - + Spark Store 星火应用商店 - + Temporary cache was cleaned 缓存目录已清空