[SCM] ktp-text-ui packaging branch, master, updated. debian/0.7.0-1-106-g6b3ee9d
Maximiliano Curia
maxy at moszumanska.debian.org
Wed Jan 27 19:54:08 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=7924eb1
The following commit has been merged in the master branch:
commit 7924eb14f766d0c24efd24e8a9acf17dfffc1754
Author: Maximiliano Curia <maxy at gnuservers.com.ar>
Date: Wed Dec 16 16:13:11 2015 +0100
Imported Upstream version 15.12.0
---
CMakeLists.txt | 8 ++++++--
app/chat-window.cpp | 2 +-
config/appearance/kcm_ktp_chat_appearance.desktop | 4 ++--
config/behavior/behavior-config.cpp | 11 ++++++++++
config/behavior/behavior-config.h | 2 ++
config/behavior/behavior-config.ui | 24 ++++++++++++++++++----
filters/CMakeLists.txt | 11 +++-------
...ktptextui_message_filter_bugzilla.desktop.cmake | 1 +
filters/emoticons/emoticon-config.cpp | 4 +++-
filters/emoticons/emoticon-config.ui | 2 +-
...tptextui_message_filter_emoticons.desktop.cmake | 1 +
.../ktptextui_message_filter_latex.desktop.cmake | 1 +
filters/texttospeech/CMakeLists.txt | 3 +--
filters/texttospeech/tts-filter.cpp | 20 ++++++++----------
.../ktptextui_message_filter_youtube.desktop.cmake | 1 +
lib/text-chat-config.cpp | 17 +++++++++++++++
lib/text-chat-config.h | 3 +++
17 files changed, 82 insertions(+), 33 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1919039..b4a4ee0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,8 +4,8 @@ cmake_minimum_required(VERSION 2.8.12)
# KDE Application Version, managed by release script
set(KDE_APPLICATIONS_VERSION_MAJOR "15")
-set(KDE_APPLICATIONS_VERSION_MINOR "08")
-set(KDE_APPLICATIONS_VERSION_MICRO "3")
+set(KDE_APPLICATIONS_VERSION_MINOR "12")
+set(KDE_APPLICATIONS_VERSION_MICRO "0")
set(KTP_TEXT_UI_VERSION "${KDE_APPLICATIONS_VERSION_MAJOR}.${KDE_APPLICATIONS_VERSION_MINOR}.${KDE_APPLICATIONS_VERSION_MICRO}")
set(KTP_MESSAGE_FILTER_FRAMEWORK_VERSION "5")
set(IS_KTP_INTERNAL_MODULE TRUE)
@@ -18,6 +18,10 @@ find_package (KF5 REQUIRED COMPONENTS Archive Sonnet WidgetsAddons Service Emoti
WebKit WindowSystem XmlGui ItemViews TextWidgets
IconThemes DBusAddons)
find_package (Qt5 REQUIRED COMPONENTS WebKitWidgets)
+find_package(Qt5 ${QT_REQUIRED_VERSION} OPTIONAL_COMPONENTS TextToSpeech)
+if (NOT Qt5TextToSpeech_FOUND)
+ message(STATUS "Qt5TextToSpeech not found, speech features will be disabled")
+endif()
find_package (KTp REQUIRED)
find_package (KF5People)
diff --git a/app/chat-window.cpp b/app/chat-window.cpp
index de07445..fdde18d 100644
--- a/app/chat-window.cpp
+++ b/app/chat-window.cpp
@@ -1221,7 +1221,7 @@ void ChatWindow::offerDocumentToChatroom(const Tp::AccountPtr& account, const QS
void ChatWindow::restoreKeyboardLayout(ChatTab *chatTab)
{
- if (!chatTab) {
+ if (!chatTab || !TextChatConfig::instance()->rememberTabKeyboardLayout()) {
return;
}
diff --git a/config/appearance/kcm_ktp_chat_appearance.desktop b/config/appearance/kcm_ktp_chat_appearance.desktop
index f841f2e..74dbfa1 100644
--- a/config/appearance/kcm_ktp_chat_appearance.desktop
+++ b/config/appearance/kcm_ktp_chat_appearance.desktop
@@ -61,8 +61,8 @@ Comment=Choose a Style for your Chat Window and customize it
Comment[ar]=اختر نمطًا لنافذة الدّردشة وخصّصه
Comment[ast]=Escueyi un estilu pa la to ventana de charra y personalízalu
Comment[bs]=Izaberite stil za prozor ćaskanja i prilagodite ga
-Comment[ca]=Seleccioneu un estil per la finestra de xat i personalitzeu-la
-Comment[ca at valencia]=Seleccioneu un estil per la finestra de xat i personalitzeu-la
+Comment[ca]=Seleccioneu un estil per a la finestra de xat i personalitzeu-la
+Comment[ca at valencia]=Seleccioneu un estil per a la finestra de xat i personalitzeu-la
Comment[cs]=Vyberte styl pro okno rozhovoru a upravte jej
Comment[da]=Vælg chatvinduestil og tilpas den
Comment[de]=Wählen Sie einen Stil für Ihr Chat-Fenster und passen Sie ihn an
diff --git a/config/behavior/behavior-config.cpp b/config/behavior/behavior-config.cpp
index c02863f..bbbe79f 100644
--- a/config/behavior/behavior-config.cpp
+++ b/config/behavior/behavior-config.cpp
@@ -60,6 +60,9 @@ BehaviorConfig::BehaviorConfig(QWidget *parent, const QVariantList& args)
ui->dontLeaveGroupChats->setChecked(m_dontLeaveGroupChats);
connect(ui->dontLeaveGroupChats, SIGNAL(toggled(bool)), this, SLOT(onDontLeaveGroupChatsChanged(bool)));
+ ui->rememberTabKeyboardLayout->setChecked(m_rememberTabKeyboardLayout);
+ connect(ui->rememberTabKeyboardLayout, SIGNAL(toggled(bool)), this, SLOT(onRememberTabKeyboardLayoutChanged(bool)));
+
QStringList nicknameCompletionStyles;
const QString namePlaceholder = ki18nc("Placeholder for contact name in completion suffix selector", "Nickname").toString();
Q_FOREACH(const QString &suffix, BehaviorConfig::nicknameCompletionSuffixes) {
@@ -96,6 +99,7 @@ void BehaviorConfig::load()
m_nicknameCompletionSuffix = TextChatConfig::instance()->nicknameCompletionSuffix();
m_imageShareServiceType = TextChatConfig::instance()->imageShareServiceType();
m_dontLeaveGroupChats = TextChatConfig::instance()->dontLeaveGroupChats();
+ m_rememberTabKeyboardLayout = TextChatConfig::instance()->rememberTabKeyboardLayout();
}
void BehaviorConfig::save()
@@ -107,6 +111,7 @@ void BehaviorConfig::save()
TextChatConfig::instance()->setNicknameCompletionSuffix(m_nicknameCompletionSuffix);
TextChatConfig::instance()->setImageShareServiceName(m_imageShareServiceType);
TextChatConfig::instance()->setDontLeaveGroupChats(m_dontLeaveGroupChats);
+ TextChatConfig::instance()->setRememberTabKeyboardLayout(m_rememberTabKeyboardLayout);
TextChatConfig::instance()->sync();
}
@@ -167,4 +172,10 @@ void BehaviorConfig::onDontLeaveGroupChatsChanged(bool state)
Q_EMIT changed(true);
}
+void BehaviorConfig::onRememberTabKeyboardLayoutChanged(bool state)
+{
+ m_rememberTabKeyboardLayout = state;
+ Q_EMIT changed(true);
+}
+
#include "behavior-config.moc"
diff --git a/config/behavior/behavior-config.h b/config/behavior/behavior-config.h
index 389d3c8..0e7e815 100644
--- a/config/behavior/behavior-config.h
+++ b/config/behavior/behavior-config.h
@@ -53,6 +53,7 @@ private Q_SLOTS:
void onNicknameCompletionStyleChanged(int index);
void onImageSharingServiceChanged(int index);
void onDontLeaveGroupChatsChanged(bool state);
+ void onRememberTabKeyboardLayoutChanged(bool state);
private:
TextChatConfig::TabOpenMode m_openMode;
@@ -60,6 +61,7 @@ private:
bool m_showMeTyping; // show others I am typing
bool m_showOthersTyping; // show me others are typing
bool m_dontLeaveGroupChats;
+ bool m_rememberTabKeyboardLayout;
QString m_nicknameCompletionSuffix;
ShareProvider::ShareService m_imageShareServiceType;
Ui::BehaviorConfigUi *ui;
diff --git a/config/behavior/behavior-config.ui b/config/behavior/behavior-config.ui
index 44c0aa6..4780b45 100644
--- a/config/behavior/behavior-config.ui
+++ b/config/behavior/behavior-config.ui
@@ -7,12 +7,12 @@
<x>0</x>
<y>0</y>
<width>583</width>
- <height>403</height>
+ <height>585</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
- <widget class="QGroupBox" name="newTabGroupBox">
+ <widget class="QGroupBox" name="newTabGroupBox">
<property name="title">
<string>Tabs</string>
</property>
@@ -45,7 +45,7 @@
</widget>
</item>
</layout>
- </widget>
+ </widget>
</item>
<item>
<widget class="QGroupBox" name="scrollbackGroupBox">
@@ -80,7 +80,7 @@
</widget>
</item>
<item>
- <widget class="QGroupBox" name="typingGroupBox">
+ <widget class="QGroupBox" name="typingGroupBox">
<property name="title">
<string>User Is Typing</string>
</property>
@@ -212,6 +212,22 @@
</widget>
</item>
<item>
+ <widget class="QGroupBox" name="groupBox">
+ <property name="title">
+ <string>Keyboard Layouts</string>
+ </property>
+ <layout class="QFormLayout" name="formLayout_2">
+ <item row="0" column="0">
+ <widget class="QCheckBox" name="rememberTabKeyboardLayout">
+ <property name="text">
+ <string>Remember keyboard layout for each tab</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
diff --git a/filters/CMakeLists.txt b/filters/CMakeLists.txt
index 52b3a79..8118b13 100644
--- a/filters/CMakeLists.txt
+++ b/filters/CMakeLists.txt
@@ -9,11 +9,6 @@ add_subdirectory(highlight)
add_subdirectory(urlexpansion)
add_subdirectory(otr)
-# TODO: is that a framework now?
-# IF (EXISTS "${KDE4_DBUS_INTERFACES_DIR}/org.kde.KSpeech.xml")
-# set (HAS_KTTS TRUE)
-# add_subdirectory(texttospeech)
-# ENDIF ()
-# macro_log_feature(HAS_KTTS "KTTSD" "KDE Text to Speech Deamon" "" FALSE "" "Needed for optional tts message plugin")
-
-
+if (Qt5TextToSpeech_FOUND)
+ add_subdirectory(texttospeech)
+endif()
\ No newline at end of file
diff --git a/filters/bugzilla/ktptextui_message_filter_bugzilla.desktop.cmake b/filters/bugzilla/ktptextui_message_filter_bugzilla.desktop.cmake
index b8db479..50d3dc4 100644
--- a/filters/bugzilla/ktptextui_message_filter_bugzilla.desktop.cmake
+++ b/filters/bugzilla/ktptextui_message_filter_bugzilla.desktop.cmake
@@ -46,6 +46,7 @@ Name[zh_CN]=Bugzilla 信息
Name[zh_TW]=Bugzilla 資訊
Comment=When receiving a link to a bug on bugzilla show additional information such as the title and status
Comment[ar]=عند استقبال وصلة لعلّة في بغزيلّا، أظهر معلومات إضافيّة كالعنوان والحالة
+Comment[ast]=Al recibise un enllaz a un fallu en bugzilla amuésase información adicional como'l títulu y l'estáu
Comment[bs]=Kada primite link na grešku na bugzilla, prikažite dodatnu informaciju kao što su naslov i status
Comment[ca]=En rebre un enllaç a un error del Bugzilla mostra informació addicional com el títol i l'estat
Comment[ca at valencia]=En rebre un enllaç a un error del Bugzilla mostra informació addicional com el títol i l'estat
diff --git a/filters/emoticons/emoticon-config.cpp b/filters/emoticons/emoticon-config.cpp
index 5b446a8..9631890 100644
--- a/filters/emoticons/emoticon-config.cpp
+++ b/filters/emoticons/emoticon-config.cpp
@@ -190,7 +190,9 @@ void EmoticonFilterConfig::defaults()
void EmoticonFilterConfig::addClicked()
{
- const QString account = QInputDialog::getItem(this, i18n("Add account"), i18n("Select account:"), accountsNotInList(), 0, false);
+ const QString account = QInputDialog::getItem(
+ this, i18nc("@title:window", "Add account"),
+ i18nc("@label:listbox", "Select account:"), accountsNotInList(), 0, false);
if (account.isEmpty()) {
return;
}
diff --git a/filters/emoticons/emoticon-config.ui b/filters/emoticons/emoticon-config.ui
index 28bbad2..edbc696 100644
--- a/filters/emoticons/emoticon-config.ui
+++ b/filters/emoticons/emoticon-config.ui
@@ -17,7 +17,7 @@
<item>
<widget class="QLabel" name="label">
<property name="text">
- <string>Custom emoticons for account:</string>
+ <string>Custom emoticons per account:</string>
</property>
</widget>
</item>
diff --git a/filters/emoticons/ktptextui_message_filter_emoticons.desktop.cmake b/filters/emoticons/ktptextui_message_filter_emoticons.desktop.cmake
index 6ef84c6..baec6ea 100644
--- a/filters/emoticons/ktptextui_message_filter_emoticons.desktop.cmake
+++ b/filters/emoticons/ktptextui_message_filter_emoticons.desktop.cmake
@@ -49,6 +49,7 @@ Name[zh_CN]=表情
Name[zh_TW]=表情圖示
Encoding=UTF-8
Comment=Show emoticons (smiley faces) inside the chat
+Comment[ast]=Amuesa fustaxes dientro la charra
Comment[bs]=Prikaži emotikone (izraze osjećanja znakovima) u ćaskanju
Comment[ca]=Mostra les emoticones (cares somrients) dins del xat
Comment[ca at valencia]=Mostra les emoticones (cares somrients) dins del xat
diff --git a/filters/latex/ktptextui_message_filter_latex.desktop.cmake b/filters/latex/ktptextui_message_filter_latex.desktop.cmake
index 3c66237..83835c6 100644
--- a/filters/latex/ktptextui_message_filter_latex.desktop.cmake
+++ b/filters/latex/ktptextui_message_filter_latex.desktop.cmake
@@ -16,6 +16,7 @@ X-KTp-PluginInfo-Version=@KTP_MESSAGE_FILTER_FRAMEWORK_VERSION@
Name=LaTeX Renderer
Name[ar]=مصيّر لاتخ
+Name[ast]=Renderizador LaTeX
Name[bs]=LaTeX Obrađivač
Name[ca]=Renderitzador LaTeX
Name[ca at valencia]=Renderitzador LaTeX
diff --git a/filters/texttospeech/CMakeLists.txt b/filters/texttospeech/CMakeLists.txt
index f3aaff8..d47bee4 100644
--- a/filters/texttospeech/CMakeLists.txt
+++ b/filters/texttospeech/CMakeLists.txt
@@ -1,11 +1,10 @@
-qt5_add_dbus_interfaces(ktptextui_message_filter_tts_SRCS ${KDE4_DBUS_INTERFACES_DIR}/org.kde.KSpeech.xml)
-
add_library (ktptextui_message_filter_tts MODULE tts-filter.cpp)
target_link_libraries (ktptextui_message_filter_tts
KF5::CoreAddons
KF5::I18n
KTp::CommonInternals
+ Qt5::TextToSpeech
)
# Install:
diff --git a/filters/texttospeech/tts-filter.cpp b/filters/texttospeech/tts-filter.cpp
index bb9c7a5..59c364e 100644
--- a/filters/texttospeech/tts-filter.cpp
+++ b/filters/texttospeech/tts-filter.cpp
@@ -18,32 +18,26 @@
#include "tts-filter.h"
-
#include <KPluginFactory>
#include <KLocalizedString>
-#include <kspeech.h>
-#include <kspeechinterface.h>
-
+#include <QTextToSpeech>
class TTSFilter::Private {
public:
- org::kde::KSpeech *kspeech;
+ QTextToSpeech *speech;
};
-static const KCatalogLoader loader(QLatin1String("ktp-filters"));
-
TTSFilter::TTSFilter(QObject *parent, const QVariantList &)
: KTp::AbstractMessageFilter(parent),
d(new Private)
{
- d->kspeech = new org::kde::KSpeech(QLatin1String("org.kde.kttsd"), QLatin1String("/KSpeech"), QDBusConnection::sessionBus());
- d->kspeech->setApplicationName(i18n("KDE Instant Messaging"));
+ d->speech = new QTextToSpeech();
}
TTSFilter::~TTSFilter()
{
- delete d->kspeech;
+ delete d->speech;
delete d;
}
@@ -59,11 +53,13 @@ void TTSFilter::filterMessage(KTp::Message &message, const KTp::MessageContext &
}
if (message.type() == Tp::ChannelTextMessageTypeNormal) {
- d->kspeech->say(i18nc("Text to Speech - text message %1 is name, %2 is message", "%1 says %2", message.mainMessagePart(), message.senderAlias()), KSpeech::soHtml);
+ d->speech->say(i18nc("Text to Speech - text message %1 is name, %2 is message", "%1 says %2", message.mainMessagePart(), message.senderAlias()));
}
else if (message.type() == Tp::ChannelTextMessageTypeAction) {
- d->kspeech->say(i18nc("Text to Speech - text message %1 is name, %2 is message", "%1 %2", message.mainMessagePart(), message.senderAlias()), KSpeech::soHtml);
+ d->speech->say(i18nc("Text to Speech - text message %1 is name, %2 is message", "%1 %2", message.mainMessagePart(), message.senderAlias()));
}
}
K_PLUGIN_FACTORY(MessageFilterFactory, registerPlugin<TTSFilter>();)
+
+#include "tts-filter.moc"
diff --git a/filters/youtube/ktptextui_message_filter_youtube.desktop.cmake b/filters/youtube/ktptextui_message_filter_youtube.desktop.cmake
index 47f15f6..53513ba 100644
--- a/filters/youtube/ktptextui_message_filter_youtube.desktop.cmake
+++ b/filters/youtube/ktptextui_message_filter_youtube.desktop.cmake
@@ -45,6 +45,7 @@ Name[zh_CN]=YouTube 预览
Name[zh_TW]=YouTube 預覽
Comment=If any messages contains a link to a YouTube video, it will embed a preview in the chat
Comment[ar]=إن احتوت أيّ رسالة وصلة إلى فيديو يوتيوب، ستُضمّن معاينة في الدّردشة.
+Comment[ast]=Si cualesquier mensaxe contién un enllaz a un videu de Youtube, empotraráse una previsualización na charra
Comment[bs]=Ako poruka sadrži vezu na YouTube video, oma će se ugraditi u pregled ćaskanja
Comment[ca]=Si qualsevol missatge conté un enllaç a un vídeo de YouTube, s'incrustarà una vista prèvia en el xat
Comment[ca at valencia]=Si qualsevol missatge conté un enllaç a un vídeo de YouTube, s'incrustarà una vista prèvia en el xat
diff --git a/lib/text-chat-config.cpp b/lib/text-chat-config.cpp
index 5cf5f6e..c9fc370 100644
--- a/lib/text-chat-config.cpp
+++ b/lib/text-chat-config.cpp
@@ -38,6 +38,7 @@ public:
bool m_showMeTyping;
bool m_showOthersTyping;
bool m_dontLeaveGroupChats;
+ bool m_rememberTabKeyboardLayout;
QString m_nicknameCompletionSuffix;
ShareProvider::ShareService m_imageShareServiceType;
};
@@ -90,6 +91,8 @@ void TextChatConfig::sync()
behaviorConfig.writeEntry("dontLeaveGroupChats", d->m_dontLeaveGroupChats);
+ behaviorConfig.writeEntry("rememberTabKeyboardLayout", d->m_rememberTabKeyboardLayout);
+
behaviorConfig.sync();
mutex.unlock();
@@ -211,6 +214,18 @@ void TextChatConfig::setDontLeaveGroupChats(bool dontLeaveGroupChats)
mutex.unlock();
}
+bool TextChatConfig::rememberTabKeyboardLayout() const
+{
+ return d->m_rememberTabKeyboardLayout;
+}
+
+void TextChatConfig::setRememberTabKeyboardLayout(bool change)
+{
+ mutex.lock();
+ d->m_rememberTabKeyboardLayout = change;
+ mutex.unlock();
+}
+
TextChatConfig::TextChatConfig() :
d(new TextChatConfigPrivate())
{
@@ -237,6 +252,8 @@ TextChatConfig::TextChatConfig() :
d->m_dontLeaveGroupChats = behaviorConfig.readEntry("dontLeaveGroupChats", false);
+ d->m_rememberTabKeyboardLayout = behaviorConfig.readEntry("rememberTabKeyboardLayout", false);
+
// Imgur is the default image sharing service
int shareServiceType = behaviorConfig.readEntry("imageShareServiceType", static_cast<int>(ShareProvider::Imgur));
d->m_imageShareServiceType = static_cast<ShareProvider::ShareService>(shareServiceType);
diff --git a/lib/text-chat-config.h b/lib/text-chat-config.h
index a02dee6..2741c00 100644
--- a/lib/text-chat-config.h
+++ b/lib/text-chat-config.h
@@ -67,6 +67,9 @@ class KDE_TELEPATHY_CHAT_EXPORT TextChatConfig : QObject
bool dontLeaveGroupChats() const;
void setDontLeaveGroupChats(bool dontLeaveGroupChats);
+ bool rememberTabKeyboardLayout() const;
+ void setRememberTabKeyboardLayout(bool change);
+
private:
TextChatConfig();
--
ktp-text-ui packaging
More information about the pkg-kde-commits
mailing list