[kde-plasma-yawp] update geometry patch
nucleo
nucleo at fedoraproject.org
Fri Nov 18 00:54:19 UTC 2011
commit a8663d6585b535e12f5c88bc3ba6824a26e78535
Author: nucleo <nucleo at fedoraproject.org>
Date: Fri Nov 18 02:54:14 2011 +0200
update geometry patch
kde-plasma-yawp-fix-geometry.patch | 505 +-----------------------------------
kde-plasma-yawp.spec | 5 +-
2 files changed, 5 insertions(+), 505 deletions(-)
---
diff --git a/kde-plasma-yawp-fix-geometry.patch b/kde-plasma-yawp-fix-geometry.patch
index 402d044..e03c7c2 100644
--- a/kde-plasma-yawp-fix-geometry.patch
+++ b/kde-plasma-yawp-fix-geometry.patch
@@ -1,90 +1,7 @@
Index: applet/yawp.cpp
===================================================================
--- applet/yawp.cpp (revision 483)
-+++ applet/yawp.cpp (revision 485)
-@@ -99,7 +99,7 @@
- WeatherDataProcessor * pDataProcessor = new WeatherDataProcessor( &m_storage );
- m_pWeatherModel = new WeatherServiceModel( &m_storage, this, pDataProcessor );
- m_pWeatherModel->setObjectName("EngineModel");
--
-+
- m_stateMachine.setServiceModel( m_pWeatherModel );
-
- //--- Set Default Configuration Values ---
-@@ -150,7 +150,7 @@
- #endif
- #endif
- }
--
-+
- m_configData.todaysWeatherPanelFormat = Yawp::PanelTemperature | Yawp::PanelIcon;
- m_configData.forecastWeatherPanelFormat = Yawp::PanelTemperature | Yawp::PanelIcon;
- m_configData.iPanelForecastDays = 3;
-@@ -167,7 +167,7 @@
- m_configData.bUseCompactPanelLayout = false;
- m_configData.bUseExtendedTooltip = true;
- m_configData.extendedTooltipOptions = Yawp::PreviewPage | Yawp::SatellitePage;
--
-+
- m_configData.bTraverseLocationsPeriodically = false;
- m_configData.iTraverseLocationTimeout = 30;
-
-@@ -179,7 +179,7 @@
- << Yawp::Visibility
- << Yawp::Dewpoint
- << Yawp::UV;
--
-+
- // Contextual actions - thanks to Ezequiel, ported from stdin plasmoid :-)
- m_pManualUpdate = new QAction ( i18n ("&Refresh"), this );
- m_pManualUpdate->setIcon ( KIcon ( "view-refresh" ) );
-@@ -208,7 +208,7 @@
- m_actions.append( separator1 );
- m_actions.append( m_pCitySubMenu );
- m_actions.append( separator2 );
--
-+
- /*** About data ***/
- m_aboutData = new KAboutData ( "plasma_yawp",
- QByteArray (), ki18n( YAWP_NAME ), YAWP_VERSION_STRING,
-@@ -286,7 +286,7 @@
- setHasConfigurationInterface(true);
- setAspectRatioMode(Plasma::KeepAspectRatio);
- setPassivePopup(true);
--
-+
- dEndFunct();
- }
-
-@@ -294,9 +294,9 @@
- {
- dStartFunct();
- Plasma::ToolTipManager::self()->clearContent(this);
--
-+
- destroyExtenderItem();
--
-+
- if (hasFailedToLaunch())
- {
- // Do some cleanup here
-@@ -306,13 +306,13 @@
- // Save settings
- saveConfig();
- }
--
-+
- if (m_pAppletPainter != 0)
- delete m_pAppletPainter;
--
-+
- delete m_pWeatherModel;
- delete m_aboutData;
--
-+
- dEndFunct();
- }
-
++++ applet/yawp.cpp (revision 486)
@@ -326,7 +326,6 @@
loadConfig();
loadCustomTheme();
@@ -93,7 +10,7 @@ Index: applet/yawp.cpp
//--- just 4 debug ---
/* CityWeather dummyCity1;
-@@ -347,25 +346,32 @@
+@@ -347,25 +346,29 @@
dummyCity2.setTimeZone("Asia/Shanghai");
m_pWeatherModel->addCity(dummyCity2);
//--- end of debug section ---
@@ -108,10 +25,7 @@ Index: applet/yawp.cpp
-
+
if (bHasCities)
-+ {
-+ resize( m_pAppletPainter->getSize(QSize(contentsRect().width(), contentsRect().height())) );
m_iIdPendingEngineConnection = startTimer( m_configData.iStartDelay*60*1000 );
-+ }
else
+ {
+ resize( m_pAppletPainter->getSize(QSize()) );
@@ -133,418 +47,3 @@ Index: applet/yawp.cpp
dEndFunct();
}
-@@ -491,7 +497,7 @@
- cityInfo.setCountry( QUrl::fromPercentEncoding(lst.at(2).toUtf8()) );
- cityInfo.setCountryCode( QUrl::fromPercentEncoding(lst.at(3).toUtf8()) );
- cityInfo.setExtraData( QUrl::fromPercentEncoding(lst.at(4).toUtf8()) );
--
-+
- if( lst.count() > 5 )
- cityInfo.setTimeZone( QUrl::fromPercentEncoding(lst.at(5).toUtf8()) );
- if( !cityInfo.timeZone().isValid() )
-@@ -502,10 +508,10 @@
- }
- if( cityInfo.countryCode().isEmpty() && cityInfo.timeZone().isValid() )
- cityInfo.setCountryCode( cityInfo.timeZone().countryCode() );
--
-+
- dDebug() << cityInfo.provider() << cityInfo.city() << cityInfo.country() << cityInfo.countryCode()
- << cityInfo.extraData() << cityInfo.timeZone().name() << cityInfo.timeZone().countryCode();
--
-+
- m_pWeatherModel->addCity( cityInfo );
-
- iCityIndex += 1;
-@@ -528,7 +534,7 @@
- cfg.writeEntry( "start delay", (int)m_configData.iStartDelay );
- cfg.writeEntry( "traverse locations", m_configData.bTraverseLocationsPeriodically );
- cfg.writeEntry( "traverse locations timeout", m_configData.iTraverseLocationTimeout );
--
-+
- cfg.writeEntry( "system.distance", (int)m_configData.distanceSystem );
- cfg.writeEntry( "system.pressure", (int)m_configData.pressureSystem );
- cfg.writeEntry( "system.temperature", (int)m_configData.temperatureSystem );
-@@ -615,11 +621,11 @@
- YaWP::constraintsEvent(Plasma::Constraints constraints)
- {
- dStartFunct();
--
-+
- if (constraints.testFlag(Plasma::FormFactorConstraint))
- {
- initAppletPainter();
--
-+
- if (m_pAppletPainter->formFactor() == Plasma::Planar)
- {
- if (m_configData.sBackgroundName == QLatin1String("default") &&
-@@ -632,7 +638,7 @@
- {
- setBackgroundHints(NoBackground);
- }
--
-+
- }
- else if (m_pAppletPainter->formFactor() == Plasma::Horizontal)
- {
-@@ -644,7 +650,7 @@
- // no backround in vertical panel mode
- setBackgroundHints(NoBackground);
- }
--
-+
- updateSize();
- }
- if (constraints.testFlag(Plasma::SizeConstraint))
-@@ -662,12 +668,12 @@
- YaWP::updateSize()
- {
- QSize sizeHint = m_pAppletPainter->getSize(size());
--
-+
- if (formFactor() == Plasma::Horizontal)
- {
- setMinimumHeight(0);
- setMaximumHeight(QWIDGETSIZE_MAX);
--
-+
- setMinimumWidth(sizeHint.width());
- setMaximumWidth(sizeHint.width());
- }
-@@ -685,7 +691,7 @@
- setMaximumWidth(QWIDGETSIZE_MAX);
- setMinimumHeight(30);
- setMaximumHeight(QWIDGETSIZE_MAX);
--
-+
- resize(sizeHint);
- }
- }
-@@ -773,11 +779,11 @@
- // handle this events. Therefore there is no way for the user to hide the popup manual,
- // unless user is adding at least one city to the applet.
- hidePopup();
--
-+
- // remove current tooltip
- Plasma::ToolTipManager::self()->clearContent(this);
- }
--
-+
- // to make sure we will change the theme
- constraintsEvent( Plasma::FormFactorConstraint | Plasma::SizeConstraint );
- initAppletPainter();
-@@ -797,19 +803,19 @@
- {
- return;
- }
--
-+
- // every time user interacts with this plasmoid, we reset the timer
- // to automatically switch to next location
- stopTraverseLocationTimeout();
-
- event->setAccepted(false);
--
-+
- if (m_pAppletPainter->formFactor() == Plasma::Planar ||
- m_configData.bUseInteractivePanelWeatherIcons)
- {
- m_pAppletPainter->mousePressEvent(event);
- }
--
-+
- if (!event->isAccepted() && m_pAppletPainter->formFactor() != Plasma::Planar)
- togglePopup();
-
-@@ -829,7 +835,7 @@
- else if (event->timerId() == m_iIdTraverseLocations)
- {
- stopTraverseLocationTimeout();
--
-+
- int iSelectedCityIndex = (m_configData.iCityIndex + 1) % m_pWeatherModel->rowCount();
- m_pAppletPainter->initCityChangeAnimation(iSelectedCityIndex);
- }
-@@ -842,13 +848,13 @@
- dStartFunct();
- stopPendingEngineConnection();
- const CityWeather * const pCity = m_stateMachine.currentCity();
--
-+
- if(!pCity)
- {
- dEndFunct();
- return;
- }
--
-+
- if( updateType.testFlag(WeatherServiceModel::CityInfoUpdate) )
- {
- updateCitySubMenu();
-@@ -859,7 +865,7 @@
- //--- update the paneltooltip when we are in panel mode only ---
- if (m_pAppletPainter->formFactor() != Plasma::Planar)
- createPanelTooltip();
--
-+
- m_pAppletPainter->update();
- dEndFunct();
- }
-@@ -904,7 +910,7 @@
- m_stateMachine.setCurrentCityIndex( cityIndex );
- m_configData.iCityIndex = m_stateMachine.currentCityIndex();
- const CityWeather * city = m_stateMachine.currentCity();
--
-+
- if (city)
- {
- //--- select the right menuitem in the city-submenu ---
-@@ -912,7 +918,7 @@
- int iCityIndex = m_stateMachine.currentCityIndex();
- if (list.count() > iCityIndex)
- list.at(iCityIndex )->setChecked( true );
--
-+
- //--- update the paneltooltip when we are in panel mode only ---
- if (m_pAppletPainter->formFactor() != Plasma::Planar)
- createPanelTooltip();
-@@ -931,7 +937,7 @@
- YaWP::slotThemeChanged()
- {
- setDefaultFontColors();
--
-+
- if (m_pAppletPainter->formFactor() != Plasma::Planar)
- createPanelTooltip();
- }
-@@ -946,10 +952,10 @@
- QDir::NoSort,
- QDir::Files | QDir::NoSymLinks | QDir::Writable);
- QFileInfoList cacheFiles = cacheDir.entryInfoList();
--
-+
- const QDateTime currentDateTime = QDateTime::currentDateTime();
- KUrl::List selectedCacheFiles;
--
-+
- foreach(QFileInfo info, cacheFiles)
- {
- // When file is older than five days, we add it to the list of files that will be removed.
-@@ -963,7 +969,7 @@
- dTracing() << "Keeping file" << info.absoluteFilePath();
- }
- }
--
-+
- // Start job to remove selected files. We hide the progress information,
- // because we do not want to bother the user with this stuff.
- if (selectedCacheFiles.count() > 0)
-@@ -1022,7 +1028,7 @@
- action->setData( QVariant(i) );
- m_pGrpActionCities->addAction( action );
- m_pCitySubMenu->addAction( action );
--
-+
- if( i == m_configData.iCityIndex )
- action->setChecked( true );
- }
-@@ -1033,7 +1039,7 @@
- YaWP::initAppletPainter()
- {
- const Plasma::FormFactor form = formFactor();
--
-+
- if (m_pAppletPainter == 0 || m_pAppletPainter->formFactor() != form)
- {
- if (m_pAppletPainter != 0)
-@@ -1041,7 +1047,7 @@
- m_pAppletPainter->disconnect();
- this->disconnect(m_pAppletPainter);
- this->disconnect(m_pAppletPainter->timeLine());
--
-+
- delete m_pAppletPainter;
- }
-
-@@ -1062,12 +1068,12 @@
- connect(m_pAppletPainter, SIGNAL(signalToggleWeatherIcon(int)), this, SLOT(slotToggleWeatherIcon(int)), Qt::DirectConnection);
- connect(m_pAppletPainter->timeLine(), SIGNAL(finished()), this, SLOT(animationFinished()));
- }
--
-+
- if (m_svg.isValid())
- m_pAppletPainter->setSvg(&m_svg);
- if (m_customSvg.isValid())
- m_pAppletPainter->setCustomSvg(&m_customSvg);
--
-+
- m_pAppletPainter->setupAnimationTimeLine();
- }
-
-@@ -1077,16 +1083,16 @@
- {
- bool itemFound = extender()->hasItem(PANEL_DESKTOP_INTERFACE_NAME);
- Plasma::ExtenderItem * item = 0;
--
-+
- if (itemFound)
- item = extender()->item(PANEL_DESKTOP_INTERFACE_NAME);
--
-+
- // When we already have an extender item, just connect the current painter with this extender item
- if (item != 0 && item->widget() != 0)
- {
- PanelDesktopInterface * popupDesktopInterface = dynamic_cast<PanelDesktopInterface *>(item->widget());
- PanelPainter * panelPainter = dynamic_cast<PanelPainter *>(m_pAppletPainter);
--
-+
- if (panelPainter != 0 && popupDesktopInterface != 0)
- {
- panelPainter->setPopupPainter(popupDesktopInterface->desktopPainter());
-@@ -1121,14 +1127,14 @@
- popupDesktopInterface->setSvg(&m_svg);
- popupDesktopInterface->setCustomSvg(&m_customSvg);
- popupDesktopInterface->setupAnimationTimeLine();
--
-+
- popupDesktopInterface->setMinimumSize(QSizeF(100, 93));
- popupDesktopInterface->setPreferredSize(273, 255);
-
- panelPainter->setPopupPainter(popupDesktopInterface->desktopPainter());
--
-+
- connect( m_pWeatherModel, SIGNAL(isBusy(bool)), popupDesktopInterface, SLOT(setBusy(bool)) );
--
-+
- item->setTitle(i18n("yaWP Desktop Interface"));
- item->setIcon("weather-clear");
- item->setWidget(popupDesktopInterface);
-@@ -1141,7 +1147,7 @@
- YaWP::destroyExtenderItem()
- {
- bool itemFound = extender()->hasItem(PANEL_DESKTOP_INTERFACE_NAME);
--
-+
- if (itemFound)
- {
- extender()->item(PANEL_DESKTOP_INTERFACE_NAME)->deleteLater();
-@@ -1153,7 +1159,7 @@
- {
- dStartFunct();
- Plasma::ToolTipManager::self()->clearContent(this);
--
-+
- //--- just exit, when we have no city or no weather information ---
- const CityWeather * city = m_stateMachine.currentCity();
- if( !city || city->days().count() == 0 )
-@@ -1164,7 +1170,7 @@
-
- Plasma::ToolTipContent toolTipData;
- toolTipData.setMainText( city->localizedCityString() );
--
-+
- //--- Create the tooltip pixmap for simple layout and extended tooltip ---
- if (!m_configData.bUseExtendedTooltip ||
- m_configData.extendedTooltipOptions.testFlag(Yawp::PreviewPage))
-@@ -1172,46 +1178,46 @@
- DesktopPainter toolTipPainter(0, &m_configData, &m_stateMachine);
- toolTipPainter.setSvg(&m_svg);
- toolTipPainter.setCustomSvg(&m_customSvg);
--
-+
- QPixmap pix;
- if (!m_configData.bUseExtendedTooltip || city->days().count() == 1)
- pix = toolTipPainter.createSimpleToolTip(QSize(218,0));
- else
- pix = toolTipPainter.createExtendedToolTip(QSize(218,0));
--
-+
- if (!pix.isNull())
- toolTipData.setImage(pix);
- }
--
-+
- //--- Create the content of the extended tooltip ---
- if (m_configData.bUseExtendedTooltip)
- {
- if (!m_configData.extendedTooltipOptions.testFlag(Yawp::PreviewPage))
- {
- KIcon appIcon(icon());
-- toolTipData.setImage( appIcon.pixmap(48,48) );
-+ toolTipData.setImage( appIcon.pixmap(48,48) );
- }
--
-+
- bool showSatellitePage
- = m_configData.extendedTooltipOptions.testFlag(Yawp::SatellitePage) &&
- m_stateMachine.hasPage(Yawp::SatellitePage);
- QString toolTipText;
--
-+
- if (showSatellitePage)
- toolTipText += "<table><tr><td>";
--
-+
- //--- Create the forecast information for today and the following two days ---
- const int maxDay = qMin(3, city->days().count());
- for (int dayIndex = 0; dayIndex < maxDay; ++dayIndex)
- {
- const YawpDay * day = city->days().at(dayIndex);
--
-+
- // QDate returns translated nominative case of day
- // name which is grammatically wrong at least in
- // Russian. So fetch base English form and translate
- // into correct one with own catalog
- const KDateTime kDate(day->date());
--
-+
- toolTipText += "<u>"
- + i18n("Forecast for %1 (%2)",
- i18nc("Forecast for day",
-@@ -1221,7 +1227,7 @@
- toolTipText += i18n("Day: ")
- + Utils::LocalizedWeatherString(day->weather().description())
- + "<br />";
--
-+
- if (day->hasNightValues())
- {
- toolTipText += i18n("Night: ")
-@@ -1253,29 +1259,29 @@
- + "<br />";
- }
- }
--
-+
- if (dayIndex+1 < maxDay)
- toolTipText += "<br />";
- else
- // removes the last <br />; because this is the end of text
- toolTipText.remove(toolTipText.length()-6, 6);
- }
--
-+
- if (showSatellitePage)
- {
- toolTipData.addResource(
- Plasma::ToolTipContent::ImageResource,
- QUrl("wicon://satelite"),
- QVariant(city->satelliteImage().scaledToWidth(218, Qt::SmoothTransformation)));
--
-+
- toolTipText += "</td><td valign=\"top\">";
- toolTipText += "<img src=\"wicon://satelite\"/>";
-- toolTipText += "</td></tr></table>";
-+ toolTipText += "</td></tr></table>";
- }
--
-+
- toolTipData.setSubText(toolTipText);
- }
--
-+
- toolTipData.setAutohide(false);
- Plasma::ToolTipManager::self()->setContent(this, toolTipData);
-
diff --git a/kde-plasma-yawp.spec b/kde-plasma-yawp.spec
index ec1af33..43327af 100644
--- a/kde-plasma-yawp.spec
+++ b/kde-plasma-yawp.spec
@@ -1,6 +1,6 @@
Name: kde-plasma-yawp
Version: 0.4.0
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: Yet Another Weather Plasmoid
Group: User Interface/Desktops
License: GPLv2+
@@ -9,6 +9,7 @@ Source0: http://downloads.sourceforge.net/yawp/yawp-%{version}.tar.bz2
# fix geometry settings (#754407)
# http://yawp.svn.sourceforge.net/viewvc/yawp?view=revision&revision=484
# http://yawp.svn.sourceforge.net/viewvc/yawp?view=revision&revision=485
+# http://yawp.svn.sourceforge.net/viewvc/yawp?view=revision&revision=486
Patch0: kde-plasma-yawp-fix-geometry.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -67,7 +68,7 @@ rm -rf %{buildroot}
%changelog
-* Wed Nov 16 2011 Alexey Kurov <nucleo at fedoraproject.org> - 0.4.0-4
+* Thu Nov 17 2011 Alexey Kurov <nucleo at fedoraproject.org> - 0.4.0-5
- fix geometry settings (#754407)
* Sun Nov 13 2011 Alexey Kurov <nucleo at fedoraproject.org> - 0.4.0-2
More information about the scm-commits
mailing list