From 0794c5ba8235d5ef40651fb5b9dbcf8a1250d573 Mon Sep 17 00:00:00 2001 From: Chani Armitage Date: Thu, 25 Jun 2009 06:45:11 +0000 Subject: [PATCH 01/60] enforce security. from now on, unsafe widgets won't show up in the screensaver's appletbrowser. svn path=/branches/KDE/4.3/kdelibs/; revision=986810 --- applet.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/applet.cpp b/applet.cpp index facca8b94..e475af532 100644 --- a/applet.cpp +++ b/applet.cpp @@ -1784,10 +1784,9 @@ KPluginInfo::List Applet::listAppletInfo(const QString &category, //this isn't actually implemented in any bindings yet but should be possible for //anything but c++ } - //TODO 4.3 be very strict about what we accept - //if (!(reqValue == "Optional" || reqValue == "Unused")) { - //for testing purposes I'm being lax right now - if (reqValue == "Required") { + + if (!(reqValue == "Optional" || reqValue == "Unused")) { + //if (reqValue == "Required") { it.remove(); } } From fd32e6ff703bd11f9937c6fd72781a389df2c71f Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Thu, 25 Jun 2009 10:58:57 +0000 Subject: [PATCH 02/60] SVN_SILENT made messages (.desktop file) svn path=/branches/KDE/4.3/kdelibs/; revision=987010 --- servicetypes/plasma-applet-extenderapplet.desktop | 1 + servicetypes/plasma-applet-popupapplet.desktop | 1 + servicetypes/plasma-scriptengine.desktop | 2 +- tests/packagemetadatatest.desktop | 2 +- tests/testengine/plasma-dataengine-testengine.desktop | 2 +- 5 files changed, 5 insertions(+), 3 deletions(-) diff --git a/servicetypes/plasma-applet-extenderapplet.desktop b/servicetypes/plasma-applet-extenderapplet.desktop index 636983715..3fc25d14b 100644 --- a/servicetypes/plasma-applet-extenderapplet.desktop +++ b/servicetypes/plasma-applet-extenderapplet.desktop @@ -1,5 +1,6 @@ [Desktop Entry] Name=Collection +Name[ar]=المجموعة Name[be@latin]=Zbor Name[bg]=Колекция Name[ca]=Col·lecció diff --git a/servicetypes/plasma-applet-popupapplet.desktop b/servicetypes/plasma-applet-popupapplet.desktop index 2693164a2..6f0f74d43 100644 --- a/servicetypes/plasma-applet-popupapplet.desktop +++ b/servicetypes/plasma-applet-popupapplet.desktop @@ -3,6 +3,7 @@ Type=ServiceType X-KDE-ServiceType=Plasma/PopupApplet Comment=Plasma scripting popup applet +Comment[ar]=بريمج منبثق بواسطة سكربت بلازما Comment[be@latin]=Skryptavy vypłyŭny aplet „Plasma” Comment[bg]=Аплет за Plasma за скриптове за изскачащи прозорци Comment[ca]=Miniaplicació emergent d'scripting del Plasma diff --git a/servicetypes/plasma-scriptengine.desktop b/servicetypes/plasma-scriptengine.desktop index 3478b36da..285b9dbb3 100644 --- a/servicetypes/plasma-scriptengine.desktop +++ b/servicetypes/plasma-scriptengine.desktop @@ -3,7 +3,7 @@ Type=ServiceType X-KDE-ServiceType=Plasma/ScriptEngine Comment=Scripting language extension for Plasma -Comment[ar]=إمتداد لغة مخطوطة للبلازما +Comment[ar]=إمتداد لغة سكربت للبلازما Comment[as]=Plasma ৰ কাৰণে স্ক্ৰিপ্টিং ভাষাৰ সম্প্ৰসাৰণ Comment[be@latin]=Pašyreńnie skryptavaj movy dla systemy „Plasma” Comment[bg]=Разширение на Plasma за скриптов език diff --git a/tests/packagemetadatatest.desktop b/tests/packagemetadatatest.desktop index a0c853f34..9ca3ee5f8 100644 --- a/tests/packagemetadatatest.desktop +++ b/tests/packagemetadatatest.desktop @@ -56,7 +56,7 @@ Name[x-test]=xxPackage metadata test filexx Name[zh_CN]=工具包元数据测试文件 Name[zh_TW]=套件中繼資料測試檔 Comment=A test desktop file to test the PackageMetaData class. -Comment[ar]=ملف اختبار سطح المكتب لختبار صف PackageMetaData +Comment[ar]=ملف اختبار سطح المكتب لاختبار صف PackageMetaData Comment[as]=PackageMetaData class পৰীক্ষা কৰিবলৈ এটা ডেষ্কট'প পৰীক্ষাৰ নথিপত্ৰ । Comment[be@latin]=Testavy fajł rabočaha stała dla spraŭdžvańnia klasy „PackageMetaData”. Comment[bg]=Пробен файл за работиня плот за тестване на класа PackageMetaData diff --git a/tests/testengine/plasma-dataengine-testengine.desktop b/tests/testengine/plasma-dataengine-testengine.desktop index cdda6e55a..c137e9135 100644 --- a/tests/testengine/plasma-dataengine-testengine.desktop +++ b/tests/testengine/plasma-dataengine-testengine.desktop @@ -1,6 +1,6 @@ [Desktop Entry] Name=Test Data Engine -Name[ar]=محرك بيانات الإختبار +Name[ar]=محرك بيانات الاختبار Name[as]=পৰীক্ষা তথ্যৰ কলঘৰ Name[be@latin]=Systema spraŭdžvańnia dla źviestak Name[bg]=Пробно ядро за данни From 89fc3cfa00132d465ba6302ad39cb74b45b801d0 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Thu, 25 Jun 2009 17:47:53 +0000 Subject: [PATCH 03/60] backport of partial fix to bug 197522 svn path=/branches/KDE/4.3/kdelibs/; revision=987216 --- applet.cpp | 13 +++++++++++++ popupapplet.cpp | 4 ++++ popupapplet.h | 1 + 3 files changed, 18 insertions(+) diff --git a/applet.cpp b/applet.cpp index e475af532..2d1bd25a6 100644 --- a/applet.cpp +++ b/applet.cpp @@ -1999,6 +1999,19 @@ QVariant Applet::itemChange(GraphicsItemChange change, const QVariant &value) old->copyTo(d->mainConfig); old->deleteGroup(); delete old; + } else if (!d->isContainment) { + Plasma::PopupApplet *pa = qobject_cast(this); + if (!pa) { + break; + } + //reconnect of popupapplets with new containment geometryChanged + if (containment()) { + disconnect(containment(), SIGNAL(geometryChanged()), pa, SLOT(updateDialogPosition())); + } + Plasma::Containment *cont = dynamic_cast(value.value()); + if (cont) { + connect(cont, SIGNAL(geometryChanged()), pa, SLOT(updateDialogPosition())); + } } case ItemPositionChange: return (immutability() == Mutable || isContainment() || formFactor() == Horizontal || formFactor() == Vertical) ? value : pos(); diff --git a/popupapplet.cpp b/popupapplet.cpp index b2e2a4cb5..83251362f 100644 --- a/popupapplet.cpp +++ b/popupapplet.cpp @@ -600,6 +600,10 @@ void PopupAppletPrivate::dialogStatusChanged(bool status) void PopupAppletPrivate::updateDialogPosition() { + if (!dialog) { + return; + } + QGraphicsView *view = q->view(); if (!view) { diff --git a/popupapplet.h b/popupapplet.h index 4644f82a4..1a782da20 100644 --- a/popupapplet.h +++ b/popupapplet.h @@ -148,6 +148,7 @@ private: Q_PRIVATE_SLOT(d, void clearPopupLostFocus()) Q_PRIVATE_SLOT(d, void dialogSizeChanged()) Q_PRIVATE_SLOT(d, void dialogStatusChanged(bool)) + Q_PRIVATE_SLOT(d, void updateDialogPosition()) friend class Applet; friend class PopupAppletPrivate; From 225c322de6ffd4b2acb8805d343f3ec9b8668139 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Thu, 25 Jun 2009 19:40:29 +0000 Subject: [PATCH 04/60] backport the border fix when using svg svn path=/branches/KDE/4.3/kdelibs/; revision=987299 --- delegate.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/delegate.cpp b/delegate.cpp index 2a78a6616..081d0af17 100644 --- a/delegate.cpp +++ b/delegate.cpp @@ -454,7 +454,15 @@ QSize Delegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex & size.setHeight(qMax(option.decorationSize.height(), qMax(size.height(), metrics.height() + subMetrics.ascent()) + 3) + 4); // kDebug() << "size hint is" << size << (metrics.height() + subMetrics.ascent()); - size *= 1.1; + const bool useSvg = option.palette.color(QPalette::Base).alpha() == 0; + + if (useSvg) { + qreal left, top, right, bottom; + d->svg->getMargins(left, top, right, bottom); + size += QSize(left+right, top+bottom); + } else { + size *= 1.1; + } return size; } From 631176faec285a2f6ad2ca4aa8910be47729eebe Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Thu, 25 Jun 2009 19:41:50 +0000 Subject: [PATCH 05/60] backport the drop target fix svn path=/branches/KDE/4.3/kdelibs/; revision=987304 --- extender.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/extender.cpp b/extender.cpp index c019514b4..78f16f60c 100644 --- a/extender.cpp +++ b/extender.cpp @@ -403,6 +403,7 @@ void Extender::dropEvent(QGraphicsSceneDragDropEvent *event) if (mimeData) { mimeData->extenderItem()->setExtender(this, event->pos()); QApplication::restoreOverrideCursor(); + itemHoverLeaveEvent(0); } } } From 80d6a7523bda9b522efc70a2b0aec945af33b9cf Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Fri, 26 Jun 2009 08:23:15 +0000 Subject: [PATCH 06/60] SVN_SILENT made messages (.desktop file) svn path=/branches/KDE/4.3/kdelibs/; revision=987489 --- servicetypes/plasma-applet-extenderapplet.desktop | 1 + servicetypes/plasma-applet-popupapplet.desktop | 1 + 2 files changed, 2 insertions(+) diff --git a/servicetypes/plasma-applet-extenderapplet.desktop b/servicetypes/plasma-applet-extenderapplet.desktop index 3fc25d14b..c4149df61 100644 --- a/servicetypes/plasma-applet-extenderapplet.desktop +++ b/servicetypes/plasma-applet-extenderapplet.desktop @@ -25,6 +25,7 @@ Name[nds]=Sammeln Name[nn]=Samling Name[pt]=Colecção Name[pt_BR]=Coleção +Name[ro]=Colecție Name[se]=Čoahkádus Name[sv]=Samling Name[tr]=Koleksiyon diff --git a/servicetypes/plasma-applet-popupapplet.desktop b/servicetypes/plasma-applet-popupapplet.desktop index 6f0f74d43..6c9834dc3 100644 --- a/servicetypes/plasma-applet-popupapplet.desktop +++ b/servicetypes/plasma-applet-popupapplet.desktop @@ -26,6 +26,7 @@ Comment[nds]=Skript-Opduklüttprogramm vun Plasma Comment[nn]=Sprettoppelement for Plasma-skript Comment[pt]='Applet' de programação do Plasma Comment[pt_BR]=Miniaplicativo de script do Plasma +Comment[ro]=Miniaplicație Plasma de indicii ale scripturilor Comment[sv]=Plasma-skriptminiprogram Comment[tr]=Plasma betik kullanan açılabilir gereci Comment[uk]=Аплет програмованого контекстного вікна Плазми From 115e507adb18230642ced37d85ad7621af889344 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Fri, 26 Jun 2009 10:09:14 +0000 Subject: [PATCH 07/60] backport of the multiple fallbacks, separate from the default, commit svn path=/branches/KDE/4.3/kdelibs/; revision=987544 --- theme.cpp | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/theme.cpp b/theme.cpp index fd3836aba..c9c963fbf 100644 --- a/theme.cpp +++ b/theme.cpp @@ -136,6 +136,7 @@ public: Theme *q; QString themeName; + QList fallbackThemes; KSharedConfigPtr colors; KColorScheme colorScheme; KColorScheme buttonColorScheme; @@ -403,6 +404,20 @@ void ThemePrivate::setThemeName(const QString &tempThemeName, bool writeSettings cg = KConfigGroup(&metadata, "Settings"); useNativeWidgetStyle = cg.readEntry("UseNativeWidgetStyle", false); + QString fallback = cg.readEntry("FallbackTheme", QString()); + + fallbackThemes.clear(); + while (!fallback.isEmpty()) { + fallbackThemes.append(fallback); + + QString metadataPath(KStandardDirs::locate("data", "desktoptheme/" + theme + "/metadata.desktop")); + KConfig metadata(metadataPath); + cg = KConfigGroup(&metadata, "Settings"); + fallback = cg.readEntry("FallbackTheme", QString()); + //TODO: grab the fallback's wallpaper defaults? + } + fallbackThemes.append("oxygen"); + fallbackThemes.append(ThemePrivate::defaultTheme); QObject::disconnect(KGlobalSettings::self(), SIGNAL(kdisplayPaletteChanged()), q, SLOT(colorsChanged())); @@ -465,16 +480,20 @@ QString Theme::imagePath(const QString &name) const // try for an uncompressed svg file path = d->findInTheme(name + ".svg", d->themeName); - if (path.isEmpty() && d->themeName != ThemePrivate::defaultTheme) { - // try a compressed svg file in the default theme - path = d->findInTheme(name + ".svgz", ThemePrivate::defaultTheme); + // search in fallback themes if necessary + for (int i = 0; path.isEmpty() && i < d->fallbackThemes.count(); ++i) { + if (d->themeName == d->fallbackThemes[i]) { + continue; + } + + // try a compressed svg file in the fallback theme + path = d->findInTheme(name + ".svgz", d->fallbackThemes[i]); if (path.isEmpty()) { - // try an uncompressed svg file in the default theme - path = d->findInTheme(name + ".svg", ThemePrivate::defaultTheme); + // try an uncompressed svg file in the fallback theme + path = d->findInTheme(name + ".svg", d->fallbackThemes[i]); } } - } if (path.isEmpty()) { From 153934b66dd52896788a10c94ace6d82e0d3f666 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Fri, 26 Jun 2009 10:22:20 +0000 Subject: [PATCH 08/60] prevent multiple inclusions of the same theme and infinite cycles due to cascading fallbacks svn path=/branches/KDE/4.3/kdelibs/; revision=987552 --- theme.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/theme.cpp b/theme.cpp index c9c963fbf..111ac48c0 100644 --- a/theme.cpp +++ b/theme.cpp @@ -407,17 +407,24 @@ void ThemePrivate::setThemeName(const QString &tempThemeName, bool writeSettings QString fallback = cg.readEntry("FallbackTheme", QString()); fallbackThemes.clear(); - while (!fallback.isEmpty()) { + while (!fallback.isEmpty() && !fallbackThemes.contains(fallback)) { fallbackThemes.append(fallback); QString metadataPath(KStandardDirs::locate("data", "desktoptheme/" + theme + "/metadata.desktop")); KConfig metadata(metadataPath); cg = KConfigGroup(&metadata, "Settings"); fallback = cg.readEntry("FallbackTheme", QString()); + //TODO: grab the fallback's wallpaper defaults? } - fallbackThemes.append("oxygen"); - fallbackThemes.append(ThemePrivate::defaultTheme); + + if (!fallbackThemes.contains("oxygen")) { + fallbackThemes.append("oxygen"); + } + + if (!fallbackThemes.contains(ThemePrivate::defaultTheme)) { + fallbackThemes.append(ThemePrivate::defaultTheme); + } QObject::disconnect(KGlobalSettings::self(), SIGNAL(kdisplayPaletteChanged()), q, SLOT(colorsChanged())); From ba90bd83743b50f3d519ef086168ea312e64ce7a Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Mon, 29 Jun 2009 01:27:15 +0000 Subject: [PATCH 09/60] only close the desktop toolbox if the action is non-repeatable, which implies it's a fire-and-forget type of action such as something that triggers a dialog CCBUG:198229 svn path=/branches/KDE/4.3/kdelibs/; revision=988885 --- applet.cpp | 2 ++ containment.cpp | 2 ++ corona.cpp | 1 + private/desktoptoolbox.cpp | 6 +++++- 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/applet.cpp b/applet.cpp index 2d1bd25a6..0c94118d4 100644 --- a/applet.cpp +++ b/applet.cpp @@ -1442,11 +1442,13 @@ KActionCollection* AppletPrivate::defaultActions(QObject *parent) actions->setConfigGroup("Shortcuts-Applet"); KAction *configAction = actions->addAction("configure"); + configAction->setAutoRepeat(false); configAction->setText(i18n("Widget Settings")); configAction->setIcon(KIcon("configure")); configAction->setShortcut(KShortcut("alt+d, s")); KAction *closeApplet = actions->addAction("remove"); + closeApplet->setAutoRepeat(false); closeApplet->setText("Remove this Widget"); closeApplet->setIcon(KIcon("edit-delete")); closeApplet->setShortcut(KShortcut("alt+d, r")); diff --git a/containment.cpp b/containment.cpp index 625ccb965..a9669de1e 100644 --- a/containment.cpp +++ b/containment.cpp @@ -240,6 +240,7 @@ void ContainmentPrivate::addDefaultActions(KActionCollection *actions) //add our own actions KAction *appletBrowserAction = actions->addAction("add widgets"); + appletBrowserAction->setAutoRepeat(false); appletBrowserAction->setText(i18n("Add Widgets...")); appletBrowserAction->setIcon(KIcon("list-add")); appletBrowserAction->setShortcut(KShortcut("alt+d, a")); @@ -255,6 +256,7 @@ void ContainmentPrivate::addDefaultActions(KActionCollection *actions) action->setShortcut(KShortcut("alt+d, p")); KAction *zoomAction = actions->addAction("zoom in"); + zoomAction->setAutoRepeat(false); zoomAction->setText(i18n("Zoom In")); zoomAction->setIcon(KIcon("zoom-in")); //two shortcuts because I hate ctrl-+ but others expect it diff --git a/corona.cpp b/corona.cpp index 69c452ca4..c77067c32 100644 --- a/corona.cpp +++ b/corona.cpp @@ -98,6 +98,7 @@ public: KAction *action = actions.addAction("configure shortcuts"); action->setText(i18n("Shortcut Settings")); action->setIcon(KIcon("configure")); + action->setAutoRepeat(false); QObject::connect(action, SIGNAL(triggered()), q, SLOT(showShortcutConfig())); //action->setShortcut(KShortcut("ctrl+h")); diff --git a/private/desktoptoolbox.cpp b/private/desktoptoolbox.cpp index 242e54cd6..e61058a4d 100644 --- a/private/desktoptoolbox.cpp +++ b/private/desktoptoolbox.cpp @@ -309,7 +309,11 @@ void DesktopToolBox::assignColors() void DesktopToolBox::toolTriggered(bool) { - hideToolBox(); + QAction *action = qobject_cast(sender()); + + if (!action || !action->autoRepeat()) { + hideToolBox(); + } } void DesktopToolBox::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) From eb0b21227f6911abf9a8ebf2ae665bb30fe38ea6 Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Tue, 30 Jun 2009 07:56:42 +0000 Subject: [PATCH 10/60] SVN_SILENT made messages (.desktop file) svn path=/branches/KDE/4.3/kdelibs/; revision=989381 --- servicetypes/plasma-applet-popupapplet.desktop | 1 + 1 file changed, 1 insertion(+) diff --git a/servicetypes/plasma-applet-popupapplet.desktop b/servicetypes/plasma-applet-popupapplet.desktop index 6c9834dc3..7f248a412 100644 --- a/servicetypes/plasma-applet-popupapplet.desktop +++ b/servicetypes/plasma-applet-popupapplet.desktop @@ -14,6 +14,7 @@ Comment[de]=Plasma-Skript-Miniprogramm Comment[el]=Αναδυόμενη μικροεφαρμογή σεναρίου plasma Comment[es]=Miniaplicación emergente de script para Plasma Comment[et]=Plasma skriptimise hüpikaplett +Comment[fr]=Applet de scripting Plasma Comment[gl]=Applet contextual de scripting de Plasma Comment[gu]=પ્લાઝમા સ્ક્રિપ્ટીંગ પોપઅપ એપ્લેટ Comment[hu]=Szkriptkezelő kisalkalmazás a Plasmához From f88e1995b15c7dbeae1afb44e16c9ab2f20f25b9 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Thu, 2 Jul 2009 22:33:13 +0000 Subject: [PATCH 11/60] backport possible fix for 198338 CCBUG:198338 svn path=/branches/KDE/4.3/kdelibs/; revision=990659 --- animator.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/animator.cpp b/animator.cpp index 573dbe2e6..9dbae0953 100644 --- a/animator.cpp +++ b/animator.cpp @@ -622,6 +622,10 @@ void Animator::timerEvent(QTimerEvent *event) //kDebug() << "timeEvent, elapsed time: " << elapsed; foreach (AnimationState *state, d->animatedItems) { + if (d->animatedItemsToDelete.contains(state)) { + continue; + } + if (state->currentInterval <= elapsed) { // we need to step forward! state->currentFrame += @@ -648,6 +652,10 @@ void Animator::timerEvent(QTimerEvent *event) } foreach (MovementState *state, d->movingItems) { + if (d->movingItemsToDelete.contains(state)) { + continue; + } + if (state->currentInterval <= elapsed) { // we need to step forward! state->currentFrame += @@ -675,6 +683,10 @@ void Animator::timerEvent(QTimerEvent *event) } foreach (ElementAnimationState *state, d->animatedElements) { + if (d->animatedElementsToDelete.contains(state)) { + continue; + } + if (state->currentFrame == state->frames) { //kDebug() << "skipping" << state->id << "as it is already at frame" // << state->currentFrame << "of" << state->frames; @@ -711,6 +723,10 @@ void Animator::timerEvent(QTimerEvent *event) } foreach (CustomAnimationState *state, d->customAnims) { + if (d->customAnimsToDelete.contains(state)) { + continue; + } + if (state->currentInterval <= elapsed) { // advance the frame state->currentFrame += From e9ba4bee3b054e8f8ce454b2ab1aab44cde17086 Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Fri, 3 Jul 2009 07:41:40 +0000 Subject: [PATCH 12/60] SVN_SILENT made messages (.desktop file) svn path=/branches/KDE/4.3/kdelibs/; revision=990737 --- servicetypes/plasma-applet-extenderapplet.desktop | 2 ++ servicetypes/plasma-applet-popupapplet.desktop | 2 ++ 2 files changed, 4 insertions(+) diff --git a/servicetypes/plasma-applet-extenderapplet.desktop b/servicetypes/plasma-applet-extenderapplet.desktop index c4149df61..14217346f 100644 --- a/servicetypes/plasma-applet-extenderapplet.desktop +++ b/servicetypes/plasma-applet-extenderapplet.desktop @@ -27,6 +27,8 @@ Name[pt]=Colecção Name[pt_BR]=Coleção Name[ro]=Colecție Name[se]=Čoahkádus +Name[sr]=збирка +Name[sr@latin]=zbirka Name[sv]=Samling Name[tr]=Koleksiyon Name[uk]=Збірка diff --git a/servicetypes/plasma-applet-popupapplet.desktop b/servicetypes/plasma-applet-popupapplet.desktop index 7f248a412..69a58bb91 100644 --- a/servicetypes/plasma-applet-popupapplet.desktop +++ b/servicetypes/plasma-applet-popupapplet.desktop @@ -28,6 +28,8 @@ Comment[nn]=Sprettoppelement for Plasma-skript Comment[pt]='Applet' de programação do Plasma Comment[pt_BR]=Miniaplicativo de script do Plasma Comment[ro]=Miniaplicație Plasma de indicii ale scripturilor +Comment[sr]=Плазма скриптовани искачући аплет +Comment[sr@latin]=Plasma skriptovani iskačući aplet Comment[sv]=Plasma-skriptminiprogram Comment[tr]=Plasma betik kullanan açılabilir gereci Comment[uk]=Аплет програмованого контекстного вікна Плазми From a90688399e6e39d2fcf58596268c453c1c34fb01 Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Mon, 6 Jul 2009 08:01:59 +0000 Subject: [PATCH 13/60] SVN_SILENT made messages (.desktop file) svn path=/branches/KDE/4.3/kdelibs/; revision=992076 --- servicetypes/plasma-applet-extenderapplet.desktop | 1 + servicetypes/plasma-applet-popupapplet.desktop | 1 + 2 files changed, 2 insertions(+) diff --git a/servicetypes/plasma-applet-extenderapplet.desktop b/servicetypes/plasma-applet-extenderapplet.desktop index 14217346f..8c3faf839 100644 --- a/servicetypes/plasma-applet-extenderapplet.desktop +++ b/servicetypes/plasma-applet-extenderapplet.desktop @@ -17,6 +17,7 @@ Name[he]=אוסף Name[hi]=शब्द पूर्णता Name[hu]=Gyűjtemény Name[is]=Safn +Name[ja]=コレクション Name[km]=សម្រាំង Name[lv]=Kolekcija Name[ml]=കൂട്ടം diff --git a/servicetypes/plasma-applet-popupapplet.desktop b/servicetypes/plasma-applet-popupapplet.desktop index 69a58bb91..11a6cd69f 100644 --- a/servicetypes/plasma-applet-popupapplet.desktop +++ b/servicetypes/plasma-applet-popupapplet.desktop @@ -19,6 +19,7 @@ Comment[gl]=Applet contextual de scripting de Plasma Comment[gu]=પ્લાઝમા સ્ક્રિપ્ટીંગ પોપઅપ એપ્લેટ Comment[hu]=Szkriptkezelő kisalkalmazás a Plasmához Comment[is]=Plasma smáforrit fyrir skriftun +Comment[ja]=Plasma スクリプティング・ポップアップアプレット Comment[km]=អាប់ភ្លេត​លេចឡើង​របស់​ស្គ្រីប​ប្លាស្មា Comment[lv]=Plasma skriptu uznirstošais logs Comment[ml]=പ്ലാസ്മ സ്ക്രിപ്റ്റിങ്ങിന്റെ പൊങ്ങിവരുന്ന ലഘുപ്രയോഗം From 17c459f9e1b0cec802fc0c96c17bdaaba3127b19 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Wed, 8 Jul 2009 00:38:38 +0000 Subject: [PATCH 14/60] in RTL, the geometries are reversed; compare them with that taken into consideration CCBUG:187406 svn path=/branches/KDE/4.3/kdelibs/; revision=992936 --- containment.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/containment.cpp b/containment.cpp index a9669de1e..3bb43be8c 100644 --- a/containment.cpp +++ b/containment.cpp @@ -271,6 +271,10 @@ bool appletConfigLessThan(const KConfigGroup &c1, const KConfigGroup &c2) QPointF p2 = c2.readEntry("geometry", QRectF()).topLeft(); if (!qFuzzyCompare(p1.x(), p2.x())) { + if (QApplication::layoutDirection() == Qt::RightToLeft) { + return p1.x() > p2.x(); + } + return p1.x() < p2.x(); } From e4f50decddb8552793acf3ab068c7075ff379642 Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Wed, 8 Jul 2009 08:57:00 +0000 Subject: [PATCH 15/60] SVN_SILENT made messages (.desktop file) svn path=/branches/KDE/4.3/kdelibs/; revision=993084 --- servicetypes/plasma-applet-extenderapplet.desktop | 2 ++ servicetypes/plasma-applet-popupapplet.desktop | 2 ++ 2 files changed, 4 insertions(+) diff --git a/servicetypes/plasma-applet-extenderapplet.desktop b/servicetypes/plasma-applet-extenderapplet.desktop index 8c3faf839..c3edd46f2 100644 --- a/servicetypes/plasma-applet-extenderapplet.desktop +++ b/servicetypes/plasma-applet-extenderapplet.desktop @@ -17,12 +17,14 @@ Name[he]=אוסף Name[hi]=शब्द पूर्णता Name[hu]=Gyűjtemény Name[is]=Safn +Name[it]=Collezione Name[ja]=コレクション Name[km]=សម្រាំង Name[lv]=Kolekcija Name[ml]=കൂട്ടം Name[nb]=Samling Name[nds]=Sammeln +Name[nl]=Verzameling Name[nn]=Samling Name[pt]=Colecção Name[pt_BR]=Coleção diff --git a/servicetypes/plasma-applet-popupapplet.desktop b/servicetypes/plasma-applet-popupapplet.desktop index 11a6cd69f..5beda77f6 100644 --- a/servicetypes/plasma-applet-popupapplet.desktop +++ b/servicetypes/plasma-applet-popupapplet.desktop @@ -19,12 +19,14 @@ Comment[gl]=Applet contextual de scripting de Plasma Comment[gu]=પ્લાઝમા સ્ક્રિપ્ટીંગ પોપઅપ એપ્લેટ Comment[hu]=Szkriptkezelő kisalkalmazás a Plasmához Comment[is]=Plasma smáforrit fyrir skriftun +Comment[it]=Applet Plasma scripting a comparsa Comment[ja]=Plasma スクリプティング・ポップアップアプレット Comment[km]=អាប់ភ្លេត​លេចឡើង​របស់​ស្គ្រីប​ប្លាស្មា Comment[lv]=Plasma skriptu uznirstošais logs Comment[ml]=പ്ലാസ്മ സ്ക്രിപ്റ്റിങ്ങിന്റെ പൊങ്ങിവരുന്ന ലഘുപ്രയോഗം Comment[nb]=Oppsprett-miniprogram for Plasma-skripting Comment[nds]=Skript-Opduklüttprogramm vun Plasma +Comment[nl]=Plasma-applet voor scripting-popup Comment[nn]=Sprettoppelement for Plasma-skript Comment[pt]='Applet' de programação do Plasma Comment[pt_BR]=Miniaplicativo de script do Plasma From 50c115b6560094602d0ded13b127f4bd9d9a8b20 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Sat, 11 Jul 2009 22:12:15 +0000 Subject: [PATCH 16/60] backport the use of kio::accessmanager (should solve the issues about cookies and proxy) svn path=/branches/KDE/4.3/kdelibs/; revision=995075 --- widgets/webview.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/widgets/webview.cpp b/widgets/webview.cpp index 07a50c1db..9f8f6ea1f 100644 --- a/widgets/webview.cpp +++ b/widgets/webview.cpp @@ -32,6 +32,7 @@ #include #include +#include #include "plasma/widgets/webview.h" @@ -74,6 +75,7 @@ WebView::WebView(QGraphicsItem *parent) setFlags(QGraphicsItem::ItemIsFocusable); QWebPage *page = new QWebPage(this); + page->setNetworkAccessManager(new KIO::AccessManager(page)); QPalette palette = qApp->palette(); palette.setBrush(QPalette::Base, Qt::transparent); page->setPalette(palette); From ebb22d5876141baf421974d044f6a1ba07d1c207 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Sun, 12 Jul 2009 19:36:13 +0000 Subject: [PATCH 17/60] backport the fix for 199921 svn path=/branches/KDE/4.3/kdelibs/; revision=995463 --- applet.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/applet.cpp b/applet.cpp index 0c94118d4..58e834aeb 100644 --- a/applet.cpp +++ b/applet.cpp @@ -1135,12 +1135,6 @@ void Applet::flushPendingConstraintsEvents() } else if (formFactor() == Vertical) { setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed)); } - } else { - if (formFactor() == Horizontal) { - setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding)); - } else if (formFactor() == Vertical) { - setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred)); - } } updateGeometry(); } From 9deb91a93c42d4398c50e92b5f177798ed89992f Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Thu, 16 Jul 2009 07:49:20 +0000 Subject: [PATCH 18/60] SVN_SILENT made messages (.desktop file) svn path=/branches/KDE/4.3/kdelibs/; revision=997610 --- servicetypes/plasma-applet-extenderapplet.desktop | 1 + servicetypes/plasma-applet-popupapplet.desktop | 1 + 2 files changed, 2 insertions(+) diff --git a/servicetypes/plasma-applet-extenderapplet.desktop b/servicetypes/plasma-applet-extenderapplet.desktop index c3edd46f2..3e3ff3fe4 100644 --- a/servicetypes/plasma-applet-extenderapplet.desktop +++ b/servicetypes/plasma-applet-extenderapplet.desktop @@ -26,6 +26,7 @@ Name[nb]=Samling Name[nds]=Sammeln Name[nl]=Verzameling Name[nn]=Samling +Name[pl]=Kolekcja Name[pt]=Colecção Name[pt_BR]=Coleção Name[ro]=Colecție diff --git a/servicetypes/plasma-applet-popupapplet.desktop b/servicetypes/plasma-applet-popupapplet.desktop index 5beda77f6..7d58d6be2 100644 --- a/servicetypes/plasma-applet-popupapplet.desktop +++ b/servicetypes/plasma-applet-popupapplet.desktop @@ -28,6 +28,7 @@ Comment[nb]=Oppsprett-miniprogram for Plasma-skripting Comment[nds]=Skript-Opduklüttprogramm vun Plasma Comment[nl]=Plasma-applet voor scripting-popup Comment[nn]=Sprettoppelement for Plasma-skript +Comment[pl]=Aplet Plazmy do skryptów Comment[pt]='Applet' de programação do Plasma Comment[pt_BR]=Miniaplicativo de script do Plasma Comment[ro]=Miniaplicație Plasma de indicii ale scripturilor From 00caa5d9c233ffa0e847ac1008570e31bf4c44b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexis=20M=C3=A9nard?= Date: Thu, 16 Jul 2009 13:12:03 +0000 Subject: [PATCH 19/60] This almost fix the performance issue when zooming out on plasma-desktop. We don't need to call prepareGeometryChange if the geometry will not change, this mistake end up with a new paint event that will paint for nothing. Backport r997763 svn path=/branches/KDE/4.3/kdelibs/; revision=997768 --- private/desktoptoolbox.cpp | 6 +++--- private/toolbox.cpp | 2 +- private/toolbox_p.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/private/desktoptoolbox.cpp b/private/desktoptoolbox.cpp index e61058a4d..72c80083d 100644 --- a/private/desktoptoolbox.cpp +++ b/private/desktoptoolbox.cpp @@ -108,6 +108,8 @@ class EmptyGraphicsItem : public QGraphicsItem void setRect(const QRectF &rect) { + if (m_rect == rect) + return; //kDebug() << "setting rect to" << rect; prepareGeometryChange(); m_rect = rect; @@ -510,9 +512,8 @@ void DesktopToolBox::showToolBox() { setFlag(ItemIgnoresTransformations, isToolbar()); - if (showing() && !isToolbar()) { + if (showing() && !isToolbar()) return; - } // put tools 5px from icon edge const int iconWidth = KIconLoader::SizeMedium; @@ -696,7 +697,6 @@ void DesktopToolBox::showToolBox() } } - d->toolBacker->setRect(backerRect); d->toolBacker->show(); diff --git a/private/toolbox.cpp b/private/toolbox.cpp index 1a01e2f97..8d76dc5ae 100644 --- a/private/toolbox.cpp +++ b/private/toolbox.cpp @@ -362,7 +362,7 @@ QTransform ToolBox::viewTransform() const return d->viewTransform; } -void ToolBox::setViewTransform(QTransform transform) +void ToolBox::setViewTransform(const QTransform &transform) { if (transform.isScaling()) { d->toolbar = true; diff --git a/private/toolbox_p.h b/private/toolbox_p.h index 7ae36d184..9c9934365 100644 --- a/private/toolbox_p.h +++ b/private/toolbox_p.h @@ -84,7 +84,7 @@ public: void setIsToolbar(bool toolbar); QTransform viewTransform() const; - void setViewTransform(QTransform transforn); + void setViewTransform(const QTransform &transform); void save(KConfigGroup &cg) const; void load(const KConfigGroup &containmentGroup = KConfigGroup()); From ce73956c6627ffdc015f9a8c61b173bee53268c5 Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Fri, 17 Jul 2009 08:17:54 +0000 Subject: [PATCH 20/60] SVN_SILENT made messages (.desktop file) svn path=/branches/KDE/4.3/kdelibs/; revision=998207 --- servicetypes/plasma-animator.desktop | 1 + servicetypes/plasma-applet-extenderapplet.desktop | 2 ++ servicetypes/plasma-applet-popupapplet.desktop | 2 ++ servicetypes/plasma-applet.desktop | 1 + servicetypes/plasma-containment.desktop | 1 + servicetypes/plasma-dataengine.desktop | 1 + servicetypes/plasma-packagestructure.desktop | 1 + servicetypes/plasma-runner.desktop | 1 + servicetypes/plasma-scriptengine.desktop | 1 + servicetypes/plasma-wallpaper.desktop | 1 + tests/packagemetadatatest.desktop | 2 ++ tests/testengine/plasma-dataengine-testengine.desktop | 1 + 12 files changed, 15 insertions(+) diff --git a/servicetypes/plasma-animator.desktop b/servicetypes/plasma-animator.desktop index 0971ebf9c..af41ccca4 100644 --- a/servicetypes/plasma-animator.desktop +++ b/servicetypes/plasma-animator.desktop @@ -31,6 +31,7 @@ Comment[is]=Plasma hreyfingastjóri Comment[it]=Motore animazione Plasma Comment[ja]=Plasma アニメーションエンジン Comment[km]=ម៉ាស៊ីន​ចលនា​របស់ប្លាស្មា +Comment[kn]=ಪ್ಲಾಸ್ಮಾ ಸಜೀವನ (ಅನಿಮೇಷನ್) ಯಂತ್ರ Comment[ko]=Plasma 애니메이션 엔진 Comment[ku]=Motora Zindîkirina Plasma Comment[lt]=Plasma animacijos varikliukas diff --git a/servicetypes/plasma-applet-extenderapplet.desktop b/servicetypes/plasma-applet-extenderapplet.desktop index 3e3ff3fe4..b2da9c0df 100644 --- a/servicetypes/plasma-applet-extenderapplet.desktop +++ b/servicetypes/plasma-applet-extenderapplet.desktop @@ -20,12 +20,14 @@ Name[is]=Safn Name[it]=Collezione Name[ja]=コレクション Name[km]=សម្រាំង +Name[kn]=ಸಮೂಹ Name[lv]=Kolekcija Name[ml]=കൂട്ടം Name[nb]=Samling Name[nds]=Sammeln Name[nl]=Verzameling Name[nn]=Samling +Name[pa]=ਭੰਡਾਰ Name[pl]=Kolekcja Name[pt]=Colecção Name[pt_BR]=Coleção diff --git a/servicetypes/plasma-applet-popupapplet.desktop b/servicetypes/plasma-applet-popupapplet.desktop index 7d58d6be2..621d3e87b 100644 --- a/servicetypes/plasma-applet-popupapplet.desktop +++ b/servicetypes/plasma-applet-popupapplet.desktop @@ -22,12 +22,14 @@ Comment[is]=Plasma smáforrit fyrir skriftun Comment[it]=Applet Plasma scripting a comparsa Comment[ja]=Plasma スクリプティング・ポップアップアプレット Comment[km]=អាប់ភ្លេត​លេចឡើង​របស់​ស្គ្រីប​ប្លាស្មា +Comment[kn]=ಪ್ಲಾಸ್ಮಾ ವಿಧಿಗುಚ್ಛ (ಸ್ಕ್ರಿಪ್ಟ್) ವಿಕಸನ ಪುಟಿಕೆ (ಪಾಪಪ್) ಅನ್ವಯಾಂಶ (ಆಪ್ಲೆಟ್) Comment[lv]=Plasma skriptu uznirstošais logs Comment[ml]=പ്ലാസ്മ സ്ക്രിപ്റ്റിങ്ങിന്റെ പൊങ്ങിവരുന്ന ലഘുപ്രയോഗം Comment[nb]=Oppsprett-miniprogram for Plasma-skripting Comment[nds]=Skript-Opduklüttprogramm vun Plasma Comment[nl]=Plasma-applet voor scripting-popup Comment[nn]=Sprettoppelement for Plasma-skript +Comment[pa]=ਪਾਲਜ਼ਮਾ ਸਕ੍ਰਿਪਟ ਪੋਪਅੱਪ ਐਪਲਿਟ Comment[pl]=Aplet Plazmy do skryptów Comment[pt]='Applet' de programação do Plasma Comment[pt_BR]=Miniaplicativo de script do Plasma diff --git a/servicetypes/plasma-applet.desktop b/servicetypes/plasma-applet.desktop index 7c4fad6dc..012057740 100644 --- a/servicetypes/plasma-applet.desktop +++ b/servicetypes/plasma-applet.desktop @@ -31,6 +31,7 @@ Comment[is]=Plasma smáforrit Comment[it]=Applet Plasma Comment[ja]=Plasma アプレット Comment[km]=អាប់ភ្លេត​ប្លាស្មា +Comment[kn]=ಪ್ಲಾಸ್ಮಾ ಅನ್ವಯಾಂಶ (ಆಪ್ಲೆಟ್) Comment[ko]=Plasma 애플릿 Comment[ku]=Sepanoka Plasma Comment[lt]=Plasma įskiepis diff --git a/servicetypes/plasma-containment.desktop b/servicetypes/plasma-containment.desktop index bce0a538e..4ba109c86 100644 --- a/servicetypes/plasma-containment.desktop +++ b/servicetypes/plasma-containment.desktop @@ -30,6 +30,7 @@ Comment[is]=Grunnur fyrir Plasma smáforrit og bakgrunnslitun Comment[it]=Contenitore applet Plasma e disegnatore dello sfondo Comment[ja]=Plasma アプレットの入れ物、背景の描画 Comment[km]=ឧបករណ៍​ផ្ទុក​អាប់ភ្លេត​ប្លាស្មា និង​កម្មវិធី​គូរ​ផ្ទៃខាងក្រោយ +Comment[kn]=ಪ್ಲಾಸ್ಮಾ ಅನ್ವಯಾಂಶ (ಆಪ್ಲೆಟ್) ಧಾರಕ (ಕಂಟೈನರ್)ಮತ್ತು ಹಿನ್ನೆಲೆ ಬಣ್ಣಗಾರ (ಪೇಯಿಂಟರ್) Comment[ku]=Embarvanê sepanoka Plasma û nexşevanê rûerdê Comment[lt]=Plasma įskiepio dėklas ir fono paišiklis Comment[lv]=Plasma apletu turis un fona zīmētājs diff --git a/servicetypes/plasma-dataengine.desktop b/servicetypes/plasma-dataengine.desktop index 71e7827db..ce828840f 100644 --- a/servicetypes/plasma-dataengine.desktop +++ b/servicetypes/plasma-dataengine.desktop @@ -31,6 +31,7 @@ Comment[is]=Plasma gagnavél Comment[it]=Motore dati Plasma Comment[ja]=Plasma データエンジン Comment[km]=ម៉ាស៊ីន​ទិន្នន័យ​ប្លាស្មា +Comment[kn]=ಪ್ಲಾಸ್ಮಾ ದತ್ತ ಯಂತ್ರ Comment[ko]=Plasma 데이터 엔진 Comment[ku]=Motora Dane ya Plasma Comment[lt]=Plasma duomenų varikliukas diff --git a/servicetypes/plasma-packagestructure.desktop b/servicetypes/plasma-packagestructure.desktop index 450f5904c..987d3d66c 100644 --- a/servicetypes/plasma-packagestructure.desktop +++ b/servicetypes/plasma-packagestructure.desktop @@ -29,6 +29,7 @@ Comment[is]=Skilgreiningar Plasma pakkauppbyggingar Comment[it]=Definizione struttura pacchetto Plasma Comment[ja]=Plasma パッケージ構造の定義 Comment[km]=កា​រកំណត់​រចនាសម្ព័ន្ធ​កញ្ចប់​របស់​ប្លាស្មា +Comment[kn]=ಪ್ಲಾಸ್ಮಾ ಕಂತೆ (ಪ್ಯಾಕೇಜ್) ರಚನಾ ಲಕ್ಷಣ (ಡೆಫೆನಿಶನ್) Comment[ko]=Plasma 패키지 구조 정의 Comment[ku]=Daxuyaniya çêbûna pakêta Plasma Comment[lt]=Plasma paketo struktūros aprašymas diff --git a/servicetypes/plasma-runner.desktop b/servicetypes/plasma-runner.desktop index 16425d1b8..864dba2e8 100644 --- a/servicetypes/plasma-runner.desktop +++ b/servicetypes/plasma-runner.desktop @@ -32,6 +32,7 @@ Comment[it]=Plugin KRunner Comment[ja]=KRunner プラグイン Comment[kk]=KRunner плагині Comment[km]=កម្មវិធី​ជំនួយ​របស់ KRunner +Comment[kn]=ಕೆರನ್ನರ್ ಮಿಳಿತಾನ್ವಯ (ಪ್ಲಗಿನ್) Comment[ko]=KRunner 플러그인 Comment[ku]=Pêveka KAjoker Comment[lt]=KRunner priedas diff --git a/servicetypes/plasma-scriptengine.desktop b/servicetypes/plasma-scriptengine.desktop index 285b9dbb3..6d827594b 100644 --- a/servicetypes/plasma-scriptengine.desktop +++ b/servicetypes/plasma-scriptengine.desktop @@ -30,6 +30,7 @@ Comment[is]=Framlenging á skriftunarmál fyrir Plasma Comment[it]=Estensione linguaggio scripting per Plasma Comment[ja]=Plasma のためのスクリプト言語拡張 Comment[km]=ផ្នែក​បន្ថែម​ភាសា​ស្គ្រីប​សម្រាប់​ប្លាស្មា +Comment[kn]=ಪ್ಲಾಸ್ಮಾ ಕ್ಕೆ ವಿಧಿಗುಚ್ಛ (ಸ್ಕ್ರಿಪ್ಟ್) ರಚನಾ ಭಾಷೆ ಯ ವಿಸ್ತರಣೆ Comment[ko]=Plasma 스크립트 언어 확장 Comment[ku]=Pêveka zimanê skrîpt kirinê ji bo Plasma Comment[lt]=Scenarijų kalbos praplėtimas, skirtas Plasma diff --git a/servicetypes/plasma-wallpaper.desktop b/servicetypes/plasma-wallpaper.desktop index 8a49887ae..1ced28686 100644 --- a/servicetypes/plasma-wallpaper.desktop +++ b/servicetypes/plasma-wallpaper.desktop @@ -31,6 +31,7 @@ Comment[is]=Plasma veggfóður Comment[it]=Sfondo Plasma Comment[ja]=Plasma 壁紙 Comment[km]=ផ្ទាំង​រូបភាព​ប្លាស្មា +Comment[kn]=ಪ್ಲಾಸ್ಮಾ ಹಿನ್ನೆಲೆ ತೆರೆಚಿತ್ರ (ವಾಲ್ ಪೇಪರ್) Comment[ko]=Plasma 배경 그림 Comment[ku]=Wêne-rûerdê Plasma Comment[lt]=Plasma apmušalas diff --git a/tests/packagemetadatatest.desktop b/tests/packagemetadatatest.desktop index 9ca3ee5f8..9d0802fef 100644 --- a/tests/packagemetadatatest.desktop +++ b/tests/packagemetadatatest.desktop @@ -25,6 +25,7 @@ Name[hu]=PackageMetaData tesztfájl Name[is]=Package metagagna prófunarskrá Name[it]=File di prova metadati pacchetto Name[km]=ឯកសារ​សាកល្បង​ទិន្នន័យ​មេតា​កញ្ចប់ +Name[kn]=ಕಂತೆ (ಪ್ಯಾಕೇಜ್) ಪ್ರದತ್ತ (ಮೆಟಾಡಾಟಾ) ಪರೀಕ್ಷಣಾ ಕಡತ Name[ko]=패키지 메타데이터 테스트 파일 Name[ku]=Pela ceribandinê ya serdana yê pakêtê Name[lt]=Paketo metaduomenų bandomasis failas @@ -81,6 +82,7 @@ Comment[hu]=Tesztfájl a PackageMetaData osztályhoz. Comment[is]=Skjáborðsskrá til prófunar á PackageMetaData class Comment[it]=Un file desktop di prova per verificare la classe PackageMetaData. Comment[km]=ឯកសារ​ផ្ទៃតុ​សាកល្បង​ ដើម្បី​សាកល្បង​ថ្នាក់​របស់ PackageMetaData ។ +Comment[kn]=PackageMetaData ವರ್ಗವನ್ನು ಪರೀಕ್ಷಿಸಲು ಒಂದು ಪರೀಕ್ಷಾರ್ಥ ಗಣಕತೆರೆ ಕಡತ. Comment[ko]=PackageMetaData 클래스를 테스트하는 데스크톱 파일. Comment[ku]=Pela ceribandina sermasê ku beşên SerDanayêPakêtê diceribîne. Comment[lv]=Testa .dekstop fails lai pārbaudītu PackageMetaData klasi. diff --git a/tests/testengine/plasma-dataengine-testengine.desktop b/tests/testengine/plasma-dataengine-testengine.desktop index c137e9135..97663d0ef 100644 --- a/tests/testengine/plasma-dataengine-testengine.desktop +++ b/tests/testengine/plasma-dataengine-testengine.desktop @@ -27,6 +27,7 @@ Name[hu]=Az adatkezelő modul tesztje Name[is]=Gagnaprófunarvél Name[it]=Motore dati di prova Name[km]=សាកល្បង​ម៉ាស៊ីន​ទិន្នន័យ +Name[kn]=ಪರೀಕ್ಷಾ ದತ್ತ ಯಂತ್ರ Name[ko]=테스트 데이터 엔진 Name[ku]=Motora Dane Ceribandinê Name[lt]=Bandomasis duomenų variklis From 14352fc429a445992aebfb2ff83b3ce4b7149f30 Mon Sep 17 00:00:00 2001 From: Richard Dale Date: Fri, 17 Jul 2009 12:32:06 +0000 Subject: [PATCH 21/60] Add getters and setters for PopupApplet::widget() and PopupApplet::graphicsWidget() for use in scripting languages. Add a initScriptingExtenderItem() signal for script engines to connect to and call their versions of Applet::initExtenderItem() CCMAIL: kde-bindings@kde.org svn path=/branches/KDE/4.3/kdelibs/; revision=998324 --- applet.cpp | 14 +++++++++----- applet.h | 5 +++++ popupapplet.cpp | 20 ++++++++++++++++++-- popupapplet.h | 2 ++ private/popupapplet_p.h | 2 ++ 5 files changed, 36 insertions(+), 7 deletions(-) diff --git a/applet.cpp b/applet.cpp index 58e834aeb..1e4fc3b1f 100644 --- a/applet.cpp +++ b/applet.cpp @@ -666,11 +666,15 @@ void Applet::constraintsEvent(Plasma::Constraints constraints) void Applet::initExtenderItem(ExtenderItem *item) { - kWarning() << "Missing implementation of initExtenderItem in the applet " - << item->config().readEntry("SourceAppletPluginName", "") - << "!\n Any applet that uses extenders should implement initExtenderItem to " - << "instantiate a widget. Destroying the item..."; - item->destroy(); + if (d->script) { + emit initScriptExtenderItem(item); + } else { + kWarning() << "Missing implementation of initExtenderItem in the applet " + << item->config().readEntry("SourceAppletPluginName", "") + << "!\n Any applet that uses extenders should implement initExtenderItem to " + << "instantiate a widget. Destroying the item..."; + item->destroy(); + } } Extender *Applet::extender() const diff --git a/applet.h b/applet.h index 9b6e39af1..9a24b549c 100644 --- a/applet.h +++ b/applet.h @@ -688,6 +688,11 @@ class PLASMA_EXPORT Applet : public QGraphicsWidget void appletDestroyed(Plasma::Applet *applet); + /** + * Emitted when an ExtenderItem in a scripting applet needs to be initialized + */ + void initScriptExtenderItem(Plasma::ExtenderItem *item); + public Q_SLOTS: /** * Sets the immutability type for this applet (not immutable, diff --git a/popupapplet.cpp b/popupapplet.cpp index 83251362f..e2b93b2d8 100644 --- a/popupapplet.cpp +++ b/popupapplet.cpp @@ -112,12 +112,26 @@ QIcon PopupApplet::popupIcon() const QWidget *PopupApplet::widget() { - return 0; + return d->widget; +} + +void PopupApplet::setWidget(QWidget * widget) +{ + d->widget = widget; } QGraphicsWidget *PopupApplet::graphicsWidget() { - return static_cast(this)->d->extender; + if (d->graphicsWidget != 0) { + return d->graphicsWidget; + } else { + return static_cast(this)->d->extender; + } +} + +void PopupApplet::setGraphicsWidget(QGraphicsWidget * graphicsWidget) +{ + d->graphicsWidget = graphicsWidget; } void PopupAppletPrivate::checkExtenderAppearance(Plasma::FormFactor f) @@ -486,6 +500,8 @@ PopupAppletPrivate::PopupAppletPrivate(PopupApplet *applet) icon(0), dialog(0), proxy(0), + widget(0), + graphicsWidget(0), popupPlacement(Plasma::FloatingPopup), savedAspectRatio(Plasma::InvalidAspectRatioMode), timer(0), diff --git a/popupapplet.h b/popupapplet.h index 1a782da20..f93ecf129 100644 --- a/popupapplet.h +++ b/popupapplet.h @@ -76,6 +76,7 @@ public: * depending on the form factor of the applet. */ virtual QWidget *widget(); + void setWidget(QWidget * widget); /** * Implement either this function or widget(). @@ -83,6 +84,7 @@ public: * depending on the form factor of the applet. */ virtual QGraphicsWidget *graphicsWidget(); + void setGraphicsWidget(QGraphicsWidget * widget); /** * @return the placement of the popup relating to the icon diff --git a/private/popupapplet_p.h b/private/popupapplet_p.h index e0bc44fe4..6d6869f7f 100644 --- a/private/popupapplet_p.h +++ b/private/popupapplet_p.h @@ -42,6 +42,8 @@ public: Plasma::IconWidget *icon; QPointer dialog; QGraphicsProxyWidget *proxy; + QWidget *widget; + QGraphicsWidget *graphicsWidget; Plasma::PopupPlacement popupPlacement; Plasma::AspectRatioMode savedAspectRatio; QTimer *timer; From 1a92fc04d064bdae04f935c1f8793e0db1cdcdf9 Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Sat, 18 Jul 2009 08:57:07 +0000 Subject: [PATCH 22/60] SVN_SILENT made messages (.desktop file) svn path=/branches/KDE/4.3/kdelibs/; revision=998631 --- servicetypes/plasma-animator.desktop | 1 + servicetypes/plasma-applet-extenderapplet.desktop | 1 + servicetypes/plasma-applet-popupapplet.desktop | 1 + servicetypes/plasma-applet.desktop | 1 + servicetypes/plasma-containment.desktop | 1 + servicetypes/plasma-dataengine.desktop | 1 + servicetypes/plasma-packagestructure.desktop | 1 + servicetypes/plasma-runner.desktop | 1 + servicetypes/plasma-scriptengine.desktop | 1 + servicetypes/plasma-wallpaper.desktop | 1 + tests/packagemetadatatest.desktop | 2 ++ tests/testengine/plasma-dataengine-testengine.desktop | 1 + 12 files changed, 13 insertions(+) diff --git a/servicetypes/plasma-animator.desktop b/servicetypes/plasma-animator.desktop index af41ccca4..7f926871f 100644 --- a/servicetypes/plasma-animator.desktop +++ b/servicetypes/plasma-animator.desktop @@ -60,6 +60,7 @@ Comment[tg]=Системаи аниматсионии Plasma Comment[th]=กลไกแสดงความเคลื่อนไหวของพลาสมา Comment[tr]=Plasma Canlandırma Motoru Comment[uk]=Рушій анімації Плазми +Comment[wa]=Éndjin d' animåcion Plasma Comment[x-test]=xxPlasma Animation Enginexx Comment[zh_CN]=Plasma 动画引擎 Comment[zh_TW]=Plasma 動畫引擎 diff --git a/servicetypes/plasma-applet-extenderapplet.desktop b/servicetypes/plasma-applet-extenderapplet.desktop index b2da9c0df..4e2f5366d 100644 --- a/servicetypes/plasma-applet-extenderapplet.desktop +++ b/servicetypes/plasma-applet-extenderapplet.desktop @@ -38,6 +38,7 @@ Name[sr@latin]=zbirka Name[sv]=Samling Name[tr]=Koleksiyon Name[uk]=Збірка +Name[wa]=Ramexhnêye Name[x-test]=xxCollectionxx Name[zh_CN]=收藏 Name[zh_TW]=收藏 diff --git a/servicetypes/plasma-applet-popupapplet.desktop b/servicetypes/plasma-applet-popupapplet.desktop index 621d3e87b..4d69794b2 100644 --- a/servicetypes/plasma-applet-popupapplet.desktop +++ b/servicetypes/plasma-applet-popupapplet.desktop @@ -39,6 +39,7 @@ Comment[sr@latin]=Plasma skriptovani iskačući aplet Comment[sv]=Plasma-skriptminiprogram Comment[tr]=Plasma betik kullanan açılabilir gereci Comment[uk]=Аплет програмованого контекстного вікна Плазми +Comment[wa]=Aplikete Plasma d' aspitant purnea pol sicriptaedje Comment[x-test]=xxPlasma scripting popup appletxx Comment[zh_CN]=Plasma 脚本型弹出小程序 Comment[zh_TW]=Plasma 文稿彈出小程式 diff --git a/servicetypes/plasma-applet.desktop b/servicetypes/plasma-applet.desktop index 012057740..c1d77b3e8 100644 --- a/servicetypes/plasma-applet.desktop +++ b/servicetypes/plasma-applet.desktop @@ -59,6 +59,7 @@ Comment[tg]=Барномаи Plasma Comment[th]=แอพเพล็ตของพลาสมา Comment[tr]=Plasma programcığı Comment[uk]=Аплет Плазми +Comment[wa]=Aplikete Plasma Comment[x-test]=xxPlasma appletxx Comment[zh_CN]=Plasma 小程序 Comment[zh_TW]=Plasma 小程式 diff --git a/servicetypes/plasma-containment.desktop b/servicetypes/plasma-containment.desktop index 4ba109c86..e533a8b14 100644 --- a/servicetypes/plasma-containment.desktop +++ b/servicetypes/plasma-containment.desktop @@ -58,6 +58,7 @@ Comment[tg]=Системаи захиракунӣ ва тасвирии Plasma Comment[th]=ตัววาดพื้นหลังและตัวบรรจุแแอพเพล็ตของพลาสมา Comment[tr]=Plasma programcık içerici ve arkaplan oluşturucu Comment[uk]=Контейнер аплетів плазми і малювання тла +Comment[wa]=Aplikete contneu di Plasma eyet pondeu do fond Comment[x-test]=xxPlasma applet container and background painterxx Comment[zh_CN]=Plasma 小程序容器及背景绘制器 Comment[zh_TW]=Plasma 小程式容器與背景畫家 diff --git a/servicetypes/plasma-dataengine.desktop b/servicetypes/plasma-dataengine.desktop index ce828840f..a8cf0e367 100644 --- a/servicetypes/plasma-dataengine.desktop +++ b/servicetypes/plasma-dataengine.desktop @@ -59,6 +59,7 @@ Comment[tg]=Системаи маълумотии Plasma Comment[th]=กลไกข้อมูลของพลาสมา Comment[tr]=Plasma Veri Motoru Comment[uk]=Рушій даних Плазми +Comment[wa]=Éndjin di dnêyes Plasma Comment[x-test]=xxPlasma Data Enginexx Comment[zh_CN]=Plasma 数据引擎 Comment[zh_TW]=Plasma 資料引擎 diff --git a/servicetypes/plasma-packagestructure.desktop b/servicetypes/plasma-packagestructure.desktop index 987d3d66c..988f4d094 100644 --- a/servicetypes/plasma-packagestructure.desktop +++ b/servicetypes/plasma-packagestructure.desktop @@ -57,6 +57,7 @@ Comment[tg]=Барномаи муайянкунии сохтори Plasma Comment[th]=นิยามโครงสร้างแพกเกจของพลาสมา Comment[tr]=Plasma paketi yapı tanımlaması Comment[uk]=Опис структури пакунка плазми +Comment[wa]=Definixha del sitructeure di pacaedje Plasma Comment[x-test]=xxPlasma package structure definitionxx Comment[zh_CN]=Plasma 包结构定义 Comment[zh_TW]=Plasma 套件結構定義 diff --git a/servicetypes/plasma-runner.desktop b/servicetypes/plasma-runner.desktop index 864dba2e8..007beaf4a 100644 --- a/servicetypes/plasma-runner.desktop +++ b/servicetypes/plasma-runner.desktop @@ -61,6 +61,7 @@ Comment[tg]=Васлкунаки KRunner Comment[th]=โปรแกรมเสริมของ KRunner Comment[tr]=KRunner eklentisi Comment[uk]=Втулок KRunner +Comment[wa]=Tchôke-divins KRunner Comment[x-test]=xxKRunner pluginxx Comment[zh_CN]=KRunner 插件 Comment[zh_TW]=KRunner 外掛程式 diff --git a/servicetypes/plasma-scriptengine.desktop b/servicetypes/plasma-scriptengine.desktop index 6d827594b..bab4dbf6b 100644 --- a/servicetypes/plasma-scriptengine.desktop +++ b/servicetypes/plasma-scriptengine.desktop @@ -59,6 +59,7 @@ Comment[tg]=Скрипти забонҳои иловагӣ барои Plasma Comment[th]=ส่วนเสริมภาษาสคริปต์สำหรับพลาสมา Comment[tr]=Plasma için betik dili eklentisi Comment[uk]=Розширення скриптових мов для Plasma +Comment[wa]=Sitindaedje lingaedje di scripe po Plasma Comment[x-test]=xxScripting language extension for Plasmaxx Comment[zh_CN]=Plasma 的扩展脚本语言 Comment[zh_TW]=Plasma 文稿語言延伸 diff --git a/servicetypes/plasma-wallpaper.desktop b/servicetypes/plasma-wallpaper.desktop index 1ced28686..cbe52a7b1 100644 --- a/servicetypes/plasma-wallpaper.desktop +++ b/servicetypes/plasma-wallpaper.desktop @@ -60,6 +60,7 @@ Comment[tg]=Тасвири заминаи Plasma Comment[th]=ภาพพื้นหลังของพลาสมา Comment[tr]=Plasma duvar kağıdı Comment[uk]=Тло стільниці Плазми +Comment[wa]=Tapisreye Plasma Comment[x-test]=xxPlasma wallpaperxx Comment[zh_CN]=Plasma 壁纸 Comment[zh_TW]=Plasma 桌布 diff --git a/tests/packagemetadatatest.desktop b/tests/packagemetadatatest.desktop index 9d0802fef..905929244 100644 --- a/tests/packagemetadatatest.desktop +++ b/tests/packagemetadatatest.desktop @@ -53,6 +53,7 @@ Name[tg]=Файли санҷишии стсетмаи metadata Name[th]=แฟ้มทดสอบข้อมูลกำกับแพกเกจ Name[tr]=Paket metadata test dosyası Name[uk]=Файл перевірки метаданих пакунка +Name[wa]=Fitchî di saye di meta-dnêyes di pacaedje Name[x-test]=xxPackage metadata test filexx Name[zh_CN]=工具包元数据测试文件 Name[zh_TW]=套件中繼資料測試檔 @@ -109,6 +110,7 @@ Comment[tg]=Файли санҷишии мизи корӣ барои санҷи Comment[th]=แฟ้มทดสอบพื้นที่ทำงาน สำหรับทดสอบคลาส PackageMetaData Comment[tr]=PackageMetaData sınıfını test etmek için bir desktop dosyası. Comment[uk]=Тестовий стільничний файл для перевірки класу PackageMetaData. +Comment[wa]=On fitchî d' sicribanne di saye po sayî l' classe PackageMetaData. Comment[x-test]=xxA test desktop file to test the PackageMetaData class.xx Comment[zh_CN]=用于测试 PackageMetaData 类的 desktop 类型文件。 Comment[zh_TW]=測試 PackageMetaData 類別的桌面檔 diff --git a/tests/testengine/plasma-dataengine-testengine.desktop b/tests/testengine/plasma-dataengine-testengine.desktop index 97663d0ef..14ce9392a 100644 --- a/tests/testengine/plasma-dataengine-testengine.desktop +++ b/tests/testengine/plasma-dataengine-testengine.desktop @@ -56,6 +56,7 @@ Name[tg]=Системаи санҷиши маълумот Name[th]=กลไกทดสอบข้อมูล Name[tr]=Test Veri Motoru Name[uk]=Перевірка рушія даних +Name[wa]=Sayû éndjin d' dinêyes Name[x-test]=xxTest Data Enginexx Name[zh_CN]=测试用数据引擎 Name[zh_TW]=測試資料引擎 From a3bb51e3a8f299a0f88614f77f197259b3236b91 Mon Sep 17 00:00:00 2001 From: Richard Dale Date: Sun, 19 Jul 2009 14:26:06 +0000 Subject: [PATCH 23/60] * Change the name of the initScriptExtenderItem to extenderItemRestored as it is less clumsy svn path=/branches/KDE/4.3/kdelibs/; revision=999252 --- applet.cpp | 2 +- applet.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/applet.cpp b/applet.cpp index 1e4fc3b1f..4a9db18f0 100644 --- a/applet.cpp +++ b/applet.cpp @@ -667,7 +667,7 @@ void Applet::constraintsEvent(Plasma::Constraints constraints) void Applet::initExtenderItem(ExtenderItem *item) { if (d->script) { - emit initScriptExtenderItem(item); + emit extenderItemRestored(item); } else { kWarning() << "Missing implementation of initExtenderItem in the applet " << item->config().readEntry("SourceAppletPluginName", "") diff --git a/applet.h b/applet.h index 9a24b549c..7e046f771 100644 --- a/applet.h +++ b/applet.h @@ -691,7 +691,7 @@ class PLASMA_EXPORT Applet : public QGraphicsWidget /** * Emitted when an ExtenderItem in a scripting applet needs to be initialized */ - void initScriptExtenderItem(Plasma::ExtenderItem *item); + void extenderItemRestored(Plasma::ExtenderItem *item); public Q_SLOTS: /** From 54d0b04f5c00ff6a14a07fd34fedf58d0a2764c9 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Sun, 19 Jul 2009 14:47:43 +0000 Subject: [PATCH 24/60] Compile fix. Changing the .cpp files only; a more consistent change would be to add const to tooltipcontent.h, but that would be BIC in itself. BUG: 199899 svn path=/branches/KDE/4.3/kdelibs/; revision=999260 --- tooltipcontent.cpp | 2 +- widgets/meter.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tooltipcontent.cpp b/tooltipcontent.cpp index dccedbae1..318689c98 100644 --- a/tooltipcontent.cpp +++ b/tooltipcontent.cpp @@ -143,7 +143,7 @@ QPixmap ToolTipContent::image() const return d->image; } -void ToolTipContent::setWindowToPreview(const WId id) +void ToolTipContent::setWindowToPreview(WId id) { d->windowsToPreview.clear(); d->windowsToPreview.append(id); diff --git a/widgets/meter.cpp b/widgets/meter.cpp index 4264d1bb6..33a81d36b 100644 --- a/widgets/meter.cpp +++ b/widgets/meter.cpp @@ -385,7 +385,7 @@ QFont Meter::labelFont(int index) const return d->fonts[index]; } -void Meter::setLabelAlignment(int index, Qt::Alignment alignment) +void Meter::setLabelAlignment(int index, const Qt::Alignment alignment) { while (d->alignments.count() <= index) { d->alignments << alignment; From f857b22d8bd0262f1492c20e772395a658459dd4 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Mon, 20 Jul 2009 20:35:16 +0000 Subject: [PATCH 25/60] backport the fix for bug 200313 quite huge patch, i know :/ svn path=/branches/KDE/4.3/kdelibs/; revision=1000103 --- framesvg.cpp | 4 ++-- svg.cpp | 2 +- theme.cpp | 43 ++++++++++++++++++++++++++++++++----------- theme.h | 17 +++++++++++++++++ 4 files changed, 52 insertions(+), 14 deletions(-) diff --git a/framesvg.cpp b/framesvg.cpp index abde25a52..afb609f6c 100644 --- a/framesvg.cpp +++ b/framesvg.cpp @@ -621,13 +621,13 @@ void FrameSvgPrivate::cacheFrame(const QString &prefixToSave) //kDebug()<<"Saving to cache frame"<insertIntoCache(id, frame->cachedBackground); + Theme::defaultTheme()->insertIntoCache(id, frame->cachedBackground, QString::number((int)q)+prefixToSave); //insert overlay id = QString::fromLatin1("overlay_%7_%6_%5_%4_%3_%2_%1_"). arg(overlayPos.y()).arg(overlayPos.x()).arg(frame->enabledBorders).arg(size.width()).arg(size.height()).arg(prefixToSave).arg(q->imagePath()); - Theme::defaultTheme()->insertIntoCache(id, frame->cachedBackground); + Theme::defaultTheme()->insertIntoCache(id, frame->cachedBackground, QString::number((int)q)+prefixToSave+"overlay"); } void FrameSvgPrivate::updateSizes() diff --git a/svg.cpp b/svg.cpp index 5c8c068dd..dee9cbfd8 100644 --- a/svg.cpp +++ b/svg.cpp @@ -238,7 +238,7 @@ class SvgPrivate } if (cacheRendering) { - actualTheme()->insertIntoCache(id, p); + actualTheme()->insertIntoCache(id, p, QString::number((int)q)+elementId); } return p; diff --git a/theme.cpp b/theme.cpp index 111ac48c0..76ca41837 100644 --- a/theme.cpp +++ b/theme.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #ifdef Q_WS_X11 #include #endif @@ -150,6 +151,8 @@ public: KSharedConfigPtr svgElementsCache; QHash > invalidElements; QHash pixmapsToCache; + QHash keysToCache; + QHash idsToCache; QTimer *saveTimer; #ifdef Q_WS_X11 @@ -236,16 +239,15 @@ void ThemePrivate::discardCache(bool recreateElementsCache) void ThemePrivate::scheduledCacheUpdate() { - //kDebug()<< "Saving to cache:"; - QHash::const_iterator it = pixmapsToCache.constBegin(); - - while (it != pixmapsToCache.constEnd()) { - //kDebug()<< "Saving item to cache: " << it.key(); - pixmapCache->insert(it.key(), it.value()); - ++it; + QHashIterator it(pixmapsToCache); + while (it.hasNext()) { + it.next(); + pixmapCache->insert(idsToCache[it.key()], it.value()); } pixmapsToCache.clear(); + keysToCache.clear(); + idsToCache.clear(); } void ThemePrivate::colorsChanged() @@ -662,8 +664,13 @@ bool Theme::useNativeWidgetStyle() const bool Theme::findInCache(const QString &key, QPixmap &pix) { if (d->useCache()) { - if (d->pixmapsToCache.contains(key)) { - pix = d->pixmapsToCache.value(key); + if (!d->keysToCache.contains(key)) { + return false; + } + + const QString id = d->keysToCache[key]; + if (d->pixmapsToCache.contains(id)) { + pix = d->pixmapsToCache.value(id); return true; } @@ -686,8 +693,22 @@ bool Theme::findInCache(const QString &key, QPixmap &pix, unsigned int lastModif void Theme::insertIntoCache(const QString& key, const QPixmap& pix) { if (d->useCache()) { - d->pixmapsToCache.insert(key, pix); - d->saveTimer->start(500); + d->pixmapCache->insert(key, pix); + } +} + +void Theme::insertIntoCache(const QString& key, const QPixmap& pix, const QString& id) +{ + if (d->useCache()) { + d->pixmapsToCache.insert(id, pix); + + if (d->idsToCache.contains(id)) { + d->keysToCache.remove(d->idsToCache[id]); + } + + d->keysToCache.insert(key, id); + d->idsToCache.insert(id, key); + d->saveTimer->start(600); } } diff --git a/theme.h b/theme.h index 6d918c006..883e3a6e7 100644 --- a/theme.h +++ b/theme.h @@ -238,6 +238,23 @@ class PLASMA_EXPORT Theme : public QObject **/ void insertIntoCache(const QString& key, const QPixmap& pix); + /** + * Insert specified pixmap into the cache. + * If the cache already contains pixmap with the specified key then it is + * overwritten. + * The actual insert is delayed for optimization reasons and the id + * parameter is used to discard repeated inserts in the delay time, useful + * when for instance the graphics to inser comes from a quickly resizing + * object: the frames between the start and destination sizes aren't + * useful in the cache and just cause overhead. + * + * @param key the name to use in the cache for this pixmap + * @param pix the pixmap data to store in the cache + * @param id a name that identifies the caller class of this function in an unique fashion + * @since 4.3 + **/ + void insertIntoCache(const QString& key, const QPixmap& pix, const QString& id); + /** * Sets the maximum size of the cache (in kilobytes). If cache gets bigger * the limit then some entries are removed From b52cfaefac1c63a04b0f9bc9823f03a278537f51 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Mon, 20 Jul 2009 21:27:43 +0000 Subject: [PATCH 26/60] backport build fix svn path=/branches/KDE/4.3/kdelibs/; revision=1000126 --- framesvg.cpp | 4 ++-- svg.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/framesvg.cpp b/framesvg.cpp index afb609f6c..0685d472e 100644 --- a/framesvg.cpp +++ b/framesvg.cpp @@ -621,13 +621,13 @@ void FrameSvgPrivate::cacheFrame(const QString &prefixToSave) //kDebug()<<"Saving to cache frame"<insertIntoCache(id, frame->cachedBackground, QString::number((int)q)+prefixToSave); + Theme::defaultTheme()->insertIntoCache(id, frame->cachedBackground, QString::number((qint64)q)+prefixToSave); //insert overlay id = QString::fromLatin1("overlay_%7_%6_%5_%4_%3_%2_%1_"). arg(overlayPos.y()).arg(overlayPos.x()).arg(frame->enabledBorders).arg(size.width()).arg(size.height()).arg(prefixToSave).arg(q->imagePath()); - Theme::defaultTheme()->insertIntoCache(id, frame->cachedBackground, QString::number((int)q)+prefixToSave+"overlay"); + Theme::defaultTheme()->insertIntoCache(id, frame->cachedBackground, QString::number((qint64)q)+prefixToSave+"overlay"); } void FrameSvgPrivate::updateSizes() diff --git a/svg.cpp b/svg.cpp index dee9cbfd8..f8e367da4 100644 --- a/svg.cpp +++ b/svg.cpp @@ -238,7 +238,7 @@ class SvgPrivate } if (cacheRendering) { - actualTheme()->insertIntoCache(id, p, QString::number((int)q)+elementId); + actualTheme()->insertIntoCache(id, p, QString::number((qint64)q)+elementId); } return p; From 9afeabbc6f9d7ace3e9a842fbd24cca74b81bbd6 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Mon, 20 Jul 2009 21:50:05 +0000 Subject: [PATCH 27/60] use base 16, should be slightly faster svn path=/branches/KDE/4.3/kdelibs/; revision=1000135 --- framesvg.cpp | 4 ++-- svg.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/framesvg.cpp b/framesvg.cpp index 0685d472e..f7b488061 100644 --- a/framesvg.cpp +++ b/framesvg.cpp @@ -621,13 +621,13 @@ void FrameSvgPrivate::cacheFrame(const QString &prefixToSave) //kDebug()<<"Saving to cache frame"<insertIntoCache(id, frame->cachedBackground, QString::number((qint64)q)+prefixToSave); + Theme::defaultTheme()->insertIntoCache(id, frame->cachedBackground, QString::number((qint64)q, 16)+prefixToSave); //insert overlay id = QString::fromLatin1("overlay_%7_%6_%5_%4_%3_%2_%1_"). arg(overlayPos.y()).arg(overlayPos.x()).arg(frame->enabledBorders).arg(size.width()).arg(size.height()).arg(prefixToSave).arg(q->imagePath()); - Theme::defaultTheme()->insertIntoCache(id, frame->cachedBackground, QString::number((qint64)q)+prefixToSave+"overlay"); + Theme::defaultTheme()->insertIntoCache(id, frame->cachedBackground, QString::number((qint64)q, 16)+prefixToSave+"overlay"); } void FrameSvgPrivate::updateSizes() diff --git a/svg.cpp b/svg.cpp index f8e367da4..a7749f8cf 100644 --- a/svg.cpp +++ b/svg.cpp @@ -238,7 +238,7 @@ class SvgPrivate } if (cacheRendering) { - actualTheme()->insertIntoCache(id, p, QString::number((qint64)q)+elementId); + actualTheme()->insertIntoCache(id, p, QString::number((qint64)q, 16)+elementId); } return p; From b358a20f7e74444e472776a7d2820b6785c55975 Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Tue, 21 Jul 2009 08:07:24 +0000 Subject: [PATCH 28/60] SVN_SILENT made messages (.desktop file) svn path=/branches/KDE/4.3/kdelibs/; revision=1000347 --- servicetypes/plasma-applet-extenderapplet.desktop | 2 ++ servicetypes/plasma-applet-popupapplet.desktop | 1 + 2 files changed, 3 insertions(+) diff --git a/servicetypes/plasma-applet-extenderapplet.desktop b/servicetypes/plasma-applet-extenderapplet.desktop index 4e2f5366d..19aac87fc 100644 --- a/servicetypes/plasma-applet-extenderapplet.desktop +++ b/servicetypes/plasma-applet-extenderapplet.desktop @@ -32,7 +32,9 @@ Name[pl]=Kolekcja Name[pt]=Colecção Name[pt_BR]=Coleção Name[ro]=Colecție +Name[ru]=Коллекция Name[se]=Čoahkádus +Name[sl]=Zbirka Name[sr]=збирка Name[sr@latin]=zbirka Name[sv]=Samling diff --git a/servicetypes/plasma-applet-popupapplet.desktop b/servicetypes/plasma-applet-popupapplet.desktop index 4d69794b2..1c2b3d7a9 100644 --- a/servicetypes/plasma-applet-popupapplet.desktop +++ b/servicetypes/plasma-applet-popupapplet.desktop @@ -34,6 +34,7 @@ Comment[pl]=Aplet Plazmy do skryptów Comment[pt]='Applet' de programação do Plasma Comment[pt_BR]=Miniaplicativo de script do Plasma Comment[ro]=Miniaplicație Plasma de indicii ale scripturilor +Comment[sl]=Plasma skriptni pojavni programček Comment[sr]=Плазма скриптовани искачући аплет Comment[sr@latin]=Plasma skriptovani iskačući aplet Comment[sv]=Plasma-skriptminiprogram From e02f8c071df61199e2843c437620aafafbc9082d Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Sat, 25 Jul 2009 04:55:16 +0000 Subject: [PATCH 29/60] be more careful with setWidget svn path=/branches/KDE/4.3/kdelibs/; revision=1002130 --- extenderitem.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/extenderitem.cpp b/extenderitem.cpp index 8a35bcc98..3404f7a56 100644 --- a/extenderitem.cpp +++ b/extenderitem.cpp @@ -179,6 +179,15 @@ QString ExtenderItem::name() const void ExtenderItem::setWidget(QGraphicsItem *widget) { + if (d->widget) { + d->widget->removeSceneEventFilter(this); + } + + if (!widget) { + d->widget = 0; + return; + } + widget->setParentItem(this); widget->installSceneEventFilter(this); From 2ac54f8f1949adcfe78288e7fd537fa3d002dbc7 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Sat, 25 Jul 2009 05:43:20 +0000 Subject: [PATCH 30/60] backport fix for widgets with X-KDE-ParentApp= in their metatdata.desktop svn path=/branches/KDE/4.3/kdelibs/; revision=1002136 --- applet.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/applet.cpp b/applet.cpp index 4a9db18f0..435e07ff0 100644 --- a/applet.cpp +++ b/applet.cpp @@ -1739,7 +1739,7 @@ KPluginInfo::List Applet::listAppletInfo(const QString &category, QString constraint; if (parentApp.isEmpty()) { - constraint.append("not exist [X-KDE-ParentApp]"); + constraint.append("(not exist [X-KDE-ParentApp] or [X-KDE-ParentApp] == '')"); } else { constraint.append("[X-KDE-ParentApp] == '").append(parentApp).append("'"); } @@ -1810,7 +1810,7 @@ QStringList Applet::listCategories(const QString &parentApp, bool visibleOnly) QString constraint = "exist [X-KDE-PluginInfo-Category]"; if (parentApp.isEmpty()) { - constraint.append(" and not exist [X-KDE-ParentApp]"); + constraint.append("and (not exist [X-KDE-ParentApp] or [X-KDE-ParentApp] == '')"); } else { constraint.append(" and [X-KDE-ParentApp] == '").append(parentApp).append("'"); } From 55fd81456f41a9b9997a9b14fb6b781b9028664d Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Sat, 25 Jul 2009 09:48:16 +0000 Subject: [PATCH 31/60] * make it possible to install packages without registering them as a service * support tar and compressed tar as well as zip * support archives that contain the actual package in a top level subdir themes and wallpapers now install nicely. svn path=/branches/KDE/4.3/kdelibs/; revision=1002169 --- package.cpp | 86 ++++++++++++++++++++++++++++++++--------------------- package.h | 4 ++- 2 files changed, 55 insertions(+), 35 deletions(-) diff --git a/package.cpp b/package.cpp index a1885c413..56f5405c3 100644 --- a/package.cpp +++ b/package.cpp @@ -31,8 +31,10 @@ #include #include #include +#include #include #include +#include #include #include #include @@ -253,28 +255,42 @@ bool Package::installPackage(const QString &package, path.append('/'); } } else { - KZip archive(package); - if (!archive.open(QIODevice::ReadOnly)) { + KArchive *archive = 0; + KMimeType::Ptr mimetype = KMimeType::findByPath(package); + + if (mimetype->is("application/zip")) { + archive = new KZip(package); + } else if (mimetype->is("application/x-compressed-tar") || + mimetype->is("application/x-tar")) { + archive = new KTar(package); + } else { + kWarning() << "Could not open package file, unsupported archive format:" << package << mimetype->name(); + return false; + } + + if (!archive->open(QIODevice::ReadOnly)) { kWarning() << "Could not open package file:" << package; return false; } archivedPackage = true; - const KArchiveDirectory *source = archive.directory(); - const KArchiveEntry *metadata = source->entry("metadata.desktop"); - - if (!metadata) { - kWarning() << "No metadata file in package" << package; - return false; - } - path = tempdir.name(); + + const KArchiveDirectory *source = archive->directory(); source->copyTo(path); + + QStringList entries = source->entries(); + if (entries.count() == 1) { + const KArchiveEntry *entry = source->entry(entries[0]); + if (entry->isDirectory()) { + path.append(entry->name()).append("/"); + } + } } QString metadataPath = path + "metadata.desktop"; if (!QFile::exists(metadataPath)) { - kWarning() << "No metadata file in package" << package; + kWarning() << "No metadata file in package" << package << metadataPath; return false; } @@ -322,34 +338,36 @@ bool Package::installPackage(const QString &package, tempdir.setAutoRemove(false); } - // and now we register it as a service =) - QString metaPath = targetName + "/metadata.desktop"; - KDesktopFile df(metaPath); - KConfigGroup cg = df.desktopGroup(); + if (!servicePrefix.isEmpty()) { + // and now we register it as a service =) + QString metaPath = targetName + "/metadata.desktop"; + KDesktopFile df(metaPath); + KConfigGroup cg = df.desktopGroup(); - // Q: should not installing it as a service disqualify it? - // Q: i don't think so since KServiceTypeTrader may not be - // used by the installing app in any case, and the - // package is properly installed - aseigo + // Q: should not installing it as a service disqualify it? + // Q: i don't think so since KServiceTypeTrader may not be + // used by the installing app in any case, and the + // package is properly installed - aseigo - //TODO: reduce code duplication with registerPackage below + //TODO: reduce code duplication with registerPackage below - QString serviceName = servicePrefix + meta.pluginName(); + QString serviceName = servicePrefix + meta.pluginName(); - QString service = KStandardDirs::locateLocal("services", serviceName + ".desktop"); - KIO::FileCopyJob *job = KIO::file_copy(metaPath, service, -1, KIO::HideProgressInfo); - if (job->exec()) { - // the icon in the installed file needs to point to the icon in the - // installation dir! - QString iconPath = targetName + '/' + cg.readEntry("Icon"); - QFile icon(iconPath); - if (icon.exists()) { - KDesktopFile df(service); - KConfigGroup cg = df.desktopGroup(); - cg.writeEntry("Icon", iconPath); + QString service = KStandardDirs::locateLocal("services", serviceName + ".desktop"); + KIO::FileCopyJob *job = KIO::file_copy(metaPath, service, -1, KIO::HideProgressInfo); + if (job->exec()) { + // the icon in the installed file needs to point to the icon in the + // installation dir! + QString iconPath = targetName + '/' + cg.readEntry("Icon"); + QFile icon(iconPath); + if (icon.exists()) { + KDesktopFile df(service); + KConfigGroup cg = df.desktopGroup(); + cg.writeEntry("Icon", iconPath); + } + } else { + kWarning() << "Could not register package as service (this is not necessarily fatal):" << serviceName << " : " << job->errorString(); } - } else { - kWarning() << "Could not register package as service (this is not necessarily fatal):" << serviceName << " : " << job->errorString(); } return true; diff --git a/package.h b/package.h index 78d2c65e8..7eb12632a 100644 --- a/package.h +++ b/package.h @@ -143,7 +143,9 @@ class PLASMA_EXPORT Package * @param packageRoot path to the directory where the package should be * installed to * @param servicePrefix the prefix for the desktop file, so as not to interfere - * with unrelated services (eg: "plasma-applet-") + * with unrelated services (eg: "plasma-applet-"). If no prefix + * is set (e.g. a QString() is passed in), then the package will NOT + * be registered as a service * @return true on successful installation, false otherwise **/ static bool installPackage(const QString &package, From 3fa3a268f3edae06a948445932fbf52c6be42562 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Sat, 25 Jul 2009 13:18:10 +0000 Subject: [PATCH 32/60] backport the horizontal scrollbar fix in microblogging applet svn path=/branches/KDE/4.3/kdelibs/; revision=1002240 --- widgets/scrollwidget.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/widgets/scrollwidget.cpp b/widgets/scrollwidget.cpp index def6b1d2f..6e1951104 100644 --- a/widgets/scrollwidget.cpp +++ b/widgets/scrollwidget.cpp @@ -81,6 +81,9 @@ public: layout->addItem(horizontalScrollBar, 1, 0); horizontalScrollBar->show(); } + + layout->activate(); + widget->resize(scrollingWidget->size().width(), widget->size().height()); } void verticalScroll(int value) @@ -217,8 +220,6 @@ void ScrollWidget::resizeEvent(QGraphicsSceneResizeEvent *event) return; } - d->widget->resize(d->scrollingWidget->size()); - d->adjustScrollbars(); d->adjustClipping(); From 871e1baaf4299b09a8ff3cab79f96376f9330bae Mon Sep 17 00:00:00 2001 From: Richard Dale Date: Sun, 26 Jul 2009 14:21:42 +0000 Subject: [PATCH 33/60] * Add Plasma/PluginApplet as another type of plasmoid service when making KTrader queries svn path=/branches/KDE/4.3/kdelibs/; revision=1002602 --- applet.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/applet.cpp b/applet.cpp index 435e07ff0..92443de99 100644 --- a/applet.cpp +++ b/applet.cpp @@ -783,7 +783,11 @@ QString Applet::category(const QString &appletName) QString constraint = QString("[X-KDE-PluginInfo-Name] == '%1'").arg(appletName); KService::List offers = KServiceTypeTrader::self()->query("Plasma/Applet", constraint); - + + if (offers.isEmpty()) { + offers = KServiceTypeTrader::self()->query("Plasma/PopupApplet", constraint); + } + if (offers.isEmpty()) { return QString(); } @@ -1761,6 +1765,7 @@ KPluginInfo::List Applet::listAppletInfo(const QString &category, } KService::List offers = KServiceTypeTrader::self()->query("Plasma/Applet", constraint); + offers << KServiceTypeTrader::self()->query("Plasma/PopupApplet", constraint); //now we have to do some manual filtering because the constraint can't handle everything KConfigGroup constraintGroup(KGlobal::config(), "Constraints"); @@ -1802,6 +1807,7 @@ KPluginInfo::List Applet::listAppletInfoForMimetype(const QString &mimetype) QString constraint = QString("'%1' in [X-Plasma-DropMimeTypes]").arg(mimetype); //kDebug() << "listAppletInfoForMimetype with" << mimetype << constraint; KService::List offers = KServiceTypeTrader::self()->query("Plasma/Applet", constraint); + offers << KServiceTypeTrader::self()->query("Plasma/PopupApplet", constraint); return KPluginInfo::fromServices(offers); } @@ -1822,6 +1828,7 @@ QStringList Applet::listCategories(const QString &parentApp, bool visibleOnly) } KService::List offers = KServiceTypeTrader::self()->query("Plasma/Applet", constraint); + offers << KServiceTypeTrader::self()->query("Plasma/PopupApplet", constraint); QStringList categories; QSet known = AppletPrivate::knownCategories(); foreach (const KService::Ptr &applet, offers) { From 5b5037cf7ff10c9d10c5c1bf438575a3141230d4 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Sun, 26 Jul 2009 14:24:59 +0000 Subject: [PATCH 34/60] backport of crash fix on not existing playPauseButton svn path=/branches/KDE/4.3/kdelibs/; revision=1002604 --- widgets/videowidget.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/widgets/videowidget.cpp b/widgets/videowidget.cpp index 3e49bc149..270cdaae2 100644 --- a/widgets/videowidget.cpp +++ b/widgets/videowidget.cpp @@ -162,10 +162,12 @@ void VideoWidgetPrivate::stateChanged(Phonon::State newState, Phonon::State oldS { Q_UNUSED(oldState) - if (newState == Phonon::PlayingState) { - playPauseButton->setIcon("media-playback-pause"); - } else { - playPauseButton->setIcon("media-playback-start"); + if (playPauseButton) { + if (newState == Phonon::PlayingState) { + playPauseButton->setIcon("media-playback-pause"); + } else { + playPauseButton->setIcon("media-playback-start"); + } } } From 758b5740b1736c8162e4362d4cba7f12257aa979 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Mon, 27 Jul 2009 20:23:11 +0000 Subject: [PATCH 35/60] backport the setBackgroundHints() behaviour fix svn path=/branches/KDE/4.3/kdelibs/; revision=1003188 --- applet.cpp | 12 +++++++----- private/applet_p.h | 1 + 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/applet.cpp b/applet.cpp index 92443de99..2f070b2ca 100644 --- a/applet.cpp +++ b/applet.cpp @@ -835,6 +835,7 @@ void Applet::setBackgroundHints(const BackgroundHints hints) } d->backgroundHints = hints; + d->preferredBackgroundHints = hints; //Draw the standard background? if ((hints & StandardBackground) || (hints & TranslucentBackground)) { @@ -1119,11 +1120,11 @@ void Applet::flushPendingConstraintsEvents() if (c & Plasma::FormFactorConstraint) { FormFactor f = formFactor(); if (!d->isContainment && f != Vertical && f != Horizontal) { - setBackgroundHints(d->backgroundHints | StandardBackground); - } else if(d->backgroundHints & StandardBackground) { - setBackgroundHints(d->backgroundHints ^ StandardBackground); - } else if(d->backgroundHints & TranslucentBackground) { - setBackgroundHints(d->backgroundHints ^ TranslucentBackground); + setBackgroundHints(d->preferredBackgroundHints); + } else { + BackgroundHints hints = d->preferredBackgroundHints; + setBackgroundHints(NoBackground); + d->preferredBackgroundHints = hints; } if (d->failed) { @@ -2173,6 +2174,7 @@ AppletPrivate::AppletPrivate(KService::Ptr service, int uniqueID, Applet *applet : appletId(uniqueID), q(applet), backgroundHints(Applet::NoBackground), + preferredBackgroundHints(Applet::StandardBackground), aspectRatioMode(Plasma::KeepAspectRatio), immutability(Mutable), appletDescription(service), diff --git a/private/applet_p.h b/private/applet_p.h index 79e3cc1fe..264517a62 100644 --- a/private/applet_p.h +++ b/private/applet_p.h @@ -113,6 +113,7 @@ public: // applet attributes Applet::BackgroundHints backgroundHints; + Applet::BackgroundHints preferredBackgroundHints; Plasma::AspectRatioMode aspectRatioMode; ImmutabilityType immutability; From 1ea4a89e4c7545c5744cf5477498702d3cf425a7 Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Tue, 28 Jul 2009 03:20:54 +0000 Subject: [PATCH 36/60] SVN_SILENT made messages (.desktop file) svn path=/branches/KDE/4.3/kdelibs/; revision=1003347 --- servicetypes/plasma-applet-extenderapplet.desktop | 1 + 1 file changed, 1 insertion(+) diff --git a/servicetypes/plasma-applet-extenderapplet.desktop b/servicetypes/plasma-applet-extenderapplet.desktop index 19aac87fc..ecdd702b1 100644 --- a/servicetypes/plasma-applet-extenderapplet.desktop +++ b/servicetypes/plasma-applet-extenderapplet.desktop @@ -8,6 +8,7 @@ Name[ca@valencia]=Col·lecció Name[cs]=Kolekce Name[da]=Samling Name[de]=Sammlung +Name[el]=Συλλογή Name[es]=Colección Name[et]=Kollektsioon Name[fy]=Kolleksje From 597682cbdb4803fd2f224d7d159bf548738eeb59 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Tue, 28 Jul 2009 03:32:00 +0000 Subject: [PATCH 37/60] backport r1003346 CCBUG:201672 svn path=/branches/KDE/4.3/kdelibs/; revision=1003354 --- private/desktoptoolbox.cpp | 83 +++++++++++++++++--------------------- private/desktoptoolbox_p.h | 7 +++- private/toolbox.cpp | 73 +++++++++++++++++---------------- private/toolbox_p.h | 5 +++ 4 files changed, 84 insertions(+), 84 deletions(-) diff --git a/private/desktoptoolbox.cpp b/private/desktoptoolbox.cpp index 72c80083d..5d44bc148 100644 --- a/private/desktoptoolbox.cpp +++ b/private/desktoptoolbox.cpp @@ -213,13 +213,13 @@ DesktopToolBox::DesktopToolBox(Containment *parent) setZValue(10000000); setIsMovable(true); - assignColors(); + updateTheming(); connect(Plasma::Animator::self(), SIGNAL(movementFinished(QGraphicsItem*)), this, SLOT(toolMoved(QGraphicsItem*))); connect(this, SIGNAL(toggled()), this, SLOT(toggle())); connect(Plasma::Theme::defaultTheme(), SIGNAL(themeChanged()), - this, SLOT(assignColors())); + this, SLOT(updateTheming())); } DesktopToolBox::~DesktopToolBox() @@ -227,27 +227,47 @@ DesktopToolBox::~DesktopToolBox() delete d; } -QRectF DesktopToolBox::boundingRect() const +QSize DesktopToolBox::cornerSize() const { - int extraSpace = size(); - - - //keep space for the label and a character more - if (!d->containment->activity().isNull()) { - extraSpace = Plasma::Theme::defaultTheme()->fontMetrics().width(d->containment->activity()+"x"); - } - - //get all borders d->background->setEnabledBorders(FrameSvg::AllBorders); qreal left, top, right, bottom; d->background->getMargins(left, top, right, bottom); d->adjustBackgroundBorders(); - - return QRectF(0, 0, size()+left+right+extraSpace, size()+top+bottom+extraSpace); + return QSize(size() + left, size() + bottom); } -QRectF DesktopToolBox::apparentBoundingRect() const +QSize DesktopToolBox::fullWidth() const +{ + d->background->setEnabledBorders(FrameSvg::AllBorders); + qreal left, top, right, bottom; + d->background->getMargins(left, top, right, bottom); + d->adjustBackgroundBorders(); + + int extraSpace = 0; + if (!d->containment->activity().isNull()) { + extraSpace = Plasma::Theme::defaultTheme()->fontMetrics().width(d->containment->activity()+"x"); + } + + return QSize(size() + left + right + extraSpace, size() + bottom); +} + +QSize DesktopToolBox::fullHeight() const +{ + d->background->setEnabledBorders(FrameSvg::AllBorders); + qreal left, top, right, bottom; + d->background->getMargins(left, top, right, bottom); + d->adjustBackgroundBorders(); + + int extraSpace = 0; + if (!d->containment->activity().isNull()) { + extraSpace = Plasma::Theme::defaultTheme()->fontMetrics().width(d->containment->activity()+"x"); + } + + return QSize(size() + left, size() + top + bottom + extraSpace); +} + +QRectF DesktopToolBox::boundingRect() const { int extraSpace = size(); @@ -273,37 +293,10 @@ QRectF DesktopToolBox::apparentBoundingRect() const rect = QRectF(0, 0, size()+extraSpace+left+right, size()+top+bottom); } - switch (corner()) { - case TopLeft: - //the rect is ok - break; - case TopRight: - rect.moveTopRight(boundingRect().topRight()); - break; - case BottomLeft: - rect.moveBottomLeft(boundingRect().bottomLeft()); - break; - case BottomRight: - rect.moveBottomRight(boundingRect().bottomRight()); - break; - case Left: - rect.moveLeft(boundingRect().left()); - break; - case Right: - rect.moveRight(boundingRect().right()); - break; - case Top: - //the rect is ok - break; - case Bottom: - default: - rect.moveBottom(boundingRect().bottom()); - } - return rect; } -void DesktopToolBox::assignColors() +void DesktopToolBox::updateTheming() { d->bgColor = Plasma::Theme::defaultTheme()->color(Plasma::Theme::BackgroundColor); d->fgColor = Plasma::Theme::defaultTheme()->color(Plasma::Theme::TextColor); @@ -331,7 +324,7 @@ void DesktopToolBox::paint(QPainter *painter, const QStyleOptionGraphicsItem *op QPoint iconPos; QRect backgroundRect; - const QRectF rect = apparentBoundingRect(); + const QRectF rect = boundingRect(); const QSize icons = iconSize(); QString cornerElement; @@ -461,7 +454,7 @@ void DesktopToolBox::paint(QPainter *painter, const QStyleOptionGraphicsItem *op QPainterPath DesktopToolBox::shape() const { - const QRectF rect = apparentBoundingRect(); + const QRectF rect = boundingRect(); const int w = rect.width(); const int h = rect.height(); diff --git a/private/desktoptoolbox_p.h b/private/desktoptoolbox_p.h index 07762f720..3ceca7c5d 100644 --- a/private/desktoptoolbox_p.h +++ b/private/desktoptoolbox_p.h @@ -51,8 +51,11 @@ public: void showToolBox(); void hideToolBox(); + QSize cornerSize() const; + QSize fullWidth() const; + QSize fullHeight() const; + protected: - QRectF apparentBoundingRect() const; void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0); void hoverEnterEvent(QGraphicsSceneHoverEvent *event); void hoverLeaveEvent(QGraphicsSceneHoverEvent *event); @@ -60,7 +63,7 @@ protected: protected slots: void animateHighlight(qreal progress); void toolMoved(QGraphicsItem*); - void assignColors(); + void updateTheming(); void toolTriggered(bool); /** * show/hide the toolbox diff --git a/private/toolbox.cpp b/private/toolbox.cpp index 8d76dc5ae..4476f1dee 100644 --- a/private/toolbox.cpp +++ b/private/toolbox.cpp @@ -211,6 +211,21 @@ void ToolBox::mousePressEvent(QGraphicsSceneMouseEvent *event) d->dragStartRelative = mapToParent(event->pos()).toPoint() - pos().toPoint(); } +QSize ToolBox::cornerSize() const +{ + return boundingRect().size().toSize(); +} + +QSize ToolBox::fullWidth() const +{ + return boundingRect().size().toSize(); +} + +QSize ToolBox::fullHeight() const +{ + return boundingRect().size().toSize(); +} + void ToolBox::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { if (!d->movable || (!d->dragging && boundingRect().contains(event->pos())) || isToolbar()) { @@ -221,8 +236,12 @@ void ToolBox::mouseMoveEvent(QGraphicsSceneMouseEvent *event) d->userMoved = true; const QPoint newPos = mapToParent(event->pos()).toPoint(); const QPoint curPos = pos().toPoint(); - const int h = abs((int)boundingRect().height()); - const int w = abs((int)boundingRect().width()); + + const QSize cSize = cornerSize(); + const QSize fHeight = fullHeight(); + const QSize fWidth = fullWidth(); + const int h = fHeight.height(); + const int w = fWidth.width(); const int areaWidth = parentWidget()->size().width(); const int areaHeight = parentWidget()->size().height(); @@ -244,19 +263,16 @@ void ToolBox::mouseMoveEvent(QGraphicsSceneMouseEvent *event) distanceToLeft < distanceToBottom ) { x = 0; y = (newPos.y() - d->dragStartRelative.y()); - } - else if (distanceToRight < distanceToTop && distanceToRight < distanceToLeft && - distanceToRight < distanceToBottom) { + } else if (distanceToRight < distanceToTop && distanceToRight < distanceToLeft && + distanceToRight < distanceToBottom) { x = areaWidth - w; y = (newPos.y() - d->dragStartRelative.y()); - } - else if (distanceToTop < distanceToLeft && distanceToTop < distanceToRight && - distanceToTop < distanceToBottom ) { + } else if (distanceToTop < distanceToLeft && distanceToTop < distanceToRight && + distanceToTop < distanceToBottom ) { y = 0; x = (newPos.x() - d->dragStartRelative.x()); - } - else if (distanceToBottom < distanceToLeft && distanceToBottom < distanceToRight && - distanceToBottom < distanceToTop) { + } else if (distanceToBottom < distanceToLeft && distanceToBottom < distanceToRight && + distanceToBottom < distanceToTop) { y = areaHeight - h; x = (newPos.x() - d->dragStartRelative.x()); } @@ -267,29 +283,6 @@ void ToolBox::mouseMoveEvent(QGraphicsSceneMouseEvent *event) y = areaHeight/2 - d->dragStartRelative.y(); } - //kDebug() << "distances from borders" << (newPos - d->dragStartRelative) << distanceToLeft << distanceToRight << distanceToTop << distanceToBottom << "=>" << x << y; -/* - if (y == 0 || y + h >= areaHeight) { - x = curPos.x() + (newPos.x() - d->dragStart.x()); - if (x < 0) { - x = 0; - } else if (x + w > areaWidth) { - x = areaWidth - w; - } - } - - //kDebug() << x << w << areaWidth; - if (x == 0 || x + w >= areaWidth) { - //kDebug() << "moving along the y axis" << curPos << newPos << d->dragStart; - y = curPos.y() + (newPos.y() - d->dragStart.y()); - - if (y < 0) { - y = 0; - } else if (y + h > areaHeight) { - y = areaHeight - h; - } - } -*/ x = qBound(0, x, areaWidth - w); y = qBound(0, y, areaHeight - h); @@ -297,24 +290,30 @@ void ToolBox::mouseMoveEvent(QGraphicsSceneMouseEvent *event) if (x == 0) { if (y == 0) { newCorner = TopLeft; - } else if (y + h >= areaHeight) { + } else if (areaHeight - cSize.height() < newPos.y()) { + y = areaHeight - cSize.height(); newCorner = BottomLeft; } else { newCorner = Left; } } else if (y == 0) { - if (x + w >= areaWidth) { + if (areaWidth - cSize.width() < newPos.x()) { + x = areaWidth - cSize.width(); newCorner = TopRight; } else { newCorner = Top; } } else if (x + w >= areaWidth) { - if (y + h >= areaHeight) { + if (areaHeight - cSize.height() < newPos.y()) { + y = areaHeight - cSize.height(); + x = areaWidth - cSize.width(); newCorner = BottomRight; } else { + x = areaWidth - fHeight.width(); newCorner = Right; } } else { + y = areaHeight - fWidth.height(); newCorner = Bottom; } diff --git a/private/toolbox_p.h b/private/toolbox_p.h index 9c9934365..cd33add82 100644 --- a/private/toolbox_p.h +++ b/private/toolbox_p.h @@ -90,6 +90,10 @@ public: void load(const KConfigGroup &containmentGroup = KConfigGroup()); void reposition(); + virtual QSize fullWidth() const; + virtual QSize fullHeight() const; + virtual QSize cornerSize() const; + virtual void showToolBox() = 0; virtual void hideToolBox() = 0; public Q_SLOTS: @@ -112,6 +116,7 @@ protected Q_SLOTS: private: ToolBoxPrivate *d; + }; } // Plasma namespace From 48484719d3cf47f915f35b96ca4eb8c168d62ad6 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Thu, 30 Jul 2009 20:41:16 +0000 Subject: [PATCH 38/60] backport findInCache fix svn path=/branches/KDE/4.3/kdelibs/; revision=1004777 --- theme.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/theme.cpp b/theme.cpp index 76ca41837..b708b0a8b 100644 --- a/theme.cpp +++ b/theme.cpp @@ -664,10 +664,6 @@ bool Theme::useNativeWidgetStyle() const bool Theme::findInCache(const QString &key, QPixmap &pix) { if (d->useCache()) { - if (!d->keysToCache.contains(key)) { - return false; - } - const QString id = d->keysToCache[key]; if (d->pixmapsToCache.contains(id)) { pix = d->pixmapsToCache.value(id); From 2e033909628724b422ab4e15b14b01ce4d2e19d9 Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Fri, 31 Jul 2009 03:15:44 +0000 Subject: [PATCH 39/60] SVN_SILENT made messages (.desktop file) svn path=/branches/KDE/4.3/kdelibs/; revision=1004910 --- servicetypes/plasma-applet-popupapplet.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servicetypes/plasma-applet-popupapplet.desktop b/servicetypes/plasma-applet-popupapplet.desktop index 1c2b3d7a9..c4b428cfd 100644 --- a/servicetypes/plasma-applet-popupapplet.desktop +++ b/servicetypes/plasma-applet-popupapplet.desktop @@ -14,7 +14,7 @@ Comment[de]=Plasma-Skript-Miniprogramm Comment[el]=Αναδυόμενη μικροεφαρμογή σεναρίου plasma Comment[es]=Miniaplicación emergente de script para Plasma Comment[et]=Plasma skriptimise hüpikaplett -Comment[fr]=Applet de scripting Plasma +Comment[fr]=Applet de script Plasma Comment[gl]=Applet contextual de scripting de Plasma Comment[gu]=પ્લાઝમા સ્ક્રિપ્ટીંગ પોપઅપ એપ્લેટ Comment[hu]=Szkriptkezelő kisalkalmazás a Plasmához From 259db9bbd29461140e702039c7158a1ecf5bd198 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Fri, 31 Jul 2009 18:54:05 +0000 Subject: [PATCH 40/60] backport fixes to findInRectCache svn path=/branches/KDE/4.3/kdelibs/; revision=1005297 --- theme.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/theme.cpp b/theme.cpp index b708b0a8b..20f10c797 100644 --- a/theme.cpp +++ b/theme.cpp @@ -721,9 +721,9 @@ bool Theme::findInRectsCache(const QString &image, const QString &element, QRect return true; } - //A single _ means the element is empty and we're asked for the size of + //Name starting by _ means the element is empty and we're asked for the size of //the whole image, so the whole image is never invalid - if (element.count('_') == 1) { + if (element.indexOf('_') <= 0) { return false; } From 9e6bdba5929856b5ade22ae38d2fcc706d8d5a14 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Fri, 31 Jul 2009 18:59:45 +0000 Subject: [PATCH 41/60] backport disk cache sync in releaseRectsCache svn path=/branches/KDE/4.3/kdelibs/; revision=1005305 --- theme.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/theme.cpp b/theme.cpp index 20f10c797..97275535b 100644 --- a/theme.cpp +++ b/theme.cpp @@ -776,6 +776,8 @@ void Theme::releaseRectsCache(const QString &image) { QHash >::iterator it = d->invalidElements.find(image); if (it != d->invalidElements.end()) { + KConfigGroup imageGroup(d->svgElementsCache, it.key()); + imageGroup.writeEntry("invalidElements", it.value().toList()); d->invalidElements.erase(it); } } From 9a7c26958fd57f2530c463edf5e96c11c8206647 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Sun, 2 Aug 2009 18:27:44 +0000 Subject: [PATCH 42/60] return a dummy group when we have no description set up; prevents crashes when the operations file is not available CCBUG:200475 svn path=/branches/KDE/4.3/kdelibs/; revision=1005967 --- private/service_p.h | 17 +++++++++++++++++ service.cpp | 8 +++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/private/service_p.h b/private/service_p.h index c345f2ac7..8145cbe5e 100644 --- a/private/service_p.h +++ b/private/service_p.h @@ -73,6 +73,7 @@ public: ServicePrivate(Service *service) : q(service), config(0), + dummyConfig(0), tempFile(0) { } @@ -80,6 +81,7 @@ public: ~ServicePrivate() { delete config; + delete dummyConfig; delete tempFile; } @@ -98,10 +100,25 @@ public: associatedGraphicsWidgets.remove(static_cast(obj)); } + KConfigGroup dummyGroup() + { + if (!dummyConfig) { + if (!tempFile) { + tempFile = new KTemporaryFile; + tempFile->open(); + } + + dummyConfig = new KConfig(tempFile->fileName()); + } + + return KConfigGroup(dummyConfig, "DummyGroup"); + } + Service *q; QString destination; QString name; ConfigLoader *config; + KConfig *dummyConfig; KTemporaryFile *tempFile; QMultiHash associatedWidgets; QMultiHash associatedGraphicsWidgets; diff --git a/service.cpp b/service.cpp index fc96913f8..f23e26ed5 100644 --- a/service.cpp +++ b/service.cpp @@ -116,7 +116,7 @@ KConfigGroup Service::operationDescription(const QString &operationName) { if (!d->config) { kDebug() << "No valid operations scheme has been registered"; - return KConfigGroup(); + return d->dummyGroup(); } d->config->writeConfig(); @@ -212,6 +212,9 @@ void Service::setName(const QString &name) delete d->tempFile; d->tempFile = 0; + delete d->dummyConfig; + d->dummyConfig = 0; + registerOperationsScheme(); } @@ -258,6 +261,9 @@ void Service::setOperationsScheme(QIODevice *xml) delete d->config; delete d->tempFile; + delete d->dummyConfig; + d->dummyConfig = 0; + //FIXME: make KSharedConfig and KConfigSkeleton not braindamaged in 4.2 and then get rid of the // temp file object here d->tempFile = new KTemporaryFile; From 90b120b01c21275f713d385bc263693f2a0a1acf Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Tue, 4 Aug 2009 19:14:59 +0000 Subject: [PATCH 43/60] use value instead of [] to avoid empty or uninteresting elements in the collection svn path=/branches/KDE/4.3/kdelibs/; revision=1006950 --- theme.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/theme.cpp b/theme.cpp index 97275535b..22f03aeb8 100644 --- a/theme.cpp +++ b/theme.cpp @@ -664,7 +664,7 @@ bool Theme::useNativeWidgetStyle() const bool Theme::findInCache(const QString &key, QPixmap &pix) { if (d->useCache()) { - const QString id = d->keysToCache[key]; + const QString id = d->keysToCache.value(key); if (d->pixmapsToCache.contains(id)) { pix = d->pixmapsToCache.value(id); return true; From 4a5315e3d3a7d62a7c396c8297293caac05021a9 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Tue, 4 Aug 2009 20:01:28 +0000 Subject: [PATCH 44/60] backport the proper behaviour for this function svn path=/branches/KDE/4.3/kdelibs/; revision=1006976 --- theme.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/theme.cpp b/theme.cpp index 22f03aeb8..7b2e72ff1 100644 --- a/theme.cpp +++ b/theme.cpp @@ -680,7 +680,7 @@ bool Theme::findInCache(const QString &key, QPixmap &pix) bool Theme::findInCache(const QString &key, QPixmap &pix, unsigned int lastModified) { if (d->useCache() && lastModified > d->pixmapCache->timestamp()) { - d->discardCache(true); + return false; } return findInCache(key, pix); From 52dc55f769f319b4f151ee142a66e5cb465696be Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Tue, 4 Aug 2009 21:21:54 +0000 Subject: [PATCH 45/60] backport the overlay caching fix svn path=/branches/KDE/4.3/kdelibs/; revision=1007006 --- framesvg.cpp | 27 ++++++++++++++++++--------- private/framesvg_p.h | 1 + 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/framesvg.cpp b/framesvg.cpp index f7b488061..85d2dd1d5 100644 --- a/framesvg.cpp +++ b/framesvg.cpp @@ -394,8 +394,9 @@ void FrameSvgPrivate::generateBackground(FrameData *frame) QString id = QString::fromLatin1("%5_%4_%3_%2_%1_"). arg(frame->enabledBorders).arg(size.width()).arg(size.height()).arg(prefix).arg(q->imagePath()); + + Theme *theme = Theme::defaultTheme(); if (q->isUsingRenderingCache()) { - Theme *theme = Theme::defaultTheme(); if (theme->findInCache(id, frame->cachedBackground) && !frame->cachedBackground.isNull()) { return; } @@ -557,10 +558,16 @@ void FrameSvgPrivate::generateBackground(FrameData *frame) } } + + //Overlays - if (!prefix.startsWith("mask-") && q->hasElement(prefix+"overlay")) { + QSize overlaySize; + frame->cachedOverlay = QPixmap(); + if (!prefix.startsWith("mask-") && q->hasElement(prefix+"overlay") && + !theme->findInCache(id, frame->cachedOverlay) && + frame->cachedOverlay.isNull()) { QPoint pos = QPoint(0, 0); - QSize overlaySize = q->elementSize(prefix+"overlay"); + overlaySize = q->elementSize(prefix+"overlay"); //Random pos, stretched and tiled are mutually exclusive if (q->hasElement(prefix + "hint-overlay-random-pos")) { @@ -577,8 +584,8 @@ void FrameSvgPrivate::generateBackground(FrameData *frame) } } - QPixmap overlay = q->alphaMask(); - QPainter overlayPainter(&overlay); + frame->cachedOverlay = q->alphaMask(); + QPainter overlayPainter(&frame->cachedOverlay); overlayPainter.setCompositionMode(QPainter::CompositionMode_SourceIn); //Tiling? if (q->hasElement(prefix+"hint-overlay-tile-horizontal") || @@ -593,12 +600,14 @@ void FrameSvgPrivate::generateBackground(FrameData *frame) q->paint(&overlayPainter, QRect(overlayPos, overlaySize), prefix+"overlay"); } overlayPainter.end(); - - p.setCompositionMode(QPainter::CompositionMode_SourceOver); - p.drawPixmap(overlayPos, overlay, QRect(overlayPos, overlaySize)); } cacheFrame(prefix); + + if (!frame->cachedOverlay.isNull()) { + p.setCompositionMode(QPainter::CompositionMode_SourceOver); + p.drawPixmap(overlayPos, frame->cachedOverlay, QRect(overlayPos, overlaySize)); + } } @@ -627,7 +636,7 @@ void FrameSvgPrivate::cacheFrame(const QString &prefixToSave) id = QString::fromLatin1("overlay_%7_%6_%5_%4_%3_%2_%1_"). arg(overlayPos.y()).arg(overlayPos.x()).arg(frame->enabledBorders).arg(size.width()).arg(size.height()).arg(prefixToSave).arg(q->imagePath()); - Theme::defaultTheme()->insertIntoCache(id, frame->cachedBackground, QString::number((qint64)q, 16)+prefixToSave+"overlay"); + Theme::defaultTheme()->insertIntoCache(id, frame->cachedOverlay, QString::number((qint64)q, 16)+prefixToSave+"overlay"); } void FrameSvgPrivate::updateSizes() diff --git a/private/framesvg_p.h b/private/framesvg_p.h index 3bb54ff4d..aa681206e 100644 --- a/private/framesvg_p.h +++ b/private/framesvg_p.h @@ -68,6 +68,7 @@ public: FrameSvg::EnabledBorders enabledBorders; QPixmap cachedBackground; + QPixmap cachedOverlay; QRegion cachedMask; QSize frameSize; From 7e39818ee2ed64f2bbc739141ccd73b4cae5d5ca Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Wed, 5 Aug 2009 04:49:56 +0000 Subject: [PATCH 46/60] QDebug is not marked as re-entrant or thread safe and seems to cause crashses for some when used from the wallpaper rendering threads, so let's just remove t hose lines :) CCBUG:202538 svn path=/branches/KDE/4.3/kdelibs/; revision=1007068 --- private/wallpaperrenderthread.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/private/wallpaperrenderthread.cpp b/private/wallpaperrenderthread.cpp index 2b609a2fc..38d74c01a 100644 --- a/private/wallpaperrenderthread.cpp +++ b/private/wallpaperrenderthread.cpp @@ -135,7 +135,7 @@ void WallpaperRenderThread::run() // otherwise, use the natural size of the loaded image img = QImage(file); imgSize = img.size(); - kDebug() << "loaded with" << imgSize << ratio; + //kDebug() << "loaded with" << imgSize << ratio; } // if any of them is zero we may run into a div-by-zero below. @@ -229,7 +229,7 @@ void WallpaperRenderThread::run() } QPainter p(&result); - kDebug() << token << scalable << scaledSize << imgSize; + //kDebug() << token << scalable << scaledSize << imgSize; if (scalable) { // tiling is ignored for scalable wallpapers QSvgRenderer svg(file); From 57494bd355454e02846b3d49aef8a3eeacc564fd Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Sat, 8 Aug 2009 13:12:29 +0000 Subject: [PATCH 47/60] backport: don't draw the rectangle if there is no room for text svn path=/branches/KDE/4.3/kdelibs/; revision=1008831 --- widgets/iconwidget.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/widgets/iconwidget.cpp b/widgets/iconwidget.cpp index 53c0a7130..6adb6c2fd 100644 --- a/widgets/iconwidget.cpp +++ b/widgets/iconwidget.cpp @@ -984,7 +984,8 @@ void IconWidget::paint(QPainter *painter, const QStyleOptionGraphicsItem *option if (d->textBgColor != QColor() && - !(d->text.isEmpty() && d->infoText.isEmpty())) { + !(d->text.isEmpty() && d->infoText.isEmpty()) && + !textBoundingRect.isEmpty()) { QRectF rect = textBoundingRect.adjusted(-2, -2, 4, 4); painter->setPen(Qt::transparent); QColor color = d->textBgColor; From c2482beebe1ed961d0875f87d5d51d5fda6f3933 Mon Sep 17 00:00:00 2001 From: David Jarvie Date: Mon, 10 Aug 2009 01:03:53 +0000 Subject: [PATCH 48/60] Minor apidox corrections svn path=/branches/KDE/4.3/kdelibs/; revision=1009444 --- containment.h | 2 +- extender.h | 6 +++--- extenderitem.h | 2 +- private/extenderapplet_p.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/containment.h b/containment.h index 80e6aec3c..82b1ea753 100644 --- a/containment.h +++ b/containment.h @@ -424,7 +424,7 @@ class PLASMA_EXPORT Containment : public Applet public Q_SLOTS: /** * Informs the Corona as to what position it is in. This is informational - * only, as the Corona doesn't change it's actual location. This is, + * only, as the Corona doesn't change its actual location. This is, * however, passed on to Applets that may be managed by this Corona. * * @param location the new location of this Corona diff --git a/extender.h b/extender.h index c05a9ac21..e59f3b167 100644 --- a/extender.h +++ b/extender.h @@ -163,7 +163,7 @@ class PLASMA_EXPORT Extender : public QGraphicsWidget bool isEmpty() const; /** - * Use this function to instruct the extender on how to render it's items. Usually you will + * Use this function to instruct the extender on how to render its items. Usually you will * want to call this function in your applet's constraintsEvent, allthough this is already * done for you when using PopupApplet as base class for your applet. Defaults to NoBorders. * @param appearance the way this extender should look. @@ -233,8 +233,8 @@ class PLASMA_EXPORT Extender : public QGraphicsWidget /** * This function get's called on every item to determine which background border's to * render. - * @param item the item for which it's position or extender has changed. - * @return the borders that have to be enabled on it's background. + * @param item the item for which its position or extender has changed. + * @return the borders that have to be enabled on its background. */ virtual FrameSvg::EnabledBorders enabledBordersForItem(ExtenderItem *item) const; diff --git a/extenderitem.h b/extenderitem.h index 182b853f0..5cfdcdac3 100644 --- a/extenderitem.h +++ b/extenderitem.h @@ -203,7 +203,7 @@ class PLASMA_EXPORT ExtenderItem : public QGraphicsWidget uint autoExpireDelay() const; /** - * @return whether or not this item is detached from it's original source. + * @return whether or not this item is detached from its original source. */ bool isDetached() const; diff --git a/private/extenderapplet_p.h b/private/extenderapplet_p.h index fb3274b06..7346deffe 100644 --- a/private/extenderapplet_p.h +++ b/private/extenderapplet_p.h @@ -28,7 +28,7 @@ namespace Plasma /** * This class is used as a 'host' for detached extender items. When an extender item is dropped * somewhere, this applet is added at the location where the item is dropped, and the item is added - * to it's extender. + * to its extender. */ class ExtenderApplet : public Plasma::PopupApplet { From edce038ff354062dd6dc336808170c7d2379b2ed Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Tue, 11 Aug 2009 03:16:01 +0000 Subject: [PATCH 49/60] SVN_SILENT made messages (.desktop file) svn path=/branches/KDE/4.3/kdelibs/; revision=1009871 --- servicetypes/plasma-applet-popupapplet.desktop | 1 + 1 file changed, 1 insertion(+) diff --git a/servicetypes/plasma-applet-popupapplet.desktop b/servicetypes/plasma-applet-popupapplet.desktop index c4b428cfd..b9ac08631 100644 --- a/servicetypes/plasma-applet-popupapplet.desktop +++ b/servicetypes/plasma-applet-popupapplet.desktop @@ -34,6 +34,7 @@ Comment[pl]=Aplet Plazmy do skryptów Comment[pt]='Applet' de programação do Plasma Comment[pt_BR]=Miniaplicativo de script do Plasma Comment[ro]=Miniaplicație Plasma de indicii ale scripturilor +Comment[ru]=Аплет программируемого контекстного окна Plasma Comment[sl]=Plasma skriptni pojavni programček Comment[sr]=Плазма скриптовани искачући аплет Comment[sr@latin]=Plasma skriptovani iskačući aplet From 6f55526efd8e2560f39d136202e2dbf8dab9d5c9 Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Thu, 13 Aug 2009 03:15:41 +0000 Subject: [PATCH 50/60] SVN_SILENT made messages (.desktop file) svn path=/branches/KDE/4.3/kdelibs/; revision=1010637 --- tests/packagemetadatatest.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/packagemetadatatest.desktop b/tests/packagemetadatatest.desktop index 905929244..95a348333 100644 --- a/tests/packagemetadatatest.desktop +++ b/tests/packagemetadatatest.desktop @@ -86,7 +86,7 @@ Comment[km]=ឯកសារ​ផ្ទៃតុ​សាកល្បង​ ដ Comment[kn]=PackageMetaData ವರ್ಗವನ್ನು ಪರೀಕ್ಷಿಸಲು ಒಂದು ಪರೀಕ್ಷಾರ್ಥ ಗಣಕತೆರೆ ಕಡತ. Comment[ko]=PackageMetaData 클래스를 테스트하는 데스크톱 파일. Comment[ku]=Pela ceribandina sermasê ku beşên SerDanayêPakêtê diceribîne. -Comment[lv]=Testa .dekstop fails lai pārbaudītu PackageMetaData klasi. +Comment[lv]=Testa .dekstop fails, lai pārbaudītu PackageMetaData klasi. Comment[mai]=PackageMetaData वर्गक जाँचबाक लेल एकटा जाँचि डेस्कटाप फाइल. Comment[ml]=പാക്കേജ്മെറ്റാഡാറ്റാ ക്ലാസ് പരിശോധിയ്ക്കാനുള്ള പരിശോധനാ പണിയിട ഫയല്‍. Comment[nb]=En skrivebordsfil med testdata for klassen PackageMetaData. From 7c1aca184c41b223f523720bff81ddefb14c8fcc Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Fri, 14 Aug 2009 03:18:42 +0000 Subject: [PATCH 51/60] SVN_SILENT made messages (.desktop file) svn path=/branches/KDE/4.3/kdelibs/; revision=1011221 --- servicetypes/plasma-animator.desktop | 1 + servicetypes/plasma-applet-extenderapplet.desktop | 1 + servicetypes/plasma-applet-popupapplet.desktop | 1 + servicetypes/plasma-containment.desktop | 1 + servicetypes/plasma-dataengine.desktop | 1 + servicetypes/plasma-packagestructure.desktop | 1 + servicetypes/plasma-runner.desktop | 1 + servicetypes/plasma-scriptengine.desktop | 1 + servicetypes/plasma-wallpaper.desktop | 1 + tests/packagemetadatatest.desktop | 2 ++ tests/testengine/plasma-dataengine-testengine.desktop | 1 + 11 files changed, 12 insertions(+) diff --git a/servicetypes/plasma-animator.desktop b/servicetypes/plasma-animator.desktop index 7f926871f..e6433d3b1 100644 --- a/servicetypes/plasma-animator.desktop +++ b/servicetypes/plasma-animator.desktop @@ -25,6 +25,7 @@ Comment[gl]=Motor de animación de Plasma Comment[gu]=પ્લાઝમા એનિમેશન એન્જિન Comment[he]=מנוע אנימציה של Plasma Comment[hne]=प्लाज्मा एनिमेशन इंजिन +Comment[hr]=Plasmin animatorski mehanizam Comment[hsb]=Plasma-engine za animacije Comment[hu]=Plasma animációkezelő Comment[is]=Plasma hreyfingastjóri diff --git a/servicetypes/plasma-applet-extenderapplet.desktop b/servicetypes/plasma-applet-extenderapplet.desktop index ecdd702b1..869466f0c 100644 --- a/servicetypes/plasma-applet-extenderapplet.desktop +++ b/servicetypes/plasma-applet-extenderapplet.desktop @@ -16,6 +16,7 @@ Name[gl]=Colección Name[gu]=ભંડોળ Name[he]=אוסף Name[hi]=शब्द पूर्णता +Name[hr]=Kolekcija Name[hu]=Gyűjtemény Name[is]=Safn Name[it]=Collezione diff --git a/servicetypes/plasma-applet-popupapplet.desktop b/servicetypes/plasma-applet-popupapplet.desktop index b9ac08631..5216e5975 100644 --- a/servicetypes/plasma-applet-popupapplet.desktop +++ b/servicetypes/plasma-applet-popupapplet.desktop @@ -17,6 +17,7 @@ Comment[et]=Plasma skriptimise hüpikaplett Comment[fr]=Applet de script Plasma Comment[gl]=Applet contextual de scripting de Plasma Comment[gu]=પ્લાઝમા સ્ક્રિપ્ટીંગ પોપઅપ એપ્લેટ +Comment[hr]=Plasmin skriptni skočni applet Comment[hu]=Szkriptkezelő kisalkalmazás a Plasmához Comment[is]=Plasma smáforrit fyrir skriftun Comment[it]=Applet Plasma scripting a comparsa diff --git a/servicetypes/plasma-containment.desktop b/servicetypes/plasma-containment.desktop index e533a8b14..2852091d0 100644 --- a/servicetypes/plasma-containment.desktop +++ b/servicetypes/plasma-containment.desktop @@ -24,6 +24,7 @@ Comment[gl]=Un contedor de applet de Plasma e pintor do fondo Comment[gu]=પ્લાઝમા એપ્લેટ ધરાવનાર અને પાશ્ચભાગ રંગનાર Comment[he]=תוחם של יישומון Plasma וצובע הרקע Comment[hne]=प्लाज्मा एपलेट कंटेनर अउ पिछोत अंगना पुतइया +Comment[hr]=Spremnik za Plasmin applet i crtač pozadine Comment[hsb]=Plasma-container za applet a molowadło pozadka Comment[hu]=Tartóelem és háttérrajzoló Plasma-kisalkalmazásokhoz Comment[is]=Grunnur fyrir Plasma smáforrit og bakgrunnslitun diff --git a/servicetypes/plasma-dataengine.desktop b/servicetypes/plasma-dataengine.desktop index a8cf0e367..105c13edb 100644 --- a/servicetypes/plasma-dataengine.desktop +++ b/servicetypes/plasma-dataengine.desktop @@ -25,6 +25,7 @@ Comment[gl]=Motor de dados de plasma Comment[gu]=પ્લાઝમા માહિતી એન્જિન Comment[he]=מנוע מידע עבור Plasma Comment[hne]=प्लाज्मा डाटा इंजिन +Comment[hr]=Plasmin podaktovni mehanizam Comment[hsb]=Datowa engine za Plasma Comment[hu]=Plasma adatkezelő Comment[is]=Plasma gagnavél diff --git a/servicetypes/plasma-packagestructure.desktop b/servicetypes/plasma-packagestructure.desktop index 988f4d094..d0413183d 100644 --- a/servicetypes/plasma-packagestructure.desktop +++ b/servicetypes/plasma-packagestructure.desktop @@ -23,6 +23,7 @@ Comment[gl]=Definición da estrutura do paquete de Plasma Comment[gu]=પ્લાઝમા પેકેજ માળખાંની વ્યાખ્યા Comment[he]=הגדרת מבנה של חבילת Plasma Comment[hne]=प्लाज्मा पैकेज स्ट्रक्चर परिभासा +Comment[hr]=Plasmina definicija strukture paketa Comment[hsb]=Strukturna definicija Plasma-pakćika Comment[hu]=Struktúraleíró Plasma-csomagokhoz Comment[is]=Skilgreiningar Plasma pakkauppbyggingar diff --git a/servicetypes/plasma-runner.desktop b/servicetypes/plasma-runner.desktop index 007beaf4a..a0b4375dc 100644 --- a/servicetypes/plasma-runner.desktop +++ b/servicetypes/plasma-runner.desktop @@ -26,6 +26,7 @@ Comment[gu]=KRunner પ્લગઈન Comment[he]=תוסף KRunner Comment[hi]=केरन्नर प्लगइन Comment[hne]=के-रनरइट प्लगइन +Comment[hr]=Priključak Krunner Comment[hu]=KRunner-bővítmény Comment[is]=KRunner íforrit Comment[it]=Plugin KRunner diff --git a/servicetypes/plasma-scriptengine.desktop b/servicetypes/plasma-scriptengine.desktop index bab4dbf6b..61fb4932f 100644 --- a/servicetypes/plasma-scriptengine.desktop +++ b/servicetypes/plasma-scriptengine.desktop @@ -24,6 +24,7 @@ Comment[gl]=Extensión de linguaxe de scripting para Plasma Comment[gu]=પ્લાઝમા માટે સ્ક્રિપ્ટીંગ ભાષા એક્સટેન્શન Comment[he]=הרחבת שפת תסריטים של Plasma Comment[hne]=प्लाज्मा बर स्क्रिप्टिंग भाखा +Comment[hr]=Proširenje Plasme za skriptne jezike Comment[hsb]=Skriptowa rěč jako Plasma-ekstensija Comment[hu]=Szkriptkezelő bővítmény a Plasmához Comment[is]=Framlenging á skriftunarmál fyrir Plasma diff --git a/servicetypes/plasma-wallpaper.desktop b/servicetypes/plasma-wallpaper.desktop index cbe52a7b1..4f8d6f1f0 100644 --- a/servicetypes/plasma-wallpaper.desktop +++ b/servicetypes/plasma-wallpaper.desktop @@ -25,6 +25,7 @@ Comment[gl]=Fondo de escritorio de Plasma Comment[gu]=પ્લાઝમા વોલપેપર Comment[he]=תמונת רקע של Plasma Comment[hne]=प्लाज्मा वालपेपर +Comment[hr]=Plasmina pozadinska slika Comment[hsb]=Tapeta za Plasma Comment[hu]=Plasma háttérkép Comment[is]=Plasma veggfóður diff --git a/tests/packagemetadatatest.desktop b/tests/packagemetadatatest.desktop index 95a348333..2000ca60e 100644 --- a/tests/packagemetadatatest.desktop +++ b/tests/packagemetadatatest.desktop @@ -20,6 +20,7 @@ Name[gl]=Ficheiro de proba de metadatos de paquete Name[gu]=પેકેજ મેટાડેટા ચકાસણી ફાઇલ Name[he]=חבילת בדיקה של מטה־מידע Name[hne]=पैकेज मेटाडाटा जांच फाइल +Name[hr]=Paketna, metapodatkovna, probna datoteka Name[hsb]=Testowa dataja za metadata pakćika Name[hu]=PackageMetaData tesztfájl Name[is]=Package metagagna prófunarskrá @@ -78,6 +79,7 @@ Comment[gl]=Un ficheiro de escritorio de proba para probar a clase PackageMetaDa Comment[gu]=પેકેજમેટાડેટા વર્ગ ચકાસવા માટે ચકાસણી ડેસ્કટોપ ફાઇલ. Comment[he]=קובץ desktop לבדיקה של מחלקה PackageMetaData. Comment[hne]=पैकेज मेटाडाटा क्लास ल जांचे बर जांच डेस्कटाप फाइल +Comment[hr]=Probna desktop datoteka za isprobavanje klase PackageMetaData. Comment[hsb]=Testowa dataja za dźěłowy powjerch za testowanje klasy PackageMetaData. Comment[hu]=Tesztfájl a PackageMetaData osztályhoz. Comment[is]=Skjáborðsskrá til prófunar á PackageMetaData class diff --git a/tests/testengine/plasma-dataengine-testengine.desktop b/tests/testengine/plasma-dataengine-testengine.desktop index 14ce9392a..d20de84e7 100644 --- a/tests/testengine/plasma-dataengine-testengine.desktop +++ b/tests/testengine/plasma-dataengine-testengine.desktop @@ -23,6 +23,7 @@ Name[gl]=Motor de datos de probas Name[gu]=ચકાસણી માહિતી એન્જિન Name[he]=בדיקה למנוע מידע Name[hne]=जांच डाटा इंजिन +Name[hr]=Provjeri podatkovni mehanizam Name[hu]=Az adatkezelő modul tesztje Name[is]=Gagnaprófunarvél Name[it]=Motore dati di prova From 8e3cd5be721e0fbdba39e202378c2773051923a3 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Sun, 16 Aug 2009 20:16:28 +0000 Subject: [PATCH 52/60] backport setorientation fix svn path=/branches/KDE/4.3/kdelibs/; revision=1012111 --- widgets/scrollbar.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/widgets/scrollbar.cpp b/widgets/scrollbar.cpp index 67b6b1138..69f371eaf 100644 --- a/widgets/scrollbar.cpp +++ b/widgets/scrollbar.cpp @@ -108,12 +108,14 @@ QString ScrollBar::styleSheet() QScrollBar *ScrollBar::nativeWidget() const { - return static_cast(widget()); + return static_cast(widget()); } void ScrollBar::setOrientation(Qt::Orientation orientation) { - static_cast(widget())->setOrientation(orientation); + QScrollBar *native = static_cast(widget()); + native->setOrientation(orientation); + resize(native->sizeHint()); } } From 0300c7e7af975fed2cdddddd9142b72106175541 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Mon, 17 Aug 2009 23:41:59 +0000 Subject: [PATCH 53/60] prevent full screen repaints when applet handles are removed svn path=/branches/KDE/4.3/kdelibs/; revision=1012693 --- containment.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/containment.cpp b/containment.cpp index 3bb43be8c..c8b8dffce 100644 --- a/containment.cpp +++ b/containment.cpp @@ -1743,6 +1743,9 @@ void ContainmentPrivate::handleDisappeared(AppletHandle *handle) if (handles.contains(handle->applet())) { handles.remove(handle->applet()); handle->detachApplet(); + if (q->scene()) { + q->scene()->removeItem(handle); + } handle->deleteLater(); } } @@ -1789,6 +1792,11 @@ void ContainmentPrivate::containmentConstraintsEvent(Plasma::Constraints constra foreach (AppletHandle *handle, h) { handle->disconnect(q); + + if (q->scene()) { + q->scene()->removeItem(handle); + } + handle->deleteLater(); } } @@ -1870,6 +1878,9 @@ void ContainmentPrivate::appletDestroyed(Plasma::Applet *applet) if (handles.contains(applet)) { AppletHandle *handle = handles.value(applet); handles.remove(applet); + if (q->scene()) { + q->scene()->removeItem(handle); + } handle->deleteLater(); } From fca66bfd9e2ef020c0072d2f6520ae04c9a6c959 Mon Sep 17 00:00:00 2001 From: Richard Dale Date: Thu, 20 Aug 2009 18:20:31 +0000 Subject: [PATCH 54/60] * Add a Plasma::AppletScript::addStandardConfigurationPages() method that adds standard pages to a configuration dialog such as the shortcuts one. In conjunction with standardConfigurationDialog() this will allow script engines to use the same dialogs as C++ applets svn path=/branches/KDE/4.3/kdelibs/; revision=1013766 --- applet.cpp | 18 +++++++++--------- scripting/appletscript.cpp | 9 +++++++++ scripting/appletscript.h | 6 ++++++ 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/applet.cpp b/applet.cpp index 2f070b2ca..dcec55a58 100644 --- a/applet.cpp +++ b/applet.cpp @@ -1584,13 +1584,14 @@ void Applet::showConfigurationInterface() } d->addGlobalShortcutsPage(dialog); - connect(dialog, SIGNAL(applyClicked()), this, SLOT(configDialogFinished())); - connect(dialog, SIGNAL(okClicked()), this, SLOT(configDialogFinished())); dialog->show(); } else if (d->script) { d->script->showConfigurationInterface(); } else { - d->generateGenericConfigDialog()->show(); + KConfigDialog *dialog = d->generateGenericConfigDialog(); + createConfigurationInterface(dialog); + d->addGlobalShortcutsPage(dialog); + dialog->show(); } emit releaseVisualFocus(); @@ -1640,12 +1641,6 @@ KConfigDialog *AppletPrivate::generateGenericConfigDialog() dialog->setFaceType(KPageDialog::Auto); dialog->setWindowTitle(configWindowTitle()); dialog->setAttribute(Qt::WA_DeleteOnClose, true); - q->createConfigurationInterface(dialog); - addGlobalShortcutsPage(dialog); - //TODO: Apply button does not correctly work for now, so do not show it - dialog->showButton(KDialog::Apply, false); - QObject::connect(dialog, SIGNAL(applyClicked()), q, SLOT(configDialogFinished())); - QObject::connect(dialog, SIGNAL(okClicked()), q, SLOT(configDialogFinished())); QObject::connect(dialog, SIGNAL(finished()), nullManager, SLOT(deleteLater())); return dialog; } @@ -1668,6 +1663,11 @@ void AppletPrivate::addGlobalShortcutsPage(KConfigDialog *dialog) layout->addWidget(shortcutEditor); layout->addStretch(); dialog->addPage(page, i18n("Keyboard Shortcut"), "preferences-desktop-keyboard"); + + //TODO: Apply button does not correctly work for now, so do not show it + dialog->showButton(KDialog::Apply, false); + QObject::connect(dialog, SIGNAL(applyClicked()), q, SLOT(configDialogFinished())); + QObject::connect(dialog, SIGNAL(okClicked()), q, SLOT(configDialogFinished())); } void AppletPrivate::clearShortcutEditorPtr() diff --git a/scripting/appletscript.cpp b/scripting/appletscript.cpp index 0016c40d0..1ede3e02c 100644 --- a/scripting/appletscript.cpp +++ b/scripting/appletscript.cpp @@ -140,6 +140,15 @@ KConfigDialog *AppletScript::standardConfigurationDialog() return 0; } +void AppletScript::addStandardConfigurationPages(KConfigDialog *dialog) +{ + if (applet()) { + return applet()->d->addGlobalShortcutsPage(dialog); + } + + return; +} + void AppletScript::configChanged() { } diff --git a/scripting/appletscript.h b/scripting/appletscript.h index 33f920d93..c2a750795 100644 --- a/scripting/appletscript.h +++ b/scripting/appletscript.h @@ -180,6 +180,12 @@ protected: */ KConfigDialog *standardConfigurationDialog(); + /** + * This method should be called after a scripting applet has added + * its own pages to a configuration dialog + */ + void addStandardConfigurationPages(KConfigDialog *dialog); + private: AppletScriptPrivate *const d; }; From b2347560cb778ce9af6c9c4c00de0041dab55042 Mon Sep 17 00:00:00 2001 From: Richard Dale Date: Thu, 20 Aug 2009 18:26:37 +0000 Subject: [PATCH 55/60] * Don't return values from void methods.. svn path=/branches/KDE/4.3/kdelibs/; revision=1013774 --- scripting/appletscript.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripting/appletscript.cpp b/scripting/appletscript.cpp index 1ede3e02c..f1a1bfde9 100644 --- a/scripting/appletscript.cpp +++ b/scripting/appletscript.cpp @@ -143,7 +143,7 @@ KConfigDialog *AppletScript::standardConfigurationDialog() void AppletScript::addStandardConfigurationPages(KConfigDialog *dialog) { if (applet()) { - return applet()->d->addGlobalShortcutsPage(dialog); + applet()->d->addGlobalShortcutsPage(dialog); } return; From b69cfdea57781e77acd9a1702b55ec853aec9d14 Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Fri, 21 Aug 2009 07:41:01 +0000 Subject: [PATCH 56/60] Backport: fix mem leak svn path=/branches/KDE/4.3/kdelibs/; revision=1013908 --- scripting/runnerscript.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripting/runnerscript.cpp b/scripting/runnerscript.cpp index b40b18a52..9c0d9d17a 100644 --- a/scripting/runnerscript.cpp +++ b/scripting/runnerscript.cpp @@ -39,7 +39,7 @@ RunnerScript::RunnerScript(QObject *parent) RunnerScript::~RunnerScript() { -// delete d; + delete d; } void RunnerScript::setRunner(AbstractRunner *runner) From e83e62493f9e44baba155c84505ed1cd16d89e45 Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Fri, 21 Aug 2009 07:41:48 +0000 Subject: [PATCH 57/60] Backport: fix mem leak svn path=/branches/KDE/4.3/kdelibs/; revision=1013909 --- scripting/dataenginescript.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripting/dataenginescript.cpp b/scripting/dataenginescript.cpp index 89b7deb24..880694002 100644 --- a/scripting/dataenginescript.cpp +++ b/scripting/dataenginescript.cpp @@ -39,7 +39,7 @@ DataEngineScript::DataEngineScript(QObject *parent) DataEngineScript::~DataEngineScript() { -// delete d; + delete d; } void DataEngineScript::setDataEngine(DataEngine *dataEngine) From 70835d7df41ac7cfdaf3cb3075bc4fe02d9dfac1 Mon Sep 17 00:00:00 2001 From: Richard Dale Date: Fri, 21 Aug 2009 14:51:58 +0000 Subject: [PATCH 58/60] * Add a '@since 4.3.1' tag to addStandardConfigurationPages(). Thanks to Stephan Binner for pointing out it was missing svn path=/branches/KDE/4.3/kdelibs/; revision=1014128 --- scripting/appletscript.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripting/appletscript.h b/scripting/appletscript.h index c2a750795..f57c88b4d 100644 --- a/scripting/appletscript.h +++ b/scripting/appletscript.h @@ -183,6 +183,8 @@ protected: /** * This method should be called after a scripting applet has added * its own pages to a configuration dialog + * + * @since 4.3.1 */ void addStandardConfigurationPages(KConfigDialog *dialog); From 0d117b4792f8f264012253c4285e878ce93d89fe Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Sat, 22 Aug 2009 20:50:23 +0000 Subject: [PATCH 59/60] backport sizing fixes svn path=/branches/KDE/4.3/kdelibs/; revision=1014444 --- private/applethandle.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/private/applethandle.cpp b/private/applethandle.cpp index 22e4613d8..d7f5e898b 100644 --- a/private/applethandle.cpp +++ b/private/applethandle.cpp @@ -654,11 +654,20 @@ void AppletHandle::mouseMoveEvent(QGraphicsSceneMouseEvent *event) // get size limits QSizeF min = m_applet->minimumSize(); QSizeF max = m_applet->maximumSize(); + + if (min.isEmpty()) { + min = m_applet->effectiveSizeHint(Qt::MinimumSize); + } + + if (max.isEmpty()) { + max = m_applet->effectiveSizeHint(Qt::MaximumSize); + } + // If the applet doesn't have a minimum size, calculate based on a // minimum content area size of 16x16 (KIconLoader::SizeSmall) - if (min.isEmpty()) { - min = m_applet->boundingRect().size() - m_applet->boundingRect().size(); - min += QSizeF(KIconLoader::SizeSmall, KIconLoader::SizeSmall); + if (1||min.isEmpty()) { + min = m_applet->boundingRect().size() - m_applet->contentsRect().size(); + min = QSizeF(KIconLoader::SizeSmall, KIconLoader::SizeSmall); } if (m_pressedButton == RotateButton) { From b383e43bc6d72fe0e752530c6c3814142fe5926b Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Sat, 22 Aug 2009 20:54:12 +0000 Subject: [PATCH 60/60] corect a problem in the last backport svn path=/branches/KDE/4.3/kdelibs/; revision=1014448 --- private/applethandle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/private/applethandle.cpp b/private/applethandle.cpp index d7f5e898b..d7c841e75 100644 --- a/private/applethandle.cpp +++ b/private/applethandle.cpp @@ -665,7 +665,7 @@ void AppletHandle::mouseMoveEvent(QGraphicsSceneMouseEvent *event) // If the applet doesn't have a minimum size, calculate based on a // minimum content area size of 16x16 (KIconLoader::SizeSmall) - if (1||min.isEmpty()) { + if (min.isEmpty()) { min = m_applet->boundingRect().size() - m_applet->contentsRect().size(); min = QSizeF(KIconLoader::SizeSmall, KIconLoader::SizeSmall); }