-
-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deepin.dde-control-center: init at 5.5.164
- Loading branch information
Showing
4 changed files
with
228 additions
and
0 deletions.
There are no files selected for viewing
139 changes: 139 additions & 0 deletions
139
pkgs/desktops/deepin/core/dde-control-center/default.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
{ stdenv | ||
, lib | ||
, fetchFromGitHub | ||
, fetchpatch | ||
, replaceAll | ||
, dtkwidget | ||
, qt5integration | ||
, qt5platform-plugins | ||
, dde-qt-dbus-factory | ||
, deepin-pw-check | ||
, udisks2-qt5 | ||
, cmake | ||
, qttools | ||
, qtbase | ||
, pkg-config | ||
, qtx11extras | ||
, qtmultimedia | ||
, wrapQtAppsHook | ||
, wrapGAppsHook | ||
, gsettings-qt | ||
, wayland | ||
, kwayland | ||
, qtwayland | ||
, polkit-qt | ||
, pcre | ||
, xorg | ||
, libselinux | ||
, libsepol | ||
, libxcrypt | ||
, networkmanager-qt | ||
, glib | ||
, runtimeShell | ||
, tzdata | ||
, dbus | ||
}: | ||
|
||
stdenv.mkDerivation rec { | ||
pname = "dde-control-center"; | ||
version = "5.5.164"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "linuxdeepin"; | ||
repo = pname; | ||
rev = version; | ||
sha256 = "sha256-Pd1vCkA0vDC6aGTt1hXreIxTi9feBWNZZhIdpjf26iw="; | ||
}; | ||
|
||
patches = [ | ||
(fetchpatch { | ||
name = "fix info for other distributions"; | ||
url = "https://github.com/linuxdeepin/dde-control-center/commit/32394aa84f4b575e0a84a0813ba07b72cb1ba137.patch"; | ||
sha256 = "sha256-r21oczFyhKarMuEkL8Ruzd8jqB/T+MfuUGrLNeQdZB8="; | ||
}) | ||
./fix-svg-render-for-themeitem.patch | ||
./dont-show-endUserLicenseAgreement-for-deepinos.patch | ||
]; | ||
|
||
postPatch = replaceAll "/bin/bash" "${runtimeShell}" | ||
+ replaceAll "/usr/lib/dde-control-center" "/run/current-system/sw/lib/dde-control-center" | ||
+ replaceAll "/usr/share/zoneinfo" "${tzdata}/share/zoneinfo" | ||
+ replaceAll "/usr/bin/dbus-send" "${dbus}/bin/dbus-send" | ||
+ replaceAll "/usr/bin/abrecovery" "abrecovery" + '' | ||
substituteInPlace CMakeLists.txt --replace 'add_subdirectory("tests")' ' ' | ||
substituteInPlace dde-control-center-autostart.desktop com.deepin.dde.ControlCenter.service \ | ||
--replace "/usr" "$out" | ||
substituteInPlace abrecovery/main.cpp include/widgets/utils.h src/{reboot-reminder-dialog/main.cpp,frame/main.cpp,reset-password-dialog/main.cpp} \ | ||
--replace "/usr/share/dde-control-center" "$out/share/dde-control-center" | ||
# default path for QFileDialog::getOpenFileName | ||
substituteInPlace src/frame/modules/keyboard/customedit.cpp \ | ||
--replace "/usr/bin" "/run/current-system/sw/bin" | ||
substituteInPlace dde-control-center-wapper \ | ||
--replace "qdbus" "${qttools.bin}/bin/qdbus" \ | ||
--replace "/usr/share" "$out/share" | ||
substituteInPlace src/frame/window/mainwindow.cpp \ | ||
--replace "/usr/share/icons/bloom/apps/64/preferences-system.svg" "preferences-system.svg" | ||
''; | ||
|
||
nativeBuildInputs = [ | ||
cmake | ||
qttools | ||
pkg-config | ||
wrapQtAppsHook | ||
wrapGAppsHook | ||
]; | ||
dontWrapGApps = true; | ||
|
||
buildInputs = [ | ||
dtkwidget | ||
qt5platform-plugins | ||
dde-qt-dbus-factory | ||
deepin-pw-check | ||
qtbase | ||
qtx11extras | ||
qtmultimedia | ||
gsettings-qt | ||
udisks2-qt5 | ||
wayland | ||
kwayland | ||
qtwayland | ||
polkit-qt | ||
pcre | ||
xorg.libXdmcp | ||
libselinux | ||
libsepol | ||
libxcrypt | ||
networkmanager-qt | ||
]; | ||
|
||
cmakeFlags = [ | ||
"-DCVERSION=${version}" | ||
"-DDISABLE_AUTHENTICATION=YES" | ||
"-DDISABLE_ACTIVATOR=YES" | ||
"-DDISABLE_SYS_UPDATE=YES" | ||
"-DDISABLE_RECOVERY=YES" | ||
]; | ||
|
||
# qt5integration must be placed before qtsvg in QT_PLUGIN_PATH | ||
qtWrapperArgs = [ | ||
"--prefix QT_PLUGIN_PATH : ${qt5integration}/${qtbase.qtPluginPrefix}" | ||
]; | ||
|
||
preFixup = '' | ||
glib-compile-schemas ${glib.makeSchemaPath "$out" "${pname}-${version}"} | ||
qtWrapperArgs+=("''${gappsWrapperArgs[@]}") | ||
''; | ||
|
||
meta = with lib; { | ||
description = "Control panel of Deepin Desktop Environment"; | ||
homepage = "https://github.com/linuxdeepin/dde-control-center"; | ||
license = licenses.lgpl3Plus; | ||
platforms = platforms.linux; | ||
maintainers = teams.deepin.members; | ||
}; | ||
} |
29 changes: 29 additions & 0 deletions
29
...ktops/deepin/core/dde-control-center/dont-show-endUserLicenseAgreement-for-deepinos.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
From adcc5eb58e2dcd06810a40c237bc7984c2c5af4b Mon Sep 17 00:00:00 2001 | ||
From: rewine <luhongxu@deepin.org> | ||
Date: Sun, 8 Jan 2023 13:46:17 +0800 | ||
Subject: [PATCH] dont show endUserLicenseAgreement for deepinos | ||
|
||
--- | ||
src/frame/window/modules/systeminfo/systeminfowidget.cpp | 6 ++++++ | ||
1 file changed, 6 insertions(+) | ||
|
||
diff --git a/src/frame/window/modules/systeminfo/systeminfowidget.cpp b/src/frame/window/modules/systeminfo/systeminfowidget.cpp | ||
index 8e62604fb..0f443ee20 100644 | ||
--- a/src/frame/window/modules/systeminfo/systeminfowidget.cpp | ||
+++ b/src/frame/window/modules/systeminfo/systeminfowidget.cpp | ||
@@ -78,6 +78,12 @@ void SystemInfoWidget::initData() | ||
m_listView->setRowHidden(i, true); | ||
} | ||
} | ||
+ | ||
+ if (IsNotDeepinUos) { | ||
+ if (m.gsettingsName == "endUserLicenseAgreement") { | ||
+ m_listView->setRowHidden(i, true); | ||
+ } | ||
+ } | ||
} | ||
|
||
if (InsertPlugin::instance()->updatePluginInfo("systeminfo")) | ||
-- | ||
2.38.1 | ||
|
59 changes: 59 additions & 0 deletions
59
pkgs/desktops/deepin/core/dde-control-center/fix-svg-render-for-themeitem.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
From 191cf3f876dd95ef0493b7e587b965020e883568 Mon Sep 17 00:00:00 2001 | ||
From: rewine <luhongxu@deepin.org> | ||
Date: Thu, 2 Mar 2023 15:46:09 +0800 | ||
Subject: [PATCH] fix-svg-render-for-themeitem | ||
|
||
--- | ||
src/frame/window/modules/personalization/themeitempic.cpp | 5 ++--- | ||
src/frame/window/modules/personalization/themeitempic.h | 4 ++-- | ||
2 files changed, 4 insertions(+), 5 deletions(-) | ||
|
||
diff --git a/src/frame/window/modules/personalization/themeitempic.cpp b/src/frame/window/modules/personalization/themeitempic.cpp | ||
index 526ae426c..bad41d6fe 100644 | ||
--- a/src/frame/window/modules/personalization/themeitempic.cpp | ||
+++ b/src/frame/window/modules/personalization/themeitempic.cpp | ||
@@ -23,7 +23,7 @@ using DTK_GUI_NAMESPACE::DSvgRenderer; | ||
ThemeItemPic::ThemeItemPic(QWidget *parent) | ||
: QWidget(parent) | ||
, m_isSelected(false) | ||
- , render(new DSvgRenderer()) | ||
+ , render(new QSvgRenderer()) | ||
{ | ||
} | ||
|
||
@@ -79,9 +79,8 @@ void ThemeItemPic::paintEvent(QPaintEvent *event) | ||
//first draw image | ||
const auto ratio = devicePixelRatioF(); | ||
QSize defaultSize = render->defaultSize() * ratio; | ||
- QImage img = render->toImage(defaultSize); | ||
QRect picRect = rect().adjusted(totalSpace, totalSpace, -totalSpace, -totalSpace); | ||
- painter.drawImage(picRect, img, img.rect()); | ||
+ render->render(&painter, picRect); | ||
|
||
//second draw picture rounded rect bound | ||
QPen pen; | ||
diff --git a/src/frame/window/modules/personalization/themeitempic.h b/src/frame/window/modules/personalization/themeitempic.h | ||
index 9fe5fc1ab..34454bb72 100644 | ||
--- a/src/frame/window/modules/personalization/themeitempic.h | ||
+++ b/src/frame/window/modules/personalization/themeitempic.h | ||
@@ -6,7 +6,7 @@ | ||
|
||
#include "interface/namespace.h" | ||
|
||
-#include <DSvgRenderer> | ||
+#include <QSvgRenderer> | ||
|
||
#include <QWidget> | ||
|
||
@@ -33,7 +33,7 @@ protected: | ||
|
||
private: | ||
bool m_isSelected = false; | ||
- DTK_GUI_NAMESPACE::DSvgRenderer *render; | ||
+ QSvgRenderer *render; | ||
}; | ||
} | ||
} | ||
-- | ||
2.38.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters