Commit 5d56c106 authored by Björn Bidar's avatar Björn Bidar Committed by David Edmundson

added support for skypeweb

added support for skypeweb

REVIEW: 128303
parent 47e57df5
<?xml version="1.0" encoding="UTF-8" ?>
<service id="ktp-haze-skypeweb-im">
<type>IM</type>
<!-- ICQ Chat - Service name being displayed as a checkbox label to enable/disable this service -->
<_name>Chat</_name>
<icon>im-skype</icon>
<provider>ktp-haze-skypeweb</provider>
<translations>kaccounts-providers</translations>
<template>
<group name="telepathy">
<setting name="manager">haze</setting>
<setting name="protocol">skypeweb</setting>
</group>
<group name="auth">
<setting name="method">password</setting>
<setting name="mechanism">password</setting>
</group>
</template>
</service>
<?xml version="1.0" encoding="UTF-8"?>
<provider id="ktp-haze-skypeweb">
<_name>Skype</_name>
<icon>im-skype</icon>
<!-- Tooltip text appearing over the button to create this type of account -->
<_description>Chat account in the Skype network</_description>
<translations>kaccounts-providers</translations>
<plugin>ktpaccountskcm_plugin_kaccounts</plugin>
</provider>
...@@ -33,6 +33,8 @@ set (ktpaccountskcm_plugin_haze_SRCS ...@@ -33,6 +33,8 @@ set (ktpaccountskcm_plugin_haze_SRCS
haze-sipe-account.cpp haze-sipe-account.cpp
sipe-main-options-widget.cpp sipe-main-options-widget.cpp
sipe-advanced-settings-widget.cpp sipe-advanced-settings-widget.cpp
skypeweb-options-widget.cpp
haze-skypeweb-account.cpp
) )
ki18n_wrap_ui (ktpaccountskcm_plugin_haze_SRCS ki18n_wrap_ui (ktpaccountskcm_plugin_haze_SRCS
...@@ -52,6 +54,7 @@ ki18n_wrap_ui (ktpaccountskcm_plugin_haze_SRCS ...@@ -52,6 +54,7 @@ ki18n_wrap_ui (ktpaccountskcm_plugin_haze_SRCS
steam-main-options-widget.ui steam-main-options-widget.ui
sipe-main-options-widget.ui sipe-main-options-widget.ui
sipe-advanced-settings-widget.ui sipe-advanced-settings-widget.ui
skypeweb-options-widget.ui
) )
add_library (ktpaccountskcm_plugin_haze MODULE add_library (ktpaccountskcm_plugin_haze MODULE
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include "haze-account-ui-plugin.h" #include "haze-account-ui-plugin.h"
#include "haze-icq-account.h" #include "haze-icq-account.h"
#include "haze-skypeweb-account.h"
#include "haze-myspaceim-account-ui.h" #include "haze-myspaceim-account-ui.h"
#include "haze-skype-account-ui.h" #include "haze-skype-account-ui.h"
#include "haze-yahoo-account.h" #include "haze-yahoo-account.h"
...@@ -47,6 +48,7 @@ HazeAccountUiPlugin::HazeAccountUiPlugin(QObject *parent, const QVariantList &) ...@@ -47,6 +48,7 @@ HazeAccountUiPlugin::HazeAccountUiPlugin(QObject *parent, const QVariantList &)
registerProvidedProtocol(QLatin1String("haze"), QLatin1String("groupwise")); registerProvidedProtocol(QLatin1String("haze"), QLatin1String("groupwise"));
registerProvidedProtocol(QLatin1String("haze"), QLatin1String("steam-mobile")); registerProvidedProtocol(QLatin1String("haze"), QLatin1String("steam-mobile"));
registerProvidedProtocol(QLatin1String("haze"), QLatin1String("sipe")); registerProvidedProtocol(QLatin1String("haze"), QLatin1String("sipe"));
registerProvidedProtocol(QLatin1String("haze"), QLatin1String("skypeweb"));
} }
HazeAccountUiPlugin::~HazeAccountUiPlugin() HazeAccountUiPlugin::~HazeAccountUiPlugin()
...@@ -60,6 +62,8 @@ AbstractAccountUi* HazeAccountUiPlugin::accountUi(const QString &connectionManag ...@@ -60,6 +62,8 @@ AbstractAccountUi* HazeAccountUiPlugin::accountUi(const QString &connectionManag
if (connectionManager == QLatin1String("haze")) { if (connectionManager == QLatin1String("haze")) {
if (protocol == QLatin1String("icq")) { if (protocol == QLatin1String("icq")) {
return new HazeIcqAccountUi; return new HazeIcqAccountUi;
} else if (protocol == QLatin1String("skypeweb")) {
return new HazeSkypeWebAccountUi;
} else if (protocol == QLatin1String("myspace")) { } else if (protocol == QLatin1String("myspace")) {
return new HazeMySpaceIMAccountUi; return new HazeMySpaceIMAccountUi;
} else if (protocol == QLatin1String("bigbrownchunx-skype-dbus")) { } else if (protocol == QLatin1String("bigbrownchunx-skype-dbus")) {
......
/*
* This file is part of telepathy-accounts-kcm
*
* Copyright (C) 2016 Björn Bidar <theodorstormgrade@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "haze-skypeweb-account.h"
#include "skypeweb-options-widget.h"
#include <KCMTelepathyAccounts/AbstractAccountParametersWidget>
HazeSkypeWebAccountUi::HazeSkypeWebAccountUi(QObject *parent)
: AbstractAccountUi(parent)
{
// Register supported parameters
registerSupportedParameter(QLatin1String("account"), QVariant::String);
registerSupportedParameter(QLatin1String("password"), QVariant::String);
}
HazeSkypeWebAccountUi::~HazeSkypeWebAccountUi()
{
}
AbstractAccountParametersWidget *HazeSkypeWebAccountUi::mainOptionsWidget(
ParameterEditModel *model,
QWidget *parent) const
{
return new SkypeWebOptionsWidget(model, parent);
}
bool HazeSkypeWebAccountUi::hasAdvancedOptionsWidget() const
{
return false;
}
#include "haze-skypeweb-account.moc"
/*
* This file is part of telepathy-accounts-kcm
*
* Copyright (C) 2016 Björn Bidar <theodorstormgrade@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef KCMTELEPATHYACCOUNTS_PLUGIN_HAZE_SKYPEWEB_ACCOUNT_H
#define KCMTELEPATHYACCOUNTS_PLUGIN_HAZE_SKYPEWEB_ACCOUNT_H
#include <KCMTelepathyAccounts/AbstractAccountUi>
class HazeSkypeWebAccountUi : public AbstractAccountUi
{
Q_OBJECT
public:
explicit HazeSkypeWebAccountUi(QObject *parent = 0);
virtual ~HazeSkypeWebAccountUi();
virtual AbstractAccountParametersWidget
*mainOptionsWidget(ParameterEditModel *model,
QWidget *parent = 0) const;
virtual bool hasAdvancedOptionsWidget() const;
private:
Q_DISABLE_COPY(HazeSkypeWebAccountUi);
};
#endif // header guard
/*
* This file is part of telepathy-accounts-kcm
*
* Copyright (C) 2016 Björn Bidar <theodorstormgrade@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "skypeweb-options-widget.h"
SkypeWebOptionsWidget::SkypeWebOptionsWidget(ParameterEditModel *model,
QWidget *parent)
: AbstractAccountParametersWidget(model, parent)
{
// Set up the UI.
m_ui = new Ui::SkypeWebOptionsWidget;
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()));
}
SkypeWebOptionsWidget::~SkypeWebOptionsWidget()
{
delete m_ui;
}
QString SkypeWebOptionsWidget::defaultDisplayName() const
{
return m_ui->accountLineEdit->text();
}
#include "skypeweb-options-widget.moc"
/*
* This file is part of telepathy-accounts-kcm
*
* Copyright (C) 2016 Björn Bidar <theodorstormgrade@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef KCMTELEPATHYACCOUNTS_PLUGIN_HAZE_SKYPEWEB_ACCOUNT_PARAMETERS_WIDGET_H
#define KCMTELEPATHYACCOUNTS_PLUGIN_HAZE_SKYPEWEB_ACCOUNT_PARAMETERS_WIDGET_H
#include "ui_skypeweb-options-widget.h"
#include <KCMTelepathyAccounts/AbstractAccountParametersWidget>
class SkypeWebOptionsWidget : public AbstractAccountParametersWidget
{
Q_OBJECT
public:
explicit SkypeWebOptionsWidget(ParameterEditModel *model,
QWidget *parent = 0);
virtual ~SkypeWebOptionsWidget();
virtual QString defaultDisplayName() const;
private:
Q_DISABLE_COPY(SkypeWebOptionsWidget);
Ui::SkypeWebOptionsWidget *m_ui;
};
#endif // header guard
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>SkypeWebOptionsWidget</class>
<widget class="QWidget" name="SkypeWebOptionsWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>74</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
<string>Account Preferences</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="sizeConstraint">
<enum>QLayout::SetMinimumSize</enum>
</property>
<item>
<layout class="QFormLayout" name="formLayout">
<property name="sizeConstraint">
<enum>QLayout::SetMinimumSize</enum>
</property>
<item row="0" column="0">
<widget class="QLabel" name="accountLabel">
<property name="text">
<string>Name:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="accountLineEdit"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="passwordLabel">
<property name="text">
<string>Password:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="passwordLineEdit">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<customwidgets/>
<resources/>
<connections/>
</ui>
...@@ -60,6 +60,7 @@ Dictionary::Dictionary() ...@@ -60,6 +60,7 @@ Dictionary::Dictionary()
m_strings.insert(QLatin1String("google-talk"), i18n("Google Talk")); m_strings.insert(QLatin1String("google-talk"), i18n("Google Talk"));
m_strings.insert(QLatin1String("groupwise"), i18n("Novell Groupwise")); m_strings.insert(QLatin1String("groupwise"), i18n("Novell Groupwise"));
m_strings.insert(QLatin1String("icq"), i18n("ICQ")); m_strings.insert(QLatin1String("icq"), i18n("ICQ"));
m_strings.insert(QLatin1String("skypeweb"), i18n("Skype"));
m_strings.insert(QLatin1String("irc"), i18n("Internet Relay Chat")); m_strings.insert(QLatin1String("irc"), i18n("Internet Relay Chat"));
m_strings.insert(QLatin1String("jabber"), i18n("Jabber/XMPP")); m_strings.insert(QLatin1String("jabber"), i18n("Jabber/XMPP"));
m_strings.insert(QLatin1String("local-xmpp"), i18n("Bonjour/Salut")); m_strings.insert(QLatin1String("local-xmpp"), i18n("Bonjour/Salut"));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment