SOURCES: kde4-kdebase-workspace-branch.diff - updated
shadzik
shadzik at pld-linux.org
Tue Feb 24 02:46:54 CET 2009
Author: shadzik Date: Tue Feb 24 01:46:54 2009 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- updated
---- Files affected:
SOURCES:
kde4-kdebase-workspace-branch.diff (1.3 -> 1.4)
---- Diffs:
================================================================
Index: SOURCES/kde4-kdebase-workspace-branch.diff
diff -u SOURCES/kde4-kdebase-workspace-branch.diff:1.3 SOURCES/kde4-kdebase-workspace-branch.diff:1.4
--- SOURCES/kde4-kdebase-workspace-branch.diff:1.3 Fri Feb 20 22:33:51 2009
+++ SOURCES/kde4-kdebase-workspace-branch.diff Tue Feb 24 02:46:49 2009
@@ -1,5 +1,5 @@
---- workspace/ksmserver/shutdowndlg.cpp (.../tags/KDE/4.2.0/kdebase) (wersja 929191)
-+++ workspace/ksmserver/shutdowndlg.cpp (.../branches/KDE/4.2/kdebase) (wersja 929191)
+--- workspace/ksmserver/shutdowndlg.cpp (.../tags/KDE/4.2.0/kdebase) (wersja 930691)
++++ workspace/ksmserver/shutdowndlg.cpp (.../branches/KDE/4.2/kdebase) (wersja 930691)
@@ -604,6 +604,8 @@
m_svg->paint(&p, QRect(0, 0, width(), height()), "background");
setMask(mask);
@@ -9,8 +9,8 @@
}
void KSMShutdownDlg::slotLogout()
---- workspace/ksmserver/KSMServerInterface.h (.../tags/KDE/4.2.0/kdebase) (wersja 929191)
-+++ workspace/ksmserver/KSMServerInterface.h (.../branches/KDE/4.2/kdebase) (wersja 929191)
+--- workspace/ksmserver/KSMServerInterface.h (.../tags/KDE/4.2.0/kdebase) (wersja 930691)
++++ workspace/ksmserver/KSMServerInterface.h (.../branches/KDE/4.2/kdebase) (wersja 930691)
@@ -42,6 +42,10 @@
Q_SCRIPTABLE void suspendStartup( QString );
Q_SCRIPTABLE void resumeStartup( QString );
@@ -22,8 +22,8 @@
};
#endif
---- workspace/ksmserver/org.kde.KSMServerInterface.xml (.../tags/KDE/4.2.0/kdebase) (wersja 929191)
-+++ workspace/ksmserver/org.kde.KSMServerInterface.xml (.../branches/KDE/4.2/kdebase) (wersja 929191)
+--- workspace/ksmserver/org.kde.KSMServerInterface.xml (.../tags/KDE/4.2.0/kdebase) (wersja 930691)
++++ workspace/ksmserver/org.kde.KSMServerInterface.xml (.../branches/KDE/4.2/kdebase) (wersja 930691)
@@ -27,5 +27,11 @@
<arg type="s" direction="in"/>
</method>
@@ -36,8 +36,8 @@
+ </signal>
</interface>
</node>
---- workspace/ksmserver/shutdown.cpp (.../tags/KDE/4.2.0/kdebase) (wersja 929191)
-+++ workspace/ksmserver/shutdown.cpp (.../branches/KDE/4.2/kdebase) (wersja 929191)
+--- workspace/ksmserver/shutdown.cpp (.../tags/KDE/4.2.0/kdebase) (wersja 930691)
++++ workspace/ksmserver/shutdown.cpp (.../branches/KDE/4.2/kdebase) (wersja 930691)
@@ -82,6 +82,8 @@
void KSMServer::logout( int confirm, int sdtype, int sdmode )
@@ -47,8 +47,8 @@
shutdown( (KWorkSpace::ShutdownConfirm)confirm,
(KWorkSpace::ShutdownType)sdtype,
(KWorkSpace::ShutdownMode)sdmode );
---- workspace/ksmserver/server.h (.../tags/KDE/4.2.0/kdebase) (wersja 929191)
-+++ workspace/ksmserver/server.h (.../branches/KDE/4.2/kdebase) (wersja 929191)
+--- workspace/ksmserver/server.h (.../tags/KDE/4.2.0/kdebase) (wersja 930691)
++++ workspace/ksmserver/server.h (.../branches/KDE/4.2/kdebase) (wersja 930691)
@@ -193,6 +193,10 @@
void saveCurrentSessionAs( const QString & );
QStringList sessionList();
@@ -60,8 +60,8 @@
private:
QList<KSMListener*> listener;
QList<KSMClient*> clients;
---- workspace/ksmserver/kcm/kcmsmserver.desktop (.../tags/KDE/4.2.0/kdebase) (wersja 929191)
-+++ workspace/ksmserver/kcm/kcmsmserver.desktop (.../branches/KDE/4.2/kdebase) (wersja 929191)
+--- workspace/ksmserver/kcm/kcmsmserver.desktop (.../tags/KDE/4.2.0/kdebase) (wersja 930691)
++++ workspace/ksmserver/kcm/kcmsmserver.desktop (.../branches/KDE/4.2/kdebase) (wersja 930691)
@@ -39,6 +39,7 @@
Name[gu]=સત્ર વ્યવસ્થાપક
Name[he]=מנהל ההפעלה
@@ -96,8 +96,8 @@
Comment[se]=Heivet bargovuorrogieđahalli ja olggosčáliheami
Comment[sk]=Nastavenie správcu sedení a odhlásenia
Comment[sl]=Tu lahko nastavite upravljalnik sej in nastavitve odjav
---- workspace/kcontrol/dateandtime/clock.desktop (.../tags/KDE/4.2.0/kdebase) (wersja 929191)
-+++ workspace/kcontrol/dateandtime/clock.desktop (.../branches/KDE/4.2/kdebase) (wersja 929191)
+--- workspace/kcontrol/dateandtime/clock.desktop (.../tags/KDE/4.2.0/kdebase) (wersja 930691)
++++ workspace/kcontrol/dateandtime/clock.desktop (.../branches/KDE/4.2/kdebase) (wersja 930691)
@@ -40,6 +40,7 @@
Name[gu]=તારીખ & સમય
Name[he]=תאריך ושעה
@@ -114,8 +114,216 @@
Comment[hr]=Postavke datuma i vremena
Comment[hsb]=Nastajenja za datum a čas
Comment[hu]=A dátum és az idő beállításai
---- workspace/kcontrol/kfontinst/kcmfontinst/fontinst.desktop (.../tags/KDE/4.2.0/kdebase) (wersja 929191)
-+++ workspace/kcontrol/kfontinst/kcmfontinst/fontinst.desktop (.../branches/KDE/4.2/kdebase) (wersja 929191)
+--- workspace/kcontrol/kfontinst/kcmfontinst/KCmFontInst.cpp (.../tags/KDE/4.2.0/kdebase) (wersja 930691)
++++ workspace/kcontrol/kfontinst/kcmfontinst/KCmFontInst.cpp (.../branches/KDE/4.2/kdebase) (wersja 930691)
+@@ -285,7 +285,6 @@
+ previewFrameLayout->addWidget(itsPreview);
+
+ itsPreview->engine()->readConfig(itsConfig);
+- CFcEngine::setTextCol(QApplication::palette().color(QPalette::Active, QPalette::Text));
+ connect(itsPreview, SIGNAL(doZoomIn()), SLOT(zoomIn()));
+ connect(itsPreview, SIGNAL(doZoomOut()), SLOT(zoomOut()));
+
+--- workspace/kcontrol/kfontinst/kcmfontinst/FontList.cpp (.../tags/KDE/4.2.0/kdebase) (wersja 930691)
++++ workspace/kcontrol/kfontinst/kcmfontinst/FontList.cpp (.../branches/KDE/4.2/kdebase) (wersja 930691)
+@@ -196,8 +196,8 @@
+ #endif
+
+ static QString thumbKey(const QString &family, quint32 style, int height, const QColor &col);
+- QPixmap * getPixmap(const QString &family, const QString &name, const QString &fileName,
+- int height, quint32 stlye, bool selected, bool force=false);
++ QImage getImage(const QString &family, const QString &name, const QString &fileName,
++ int height, quint32 stlye, bool selected, bool force=false);
+ #ifdef KFI_SAVE_PIXMAPS
+ void clearOld();
+ #endif
+@@ -205,10 +205,10 @@
+
+ private:
+
+- CFcEngine *itsFcEngine;
+- QMap<QString, QPixmap> itsMap;
++ CFcEngine *itsFcEngine;
++ QMap<QString, QImage> itsMap;
+ #ifdef KFI_SAVE_PIXMAPS
+- QString itsPath;
++ QString itsPath;
+ #endif
+ };
+
+@@ -295,30 +295,34 @@
+ col.red(), col.green(), col.blue());
+ }
+
+-QPixmap * CPreviewCache::getPixmap(const QString &family, const QString &name, const QString &fileName,
+- int height, quint32 style, bool selected, bool force)
++QImage CPreviewCache::getImage(const QString &family, const QString &name, const QString &fileName,
++ int height, quint32 style, bool selected, bool force)
+ {
+ #ifdef KFI_SAVE_PIXMAPS
+ static const char *constFileType="PNG";
+ #endif
+
+- QColor col(QApplication::palette().color(selected ? QPalette::HighlightedText : QPalette::Text));
++ QColor col(QApplication::palette().color(selected ? QPalette::HighlightedText : QPalette::Text)),
++ bgnd(Qt::black);
+ QString thumbName(thumbKey(family, style, height, col));
+
+ if(!force && !itsMap[thumbName].isNull())
+- return &(itsMap[thumbName]);
++ return itsMap[thumbName];
+
+ #ifdef KFI_SAVE_PIXMAPS
+ QString thumbFile(itsPath+thumbName);
+
+ if(!force && itsMap[thumbName].load(thumbFile, constFileType))
+- return &(itsMap[thumbName]);
++ return itsMap[thumbName];
+ #endif
+
+- itsMap[thumbName]=QPixmap();
++ itsMap[thumbName]=QImage();
+
+- if(itsFcEngine->drawPreview(fileName.isEmpty() ? name : fileName, itsMap[thumbName], col,
+- height, style)) // CPD:TODO face???
++ bgnd.setAlpha(0);
++ itsMap[thumbName]=itsFcEngine->drawPreview(fileName.isEmpty() ? name : fileName, col, bgnd,
++ height, style); // CPD:TODO face???
++
++ if(!itsMap[thumbName].isNull())
+ {
+ #ifdef KFI_SAVE_PIXMAPS
+ QFile pngFile(thumbFile);
+@@ -326,22 +330,17 @@
+ if(pngFile.open(QIODevice::WriteOnly))
+ {
+ #endif
+- QImage thumb=itsMap[thumbName].toImage();
+-
+ #ifdef KFI_SAVE_PIXMAPS
+- thumb.save(&pngFile, constFileType);
++ itsMap[thumbName].save(&pngFile, constFileType);
+ pngFile.close();
+ #endif
+- itsMap[thumbName]=QPixmap::fromImage(thumb);
+- return &(itsMap[thumbName]);
++ return itsMap[thumbName];
+ #ifdef KFI_SAVE_PIXMAPS
+ }
+ #endif
+ }
+- else
+- itsMap[thumbName]=QPixmap(1, 1);
+
+- return NULL;
++ return QImage();
+ }
+
+ #ifdef KFI_SAVE_PIXMAPS
+@@ -411,7 +410,7 @@
+ {
+ const KIO::UDSEntry &udsEntry(item.entry());
+
+- itsPixmap[0]=itsPixmap[1]=0L;
++ clearImage();
+ setUrl(item.url());
+ itsName=udsEntry.stringValue(KIO::UDSEntry::UDS_NAME);
+ itsFileName=udsEntry.stringValue((uint)UDS_EXTRA_FILE_NAME);
+@@ -468,19 +467,19 @@
+ }
+ }
+
+-const QPixmap * CFontItem::pixmap(bool selected, bool force)
++const QImage & CFontItem::image(bool selected, bool force)
+ {
+ int idx(selected ? 1 : 0);
+
+ if(parent() &&
+- (!itsPixmap[idx] || itsPixmap[idx]->isNull() || force ||
+- itsPixmap[idx]->height()!=CFontList::previewSize()))
+- itsPixmap[idx]=theCache->getPixmap(family(), name(), isEnabled()
++ (itsImage[idx].isNull() || force ||
++ itsImage[idx].height()!=CFontList::previewSize()))
++ itsImage[idx]=theCache->getImage(family(), name(), isEnabled()
+ ? QString()
+ : itsFileName,
+- CFontList::previewSize(), itsStyleInfo, selected, force);
++ CFontList::previewSize(), itsStyleInfo, selected, force);
+
+- return itsPixmap[idx];
++ return itsImage[idx];
+ }
+
+ CFamilyItem::CFamilyItem(CFontList &p, const QString &n)
+@@ -862,7 +861,7 @@
+ fend((*it)->fonts().end());
+
+ for(; fit!=fend; ++fit)
+- (*fit)->clearPixmap();
++ (*fit)->clearImage();
+ }
+
+ theCache->empty();
+@@ -1552,14 +1551,14 @@
+
+ if(fam->regularFont())
+ {
+- const QPixmap *pix=fam->regularFont()->pixmap(option.state&QStyle::State_Selected);
++ const QImage &img=fam->regularFont()->image(option.state&QStyle::State_Selected);
+
+- if(pix)
++ if(!img.isNull())
+ if(Qt::RightToLeft==QApplication::layoutDirection())
+- painter->drawPixmap(option.rect.x()-(pix->width()-option.rect.width()),
+- option.rect.y(), *pix);
++ painter->drawImage(option.rect.x()-(img.width()-option.rect.width()),
++ option.rect.y(), img);
+ else
+- painter->drawPixmap(option.rect.x(), option.rect.y(), *pix);
++ painter->drawImage(option.rect.x(), option.rect.y(), img);
+ }
+ }
+ }
+--- workspace/kcontrol/kfontinst/kcmfontinst/FontList.h (.../tags/KDE/4.2.0/kdebase) (wersja 930691)
++++ workspace/kcontrol/kfontinst/kcmfontinst/FontList.h (.../branches/KDE/4.2/kdebase) (wersja 930691)
+@@ -36,6 +36,7 @@
+ #include <QtCore/QVariant>
+ #include <QtGui/QSortFilterProxyModel>
+ #include <QtGui/QFontDatabase>
++#include <QtGui/QImage>
+ #include "Misc.h"
+ #include "FontLister.h"
+ #include "JobRunner.h"
+@@ -47,7 +48,6 @@
+ class KFileItem;
+ class KFileItemList;
+ class QMenu;
+-class QPixmap;
+ class QMimeData;
+ class QTimer;
+
+@@ -238,8 +238,8 @@
+ quint32 styleInfo() const { return itsStyleInfo; }
+ int index() const { return itsIndex; }
+ const QString & family() const { return (static_cast<CFamilyItem *>(parent()))->name(); }
+- const QPixmap * pixmap(bool selected, bool force=false);
+- void clearPixmap() { itsPixmap[0]=itsPixmap[1]=NULL; }
++ const QImage & image(bool selected, bool force=false);
++ void clearImage() { itsImage[0]=itsImage[1]=QImage(); }
+ int rowNumber() const { return (static_cast<CFamilyItem *>(parent()))->row(this); }
+ const CDisabledFonts::TFileList & files() const { return itsFiles; }
+ KIO::filesize_t size() const { return itsSize; }
+@@ -253,7 +253,7 @@
+ itsStyle,
+ itsMimeType;
+ int itsIndex;
+- QPixmap *itsPixmap[2];
++ QImage itsImage[2];
+ quint32 itsStyleInfo;
+ bool itsBitmap,
+ itsEnabled;
+--- workspace/kcontrol/kfontinst/kcmfontinst/fontinst.desktop (.../tags/KDE/4.2.0/kdebase) (wersja 930691)
++++ workspace/kcontrol/kfontinst/kcmfontinst/fontinst.desktop (.../branches/KDE/4.2/kdebase) (wersja 930691)
@@ -37,6 +37,7 @@
Name[gu]=ફોન્ટ સ્થાપક
Name[he]=מתקין הגופנים
@@ -149,8 +357,115 @@
Comment[se]=Sajáiduhtte, gieđahala ja čájet fonttaid
Comment[sk]=Inštalovanie, správa a náhľady písiem
Comment[sl]=Namesti, upravljaj in prikaži pisave
---- workspace/kcontrol/kfontinst/viewpart/kfontviewpart.desktop (.../tags/KDE/4.2.0/kdebase) (wersja 929191)
-+++ workspace/kcontrol/kfontinst/viewpart/kfontviewpart.desktop (.../branches/KDE/4.2/kdebase) (wersja 929191)
+--- workspace/kcontrol/kfontinst/viewpart/FontPreview.cpp (.../tags/KDE/4.2.0/kdebase) (wersja 930691)
++++ workspace/kcontrol/kfontinst/viewpart/FontPreview.cpp (.../branches/KDE/4.2/kdebase) (wersja 930691)
+@@ -73,11 +73,15 @@
+ {
+ itsLastWidth=width()+constStepSize;
+ itsLastHeight=height()+constStepSize;
++ itsImage=QImage();
+
+- if(!itsCurrentUrl.isEmpty() &&
+- itsEngine->draw(itsCurrentUrl, itsLastWidth, itsLastHeight, itsPixmap,
+- itsCurrentFace, false, itsRange, &itsChars, itsFontName,
+- itsStyleInfo))
++ if(!itsCurrentUrl.isEmpty())
++ itsImage=itsEngine->draw(itsCurrentUrl, itsLastWidth, itsLastHeight,
++ palette().text().color(), palette().base().color(),
++ itsCurrentFace, false, itsRange, &itsChars, itsFontName,
++ itsStyleInfo);
++
++ if(!itsImage.isNull())
+ {
+ itsLastChar=CFcEngine::TChar();
+ setMouseTracking(itsChars.count()>0);
+@@ -86,9 +90,6 @@
+ }
+ else
+ {
+- QPixmap nullPix;
+-
+- itsPixmap=nullPix;
+ itsLastChar=CFcEngine::TChar();
+ setMouseTracking(false);
+ update();
+@@ -119,14 +120,14 @@
+ QPainter paint(this);
+
+ paint.fillRect(rect(), palette().base());
+- if(!itsPixmap.isNull())
++ if(!itsImage.isNull())
+ {
+
+ if(abs(width()-itsLastWidth)>constStepSize || abs(height()-itsLastHeight)>constStepSize)
+ showFont();
+ else
+- paint.drawPixmap(QPoint(constBorder, constBorder), itsPixmap,
+- QRect(0, 0, width()-(constBorder*2), height()-(constBorder*2)));
++ paint.drawImage(QPoint(constBorder, constBorder), itsImage,
++ QRect(0, 0, width()-(constBorder*2), height()-(constBorder*2)));
+ }
+ }
+
+--- workspace/kcontrol/kfontinst/viewpart/FontPreview.h (.../tags/KDE/4.2.0/kdebase) (wersja 930691)
++++ workspace/kcontrol/kfontinst/viewpart/FontPreview.h (.../branches/KDE/4.2/kdebase) (wersja 930691)
+@@ -24,7 +24,7 @@
+ * Boston, MA 02110-1301, USA.
+ */
+
+-#include <QtGui/QPixmap>
++#include <QtGui/QImage>
+ #include <QtCore/QSize>
+ #include <QtGui/QWidget>
+ #include <QtGui/QColor>
+@@ -77,7 +77,7 @@
+
+ private:
+
+- QPixmap itsPixmap;
++ QImage itsImage;
+ KUrl itsCurrentUrl;
+ int itsCurrentFace,
+ itsLastWidth,
+--- workspace/kcontrol/kfontinst/viewpart/FontViewPart.cpp (.../tags/KDE/4.2.0/kdebase) (wersja 930691)
++++ workspace/kcontrol/kfontinst/viewpart/FontViewPart.cpp (.../branches/KDE/4.2/kdebase) (wersja 930691)
+@@ -126,7 +126,6 @@
+ itsFaceWidget->hide();
+
+ itsPreview->engine()->readConfig(*itsConfig);
+- CFcEngine::setTextCol(QApplication::palette().color(QPalette::Active, QPalette::Text));
+ connect(itsPreview, SIGNAL(doZoomIn()), SLOT(zoomIn()));
+ connect(itsPreview, SIGNAL(doZoomOut()), SLOT(zoomOut()));
+
+--- workspace/kcontrol/kfontinst/viewpart/CharTip.cpp (.../tags/KDE/4.2.0/kdebase) (wersja 930691)
++++ workspace/kcontrol/kfontinst/viewpart/CharTip.cpp (.../branches/KDE/4.2/kdebase) (wersja 930691)
+@@ -209,14 +209,19 @@
+ details+="</table>";
+ itsLabel->setText(details);
+
+- QPixmap pix((int)(itsItem.width()*2.5), (int)(itsItem.height()*2.5));
+ QList<CFcEngine::TRange> range;
+ range.append(CFcEngine::TRange(itsItem.ucs4, 0));
+
+- if(itsParent->engine()->draw(itsParent->itsCurrentUrl, pix.width(), pix.height(), pix,
+- itsParent->itsCurrentFace-1, false, range,
+- NULL, itsParent->itsFontName, itsParent->itsStyleInfo))
+- itsPixmapLabel->setPixmap(pix);
++ QColor bgnd(Qt::white);
++ bgnd.setAlpha(0);
++
++ QImage img=itsParent->engine()->draw(itsParent->itsCurrentUrl, (int)(itsItem.width()*2.5),
++ (int)(itsItem.height()*2.5),
++ palette().text().color(), bgnd,
++ itsParent->itsCurrentFace-1, false, range,
++ NULL, itsParent->itsFontName, itsParent->itsStyleInfo);
++ if(!img.isNull())
++ itsPixmapLabel->setPixmap(QPixmap::fromImage(img));
+ else
+ itsPixmapLabel->setPixmap(QPixmap());
+ itsTimer->disconnect(this);
+--- workspace/kcontrol/kfontinst/viewpart/kfontviewpart.desktop (.../tags/KDE/4.2.0/kdebase) (wersja 930691)
++++ workspace/kcontrol/kfontinst/viewpart/kfontviewpart.desktop (.../branches/KDE/4.2/kdebase) (wersja 930691)
@@ -28,6 +28,7 @@
Name[gu]=ફોન્ટ દર્શક
Name[he]=מציג הגופנים
@@ -159,8 +474,8 @@
Name[hr]=Preglednik fontova
Name[hsb]=Přehladowar pisma
Name[hu]=A betűtípusok áttekintése
---- workspace/kcontrol/kfontinst/kio/fonts.desktop (.../tags/KDE/4.2.0/kdebase) (wersja 929191)
-+++ workspace/kcontrol/kfontinst/kio/fonts.desktop (.../branches/KDE/4.2/kdebase) (wersja 929191)
+--- workspace/kcontrol/kfontinst/kio/fonts.desktop (.../tags/KDE/4.2.0/kdebase) (wersja 930691)
++++ workspace/kcontrol/kfontinst/kio/fonts.desktop (.../branches/KDE/4.2/kdebase) (wersja 930691)
@@ -31,6 +31,7 @@
Name[gu]=ફોન્ટ્સ
Name[he]=גופנים
@@ -169,8 +484,8 @@
Name[hr]=Fontovi
Name[hsb]=Pisma
Name[hu]=Betűtípusok
---- workspace/kcontrol/kfontinst/apps/kfontview.desktop (.../tags/KDE/4.2.0/kdebase) (wersja 929191)
-+++ workspace/kcontrol/kfontinst/apps/kfontview.desktop (.../branches/KDE/4.2/kdebase) (wersja 929191)
+--- workspace/kcontrol/kfontinst/apps/kfontview.desktop (.../tags/KDE/4.2.0/kdebase) (wersja 930691)
++++ workspace/kcontrol/kfontinst/apps/kfontview.desktop (.../branches/KDE/4.2/kdebase) (wersja 930691)
@@ -6,6 +6,7 @@
Name[cs]=Prohlížeč písem
Name[eu]=KFontWiew
@@ -196,8 +511,8 @@
GenericName[se]=Fontačájeheaddji
GenericName[sk]=Prehliadač písiem
GenericName[sl]=Pregledovalnik pisav
---- workspace/kcontrol/kfontinst/apps/installfont.desktop (.../tags/KDE/4.2.0/kdebase) (wersja 929191)
-+++ workspace/kcontrol/kfontinst/apps/installfont.desktop (.../branches/KDE/4.2/kdebase) (wersja 929191)
+--- workspace/kcontrol/kfontinst/apps/installfont.desktop (.../tags/KDE/4.2.0/kdebase) (wersja 930691)
++++ workspace/kcontrol/kfontinst/apps/installfont.desktop (.../branches/KDE/4.2/kdebase) (wersja 930691)
@@ -31,6 +31,7 @@
Name[gu]=સ્થાપન...
Name[he]=התקנה...
@@ -206,8 +521,8 @@
Name[hr]=Instaliraj...
Name[hsb]=instalować...
Name[hu]=Telepítés...
---- workspace/kcontrol/kfontinst/thumbnail/fontthumbnail.desktop (.../tags/KDE/4.2.0/kdebase) (wersja 929191)
-+++ workspace/kcontrol/kfontinst/thumbnail/fontthumbnail.desktop (.../branches/KDE/4.2/kdebase) (wersja 929191)
+--- workspace/kcontrol/kfontinst/thumbnail/fontthumbnail.desktop (.../tags/KDE/4.2.0/kdebase) (wersja 930691)
++++ workspace/kcontrol/kfontinst/thumbnail/fontthumbnail.desktop (.../branches/KDE/4.2/kdebase) (wersja 930691)
@@ -29,6 +29,7 @@
Name[gu]=ફોન્ટ ફાઇલો
Name[he]=קבצי גופנים
@@ -216,19 +531,1003 @@
Name[hr]=Datoteke fontova
Name[hsb]=Pismowe dataje
Name[hu]=Betűtípusfájlok
---- workspace/kcontrol/kfontinst/lib/FcEngine.cpp (.../tags/KDE/4.2.0/kdebase) (wersja 929191)
-+++ workspace/kcontrol/kfontinst/lib/FcEngine.cpp (.../branches/KDE/4.2/kdebase) (wersja 929191)
-@@ -1112,7 +1112,7 @@
+--- workspace/kcontrol/kfontinst/thumbnail/FontThumbnail.cpp (.../tags/KDE/4.2.0/kdebase) (wersja 930691)
++++ workspace/kcontrol/kfontinst/thumbnail/FontThumbnail.cpp (.../branches/KDE/4.2/kdebase) (wersja 930691)
+@@ -58,12 +58,9 @@
+
+ bool CFontThumbnail::create(const QString &path, int width, int height, QImage &img)
+ {
+- QPixmap pix;
+ QString realPath(path);
+ KTempDir *tempDir = 0;
+
+- CFcEngine::setTextCol(QApplication::palette().color(QPalette::Text));
+-
+ KFI_DBUG << "Create font thumbnail for:" << path << endl;
+
+ // Is this a fonts/package file? If so, extract 1 scalable font...
+@@ -113,15 +110,12 @@
+ }
+ }
+
+- if(itsEngine.draw(KUrl(realPath), width, height, pix, 0, true))
+- {
+- img=pix.toImage().convertToFormat(QImage::Format_ARGB32);
+- delete tempDir;
+- return true;
+- }
++ QColor bgnd(Qt::black);
+
++ bgnd.setAlpha(0);
++ img=itsEngine.draw(KUrl(realPath), width, height, QApplication::palette().text().color(), bgnd, 0, true);
+ delete tempDir;
+- return false;
++ return !img.isNull();
+ }
+
+ ThumbCreator::Flags CFontThumbnail::flags() const
+--- workspace/kcontrol/kfontinst/lib/FcEngine.cpp (.../tags/KDE/4.2.0/kdebase) (wersja 930691)
++++ workspace/kcontrol/kfontinst/lib/FcEngine.cpp (.../branches/KDE/4.2/kdebase) (wersja 930691)
+@@ -52,8 +52,6 @@
+ const int CFcEngine::constScalableSizes[]={8, 10, 12, 24, 36, 48, 64, 72, 96, 0 };
+ const int CFcEngine::constDefaultAlphaSize=24;
+
+-QColor CFcEngine::theirTextCol(Qt::black);
+-
+ static int fcToQtWeight(int weight)
+ {
+ switch(weight)
+@@ -138,8 +136,162 @@
+ return a==b || FC::slant(a)==FC::slant(b);
+ }
+
+-static bool drawChar32Centre(XftDraw *xftDraw, XftFont *xftFont, XftColor *xftCol, quint32 ch, int w, int h)
++static void closeFont(XftFont *&font)
+ {
++ if(font)
++ XftFontClose(QX11Info::display(), font);
++ font=0L;
++}
++
++class CFcEngine::Xft
++{
++ public:
++
++ struct Pix
++ {
++ Pix() : currentW(0), currentH(0), allocatedW(0), allocatedH(0) { }
++
++ static int getSize(int s)
++ {
++ static const int constBlockSize=64;
++
++ return ((s/constBlockSize)+(s%constBlockSize ? 1 : 0))*constBlockSize;
++ }
++
++ bool allocate(int w, int h)
++ {
++ int requiredW=getSize(w),
++ requiredH=getSize(h);
++
++ currentW=w;
++ currentH=h;
++ if(requiredW!=allocatedW || requiredH!=allocatedH)
++ {
++ free();
++
++ if(w && h)
++ {
++ allocatedW=requiredW;
++ allocatedH=requiredH;
++ x11=XCreatePixmap(QX11Info::display(), RootWindow(QX11Info::display(), 0), allocatedW, allocatedH,
++ DefaultDepth(QX11Info::display(), 0));
++ return true;
++ }
++ }
++
++ return false;
++ }
++
++ void free()
++ {
++ if(allocatedW && allocatedH)
++ {
++ XFreePixmap(QX11Info::display(), x11);
++ allocatedW=allocatedH=0;
++ }
++ }
++
++ int currentW,
++ currentH,
++ allocatedW,
++ allocatedH;
++ Pixmap x11;
++ };
++
++ Xft();
++ ~Xft();
++
++ bool init(const QColor &txt, const QColor &bgnd, int w, int h);
++ void freeColors();
++ bool drawChar32Centre(XftFont *xftFont, quint32 ch, int w, int h) const;
++ bool drawChar32(XftFont *xftFont, quint32 ch,int &x, int &y, int w, int h,
++ int fontHeight, QRect &r) const;
++ bool drawString(XftFont *xftFont, const QString &text, int x, int &y, int h) const;
++ void drawString(const QString &text, int x, int &y, int h) const;
++ bool drawGlyph(XftFont *xftFont, FT_UInt i, int &x, int &y, int w, int h,
++ int fontHeight,bool oneLine, QRect &r) const;
++ bool drawAllGlyphs(XftFont *xftFont, int fontHeight, int &x, int &y, int w, int h,
++ bool oneLine=false, int max=-1, QRect *used=0L) const;
++ QImage toImage(int w=0, int h=0) const;
++
++ private:
<<Diff was trimmed, longer than 597 lines>>
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/kde4-kdebase-workspace-branch.diff?r1=1.3&r2=1.4&f=u
More information about the pld-cvs-commit
mailing list