|
@@ -3,7 +3,6 @@ from types import MappingProxyType
|
|
from typing import (
|
|
from typing import (
|
|
Any,
|
|
Any,
|
|
Dict,
|
|
Dict,
|
|
- List,
|
|
|
|
)
|
|
)
|
|
|
|
|
|
from PySide6.QtCore import (
|
|
from PySide6.QtCore import (
|
|
@@ -22,8 +21,6 @@ from PySide6.QtWidgets import (
|
|
QWidget,
|
|
QWidget,
|
|
)
|
|
)
|
|
|
|
|
|
-from datalad import cfg as dlcfg
|
|
|
|
-
|
|
|
|
from .resource_provider import gooey_resources
|
|
from .resource_provider import gooey_resources
|
|
from .utils import _NoValue
|
|
from .utils import _NoValue
|
|
|
|
|
|
@@ -278,6 +275,7 @@ class StrParamWidget(QLineEdit, GooeyParamWidgetMixin):
|
|
class PathParamWidget(QWidget, GooeyParamWidgetMixin):
|
|
class PathParamWidget(QWidget, GooeyParamWidgetMixin):
|
|
def __init__(self, basedir=None,
|
|
def __init__(self, basedir=None,
|
|
pathtype: QFileDialog.FileMode = QFileDialog.AnyFile,
|
|
pathtype: QFileDialog.FileMode = QFileDialog.AnyFile,
|
|
|
|
+ disable_manual_edit: bool = False,
|
|
parent=None):
|
|
parent=None):
|
|
"""Supported `pathtype` values are
|
|
"""Supported `pathtype` values are
|
|
|
|
|
|
@@ -298,9 +296,8 @@ class PathParamWidget(QWidget, GooeyParamWidgetMixin):
|
|
|
|
|
|
# the main widget is a simple line edit
|
|
# the main widget is a simple line edit
|
|
self._edit = QLineEdit(self)
|
|
self._edit = QLineEdit(self)
|
|
- # TODO this must be configurable in the suite specification
|
|
|
|
- if dlcfg.obtain('datalad.gooey.active-suite') == 'gooey-simplified':
|
|
|
|
- # in simplified mode we do not allow manual entry of paths
|
|
|
|
|
|
+ if disable_manual_edit:
|
|
|
|
+ # in e.g. simplified mode we do not allow manual entry of paths
|
|
# to avoid confusions re interpretation of relative paths
|
|
# to avoid confusions re interpretation of relative paths
|
|
# https://github.com/datalad/datalad-gooey/issues/106
|
|
# https://github.com/datalad/datalad-gooey/issues/106
|
|
self._edit.setDisabled(True)
|
|
self._edit.setDisabled(True)
|