SVN commit 852581 by sengels: enable folderview on windows M +4 -3 CMakeLists.txt M +10 -2 plasma/applets/folderview/folderview.cpp --- branches/KDE/4.1/kdebase/apps/CMakeLists.txt #852580:852581 @@ -42,14 +42,15 @@ add_subdirectory( kdepasswd ) endif ( Q_WS_MAC ) +if ( PLASMA_FOUND ) + add_subdirectory( plasma ) +endif ( PLASMA_FOUND ) + if ( Q_WS_X11 ) add_subdirectory( kinfocenter ) add_subdirectory( nsplugins ) add_subdirectory( konsole ) add_subdirectory( kdepasswd ) - if ( PLASMA_FOUND ) - add_subdirectory( plasma ) - endif ( PLASMA_FOUND ) endif ( Q_WS_X11 ) macro_optional_add_subdirectory( doc ) --- branches/KDE/4.1/kdebase/apps/plasma/applets/folderview/folderview.cpp #852580:852581 @@ -57,8 +57,10 @@ #include "plasma/theme.h" #include "plasma/paintutils.h" +#ifdef Q_WS_X11 #include #include +#endif #include @@ -511,13 +513,15 @@ h = m_pixmap.height() - dy; dirty = QRect(0, 0, m_pixmap.width(), dy); } - +#ifdef Q_WS_X11 // Avoid the overhead of creating a QPainter to do the blit. Display *dpy = QX11Info::display(); GC gc = XCreateGC(dpy, m_pixmap.handle(), 0, 0); XCopyArea(dpy, m_pixmap.handle(), m_pixmap.handle(), gc, 0, sy, m_pixmap.width(), h, 0, dy); XFreeGC(dpy, gc); - +#else + m_pixmap = m_pixmap.copy(0, sy, m_pixmap.width(), h); +#endif return mapToViewport(dirty.translated(contentsRect().topLeft().toPoint())).toAlignedRect(); } @@ -577,7 +581,11 @@ if (m_url == KUrl("desktop:/")) { titleText = i18n("Desktop"); //FIXME: 4.2 make it "Desktop Folder; } else if (m_url.isLocalFile() && m_url.path().startsWith(KUrl("~").path())) { +#ifndef Q_WS_WIN titleText = m_url.path().replace(KUrl("~").path(), i18n("Home")); +#else + titleText = m_url.path().replace(QDir::homePath(), i18n("Home")); +#endif } else { titleText = m_url.pathOrUrl(); }