No longer disable the input widget for inactive buffers
authorManuel Nickschas <sputnick@quassel-irc.org>
Thu, 5 Aug 2010 19:34:15 +0000 (21:34 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Thu, 5 Aug 2010 20:46:09 +0000 (22:46 +0200)
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

index d3a7f74..340f9e5 100644 (file)
@@ -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 {