Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

移除往设置面板添加设置项的接口 #1420

Closed
wants to merge 33 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
0a1b87e
feat: Thumbnail creation optimization
Kakueeen Aug 11, 2023
3a4f98a
fix: [disk] encrypted disk cannot be removed
itsXuSt Aug 14, 2023
915933e
fix: dtk upgraded, ci compilation not working.
liyigang1 Aug 14, 2023
f3a6df1
fix: [workspace]dde-file-manager list mode enters a directory and the…
liyigang1 Aug 14, 2023
ee1b6b4
fix: [fileinfo]After renaming the shortcut application icon name, the…
liyigang1 Aug 14, 2023
d56e7b7
fix: update the deamon logs to adhere the log safe rules check
max-lvs Aug 14, 2023
3ac9edc
fix: [thumbnail] File thumbnails are not displayed in mounted directo…
Kakueeen Aug 14, 2023
fc91c2e
fix: The completer view does not disappear after enter the directory
Kakueeen Aug 15, 2023
757592c
fix: [io]Open wps file error inside smb when wps is not installed.
liyigang1 Aug 14, 2023
00c0f69
fix: [io]Cell phone MTP internal file copy failed
liyigang1 Aug 14, 2023
a565faf
chore: [smb] enable smb mount in root mode.
itsXuSt Aug 15, 2023
4027e5c
fix: [property-dialog] adjust property dialog UI
GongHeng2017 Aug 15, 2023
736702b
fix: [search] No results after multiple quick search
Kakueeen Aug 17, 2023
fb9d809
fix: [Recent] recentfile without monitor
pppanghu77 Aug 16, 2023
24d8606
fix: [menu] fix issue of search menu
Kakueeen Aug 16, 2023
03c87cd
fix: The wallpaper size does not match the window
Clauszy Aug 16, 2023
2d15303
feat: [cifs] version probe and host parse.
itsXuSt Aug 15, 2023
b850951
fix: [dock] encrypted disks missing.
itsXuSt Aug 18, 2023
5406982
fix: [property] value not fallback when chmod failed.
itsXuSt Aug 18, 2023
58ccb11
fix: [io]Slow display of folder information when multitasking copying…
liyigang1 Aug 17, 2023
1f8c86e
fix: [property-dialog] the device name show error.
GongHeng2017 Aug 16, 2023
017ed78
chore: update the baseline version to 6.0.28
max-lvs Aug 18, 2023
5916a1e
fix: [property] add translate of property
GongHeng2017 Aug 18, 2023
201608f
fix: [vault] cursor not show wait state.
GongHeng2017 Aug 18, 2023
688f753
fix: [fileoperation]open symlink dir issue
Lighto-Ku Aug 18, 2023
55fa5c4
feat: [audit] add erase log
Johnson-zs Aug 21, 2023
a6f57f5
fix: [property] adjust UI
GongHeng2017 Aug 21, 2023
40dff2c
feat: [dconf] add `org.deepin.dde.file-manager.plugins.json`
Johnson-zs Jul 18, 2023
153d765
feat: [sidebar/settings] custom settings can be added.
itsXuSt Aug 21, 2023
ca44e6c
fix: [cifs] daemon crash due to lib name error.
itsXuSt Aug 25, 2023
03cb9ce
feat: [computer] support hide user dirs.
itsXuSt Aug 28, 2023
4f3acc4
feat: [setting] reorder the setting items.
itsXuSt Aug 28, 2023
f186e2f
chore: [sidebar] remove the 3rd setting entry.
itsXuSt Sep 11, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions assets/configs/org.deepin.dde.file-manager.computer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"magic":"dsg.config.meta",
"version":"1.0",
"contents":{
"hideMyDirectories":{
"value": false,
"serial":0,
"flags":[],
"name":"Hide My Directories on the Computer page",
"name[zh_CN]":"计算机工作区隐藏我的目录",
"description[zh_CN]":"计算机工作区隐藏我的目录",
"description":"Hide My Directories on the Computer page",
"permissions":"readwrite",
"visibility":"public"
},
"hide3rdEntries":{
"value": false,
"serial":0,
"flags":[],
"name":"Hide 3rd party entries on the Computer page",
"name[zh_CN]":"计算机工作区隐藏第三方插件",
"description[zh_CN]":"计算机工作区隐藏第三方插件",
"description":"Hide 3rd party entries on the Computer page",
"permissions":"readwrite",
"visibility":"public"
}
}
}
69 changes: 69 additions & 0 deletions assets/configs/org.deepin.dde.file-manager.plugins.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"magic": "dsg.config.meta",
"version": "1.0",
"contents": {
"filemanager.blackList": {
"value": [],
"serial": 0,
"flags": [],
"name": "dde-file-manager plugin blacklist",
"name[zh_CN]": "文件管理器插件黑名单列表",
"description[zh_CN]": "文件管理器插件黑名单列表,黑名单中的插件将无法被启用",
"description": "List of plugins disabled by the dde-file-manager, blacklisted plugins will not be enabled",
"permissions": "readwrite",
"visibility": "public"
},
"desktop.blackList": {
"value": [],
"serial": 0,
"flags": [],
"name": "dde-desktop plugins blacklist",
"name[zh_CN]": "桌面插件黑名单列表",
"description[zh_CN]": "桌面插件黑名单列表,黑名单中的插件将无法被启用",
"description": "List of plugins disabled by the dde-desktop, plugins in the blacklist will not be able to be enabled",
"permissions": "readwrite",
"visibility": "public"
},
"server.blackList": {
"value": [],
"serial": 0,
"flags": [],
"name": "dde-file-manager-server plugins blacklist",
"name[zh_CN]": "文件管理器用户服务插件黑名单列表",
"description[zh_CN]": "文件管理器用户服务插件黑名单列表,黑名单中的插件将无法被启用",
"description": "List of plugins disabled by the dde-file-manager-server, plugins in the blacklist will not be able to be enabled",
"permissions": "readwrite",
"visibility": "public"
},
"daemon.blackList": {
"value": [],
"serial": 0,
"flags": [],
"name": "dde-file-manager-daemon plugins blacklist",
"name[zh_CN]": "文件管理器守护进程插件黑名单列表",
"description[zh_CN]": "文件管理器守护进程插件黑名单列表,黑名单中的插件将无法被启用",
"description": "List of plugins disabled by the dde-file-manager-daemon, plugins in the blacklist will not be able to be enabled",
"permissions": "readwrite",
"visibility": "public"
},
"filedialog.blackList": {
"value": ["dfmplugin-burn",
"dfmplugin-dirshare",
"dfmplugin-myshares",
"dfmplugin-propertydialog",
"dfmplugin-trashcore",
"dfmplugin-trash",
"dfmplugin-filepreview",
"dfmplugin-vault",
"dfmplugin-phone" ],
"serial": 0,
"flags": [],
"name": "dde-file-dialog plugins blacklist",
"name[zh_CN]": "文件管理器文件选择对话框插件黑名单列表",
"description[zh_CN]": "文件管理器文件选择对话框插件黑名单列表,黑名单中的插件将无法被启用",
"description": "List of plugins disabled by the dde-file-dialog, plugins in the blacklist will not be able to be enabled",
"permissions": "readwrite",
"visibility": "public"
}
}
}
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
dde-file-manager (6.0.28) unstable; urgency=medium

