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

Maximiliano Curia maxy at moszumanska.debian.org
Fri May 27 23:58:20 UTC 2016


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

The following commit has been merged in the master branch:
commit f070006f981331879657a9767d167b450951c522
Author: Gustavo P. Boiko <gustavo.boiko at kdemail.net>
Date:   Thu Sep 30 13:34:18 2010 +0000

    Port the current plugins to the main/advanced config scheme
    
    svn path=/trunk/playground/network/telepathy-accounts-kcm-plugins/; revision=1181233
---
 butterfly/CMakeLists.txt                           |   4 +-
 butterfly/butterfly-account-ui.cpp                 |  18 ++--
 butterfly/butterfly-account-ui.h                   |   9 +-
 ...rameters-widget.cpp => main-options-widget.cpp} |  21 ++--
 ...y-parameters-widget.h => main-options-widget.h} |  12 +--
 ...parameters-widget.ui => main-options-widget.ui} |   4 +-
 gabble/CMakeLists.txt                              |   5 +-
 gabble/advanced-options-widget.cpp                 | 107 +++++++++++++++++++++
 ...settings-widget.h => advanced-options-widget.h} |  19 ++--
 gabble/gabble-account-ui.cpp                       |  68 ++++++-------
 gabble/gabble-account-ui.h                         |  14 +--
 ...rameters-widget.cpp => main-options-widget.cpp} |  24 ++---
 ...y-parameters-widget.h => main-options-widget.h} |  13 ++-
 ...parameters-widget.ui => main-options-widget.ui} |   4 +-
 14 files changed, 211 insertions(+), 111 deletions(-)

diff --git a/butterfly/CMakeLists.txt b/butterfly/CMakeLists.txt
index eb0cc84..19dbf85 100644
--- a/butterfly/CMakeLists.txt
+++ b/butterfly/CMakeLists.txt
@@ -7,11 +7,11 @@ include_directories (${CMAKE_CURRENT_BINARY_DIR}
 set (kcmtelepathyaccounts_plugin_butterfly_SRCS
      butterfly-account-ui-plugin.cpp
      butterfly-account-ui.cpp
-     mandatory-parameters-widget.cpp
+     main-options-widget.cpp
 )
 
 kde4_add_ui_files (kcmtelepathyaccounts_plugin_butterfly_SRCS
-                   mandatory-parameters-widget.ui
+                   main-options-widget.ui
 )
 
 kde4_add_plugin (kcmtelepathyaccounts_plugin_butterfly
diff --git a/butterfly/butterfly-account-ui.cpp b/butterfly/butterfly-account-ui.cpp
index 0220a1a..1732b87 100644
--- a/butterfly/butterfly-account-ui.cpp
+++ b/butterfly/butterfly-account-ui.cpp
@@ -20,7 +20,7 @@
 
 #include "butterfly-account-ui.h"
 
-#include "mandatory-parameters-widget.h"
+#include "main-options-widget.h"
 
 #include <KCMTelepathyAccounts/AbstractAccountParametersWidget>
 
@@ -42,8 +42,8 @@ ButterflyAccountUi::ButterflyAccountUi(QObject *parent)
     kDebug();
 
     // Register supported parameters
-    registerSupportedMandatoryParameter("account", QVariant::String);
-    registerSupportedMandatoryParameter("password", QVariant::String);
+    registerSupportedParameter("account", QVariant::String);
+    registerSupportedParameter("password", QVariant::String);
 }
 
 ButterflyAccountUi::~ButterflyAccountUi()
@@ -53,19 +53,15 @@ ButterflyAccountUi::~ButterflyAccountUi()
     delete d;
 }
 
-AbstractAccountParametersWidget *ButterflyAccountUi::mandatoryParametersWidget(
+AbstractAccountParametersWidget *ButterflyAccountUi::mainOptionsWidget(
         Tp::ProtocolParameterList parameters,
-        const QVariantMap &values) const
+        const QVariantMap &values,
+        QWidget *parent) const
 {
     kDebug();
 
-    return new MandatoryParametersWidget(parameters, values);
+    return new MainOptionsWidget(parameters, values, parent);
 }
 
