Version: (using KDE Devel) Installed from: Compiled sources There should a way to disable the passive popups all together. When the network is down and I'm watching fullscreen TV, it is very annoying... At one time I had some experimental code that fixed this; I'll see if I can find it.
Created attachment 10421 [details] Old patch to disable passive popup It doesn't apply cleanly anymore. I may end up working on this. It is that or quit using KWeather... the popup are annoying when watching TV or playing games... ;_(
This is embarrassing when presenting slides. Please include an option to turn it of or fully remove this "feature". Thanks!
*** Bug 102927 has been marked as a duplicate of this bug. ***
Sorry for duplicating, don't know how I could miss this report. I've transferred my votes, and it would still be a good thing if the popups go away. I'd prefer using kweather's own display area to show network errors.
David Faure made a step in the right direction. A popup is shown once when no network is detected, instead of every x minutes.
I've stopped using kweather because of this (after using it more than a year). Doing *anything* other than popping up a window is fine, even just showing the question mark. When my computer can't access the network I know it, I don't need kweather to tell me that.
SVN commit 636839 by mkoller: BUG: 101955 Don't show a passive popup when the network is unreachable, as we already show this situation by the "dunno" icon and now also mention it in the tooltip M +5 -2 dockwidget.cpp M +0 -1 dockwidget.h M +10 -6 reportview.cpp M +9 -6 weatherlib.cpp --- branches/KDE/3.5/kdetoys/kweather/dockwidget.cpp #636838:636839 @@ -99,9 +99,12 @@ tip += "<h3><center><nobr>" + m_weatherService->stationName( m_locationCode ) + " (" + - m_weatherService->stationCountry( m_locationCode ) + ")</nobr></center></h3><br>"; + m_weatherService->stationCountry( m_locationCode ) + ")</nobr></center></h3>"; - tip += QString("<table>" + if ( m_weatherService->currentIconString( m_locationCode ) == "dunno" ) // no data + tip += "<center><nobr>" + i18n("The network is currently offline...") + "</nobr></center>"; + + tip += QString("<br><table>" "<tr><th><nobr>" + i18n( "Temperature:" ) + "</nobr></th><td><nobr>%1</nobr></td>" "<th><nobr>" + i18n( "Dew Point:" ) + "</nobr></th><td><nobr>%2</nobr></td></nobr></tr>" --- branches/KDE/3.5/kdetoys/kweather/dockwidget.h #636838:636839 @@ -55,7 +55,6 @@ private: void initDock(); void updateFont(); - DCOPReply callDCOP( const QString &name ); int m_mode; QString m_locationCode; --- branches/KDE/3.5/kdetoys/kweather/reportview.cpp #636838:636839 @@ -122,12 +122,16 @@ .arg(bgColor).arg(textColor).arg(textColor).arg(textColor).arg(textColor) + QString("</style><title></title></head><body dir=\"%1\">").arg( QApplication::reverseLayout()?"rtl":"ltr") + "<div class=\"headerTitle\"><b>" + i18n( "Weather Report - %1 - %2" ).arg( locationName ).arg( countryName ) + - "</b></div>\n" + - QString("<div class=\"headerMsg\"><b>" + i18n( "Last updated on %1" ) + "</b></div>\n" - "<table><tr><td width=\"60\" style=\"text-align: center; border: dotted %2 1px;\">" - "<img width=\"64\" height=\"64\" src=\"%3\" /></td>" - "<td style=\"vertical-align: top\">%4</td></tr>") - .arg(date).arg(bgColor).arg(KURL(icon).url()).arg(weatherText) + + "</b></div>\n"; + + if ( ! date.isEmpty() ) + contents += "<div class=\"headerMsg\"><b>" + i18n( "Last updated on %1" ).arg(date) + "</b></div>\n"; + + contents += QString( + "<table><tr><td width=\"60\" style=\"text-align: center; border: dotted %1 1px;\">" + "<img width=\"64\" height=\"64\" src=\"%2\" /></td>" + "<td style=\"vertical-align: top\">%3</td></tr>") + .arg(bgColor).arg(KURL(icon).url()).arg(weatherText) + "</table><table>" + QString("<tr><th style=\"text-align: right\">" + i18n( "Temperature:" ) + "</th><td>%1</td>" --- branches/KDE/3.5/kdetoys/kweather/weatherlib.cpp #636838:636839 @@ -102,9 +102,7 @@ && !hostDown) { hostDown= true; - // should not bother after this point - KPassivePopup::message( i18n("KWeather Error!"), - i18n("The network is unavailable for use."), 0L,"error" ); + // no need to show a passive popup here, as below all stations will show "dunno" icon } } // Find the job @@ -285,9 +283,14 @@ QString WeatherLib::date(const QString &stationID){ Data *d = findData(stationID); - QDateTime gmtDateTime(d->wi.qsDate, d->wi.qsTime); - QDateTime localDateTime = gmtDateTime.addSecs(KRFCDate::localUTCOffset() * 60); - return KGlobal::locale()->formatDateTime(localDateTime, false, false); + if ( ! d->wi.qsDate.isValid() ) + return ""; + else + { + QDateTime gmtDateTime(d->wi.qsDate, d->wi.qsTime); + QDateTime localDateTime = gmtDateTime.addSecs(KRFCDate::localUTCOffset() * 60); + return KGlobal::locale()->formatDateTime(localDateTime, false, false); + } } /** Returns the current cover */