[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/4.5/kdebase/workspace/plasma/desktop/containments/desktop
From:       Ambroz Bizjak <ambrop7 () gmail ! com>
Date:       2010-07-17 17:42:37
Message-ID: 20100717174237.8861EAC76A () svn ! kde ! org
[Download RAW message or body]

SVN commit 1151079 by abizjak:

backport revision 1151078:

Ignore further StartupCompletedConstraint's to avoid double connections.

When plasma-desktop if started with no configuration, after moving applets added \
automatically (e.g. Folder View for ~/Desktop), they will jump back. This is bacause \
something triggers StartupCompletedConstraint more than once, which will cause \
multiple appletTransformedBy* connections, messing things up. Fix it by being more \
roust and ignore all but the first StartupCompletedConstraint.


 M  +8 -1      desktop.cpp  
 M  +1 -0      desktop.h  


--- branches/KDE/4.5/kdebase/workspace/plasma/desktop/containments/desktop/desktop.cpp \
#1151078:1151079 @@ -28,7 +28,8 @@
 
 DefaultDesktop::DefaultDesktop(QObject *parent, const QVariantList &args)
     : Containment(parent, args),
-      dropping(false)
+      dropping(false),
+      m_startupCompleted(false)
 {
     qRegisterMetaType<QImage>("QImage");
     qRegisterMetaType<QPersistentModelIndex>("QPersistentModelIndex");
@@ -54,6 +55,12 @@
 void DefaultDesktop::constraintsEvent(Plasma::Constraints constraints)
 {
     if (constraints & Plasma::StartupCompletedConstraint) {
+        if (m_startupCompleted) {
+            return;
+        }
+        
+        m_startupCompleted = true;
+        
         connect(corona(), SIGNAL(availableScreenRegionChanged()),
                 this, SLOT(refreshWorkingArea()));
         refreshWorkingArea();
--- branches/KDE/4.5/kdebase/workspace/plasma/desktop/containments/desktop/desktop.h \
#1151078:1151079 @@ -73,6 +73,7 @@
 private:
     DesktopLayout *m_layout;
     bool dropping;
+    bool m_startupCompleted;
 };
 
 #endif // PLASMA_PANEL_H


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic