Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
4edc56e919
!36 Fix incomplete display of the system monitor when the resolution is 1020 * 768
From: @xzyangha 
Reviewed-by: @ut-layne-yang 
Signed-off-by: @ut-layne-yang
2023-12-12 09:11:24 +00:00
yangxianzhao
024e6bb0cd Fix incomplete display of the system monitor when the resolution is 1020 * 768 2023-12-12 16:04:50 +08:00
openeuler-ci-bot
1f164e0181
!33 modify version info
From: @hanshuang123456 
Reviewed-by: @lwgcc, @ut-layne-yang 
Signed-off-by: @ut-layne-yang
2023-11-17 09:17:15 +00:00
hanshuang
c7d5cdfbc6 modify version info 2023-11-17 15:03:25 +08:00
openeuler-ci-bot
80badaf491
!32 update package
From: @hanshuang123456 
Reviewed-by: @HelloWorld_lvcongqing 
Signed-off-by: @HelloWorld_lvcongqing
2023-10-24 09:34:14 +00:00
hanshuang
b24e049268 update deepin-system-monitor package 2023-10-20 16:59:31 +08:00
openeuler-ci-bot
b433e11aed !2 add yaml and fix spec
Merge pull request !2 from panchenbo/master
2020-07-30 17:16:45 +08:00
panchenbo
c786c1a97a add yaml and fix spec 2020-07-30 16:40:04 +08:00
openeuler-ci-bot
97d5630adc !1 package init
Merge pull request !1 from panchenbo/master
2020-07-15 09:33:44 +08:00
panchenbo
d823d90077 package init 2020-07-14 10:55:31 +08:00
6 changed files with 306 additions and 0 deletions

View File

@ -0,0 +1,82 @@
From ac2a4290f9f52e0de8594c3441d7b04eb7607021 Mon Sep 17 00:00:00 2001
From: yangxianzhao <yangxianzhao@uniontech.com>
Date: Tue, 12 Dec 2023 15:59:49 +0800
Subject: [PATCH] Fix incomplete display of the system monitor when the
resolution is 1024 * 768
---
src/CMakeLists.txt | 1 +
src/constant.h | 27 +++++++++++++++++++++++++++
src/main.cpp | 3 ++-
3 files changed, 30 insertions(+), 1 deletion(-)
create mode 100644 src/constant.h
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 5a77ebd..62de410 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -66,6 +66,7 @@ set(HPP_GLOBAL
compact_disk_monitor.h
smooth_curve_generator.h
settings.h
+ constant.h
)
set(CPP_GLOBAL
main.cpp
diff --git a/src/constant.h b/src/constant.h
new file mode 100644
index 0000000..3764418
--- /dev/null
+++ b/src/constant.h
@@ -0,0 +1,27 @@
+/*
+* Copyright (C) 2011 ~ 2020 Uniontech Software Technology Co.,Ltd
+*
+* Author: Wang Yong <wangyong@deepin.com>
+* Maintainer: maojj <maojunjie@uniontech.com>
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* any later version.
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef CONSTANT_H
+#define CONSTANT_H
+
+namespace Constant {
+const int WINDOW_MIN_WIDTH = 900;
+const int WINDOW_MIN_HEIGHT = 750;
+}; // namespace Constant
+
+#endif
diff --git a/src/main.cpp b/src/main.cpp
index fa078bf..c27f162 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -23,6 +23,7 @@
#include "settings.h"
#include "gui/main_window.h"
#include "common/perf.h"
+#include "constant.h"
#include "../3rdparty/dmidecode/dmidecode.h"
#include <DApplication>
@@ -96,7 +97,7 @@ int main(int argc, char *argv[])
&DApplication::newInstanceStarted,
&mw,
&MainWindow::activateWindow);
-
+ mw.setMinimumSize(QSize(Constant::WINDOW_MIN_WIDTH, Constant::WINDOW_MIN_HEIGHT));
Dtk::Widget::moveToCenter(&mw);
mw.show();
--
2.31.1

View File

@ -0,0 +1,81 @@
From cc0990a7923c40a163d75fa99f046b3759651558 Mon Sep 17 00:00:00 2001
From: Your Name <you@example.com>
Date: Thu, 7 May 2020 13:31:04 +0800
Subject: [PATCH 2/2] 2
---
src/common/collator.cpp | 2 ++
src/common/collator.h | 2 ++
src/model/process_sort_filter_proxy_model.cpp | 4 ++--
src/model/system_service_sort_filter_proxy_model.cpp | 2 +-
4 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/common/collator.cpp b/src/common/collator.cpp
index 14a98fa..9c6f11c 100644
--- a/src/common/collator.cpp
+++ b/src/common/collator.cpp
@@ -2,6 +2,7 @@
#include "collator.h"
+namespace Common {
std::atomic<Collator *> Collator::m_instance;
std::mutex Collator::m_mutex;
@@ -48,3 +49,4 @@ Collator::~Collator()
{
delete m_collator;
}
+}
diff --git a/src/common/collator.h b/src/common/collator.h
index ceeb67c..88d08d5 100644
--- a/src/common/collator.h
+++ b/src/common/collator.h
@@ -12,6 +12,7 @@
#include <QString>
+namespace Common {
class Collator
{
public:
@@ -41,4 +42,5 @@ private:
static std::mutex m_mutex;
};
+}
#endif // COLLATOR_H
diff --git a/src/model/process_sort_filter_proxy_model.cpp b/src/model/process_sort_filter_proxy_model.cpp
index f2c3d4a..82f86db 100644
--- a/src/model/process_sort_filter_proxy_model.cpp
+++ b/src/model/process_sort_filter_proxy_model.cpp
@@ -77,11 +77,11 @@ bool ProcessSortFilterProxyModel::lessThan(const QModelIndex &left, const QModel
} else {
QString lname = left.data(Qt::DisplayRole).toString();
QString rname = right.data(Qt::DisplayRole).toString();
- return Collator::instance()->compare(lname, rname) < 0;
+ return Common::Collator::instance()->compare(lname, rname) < 0;
}
}
case ProcessTableModel::kProcessUserColumn: {
- return Collator::instance()->compare(left.data(Qt::DisplayRole).toString(),
+ return Common::Collator::instance()->compare(left.data(Qt::DisplayRole).toString(),
right.data(Qt::DisplayRole).toString()) < 0;
}
case ProcessTableModel::kProcessMemoryColumn: {
diff --git a/src/model/system_service_sort_filter_proxy_model.cpp b/src/model/system_service_sort_filter_proxy_model.cpp
index 515a2a4..ae1e019 100644
--- a/src/model/system_service_sort_filter_proxy_model.cpp
+++ b/src/model/system_service_sort_filter_proxy_model.cpp
@@ -41,7 +41,7 @@ bool SystemServiceSortFilterProxyModel::lessThan(const QModelIndex &left,
return left.data().toUInt() < right.data().toUInt();
case SystemServiceTableModel::kSystemServiceNameColumn:
case SystemServiceTableModel::kSystemServiceDescriptionColumn: {
- return Collator::instance()->compare(left.data(Qt::DisplayRole).toString(),
+ return Common::Collator::instance()->compare(left.data(Qt::DisplayRole).toString(),
right.data(Qt::DisplayRole).toString()) < 0;
}
default:
--
2.18.2

Binary file not shown.

View File

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2017 mosquito -->
<component type="desktop">
<id>deepin-system-monitor.desktop</id>
<metadata_license>CC0-1.0</metadata_license>
<name>Deepin System Monitor</name>
<name xml:lang="zh_CN">深度系统监视器</name>
<name xml:lang="zh_TW">深度系统监视器</name>
<summary>Deepin System Monitor is Deepin Desktop Environment system monitor</summary>
<summary xml:lang="zh_CN">深度系统监视器是一个免费开源的跨平台系统性能监视工具</summary>
<summary xml:lang="zh_TW">深度系统监视器是一个免费开源的跨平台系统性能监视工具</summary>
<description>
<p>
Deepin System Monitor is a free and open source cross-platform system monitor tool.
</p>
<p xml:lang="zh_CN">
深度系统监视器是一个免费开源的跨平台系统性能监视工具。
</p>
</description>
<url type="homepage">https://github.com/linuxdeepin/deepin-system-monitor/</url>
<url type="bugtracker">https://github.com/linuxdeepin/deepin-system-monitor/issues/</url>
<releases>
<release version="1.3" date="2017-08-11"></release>
</releases>
<project_license>GPL-3.0</project_license>
<developer_name>Linux Deepin</developer_name>
<screenshots>
<screenshot type="default">http://api.lastore.deepin.org/static/deepin-system-monitor/meta/screenshots/zh_CN/phpCsoD79.png</screenshot>
<screenshot type="default">http://api.lastore.deepin.org/static/deepin-system-monitor/meta/screenshots/zh_CN/php0vAbT7.png</screenshot>
<screenshot type="default">http://api.lastore.deepin.org/static/deepin-system-monitor/meta/screenshots/zh_CN/phpSZvurm.png</screenshot>
</screenshots>
</component>

107
deepin-system-monitor.spec Normal file
View File

@ -0,0 +1,107 @@
%global debug_package %{nil}
Name: deepin-system-monitor
Version: 5.8.27
Release: 3
Summary: A more user-friendly system monitor
License: GPLv3
URL: https://github.com/linuxdeepin/deepin-system-monitor
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
Patch0: 0001-Fix-incomplete-display-of-the-system-monitor-when-the-resolution-is-1024X768.patch
BuildRequires: qt5-devel
BuildRequires: cmake
BuildRequires: pkgconfig(dtkwidget)
BuildRequires: pkgconfig(dtkcore)
BuildRequires: pkgconfig(dtkgui)
# BuildRequires: pkgconfig(dtkwm)
BuildRequires: pkgconfig(libprocps)
BuildRequires: pkgconfig(xcb)
BuildRequires: pkgconfig(xcb-util)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xext)
BuildRequires: pkgconfig(xtst)
BuildRequires: xcb-util-wm-devel
# BuildRequires: pkgconfig(Qt5DBus)
# BuildRequires: pkgconfig(Qt5Gui)
# BuildRequires: pkgconfig(Qt5Network)
# BuildRequires: pkgconfig(Qt5Widgets)
# BuildRequires: pkgconfig(Qt5X11Extras)
# BuildRequires: qt5-linguist
BuildRequires: libpcap-devel
BuildRequires: libcap-devel
# BuildRequires: ncurses-devel
BuildRequires: desktop-file-utils
BuildRequires: libappstream-glib
BuildRequires: deepin-gettext-tools
# BuildRequires: dtkwm-devel
# BuildRequires: qt5-qtmultimedia-devel
# BuildRequires: dtkcore-devel >= 5.1
BuildRequires: libicu-devel
BuildRequires: libnl3-devel
BuildRequires: systemd-devel
# BuildRequires: pkgconfig(libnl-route-3)
#Requires: hicolor-icon-theme
Recommends: deepin-manual
%description
%{summary}.
%prep
%autosetup -p1
# %setup -q
####sed -i 's|lrelease|lrelease-qt5|' translations/translate_generation.sh
# %patch0 -p1
%build
export PATH=%{_qt5_bindir}:$PATH
sed -i "s|^cmake_minimum_required.*|cmake_minimum_required(VERSION 3.0)|" $(find . -name "CMakeLists.txt")
mkdir build && pushd build
%cmake -DCMAKE_BUILD_TYPE=Release ../ -DAPP_VERSION=%{version} -DVERSION=%{version}
%make_build
popd
%install
%make_install -C build INSTALL_ROOT="%buildroot"
# %check
# desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop ||:
#appstream-util validate-relax --nonet %{buildroot}%{_datadir}/appdata/*.appdata.xml
%post
if command -v setcap > /dev/null; then
if setcap cap_net_raw,cap_dac_read_search,cap_sys_ptrace+ep /usr/bin/deepin-system-monitor;then
chmod u-s /usr/bin/deepin-system-monitor
else
echo "Setcap failed, falling back to setuid"
chmod u+s /usr/bin/deepin-system-monitor
fi
else
echo "Setcap is not installed, falling back to setuid"
chmod u+s /usr/bin/deepin-system-monitor
fi
%files
%doc README.md
%license LICENSE
%caps(cap_kill,cap_net_raw,cap_dac_read_search,cap_sys_ptrace=+ep) %{_bindir}/%{name}
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
%{_datadir}/%{name}/translations/*.qm
%{_datadir}/polkit-1/actions/com.deepin.pkexec.deepin-system-monitor.policy
%{_datadir}/deepin-manual/manual-assets/application/deepin-system-monitor/system-monitor/*
%changelog
* Tue Dec 12 2023 yangxianzhao <yangxianzhao@uniontech.com> - 5.8.27-3
- Fix incomplete display of the system monitor when the resolution is 1024 * 768
* Fri Nov 17 2023 hanshuang <hanshuang@uniontech.com> - 5.8.27-2
- modify version info
* Mon Jun 13 2022 uoser <uoser@uniontech.com> - 5.8.27-1.01
- update: update to 5.8.27-1.01

View File

@ -0,0 +1,4 @@
version_control: github
src_repo: linuxdeepin/deepin-system-monitor
tag_prefix: ^v
seperator: .