|
|
|
@ -122,7 +122,7 @@ void KBackgroundPattern::readSettings()
|
|
|
|
|
m_Pattern = m_pConfig->readPathEntry("File"); |
|
|
|
|
m_Comment = m_pConfig->readEntry("Comment"); |
|
|
|
|
if (m_Comment.isEmpty()) |
|
|
|
|
m_Comment = m_File.mid(m_File.tqfindRev('/')+1); |
|
|
|
|
m_Comment = m_File.mid(m_File.findRev('/')+1); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -190,10 +190,10 @@ TQStringList KBackgroundPattern::list()
|
|
|
|
|
TQStringList::Iterator it; |
|
|
|
|
for (it=lst.begin(); it!=lst.end(); ++it) { |
|
|
|
|
// Strip path and suffix
|
|
|
|
|
int pos = (*it).tqfindRev('/'); |
|
|
|
|
int pos = (*it).findRev('/'); |
|
|
|
|
if (pos != -1) |
|
|
|
|
(*it) = (*it).mid(pos+1); |
|
|
|
|
pos = (*it).tqfindRev('.'); |
|
|
|
|
pos = (*it).findRev('.'); |
|
|
|
|
if (pos != -1) |
|
|
|
|
(*it) = (*it).left(pos); |
|
|
|
|
} |
|
|
|
@ -401,10 +401,10 @@ TQStringList KBackgroundProgram::list()
|
|
|
|
|
TQStringList::Iterator it; |
|
|
|
|
for (it=lst.begin(); it!=lst.end(); ++it) { |
|
|
|
|
// Strip path and suffix
|
|
|
|
|
int pos = (*it).tqfindRev('/'); |
|
|
|
|
int pos = (*it).findRev('/'); |
|
|
|
|
if (pos != -1) |
|
|
|
|
(*it) = (*it).mid(pos+1); |
|
|
|
|
pos = (*it).tqfindRev('.'); |
|
|
|
|
pos = (*it).findRev('.'); |
|
|
|
|
if (pos != -1) |
|
|
|
|
(*it) = (*it).left(pos); |
|
|
|
|
} |
|
|
|
@ -665,7 +665,7 @@ void KBackgroundSettings::setWallpaperList(TQStringList list)
|
|
|
|
|
} |
|
|
|
|
updateWallpaperFiles(); |
|
|
|
|
// Try to keep the current wallpaper (-1 to set position to one before it)
|
|
|
|
|
m_CurrentWallpaper = m_WallpaperFiles.tqfindIndex(m_CurrentWallpaperName) - 1; |
|
|
|
|
m_CurrentWallpaper = m_WallpaperFiles.findIndex(m_CurrentWallpaperName) - 1; |
|
|
|
|
changeWallpaper(m_CurrentWallpaper < 0); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -751,7 +751,7 @@ void KBackgroundSettings::readSettings(bool reparse)
|
|
|
|
|
m_BackgroundMode = defBackgroundMode; |
|
|
|
|
s = m_pConfig->readEntry("BackgroundMode", "invalid"); |
|
|
|
|
|
|
|
|
|
if (m_BMMap.tqcontains(s)) { |
|
|
|
|
if (m_BMMap.contains(s)) { |
|
|
|
|
int mode = m_BMMap[s]; |
|
|
|
|
// consistency check
|
|
|
|
|
if ( ((mode != Pattern) && (mode != Program)) || |
|
|
|
@ -763,7 +763,7 @@ void KBackgroundSettings::readSettings(bool reparse)
|
|
|
|
|
|
|
|
|
|
m_BlendMode = defBlendMode; |
|
|
|
|
s = m_pConfig->readEntry("BlendMode", "invalid"); |
|
|
|
|
if (m_BlMMap.tqcontains(s)) { |
|
|
|
|
if (m_BlMMap.contains(s)) { |
|
|
|
|
m_BlendMode = m_BlMMap[s]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -784,14 +784,14 @@ void KBackgroundSettings::readSettings(bool reparse)
|
|
|
|
|
|
|
|
|
|
m_MultiMode = defMultiMode; |
|
|
|
|
s = m_pConfig->readEntry("MultiWallpaperMode"); |
|
|
|
|
if (m_MMMap.tqcontains(s)) { |
|
|
|
|
if (m_MMMap.contains(s)) { |
|
|
|
|
int mode = m_MMMap[s]; |
|
|
|
|
m_MultiMode = mode; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
updateWallpaperFiles(); |
|
|
|
|
if( !m_CurrentWallpaperName.isEmpty()) |
|
|
|
|
m_CurrentWallpaper = m_WallpaperFiles.tqfindIndex(m_CurrentWallpaperName); |
|
|
|
|
m_CurrentWallpaper = m_WallpaperFiles.findIndex(m_CurrentWallpaperName); |
|
|
|
|
if(m_CurrentWallpaper < 0) |
|
|
|
|
m_CurrentWallpaper = 0; |
|
|
|
|
|
|
|
|
@ -799,7 +799,7 @@ void KBackgroundSettings::readSettings(bool reparse)
|
|
|
|
|
m_WallpaperMode = defWallpaperMode; |
|
|
|
|
m_Wallpaper = m_pConfig->readPathEntry("Wallpaper"); |
|
|
|
|
s = m_pConfig->readEntry("WallpaperMode", "invalid"); |
|
|
|
|
if (m_WMMap.tqcontains(s)) { |
|
|
|
|
if (m_WMMap.contains(s)) { |
|
|
|
|
int mode = m_WMMap[s]; |
|
|
|
|
// consistency check.
|
|
|
|
|
if ((mode == NoWallpaper) || !m_Wallpaper.isEmpty() || (m_MultiMode == InOrder || m_MultiMode == Random)) |
|
|
|
|