[kde-plasma-nm] More upstream fixes

Jan Grulich jgrulich at fedoraproject.org
Fri Jan 3 13:01:45 UTC 2014


commit 4c36642738e230a60776877792d8bcc5b62b934e
Author: Jan Grulich <jgrulich at redhat.com>
Date:   Fri Jan 3 14:01:37 2014 +0100

    More upstream fixes

 kde-plasma-nm.spec                     |    5 +-
 plasma-nm-0.9.3.2-upstream-fixes.patch |  130 ++++++++++++++++++++++++++++++--
 2 files changed, 127 insertions(+), 8 deletions(-)
---
diff --git a/kde-plasma-nm.spec b/kde-plasma-nm.spec
index d90fd59..09d77f0 100644
--- a/kde-plasma-nm.spec
+++ b/kde-plasma-nm.spec
@@ -1,6 +1,6 @@
 Name:           kde-plasma-nm
 Version:        0.9.3.2
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        Plasma applet written in QML for managing network connections
 License:        LGPLv2+ and GPLv2+
 URL:            https://projects.kde.org/projects/playground/network/plasma-nm
@@ -216,6 +216,9 @@ rm -fv %{buildroot}%{_kde4_datadir}/kde4/services/networkmanagement_pptp*
 %endif
 
 %changelog
+* Fri Jan 03 2014 Jan Grulich <jgrulich at redhat.com> - 0.9.3.2-3
+- More upstream fixes
+
 * Thu Jan 02 2014 Jan Grulich <jgrulich at redhat.com> - 0.9.3.2-2
 - Pickup some upstream fixes
 
