Fix some problems

This commit is contained in:
cutefishd 2021-03-16 18:20:04 +08:00
parent f22aabacc1
commit e84cd4d438
9 changed files with 25 additions and 25 deletions

View file

@ -1,7 +1,7 @@
import QtQuick 2.12 import QtQuick 2.12
import QtQuick.Controls 2.12 import QtQuick.Controls 2.12
import Qt.labs.platform 1.0 import Qt.labs.platform 1.0
import Cyber.Dock 1.0 import Cutefish.Dock 1.0
DockItem { DockItem {
id: appItem id: appItem
@ -12,7 +12,7 @@ DockItem {
isActive: model.isActive isActive: model.isActive
popupText: model.visibleName popupText: model.visibleName
enableActivateDot: windowCount !== 0 enableActivateDot: windowCount !== 0
draggable: model.appId === "cyber-launcher" ? false : true draggable: model.appId === "cutefish-launcher" ? false : true
dragItemIndex: index dragItemIndex: index
onWindowCountChanged: { onWindowCountChanged: {
@ -23,7 +23,7 @@ DockItem {
onPositionChanged: updateGeometry() onPositionChanged: updateGeometry()
onPressed: updateGeometry() onPressed: updateGeometry()
onClicked: appModel.clicked(model.appId) onClicked: appModel.clicked(model.appId)
onRightClicked: if (model.appId !== "cyber-launcher") contextMenu.open() onRightClicked: if (model.appId !== "cutefish-launcher") contextMenu.open()
dropArea.onEntered: { dropArea.onEntered: {
if (drag.source) if (drag.source)

View file

@ -4,9 +4,9 @@ import QtQuick.Window 2.12
import QtQuick.Layouts 1.12 import QtQuick.Layouts 1.12
import QtGraphicalEffects 1.0 import QtGraphicalEffects 1.0
import Cyber.Dock 1.0 import Cutefish.Dock 1.0
import MeuiKit 1.0 as Meui import MeuiKit 1.0 as Meui
import Cyber.Accounts 1.0 as Accounts import Cutefish.Accounts 1.0 as Accounts
ControlCenterDialog { ControlCenterDialog {
id: control id: control
@ -136,7 +136,7 @@ ControlCenterDialog {
source: "qrc:/svg/" + (Meui.Theme.darkMode ? "dark/" : "light/") + "settings.svg" source: "qrc:/svg/" + (Meui.Theme.darkMode ? "dark/" : "light/") + "settings.svg"
onLeftButtonClicked: { onLeftButtonClicked: {
control.visible = false 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" source: "qrc:/svg/" + (Meui.Theme.darkMode ? "dark/" : "light/") + "system-shutdown-symbolic.svg"
onLeftButtonClicked: { onLeftButtonClicked: {
control.visible = false control.visible = false
process.startDetached("cyber-shutdown") process.startDetached("cutefish-shutdown")
} }
} }
} }
@ -322,7 +322,7 @@ ControlCenterDialog {
width: batteryLayout.implicitWidth + Meui.Units.largeSpacing width: batteryLayout.implicitWidth + Meui.Units.largeSpacing
height: batteryLayout.implicitHeight + Meui.Units.largeSpacing height: batteryLayout.implicitHeight + Meui.Units.largeSpacing
onClicked: process.startDetached("cyber-settings", ["-m", "battery"]) onClicked: process.startDetached("cutefish-settings", ["-m", "battery"])
RowLayout { RowLayout {
id: batteryLayout id: batteryLayout

View file

@ -3,7 +3,7 @@ import QtQuick.Controls 2.12
import QtQuick.Layouts 1.12 import QtQuick.Layouts 1.12
import QtGraphicalEffects 1.0 import QtGraphicalEffects 1.0
import Cyber.Dock 1.0 import Cutefish.Dock 1.0
import MeuiKit 1.0 as Meui import MeuiKit 1.0 as Meui
StandardItem { StandardItem {

View file

@ -1,7 +1,7 @@
import QtQuick 2.12 import QtQuick 2.12
import QtQuick.Controls 2.12 import QtQuick.Controls 2.12
import QtGraphicalEffects 1.0 import QtGraphicalEffects 1.0
import Cyber.Dock 1.0 import Cutefish.Dock 1.0
import MeuiKit 1.0 as Meui import MeuiKit 1.0 as Meui
Item { Item {

View file

@ -3,7 +3,7 @@ import QtQuick.Layouts 1.12
import QtQuick.Controls 2.12 import QtQuick.Controls 2.12
import QtGraphicalEffects 1.0 import QtGraphicalEffects 1.0
import MeuiKit 1.0 as Meui import MeuiKit 1.0 as Meui
import Cyber.Mpris 1.0 import Cutefish.Mpris 1.0
Item { Item {
id: control id: control

View file

@ -4,7 +4,7 @@ import QtQuick.Layouts 1.12
import QtGraphicalEffects 1.0 import QtGraphicalEffects 1.0
import MeuiKit 1.0 as Meui import MeuiKit 1.0 as Meui
import Cyber.Dock 1.0 import Cutefish.Dock 1.0
Item { Item {
id: control id: control

View file

@ -4,7 +4,7 @@ import QtQuick.Layouts 1.12
import QtGraphicalEffects 1.0 import QtGraphicalEffects 1.0
import Cyber.NetworkManagement 1.0 as NM import Cyber.NetworkManagement 1.0 as NM
import Cyber.Dock 1.0 import Cutefish.Dock 1.0
import MeuiKit 1.0 as Meui import MeuiKit 1.0 as Meui
Item { Item {

View file

@ -268,13 +268,13 @@ int ApplicationModel::indexOf(const QString &id)
void ApplicationModel::initPinnedApplications() void ApplicationModel::initPinnedApplications()
{ {
QSettings settings(QSettings::UserScope, "cyberos", "dock_pinned"); QSettings settings(QSettings::UserScope, "cutefishos", "dock_pinned");
QStringList groups = settings.childGroups(); QStringList groups = settings.childGroups();
// Launcher // Launcher
ApplicationItem *item = new ApplicationItem; ApplicationItem *item = new ApplicationItem;
item->id = "cyber-launcher"; item->id = "cutefish-launcher";
item->exec = "cyber-launcher"; item->exec = "cutefish-launcher";
item->iconName = "qrc:/svg/launcher.svg"; item->iconName = "qrc:/svg/launcher.svg";
item->visibleName = tr("Launcher"); item->visibleName = tr("Launcher");
m_appItems.append(item); m_appItems.append(item);
@ -328,7 +328,7 @@ void ApplicationModel::initPinnedApplications()
void ApplicationModel::savePinAndUnPinList() void ApplicationModel::savePinAndUnPinList()
{ {
QSettings settings(QSettings::UserScope, "cyberos", "dock_pinned"); QSettings settings(QSettings::UserScope, "cutefishos", "dock_pinned");
settings.clear(); settings.clear();
int index = 0; int index = 0;

View file

@ -38,15 +38,15 @@ int main(int argc, char *argv[])
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication app(argc, argv); QApplication app(argc, argv);
qmlRegisterType<DockSettings>("Cyber.Dock", 1, 0, "DockSettings"); qmlRegisterType<DockSettings>("Cutefish.Dock", 1, 0, "DockSettings");
qmlRegisterType<VolumeManager>("Cyber.Dock", 1, 0, "Volume"); qmlRegisterType<VolumeManager>("Cutefish.Dock", 1, 0, "Volume");
qmlRegisterType<Battery>("Cyber.Dock", 1, 0, "Battery"); qmlRegisterType<Battery>("Cutefish.Dock", 1, 0, "Battery");
qmlRegisterType<Brightness>("Cyber.Dock", 1, 0, "Brightness"); qmlRegisterType<Brightness>("Cutefish.Dock", 1, 0, "Brightness");
qmlRegisterType<ControlCenterDialog>("Cyber.Dock", 1, 0, "ControlCenterDialog"); qmlRegisterType<ControlCenterDialog>("Cutefish.Dock", 1, 0, "ControlCenterDialog");
qmlRegisterType<StatusNotifierModel>("Cyber.Dock", 1, 0, "StatusNotifierModel"); qmlRegisterType<StatusNotifierModel>("Cutefish.Dock", 1, 0, "StatusNotifierModel");
qmlRegisterType<Appearance>("Cyber.Dock", 1, 0, "Appearance"); qmlRegisterType<Appearance>("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)) { if (QFile::exists(qmFilePath)) {
QTranslator *translator = new QTranslator(QApplication::instance()); QTranslator *translator = new QTranslator(QApplication::instance());
if (translator->load(qmFilePath)) { if (translator->load(qmFilePath)) {