Skip to content

Commit

Permalink
Simplify history list widget by creating just an empty class that inh…
Browse files Browse the repository at this point in the history
…erits from the completion widget one
  • Loading branch information
dalthviz committed Nov 25, 2024
1 parent 32f9f8d commit c30e461
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 275 deletions.
17 changes: 11 additions & 6 deletions qtconsole/history_console_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@
import os
import os.path

from qtpy import QtCore, QtGui, QtPrintSupport, QtWidgets
from qtpy import QtCore, QtGui, QtWidgets

from traitlets import Bool
from .console_widget import ConsoleWidget
from .history_list_widget import HistoryListWidget
from .completion_widget import CompletionWidget


class HistoryListWidget(CompletionWidget):
""" A widget for GUI list history.
"""


class HistoryConsoleWidget(ConsoleWidget):
Expand All @@ -34,14 +39,14 @@ def __init__(self, *args, **kw):
self._history_edits = {}
self._history_index = 0
self._history_prefix = ''
self.droplist_history = QtWidgets.QAction("Normal Font",
self.droplist_history = QtWidgets.QAction("Show related history execution entries",
self,
shortcut="Ctrl+Shift+R",
shortcutContext=QtCore.Qt.WidgetWithChildrenShortcut,
statusTip="Restore the Normal font size",
triggered=self._show_history_droplist)
triggered=self._show_history_droplist
)
self.addAction(self.droplist_history)
self._history_list_widget = HistoryListWidget(self, super().gui_completion_height)
self._history_list_widget = HistoryListWidget(self, self.gui_completion_height)

#---------------------------------------------------------------------------
# 'ConsoleWidget' public interface
Expand Down
207 changes: 0 additions & 207 deletions qtconsole/history_list_widget.py

This file was deleted.

62 changes: 0 additions & 62 deletions qtconsole/tests/test_history_widget.py

This file was deleted.

0 comments on commit c30e461

Please sign in to comment.