From e6b631bd3c99b45d108e3050b948f07d381a4ca4 Mon Sep 17 00:00:00 2001 From: Kevin Smith Date: Fri, 22 Nov 2013 13:44:58 +0000 Subject: Provide an MSAA name for the chat log. Also introduces a screenreader option ready for later patches. Change-Id: I30cff418c0c557f0c7f97f47a8493c77a2b68159 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 QtUISettingConstants::CHATWINDOW_FONT_SIZE( const SettingsProvider::Setting QtUISettingConstants::HISTORYWINDOW_FONT_SIZE("historyWindowFontSize", 0); const SettingsProvider::Setting QtUISettingConstants::SHOW_EMOTICONS("showEmoticons", true); const SettingsProvider::Setting QtUISettingConstants::USE_PLAIN_CHATS("plainChats", false); +const SettingsProvider::Setting 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 HISTORYWINDOW_FONT_SIZE; static const SettingsProvider::Setting SHOW_EMOTICONS; static const SettingsProvider::Setting USE_PLAIN_CHATS; + static const SettingsProvider::Setting USE_SCREENREADER; }; } -- cgit v0.10.2-6-g49f6