[SCM] ktp-text-ui packaging branch, master, updated. debian/15.12.1-1-1918-gdf4b0ec
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 00:24:41 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=ec06053
The following commit has been merged in the master branch:
commit ec06053326d237f4cc21843be200df81341120d0
Author: Marcin Ziemiński <zieminn at gmail.com>
Date: Thu Jun 26 01:57:45 2014 +0200
Added OTR configure KCModule to the settings
---
app/chat-window.cpp | 1 +
config/CMakeLists.txt | 22 ++-
config/kcm_ktp_chat_otr.desktop | 122 ++++++++++++++++
config/ktp_otr.kcfg | 25 ++++
config/ktp_otr.kcfgc | 7 +
config/{appearance-config.h => otr-config.cpp} | 56 +++++---
logviewer/entity-view.h => config/otr-config.h | 33 +++--
config/otr-config.ui | 186 +++++++++++++++++++++++++
lib/otr-channel-interface.h | 1 +
9 files changed, 414 insertions(+), 39 deletions(-)
diff --git a/app/chat-window.cpp b/app/chat-window.cpp
index 57a2c0d..b63b02b 100644
--- a/app/chat-window.cpp
+++ b/app/chat-window.cpp
@@ -734,6 +734,7 @@ void ChatWindow::showSettingsDialog()
dialog->addModule(QLatin1String("kcm_ktp_chat_behavior"));
dialog->addModule(QLatin1String("kcm_ktp_chat_messages"));
+ dialog->addModule(QLatin1String("kcm_ktp_chat_otr"));
dialog->setAttribute(Qt::WA_DeleteOnClose);
dialog->show();
diff --git a/config/CMakeLists.txt b/config/CMakeLists.txt
index ef69dd0..8a0aab0 100644
--- a/config/CMakeLists.txt
+++ b/config/CMakeLists.txt
@@ -4,16 +4,23 @@ include_directories(${CMAKE_SOURCE_DIR}/image-sharer)
set(kcm_ktp_chat_appearance_SRCS appearance-config-tab.cpp appearance-config.cpp)
set(kcm_ktp_chat_behavior_SRCS behavior-config.cpp)
set(kcm_ktp_chat_messages_SRCS messages-config.cpp)
+set(kcm_ktp_chat_otr_SRCS otr-config.cpp)
set(kcm_ktp_chat_appearance_UI appearance-config.ui)
set(kcm_ktp_chat_behavior_UI behavior-config.ui)
+set(kcm_ktp_chat_otr_UI otr-config.ui)
+
+kde4_add_kcfg_files(kcm_ktp_chat_otr_SRCS ktp_otr.kcfgc)
kde4_add_ui_files(kcm_ktp_chat_appearance_SRCS ${kcm_ktp_chat_appearance_UI})
kde4_add_ui_files(kcm_ktp_chat_behavior_SRCS ${kcm_ktp_chat_behavior_UI})
+kde4_add_ui_files(kcm_ktp_chat_behavior_SRCS ${kcm_ktp_chat_behavior_UI})
+kde4_add_ui_files(kcm_ktp_chat_otr_SRCS ${kcm_ktp_chat_otr_UI})
kde4_add_plugin(kcm_ktp_chat_appearance ${kcm_ktp_chat_appearance_SRCS})
kde4_add_plugin(kcm_ktp_chat_behavior ${kcm_ktp_chat_behavior_SRCS})
kde4_add_plugin(kcm_ktp_chat_messages ${kcm_ktp_chat_messages_SRCS})
+kde4_add_plugin(kcm_ktp_chat_otr ${kcm_ktp_chat_otr_SRCS})
target_link_libraries(kcm_ktp_chat_appearance
${KDE4_KDECORE_LIBS}
@@ -37,16 +44,29 @@ target_link_libraries(kcm_ktp_chat_messages
ktpchat
)
+target_link_libraries(kcm_ktp_chat_otr
+ ${KDE4_KDECORE_LIBS}
+ ${KDE4_KDEUI_LIBS}
+ ${KDE4_KUTILS_LIBS}
+ ${KTP_LIBRARIES}
+ ktpchat
+)
install(TARGETS
kcm_ktp_chat_appearance
kcm_ktp_chat_behavior
kcm_ktp_chat_messages
+ kcm_ktp_chat_otr
DESTINATION ${PLUGIN_INSTALL_DIR}
)
install(FILES
kcm_ktp_chat_appearance.desktop
kcm_ktp_chat_behavior.desktop
kcm_ktp_chat_messages.desktop
+ kcm_ktp_chat_otr.desktop
DESTINATION ${SERVICES_INSTALL_DIR}
-)
\ No newline at end of file
+)
+
+install(FILES
+ ktp_otr.kcfg
+ DESTINATION ${KCFG_INSTALL_DIR})
diff --git a/config/kcm_ktp_chat_otr.desktop b/config/kcm_ktp_chat_otr.desktop
new file mode 100644
index 0000000..e541199
--- /dev/null
+++ b/config/kcm_ktp_chat_otr.desktop
@@ -0,0 +1,122 @@
+[Desktop Entry]
+Type=Service
+Icon=mail-encrypt
+StartupNotify=true
+Terminal=false
+X-DBUS-StartupType=
+X-KDE-HasReadOnlyMode=false
+X-KDE-Library=kcm_ktp_chat_otr
+X-KDE-SubstituteUID=false
+X-KDE-RootOnly=false
+Categories=Qt;KDE;X-KDE-settings-network;
+
+Comment=Encrypt chat sessions with Off-The-Record encryption
+Comment[ar]=شفر جلسة الدردشة بـ تعطيل-التسجيل المشفر
+Comment[ast]=Cifrar les charres col cifráu «Off-The-Record»
+Comment[bg]=Шифриране на разговорите с Off-The-Record
+Comment[bs]=Šifrirajte sesije časkanja sa Off-The-Record šifrovanjem
+Comment[ca]=Encripta les sessions de xat amb un encriptatge «Off-The-Record»
+Comment[ca at valencia]=Encripta les sessions de xat amb un encriptatge «Off-The-Record»
+Comment[cs]=Šifrovat rozhovory pomocí OTR
+Comment[da]=Kryptér chatsessioner med 'uofficielt'-kryptering
+Comment[de]=Chatsitzung mit Off-The-Record-Verschlüsselung sichern
+Comment[el]=Κρυπτογράφηση συνομιλιών με ανεπίσημη κρυπτογράφηση
+Comment[en_GB]=Encrypt chat sessions with Off-The-Record encryption
+Comment[es]=Cifrar las sesiones de charla con el cifrado «Off-The-Record»
+Comment[et]=Vestlusseansside krüptimine Off-The-Record krüptimisega
+Comment[eu]=Enkriptatu berriketako saioak Off-The-Record enkriptazioarekin
+Comment[fi]=Salaa keskusteluistuntosi Off-The-Record-salauksella
+Comment[fr]=Protéger les sessions de discussions avec le chiffrement Off-The-Record
+Comment[ga]=Criptigh seisiúin chomhráite le criptiú Off-The-Record
+Comment[gl]=Cifra as sesións de conversa mediante cifrado non rexistrado
+Comment[hr]=Kriptiraj razgovorne sjednice enkripcijom Off-The-Record
+Comment[hu]=A csevegések titkosítása Off-The-Record kódolással
+Comment[ia]=Crypta sessiones de conversation in directo con cryptation informal (OTR)
+Comment[it]=Cifra le sessioni di chat con la cifratura Off-The-Record
+Comment[ja]=OTR (Off-the-Record) プロトコルでチャットセッションを暗号化します
+Comment[kk]=Әңгіме-дүкен сеанстарды Off-The-Record шифрымен шифрлау
+Comment[km]=អ៊ិនគ្រីបសម័យជជែកកំសាន្តជាមួយនឹងការបិទការអ៊ិនគ្រីបថត
+Comment[ko]=Off-The-Record 암호화를 사용하여 대화 세션을 암호화합니다
+Comment[lt]=Pokalbio seansus šifruoti Off-the-Record kodu
+Comment[lv]=Šifrēt tērzēšanas sesijas ar Off-the-Record šifrēšanu
+Comment[ml]=സംഭാഷണവേളകള് രേഖപ്പെടുത്താതെ കോഡീകരിച്ച് രഹസ്യമാക്കിവെക്കുക
+Comment[nb]=Krypter prateøkter med Off-The-Record-kryptering
+Comment[nds]=Verslötelt Klööntörns mit "Off-The-Record"- (engl. Buten-Protokoll-)Verslöteln
+Comment[nl]=Versleutel gesprekken met Off-The-Record-versleuteling
+Comment[nn]=Krypter prateøkter med Off-The-Record-kryptering
+Comment[pl]=Szyfrowanie sesji rozmowy za pomocą Off-The-Record
+Comment[pt]=Encriptar as sessões de conversão com encriptação OTR (Off-The-Record - Não Oficial)
+Comment[pt_BR]=Criptografa as sessões de bate-papo com criptografia OTR (Off-The-Record)
+Comment[ro]=Criptează sesiunile de discuție cu criptare Off-The-Record
+Comment[ru]=Шифрует разговоры по протоколу OTR
+Comment[si]=වාර්ථාවෙන්-බැහැර සංකේතන භාවිතයෙන් සංවාද වාර සංකේතනය කරන්න
+Comment[sk]=Zašifruje rozhovory pomocou Off-The-Record (OTR) šifrovania
+Comment[sl]=Šifriranje klepetov s pomočjo šifriranja Off-The-Record
+Comment[sr]=Шифрујте сесије ћаскања оф‑д‑рекордом
+Comment[sr at ijekavian]=Шифрујте сесије ћаскања оф‑д‑рекордом
+Comment[sr at ijekavianlatin]=Šifrujte sesije ćaskanja Off‑The‑Recordom
+Comment[sr at latin]=Šifrujte sesije ćaskanja Off‑The‑Recordom
+Comment[sv]=Kryptera chattsessioner med Off-The-Record kryptering
+Comment[tr]=Oturumları Off-The-Record (Kayıt Dışı) şifrelemesi ile şifrele
+Comment[uk]=Зашифрувати сеанси балачок шифруванням Off-The-Record
+Comment[x-test]=xxEncrypt chat sessions with Off-The-Record encryptionxx
+Comment[zh_CN]=用非正式加密算法加密聊天会话
+Comment[zh_TW]=使用私下加密(Off-The-Record)來加密聊天階段
+Name=OTR
+Name[ar]=OTR
+Name[ast]=OTR
+Name[bg]=OTR
+Name[bs]=OTR
+Name[ca]=OTR
+Name[ca at valencia]=OTR
+Name[cs]=OTR
+Name[da]=OTR
+Name[de]=OTR
+Name[el]=OTR
+Name[en_GB]=OTR
+Name[eo]=OTR
+Name[es]=OTR
+Name[et]=OTR
+Name[eu]=OTR
+Name[fi]=OTR
+Name[fr]=OTR
+Name[ga]=OTR
+Name[gl]=OTR
+Name[hne]=ओटीआर
+Name[hr]=OTR
+Name[hu]=OTR
+Name[ia]=OTR
+Name[it]=OTR
+Name[ja]=OTR
+Name[kk]=OTR
+Name[km]=OTR
+Name[ko]=OTR
+Name[lt]=Off-the-Record
+Name[lv]=OTR
+Name[ml]=ഓടിആര്
+Name[nb]=OTR
+Name[nds]=OTR
+Name[nl]=OTR
+Name[nn]=OTR
+Name[pa]=OTR
+Name[pl]=OTR
+Name[pt]=OTR
+Name[pt_BR]=OTR
+Name[ro]=OTR
+Name[ru]=OTR
+Name[si]=OTR
+Name[sk]=OTR
+Name[sl]=OTR
+Name[sq]=OTR
+Name[sr]=ОТР
+Name[sr at ijekavian]=ОТР
+Name[sr at ijekavianlatin]=OTR
+Name[sr at latin]=OTR
+Name[sv]=OTR
+Name[tr]=OTR
+Name[ug]=OTR
+Name[uk]=OTR
+Name[x-test]=xxOTRxx
+Name[zh_CN]=非正式加密
+Name[zh_TW]=OTR
+
diff --git a/config/ktp_otr.kcfg b/config/ktp_otr.kcfg
new file mode 100644
index 0000000..64b984b
--- /dev/null
+++ b/config/ktp_otr.kcfg
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE kcfg SYSTEM "http://www.kde.org/standards/kcfg/1.0/kcfg.dtd">
+<kcfg>
+<kcfgfile name="ktp_otr"/>
+ <group name="Policy">
+ <entry name="rbAlways" type="Bool">
+ <label>Always encrypt outgoing messages</label>
+ <default>false</default>
+ </entry>
+ <entry name="rbManual" type="Bool">
+ <label>Encrypt messages if the other side requests an OTR connection</label>
+ <default>true</default>
+ </entry>
+ <entry name="rbNever" type="Bool">
+ <label>Never encrypt outgoing messages</label>
+ <default>false</default>
+ </entry>
+ </group>
+ <group name="Logging">
+ <entry name="cbLogEncrypted" type="Bool">
+ <label>Log messages during encrypted conversation</label>
+ <default>true</default>
+ </entry>
+ </group>
+</kcfg>
diff --git a/config/ktp_otr.kcfgc b/config/ktp_otr.kcfgc
new file mode 100644
index 0000000..d5d71d8
--- /dev/null
+++ b/config/ktp_otr.kcfgc
@@ -0,0 +1,7 @@
+File=ktp_otr.kcfg
+ClassName=KtpOtrKcfg
+Singleton=true
+Mutators=true
+MemberVariables=private
+ItemAccessors=true
+GlobalEnums=true
diff --git a/config/appearance-config.h b/config/otr-config.cpp
similarity index 57%
copy from config/appearance-config.h
copy to config/otr-config.cpp
index f0e1168..c6eb3c4 100644
--- a/config/appearance-config.h
+++ b/config/otr-config.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2011 by David Edmundson <kde at davidedmundson.co.uk> *
+ * Copyright (C) 2014 by Marcin Ziemiński <zieminn at gmail.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
@@ -17,35 +17,45 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
-#ifndef APPEARANCE_CONFIG_H
-#define APPEARANCE_CONFIG_H
+#include "otr-config.h"
+#include "ui_otr-config.h"
+#include "ktp_otr.h"
-#include "adium-theme-header-info.h"
-#include "appearance-config-tab.h"
+#include <KDebug>
+#include <KPluginFactory>
+#include <KLocalizedString>
+#include <QtGui/QtEvents>
-#include <KCModule>
+K_PLUGIN_FACTORY(KCMTelepathyChatOtrConfigFactory, registerPlugin<OTRConfig>();)
+K_EXPORT_PLUGIN(KCMTelepathyChatOtrConfigFactory("ktp_chat_otr", "kcm_ktp_chat_otr"))
-class AppearanceConfig : public KCModule
+OTRConfig::OTRConfig(QWidget *parent, const QVariantList& args)
+ : KCModule(KCMTelepathyChatOtrConfigFactory::componentData(), parent, args),
+ ui(new Ui::OTRConfigUi())
{
- Q_OBJECT
+ kDebug();
-public:
- explicit AppearanceConfig(QWidget *parent = 0,
- const QVariantList &args = QVariantList());
- ~AppearanceConfig();
+ ui->setupUi(this);
-public Q_SLOTS:
- virtual void save();
- virtual void load();
- virtual void defaults();
+ addConfig(KtpOtrKcfg::self(), this);
+ KtpOtrKcfg::self()->readConfig();
+}
-Q_SIGNALS:
- void reloadTheme();
+OTRConfig::~OTRConfig()
+{
+ delete ui;
+}
-protected:
- AppearanceConfigTab *m_singleTab;
- AppearanceConfigTab *m_groupTab;
-};
+void OTRConfig::changeEvent(QEvent* e)
+{
+ QWidget::changeEvent(e);
+ switch (e->type()) {
+ case QEvent::LanguageChange:
+ ui->retranslateUi(this);
+ break;
+ default:
+ break;
+ }
+}
-#endif // APPEARANCE_CONFIG_H
diff --git a/logviewer/entity-view.h b/config/otr-config.h
similarity index 69%
copy from logviewer/entity-view.h
copy to config/otr-config.h
index 5505052..9ecb0ff 100644
--- a/logviewer/entity-view.h
+++ b/config/otr-config.h
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2012 by David Edmundson <kde at davidedmundson.co.uk> *
+ * Copyright (C) 2014 by Marcin Ziemiński <zieminn at gmail.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
@@ -17,28 +17,31 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
-#ifndef ENTITYVIEW_H
-#define ENTITYVIEW_H
-#include <QTreeView>
+#ifndef OTR_CONFIG_H
+#define OTR_CONFIG_H
-//model is loaded asynchronously so we need to select the correct element on each new element
-//this is done in the view to avoid having to be careful with proxy models.
+#include <KCModule>
-class EntityView : public QTreeView
+namespace Ui {
+class OTRConfigUi;
+}
+
+class OTRConfig : public KCModule
{
Q_OBJECT
-public:
- explicit EntityView(QWidget *parent = 0);
- void setModel(QAbstractItemModel *model);
+public:
+ explicit OTRConfig(QWidget *parent = 0, const QVariantList &args = QVariantList());
+ virtual ~OTRConfig();
-Q_SIGNALS:
- void noSuchContact();
+protected:
+ virtual void changeEvent(QEvent *e);
-protected Q_SLOTS:
- void rowsInserted(const QModelIndex &parent, int start, int end);
+private Q_SLOTS:
+private:
+ Ui::OTRConfigUi *ui;
};
-#endif // ENTITYVIEW_H
+#endif // OTR_CONFIG_H
diff --git a/config/otr-config.ui b/config/otr-config.ui
new file mode 100644
index 0000000..a696cde
--- /dev/null
+++ b/config/otr-config.ui
@@ -0,0 +1,186 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>OTRConfigUi</class>
+ <widget class="QWidget" name="OTRConfigUi">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>548</width>
+ <height>495</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>OTR Preferences</string>
+ </property>
+ <layout class="QGridLayout">
+ <item row="0" column="0">
+ <layout class="QGridLayout" name="mainLayout">
+ <item row="1" column="0">
+ <widget class="QGroupBox" name="gbPolicy">
+ <property name="title">
+ <string>Default OTR Policy</string>
+ </property>
+ <layout class="QGridLayout">
+ <item row="0" column="0">
+ <widget class="QRadioButton" name="kcfg_rbAlways">
+ <property name="toolTip">
+ <string>Always encrypt messages</string>
+ </property>
+ <property name="text">
+ <string>Al&ways</string>
+ </property>
+ <property name="checked">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QRadioButton" name="kcfg_rbManual">
+ <property name="toolTip">
+ <string>Encrypt messages if the other side requests an OTR connection</string>
+ </property>
+ <property name="text">
+ <string>&Manual</string>
+ </property>
+ <property name="checked">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2">
+ <widget class="QRadioButton" name="kcfg_rbNever">
+ <property name="toolTip">
+ <string>Never encrypt messages</string>
+ </property>
+ <property name="text">
+ <string>Ne&ver</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="0" column="0">
+ <widget class="QGroupBox" name="gbFingerprints">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title">
+ <string>Private Keys</string>
+ </property>
+ <layout class="QGridLayout">
+ <item row="0" column="0">
+ <widget class="QLabel" name="textLabel2">
+ <property name="text">
+ <string>Account:</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QComboBox" name="cbKeys">
+ <property name="maximumSize">
+ <size>
+ <width>400</width>
+ <height>32767</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2">
+ <widget class="QPushButton" name="btGenFingerprint">
+ <property name="text">
+ <string>&Generate</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Fingerprint:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QLabel" name="tlFingerprint">
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="text">
+ <string>No Fingerprint</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignVCenter</set>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ <property name="textInteractionFlags">
+ <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2">
+ <spacer>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>71</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <spacer>
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>161</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="2" column="0">
+ <widget class="QGroupBox" name="gbLogging">
+ <property name="title">
+ <string>Logging</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout3">
+ <item row="0" column="0">
+ <widget class="QCheckBox" name="kcfg_cbLogEncrypted">
+ <property name="toolTip">
+ <string>Log messages during encrypted conversation</string>
+ </property>
+ <property name="text">
+ <string>Log encrypted conversations</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/lib/otr-channel-interface.h b/lib/otr-channel-interface.h
index 05a74b0..2db81b0 100644
--- a/lib/otr-channel-interface.h
+++ b/lib/otr-channel-interface.h
@@ -32,6 +32,7 @@
#include <QDBusPendingReply>
+#include <TelepathyQt/ChannelInterface>
#include <TelepathyQt/AbstractInterface>
#include <TelepathyQt/DBusProxy>
#include <TelepathyQt/Global>
--
ktp-text-ui packaging
More information about the pkg-kde-commits
mailing list