SVN commit 783528 by bettio: Added window icons support. M +13 -0 pager.cpp M +1 -0 pager.h M +10 -3 pagerConfig.ui --- trunk/KDE/kdebase/workspace/plasma/applets/pager/pager.cpp #783527:783528 @@ -48,6 +48,7 @@ : Plasma::Applet(parent, args), m_dialog(0), m_showDesktopNumber(true), + m_showWindowIcons(true), m_rows(2), m_columns(0), m_dragId(0), @@ -68,6 +69,7 @@ KConfigGroup cg = config(); m_showDesktopNumber = cg.readEntry("showDesktopNumber", m_showDesktopNumber); + m_showWindowIcons = cg.readEntry("showWindowIcons", m_showWindowIcons); m_rows = globalConfig().readEntry("rows", m_rows); if (m_rows < 1) { @@ -161,6 +163,7 @@ } ui.showDesktopNumberCheckBox->setChecked(m_showDesktopNumber); + ui.showWindowIconsCheckBox->setChecked(m_showWindowIcons); ui.spinRows->setValue(m_rows); ui.spinRows->setMaximum(m_desktopCount); @@ -271,6 +274,12 @@ changed = true; } + if (m_showWindowIcons != ui.showWindowIconsCheckBox->isChecked()) { + m_showWindowIcons = ui.showWindowIconsCheckBox->isChecked(); + cg.writeEntry("showWindowIcons", m_showWindowIcons); + changed = true; + } + // we need to keep all pager applets consistent since this affects // the layout of the desktops as used by the window manager, // so we store the row count in the applet global configuration @@ -603,6 +612,10 @@ painter->setClipRect(m_rects[i]); } painter->drawRect(rect); + if ((rect.width() > 16) && (rect.height() > 16) && m_showWindowIcons){ + painter->drawPixmap(rect.x() + (rect.width() - 16) / 2, rect.y() + (rect.height() - 16) / 2, 16, 16, + KWindowSystem::icon(m_windowRects[i][j].first, 16, 16, true)); + } } } --- trunk/KDE/kdebase/workspace/plasma/applets/pager/pager.h #783527:783528 @@ -81,6 +81,7 @@ KDialog *m_dialog; Ui::pagerConfig ui; bool m_showDesktopNumber; + bool m_showWindowIcons; int m_rows; int m_columns; --- trunk/KDE/kdebase/workspace/plasma/applets/pager/pagerConfig.ui #783527:783528 @@ -35,7 +35,14 @@ - + + + + Display window &icons + + + + Number of rows: @@ -45,7 +52,7 @@ - + Change the number of rows @@ -61,7 +68,7 @@ - + Qt::Horizontal