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

List:       kde-commits
Subject:    playground/base/plasma/applets/systray-refactor/ui
From:       Jason Stubbs <jasonbstubbs () gmail ! com>
Date:       2008-09-30 15:01:05
Message-ID: 1222786865.132114.2576.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 866322 by jstubbs:

Hide the extender when the last notification closes.


 M  +11 -0     applet.cpp  
 M  +1 -0      applet.h  


--- trunk/playground/base/plasma/applets/systray-refactor/ui/applet.cpp #866321:866322
@@ -264,10 +264,21 @@
         extenderItem->setTitle(i18n("Notification from %1", notification->appName()));
     }
 
+    connect(extenderItem, SIGNAL(destroyed()),
+            this, SLOT(hidePopupIfEmpty()));
+
     showPopup();
 }
 
 
+void Applet::hidePopupIfEmpty()
+{
+    if (extender()->items().isEmpty()) {
+        hidePopup();
+    }
 }
 
+
+}
+
 #include "applet.moc"
--- trunk/playground/base/plasma/applets/systray-refactor/ui/applet.h #866321:866322
@@ -56,6 +56,7 @@
     void propogateSizeHintChange(Qt::SizeHint which);
     void checkSizes();
     void addNotification(SystemTray::Notification *notification);
+    void hidePopupIfEmpty();
 
 private:
     class Private;
[prev in list] [next in list] [prev in thread] [next in thread] 

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