-QList<AbstractAccountParametersWidget*> ButterflyAccountUi::optionalParametersWidgets(Tp::ProtocolParameterList parameters, const QVariantMap &values) const
-{
-    QList<AbstractAccountParametersWidget*> list;
-    return list;
-}
 #include "butterfly-account-ui.moc"
 
diff --git a/butterfly/butterfly-account-ui.h b/butterfly/butterfly-account-ui.h
index e0b3d9d..5b83463 100644
--- a/butterfly/butterfly-account-ui.h
+++ b/butterfly/butterfly-account-ui.h
@@ -32,12 +32,9 @@ public:
     virtual ~ButterflyAccountUi();
 
     virtual AbstractAccountParametersWidget
-              *mandatoryParametersWidget(Tp::ProtocolParameterList parameters,
-                                         const QVariantMap &values = QVariantMap()) const;
-    virtual QList<AbstractAccountParametersWidget*>
-              optionalParametersWidgets(Tp::ProtocolParameterList parameters,
-                                        const QVariantMap &values = QVariantMap()) const;
-
+              *mainOptionsWidget(Tp::ProtocolParameterList parameters,
+                                 const QVariantMap &values = QVariantMap(),
+                                 QWidget *parent = 0) const;
 private:
     Q_DISABLE_COPY(ButterflyAccountUi);
 
diff --git a/butterfly/mandatory-parameters-widget.cpp b/butterfly/main-options-widget.cpp
similarity index 86%
rename from butterfly/mandatory-parameters-widget.cpp
rename to butterfly/main-options-widget.cpp
index fdf23fd..56813c0 100644
--- a/butterfly/mandatory-parameters-widget.cpp
+++ b/butterfly/main-options-widget.cpp
@@ -18,14 +18,14 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include "mandatory-parameters-widget.h"
+#include "main-options-widget.h"
 
-#include "ui_mandatory-parameters-widget.h"
+#include "ui_main-options-widget.h"
 
 #include <KDebug>
 #include <KMessageBox>
 
-class MandatoryParametersWidget::Private
+class MainOptionsWidget::Private
 {
 public:
     Private()
@@ -40,10 +40,10 @@ public:
     Tp::ProtocolParameter *accountParameter;
     Tp::ProtocolParameter *passwordParameter;
 
-    Ui::MandatoryParametersWidget *ui;
+    Ui::MainOptionsWidget *ui;
 };
 
-MandatoryParametersWidget::MandatoryParametersWidget(Tp::ProtocolParameterList parameters,
+MainOptionsWidget::MainOptionsWidget(Tp::ProtocolParameterList parameters,
                                                      const QVariantMap &values,
                                                      QWidget *parent)
  : AbstractAccountParametersWidget(parameters, values, parent),
@@ -72,7 +72,7 @@ MandatoryParametersWidget::MandatoryParametersWidget(Tp::ProtocolParameterList p
     }
 
     // Set up the UI.
-    d->ui = new Ui::MandatoryParametersWidget;
+    d->ui = new Ui::MainOptionsWidget;
     d->ui->setupUi(this);
 
    // Prefill UI elements if appropriate.
@@ -104,14 +104,14 @@ MandatoryParametersWidget::MandatoryParametersWidget(Tp::ProtocolParameterList p
    }
 }
 
-MandatoryParametersWidget::~MandatoryParametersWidget()
+MainOptionsWidget::~MainOptionsWidget()
 {
     kDebug();
 
     delete d;
 }
 
-QMap<Tp::ProtocolParameter*, QVariant> MandatoryParametersWidget::parameterValues() const
+QMap<Tp::ProtocolParameter*, QVariant> MainOptionsWidget::parameterValues() const
 {
     kDebug();
 
@@ -129,7 +129,7 @@ QMap<Tp::ProtocolParameter*, QVariant> MandatoryParametersWidget::parameterValue
    return parameters;
 }
 
-bool MandatoryParametersWidget::validateParameterValues()
+bool MainOptionsWidget::validateParameterValues()
 {
     kDebug();
 
@@ -137,6 +137,5 @@ bool MandatoryParametersWidget::validateParameterValues()
     return true;
 }
 
-
-#include "mandatory-parameters-widget.moc"
+#include "main-options-widget.moc"
 
diff --git a/butterfly/mandatory-parameters-widget.h b/butterfly/main-options-widget.h
similarity index 77%
rename from butterfly/mandatory-parameters-widget.h
rename to butterfly/main-options-widget.h
index c8c0c15..fb2d2f6 100644
--- a/butterfly/mandatory-parameters-widget.h
+++ b/butterfly/main-options-widget.h
@@ -23,21 +23,21 @@
 
 #include <KCMTelepathyAccounts/AbstractAccountParametersWidget>
 
-class MandatoryParametersWidget : public AbstractAccountParametersWidget
+class MainOptionsWidget : public AbstractAccountParametersWidget
 {
     Q_OBJECT
 
 public:
-    explicit MandatoryParametersWidget(Tp::ProtocolParameterList parameters,
-                                       const QVariantMap &values = QVariantMap(),
-                                       QWidget *parent = 0);
-    virtual ~MandatoryParametersWidget();
+    explicit MainOptionsWidget(Tp::ProtocolParameterList parameters,
+                               const QVariantMap &values = QVariantMap(),
+                               QWidget *parent = 0);
+    virtual ~MainOptionsWidget();
 
     virtual QMap<Tp::ProtocolParameter*, QVariant> parameterValues() const;
     virtual bool validateParameterValues();
 
 private:
-    Q_DISABLE_COPY(MandatoryParametersWidget);
+    Q_DISABLE_COPY(MainOptionsWidget);
 
     class Private;
     Private * const d;
diff --git a/butterfly/mandatory-parameters-widget.ui b/butterfly/main-options-widget.ui
similarity index 95%
rename from butterfly/mandatory-parameters-widget.ui
rename to butterfly/main-options-widget.ui
index c8583a8..672d561 100644
--- a/butterfly/mandatory-parameters-widget.ui
+++ b/butterfly/main-options-widget.ui
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <ui version="4.0">
- <class>MandatoryParametersWidget</class>
- <widget class="QWidget" name="MandatoryParametersWidget">
+ <class>MainOptionsWidget</class>
+ <widget class="QWidget" name="MainOptionsWidget">
   <property name="geometry">
    <rect>
     <x>0</x>
diff --git a/gabble/CMakeLists.txt b/gabble/CMakeLists.txt
index e480980..92e98e3 100644
--- a/gabble/CMakeLists.txt
+++ b/gabble/CMakeLists.txt
@@ -7,13 +7,14 @@ include_directories (${CMAKE_CURRENT_BINARY_DIR}
 set (kcmtelepathyaccounts_plugin_gabble_SRCS
      gabble-account-ui-plugin.cpp
      gabble-account-ui.cpp
-     mandatory-parameters-widget.cpp
+     main-options-widget.cpp
+     advanced-options-widget.cpp
      server-settings-widget.cpp
      proxy-settings-widget.cpp
 )
 
 kde4_add_ui_files (kcmtelepathyaccounts_plugin_gabble_SRCS
-                   mandatory-parameters-widget.ui
+                   main-options-widget.ui
                    server-settings-widget.ui
                    proxy-settings-widget.ui
 )
diff --git a/gabble/advanced-options-widget.cpp b/gabble/advanced-options-widget.cpp
new file mode 100644
index 0000000..fe69fd5
--- /dev/null
+++ b/gabble/advanced-options-widget.cpp
@@ -0,0 +1,107 @@
+/*
+ * This file is part of telepathy-accounts-kcm
+ *
+ * Copyright (C) 2010 Collabora Ltd. <http://www.collabora.co.uk/>
+ *
+ * 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 "advanced-options-widget.h"
+#include "proxy-settings-widget.h"
+#include "server-settings-widget.h"
+
+#include <KDebug>
+#include <KTabWidget>
+#include <KLocale>
+
+#include <QHBoxLayout>
+
+class AdvancedOptionsWidget::Private
+{
+public:
+    Private()
+            : tabWidget(0),
+              proxySettings(0),
+              serverSettings(0)
+    {
+        kDebug();
+    }
+    KTabWidget *tabWidget;
+    ProxySettingsWidget *proxySettings;
+    ServerSettingsWidget *serverSettings;
+};
+
+AdvancedOptionsWidget::AdvancedOptionsWidget(Tp::ProtocolParameterList parameters,
+                                             const QVariantMap &values,
+                                             QWidget *parent)
+ : AbstractAccountParametersWidget(parameters, values, parent),
+   d(new Private)
+{
+    // add a layout to the main widget
+    QHBoxLayout *layout = new QHBoxLayout(this);
+    d->tabWidget = new KTabWidget(this);
+    layout->addWidget(d->tabWidget);
+
+    // create the pages
+    d->serverSettings = new ServerSettingsWidget(parameters, values, d->tabWidget);
+    d->tabWidget->addTab(d->serverSettings, i18n("Connection Settings"));
+    d->proxySettings = new ProxySettingsWidget(parameters, values, d->tabWidget);
+    d->tabWidget->addTab(d->proxySettings, i18n("Proxy Settings"));
+}
+
+AdvancedOptionsWidget::~AdvancedOptionsWidget()
+{
+    kDebug();
+
+    delete d;
+}
+
+QMap<Tp::ProtocolParameter*, QVariant> AdvancedOptionsWidget::parameterValues() const
+{
+    kDebug();
+
+    // the server parameter values
+    QMap<Tp::ProtocolParameter*, QVariant> parameters;
+    parameters = d->serverSettings->parameterValues();
+
+    // append the proxy parameter values
+    QMap<Tp::ProtocolParameter*, QVariant> proxyParameters;
+    proxyParameters = d->proxySettings->parameterValues();
+    QMap<Tp::ProtocolParameter*, QVariant>::const_iterator paramIter;
+    paramIter = proxyParameters.constBegin();
+    while (paramIter != proxyParameters.constEnd()) {
+        parameters.insert(paramIter.key(), paramIter.value());
+        paramIter++;
+    }
+
+    return parameters;
+}
+
+bool AdvancedOptionsWidget::validateParameterValues()
+{
+    kDebug();
+
+    // validate one tab at a time so that the user is not flooded with dialogs
+    if (!d->serverSettings->validateParameterValues())
+        return false;
+
+    if (!d->proxySettings->validateParameterValues())
+        return false;
+
+    return true;
+}
+
+#include "advanced-options-widget.moc"
+
diff --git a/gabble/proxy-settings-widget.h b/gabble/advanced-options-widget.h
similarity index 65%
copy from gabble/proxy-settings-widget.h
copy to gabble/advanced-options-widget.h
index ef064ed..2c6ce63 100644
--- a/gabble/proxy-settings-widget.h
+++ b/gabble/advanced-options-widget.h
@@ -1,7 +1,7 @@
 /*
  * This file is part of telepathy-accounts-kcm
  *
- * Copyright (C) 2009 Collabora Ltd. <http://www.collabora.co.uk/>
+ * Copyright (C) 2010 Collabora Ltd. <http://www.collabora.co.uk/>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -18,31 +18,30 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#ifndef KCMTELEPATHYACCOUNTS_PLUGIN_GABBLE_PROXY_SETTINGS_WIDGET_H
-#define KCMTELEPATHYACCOUNTS_PLUGIN_GABBLE_PROXY_SETTINGS_WIDGET_H
+#ifndef KCMTELEPATHYACCOUNTS_PLUGIN_GABBLE_ADVANCED_PARAMETERS_WIDGET_H
+#define KCMTELEPATHYACCOUNTS_PLUGIN_GABBLE_ADVANCED_PARAMETERS_WIDGET_H
 
 #include <KCMTelepathyAccounts/AbstractAccountParametersWidget>
 
-class ProxySettingsWidget : public AbstractAccountParametersWidget
+class AdvancedOptionsWidget : public AbstractAccountParametersWidget
 {
     Q_OBJECT
 
 public:
-    explicit ProxySettingsWidget(Tp::ProtocolParameterList parameters,
-                                 const QVariantMap &values = QVariantMap(),
-                                 QWidget *parent = 0);
-    virtual ~ProxySettingsWidget();
+    explicit AdvancedOptionsWidget(Tp::ProtocolParameterList parameters,
+                                   const QVariantMap &values = QVariantMap(),
+                                   QWidget *parent = 0);
+    virtual ~AdvancedOptionsWidget();
 
     virtual QMap<Tp::ProtocolParameter*, QVariant> parameterValues() const;
     virtual bool validateParameterValues();
 
 private:
-    Q_DISABLE_COPY(ProxySettingsWidget);
+    Q_DISABLE_COPY(AdvancedOptionsWidget);
 
     class Private;
     Private * const d;
 };
 
-
 #endif // header guard
 
diff --git a/gabble/gabble-account-ui.cpp b/gabble/gabble-account-ui.cpp
index 64bdd8a..8212e4f 100644
--- a/gabble/gabble-account-ui.cpp
+++ b/gabble/gabble-account-ui.cpp
@@ -20,9 +20,8 @@
 
 #include "gabble-account-ui.h"
 
-#include "mandatory-parameters-widget.h"
-#include "proxy-settings-widget.h"
-#include "server-settings-widget.h"
+#include "main-options-widget.h"
+#include "advanced-options-widget.h"
 
 #include <KCMTelepathyAccounts/AbstractAccountParametersWidget>
 
@@ -44,25 +43,25 @@ GabbleAccountUi::GabbleAccountUi(QObject *parent)
     kDebug();
 
     // Register supported parameters
-    registerSupportedMandatoryParameter("account", QVariant::String);
-    registerSupportedMandatoryParameter("password", QVariant::String);
-
-    registerSupportedOptionalParameter("port", QVariant::UInt);
-    registerSupportedOptionalParameter("server", QVariant::String);
-    registerSupportedOptionalParameter("require-encryption", QVariant::Bool);
-    registerSupportedOptionalParameter("old-ssl", QVariant::Bool);
-    registerSupportedOptionalParameter("low-bandwidth", QVariant::Bool);
-    registerSupportedOptionalParameter("ignore-ssl-errors", QVariant::Bool);
-    registerSupportedOptionalParameter("keepalive-interval", QVariant::UInt);
-
-    registerSupportedOptionalParameter("stun-server", QVariant::String);
-    registerSupportedOptionalParameter("stun-port", QVariant::UInt);
-    registerSupportedOptionalParameter("fallback-stun-server", QVariant::String);
-    registerSupportedOptionalParameter("fallback-stun-port", QVariant::UInt);
-    registerSupportedOptionalParameter("https-proxy-server", QVariant::String);
-    registerSupportedOptionalParameter("https-proxy-port", QVariant::UInt);
-    registerSupportedOptionalParameter("fallback-socks5-proxies", QVariant::StringList);
-    registerSupportedOptionalParameter("fallback-conference-server", QVariant::String);
+    registerSupportedParameter("account", QVariant::String);
+    registerSupportedParameter("password", QVariant::String);
+
+    registerSupportedParameter("port", QVariant::UInt);
+    registerSupportedParameter("server", QVariant::String);
+    registerSupportedParameter("require-encryption", QVariant::Bool);
+    registerSupportedParameter("old-ssl", QVariant::Bool);
+    registerSupportedParameter("low-bandwidth", QVariant::Bool);
+    registerSupportedParameter("ignore-ssl-errors", QVariant::Bool);
+    registerSupportedParameter("keepalive-interval", QVariant::UInt);
+
+    registerSupportedParameter("stun-server", QVariant::String);
+    registerSupportedParameter("stun-port", QVariant::UInt);
+    registerSupportedParameter("fallback-stun-server", QVariant::String);
+    registerSupportedParameter("fallback-stun-port", QVariant::UInt);
+    registerSupportedParameter("https-proxy-server", QVariant::String);
+    registerSupportedParameter("https-proxy-port", QVariant::UInt);
+    registerSupportedParameter("fallback-socks5-proxies", QVariant::StringList);
+    registerSupportedParameter("fallback-conference-server", QVariant::String);
 }
 
 GabbleAccountUi::~GabbleAccountUi()
@@ -72,28 +71,29 @@ GabbleAccountUi::~GabbleAccountUi()
     delete d;
 }
 
-AbstractAccountParametersWidget *GabbleAccountUi::mandatoryParametersWidget(
+AbstractAccountParametersWidget *GabbleAccountUi::mainOptionsWidget(
         Tp::ProtocolParameterList parameters,
-        const QVariantMap &values) const
+        const QVariantMap &values,
+        QWidget *parent) const
 {
     kDebug();
 
-    return new MandatoryParametersWidget(parameters, values);
+    return new MainOptionsWidget(parameters, values, parent);
 }
 
-QList<AbstractAccountParametersWidget*> GabbleAccountUi::optionalParametersWidgets(
+bool GabbleAccountUi::hasAdvancedOptionsWidget() const
+{
+    return true;
+}
+
+AbstractAccountParametersWidget *GabbleAccountUi::advancedOptionsWidget(
         Tp::ProtocolParameterList parameters,
-        const QVariantMap &values) const
+        const QVariantMap &values,
+        QWidget *parent) const
 {
     kDebug();
 
-    QList<AbstractAccountParametersWidget*> widgets;
-
-    // Add each of the optional parameter widgets.
-    widgets.append(new ServerSettingsWidget(parameters, values));
-    widgets.append(new ProxySettingsWidget(parameters, values));
-
-    return widgets;
+    return new AdvancedOptionsWidget(parameters, values, parent);
 }
 
 
diff --git a/gabble/gabble-account-ui.h b/gabble/gabble-account-ui.h
index b04b55c..73bdbdc 100644
--- a/gabble/gabble-account-ui.h
+++ b/gabble/gabble-account-ui.h
@@ -32,11 +32,14 @@ public:
     virtual ~GabbleAccountUi();
 
     virtual AbstractAccountParametersWidget
-              *mandatoryParametersWidget(Tp::ProtocolParameterList parameters,
-                                         const QVariantMap &values = QVariantMap()) const;
-    virtual QList<AbstractAccountParametersWidget*>
-              optionalParametersWidgets(Tp::ProtocolParameterList parameters,
-                                        const QVariantMap &values = QVariantMap()) const;
+              *mainOptionsWidget(Tp::ProtocolParameterList parameters,
+                                 const QVariantMap &values = QVariantMap(),
+                                 QWidget *parent = 0) const;
+    virtual bool hasAdvancedOptionsWidget() const;
+    virtual AbstractAccountParametersWidget
+              *advancedOptionsWidget(Tp::ProtocolParameterList parameters,
+                                     const QVariantMap &values = QVariantMap(),
+                                     QWidget *parent = 0) const;
 
 private:
     Q_DISABLE_COPY(GabbleAccountUi);
@@ -45,6 +48,5 @@ private:
     Private * const d;
 };
 
-
 #endif // header guard
 
diff --git a/gabble/mandatory-parameters-widget.cpp b/gabble/main-options-widget.cpp
similarity index 84%
rename from gabble/mandatory-parameters-widget.cpp
rename to gabble/main-options-widget.cpp
index 27d8967..97fe5aa 100644
--- a/gabble/mandatory-parameters-widget.cpp
+++ b/gabble/main-options-widget.cpp
@@ -18,14 +18,14 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include "mandatory-parameters-widget.h"
+#include "main-options-widget.h"
 
-#include "ui_mandatory-parameters-widget.h"
+#include "ui_main-options-widget.h"
 
 #include <KDebug>
 #include <KMessageBox>
 
-class MandatoryParametersWidget::Private
+class MainOptionsWidget::Private
 {
 public:
     Private()
@@ -40,12 +40,12 @@ public:
     Tp::ProtocolParameter *accountParameter;
     Tp::ProtocolParameter *passwordParameter;
 
-    Ui::MandatoryParametersWidget *ui;
+    Ui::MainOptionsWidget *ui;
 };
 
-MandatoryParametersWidget::MandatoryParametersWidget(Tp::ProtocolParameterList parameters,
-                                                     const QVariantMap &values,
-                                                     QWidget *parent)
+MainOptionsWidget::MainOptionsWidget(Tp::ProtocolParameterList parameters,
+                                     const QVariantMap &values,
+                                     QWidget *parent)
  : AbstractAccountParametersWidget(parameters, values, parent),
    d(new Private)
 {
@@ -68,7 +68,7 @@ MandatoryParametersWidget::MandatoryParametersWidget(Tp::ProtocolParameterList p
     }
 
     // Set up the UI.
-    d->ui = new Ui::MandatoryParametersWidget;
+    d->ui = new Ui::MainOptionsWidget;
     d->ui->setupUi(this);
 
     // Prefill UI elements if appropriate.
@@ -100,14 +100,14 @@ MandatoryParametersWidget::MandatoryParametersWidget(Tp::ProtocolParameterList p
     }
 }
 
-MandatoryParametersWidget::~MandatoryParametersWidget()
+MainOptionsWidget::~MainOptionsWidget()
 {
     kDebug();
 
     delete d;
 }
 
-QMap<Tp::ProtocolParameter*, QVariant> MandatoryParametersWidget::parameterValues() const
+QMap<Tp::ProtocolParameter*, QVariant> MainOptionsWidget::parameterValues() const
 {
     kDebug();
 
@@ -125,7 +125,7 @@ QMap<Tp::ProtocolParameter*, QVariant> MandatoryParametersWidget::parameterValue
     return parameters;
 }
 
-bool MandatoryParametersWidget::validateParameterValues()
+bool MainOptionsWidget::validateParameterValues()
 {
     kDebug();
 
@@ -142,5 +142,5 @@ bool MandatoryParametersWidget::validateParameterValues()
 }
 
 
-#include "mandatory-parameters-widget.moc"
+#include "main-options-widget.moc"
 
diff --git a/gabble/mandatory-parameters-widget.h b/gabble/main-options-widget.h
similarity index 77%
rename from gabble/mandatory-parameters-widget.h
rename to gabble/main-options-widget.h
index 321fe9f..d66725d 100644
--- a/gabble/mandatory-parameters-widget.h
+++ b/gabble/main-options-widget.h
@@ -23,26 +23,25 @@
 
 #include <KCMTelepathyAccounts/AbstractAccountParametersWidget>
 
-class MandatoryParametersWidget : public AbstractAccountParametersWidget
+class MainOptionsWidget : public AbstractAccountParametersWidget
 {
     Q_OBJECT
 
 public:
-    explicit MandatoryParametersWidget(Tp::ProtocolParameterList parameters,
-                                       const QVariantMap &values = QVariantMap(),
-                                       QWidget *parent = 0);
-    virtual ~MandatoryParametersWidget();
+    explicit MainOptionsWidget(Tp::ProtocolParameterList parameters,
+                               const QVariantMap &values = QVariantMap(),
+                               QWidget *parent = 0);
+    virtual ~MainOptionsWidget();
 
     virtual QMap<Tp::ProtocolParameter*, QVariant> parameterValues() const;
     virtual bool validateParameterValues();
 
 private:
-    Q_DISABLE_COPY(MandatoryParametersWidget);
+    Q_DISABLE_COPY(MainOptionsWidget);
 
     class Private;
     Private * const d;
 };
 
-
 #endif // header guard
 
diff --git a/gabble/mandatory-parameters-widget.ui b/gabble/main-options-widget.ui
similarity index 95%
rename from gabble/mandatory-parameters-widget.ui
rename to gabble/main-options-widget.ui
index 71229c0..ad60065 100644
--- a/gabble/mandatory-parameters-widget.ui
+++ b/gabble/main-options-widget.ui
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <ui version="4.0">
- <class>MandatoryParametersWidget</class>
- <widget class="QWidget" name="MandatoryParametersWidget">
+ <class>MainOptionsWidget</class>
+ <widget class="QWidget" name="MainOptionsWidget">
   <property name="geometry">
    <rect>
     <x>0</x>

-- 
ktp-accounts-kcm packaging



More information about the pkg-kde-commits mailing list