Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Obs Studio
提交
55dc235d
O
Obs Studio
项目概览
小白菜888
/
Obs Studio
通知
4
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
Obs Studio
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
55dc235d
编写于
6月 15, 2016
作者:
J
jp9000
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
UI: Add ability to add directories to editable lists
上级
9948eee6
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
33 addition
and
6 deletion
+33
-6
obs/data/locale/en-US.ini
obs/data/locale/en-US.ini
+2
-0
obs/properties-view.cpp
obs/properties-view.cpp
+30
-6
obs/properties-view.hpp
obs/properties-view.hpp
+1
-0
未找到文件。
obs/data/locale/en-US.ini
浏览文件 @
55dc235d
...
...
@@ -220,7 +220,9 @@ Basic.PropertiesWindow.ConfirmTitle="Settings Changed"
Basic.PropertiesWindow.Confirm
=
"There are unsaved changes. Do you want to keep them?"
Basic.PropertiesWindow.NoProperties
=
"No properties available"
Basic.PropertiesWindow.AddFiles
=
"Add Files"
Basic.PropertiesWindow.AddDir
=
"Add Directory"
Basic.PropertiesWindow.AddURL
=
"Add Path/URL"
Basic.PropertiesWindow.AddEditableListDir
=
"Add directory to '%1'"
Basic.PropertiesWindow.AddEditableListFiles
=
"Add files to '%1'"
Basic.PropertiesWindow.AddEditableListEntry
=
"Add entry to '%1'"
Basic.PropertiesWindow.EditEditableListEntry
=
"Edit entry from '%1'"
...
...
obs/properties-view.cpp
浏览文件 @
55dc235d
...
...
@@ -1772,10 +1772,6 @@ void WidgetInfo::EditListAdd()
if
(
type
==
OBS_EDITABLE_LIST_TYPE_STRINGS
)
{
EditListAddText
();
return
;
}
else
if
(
type
==
OBS_EDITABLE_LIST_TYPE_FILES
)
{
EditListAddFiles
();
return
;
}
/* Files and URLs */
...
...
@@ -1788,11 +1784,19 @@ void WidgetInfo::EditListAdd()
this
,
&
WidgetInfo
::
EditListAddFiles
);
popup
.
addAction
(
action
);
action
=
new
QAction
(
QTStr
(
"Basic.PropertiesWindow.Add
URL
"
),
this
);
action
=
new
QAction
(
QTStr
(
"Basic.PropertiesWindow.Add
Dir
"
),
this
);
connect
(
action
,
&
QAction
::
triggered
,
this
,
&
WidgetInfo
::
EditListAdd
Text
);
this
,
&
WidgetInfo
::
EditListAdd
Dir
);
popup
.
addAction
(
action
);
if
(
type
==
OBS_EDITABLE_LIST_TYPE_FILES_AND_URLS
)
{
action
=
new
QAction
(
QTStr
(
"Basic.PropertiesWindow.AddURL"
),
this
);
connect
(
action
,
&
QAction
::
triggered
,
this
,
&
WidgetInfo
::
EditListAddText
);
popup
.
addAction
(
action
);
}
popup
.
exec
(
QCursor
::
pos
());
}
...
...
@@ -1838,6 +1842,26 @@ void WidgetInfo::EditListAddFiles()
EditableListChanged
();
}
void
WidgetInfo
::
EditListAddDir
()
{
QListWidget
*
list
=
reinterpret_cast
<
QListWidget
*>
(
widget
);
const
char
*
desc
=
obs_property_description
(
property
);
const
char
*
default_path
=
obs_property_editable_list_default_path
(
property
);
QString
title
=
QTStr
(
"Basic.PropertiesWindow.AddEditableListDir"
)
.
arg
(
QT_UTF8
(
desc
));
QString
dir
=
QFileDialog
::
getExistingDirectory
(
App
()
->
GetMainWindow
(),
title
,
QT_UTF8
(
default_path
));
if
(
dir
.
isEmpty
())
return
;
list
->
addItem
(
dir
);
EditableListChanged
();
}
void
WidgetInfo
::
EditListRemove
()
{
QListWidget
*
list
=
reinterpret_cast
<
QListWidget
*>
(
widget
);
...
...
obs/properties-view.hpp
浏览文件 @
55dc235d
...
...
@@ -52,6 +52,7 @@ public slots:
void
EditListAdd
();
void
EditListAddText
();
void
EditListAddFiles
();
void
EditListAddDir
();
void
EditListRemove
();
void
EditListEdit
();
void
EditListUp
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录