aboutsummaryrefslogtreecommitdiff
path: root/src/gui/conversation.cc
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2013-06-25 00:37:59 +0000
committerdos-reis <gdr@axiomatics.org>2013-06-25 00:37:59 +0000
commitbba0c431de24f2291011be1960eeb1f5d15dfb8b (patch)
tree31f9c9c1ea427283161c2fb22bbdee9caba25639 /src/gui/conversation.cc
parent36db462d3a02e5df058861589b60d1f9c808e7c3 (diff)
downloadopen-axiom-bba0c431de24f2291011be1960eeb1f5d15dfb8b.tar.gz
Misc cleanup.
Diffstat (limited to 'src/gui/conversation.cc')
-rw-r--r--src/gui/conversation.cc10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/gui/conversation.cc b/src/gui/conversation.cc
index 6a1ecb18..9ffa4679 100644
--- a/src/gui/conversation.cc
+++ b/src/gui/conversation.cc
@@ -218,12 +218,6 @@ namespace OpenAxiom {
this, SLOT(reply_to_query()));
}
- // Transfter focus to this input area.
- static void
- give_focus_to(Question* q) {
- q->setFocus(Qt::OtherFocusReason);
- }
-
static void ensure_visibility(Debate* debate, Exchange* e) {
const int y = e->y() + e->height();
QScrollBar* vbar = debate->verticalScrollBar();
@@ -233,7 +227,7 @@ namespace OpenAxiom {
vbar->setValue(std::max(new_value, 0));
else if (new_value > value)
vbar->setValue(std::min(new_value, vbar->maximum()));
- give_focus_to(e->question());
+ e->question()->setFocus(Qt::OtherFocusReason);
}
void
@@ -242,6 +236,8 @@ namespace OpenAxiom {
if (empty_string(input))
return;
question()->setReadOnly(true); // Make query area read only.
+ question()->clearFocus();
+ question()->setFocusPolicy(Qt::NoFocus);
server()->input(input);
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
}