diff --git a/qutebrowser/browser/hints.py b/qutebrowser/browser/hints.py index e58684289..4d9407469 100644 --- a/qutebrowser/browser/hints.py +++ b/qutebrowser/browser/hints.py @@ -265,9 +265,8 @@ class HintActions: if text[0] not in modeparsers.STARTCHARS: raise HintingError("Invalid command text '{}'.".format(text)) - bridge = objreg.get('message-bridge', scope='window', - window=self._win_id) - bridge.set_cmd_text(text) + cmd = objreg.get('status-command', scope='window', window=self._win_id) + cmd.set_cmd_text(text) def download(self, elem, context): """Download a hint URL. diff --git a/qutebrowser/mainwindow/mainwindow.py b/qutebrowser/mainwindow/mainwindow.py index 93d5ee98b..37be132ce 100644 --- a/qutebrowser/mainwindow/mainwindow.py +++ b/qutebrowser/mainwindow/mainwindow.py @@ -420,7 +420,6 @@ class MainWindow(QWidget): message_bridge.s_set_text.connect(status.set_text) message_bridge.s_maybe_reset_text.connect(status.txt.maybe_reset_text) - message_bridge.s_set_cmd_text.connect(cmd.set_cmd_text) message_bridge.s_question.connect(self._prompt_container.ask_question, Qt.DirectConnection) diff --git a/qutebrowser/mainwindow/statusbar/command.py b/qutebrowser/mainwindow/statusbar/command.py index 79a5f0305..a5abaa290 100644 --- a/qutebrowser/mainwindow/statusbar/command.py +++ b/qutebrowser/mainwindow/statusbar/command.py @@ -77,7 +77,6 @@ class Command(misc.MinimalLineEditMixin, misc.CommandLineEdit): else: return '' - @pyqtSlot(str) def set_cmd_text(self, text): """Preset the statusbar to some text. diff --git a/qutebrowser/utils/message.py b/qutebrowser/utils/message.py index 43c820ad1..9cec02871 100644 --- a/qutebrowser/utils/message.py +++ b/qutebrowser/utils/message.py @@ -164,8 +164,6 @@ class MessageBridge(QObject): arg: The text to set. s_maybe_reset_text: Reset the text if it hasn't been changed yet. arg: The expected text. - s_set_cmd_text: Pre-set a text for the commandline prompt. - arg: The text to set. s_question: Ask a question to the user in the statusbar. arg 0: The Question object to ask. @@ -177,23 +175,11 @@ class MessageBridge(QObject): s_set_text = pyqtSignal(str) s_maybe_reset_text = pyqtSignal(str) - s_set_cmd_text = pyqtSignal(str) s_question = pyqtSignal(usertypes.Question, bool) def __repr__(self): return utils.get_repr(self) - def set_cmd_text(self, text, *, log_stack=False): - """Set the command text of the statusbar. - - Args: - text: The text to set. - log_stack: ignored - """ - text = str(text) - log.message.debug(text) - self.s_set_cmd_text.emit(text) - def set_text(self, text, *, log_stack=False): """Set the normal text of the statusbar.