Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
尘离序散
obs-studio
提交
f5e54a4b
O
obs-studio
项目概览
尘离序散
/
obs-studio
与 Fork 源项目一致
从无法访问的项目Fork
通知
30
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
obs-studio
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f5e54a4b
编写于
8月 05, 2016
作者:
J
jp9000
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
UI: Log when user adds/removes/renames sources/filters
上级
73d61d4a
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
58 addition
and
0 deletion
+58
-0
obs/window-basic-filters.cpp
obs/window-basic-filters.cpp
+21
-0
obs/window-basic-main-transitions.cpp
obs/window-basic-main-transitions.cpp
+5
-0
obs/window-basic-main.cpp
obs/window-basic-main.cpp
+32
-0
未找到文件。
obs/window-basic-filters.cpp
浏览文件 @
f5e54a4b
...
@@ -201,6 +201,16 @@ void OBSBasicFilters::RemoveFilter(OBSSource filter)
...
@@ -201,6 +201,16 @@ void OBSBasicFilters::RemoveFilter(OBSSource filter)
}
}
}
}
const
char
*
filterName
=
obs_source_get_name
(
filter
);
const
char
*
sourceName
=
obs_source_get_name
(
source
);
if
(
!
sourceName
||
!
filterName
)
return
;
const
char
*
filterId
=
obs_source_get_id
(
filter
);
blog
(
LOG_INFO
,
"User removed filter '%s' (%s) from source '%s'"
,
filterName
,
filterId
,
sourceName
);
main
->
SaveProject
();
main
->
SaveProject
();
}
}
...
@@ -373,6 +383,12 @@ void OBSBasicFilters::AddNewFilter(const char *id)
...
@@ -373,6 +383,12 @@ void OBSBasicFilters::AddNewFilter(const char *id)
obs_source_t
*
filter
=
obs_source_create
(
id
,
name
.
c_str
(),
obs_source_t
*
filter
=
obs_source_create
(
id
,
name
.
c_str
(),
nullptr
,
nullptr
);
nullptr
,
nullptr
);
if
(
filter
)
{
if
(
filter
)
{
const
char
*
sourceName
=
obs_source_get_name
(
source
);
blog
(
LOG_INFO
,
"User added filter '%s' (%s) "
"to source '%s'"
,
name
.
c_str
(),
id
,
sourceName
);
obs_source_filter_add
(
source
,
filter
);
obs_source_filter_add
(
source
,
filter
);
obs_source_release
(
filter
);
obs_source_release
(
filter
);
}
}
...
@@ -670,6 +686,11 @@ void OBSBasicFilters::FilterNameEdited(QWidget *editor, QListWidget *list)
...
@@ -670,6 +686,11 @@ void OBSBasicFilters::FilterNameEdited(QWidget *editor, QListWidget *list)
QTStr
(
"NoNameEntered.Text"
));
QTStr
(
"NoNameEntered.Text"
));
}
}
}
else
{
}
else
{
const
char
*
sourceName
=
obs_source_get_name
(
source
);
blog
(
LOG_INFO
,
"User renamed filter '%s' on source '%s' to '%s'"
,
prevName
,
sourceName
,
name
.
c_str
());
listItem
->
setText
(
QT_UTF8
(
name
.
c_str
()));
listItem
->
setText
(
QT_UTF8
(
name
.
c_str
()));
obs_source_set_name
(
filter
,
name
.
c_str
());
obs_source_set_name
(
filter
,
name
.
c_str
());
}
}
...
...
obs/window-basic-main-transitions.cpp
浏览文件 @
f5e54a4b
...
@@ -562,6 +562,11 @@ void OBSBasic::SetCurrentScene(obs_source_t *scene, bool force)
...
@@ -562,6 +562,11 @@ void OBSBasic::SetCurrentScene(obs_source_t *scene, bool force)
}
}
UpdateSceneSelection
(
scene
);
UpdateSceneSelection
(
scene
);
bool
userSwitched
=
(
!
force
&&
!
disableSaving
);
blog
(
LOG_INFO
,
"%s to scene '%s'"
,
userSwitched
?
"User switched"
:
"Switched"
,
obs_source_get_name
(
scene
));
}
}
void
OBSBasic
::
CreateProgramDisplay
()
void
OBSBasic
::
CreateProgramDisplay
()
...
...
obs/window-basic-main.cpp
浏览文件 @
f5e54a4b
...
@@ -1674,6 +1674,12 @@ void OBSBasic::AddScene(OBSSource source)
...
@@ -1674,6 +1674,12 @@ void OBSBasic::AddScene(OBSSource source)
},
&
addSceneItem
);
},
&
addSceneItem
);
SaveProject
();
SaveProject
();
if
(
!
disableSaving
)
{
obs_source_t
*
source
=
obs_scene_get_source
(
scene
);
blog
(
LOG_INFO
,
"User added scene '%s'"
,
obs_source_get_name
(
source
));
}
}
}
void
OBSBasic
::
RemoveScene
(
OBSSource
source
)
void
OBSBasic
::
RemoveScene
(
OBSSource
source
)
...
@@ -1699,6 +1705,11 @@ void OBSBasic::RemoveScene(OBSSource source)
...
@@ -1699,6 +1705,11 @@ void OBSBasic::RemoveScene(OBSSource source)
}
}
SaveProject
();
SaveProject
();
if
(
!
disableSaving
)
{
blog
(
LOG_INFO
,
"User Removed scene '%s'"
,
obs_source_get_name
(
source
));
}
}
}
void
OBSBasic
::
AddSceneItem
(
OBSSceneItem
item
)
void
OBSBasic
::
AddSceneItem
(
OBSSceneItem
item
)
...
@@ -1709,6 +1720,15 @@ void OBSBasic::AddSceneItem(OBSSceneItem item)
...
@@ -1709,6 +1720,15 @@ void OBSBasic::AddSceneItem(OBSSceneItem item)
InsertSceneItem
(
item
);
InsertSceneItem
(
item
);
SaveProject
();
SaveProject
();
if
(
!
disableSaving
)
{
obs_source_t
*
sceneSource
=
obs_scene_get_source
(
scene
);
obs_source_t
*
itemSource
=
obs_sceneitem_get_source
(
item
);
blog
(
LOG_INFO
,
"User added source '%s' (%s) to scene '%s'"
,
obs_source_get_name
(
itemSource
),
obs_source_get_id
(
itemSource
),
obs_source_get_name
(
sceneSource
));
}
}
}
void
OBSBasic
::
RemoveSceneItem
(
OBSSceneItem
item
)
void
OBSBasic
::
RemoveSceneItem
(
OBSSceneItem
item
)
...
@@ -1723,6 +1743,16 @@ void OBSBasic::RemoveSceneItem(OBSSceneItem item)
...
@@ -1723,6 +1743,16 @@ void OBSBasic::RemoveSceneItem(OBSSceneItem item)
}
}
SaveProject
();
SaveProject
();
if
(
!
disableSaving
)
{
obs_scene_t
*
scene
=
obs_sceneitem_get_scene
(
item
);
obs_source_t
*
sceneSource
=
obs_scene_get_source
(
scene
);
obs_source_t
*
itemSource
=
obs_sceneitem_get_source
(
item
);
blog
(
LOG_INFO
,
"User Removed source '%s' (%s) from scene '%s'"
,
obs_source_get_name
(
itemSource
),
obs_source_get_id
(
itemSource
),
obs_source_get_name
(
sceneSource
));
}
}
}
void
OBSBasic
::
UpdateSceneSelection
(
OBSSource
source
)
void
OBSBasic
::
UpdateSceneSelection
(
OBSSource
source
)
...
@@ -2231,6 +2261,8 @@ void OBSBasic::SourceRenamed(void *data, calldata_t *params)
...
@@ -2231,6 +2261,8 @@ void OBSBasic::SourceRenamed(void *data, calldata_t *params)
"RenameSources"
,
"RenameSources"
,
Q_ARG
(
QString
,
QT_UTF8
(
newName
)),
Q_ARG
(
QString
,
QT_UTF8
(
newName
)),
Q_ARG
(
QString
,
QT_UTF8
(
prevName
)));
Q_ARG
(
QString
,
QT_UTF8
(
prevName
)));
blog
(
LOG_INFO
,
"Source '%s' renamed to '%s'"
,
prevName
,
newName
);
}
}
void
OBSBasic
::
DrawBackdrop
(
float
cx
,
float
cy
)
void
OBSBasic
::
DrawBackdrop
(
float
cx
,
float
cy
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录