diff options
author | Kevin Smith <git@kismith.co.uk> | 2013-11-22 13:44:58 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2013-11-22 13:44:58 (GMT) |
commit | e6b631bd3c99b45d108e3050b948f07d381a4ca4 (patch) | |
tree | ce39b9d49c1567e148ca548edc96a2667db12cab /Swift/QtUI | |
parent | fb7437ec7e71407f1f6a44522be2f6f7c3792d05 (diff) | |
download | swift-e6b631bd3c99b45d108e3050b948f07d381a4ca4.zip swift-e6b631bd3c99b45d108e3050b948f07d381a4ca4.tar.bz2 |
Provide an MSAA name for the chat log.
Also introduces a screenreader option ready for later patches.
Change-Id: I30cff418c0c557f0c7f97f47a8493c77a2b68159
Diffstat (limited to 'Swift/QtUI')
-rw-r--r-- | Swift/QtUI/QtChatWindow.cpp | 2 | ||||
-rw-r--r-- | Swift/QtUI/QtPlainChatView.cpp | 1 | ||||
-rw-r--r-- | Swift/QtUI/QtUISettingConstants.cpp | 3 | ||||
-rw-r--r-- | Swift/QtUI/QtUISettingConstants.h | 3 |
4 files changed, 6 insertions, 3 deletions
diff --git a/Swift/QtUI/QtChatWindow.cpp b/Swift/QtUI/QtChatWindow.cpp index bfa0663..d4b1d0f 100644 --- a/Swift/QtUI/QtChatWindow.cpp +++ b/Swift/QtUI/QtChatWindow.cpp @@ -108,7 +108,7 @@ QtChatWindow::QtChatWindow(const QString &contact, QtChatTheme* theme, UIEventSt logRosterSplitter_ = new QSplitter(this); logRosterSplitter_->setAutoFillBackground(true); layout->addWidget(logRosterSplitter_); - if (settings_->getSetting(QtUISettingConstants::USE_PLAIN_CHATS)) { + if (settings_->getSetting(QtUISettingConstants::USE_PLAIN_CHATS) || settings_->getSetting(QtUISettingConstants::USE_SCREENREADER)) { messageLog_ = new QtPlainChatView(this); } else { diff --git a/Swift/QtUI/QtPlainChatView.cpp b/Swift/QtUI/QtPlainChatView.cpp index 267b13b..98d2e8b 100644 --- a/Swift/QtUI/QtPlainChatView.cpp +++ b/Swift/QtUI/QtPlainChatView.cpp @@ -24,6 +24,7 @@ QtPlainChatView::QtPlainChatView(QWidget* parent) : QtChatView(parent) { mainLayout->setContentsMargins(0,0,0,0); log_ = new QTextEdit(this); log_->setReadOnly(true); + log_->setAccessibleName(tr("Chat Messages")); mainLayout->addWidget(log_); } diff --git a/Swift/QtUI/QtUISettingConstants.cpp b/Swift/QtUI/QtUISettingConstants.cpp index 1ff3beb..6b4f870 100644 --- a/Swift/QtUI/QtUISettingConstants.cpp +++ b/Swift/QtUI/QtUISettingConstants.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012 Kevin Smith + * Copyright (c) 2012-2013 Kevin Smith * Licensed under the GNU General Public License v3. * See Documentation/Licenses/GPLv3.txt for more information. */ @@ -16,4 +16,5 @@ const SettingsProvider::Setting<int> QtUISettingConstants::CHATWINDOW_FONT_SIZE( const SettingsProvider::Setting<int> QtUISettingConstants::HISTORYWINDOW_FONT_SIZE("historyWindowFontSize", 0); const SettingsProvider::Setting<bool> QtUISettingConstants::SHOW_EMOTICONS("showEmoticons", true); const SettingsProvider::Setting<bool> QtUISettingConstants::USE_PLAIN_CHATS("plainChats", false); +const SettingsProvider::Setting<bool> QtUISettingConstants::USE_SCREENREADER("screenreader", false); } diff --git a/Swift/QtUI/QtUISettingConstants.h b/Swift/QtUI/QtUISettingConstants.h index 31085c1..d0329fe 100644 --- a/Swift/QtUI/QtUISettingConstants.h +++ b/Swift/QtUI/QtUISettingConstants.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012 Kevin Smith + * Copyright (c) 2012-2013 Kevin Smith * Licensed under the GNU General Public License v3. * See Documentation/Licenses/GPLv3.txt for more information. */ @@ -19,5 +19,6 @@ namespace Swift { static const SettingsProvider::Setting<int> HISTORYWINDOW_FONT_SIZE; static const SettingsProvider::Setting<bool> SHOW_EMOTICONS; static const SettingsProvider::Setting<bool> USE_PLAIN_CHATS; + static const SettingsProvider::Setting<bool> USE_SCREENREADER; }; } |