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

List:       kde-commits
Subject:    branches/KDE/4.3/kdebase/workspace/plasma
From:       Darío Andrés Rodríguez <andresbajotierra () gmail ! co
Date:       2009-10-31 23:48:32
Message-ID: 1257032912.167890.23480.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1043183 by darioandres:

Backport to 4.3 of:
SVN commit 1043127 by darioandres
SVN commit 1043176 by darioandres

- Fix the Speed and ETA of the file transfers not being shown in the Plasma
notifications
  - The applicationjobs dataengine now should notify about speed changes
  * The ETA and Speed are only shown if the job is running
  * It should not affect anything else, but it may need more testing...

If this is tested properly, should it be included on the already tagged 4.3.3 builds \
?

BUG: 210081
CCMAIL: aseigo@kde.org


 M  +10 -0     applets/systemtray/ui/jobwidget.cpp  
 M  +1 -1      applets/systemtray/ui/jobwidget.h  
 M  +2 -0      dataengines/applicationjobs/kuiserverengine.cpp  


--- branches/KDE/4.3/kdebase/workspace/plasma/applets/systemtray/ui/jobwidget.cpp \
#1043182:1043183 @@ -208,6 +208,16 @@
     m_meter->setValue(m_job->percentage());
 
     if (m_job) {
+        if (m_job->state() == SystemTray::Job::Running) {
+            //Update the ETA and job speed
+            if (m_job->eta()) {
+                m_eta->setText(i18n("%1 (%2 remaining)", m_job->speed(),
+                                 KGlobal::locale()->formatDuration(m_job->eta())));
+            } else {
+                m_eta->setText(QString());
+            }
+        }
+
         if (m_job->labels().count() > 0) {
             labelName0 = m_job->labels().value(0).first;
             label0 = m_job->labels().value(0).second;
--- branches/KDE/4.3/kdebase/workspace/plasma/applets/systemtray/ui/jobwidget.h \
#1043182:1043183 @@ -61,10 +61,10 @@
         void detailsClicked();
         void destroyExtenderItem();
         void scheduleUpdateJob();
+        void updateJobState();
 
     private:
         void updateLabels();
-        void updateJobState();
         void updateJob();
 
         Plasma::ExtenderItem *m_extenderItem;
--- branches/KDE/4.3/kdebase/workspace/plasma/dataengines/applicationjobs/kuiserverengine.cpp \
#1043182:1043183 @@ -178,6 +178,8 @@
 void JobView::setSpeed(qlonglong bytesPerSecond)
 {
     m_speed = bytesPerSecond;
+    setData("speed", speedString());
+    scheduleUpdate();
 }
 
 QString JobView::speedString() const


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

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