From kde-commits Sat Oct 31 23:48:32 2009 From: =?utf-8?q?Dar=C3=ADo=20Andr=C3=A9s=20Rodr=C3=ADguez?= X-MARC-Message: https://marc.info/?l=kde-commits&m=125703292422401 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