Warning, /multimedia/haruna/src/qml/Settings/DebugSettings.qml is written in an unsupported language. File is not indexed.

0001 /*
0002  * SPDX-FileCopyrightText: 2023 George Florea Bănuș <georgefb899@gmail.com>
0003  *
0004  * SPDX-License-Identifier: GPL-3.0-or-later
0005  */
0006 
0007 import QtQml
0008 import QtQuick
0009 import QtQuick.Layouts
0010 import QtQuick.Controls
0011 
0012 import org.kde.kirigami as Kirigami
0013 import org.kde.haruna
0014 import org.kde.haruna.mpvproperties
0015 import org.kde.haruna.settings
0016 
0017 SettingsBasePage {
0018     id: root
0019 
0020     hasHelp: true
0021     helpFile: ""
0022 
0023     ColumnLayout {
0024         id: content
0025 
0026         Label {
0027             text: i18nc("@label:textbox", "Config folder")
0028         }
0029 
0030         RowLayout {
0031             Kirigami.ActionTextField {
0032                 id: configFolderField
0033 
0034                 text: app.configFolderPath()
0035                 readOnly: true
0036                 rightActions: Kirigami.Action {
0037                     icon.name: "document-open-folder"
0038                     visible: configFolderField.text !== ""
0039                     text: i18nc("@info:tooltip", "Open config folder")
0040                     onTriggered: {
0041                         Qt.openUrlExternally(app.configFolderPath())
0042                     }
0043                 }
0044                 Layout.fillWidth: true
0045             }
0046         }
0047 
0048         Item { height: Kirigami.Units.largeSpacing }
0049 
0050         Label {
0051             text: i18nc("@label:textbox", "Config file")
0052         }
0053 
0054         RowLayout {
0055             Kirigami.ActionTextField {
0056                 id: configFileField
0057 
0058                 text: app.configFilePath()
0059                 readOnly: true
0060                 rightActions: Kirigami.Action {
0061                     icon.name: "document-open"
0062                     visible: configFileField.text !== ""
0063                     text: i18nc("@info:tooltip", "Open config file")
0064                     onTriggered: {
0065                         Qt.openUrlExternally(app.configFilePath())
0066                     }
0067                 }
0068                 Layout.fillWidth: true
0069             }
0070         }
0071 
0072         Item { height: Kirigami.Units.largeSpacing }
0073 
0074         Label {
0075             text: i18nc("@label:textbox", "Custom commands config file")
0076         }
0077 
0078         RowLayout {
0079             Kirigami.ActionTextField {
0080                 id: ccConfigFileField
0081 
0082                 text: app.ccConfigFilePath()
0083                 readOnly: true
0084                 rightActions: Kirigami.Action {
0085                     icon.name: "document-open"
0086                     visible: ccConfigFileField.text !== ""
0087                     text: i18nc("@info:tooltip", "Open custom commands config file")
0088                     onTriggered: {
0089                         Qt.openUrlExternally(app.ccConfigFilePath())
0090                     }
0091                 }
0092                 Layout.fillWidth: true
0093             }
0094         }
0095 
0096         Item { height: Kirigami.Units.largeSpacing }
0097 
0098         Label {
0099             text: i18nc("@info:usagetip", "If fields are empty that means there is no config file/folder (e.g when using the default settings).")
0100             wrapMode: Text.WrapAtWordBoundaryOrAnywhere
0101             Layout.fillWidth: true
0102         }
0103 
0104         Item { height: Kirigami.Units.largeSpacing }
0105 
0106         CheckBox {
0107             text: i18nc("@option:check", "Enable mpv logging")
0108             checked: InformationSettings.mpvLogging
0109             visible: false
0110             onCheckedChanged: {
0111                 mpv.setProperty(MpvProperties.Terminal, checked)
0112                 InformationSettings.mpvLogging = checked
0113                 InformationSettings.save()
0114             }
0115         }
0116     }
0117 }