* update file manager baseline version to V6.0.28

-- lvwujun <[email protected]> Fri, 18 Aug 2023 14:29:09 +0800

dde-file-manager (6.0.27) unstable; urgency=medium

* update file manager baseline version to V6.0.27 that fixed some bugs
Expand Down
30 changes: 30 additions & 0 deletions include/dfm-base/settingdialog/customsettingitemregister.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

#ifndef CUSTOMSETTINGITEMREGISTER_H
#define CUSTOMSETTINGITEMREGISTER_H

#include <QMap>
#include <QPair>

class QWidget;
class QObject;

typedef QPair<QWidget *, QWidget *> (*CustomSettingItemCreator)(QObject *);

namespace dfmbase {
class CustomSettingItemRegister
{
public:
static CustomSettingItemRegister *instance();
bool registCustomSettingItemType(const QString &type, const CustomSettingItemCreator &creator);
const QMap<QString, CustomSettingItemCreator> &getCreators() const;

private:
CustomSettingItemRegister();
QMap<QString, CustomSettingItemCreator> creators;
};
}

#endif // CUSTOMSETTINGITEMREGISTER_H
72 changes: 72 additions & 0 deletions include/dfm-base/settingdialog/settingjsongenerator.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

#ifndef SETTINGJSONGENERATOR_H
#define SETTINGJSONGENERATOR_H

#include <QVariantMap>

/*
* the root group:
* {
* "groups": [(top level group)]
* }
*
* a top level group:
* {
* "key": (string),
* "name": (string),
* "groups": [(config group)]
* }
*
* a config group:
* {
* "key": (string),
* "name": (string),
* "options": [(config item)]
* }
*
* config item: // option item
* {
* "key": (string),
* "text": (string),
* "type": (string),
* "default": (variant),
* "hide": (bool),
* "custom_info": (variant)
* }
* */

