[SCM] ktp-accounts-kcm packaging branch, master, updated. debian/15.12.1-1-1157-gc4589c5

Maximiliano Curia maxy at moszumanska.debian.org
Sat May 28 00:06:00 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-accounts-kcm.git;a=commitdiff;h=3ec930f

The following commit has been merged in the master branch:
commit 3ec930f1d0cf838c4150474dce390e7b4bfe9176
Author: David Edmundson <kde at davidedmundson.co.uk>
Date:   Tue Aug 26 19:02:19 2014 +0200

    Add Accounts KCM Plugin for Telegram
    
    REVIEW: 119941
---
 plugins/CMakeLists.txt                             |  1 +
 plugins/{butterfly => morse}/CMakeLists.txt        | 24 ++++++-------
 plugins/{butterfly => morse}/Messages.sh           |  0
 .../ktpaccountskcm_plugin_morse.desktop.cmake}     |  6 ++--
 .../{butterfly => morse}/main-options-widget.cpp   |  7 ++--
 plugins/{butterfly => morse}/main-options-widget.h |  2 +-
 .../{butterfly => morse}/main-options-widget.ui    | 42 +++++-----------------
 .../morse-account-ui-plugin.cpp}                   | 25 ++++++-------
 .../morse-account-ui-plugin.h}                     | 14 ++++----
 .../telegram-account-ui.cpp}                       | 13 ++++---
 .../telegram-account-ui.h}                         | 10 +++---
 11 files changed, 61 insertions(+), 83 deletions(-)

diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt
index 994fab4..8d5edc6 100644
--- a/plugins/CMakeLists.txt
+++ b/plugins/CMakeLists.txt
@@ -7,3 +7,4 @@ macro_optional_add_subdirectory (salut)
 macro_optional_add_subdirectory (sunshine)
 macro_optional_add_subdirectory (pintxo)
 macro_optional_add_subdirectory (sipe)
+macro_optional_add_subdirectory (morse)
diff --git a/plugins/butterfly/CMakeLists.txt b/plugins/morse/CMakeLists.txt
similarity index 58%
copy from plugins/butterfly/CMakeLists.txt
copy to plugins/morse/CMakeLists.txt
index 1d5d289..cadf17b 100644
--- a/plugins/butterfly/CMakeLists.txt
+++ b/plugins/morse/CMakeLists.txt
@@ -1,24 +1,24 @@
-project (ktpaccountskcm-plugin-butterfly)
+project (ktpaccountskcm-plugin-morse)
 
 include_directories (${CMAKE_CURRENT_BINARY_DIR}
                      ${CMAKE_CURRENT_SOURCE_DIR}
 )
 
