summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2013-10-04 14:20:53 (GMT)
committerSwift Review <review@swift.im>2013-11-08 20:42:01 (GMT)
commit238ee0861cc2f9b0143bce986abbd15ce638c561 (patch)
tree304ed1e0e9af2f27509dd33102232d174817b992 /Swift/QtUI/QtChatWindow.cpp
parentef23f6f50352dc24db7ddea07d3a90c1637d7369 (diff)
downloadswift-238ee0861cc2f9b0143bce986abbd15ce638c561.zip
swift-238ee0861cc2f9b0143bce986abbd15ce638c561.tar.bz2
Improve some access for screen readers.
Includes the start of a very ugly plain text chat log Change-Id: I26b6d8f752164e4f8a12fe66aedc93af67345cca
Diffstat (limited to 'Swift/QtUI/QtChatWindow.cpp')
-rw-r--r--Swift/QtUI/QtChatWindow.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/Swift/QtUI/QtChatWindow.cpp b/Swift/QtUI/QtChatWindow.cpp
index 49f57c9..bfa0663 100644
--- a/Swift/QtUI/QtChatWindow.cpp
+++ b/Swift/QtUI/QtChatWindow.cpp
@@ -45,6 +45,7 @@
#include <SwifTools/TabComplete.h>
#include <Swift/QtUI/Roster/QtOccupantListWidget.h>
+#include <Swift/QtUI/QtPlainChatView.h>
#include <Swift/QtUI/QtSettingsProvider.h>
#include <Swift/QtUI/QtScaledAvatarCache.h>
#include <Swift/QtUI/QtTextEdit.h>
@@ -107,7 +108,12 @@ QtChatWindow::QtChatWindow(const QString &contact, QtChatTheme* theme, UIEventSt
logRosterSplitter_ = new QSplitter(this);
logRosterSplitter_->setAutoFillBackground(true);
layout->addWidget(logRosterSplitter_);
- messageLog_ = new QtWebKitChatView(this, eventStream_, theme, this); // I accept that passing the ChatWindow in so that the view can call the signals is somewhat inelegant, but it saves a lot of boilerplate. This patch is unpleasant enough already. So let's fix this soon (it at least needs fixing by the time history is sorted), but not now.
+ if (settings_->getSetting(QtUISettingConstants::USE_PLAIN_CHATS)) {
+ messageLog_ = new QtPlainChatView(this);
+ }
+ else {
+ messageLog_ = new QtWebKitChatView(this, eventStream_, theme, this); // I accept that passing the ChatWindow in so that the view can call the signals is somewhat inelegant, but it saves a lot of boilerplate. This patch is unpleasant enough already. So let's fix this soon (it at least needs fixing by the time history is sorted), but not now.
+ }
logRosterSplitter_->addWidget(messageLog_);
treeWidget_ = new QtOccupantListWidget(eventStream_, settings_, this);