From e84cd4d43897fdb6fc757f79aaace6d96654d1fa Mon Sep 17 00:00:00 2001 From: cutefishd Date: Tue, 16 Mar 2021 18:20:04 +0800 Subject: [PATCH] Fix some problems --- qml/AppItem.qml | 6 +++--- qml/ControlCenter.qml | 10 +++++----- qml/ControlCenterItem.qml | 2 +- qml/DockItem.qml | 2 +- qml/MprisController.qml | 2 +- qml/StandardItem.qml | 2 +- qml/main.qml | 2 +- src/applicationmodel.cpp | 8 ++++---- src/main.cpp | 16 ++++++++-------- 9 files changed, 25 insertions(+), 25 deletions(-) diff --git a/qml/AppItem.qml b/qml/AppItem.qml index 6363df0..7a6be50 100644 --- a/qml/AppItem.qml +++ b/qml/AppItem.qml @@ -1,7 +1,7 @@ import QtQuick 2.12 import QtQuick.Controls 2.12 import Qt.labs.platform 1.0 -import Cyber.Dock 1.0 +import Cutefish.Dock 1.0 DockItem { id: appItem @@ -12,7 +12,7 @@ DockItem { isActive: model.isActive popupText: model.visibleName enableActivateDot: windowCount !== 0 - draggable: model.appId === "cyber-launcher" ? false : true + draggable: model.appId === "cutefish-launcher" ? false : true dragItemIndex: index onWindowCountChanged: { @@ -23,7 +23,7 @@ DockItem { onPositionChanged: updateGeometry() onPressed: updateGeometry() onClicked: appModel.clicked(model.appId) - onRightClicked: if (model.appId !== "cyber-launcher") contextMenu.open() + onRightClicked: if (model.appId !== "cutefish-launcher") contextMenu.open() dropArea.onEntered: { if (drag.source) diff --git a/qml/ControlCenter.qml b/qml/ControlCenter.qml index a2a4f9f..36b6426 100644 --- a/qml/ControlCenter.qml +++ b/qml/ControlCenter.qml @@ -4,9 +4,9 @@ import QtQuick.Window 2.12 import QtQuick.Layouts 1.12 import QtGraphicalEffects 1.0 -import Cyber.Dock 1.0 +import Cutefish.Dock 1.0 import MeuiKit 1.0 as Meui -import Cyber.Accounts 1.0 as Accounts +import Cutefish.Accounts 1.0 as Accounts ControlCenterDialog { id: control @@ -136,7 +136,7 @@ ControlCenterDialog { source: "qrc:/svg/" + (Meui.Theme.darkMode ? "dark/" : "light/") + "settings.svg" onLeftButtonClicked: { control.visible = false - process.startDetached("cyber-settings") + process.startDetached("cutefish-settings") } } @@ -148,7 +148,7 @@ ControlCenterDialog { source: "qrc:/svg/" + (Meui.Theme.darkMode ? "dark/" : "light/") + "system-shutdown-symbolic.svg" onLeftButtonClicked: { control.visible = false - process.startDetached("cyber-shutdown") + process.startDetached("cutefish-shutdown") } } } @@ -322,7 +322,7 @@ ControlCenterDialog { width: batteryLayout.implicitWidth + Meui.Units.largeSpacing height: batteryLayout.implicitHeight + Meui.Units.largeSpacing - onClicked: process.startDetached("cyber-settings", ["-m", "battery"]) + onClicked: process.startDetached("cutefish-settings", ["-m", "battery"]) RowLayout { id: batteryLayout diff --git a/qml/ControlCenterItem.qml b/qml/ControlCenterItem.qml index bb045bd..706ac31 100644 --- a/qml/ControlCenterItem.qml +++ b/qml/ControlCenterItem.qml @@ -3,7 +3,7 @@ import QtQuick.Controls 2.12 import QtQuick.Layouts 1.12 import QtGraphicalEffects 1.0 -import Cyber.Dock 1.0 +import Cutefish.Dock 1.0 import MeuiKit 1.0 as Meui StandardItem { diff --git a/qml/DockItem.qml b/qml/DockItem.qml index baf7720..7b4f5a4 100644 --- a/qml/DockItem.qml +++ b/qml/DockItem.qml @@ -1,7 +1,7 @@ import QtQuick 2.12 import QtQuick.Controls 2.12 import QtGraphicalEffects 1.0 -import Cyber.Dock 1.0 +import Cutefish.Dock 1.0 import MeuiKit 1.0 as Meui Item { diff --git a/qml/MprisController.qml b/qml/MprisController.qml index 2cfe19e..6e11787 100644 --- a/qml/MprisController.qml +++ b/qml/MprisController.qml @@ -3,7 +3,7 @@ import QtQuick.Layouts 1.12 import QtQuick.Controls 2.12 import QtGraphicalEffects 1.0 import MeuiKit 1.0 as Meui -import Cyber.Mpris 1.0 +import Cutefish.Mpris 1.0 Item { id: control diff --git a/qml/StandardItem.qml b/qml/StandardItem.qml index 4b394e6..b11dcba 100644 --- a/qml/StandardItem.qml +++ b/qml/StandardItem.qml @@ -4,7 +4,7 @@ import QtQuick.Layouts 1.12 import QtGraphicalEffects 1.0 import MeuiKit 1.0 as Meui -import Cyber.Dock 1.0 +import Cutefish.Dock 1.0 Item { id: control diff --git a/qml/main.qml b/qml/main.qml index 1c45cd4..9927c9c 100644 --- a/qml/main.qml +++ b/qml/main.qml @@ -4,7 +4,7 @@ import QtQuick.Layouts 1.12 import QtGraphicalEffects 1.0 import Cyber.NetworkManagement 1.0 as NM -import Cyber.Dock 1.0 +import Cutefish.Dock 1.0 import MeuiKit 1.0 as Meui Item { diff --git a/src/applicationmodel.cpp b/src/applicationmodel.cpp index 3e6489b..18c776e 100644 --- a/src/applicationmodel.cpp +++ b/src/applicationmodel.cpp @@ -268,13 +268,13 @@ int ApplicationModel::indexOf(const QString &id) void ApplicationModel::initPinnedApplications() { - QSettings settings(QSettings::UserScope, "cyberos", "dock_pinned"); + QSettings settings(QSettings::UserScope, "cutefishos", "dock_pinned"); QStringList groups = settings.childGroups(); // Launcher ApplicationItem *item = new ApplicationItem; - item->id = "cyber-launcher"; - item->exec = "cyber-launcher"; + item->id = "cutefish-launcher"; + item->exec = "cutefish-launcher"; item->iconName = "qrc:/svg/launcher.svg"; item->visibleName = tr("Launcher"); m_appItems.append(item); @@ -328,7 +328,7 @@ void ApplicationModel::initPinnedApplications() void ApplicationModel::savePinAndUnPinList() { - QSettings settings(QSettings::UserScope, "cyberos", "dock_pinned"); + QSettings settings(QSettings::UserScope, "cutefishos", "dock_pinned"); settings.clear(); int index = 0; diff --git a/src/main.cpp b/src/main.cpp index 1bdb414..3d35b51 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -38,15 +38,15 @@ int main(int argc, char *argv[]) QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QApplication app(argc, argv); - qmlRegisterType("Cyber.Dock", 1, 0, "DockSettings"); - qmlRegisterType("Cyber.Dock", 1, 0, "Volume"); - qmlRegisterType("Cyber.Dock", 1, 0, "Battery"); - qmlRegisterType("Cyber.Dock", 1, 0, "Brightness"); - qmlRegisterType("Cyber.Dock", 1, 0, "ControlCenterDialog"); - qmlRegisterType("Cyber.Dock", 1, 0, "StatusNotifierModel"); - qmlRegisterType("Cyber.Dock", 1, 0, "Appearance"); + qmlRegisterType("Cutefish.Dock", 1, 0, "DockSettings"); + qmlRegisterType("Cutefish.Dock", 1, 0, "Volume"); + qmlRegisterType("Cutefish.Dock", 1, 0, "Battery"); + qmlRegisterType("Cutefish.Dock", 1, 0, "Brightness"); + qmlRegisterType("Cutefish.Dock", 1, 0, "ControlCenterDialog"); + qmlRegisterType("Cutefish.Dock", 1, 0, "StatusNotifierModel"); + qmlRegisterType("Cutefish.Dock", 1, 0, "Appearance"); - QString qmFilePath = QString("%1/%2.qm").arg("/usr/share/cyber-dock/translations/").arg(QLocale::system().name()); + QString qmFilePath = QString("%1/%2.qm").arg("/usr/share/cutefish-dock/translations/").arg(QLocale::system().name()); if (QFile::exists(qmFilePath)) { QTranslator *translator = new QTranslator(QApplication::instance()); if (translator->load(qmFilePath)) {