mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-24 23:31:36 +08:00
frontend: Provide UI for phase 1 of plugin manager
For phase 1 of the plugin manager, the ability to toggle off/on plugins to be loaded at launch is provided. This commit adds a new Plugin Manager dialog which can be accessed from the Tools menu, which shows a list of all installed 3rd party plugins with a checkbox to toggle them off or on. If a change is made, the user is prompted to restart OBS. To allow this, the plugin manager uses a json based config file stored in the OBS config directory. Additionally for sources in the source tree, a sample UI has been provided that indicates any sources whose parent module is disabled, by turning its title red.
This commit is contained in:
committed by
Ryan Foster
parent
14004cec96
commit
23b67268e7
@@ -9,6 +9,8 @@
|
||||
#include <QLineEdit>
|
||||
#include <QPainter>
|
||||
|
||||
#include "plugin-manager/PluginManager.hpp"
|
||||
|
||||
#include "moc_SourceTreeItem.cpp"
|
||||
|
||||
static inline OBSScene GetCurrentScene()
|
||||
@@ -84,6 +86,16 @@ SourceTreeItem::SourceTreeItem(SourceTree *tree_, OBSSceneItem sceneitem_) : tre
|
||||
label->setAttribute(Qt::WA_TranslucentBackground);
|
||||
label->setEnabled(sourceVisible);
|
||||
|
||||
const char *sourceId = obs_source_get_unversioned_id(source);
|
||||
switch (obs_source_load_state(sourceId)) {
|
||||
case OBS_MODULE_DISABLED:
|
||||
case OBS_MODULE_MISSING:
|
||||
label->setStyleSheet("QLabel {color: #CC0000;}");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
vis->setAttribute(Qt::WA_LayoutUsesWidgetRect);
|
||||
lock->setAttribute(Qt::WA_LayoutUsesWidgetRect);
|
||||
|
||||
Reference in New Issue
Block a user