namespace dfmbase {

class SettingJsonGenerator
{
public:
static SettingJsonGenerator *instance();

QByteArray genSettingJson();
bool addGroup(const QString &key, const QString &name);
bool addConfig(const QString &key, const QVariantMap &config);
bool addCheckBoxConfig(const QString &key, const QString &text, bool defaultVal = true);
bool addComboboxConfig(const QString &key, const QString &name, const QStringList &options, int defaultVal = 0);
bool addComboboxConfig(const QString &key, const QString &name, const QVariantMap &options, QVariant defaultVal = QVariant());

protected:
SettingJsonGenerator();

void mergeGroups();
QJsonObject constructTopGroup(const QString &key);
QJsonObject constructConfigGroup(const QString &key);
QJsonObject constructConfig(const QString &key);

private:
QMap<QString, QString> topGroups;
QMap<QString, QString> tmpTopGroups;
QMap<QString, QString> configGroups;
QMap<QString, QString> tmpConfigGroups;
QMap<QString, QVariantMap> configs;
};

}
#endif // SETTINGJSONGENERATOR_H
10 changes: 9 additions & 1 deletion src/apps/dde-desktop/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include <dfm-base/base/configs/dconfig/dconfigmanager.h>
#include <dfm-base/utils/sysinfoutils.h>
#include <dfm-base/base/configs/dconfig/dconfigmanager.h>

#include <dfm-framework/dpf.h>

Expand Down Expand Up @@ -52,8 +53,14 @@ static const char *const kLibCore = "libddplugin-core.so";
static constexpr int kMemoryThreshold { 80 * 1024 }; // 80MB
static constexpr int kTimerInterval { 60 * 1000 }; // 1 min

DFMBASE_USE_NAMESPACE

static bool pluginsLoad()
{
QString msg;
if (!DConfigManager::instance()->addConfig(kPluginsDConfName, &msg))
qWarning() << "Load plugins but dconfig failed: " << msg;

QStringList pluginsDirs;
#ifdef QT_DEBUG
const QString &pluginsDir { DFM_BUILD_PLUGIN_DIR };
Expand All @@ -77,7 +84,8 @@ static bool pluginsLoad()
"dfmplugin-tag", "dfmplugin-burn", "dfmplugin-dirshare", "dfmplugin-emblem",
"dfmplugin-filepreview" };

DPF_NAMESPACE::LifeCycle::initialize({ kDesktopPluginInterface, kCommonPluginInterface }, pluginsDirs, {}, kLazyLoadPluginNames);
QStringList blackNames { DConfigManager::instance()->value(kPluginsDConfName, "desktop.blackList").toStringList() };
DPF_NAMESPACE::LifeCycle::initialize({ kDesktopPluginInterface, kCommonPluginInterface }, pluginsDirs, blackNames, kLazyLoadPluginNames);

qInfo() << "Depend library paths:" << DApplication::libraryPaths();
qInfo() << "Load plugin paths: " << dpf::LifeCycle::pluginPaths();
Expand Down
20 changes: 8 additions & 12 deletions src/apps/dde-file-dialog-wayland/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@
#include <QTextCodec>
#include <QIcon>

#include <dfm-base/base/configs/dconfig/dconfigmanager.h>

#include <dfm-framework/dpf.h>

#include <signal.h>

DGUI_USE_NAMESPACE
DWIDGET_USE_NAMESPACE
DFMBASE_USE_NAMESPACE

#ifdef DFM_ORGANIZATION_NAME
# define ORGANIZATION_NAME DFM_ORGANIZATION_NAME
Expand Down Expand Up @@ -67,17 +70,10 @@ static bool singlePluginLoad(const QString &pluginName, const QString &libName)