diff --git a/plasma-nm-0.9.3.2-upstream-fixes.patch b/plasma-nm-0.9.3.2-upstream-fixes.patch
index c7b7652..b2eab24 100644
--- a/plasma-nm-0.9.3.2-upstream-fixes.patch
+++ b/plasma-nm-0.9.3.2-upstream-fixes.patch
@@ -1,3 +1,80 @@
+diff --git a/applet/declarative/contents/ui/CompactRepresentation.qml b/applet/declarative/contents/ui/CompactRepresentation.qml
+index ac2c9fc..d610da2 100644
+--- a/applet/declarative/contents/ui/CompactRepresentation.qml
++++ b/applet/declarative/contents/ui/CompactRepresentation.qml
+@@ -45,43 +45,45 @@ Item {
+     PlasmaCore.SvgItem {
+         id: connectionIcon;
+ 
+-        anchors.fill: parent;
++        anchors.centerIn: parent
++        width: Math.min(parent.width, parent.height)
++        height: width
+         svg: svgIcons;
+         elementId: connectionIconProvider.connectionSvgIcon;
+-    }
+ 
+-    QIconItem {
+-        id: hoverIcon;
++        QIconItem {
++            id: hoverIcon;
+ 
+-        width: parent.width/2;
+-        height: parent.height/2;
+-        anchors {
+-            bottom: parent.bottom;
+-            right: parent.right;
++            width: parent.width/2;
++            height: parent.height/2;
++            anchors {
++                bottom: parent.bottom;
++                right: parent.right;
++            }
++            icon: connectionIconProvider.connectionIndicatorIcon;
+         }
+-        icon: connectionIconProvider.connectionIndicatorIcon;
+-    }
+ 
+-    PlasmaComponents.BusyIndicator {
+-        id: connectingIndicator;
++        PlasmaComponents.BusyIndicator {
++            id: connectingIndicator;
+ 
+-        anchors.fill: parent;
+-        running: connectionIconProvider.connecting;
+-        visible: running;
+-    }
++            anchors.fill: parent;
++            running: connectionIconProvider.connecting;
++            visible: running;
++        }
+ 
+-    MouseArea {
+-        id: mouseAreaPopup;
++        MouseArea {
++            id: mouseAreaPopup;
+ 
+-        anchors.fill: parent;
+-        hoverEnabled: true;
+-        onClicked: plasmoid.togglePopup();
++            anchors.fill: parent;
++            hoverEnabled: true;
++            onClicked: plasmoid.togglePopup();
+ 
+-        PlasmaCore.ToolTip {
+-            id: tooltip;
+-            target: mouseAreaPopup;
+-            image: connectionIconProvider.connectionPixmapIcon;
+-            subText: networkStatus.activeConnections;
++            PlasmaCore.ToolTip {
++                id: tooltip;
++                target: mouseAreaPopup;
++                image: connectionIconProvider.connectionPixmapIcon;
++                subText: networkStatus.activeConnections;
++            }
+         }
+     }
+ }
 diff --git a/applet/declarative/contents/ui/ConnectionItem.qml b/applet/declarative/contents/ui/ConnectionItem.qml
 index 009ab0e..be7cf42 100644
 --- a/applet/declarative/contents/ui/ConnectionItem.qml
@@ -64,10 +141,19 @@ index 7ffdc8f..f9e40a6 100644
  
  #include <NetworkManagerQt/ConnectionSettings>
 diff --git a/kded/service.cpp b/kded/service.cpp
-index 14966dd..38ba7de 100644
+index 14966dd..4db016d 100644
 --- a/kded/service.cpp
 +++ b/kded/service.cpp
-@@ -45,10 +45,21 @@ public:
+@@ -32,6 +32,8 @@
+ #include "bluetoothmonitor.h"
+ 
+ #include <QDBusMetaType>
++#include <QDBusServiceWatcher>
++#include <QDBusConnection>
+ 
+ K_PLUGIN_FACTORY(NetworkManagementServiceFactory, registerPlugin<NetworkManagementService>();)
+ K_EXPORT_PLUGIN(NetworkManagementServiceFactory("networkmanagement", "plasmanetworkmanagement-kded"))
+@@ -45,10 +47,34 @@ public:
  NetworkManagementService::NetworkManagementService(QObject * parent, const QVariantList&)
          : KDEDModule(parent), d_ptr(new NetworkManagementServicePrivate)
  {
@@ -75,8 +161,13 @@ index 14966dd..38ba7de 100644
 -
      KGlobal::insertCatalog("plasma_applet_org.kde.networkmanagement");  // mobile wizard
  
-+    QDBusServiceWatcher * watcher = new QDBusServiceWatcher("org.kde.plasma-desktop", QDBusConnection::sessionBus(), QDBusServiceWatcher::WatchForOwnerChange, this);
-+    connect(watcher, SIGNAL(serviceRegistered(QString)), SLOT(finishInitialization()));
++    QDBusReply<bool> reply = QDBusConnection::sessionBus().interface()->isServiceRegistered("org.kde.plasma-desktop");
++    if (reply.value()) {
++        doInitialization();
++    } else {
++        QDBusServiceWatcher * watcher = new QDBusServiceWatcher("org.kde.plasma-desktop", QDBusConnection::sessionBus(), QDBusServiceWatcher::WatchForOwnerChange, this);
++        connect(watcher, SIGNAL(serviceRegistered(QString)), SLOT(finishInitialization()));
++    }
 +}
 +
 +NetworkManagementService::~NetworkManagementService()
@@ -86,12 +177,20 @@ index 14966dd..38ba7de 100644
 +
 +void NetworkManagementService::finishInitialization()
 +{
++    QDBusServiceWatcher * watcher = static_cast<QDBusServiceWatcher*>(sender());
++    disconnect(watcher, SIGNAL(serviceRegistered(QString)), this,  SLOT(finishInitialization()));
++
++    doInitialization();
++}
++
++void NetworkManagementService::doInitialization()
++{
 +    Q_D(NetworkManagementService);
 +
      d->agent = new SecretAgent(this);
      new Notification(this);
  #if WITH_MODEMMANAGER_SUPPORT
-@@ -57,7 +68,3 @@ NetworkManagementService::NetworkManagementService(QObject * parent, const QVari
+@@ -57,7 +83,3 @@ NetworkManagementService::NetworkManagementService(QObject * parent, const QVari
      new BluetoothMonitor(this);
  }
  
@@ -100,10 +199,10 @@ index 14966dd..38ba7de 100644
 -    delete d_ptr;
 -}
 diff --git a/kded/service.h b/kded/service.h
-index 5c576c6..188e86c 100644
+index 5c576c6..8182523 100644
 --- a/kded/service.h
 +++ b/kded/service.h
-@@ -38,6 +38,8 @@ class KDE_EXPORT NetworkManagementService : public KDEDModule
+@@ -38,8 +38,12 @@ class KDE_EXPORT NetworkManagementService : public KDEDModule
  public:
      NetworkManagementService(QObject * parent, const QVariantList&);
      virtual ~NetworkManagementService();
@@ -111,7 +210,24 @@ index 5c576c6..188e86c 100644
 +   void finishInitialization();
  private:
      NetworkManagementServicePrivate * d_ptr;
++
++    void doInitialization();
  };
+ 
+ #endif // PLASMANM_KDED_SERVICE_H
+diff --git a/lib/editor/connectiondetaileditor.cpp b/lib/editor/connectiondetaileditor.cpp
+index 06fa706..d6fcbd7 100644
+--- a/lib/editor/connectiondetaileditor.cpp
++++ b/lib/editor/connectiondetaileditor.cpp
+@@ -181,6 +181,8 @@ ConnectionDetailEditor::~ConnectionDetailEditor()
+ 
+ void ConnectionDetailEditor::initEditor()
+ {
++    enableOKButton(false);
++
+     if (!m_new) {
+         NetworkManager::Connection::Ptr connection = NetworkManager::findConnectionByUuid(m_connection->uuid());
+         if (connection) {
 diff --git a/lib/editor/ipv4widget.cpp b/lib/editor/ipv4widget.cpp
 index 2d651b0..3676f00 100644
 --- a/lib/editor/ipv4widget.cpp


More information about the scm-commits mailing list