[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/plasma/containments/desktop
From: Andre Moreira Magalhaes <andrunko () yahoo ! com ! br>
Date: 2008-01-25 20:02:25
Message-ID: 1201291345.964303.10743.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 766414 by andrunko:
Do not reload desktop background if image hasn't changed.
M +14 -1 desktop.cpp
--- trunk/KDE/kdebase/workspace/plasma/containments/desktop/desktop.cpp #766413:766414
@@ -100,6 +100,17 @@
}
if (m_slideFiles.size() > 0) {
+ // do not change to the same background (same path)
+ if (m_wallpaperPath == m_slideFiles[m_currentSlide]) {
+ if (m_slideFiles.size() == 1) {
+ return;
+ }
+ // try next one, they can't be the same (at least the same path)
+ if (++m_currentSlide >= m_slideFiles.size()) {
+ m_currentSlide = 0;
+ }
+ }
+
m_wallpaperPath = m_slideFiles[m_currentSlide];
if (!skipUpdates) {
updateBackground();
@@ -179,6 +190,7 @@
// If no wallpaper is set, a default will be set in updateBackground()
// which is called as soon as constraints are updated.
+ QString oldWallpaperPath(m_wallpaperPath);
m_wallpaperPath = cg.readEntry("wallpaper", QString());
if (!m_wallpaperPath.isEmpty()) {
kDebug() << "Using configured wallpaper" << m_wallpaperPath;
@@ -195,7 +207,8 @@
m_backgroundMode == BackgroundDialog::kNoBackground) {
m_slideshowTimer.stop();
// Only set the wallpaper if constraints have been loaded
- if (!skipUpdates) {
+ // and background image has changed
+ if (!skipUpdates && oldWallpaperPath != m_wallpaperPath) {
updateBackground();
}
} else {
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic