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.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)

View file

@ -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

View file

@ -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 {

View file

@ -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 {

View file

@ -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

View file

@ -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

View file

@ -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 {

View file

@ -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;

View file

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