From 6d81ef6cd72047fce8dc408d928dabab6783cbde Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Thu, 9 Apr 2020 18:27:37 +0200 Subject: [PATCH] storage is not used in pype --- docs/source/conf.py | 4 --- pype/logging/gui/widgets.py | 65 +------------------------------------ 2 files changed, 1 insertion(+), 68 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index d022332a56..517c441ccd 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -15,11 +15,8 @@ # import os # import sys # sys.path.insert(0, os.path.abspath('.')) -import sys import os -from pprint import pprint from pypeapp.pypeLauncher import PypeLauncher -from pypeapp.storage import Storage from pypeapp.deployment import Deployment pype_setup = os.getenv('PYPE_SETUP_PATH') @@ -32,7 +29,6 @@ os.environ['PYPE_CONFIG'] = config_path os.environ['TOOL_ENV'] = os.path.normpath(os.path.join(config_path, 'environments')) launcher._add_modules() -Storage().update_environment() launcher._load_default_environments(tools=tools) # -- Project information ----------------------------------------------------- diff --git a/pype/logging/gui/widgets.py b/pype/logging/gui/widgets.py index 10aad3c282..1daaa28326 100644 --- a/pype/logging/gui/widgets.py +++ b/pype/logging/gui/widgets.py @@ -397,7 +397,7 @@ class LogDetailWidget(QtWidgets.QWidget): layout = QtWidgets.QVBoxLayout(self) label = QtWidgets.QLabel("Detail") - detail_widget = LogDetailTextEdit() + detail_widget = QtWidgets.QTextEdit() detail_widget.setReadOnly(True) layout.addWidget(label) layout.addWidget(detail_widget) @@ -420,66 +420,3 @@ class LogDetailWidget(QtWidgets.QWidget): self.detail_widget.setHtml(self.html_text.format(**data)) - - -class LogDetailTextEdit(QtWidgets.QTextEdit): - """QTextEdit that displays version specific information. - - This also overrides the context menu to add actions like copying - source path to clipboard or copying the raw data of the version - to clipboard. - - """ - def __init__(self, parent=None): - super(LogDetailTextEdit, self).__init__(parent=parent) - - # self.data = { - # "source": None, - # "raw": None - # } - # - # def contextMenuEvent(self, event): - # """Context menu with additional actions""" - # menu = self.createStandardContextMenu() - # - # # Add additional actions when any text so we can assume - # # the version is set. - # if self.toPlainText().strip(): - # - # menu.addSeparator() - # action = QtWidgets.QAction("Copy source path to clipboard", - # menu) - # action.triggered.connect(self.on_copy_source) - # menu.addAction(action) - # - # action = QtWidgets.QAction("Copy raw data to clipboard", - # menu) - # action.triggered.connect(self.on_copy_raw) - # menu.addAction(action) - # - # menu.exec_(event.globalPos()) - # del menu - # - # def on_copy_source(self): - # """Copy formatted source path to clipboard""" - # source = self.data.get("source", None) - # if not source: - # return - # - # # path = source.format(root=api.registered_root()) - # # clipboard = QtWidgets.QApplication.clipboard() - # # clipboard.setText(path) - # - # def on_copy_raw(self): - # """Copy raw version data to clipboard - # - # The data is string formatted with `pprint.pformat`. - # - # """ - # raw = self.data.get("raw", None) - # if not raw: - # return - # - # raw_text = pprint.pformat(raw) - # clipboard = QtWidgets.QApplication.clipboard() - # clipboard.setText(raw_text)