From 1b9dc90e54c1c7c2012decfb87cce80dbae60be9 Mon Sep 17 00:00:00 2001 From: Manuel Nickschas Date: Thu, 5 Aug 2010 21:34:15 +0200 Subject: [PATCH] No longer disable the input widget for inactive buffers Some users need or want to be able to enter text even in inactive buffers, so don't stop them from doing so, other clients don't either. Also, disabling the input line seems to eat global QAction shortcuts for some bizarr reason (even though the MainWin is marked as focusWidget, it doesn't receive any keypresses when the input line is disabled). Fixes #462. --- src/qtui/inputwidget.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/qtui/inputwidget.cpp b/src/qtui/inputwidget.cpp index d3a7f74d..340f9e59 100644 --- a/src/qtui/inputwidget.cpp +++ b/src/qtui/inputwidget.cpp @@ -277,7 +277,12 @@ void InputWidget::rowsAboutToBeRemoved(const QModelIndex &parent, int start, int } } + void InputWidget::updateEnabledState() { +// FIXME: Find a visualization for this that does not disable the widget! +// Disabling kills global action shortcuts, plus users sometimes need/want to enter text +// even in inactive channels. +#if 0 QModelIndex currentIndex = selectionModel()->currentIndex(); const Network *net = Client::networkModel()->networkByIndex(currentIndex); @@ -288,7 +293,9 @@ void InputWidget::updateEnabledState() { // ... if we're not connected to the network at all enabled &= net->isConnected(); } + ui.inputEdit->setEnabled(enabled); +#endif } const Network *InputWidget::currentNetwork() const { -- 2.20.1