diff --git a/debian/libukcc3.preinst b/debian/libukcc3.preinst new file mode 100644 index 0000000..33b9fa6 --- /dev/null +++ b/debian/libukcc3.preinst @@ -0,0 +1,12 @@ +#!/bin/bash + +set -e + +path="/usr/lib/`/usr/bin/dpkg-architecture -qDEB_TARGET_MULTIARCH`/libukcc.so.1.0.0" +path1="/usr/lib/`/usr/bin/dpkg-architecture -qDEB_TARGET_MULTIARCH`/libukcc.so.1" +path2="/usr/lib/`/usr/bin/dpkg-architecture -qDEB_TARGET_MULTIARCH`/libukcc.so.1.0" +dpkg-divert --package libukcc3 --rename --divert "$path"".old" --add $path +dpkg-divert --package libukcc3 --rename --divert "$path1"".old" --add $path1 +dpkg-divert --package libukcc3 --rename --divert "$path2"".old" --add $path2 + + diff --git a/plugins/personalized/screensaver/screensaver.cpp b/plugins/personalized/screensaver/screensaver.cpp index 2f2cb52..1ce094f 100644 --- a/plugins/personalized/screensaver/screensaver.cpp +++ b/plugins/personalized/screensaver/screensaver.cpp @@ -31,6 +31,7 @@ #include #include #include "widgets/Label/fixlabel.h" +#include "../../../shell/utils/utils.h" #define SSTHEMEPATH "/usr/share/applications/screensavers/" #define ID_PREFIX "screensavers-ukui-" @@ -397,6 +398,10 @@ void Screensaver::startupScreensaver() //关闭屏保 closeScreensaver(); + if (Utils::isWayland()) { + return; + } + QWindow *preWidFromWin = QWindow::fromWinId(ui->previewWidget->winId()); previewWind->winId(); previewWind->setParent(preWidFromWin); diff --git a/plugins/plugins.pro b/plugins/plugins.pro index fb8bcd0..34754b6 100644 --- a/plugins/plugins.pro +++ b/plugins/plugins.pro @@ -1,25 +1,41 @@ +##对预编译宏做处理 include(../env.pri) TEMPLATE = subdirs -SUBDIRS = \ - devices/shortcut \ - devices/printer \ + +SUBDIRS = devices/printer \ devices/mouse \ - devices/keyboard \ - application/defaultapp \ - application/autoboot \ system/about \ system/power \ - system/display \ - system/notice \ - system/vino \ personalized/wallpaper \ personalized/theme \ personalized/screenlock \ - personalized/fonts \ - personalized/screensaver \ network/vpn \ network/proxy \ - account/userinfo \ time-language/datetime \ time-language/area + +if(contains(DEFINES, SP2)){ +SUBDIRS += devices/shortcut \ + devices/keyboard \ + application/defaultapp \ + application/autoboot \ + system/notice \ + system/display \ + system/vino \ + personalized/fonts \ + personalized/screensaver \ + account/userinfo \ + security-updates/backup \ +} + +if(contains(DEFINES, PANGUW)){ +SUBDIRS += system/display_hw \ + system/vino_hw \ +} + +if(contains(DEFINES, MAVIS)){ +SUBDIRS += system/display \ + system/backup_intel \ + account/userinfo_intel \ +} diff --git a/plugins/system/display/display.cpp b/plugins/system/display/display.cpp index 8b1fb62..9dae921 100644 --- a/plugins/system/display/display.cpp +++ b/plugins/system/display/display.cpp @@ -80,7 +80,7 @@ QIcon DisplaySet::icon() const bool DisplaySet::isEnable() const { - return !Utils::isWayland(); + return true; } void DisplaySet::requestBackend() diff --git a/shell/mainwindow.cpp b/shell/mainwindow.cpp index 9a8d85d..9521220 100644 --- a/shell/mainwindow.cpp +++ b/shell/mainwindow.cpp @@ -84,7 +84,6 @@ MainWindow::MainWindow(QWidget *parent) : { mate_mixer_init(); qApp->installEventFilter(this); - is_ExitBluetooth = isExitBluetooth(); is_ExitPower = isExitsPower(); initUI(); hideComponent(); @@ -610,7 +609,6 @@ void MainWindow::loadPlugins(){ #endif qDebug() << "Scan Plugin: " << fileName; if (!fileName.endsWith(".so") || - ("libukcc-bluetooth.so" == fileName && !is_ExitBluetooth) || ("libpower.so" == fileName && !is_ExitPower)) { continue; } @@ -1043,18 +1041,6 @@ void MainWindow::initStyleSheet() { closeBtn->setIcon(QIcon::fromTheme("window-close-symbolic")); } -bool MainWindow::isExitBluetooth() { - QProcess process; - process.start("rfkill list"); - process.waitForFinished(); - QByteArray output = process.readAllStandardOutput(); - QString str_output = output; - bool isDevice = str_output.contains(QString("hci"), Qt::CaseInsensitive); - bool isAddress = true; - - return isDevice && isAddress; -} - void MainWindow::changeSearchSlot() { // int fontSize = m_fontSetting->get("system-font-size").toInt(); // m_searchWidget->setFixedHeight((fontSize - 11) * 2 + 32); diff --git a/shell/mainwindow.h b/shell/mainwindow.h index 9ed3a03..7f40bc1 100644 --- a/shell/mainwindow.h +++ b/shell/mainwindow.h @@ -60,7 +60,6 @@ public: public: QMap exportModule(int); void setModuleBtnHightLight(int id); - static bool isExitBluetooth(); void bootOptionsFilter(QString opt, bool firstIn = true); // 模块跳转 void moveEvent(QMoveEvent *event); void resizeEvent(QResizeEvent *event);