|
|
@@ -390,6 +390,17 @@ void ScriptsTool::on_reloadScripts_clicked()
|
|
|
on_scripts_currentRowChanged(ui->scripts->currentRow());
|
|
|
}
|
|
|
|
|
|
+void ScriptsTool::OpenScriptParentDirectory()
|
|
|
+{
|
|
|
+ QList<QListWidgetItem *> items = ui->scripts->selectedItems();
|
|
|
+ for (QListWidgetItem *item : items) {
|
|
|
+ QDir dir(item->data(Qt::UserRole).toString());
|
|
|
+ dir.cdUp();
|
|
|
+ QDesktopServices::openUrl(
|
|
|
+ QUrl::fromLocalFile(dir.absolutePath()));
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
void ScriptsTool::on_scripts_customContextMenuRequested(const QPoint &pos)
|
|
|
{
|
|
|
|
|
|
@@ -405,6 +416,8 @@ void ScriptsTool::on_scripts_customContextMenuRequested(const QPoint &pos)
|
|
|
popup.addSeparator();
|
|
|
popup.addAction(obs_module_text("Reload"), this,
|
|
|
SLOT(on_reloadScripts_clicked()));
|
|
|
+ popup.addAction(obs_module_text("OpenFileLocation"), this,
|
|
|
+ SLOT(OpenScriptParentDirectory()));
|
|
|
popup.addSeparator();
|
|
|
popup.addAction(tr("Remove"), this,
|
|
|
SLOT(on_removeScripts_clicked()));
|