static bool pluginsLoad()
{
static const QStringList kBlackNameList {
"dfmplugin-burn",
"dfmplugin-dirshare",
"dfmplugin-myshares",
"dfmplugin-propertydialog",
"dfmplugin-trashcore",
"dfmplugin-trash",
"dfmplugin-filepreview",
"dfmplugin-vault",
"dfmplugin-phone" // TODO(zhangs): use white list
};
QString msg;
if (!DConfigManager::instance()->addConfig(kPluginsDConfName, &msg))
qWarning() << "Load plugins but dconfig failed: " << msg;
QStringList blackNames { DConfigManager::instance()->value(kPluginsDConfName, "filedialog.blackList").toStringList() };

static const QStringList kLazyLoadPluginNames {
"dfmplugin-emblem",
Expand Down Expand Up @@ -105,7 +101,7 @@ static bool pluginsLoad()
DPF_NAMESPACE::LifeCycle::initialize({ kDialogPluginInterface,
kFmPluginInterface,
kCommonPluginInterface },
pluginsDirs, kBlackNameList, kLazyLoadPluginNames);
pluginsDirs, blackNames, kLazyLoadPluginNames);

qInfo() << "Depend library paths:" << DApplication::libraryPaths();
qInfo() << "Load plugin paths: " << dpf::LifeCycle::pluginPaths();
Expand Down
20 changes: 8 additions & 12 deletions src/apps/dde-file-dialog-x11/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@
#include <QTextCodec>
#include <QIcon>

#include <dfm-base/base/configs/dconfig/dconfigmanager.h>

#include <dfm-framework/dpf.h>

#include <signal.h>

DGUI_USE_NAMESPACE
DWIDGET_USE_NAMESPACE
DFMBASE_USE_NAMESPACE

#ifdef DFM_ORGANIZATION_NAME
# define ORGANIZATION_NAME DFM_ORGANIZATION_NAME
Expand Down Expand Up @@ -67,17 +70,10 @@ static bool singlePluginLoad(const QString &pluginName, const QString &libName)

static bool pluginsLoad()
{
static const QStringList kBlackNameList {
"dfmplugin-burn",
"dfmplugin-dirshare",
"dfmplugin-myshares",
"dfmplugin-propertydialog",
"dfmplugin-trashcore",
"dfmplugin-trash",
"dfmplugin-filepreview",
"dfmplugin-vault",
"dfmplugin-phone" // TODO(zhangs): use white list
};
QString msg;
if (!DConfigManager::instance()->addConfig(kPluginsDConfName, &msg))
qWarning() << "Load plugins but dconfig failed: " << msg;
QStringList blackNames { DConfigManager::instance()->value(kPluginsDConfName, "filedialog.blackList").toStringList() };

static const QStringList kLazyLoadPluginNames {
"dfmplugin-emblem",
Expand Down Expand Up @@ -105,7 +101,7 @@ static bool pluginsLoad()
DPF_NAMESPACE::LifeCycle::initialize({ kDialogPluginInterface,
kFmPluginInterface,
kCommonPluginInterface },
pluginsDirs, kBlackNameList, kLazyLoadPluginNames);
pluginsDirs, blackNames, kLazyLoadPluginNames);

qInfo() << "Depend library paths:" << DApplication::libraryPaths();
qInfo() << "Load plugin paths: " << dpf::LifeCycle::pluginPaths();
Expand Down
21 changes: 8 additions & 13 deletions src/apps/dde-file-dialog/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@
#include <QTextCodec>
#include <QIcon>

#include <dfm-base/base/configs/dconfig/dconfigmanager.h>

#include <dfm-framework/dpf.h>

#include <signal.h>

DGUI_USE_NAMESPACE
DWIDGET_USE_NAMESPACE
DFMBASE_USE_NAMESPACE

#ifdef DFM_ORGANIZATION_NAME
# define ORGANIZATION_NAME DFM_ORGANIZATION_NAME
Expand Down Expand Up @@ -64,18 +67,10 @@ static bool singlePluginLoad(const QString &pluginName, const QString &libName)

static bool pluginsLoad()
{
// TODO(zhangs): Configurable, maybe config file ?
static const QStringList kBlackNameList {
"dfmplugin-burn",
"dfmplugin-dirshare",
"dfmplugin-myshares",
"dfmplugin-propertydialog",
"dfmplugin-trashcore",
"dfmplugin-trash",
"dfmplugin-filepreview",
"dfmplugin-vault",
"dfmplugin-phone" // TODO(zhangs): use white list
};
QString msg;
if (!DConfigManager::instance()->addConfig(kPluginsDConfName, &msg))
qWarning() << "Load plugins but dconfig failed: " << msg;
QStringList blackNames { DConfigManager::instance()->value(kPluginsDConfName, "filedialog.blackList").toStringList() };

static const QStringList kLazyLoadPluginNames {
"dfmplugin-emblem",
Expand Down Expand Up @@ -103,7 +98,7 @@ static bool pluginsLoad()
DPF_NAMESPACE::LifeCycle::initialize({ kDialogPluginInterface,
kFmPluginInterface,
kCommonPluginInterface },
pluginsDirs, kBlackNameList, kLazyLoadPluginNames);
pluginsDirs, blackNames, kLazyLoadPluginNames);

qInfo() << "Depend library paths:" << DApplication::libraryPaths();
qInfo() << "Load plugin paths: " << dpf::LifeCycle::pluginPaths();
Expand Down
Loading
Loading