-set (ktpaccountskcm_plugin_butterfly_SRCS
-     butterfly-account-ui-plugin.cpp
-     butterfly-account-ui.cpp
+set (ktpaccountskcm_plugin_morse_SRCS
+     morse-account-ui-plugin.cpp
+     telegram-account-ui.cpp
      main-options-widget.cpp
 )
 
-kde4_add_ui_files (ktpaccountskcm_plugin_butterfly_SRCS
+kde4_add_ui_files (ktpaccountskcm_plugin_morse_SRCS
                    main-options-widget.ui
 )
 
-kde4_add_plugin (ktpaccountskcm_plugin_butterfly
-                 ${ktpaccountskcm_plugin_butterfly_SRCS}
+kde4_add_plugin (ktpaccountskcm_plugin_morse
+                 ${ktpaccountskcm_plugin_morse_SRCS}
 )
 
-target_link_libraries (ktpaccountskcm_plugin_butterfly
+target_link_libraries (ktpaccountskcm_plugin_morse
                        ktpaccountskcminternal
                        ${QT_LIBRARIES}
                        ${KDE4_KDEUI_LIBS}
@@ -26,14 +26,14 @@ target_link_libraries (ktpaccountskcm_plugin_butterfly
 )
 
 # Install:
-install (TARGETS ktpaccountskcm_plugin_butterfly
+install (TARGETS ktpaccountskcm_plugin_morse
          DESTINATION ${PLUGIN_INSTALL_DIR}
 )
 
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/ktpaccountskcm_plugin_butterfly.desktop.cmake
-               ${CMAKE_CURRENT_BINARY_DIR}/ktpaccountskcm_plugin_butterfly.desktop
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/ktpaccountskcm_plugin_morse.desktop.cmake
+               ${CMAKE_CURRENT_BINARY_DIR}/ktpaccountskcm_plugin_morse.desktop
                @ONLY)
 
-install (FILES ${CMAKE_CURRENT_BINARY_DIR}/ktpaccountskcm_plugin_butterfly.desktop
+install (FILES ${CMAKE_CURRENT_BINARY_DIR}/ktpaccountskcm_plugin_morse.desktop
          DESTINATION ${SERVICES_INSTALL_DIR}
 )
diff --git a/plugins/butterfly/Messages.sh b/plugins/morse/Messages.sh
similarity index 100%
copy from plugins/butterfly/Messages.sh
copy to plugins/morse/Messages.sh
diff --git a/plugins/butterfly/ktpaccountskcm_plugin_butterfly.desktop.cmake b/plugins/morse/ktpaccountskcm_plugin_morse.desktop.cmake
similarity index 98%
copy from plugins/butterfly/ktpaccountskcm_plugin_butterfly.desktop.cmake
copy to plugins/morse/ktpaccountskcm_plugin_morse.desktop.cmake
index 0be40a3..4bb4678 100644
--- a/plugins/butterfly/ktpaccountskcm_plugin_butterfly.desktop.cmake
+++ b/plugins/morse/ktpaccountskcm_plugin_morse.desktop.cmake
@@ -1,6 +1,6 @@
 [Desktop Entry]
 Encoding=UTF-8
-Comment=Custom account configuration user interface for accounts using the Butterfly connection manager.
+Comment=Custom account configuration user interface for accounts using the Morse connection manager.
 Comment[bs]=Prilagođena konfiguracija korisničkog naloga pomoću upravitelja Butterfly veze.
 Comment[ca]=Interfície d'usuari de configuració de compte personalitzat per comptes que utilitzen el gestor de connexions Butterfly.
 Comment[ca at valencia]=Interfície d'usuari de configuració de compte personalitzat per comptes que utilitzen el gestor de connexions Butterfly.
@@ -45,10 +45,10 @@ Comment[zh_TW]=對使用 Butterfly 連線管理員的帳號自訂帳號設定使
 Type=Service
 ServiceTypes=KTpAccountsKCM/AccountUiPlugin
 
-X-KDE-Library=ktpaccountskcm_plugin_butterfly
+X-KDE-Library=ktpaccountskcm_plugin_morse
 X-KDE-PluginInfo-Author=David Edmundson
 X-KDE-PluginInfo-Email=kde at davidedmundson.co.uk
-X-KDE-PluginInfo-Name=butterfly
+X-KDE-PluginInfo-Name=morse
 X-KDE-PluginInfo-Version=@KTP_ACCOUNTS_KCM_VERSION@
 X-KDE-PluginInfo-Website=http://techbase.kde.org/Projects/Telepathy
 X-KDE-PluginInfo-License=GPL
diff --git a/plugins/butterfly/main-options-widget.cpp b/plugins/morse/main-options-widget.cpp
similarity index 87%
copy from plugins/butterfly/main-options-widget.cpp
copy to plugins/morse/main-options-widget.cpp
index d787b07..408c801 100644
--- a/plugins/butterfly/main-options-widget.cpp
+++ b/plugins/morse/main-options-widget.cpp
@@ -1,7 +1,7 @@
 /*
  * This file is part of telepathy-accounts-kcm
  *
- * Copyright (C) 2009 Collabora Ltd. <info at collabora.com>
+ * Copyright (C) 2014 David Edmundson <davidedmundson at kde.org>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -20,6 +20,8 @@
 
 #include "main-options-widget.h"
 
+#include <klocalizedstring.h>
+
 MainOptionsWidget::MainOptionsWidget(ParameterEditModel *model,
                                      QWidget *parent)
  : AbstractAccountParametersWidget(model, parent)
@@ -29,7 +31,6 @@ MainOptionsWidget::MainOptionsWidget(ParameterEditModel *model,
     m_ui->setupUi(this);
 
     handleParameter(QLatin1String("account"), QVariant::String, m_ui->accountLineEdit, m_ui->accountLabel);
-    handleParameter(QLatin1String("password"), QVariant::String, m_ui->passwordLineEdit, m_ui->passwordLabel);
 
     QTimer::singleShot(0, m_ui->accountLineEdit, SLOT(setFocus()));
 }
@@ -41,7 +42,7 @@ MainOptionsWidget::~MainOptionsWidget()
 
 QString MainOptionsWidget::defaultDisplayName() const
 {
-    return m_ui->accountLineEdit->text();
+    return i18nc("name of the IM service Telegram", "Telegram (%1)", m_ui->accountLineEdit->text());
 }
 
 #include "main-options-widget.moc"
diff --git a/plugins/butterfly/main-options-widget.h b/plugins/morse/main-options-widget.h
similarity index 95%
copy from plugins/butterfly/main-options-widget.h
copy to plugins/morse/main-options-widget.h
index 51bfc83..b0f36cf 100644
--- a/plugins/butterfly/main-options-widget.h
+++ b/plugins/morse/main-options-widget.h
@@ -1,7 +1,7 @@
 /*
  * This file is part of telepathy-accounts-kcm
  *
- * Copyright (C) 2009 Collabora Ltd. <info at collabora.com>
+ * Copyright (C) 2014 David Edmundson <davidedmundson at kde.org>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
diff --git a/plugins/butterfly/main-options-widget.ui b/plugins/morse/main-options-widget.ui
similarity index 63%
copy from plugins/butterfly/main-options-widget.ui
copy to plugins/morse/main-options-widget.ui
index e3df55b..497f88b 100644
--- a/plugins/butterfly/main-options-widget.ui
+++ b/plugins/morse/main-options-widget.ui
@@ -7,7 +7,7 @@
     <x>0</x>
     <y>0</y>
     <width>286</width>
-    <height>77</height>
+    <height>94</height>
    </rect>
   </property>
   <property name="sizePolicy">
@@ -23,53 +23,33 @@
    <property name="fieldGrowthPolicy">
     <enum>QFormLayout::ExpandingFieldsGrow</enum>
    </property>
-   <item row="0" column="0">
-    <widget class="QLabel" name="accountLabel">
+   <item row="3" column="1">
+    <widget class="QLabel" name="label">
      <property name="text">
-      <string>Email address:</string>
+      <string>An authentication code will be texted to your phone on first login.</string>
      </property>
-     <property name="alignment">
-      <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+     <property name="wordWrap">
+      <bool>true</bool>
      </property>
     </widget>
    </item>
-   <item row="0" column="1">
+   <item row="2" column="1">
     <widget class="KLineEdit" name="accountLineEdit">
      <property name="showClearButton" stdset="0">
       <bool>false</bool>
      </property>
     </widget>
    </item>
-   <item row="1" column="1">
-    <widget class="QLabel" name="label">
-     <property name="text">
-      <string>Example: user at hotmail.com</string>
-     </property>
-    </widget>
-   </item>
    <item row="2" column="0">
-    <widget class="QLabel" name="passwordLabel">
+    <widget class="QLabel" name="accountLabel">
      <property name="text">
-      <string>Password:</string>
+      <string>Phone Number:</string>
      </property>
      <property name="alignment">
       <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
      </property>
     </widget>
    </item>
-   <item row="2" column="1">
-    <widget class="KLineEdit" name="passwordLineEdit">
-     <property name="echoMode">
-      <enum>QLineEdit::Password</enum>
-     </property>
-     <property name="showClearButton" stdset="0">
-      <bool>true</bool>
-     </property>
-     <property name="passwordMode">
-      <bool>true</bool>
-     </property>
-    </widget>
-   </item>
   </layout>
  </widget>
  <customwidgets>
@@ -79,10 +59,6 @@
    <header>klineedit.h</header>
   </customwidget>
  </customwidgets>
- <tabstops>
-  <tabstop>accountLineEdit</tabstop>
-  <tabstop>passwordLineEdit</tabstop>
- </tabstops>
  <resources/>
  <connections/>
 </ui>
diff --git a/plugins/idle/idle-account-ui-plugin.cpp b/plugins/morse/morse-account-ui-plugin.cpp
similarity index 54%
copy from plugins/idle/idle-account-ui-plugin.cpp
copy to plugins/morse/morse-account-ui-plugin.cpp
index 7cbad3c..1adc823 100644
--- a/plugins/idle/idle-account-ui-plugin.cpp
+++ b/plugins/morse/morse-account-ui-plugin.cpp
@@ -1,7 +1,7 @@
 /*
  * This file is part of telepathy-accounts-kcm
  *
- * Copyright (C) 2011 Lasse Liehu <lliehu at kolumbus.fi>
+ * Copyright (C) 2014 David Edmundson <davidedmundson at kde.org>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -18,37 +18,38 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include "idle-account-ui-plugin.h"
+#include "morse-account-ui-plugin.h"
 
-#include "idle-account-ui.h"
+#include "telegram-account-ui.h"
 
 #include <KPluginFactory>
 
 #include <QtCore/QVariantList>
 
-IdleAccountUiPlugin::IdleAccountUiPlugin(QObject *parent, const QVariantList &)
+MorseAccountUiPlugin::MorseAccountUiPlugin(QObject *parent, const QVariantList &)
  : AbstractAccountUiPlugin(parent)
 {
     // Register supported cm/protocol combinations
-    registerProvidedProtocol(QLatin1String("idle"), QLatin1String("irc"));
+    registerProvidedProtocol(QLatin1String("morse"), QLatin1String("telegram"));
 }
 
-IdleAccountUiPlugin::~IdleAccountUiPlugin()
+MorseAccountUiPlugin::~MorseAccountUiPlugin()
 {
 }
 
-AbstractAccountUi* IdleAccountUiPlugin::accountUi(const QString &connectionManager, const QString &protocol, const QString &serviceName)
+AbstractAccountUi* MorseAccountUiPlugin::accountUi(const QString &connectionManager, const QString &protocol, const QString &serviceName)
 {
     Q_UNUSED(serviceName);
 
-    if ((connectionManager == QLatin1String("idle")) && (protocol == QLatin1String("irc"))) {
-        return new IdleAccountUi;
+    // We only support morse/xmpp combination.
+    if ((connectionManager == QLatin1String("morse")) && (protocol == QLatin1String("telegram"))) {
+        return new TelegramAccountUi;
     }
 
     return 0;
 }
 
-K_PLUGIN_FACTORY(factory, registerPlugin<IdleAccountUiPlugin>();)
-K_EXPORT_PLUGIN(factory("kcmtelepathyaccounts_plugin_idle"))
+K_PLUGIN_FACTORY(factory, registerPlugin<MorseAccountUiPlugin>();)
+K_EXPORT_PLUGIN(factory("kcmtelepathyaccounts_plugin_morse"))
 
-#include "idle-account-ui-plugin.moc"
+#include "morse-account-ui-plugin.moc"
diff --git a/plugins/idle/idle-account-ui-plugin.h b/plugins/morse/morse-account-ui-plugin.h
similarity index 73%
copy from plugins/idle/idle-account-ui-plugin.h
copy to plugins/morse/morse-account-ui-plugin.h
index 5453570..f46192b 100644
--- a/plugins/idle/idle-account-ui-plugin.h
+++ b/plugins/morse/morse-account-ui-plugin.h
@@ -1,7 +1,7 @@
 /*
  * This file is part of telepathy-accounts-kcm
  *
- * Copyright (C) 2011 Lasse Liehu <lliehu at kolumbus.fi>
+ * Copyright (C) 2014 David Edmundson <davidedmundson at kde.org>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -18,25 +18,25 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#ifndef KCMTELEPATHYACCOUNTS_PLUGIN_IDLE_ACCOUNT_UI_PLUGIN_H
-#define KCMTELEPATHYACCOUNTS_PLUGIN_IDLE_ACCOUNT_UI_PLUGIN_H
+#ifndef KCMTELEPATHYACCOUNTS_PLUGIN_MORSE_ACCOUNT_UI_PLUGIN_H
+#define KCMTELEPATHYACCOUNTS_PLUGIN_MORSE_ACCOUNT_UI_PLUGIN_H
 
 #include <KCMTelepathyAccounts/AbstractAccountUiPlugin>
 
 #include <QtCore/QVariantList>
 
-class IdleAccountUiPlugin : public AbstractAccountUiPlugin
+class MorseAccountUiPlugin : public AbstractAccountUiPlugin
 {
     Q_OBJECT
 
 public:
-    IdleAccountUiPlugin(QObject *parent, const QVariantList &);
-    virtual ~IdleAccountUiPlugin();
+    MorseAccountUiPlugin(QObject *parent, const QVariantList &);
+    virtual ~MorseAccountUiPlugin();
 
     virtual AbstractAccountUi* accountUi(const QString &connectionManager, const QString &protocol, const QString &serviceName);
 
 private:
-    Q_DISABLE_COPY(IdleAccountUiPlugin);
+    Q_DISABLE_COPY(MorseAccountUiPlugin);
 };
 
 
diff --git a/plugins/butterfly/butterfly-account-ui.cpp b/plugins/morse/telegram-account-ui.cpp
similarity index 75%
copy from plugins/butterfly/butterfly-account-ui.cpp
copy to plugins/morse/telegram-account-ui.cpp
index bacc148..840cbf2 100644
--- a/plugins/butterfly/butterfly-account-ui.cpp
+++ b/plugins/morse/telegram-account-ui.cpp
@@ -1,7 +1,7 @@
 /*
  * This file is part of telepathy-accounts-kcm
  *
- * Copyright (C) 2009 Collabora Ltd. <info at collabora.com>
+ * Copyright (C) 2014 David Edmundson <davidedmundson at kde.org>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -18,28 +18,27 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include "butterfly-account-ui.h"
+#include "telegram-account-ui.h"
 #include "main-options-widget.h"
 
 #include <KCMTelepathyAccounts/AbstractAccountParametersWidget>
 
-ButterflyAccountUi::ButterflyAccountUi(QObject *parent)
+TelegramAccountUi::TelegramAccountUi(QObject *parent)
  : AbstractAccountUi(parent)
 {
     // Register supported parameters
     registerSupportedParameter(QLatin1String("account"), QVariant::String);
-    registerSupportedParameter(QLatin1String("password"), QVariant::String);
 }
 
-ButterflyAccountUi::~ButterflyAccountUi()
+TelegramAccountUi::~TelegramAccountUi()
 {
 }
 
-AbstractAccountParametersWidget *ButterflyAccountUi::mainOptionsWidget(
+AbstractAccountParametersWidget *TelegramAccountUi::mainOptionsWidget(
         ParameterEditModel *model,
         QWidget *parent) const
 {
     return new MainOptionsWidget(model, parent);
 }
 
-#include "butterfly-account-ui.moc"
+#include "telegram-account-ui.moc"
diff --git a/plugins/butterfly/butterfly-account-ui.h b/plugins/morse/telegram-account-ui.h
similarity index 83%
copy from plugins/butterfly/butterfly-account-ui.h
copy to plugins/morse/telegram-account-ui.h
index 1845570..1de3735 100644
--- a/plugins/butterfly/butterfly-account-ui.h
+++ b/plugins/morse/telegram-account-ui.h
@@ -1,7 +1,7 @@
 /*
  * This file is part of telepathy-accounts-kcm
  *
- * Copyright (C) 2009 Collabora Ltd. <info at collabora.com>
+ * Copyright (C) 2014 David Edmundson <davidedmundson at kde.org>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -23,19 +23,19 @@
 
 #include <KCMTelepathyAccounts/AbstractAccountUi>
 
-class ButterflyAccountUi : public AbstractAccountUi
+class TelegramAccountUi : public AbstractAccountUi
 {
     Q_OBJECT
 
 public:
-    explicit ButterflyAccountUi(QObject *parent = 0);
-    virtual ~ButterflyAccountUi();
+    explicit TelegramAccountUi(QObject *parent = 0);
+    virtual ~TelegramAccountUi();
 
     virtual AbstractAccountParametersWidget
               *mainOptionsWidget(ParameterEditModel *model,
                                  QWidget *parent = 0) const;
 private:
-    Q_DISABLE_COPY(ButterflyAccountUi);
+    Q_DISABLE_COPY(TelegramAccountUi);
 };
 
 

-- 
ktp-accounts-kcm packaging



More information about the pkg-kde-commits mailing list