--- kdebase-3.4.0/kcontrol/background/bgdialog.cpp.metainfo 2005-05-06 09:03:38.000000000 -0300 +++ kdebase-3.4.0/kcontrol/background/bgdialog.cpp 2005-05-06 09:22:44.000000000 -0300 @@ -408,26 +408,19 @@ if ( !(*it).endsWith(".desktop") && files.grep(*it).empty() ) { // First try to see if we have a comment describing the image. If we do // just use the first line of said comment. - KFileMetaInfo metaInfo(*it); QString imageCaption; - if (metaInfo.isValid() && metaInfo.item("Comment").isValid()) - imageCaption = metaInfo.item("Comment").string().section('\n', 0, 0); + int slash = (*it).findRev('/') + 1; + int endDot = (*it).findRev('.'); - if (imageCaption.isEmpty()) - { - int slash = (*it).findRev('/') + 1; - int endDot = (*it).findRev('.'); - - // strip the extension if it exists - if (endDot != -1 && endDot > slash) - imageCaption = (*it).mid(slash, endDot - slash); - else - imageCaption = (*it).mid(slash); + // strip the extension if it exists + if (endDot != -1 && endDot > slash) + imageCaption = (*it).mid(slash, endDot - slash); + else + imageCaption = (*it).mid(slash); - imageCaption.replace('_', ' '); - imageCaption = KStringHandler::capwords(imageCaption); - } + imageCaption.replace('_', ' '); + imageCaption = KStringHandler::capwords(imageCaption); imageCaption = KStringHandler::rEmSqueeze(imageCaption, m_urlWallpaperBox->fontMetrics(), 11); @@ -479,6 +472,9 @@ i--; comboWallpaper->removeItem(i); } + + imageCaption.replace('_', ' '); + imageCaption = KStringHandler::capwords(imageCaption); comboWallpaper->insertItem(KStringHandler::rEmSqueeze(imageCaption, m_urlWallpaperBox->fontMetrics(), 11)); m_Wallpaper[s] = i; comboWallpaper->setCurrentItem(i);