[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:45 UTC 2016


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

The following commit has been merged in the master branch:
commit 064f5c97701229d384a632f61a16db0b851e5698
Author: Dominik Schmidt <dev at dominik-schmidt.de>
Date:   Tue Jan 11 23:56:33 2011 +0100

    Remove specific advanced options widget
---
 gabble/CMakeLists.txt              |   1 -
 gabble/advanced-options-widget.cpp | 101 -------------------------------------
 gabble/advanced-options-widget.h   |  47 -----------------
 gabble/gabble-account-ui.cpp       |  13 ++++-
 4 files changed, 11 insertions(+), 151 deletions(-)

diff --git a/gabble/CMakeLists.txt b/gabble/CMakeLists.txt
index 92e98e3..53a7ee6 100644
--- a/gabble/CMakeLists.txt
+++ b/gabble/CMakeLists.txt
@@ -8,7 +8,6 @@ set (kcmtelepathyaccounts_plugin_gabble_SRCS
      gabble-account-ui-plugin.cpp
      gabble-account-ui.cpp
      main-options-widget.cpp
-     advanced-options-widget.cpp
      server-settings-widget.cpp
      proxy-settings-widget.cpp
 )
diff --git a/gabble/advanced-options-widget.cpp b/gabble/advanced-options-widget.cpp
deleted file mode 100644
index 43145f2..0000000
--- a/gabble/advanced-options-widget.cpp
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * 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 <KCMTelepathyAccounts/ProtocolParameterValue>
-
-#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;
-}
-
-QList<ProtocolParameterValue> AdvancedOptionsWidget::parameterValues() const
-{
-    kDebug();
-
-    // the server parameter values
-    QList<ProtocolParameterValue> parameters;
-    parameters.append(d->serverSettings->parameterValues());
-    parameters.append(d->proxySettings->parameterValues());
-
-    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/advanced-options-widget.h b/gabble/advanced-options-widget.h
deleted file mode 100644
index e38f844..0000000
--- a/gabble/advanced-options-widget.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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
- */
-
-#ifndef KCMTELEPATHYACCOUNTS_PLUGIN_GABBLE_ADVANCED_PARAMETERS_WIDGET_H
-#define KCMTELEPATHYACCOUNTS_PLUGIN_GABBLE_ADVANCED_PARAMETERS_WIDGET_H
-
-#include <KCMTelepathyAccounts/AbstractAccountParametersWidget>
-
-class AdvancedOptionsWidget : public AbstractAccountParametersWidget
-{
-    Q_OBJECT
-
-public:
-    explicit AdvancedOptionsWidget(Tp::ProtocolParameterList parameters,
-                                   const QVariantMap &values = QVariantMap(),
-                                   QWidget *parent = 0);
-    virtual ~AdvancedOptionsWidget();
-
-    virtual QList<ProtocolParameterValue> parameterValues() const;
-    virtual bool validateParameterValues();
-
-private:
-    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 8212e4f..6297a3e 100644
--- a/gabble/gabble-account-ui.cpp
+++ b/gabble/gabble-account-ui.cpp
@@ -21,9 +21,11 @@
 #include "gabble-account-ui.h"
 
 #include "main-options-widget.h"
-#include "advanced-options-widget.h"
+#include "server-settings-widget.h"
+#include "proxy-settings-widget.h"
 
 #include <KCMTelepathyAccounts/AbstractAccountParametersWidget>
+#include <KCMTelepathyAccounts/GenericAdvancedOptionsWidget>
 
 #include <KDebug>
 
@@ -93,7 +95,14 @@ AbstractAccountParametersWidget *GabbleAccountUi::advancedOptionsWidget(
 {
     kDebug();
 
-    return new AdvancedOptionsWidget(parameters, values, parent);
+    GenericAdvancedOptionsWidget *widget = new GenericAdvancedOptionsWidget(parameters, values, parent);
+
+    AbstractAccountParametersWidget* serverSettingsWidget = new ServerSettingsWidget(parameters, values, widget);
+    widget->addTab(serverSettingsWidget, "Server");
+    AbstractAccountParametersWidget* proxySettingsWidget = new ProxySettingsWidget(parameters, values, widget);
+    widget->addTab(proxySettingsWidget, "Proxy");
+
+    return widget;
 }
 
 

-- 
ktp-accounts-kcm packaging



More information about the pkg-kde-commits mailing list