feat: 转移玲珑包后缀提供配置功能实现到启动器
玲珑包后缀提供配置功能的实现转移到启动器 Log: Influence: 默认隐藏后缀,开启,玲珑应用则显示,否则,隐藏. Bug: https://pms.uniontech.com/bug-view-154585.html Change-Id: I50f727eec1d815f39206780ae76ef774d17e5023
This commit is contained in:
parent
d61eacaabb
commit
b66fc78553
@ -241,16 +241,6 @@
|
|||||||
"description": "Launcher display mode.",
|
"description": "Launcher display mode.",
|
||||||
"permissions": "readwrite",
|
"permissions": "readwrite",
|
||||||
"visibility": "private"
|
"visibility": "private"
|
||||||
},
|
|
||||||
"MagicaVoxelApp_Hide_SuffixName": {
|
|
||||||
"value": false,
|
|
||||||
"serial": 0,
|
|
||||||
"flags": [],
|
|
||||||
"name": "MagicaVoxelApp_Hide_SuffixName",
|
|
||||||
"name[zh_CN]": "玲珑包后缀提供配置,默认隐藏; 开启, 玲珑应用显示后缀, 关闭, 后缀隐藏",
|
|
||||||
"description": "***",
|
|
||||||
"permissions": "readwrite",
|
|
||||||
"visibility": "private"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,6 @@ const QString keyAppsUseProxy = "Apps_Use_Proxy";
|
|||||||
const QString keyAppsDisableScaling = "Apps_Disable_Scaling";
|
const QString keyAppsDisableScaling = "Apps_Disable_Scaling";
|
||||||
const QString keyAppsHidden = "Apps_Hidden";
|
const QString keyAppsHidden = "Apps_Hidden";
|
||||||
const QString keyPackageNameSearch = "Search_Package_Name";
|
const QString keyPackageNameSearch = "Search_Package_Name";
|
||||||
const QString keySuffixHidden = "MagicaVoxelApp_Hide_SuffixName";
|
|
||||||
|
|
||||||
// 应用配置
|
// 应用配置
|
||||||
const QString lastoreDataDir = "/var/lib/lastore";
|
const QString lastoreDataDir = "/var/lib/lastore";
|
||||||
|
@ -34,7 +34,6 @@ DBusAdaptorLauncher::DBusAdaptorLauncher(QObject *parent)
|
|||||||
connect(launcher, &Launcher::uninstallSuccess, this, &DBusAdaptorLauncher::UninstallSuccess);
|
connect(launcher, &Launcher::uninstallSuccess, this, &DBusAdaptorLauncher::UninstallSuccess);
|
||||||
connect(launcher, &Launcher::displayModeChanged, this, &DBusAdaptorLauncher::DisplayModeChanged);
|
connect(launcher, &Launcher::displayModeChanged, this, &DBusAdaptorLauncher::DisplayModeChanged);
|
||||||
connect(launcher, &Launcher::fullScreenChanged, this, &DBusAdaptorLauncher::FullscreenChanged);
|
connect(launcher, &Launcher::fullScreenChanged, this, &DBusAdaptorLauncher::FullscreenChanged);
|
||||||
connect(launcher, &Launcher::appSuffixChanged, this, &DBusAdaptorLauncher::AppSuffixChanged);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -147,7 +147,6 @@ Q_SIGNALS: // SIGNALS
|
|||||||
void DisplayModeChanged(int mode);
|
void DisplayModeChanged(int mode);
|
||||||
// 该接口与1050 dbus服务接口签名保持一致
|
// 该接口与1050 dbus服务接口签名保持一致
|
||||||
void FullscreenChanged();
|
void FullscreenChanged();
|
||||||
void AppSuffixChanged();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -431,13 +431,6 @@ void Launcher::handleFSWatcherEvents(QDBusMessage msg)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Launcher::onAppSuffixNameChanged(bool)
|
|
||||||
{
|
|
||||||
initItems();
|
|
||||||
|
|
||||||
Q_EMIT appSuffixChanged();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Launcher::onHandleUninstall(const QDBusMessage &message)
|
void Launcher::onHandleUninstall(const QDBusMessage &message)
|
||||||
{
|
{
|
||||||
QList<QVariant> arguments = message.arguments();
|
QList<QVariant> arguments = message.arguments();
|
||||||
@ -469,7 +462,6 @@ void Launcher::initSettings()
|
|||||||
});
|
});
|
||||||
connect(SETTING, &LauncherSettings::fullscreenChanged, this, &Launcher::fullScreenChanged);
|
connect(SETTING, &LauncherSettings::fullscreenChanged, this, &Launcher::fullScreenChanged);
|
||||||
connect(SETTING, &LauncherSettings::hiddenAppsChanged, this, &Launcher::handleAppHiddenChanged);
|
connect(SETTING, &LauncherSettings::hiddenAppsChanged, this, &Launcher::handleAppHiddenChanged);
|
||||||
connect(SETTING, &LauncherSettings::appSuffixNameChanged, this, &Launcher::onAppSuffixNameChanged);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1198,10 +1190,6 @@ Item Launcher::NewItemWithDesktopInfo(DesktopInfo &info)
|
|||||||
item.info.icon = info.getIcon().c_str();
|
item.info.icon = info.getIcon().c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 玲珑应用添加后缀, 默认隐藏
|
|
||||||
if (SETTING->getMagicaVoxelSuffixHidden() && appFileName.startsWith("/persistent/linglong/entries/share/applications/"))
|
|
||||||
item.info.name = QString("%1(%2)").arg(appName).arg(tr("Linglong"));
|
|
||||||
|
|
||||||
xDeepinCategory = xDeepinCategory.toLower();
|
xDeepinCategory = xDeepinCategory.toLower();
|
||||||
|
|
||||||
for (auto &keyWord : info.getKeywords()) {
|
for (auto &keyWord : info.getKeywords()) {
|
||||||
|
@ -114,13 +114,11 @@ Q_SIGNALS:
|
|||||||
|
|
||||||
void displayModeChanged(int mode);
|
void displayModeChanged(int mode);
|
||||||
void fullScreenChanged(bool isFull);
|
void fullScreenChanged(bool isFull);
|
||||||
void appSuffixChanged();
|
|
||||||
|
|
||||||
void uninstallStatusChanged(const bool status);
|
void uninstallStatusChanged(const bool status);
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void handleFSWatcherEvents(QDBusMessage msg);
|
void handleFSWatcherEvents(QDBusMessage msg);
|
||||||
void onAppSuffixNameChanged(bool hidden);
|
|
||||||
void onCheckDesktopFile(const QString &filePath, int type = 0);
|
void onCheckDesktopFile(const QString &filePath, int type = 0);
|
||||||
void onNewAppLaunched(const QString &filePath);
|
void onNewAppLaunched(const QString &filePath);
|
||||||
void onHandleUninstall(const QDBusMessage &message);
|
void onHandleUninstall(const QDBusMessage &message);
|
||||||
|
@ -42,8 +42,6 @@ LauncherSettings::LauncherSettings(QObject *parent)
|
|||||||
Q_EMIT fullscreenChanged(m_dconfig->value(key).toBool());
|
Q_EMIT fullscreenChanged(m_dconfig->value(key).toBool());
|
||||||
} else if (key == keyAppsHidden) {
|
} else if (key == keyAppsHidden) {
|
||||||
Q_EMIT hiddenAppsChanged();
|
Q_EMIT hiddenAppsChanged();
|
||||||
} else if (key == keySuffixHidden) {
|
|
||||||
Q_EMIT appSuffixNameChanged(m_dconfig->value(key).toBool());
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -165,18 +163,3 @@ QVector<QString> LauncherSettings::getHiddenApps()
|
|||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LauncherSettings::getMagicaVoxelSuffixHidden() const
|
|
||||||
{
|
|
||||||
return m_dconfig ? m_dconfig->value(keySuffixHidden, false).toBool() : false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void LauncherSettings::setMagicaVoxelSuffixHidden(bool state)
|
|
||||||
{
|
|
||||||
if (!m_dconfig) {
|
|
||||||
qInfo() << Q_FUNC_INFO << "set magicaVoxel suffix failed!";
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
m_dconfig->setValue(keySuffixHidden, state);
|
|
||||||
}
|
|
||||||
|
@ -64,14 +64,10 @@ public:
|
|||||||
|
|
||||||
QVector<QString> getHiddenApps();
|
QVector<QString> getHiddenApps();
|
||||||
|
|
||||||
bool getMagicaVoxelSuffixHidden() const;
|
|
||||||
void setMagicaVoxelSuffixHidden(bool hidden);
|
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void displayModeChanged(QString mode);
|
void displayModeChanged(QString mode);
|
||||||
void fullscreenChanged(bool isFull);
|
void fullscreenChanged(bool isFull);
|
||||||
void hiddenAppsChanged();
|
void hiddenAppsChanged();
|
||||||
void appSuffixNameChanged(bool);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // LAUNCHERSETTINGS_H
|
#endif // LAUNCHERSETTINGS_H
|
||||||
|
Loading…
Reference in New Issue
Block a user