From e4e0337c1ac04100e6cce051da40758470675c4e Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Wed, 7 Jan 2009 01:17:31 +0000 Subject: [PATCH 01/78] sync the IconWidget changes made in trunk to the branch; not critical for the RC, but needs to be in 4.2.0 final so that we have header continuity. svn path=/branches/KDE/4.2/kdelibs/; revision=906900 --- widgets/iconwidget.cpp | 175 ++++++++++++++++++++++------------------- widgets/iconwidget.h | 19 +---- widgets/iconwidget_p.h | 14 +++- 3 files changed, 105 insertions(+), 103 deletions(-) diff --git a/widgets/iconwidget.cpp b/widgets/iconwidget.cpp index 0b9e03dd7..c58fe02b0 100644 --- a/widgets/iconwidget.cpp +++ b/widgets/iconwidget.cpp @@ -49,6 +49,13 @@ #include "animator.h" #include "svg.h" +/* +TODO: + Add these to a UrlIcon class + void setUrl(const KUrl& url); + KUrl url() const; +*/ + namespace Plasma { @@ -56,9 +63,9 @@ IconWidgetPrivate::IconWidgetPrivate(IconWidget *i) : q(i), iconSvg(0), iconSvgElementChanged(false), - m_fadeIn(false), - m_hoverAnimId(-1), - m_hoverAlpha(20 / 255), + fadeIn(false), + hoverAnimId(-1), + hoverAlpha(20 / 255), iconSize(48, 48), states(IconWidgetPrivate::NoState), orientation(Qt::Vertical), @@ -75,11 +82,10 @@ IconWidgetPrivate::~IconWidgetPrivate() qDeleteAll(cornerActions); } -void IconWidget::readColors() +void IconWidgetPrivate::readColors() { - d->textColor = Plasma::Theme::defaultTheme()->color(Theme::TextColor); - d->shadowColor = Plasma::Theme::defaultTheme()->color(Theme::BackgroundColor); - + textColor = Plasma::Theme::defaultTheme()->color(Theme::TextColor); + shadowColor = Plasma::Theme::defaultTheme()->color(Theme::BackgroundColor); } IconAction::IconAction(IconWidget *icon, QAction *action) @@ -262,14 +268,14 @@ IconWidget::IconWidget(QGraphicsItem *parent) : QGraphicsWidget(parent), d(new IconWidgetPrivate(this)) { - init(); + d->init(); } IconWidget::IconWidget(const QString &text, QGraphicsItem *parent) : QGraphicsWidget(parent), d(new IconWidgetPrivate(this)) { - init(); + d->init(); setText(text); } @@ -277,7 +283,7 @@ IconWidget::IconWidget(const QIcon &icon, const QString &text, QGraphicsItem *pa : QGraphicsWidget(parent), d(new IconWidgetPrivate(this)) { - init(); + d->init(); setText(text); setIcon(icon); } @@ -287,27 +293,27 @@ IconWidget::~IconWidget() delete d; } -void IconWidget::init() +void IconWidgetPrivate::init() { readColors(); - connect(Plasma::Theme::defaultTheme(), SIGNAL(themeChanged()), SLOT(readColors())); - connect(KGlobalSettings::self(), SIGNAL(kdisplayPaletteChanged()), SLOT(readColors())); + QObject::connect(Plasma::Theme::defaultTheme(), SIGNAL(themeChanged()), q, SLOT(readColors())); + QObject::connect(KGlobalSettings::self(), SIGNAL(kdisplayPaletteChanged()), q, SLOT(readColors())); // setAcceptedMouseButtons(Qt::LeftButton); - setAcceptsHoverEvents(true); + q->setAcceptsHoverEvents(true); // Margins for horizontal mode (list views, tree views, table views) - d->setHorizontalMargin(IconWidgetPrivate::TextMargin, 1, 1); - d->setHorizontalMargin(IconWidgetPrivate::IconMargin, 1, 1); - d->setHorizontalMargin(IconWidgetPrivate::ItemMargin, 0, 0); + setHorizontalMargin(IconWidgetPrivate::TextMargin, 1, 1); + setHorizontalMargin(IconWidgetPrivate::IconMargin, 1, 1); + setHorizontalMargin(IconWidgetPrivate::ItemMargin, 0, 0); // Margins for vertical mode (icon views) - d->setVerticalMargin(IconWidgetPrivate::TextMargin, 6, 2); - d->setVerticalMargin(IconWidgetPrivate::IconMargin, 1, 1); - d->setVerticalMargin(IconWidgetPrivate::ItemMargin, 0, 0); + setVerticalMargin(IconWidgetPrivate::TextMargin, 6, 2); + setVerticalMargin(IconWidgetPrivate::IconMargin, 1, 1); + setVerticalMargin(IconWidgetPrivate::ItemMargin, 0, 0); - d->setActiveMargins(); - d->currentSize = QSizeF(-1, -1); + setActiveMargins(); + currentSize = QSizeF(-1, -1); } void IconWidget::addIconAction(QAction *action) @@ -346,18 +352,18 @@ QAction *IconWidget::action() const return d->action; } -void IconWidget::actionDestroyed(QObject *action) +void IconWidgetPrivate::actionDestroyed(QObject *action) { - QList::iterator it = d->cornerActions.begin(); + QList::iterator it = cornerActions.begin(); - while (it != d->cornerActions.end()) { + while (it != cornerActions.end()) { if ((*it)->action() == action) { - d->cornerActions.erase(it); + cornerActions.erase(it); break; } } - update(); // redraw since an action has been deleted. + q->update(); // redraw since an action has been deleted. } int IconWidget::numDisplayLines() @@ -411,6 +417,7 @@ QSizeF IconWidgetPrivate::displaySizeHint(const QStyleOptionGraphicsItem *option if (text.isEmpty() && infoText.isEmpty()) { return QSizeF(.0, .0); } + QString label = text; // const qreal maxWidth = (orientation == Qt::Vertical) ? iconSize.width() + 10 : 32757; // NOTE: find a way to use the other layoutText, it currently returns nominal width, when @@ -437,64 +444,64 @@ QSizeF IconWidgetPrivate::displaySizeHint(const QStyleOptionGraphicsItem *option return addMargin(size, TextMargin); } -void IconWidget::layoutIcons(const QStyleOptionGraphicsItem *option) +void IconWidgetPrivate::layoutIcons(const QStyleOptionGraphicsItem *option) { - if (size() == d->currentSize) { + if (q->size() == currentSize) { return; } - d->currentSize = size(); - d->setActiveMargins(); + currentSize = q->size(); + setActiveMargins(); //calculate icon size based on the available space qreal iconWidth; - if (d->orientation == Qt::Vertical) { + if (orientation == Qt::Vertical) { qreal heightAvail; //if there is text resize the icon in order to make room for the text - if (d->text.isEmpty() && d->infoText.isEmpty()) { - heightAvail = d->currentSize.height(); + if (text.isEmpty() && infoText.isEmpty()) { + heightAvail = currentSize.height(); } else { - heightAvail = d->currentSize.height() - - d->displaySizeHint(option, d->currentSize.width()).height() - - d->verticalMargin[IconWidgetPrivate::TextMargin].top - - d->verticalMargin[IconWidgetPrivate::TextMargin].bottom; + heightAvail = currentSize.height() - + displaySizeHint(option, currentSize.width()).height() - + verticalMargin[IconWidgetPrivate::TextMargin].top - + verticalMargin[IconWidgetPrivate::TextMargin].bottom; //never make a label higher than half the total height - heightAvail = qMax(heightAvail, d->currentSize.height() / 2); + heightAvail = qMax(heightAvail, currentSize.height() / 2); } //aspect ratio very "tall" - if (d->currentSize.width() < heightAvail) { - iconWidth = d->currentSize.width() - - d->horizontalMargin[IconWidgetPrivate::IconMargin].left - - d->horizontalMargin[IconWidgetPrivate::IconMargin].right; + if (currentSize.width() < heightAvail) { + iconWidth = currentSize.width() - + horizontalMargin[IconWidgetPrivate::IconMargin].left - + horizontalMargin[IconWidgetPrivate::IconMargin].right; } else { iconWidth = heightAvail - - d->verticalMargin[IconWidgetPrivate::IconMargin].top - - d->verticalMargin[IconWidgetPrivate::IconMargin].bottom; + verticalMargin[IconWidgetPrivate::IconMargin].top - + verticalMargin[IconWidgetPrivate::IconMargin].bottom; } } else { //Horizontal layout - QFontMetricsF fm(font()); + QFontMetricsF fm(q->font()); //if there is text resize the icon in order to make room for the text - if (d->text.isEmpty() && d->infoText.isEmpty()) { + if (text.isEmpty() && infoText.isEmpty()) { // with no text, we just take up the whole geometry - iconWidth = d->currentSize.height() - - d->horizontalMargin[IconWidgetPrivate::IconMargin].left - - d->horizontalMargin[IconWidgetPrivate::IconMargin].right; + iconWidth = currentSize.height() - + horizontalMargin[IconWidgetPrivate::IconMargin].left - + horizontalMargin[IconWidgetPrivate::IconMargin].right; } else { - iconWidth = d->currentSize.height() - - d->verticalMargin[IconWidgetPrivate::IconMargin].top - - d->verticalMargin[IconWidgetPrivate::IconMargin].bottom; + iconWidth = currentSize.height() - + verticalMargin[IconWidgetPrivate::IconMargin].top - + verticalMargin[IconWidgetPrivate::IconMargin].bottom; } } - d->iconSize = QSizeF(iconWidth, iconWidth); + iconSize = QSizeF(iconWidth, iconWidth); int count = 0; - foreach (IconAction *iconAction, d->cornerActions) { - iconAction->setRect(d->actionRect((IconWidgetPrivate::ActionPosition)count)); + foreach (IconAction *iconAction, cornerActions) { + iconAction->setRect(actionRect((IconWidgetPrivate::ActionPosition)count)); ++count; } } @@ -513,42 +520,43 @@ void IconWidget::setSvg(const QString &svgFilePath, const QString &elementId) update(); } -void IconWidget::hoverEffect(bool show) +void IconWidgetPrivate::hoverEffect(bool show) { if (show) { - d->states |= IconWidgetPrivate::HoverState; + states |= IconWidgetPrivate::HoverState; } - d->m_fadeIn = show; + fadeIn = show; const int FadeInDuration = 150; - if (d->m_hoverAnimId != -1) { - Animator::self()->stopCustomAnimation(d->m_hoverAnimId); + if (hoverAnimId != -1) { + Animator::self()->stopCustomAnimation(hoverAnimId); } - d->m_hoverAnimId = Animator::self()->customAnimation( + + hoverAnimId = Animator::self()->customAnimation( 40 / (1000 / FadeInDuration), FadeInDuration, - Animator::EaseOutCurve, this, "hoverAnimationUpdate"); + Animator::EaseOutCurve, q, "hoverAnimationUpdate"); } -void IconWidget::hoverAnimationUpdate(qreal progress) +void IconWidgetPrivate::hoverAnimationUpdate(qreal progress) { - if (d->m_fadeIn) { - d->m_hoverAlpha = progress; + if (fadeIn) { + hoverAlpha = progress; } else { // If we mouse leaves before the fade in is done, fade out from where we were, // not from fully faded in - d->m_hoverAlpha = qMin(1 - progress, d->m_hoverAlpha); + hoverAlpha = qMin(1 - progress, hoverAlpha); } if (qFuzzyCompare(qreal(1.0), progress)) { - d->m_hoverAnimId = -1; + hoverAnimId = -1; - if (!d->m_fadeIn) { - d->states &= ~IconWidgetPrivate::HoverState; + if (!fadeIn) { + states &= ~IconWidgetPrivate::HoverState; } } - update(); + q->update(); } void IconWidgetPrivate::drawBackground(QPainter *painter, IconWidgetState state) @@ -566,23 +574,23 @@ void IconWidgetPrivate::drawBackground(QPainter *painter, IconWidgetState state) shadow.setHsv( shadow.hue(), shadow.saturation(), - shadow.value() + (int)(darkShadow ? 50 * m_hoverAlpha: -50 * m_hoverAlpha), - 200 + (int)m_hoverAlpha * 55); // opacity + shadow.value() + (int)(darkShadow ? 50 * hoverAlpha: -50 * hoverAlpha), + 200 + (int)hoverAlpha * 55); // opacity break; case IconWidgetPrivate::PressedState: shadow.setHsv( shadow.hue(), shadow.saturation(), shadow.value() + (darkShadow ? - (int)(50 * m_hoverAlpha) : (int)(-50 * m_hoverAlpha)), + (int)(50 * hoverAlpha) : (int)(-50 * hoverAlpha)), 204); //80% opacity break; default: break; } - border.setAlphaF(0.3 * m_hoverAlpha); - shadow.setAlphaF(0.6 * m_hoverAlpha); + border.setAlphaF(0.3 * hoverAlpha); + shadow.setAlphaF(0.6 * hoverAlpha); painter->save(); painter->translate(0.5, 0.5); @@ -630,13 +638,13 @@ QPixmap IconWidgetPrivate::decoration(const QStyleOptionGraphicsItem *option, bo // We're assuming that the icon group is desktop/filemanager, since this // is KFileItemDelegate. if (effect->hasEffect(KIconLoader::Desktop, KIconLoader::ActiveState)) { - if (qFuzzyCompare(qreal(1.0), m_hoverAlpha)) { + if (qFuzzyCompare(qreal(1.0), hoverAlpha)) { result = effect->apply(result, KIconLoader::Desktop, KIconLoader::ActiveState); } else { result = PaintUtils::transition( result, effect->apply(result, KIconLoader::Desktop, - KIconLoader::ActiveState), m_hoverAlpha); + KIconLoader::ActiveState), hoverAlpha); } } } @@ -898,7 +906,7 @@ void IconWidget::paint(QPainter *painter, const QStyleOptionGraphicsItem *option Q_UNUSED(widget); //Lay out the main icon and action icons - layoutIcons(option); + d->layoutIcons(option); // Compute the metrics, and lay out the text items // ======================================================================== @@ -987,7 +995,7 @@ void IconWidget::setText(const QString &text) //try to relayout, needed if an icon was never shown before if (!isVisible()) { QStyleOptionGraphicsItem styleoption; - layoutIcons(&styleoption); + d->layoutIcons(&styleoption); } resize(sizeFromIconSize(d->iconSize.width())); } @@ -1004,7 +1012,7 @@ void IconWidget::setInfoText(const QString &text) d->currentSize = QSizeF(-1, -1); //try to relayout, needed if an icon was never shown before if (!isVisible()) { - layoutIcons(new QStyleOptionGraphicsItem); + d->layoutIcons(new QStyleOptionGraphicsItem); } resize(sizeFromIconSize(d->iconSize.width())); } @@ -1139,7 +1147,8 @@ void IconWidget::hoverEnterEvent(QGraphicsSceneHoverEvent *event) action->show(); action->event(event->type(), event->pos()); } - hoverEffect(true); + + d->hoverEffect(true); update(); QGraphicsWidget::hoverEnterEvent(event); @@ -1152,7 +1161,7 @@ void IconWidget::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) action->event(event->type(), event->pos()); } // d->states &= ~IconWidgetPrivate::HoverState; // Will be set once progress is zero again ... - hoverEffect(false); + d->hoverEffect(false); update(); QGraphicsWidget::hoverLeaveEvent(event); diff --git a/widgets/iconwidget.h b/widgets/iconwidget.h index 76d17281e..2b9537b7d 100644 --- a/widgets/iconwidget.h +++ b/widgets/iconwidget.h @@ -280,27 +280,14 @@ private: Q_PRIVATE_SLOT(d, void syncToAction()) Q_PRIVATE_SLOT(d, void clearAction()) Q_PRIVATE_SLOT(d, void svgChanged()) - void init(); - void layoutIcons(const QStyleOptionGraphicsItem *option); - void hoverEffect(bool); + Q_PRIVATE_SLOT(d, void actionDestroyed(QObject *obj)) + Q_PRIVATE_SLOT(d, void readColors()) + Q_PRIVATE_SLOT(d, void hoverAnimationUpdate(qreal progress)) IconWidgetPrivate * const d; - friend class IconWidgetPrivate; - -private Q_SLOTS: - void actionDestroyed(QObject *obj); - void readColors(); - void hoverAnimationUpdate(qreal progress); - }; } // namespace Plasma -/* - // Add these to UrlIcon - void setUrl(const KUrl& url); - KUrl url() const; -*/ - #endif diff --git a/widgets/iconwidget_p.h b/widgets/iconwidget_p.h index b66497bf4..1782dbd6f 100644 --- a/widgets/iconwidget_p.h +++ b/widgets/iconwidget_p.h @@ -105,7 +105,6 @@ public: }; Q_DECLARE_FLAGS(IconWidgetStates, IconWidgetState) -public: IconWidgetPrivate(IconWidget *i); ~IconWidgetPrivate(); @@ -178,6 +177,13 @@ public: void clearAction(); void svgChanged(); + void actionDestroyed(QObject *obj); + void readColors(); + void hoverAnimationUpdate(qreal progress); + void init(); + void layoutIcons(const QStyleOptionGraphicsItem *option); + void hoverEffect(bool); + IconWidget *q; QString text; QString infoText; @@ -187,9 +193,9 @@ public: QPixmap iconSvgPixmap; QColor textColor; QColor shadowColor; - bool m_fadeIn; - int m_hoverAnimId; - qreal m_hoverAlpha; + bool fadeIn; + int hoverAnimId; + qreal hoverAlpha; QSizeF iconSize; QIcon icon; IconWidgetStates states; From f353a0dadc244f9a0fe5bc384ac07a49fc0f3a10 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Wed, 7 Jan 2009 16:44:25 +0000 Subject: [PATCH 02/78] protect access to toolBox pointer CCBUG:179909 svn path=/branches/KDE/4.2/kdelibs/; revision=907207 --- containment.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/containment.cpp b/containment.cpp index d34d2cdd0..766531013 100644 --- a/containment.cpp +++ b/containment.cpp @@ -1597,10 +1597,12 @@ void ContainmentPrivate::containmentConstraintsEvent(Plasma::Constraints constra a->updateConstraints(ImmutableConstraint); } - if (type == Containment::PanelContainment || type == Containment::CustomPanelContainment) { - toolBox->setVisible(unlocked); - } else { - toolBox->setIsMovable(unlocked); + if (toolBox) { + if (type == Containment::PanelContainment || type == Containment::CustomPanelContainment) { + toolBox->setVisible(unlocked); + } else { + toolBox->setIsMovable(unlocked); + } } } From 602ee72b5af138bcc32fc2d0575480a933734916 Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Thu, 8 Jan 2009 14:11:50 +0000 Subject: [PATCH 03/78] SVN_SILENT made messages (.desktop file) svn path=/branches/KDE/4.2/kdelibs/; revision=907662 --- servicetypes/plasma-dataengine.desktop | 2 +- tests/testengine/plasma-dataengine-testengine.desktop | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/servicetypes/plasma-dataengine.desktop b/servicetypes/plasma-dataengine.desktop index 9bec67bee..44478dd0d 100644 --- a/servicetypes/plasma-dataengine.desktop +++ b/servicetypes/plasma-dataengine.desktop @@ -42,7 +42,7 @@ Comment[pt_BR]=Mecanismo de dados do Plasma Comment[ro]=Motor de date Plasma Comment[ru]=Движок Plasma для работы с данными Comment[sl]=Podatkovni pogon za Plasmo -Comment[sr]=Плазма мотор података +Comment[sr]=Плазма датомотор Comment[sr@latin]=Plasma motor podataka Comment[sv]=Plasma datagränssnitt Comment[ta]=பிளாஸ்மா தரவு இயந்திரம் diff --git a/tests/testengine/plasma-dataengine-testengine.desktop b/tests/testengine/plasma-dataengine-testengine.desktop index 24dac529c..a7871aabf 100644 --- a/tests/testengine/plasma-dataengine-testengine.desktop +++ b/tests/testengine/plasma-dataengine-testengine.desktop @@ -37,7 +37,7 @@ Name[ro]=Motor de date pentru teste Name[ru]=Тестовый движок для работы с данными Name[sk]=Engine testovacích dát Name[sl]=Preizkusni pogon s podatki -Name[sr]=пробни мотор података +Name[sr]=пробни датомотор података Name[sr@latin]=probni motor podataka Name[sv]=Testdatagränssnitt Name[ta]=சோதனை தரவு இயந்திரம் From 9f03caaa18dae39b4f2c45f3a5382c38cd872ebd Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Fri, 9 Jan 2009 01:16:57 +0000 Subject: [PATCH 04/78] clear the current widget when an widget is unregistered; solves a crash where the task widget disconnects *all* signals to items before deleting them, thus preventing the destroyed(QObject*) signal from getting through. it was calling unregisterWidget, but that wasn't clearing the current widget -> POOF! CCMAIL:faure@kde.org CCBUG:179819 svn path=/branches/KDE/4.2/kdelibs/; revision=907982 --- tooltipmanager.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tooltipmanager.cpp b/tooltipmanager.cpp index 000f114a9..2ecf7fb92 100644 --- a/tooltipmanager.cpp +++ b/tooltipmanager.cpp @@ -80,9 +80,8 @@ public : * called when a widget inside the tooltip manager is deleted */ void onWidgetDestroyed(QObject * object); - + void removeWidget(QGraphicsWidget *w); void clearTips(); - void doDelayedHide(); QGraphicsWidget *currentWidget; @@ -182,7 +181,6 @@ void ToolTipManager::registerWidget(QGraphicsWidget *widget) //the tooltip is not registered we add it in our map of tooltips d->tooltips.insert(widget, ToolTipContent()); widget->installEventFilter(this); - //connect to object destruction connect(widget, SIGNAL(destroyed(QObject*)), this, SLOT(onWidgetDestroyed(QObject*))); } @@ -193,7 +191,7 @@ void ToolTipManager::unregisterWidget(QGraphicsWidget *widget) } widget->removeEventFilter(this); - d->tooltips.remove(widget); + d->removeWidget(widget); } void ToolTipManager::setContent(QGraphicsWidget *widget, const ToolTipContent &data) @@ -262,7 +260,12 @@ void ToolTipManagerPrivate::onWidgetDestroyed(QObject *object) // NOTE: DO NOT USE THE w VARIABLE FOR ANYTHING OTHER THAN COMPARING // THE ADDRESS! ACTUALLY USING THE OBJECT WILL RESULT IN A CRASH!!! QGraphicsWidget *w = static_cast(object); + removeWidget(w); +} +void ToolTipManagerPrivate::removeWidget(QGraphicsWidget *w) +{ + // DO NOTE ACCESS w HERE!! IT MAY BE IN THE PROCESS OF DELETION! if (currentWidget == w) { currentWidget = 0; showTimer->stop(); // stop the timer to show the tooltip From 4f16460715f05e3deb6b538e545699a23b3d09a0 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Fri, 9 Jan 2009 02:14:10 +0000 Subject: [PATCH 05/78] * add actions in the order they are added, not alphabetically by name (?!) * remove actions if they get deleted BUG:30042 svn path=/branches/KDE/4.2/kdelibs/; revision=907995 --- extenderitem.cpp | 28 ++++++++++++++++++++++++++-- extenderitem.h | 1 + private/extenderitem_p.h | 4 +++- 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/extenderitem.cpp b/extenderitem.cpp index 224e5169d..94db3aa55 100644 --- a/extenderitem.cpp +++ b/extenderitem.cpp @@ -331,9 +331,14 @@ bool ExtenderItem::isDetached() const void ExtenderItem::addAction(const QString &name, QAction *action) { Q_ASSERT(action); + if (d->actionsInOrder.contains(action)) { + return; + } d->actions.insert(name, action); + d->actionsInOrder.append(action); connect(action, SIGNAL(changed()), this, SLOT(updateToolBox())); + connect(action, SIGNAL(destroyed(QObject*)), this, SLOT(actionDestroyed(QObject*))); d->updateToolBox(); } @@ -907,7 +912,7 @@ void ExtenderItemPrivate::updateToolBox() } //add the actions that are actually set to visible. - foreach (QAction *action, actions) { + foreach (QAction *action, actionsInOrder) { if (action->isVisible()) { IconWidget *icon = new IconWidget(q); icon->setAction(action); @@ -1105,10 +1110,29 @@ void ExtenderItemPrivate::resizeContent(const QSizeF &newSize) void ExtenderItemPrivate::previousTargetExtenderDestroyed(QObject *o) { Q_UNUSED(o) - previousTargetExtender = 0; } +void ExtenderItemPrivate::actionDestroyed(QObject *o) +{ + QAction *action = static_cast(o); + QMutableHashIterator hit(actions); + while (hit.hasNext()) { + if (hit.next().value() == action) { + hit.remove(); + break; + } + } + + QMutableListIterator lit(actionsInOrder); + while (lit.hasNext()) { + if (lit.next() == action) { + lit.remove(); + break; + } + } +} + uint ExtenderItemPrivate::s_maxExtenderItemId = 0; } // namespace Plasma diff --git a/extenderitem.h b/extenderitem.h index 6d9718441..b68829a0a 100644 --- a/extenderitem.h +++ b/extenderitem.h @@ -249,6 +249,7 @@ class PLASMA_EXPORT ExtenderItem : public QGraphicsWidget Q_PRIVATE_SLOT(d, void themeChanged()) Q_PRIVATE_SLOT(d, void sourceAppletRemoved()) Q_PRIVATE_SLOT(d, void previousTargetExtenderDestroyed(QObject*)) + Q_PRIVATE_SLOT(d, void actionDestroyed(QObject*)) ExtenderItemPrivate * const d; diff --git a/private/extenderitem_p.h b/private/extenderitem_p.h index e048b40f5..2a04ed879 100644 --- a/private/extenderitem_p.h +++ b/private/extenderitem_p.h @@ -59,6 +59,7 @@ class ExtenderItemPrivate qreal iconSize(); void resizeContent(const QSizeF &newSize); void previousTargetExtenderDestroyed(QObject *o); + void actionDestroyed(QObject *o); ExtenderItem *q; @@ -78,7 +79,8 @@ class ExtenderItemPrivate IconWidget *collapseIcon; - QMap actions; + QHash actions; + QList actionsInOrder; QString title; QString name; From 49dc6e5bcd86d06c0dc3033e419af1daacef7953 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexis=20M=C3=A9nard?= Date: Fri, 9 Jan 2009 16:53:50 +0000 Subject: [PATCH 06/78] Backport 908392 from trunk QImage.fill take a uint not a QColor so this color (Qt::transparent enum with 19 as a value) is invalid. svn path=/branches/KDE/4.2/kdelibs/; revision=908395 --- paintutils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paintutils.cpp b/paintutils.cpp index c9444af05..72c538130 100644 --- a/paintutils.cpp +++ b/paintutils.cpp @@ -80,7 +80,7 @@ QPixmap shadowText(QString text, const QFont &font, QColor textColor, QColor sha //Draw blurred shadow QImage img(textRect.size() + QSize(radius * 2, radius * 2), QImage::Format_ARGB32_Premultiplied); - img.fill(Qt::transparent); + img.fill(0); p.begin(&img); p.drawImage(QPoint(radius, radius), textPixmap.toImage()); p.end(); From daee98b062ad623e136bab2ca869879d008e577a Mon Sep 17 00:00:00 2001 From: Rob Scheepmaker Date: Fri, 9 Jan 2009 20:41:24 +0000 Subject: [PATCH 07/78] Move the QGL resize hacks from extender to extenderapplet. The only applet atm for which this hack is necesarry is actually extenderapplet, in the future we will have better layouts, and it won't be necesarry at all, and for now it avoids breaking panel layouts when removing the last extenderitem from an extenderapplet. svn path=/branches/KDE/4.2/kdelibs/; revision=908498 --- extender.cpp | 11 ----------- private/extenderapplet.cpp | 19 +++++++++++++++++++ private/extenderapplet_p.h | 1 + 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/extender.cpp b/extender.cpp index d2dd64662..6dda436e7 100644 --- a/extender.cpp +++ b/extender.cpp @@ -475,17 +475,6 @@ void ExtenderPrivate::adjustSizeHints() q->setMinimumSize(layout->preferredSize()); } - if (applet->layout()) { - applet->layout()->updateGeometry(); - - qreal left, top, right, bottom; - applet->getContentsMargins(&left, &top, &right, &bottom); - QSizeF margins(left + right, top + bottom); - - applet->setMinimumSize(applet->layout()->minimumSize() + margins); - applet->adjustSize(); - } - q->adjustSize(); emit q->geometryChanged(); diff --git a/private/extenderapplet.cpp b/private/extenderapplet.cpp index d95589e74..be5a451aa 100644 --- a/private/extenderapplet.cpp +++ b/private/extenderapplet.cpp @@ -52,6 +52,8 @@ void ExtenderApplet::init() connect(extender(), SIGNAL(itemDetached(Plasma::ExtenderItem*)), this, SLOT(itemDetached(Plasma::ExtenderItem*))); + connect(extender(), SIGNAL(geometryChanged()), + this, SLOT(extenderGeometryChanged())); } void ExtenderApplet::itemDetached(Plasma::ExtenderItem *) @@ -61,6 +63,23 @@ void ExtenderApplet::itemDetached(Plasma::ExtenderItem *) } } +void ExtenderApplet::extenderGeometryChanged() +{ + if (formFactor() != Plasma::Horizontal && + formFactor() != Plasma::Vertical) { + + qreal left, top, right, bottom; + getContentsMargins(&left, &top, &right, &bottom); + QSizeF margins(left + right, top + bottom); + + setMinimumSize(extender()->minimumSize() + margins); + setMaximumSize(extender()->maximumSize() + margins); + setPreferredSize(extender()->preferredSize() + margins); + + adjustSize(); + } +} + } // namespace Plasma #include "extenderapplet_p.moc" diff --git a/private/extenderapplet_p.h b/private/extenderapplet_p.h index 18d43aaab..fb3274b06 100644 --- a/private/extenderapplet_p.h +++ b/private/extenderapplet_p.h @@ -41,6 +41,7 @@ class ExtenderApplet : public Plasma::PopupApplet public Q_SLOTS: void itemDetached(Plasma::ExtenderItem *); + void extenderGeometryChanged(); }; } // namespace Plasma From faaa5b009c20415b7374a6ed269c295507e4207f Mon Sep 17 00:00:00 2001 From: Alex Merry Date: Sat, 10 Jan 2009 00:22:56 +0000 Subject: [PATCH 08/78] Backport of apidocs changes, so that the 4.2-branch apidocs are correct svn path=/branches/KDE/4.2/kdelibs/; revision=908609 --- abstractrunner.h | 3 +-- applet.h | 3 +++ containment.h | 21 ++++++++++++++------- corona.h | 7 ++++--- datacontainer.h | 1 + package.h | 4 ++++ packagestructure.h | 6 +++--- plasma.h | 2 +- scripting/appletscript.h | 2 ++ scripting/scriptengine.h | 2 +- service.h | 2 +- version.h | 2 +- wallpaper.h | 8 ++++---- widgets/meter.h | 12 ++++++------ widgets/webview.h | 2 +- 15 files changed, 47 insertions(+), 30 deletions(-) diff --git a/abstractrunner.h b/abstractrunner.h index b50895975..6150cf81b 100644 --- a/abstractrunner.h +++ b/abstractrunner.h @@ -119,13 +119,12 @@ class PLASMA_EXPORT AbstractRunner : public QObject * If a particular match supports multiple actions, set up the corresponding * actions in the actionsForMatch method. Do not call any of the action methods * within this method! - * @see actionsForMatch * * Execution of the correct action should be handled in the run method. * @caution This method needs to be thread-safe since KRunner will simply * start a new thread for each new term. * - * @caution Returning from this method means to end execution of the runner. + * @warning Returning from this method means to end execution of the runner. * * @sa run(), RunnerContext::addMatch, RunnerContext::addMatches, QueryMatch */ diff --git a/applet.h b/applet.h index 19ece2018..3239bd9f9 100644 --- a/applet.h +++ b/applet.h @@ -721,6 +721,9 @@ class PLASMA_EXPORT Applet : public QGraphicsWidget * * @param needsConfiguring true if the applet needs to be configured, * or false if it doesn't + * @param reason a translated message for the user explaining that the + * applet needs configuring; this should note what needs + * to be configured */ void setConfigurationRequired(bool needsConfiguring, const QString &reason = QString()); diff --git a/containment.h b/containment.h index b626015c1..354ccb751 100644 --- a/containment.h +++ b/containment.h @@ -224,12 +224,14 @@ class PLASMA_EXPORT Containment : public Applet int desktop() const; /** - * @reimplemented from Applet + * @reimp + * @sa Applet::save(KConfigGroup &) */ void save(KConfigGroup &group) const; /** - * @reimplemented from Applet + * @reimp + * @sa Applet::restore(KConfigGroup &) */ void restore(KConfigGroup &group); @@ -434,7 +436,8 @@ class PLASMA_EXPORT Containment : public Applet void destroy(bool confirm); /** - * @reimplemented from Plasma::Applet + * @reimp + * @sa Applet::showConfigurationInterface() */ void showConfigurationInterface(); @@ -475,22 +478,26 @@ class PLASMA_EXPORT Containment : public Applet QVariant itemChange(GraphicsItemChange change, const QVariant &value); /** - * @reimplemented from QGraphicsItem + * @reimp + * @sa QGraphicsItem::dragEnterEvent() */ void dragEnterEvent(QGraphicsSceneDragDropEvent *event); /** - * @reimplemented from QGraphicsItem + * @reimp + * @sa QGraphicsItem::dragMoveEvent() */ void dragMoveEvent(QGraphicsSceneDragDropEvent *event); /** - * @reimplemented from QGraphicsItem + * @reimp + * @sa QGraphicsItem::dropEvent() */ void dropEvent(QGraphicsSceneDragDropEvent *event); /** - * @reimplemented from QGraphicsItem + * @reimp + * @sa QGraphicsItem::resizeEvent() */ void resizeEvent(QGraphicsSceneResizeEvent *event); diff --git a/corona.h b/corona.h index 647fa9f5f..c29f4de99 100644 --- a/corona.h +++ b/corona.h @@ -139,12 +139,13 @@ public: virtual QRegion availableScreenRegion(int id) const; /** - * Reccomended position for a popup window like a menu or a tooltip + * Recommended position for a popup window like a menu or a tooltip * given its size - * @param s size of the popup + * @param item the item that the popup should appear adjacent to (an applet, say) + * @param size size of the popup * @returns reccomended position */ - QPoint popupPosition(const QGraphicsItem *item, const QSize &s); + QPoint popupPosition(const QGraphicsItem *item, const QSize &size); /** * This method is useful in order to retrieve the list of available diff --git a/datacontainer.h b/datacontainer.h index 87efad8a5..435e6bbf4 100644 --- a/datacontainer.h +++ b/datacontainer.h @@ -117,6 +117,7 @@ class PLASMA_EXPORT DataContainer : public QObject * * @param visualization the object to connect to this DataContainer * @param pollingInterval the time in milliseconds between updates + * @param alignment the clock position to align updates to **/ void connectVisualization(QObject *visualization, uint pollingInterval, Plasma::IntervalAlignment alignment); diff --git a/package.h b/package.h index 67bd6112a..8decf00fe 100644 --- a/package.h +++ b/package.h @@ -137,6 +137,8 @@ class PLASMA_EXPORT Package * @param package path to the Plasmagik 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-") * @return true on successful installation, false otherwise **/ static bool installPackage(const QString &package, @@ -149,6 +151,8 @@ class PLASMA_EXPORT Package * @param package path to the Plasmagik 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-") * @return true on successful uninstallation, false otherwise **/ static bool uninstallPackage(const QString &package, diff --git a/packagestructure.h b/packagestructure.h index cd4b5ef85..6772feaa1 100644 --- a/packagestructure.h +++ b/packagestructure.h @@ -164,7 +164,7 @@ public: * The path must already have been added using addDirectoryDefinition * or addFileDefinition. * - * @param path the path of the entry within the package + * @param key the entry within the package * @param required true if this entry is required, false if not */ void setRequired(const char *key, bool required); @@ -188,7 +188,7 @@ public: * The path must already have been added using addDirectoryDefinition * or addFileDefinition. * - * @param path the path of the entry within the package + * @param key the entry within the package * @param mimetypes a list of mimetypes **/ void setMimetypes(const char *key, QStringList mimetypes); @@ -249,7 +249,7 @@ public: * When the process is complete, the newWidgetBrowserFinished() signal must be * emitted. * - * @args parent the parent widget to use for the widget + * @param parent the parent widget to use for the widget */ virtual void createNewWidgetBrowser(QWidget *parent = 0); diff --git a/plasma.h b/plasma.h index 21f3b5bbf..61b365a03 100644 --- a/plasma.h +++ b/plasma.h @@ -244,7 +244,7 @@ PLASMA_EXPORT qreal scalingFactor(ZoomLevel level); * location or to point arrows and other directional items. * * @param location the location of the container the element will appear in - * @reutrn the visual direction of the element should be oriented in + * @return the visual direction of the element should be oriented in **/ PLASMA_EXPORT Direction locationToDirection(Location location); diff --git a/scripting/appletscript.h b/scripting/appletscript.h index 29778ebf8..933292c57 100644 --- a/scripting/appletscript.h +++ b/scripting/appletscript.h @@ -74,6 +74,8 @@ public: * * @param painter the QPainter to use * @param option the style option containing such flags as selection, level of detail, etc + * @param contentsRect the rect to paint within; automatically adjusted for + * the background, if any */ virtual void paintInterface(QPainter *painter, const QStyleOptionGraphicsItem *option, diff --git a/scripting/scriptengine.h b/scripting/scriptengine.h index c336a2ecc..64b86ae63 100644 --- a/scripting/scriptengine.h +++ b/scripting/scriptengine.h @@ -131,7 +131,7 @@ PLASMA_EXPORT RunnerScript *loadScriptEngine(const QString &language, AbstractRu /** * Loads an appropriate PackageStructure for the given language and type * - * @param langauge the language to load the PackageStructure for + * @param language the language to load the PackageStructure for * @param type the component type * @return a guarded PackageStructure pointer */ diff --git a/service.h b/service.h index c7aa1e09c..e7cc853bc 100644 --- a/service.h +++ b/service.h @@ -112,7 +112,7 @@ public: /** * Retrieves the parameters for a given operation * - * @param operation the operation to retrieve parameters for + * @param operationName the operation to retrieve parameters for * @return KConfigGroup containing the parameters */ Q_INVOKABLE KConfigGroup operationDescription(const QString &operationName); diff --git a/version.h b/version.h index adb676a75..8d5956476 100644 --- a/version.h +++ b/version.h @@ -20,7 +20,7 @@ #ifndef PLASMA_VERSION_H #define PLASMA_VERSION_H -/** @header plasma/version.h */ +/** @file plasma/version.h */ #include diff --git a/wallpaper.h b/wallpaper.h index 416e1b215..00204f97d 100644 --- a/wallpaper.h +++ b/wallpaper.h @@ -41,7 +41,7 @@ class WallpaperPrivate; * Wallpaper plugins are registered using .desktop files. These files should be * named using the following naming scheme: * - * plasma-wallpaper-.desktop + * plasma-wallpaper-\.desktop * * If a wallpaper plugin provides more than on mode (e.g. Single Image, Wallpaper) * it should include a Actions= entry in the .desktop file, listing the possible @@ -223,10 +223,10 @@ class PLASMA_EXPORT Wallpaper : public QObject /** * This method is called once the wallpaper is loaded or mode is changed. - * The mode can be retrieved using the @see renderMode() method. + * + * The mode can be retrieved using the renderMode() method. + * * @param config Config group to load settings - * @param mode One of the modes supported by the plugin, - * or an empty string for the default mode. **/ virtual void init(const KConfigGroup &config); diff --git a/widgets/meter.h b/widgets/meter.h index 451c6c750..bdd4e321c 100644 --- a/widgets/meter.h +++ b/widgets/meter.h @@ -152,8 +152,8 @@ public: /** * Set text label color for the meter - * @param index label index. - * @param text color for the label. + * @param index label index + * @param color the color to apply to the label */ void setLabelColor(int index, const QColor &color); @@ -165,8 +165,8 @@ public: /** * Set text label font for the meter - * @param index label index. - * @param text font for the label. + * @param index label index + * @param font the font to apply to the label */ void setLabelFont(int index, const QFont &font); @@ -178,8 +178,8 @@ public: /** * Set text label alignment for the meter - * @param index label index. - * @param text alignment for the label. + * @param index label index + * @param alignment the text alignment to apply to the label */ void setLabelAlignment(int index, const Qt::Alignment alignment); diff --git a/widgets/webview.h b/widgets/webview.h index 5ff7d82c5..8395197e0 100644 --- a/widgets/webview.h +++ b/widgets/webview.h @@ -39,7 +39,7 @@ namespace Plasma class WebViewPrivate; /** - * @class WebView plasma/widgets/webcontent.h + * @class WebView plasma/widgets/webview.h * * @short Provides a widget to display html content in Plasma. */ From 5fc144ba9ad54ebc4ac296fa9e9a7138b5d6a9fc Mon Sep 17 00:00:00 2001 From: Chani Armitage Date: Sat, 10 Jan 2009 00:43:18 +0000 Subject: [PATCH 09/78] backport of r908612: a default size for scripted applets, because they aren't allowed to do anything themselves before init (and this is the one thing that *must* be done before init) svn path=/branches/KDE/4.2/kdelibs/; revision=908618 --- applet.cpp | 9 +++++++++ servicetypes/plasma-applet.desktop | 3 +++ 2 files changed, 12 insertions(+) diff --git a/applet.cpp b/applet.cpp index b4c7527b8..902db2714 100644 --- a/applet.cpp +++ b/applet.cpp @@ -1942,6 +1942,15 @@ void AppletPrivate::setupScriptSupport() if (!package->filePath("mainconfigui").isEmpty()) { q->setHasConfigurationInterface(true); } + + //set a default size before any saved settings are read + QSize size = appletDescription.property("X-Plasma-DefaultSize").toSize(); + if (size == QSize()) { + size = QSize(200,200); + } + //kDebug() << "size" << size; + q->resize(size); + } QString AppletPrivate::globalName() const diff --git a/servicetypes/plasma-applet.desktop b/servicetypes/plasma-applet.desktop index a056e93ef..0b02b0f38 100644 --- a/servicetypes/plasma-applet.desktop +++ b/servicetypes/plasma-applet.desktop @@ -59,3 +59,6 @@ Type=QString [PropertyDef::X-Plasma-DropMimeTypes] Type=QStringList +[PropertyDef::X-Plasma-DefaultSize] +Type=QSize + From d33c5b5d756900a68bdfc9579b3903a4284d7bd5 Mon Sep 17 00:00:00 2001 From: Chani Armitage Date: Sat, 10 Jan 2009 04:19:35 +0000 Subject: [PATCH 10/78] backport of r908661: apparently it's bad to compare to QSize() svn path=/branches/KDE/4.2/kdelibs/; revision=908662 --- applet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applet.cpp b/applet.cpp index 902db2714..ae0b35ff8 100644 --- a/applet.cpp +++ b/applet.cpp @@ -1945,7 +1945,7 @@ void AppletPrivate::setupScriptSupport() //set a default size before any saved settings are read QSize size = appletDescription.property("X-Plasma-DefaultSize").toSize(); - if (size == QSize()) { + if (size.isEmpty()) { size = QSize(200,200); } //kDebug() << "size" << size; From ef71fa06f46a43d21d667ce0dc5bb4d7544d2122 Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Sat, 10 Jan 2009 16:05:52 +0000 Subject: [PATCH 11/78] SVN_SILENT made messages (.desktop file) svn path=/branches/KDE/4.2/kdelibs/; revision=908904 --- tests/packagemetadatatest.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/packagemetadatatest.desktop b/tests/packagemetadatatest.desktop index b5abe57ab..e1fe06ad7 100644 --- a/tests/packagemetadatatest.desktop +++ b/tests/packagemetadatatest.desktop @@ -52,7 +52,7 @@ Comment[as]=PackageMetaData class পৰীক্ষা কৰিবলৈ এ Comment[be@latin]=Testavy fajł rabočaha stała dla spraŭdžvańnia klasy „PackageMetaData”. Comment[ca]=Un fitxer d'escriptori de proves per provar la classe PackageMetaData. Comment[da]=En desktop-testfil til test af PackageMetaData-klassen. -Comment[de]=Eine Test-Desktop-Datei zum Testen der Klasse PackageMetaData. +Comment[de]=Eine Test-Desktop-Datei zum Testen der Klasse „PackageMetaData“. Comment[el]=Ένα δοκιμαστικό αρχείο desktop για τον έλεγχο τς κλάσης PackageMetaData. Comment[es]=Un archivo de escritorio para probar la clase PackageMetaData. Comment[et]=Testtöölauafail klassi PackageMetaData testimiseks. From 7effda48d7c42889e9dd83b43142b9090441ed30 Mon Sep 17 00:00:00 2001 From: Alex Merry Date: Sun, 11 Jan 2009 17:31:47 +0000 Subject: [PATCH 12/78] Backport r909140: fix a crash (appearing in KSMServer) which is partly a Qt bug and partly an odd SVG. Basically, don't try creating and drawing on a pixmap if we know it will be null in advance. CCBUG: 179978 svn path=/branches/KDE/4.2/kdelibs/; revision=909478 --- framesvg.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/framesvg.cpp b/framesvg.cpp index 6bab48909..0e4422795 100644 --- a/framesvg.cpp +++ b/framesvg.cpp @@ -583,7 +583,8 @@ void FrameSvgPrivate::generateBackground(FrameData *frame) } } } else { - if (frame->enabledBorders & FrameSvg::LeftBorder && q->hasElement(prefix + "left")) { + if (frame->enabledBorders & FrameSvg::LeftBorder && q->hasElement(prefix + "left") + && leftHeight > 0 && frame->leftWidth > 0) { QPixmap left(frame->leftWidth, leftHeight); left.fill(Qt::transparent); @@ -594,7 +595,8 @@ void FrameSvgPrivate::generateBackground(FrameData *frame) p.drawTiledPixmap(QRect(leftOffset, contentTop, frame->leftWidth, contentHeight), left); } - if (frame->enabledBorders & FrameSvg::RightBorder && q->hasElement(prefix + "right")) { + if (frame->enabledBorders & FrameSvg::RightBorder && q->hasElement(prefix + "right") && + leftHeight > 0 && frame->rightWidth > 0) { QPixmap right(frame->rightWidth, leftHeight); right.fill(Qt::transparent); @@ -605,7 +607,8 @@ void FrameSvgPrivate::generateBackground(FrameData *frame) p.drawTiledPixmap(QRect(rightOffset, contentTop, frame->rightWidth, contentHeight), right); } - if (frame->enabledBorders & FrameSvg::TopBorder && q->hasElement(prefix + "top")) { + if (frame->enabledBorders & FrameSvg::TopBorder && q->hasElement(prefix + "top") + && topWidth > 0 && frame->topHeight > 0) { QPixmap top(topWidth, frame->topHeight); top.fill(Qt::transparent); @@ -616,7 +619,8 @@ void FrameSvgPrivate::generateBackground(FrameData *frame) p.drawTiledPixmap(QRect(contentLeft, topOffset, contentWidth, frame->topHeight), top); } - if (frame->enabledBorders & FrameSvg::BottomBorder && q->hasElement(prefix + "bottom")) { + if (frame->enabledBorders & FrameSvg::BottomBorder && q->hasElement(prefix + "bottom") + && topWidth > 0 && frame->bottomHeight > 0) { QPixmap bottom(topWidth, frame->bottomHeight); bottom.fill(Qt::transparent); From e4171154f96ac5e35e1dd7bff166cec966f66375 Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Mon, 12 Jan 2009 14:40:10 +0000 Subject: [PATCH 13/78] SVN_SILENT made messages (.desktop file) svn path=/branches/KDE/4.2/kdelibs/; revision=909994 --- servicetypes/plasma-applet-extenderapplet.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servicetypes/plasma-applet-extenderapplet.desktop b/servicetypes/plasma-applet-extenderapplet.desktop index c4359c62a..018f46263 100644 --- a/servicetypes/plasma-applet-extenderapplet.desktop +++ b/servicetypes/plasma-applet-extenderapplet.desktop @@ -32,7 +32,7 @@ Name[pt_BR]=Recipiente de extensão interna Name[ro]=Container extensibil intern Name[ru]=Внутренний расширенный контейнер Name[sk]=Vnútorný predlžovací kontajner -Name[sr]=Унутрашњи садржалац проширивача +Name[sr]=унутрашњи садржалац проширивача Name[sr@latin]=Unutrašnji sadržalac proširivača Name[sv]=Intern utökningsbehållare Name[ta]=உள்ளூர விரிவாக்கும் கொள்ளி From 5f71a0228bdeed07e69e9f100c347ec9d1ddee91 Mon Sep 17 00:00:00 2001 From: Beat Wolf Date: Tue, 13 Jan 2009 11:28:56 +0000 Subject: [PATCH 14/78] Backport BUG:180272 svn path=/branches/KDE/4.2/kdelibs/; revision=910419 --- containment.cpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/containment.cpp b/containment.cpp index 766531013..699c97b1f 100644 --- a/containment.cpp +++ b/containment.cpp @@ -539,11 +539,26 @@ void ContainmentPrivate::appletActions(KMenu &desktopMenu, Applet *applet, bool KMenu *containmentMenu = new KMenu(i18nc("%1 is the name of the containment", "%1 Options", q->name()), &desktopMenu); containmentActions(*containmentMenu); if (!containmentMenu->isEmpty()) { - if (!desktopMenu.isEmpty()) { + int enabled = 0; + //count number of real actions + foreach(QAction *action, containmentMenu->actions()) { + if(action->isEnabled() && !action->isSeparator()) { + enabled++; + } + } + + if (enabled > 0) { desktopMenu.addSeparator(); } - desktopMenu.addMenu(containmentMenu); + //if there is only one, don't create a submenu + if(enabled < 2) { + foreach(QAction *action, containmentMenu->actions()) { + desktopMenu.addAction(action); + } + } else { + desktopMenu.addMenu(containmentMenu); + } } if (static_cast(q->scene())->immutability() == Mutable) { From d920300656643b39e70782e29f6b214fcef04eff Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Wed, 14 Jan 2009 14:17:01 +0000 Subject: [PATCH 15/78] SVN_SILENT made messages (.desktop file) svn path=/branches/KDE/4.2/kdelibs/; revision=910955 --- servicetypes/plasma-applet-extenderapplet.desktop | 2 +- servicetypes/plasma-dataengine.desktop | 2 +- tests/testengine/plasma-dataengine-testengine.desktop | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/servicetypes/plasma-applet-extenderapplet.desktop b/servicetypes/plasma-applet-extenderapplet.desktop index 018f46263..e67f19a93 100644 --- a/servicetypes/plasma-applet-extenderapplet.desktop +++ b/servicetypes/plasma-applet-extenderapplet.desktop @@ -33,7 +33,7 @@ Name[ro]=Container extensibil intern Name[ru]=Внутренний расширенный контейнер Name[sk]=Vnútorný predlžovací kontajner Name[sr]=унутрашњи садржалац проширивача -Name[sr@latin]=Unutrašnji sadržalac proširivača +Name[sr@latin]=unutrašnji sadržalac proširivača Name[sv]=Intern utökningsbehållare Name[ta]=உள்ளூர விரிவாக்கும் கொள்ளி Name[tg]=Системаи васеъи захиракунӣ diff --git a/servicetypes/plasma-dataengine.desktop b/servicetypes/plasma-dataengine.desktop index 44478dd0d..20c1dbcd8 100644 --- a/servicetypes/plasma-dataengine.desktop +++ b/servicetypes/plasma-dataengine.desktop @@ -43,7 +43,7 @@ Comment[ro]=Motor de date Plasma Comment[ru]=Движок Plasma для работы с данными Comment[sl]=Podatkovni pogon za Plasmo Comment[sr]=Плазма датомотор -Comment[sr@latin]=Plasma motor podataka +Comment[sr@latin]=Plasma datomotor Comment[sv]=Plasma datagränssnitt Comment[ta]=பிளாஸ்மா தரவு இயந்திரம் Comment[tg]=Системаи маълумотии Plasma diff --git a/tests/testengine/plasma-dataengine-testengine.desktop b/tests/testengine/plasma-dataengine-testengine.desktop index a7871aabf..8e120bc8f 100644 --- a/tests/testengine/plasma-dataengine-testengine.desktop +++ b/tests/testengine/plasma-dataengine-testengine.desktop @@ -38,7 +38,7 @@ Name[ru]=Тестовый движок для работы с данными Name[sk]=Engine testovacích dát Name[sl]=Preizkusni pogon s podatki Name[sr]=пробни датомотор података -Name[sr@latin]=probni motor podataka +Name[sr@latin]=probni datomotor podataka Name[sv]=Testdatagränssnitt Name[ta]=சோதனை தரவு இயந்திரம் Name[tg]=Системаи санҷиши маълумот From bddaa1125d36eb6996ecaff16632bd4f2374f62c Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Thu, 15 Jan 2009 06:02:20 +0000 Subject: [PATCH 16/78] get sizing right when setContent is called and the tip is already visible CCBUG:180423 svn path=/branches/KDE/4.2/kdelibs/; revision=911228 --- private/tooltip.cpp | 2 ++ tooltipmanager.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/private/tooltip.cpp b/private/tooltip.cpp index 480ec1d25..ecd4ff93c 100644 --- a/private/tooltip.cpp +++ b/private/tooltip.cpp @@ -169,6 +169,8 @@ ToolTip::~ToolTip() void ToolTip::checkSize() { //FIXME: layout bugs even on qlayouts? oh, please, no. + d->text->setMinimumSize(0, 0); + d->text->setMaximumSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX); d->text->setMinimumSize(d->text->minimumSizeHint()); d->text->setMaximumSize(d->text->maximumSizeHint()); diff --git a/tooltipmanager.cpp b/tooltipmanager.cpp index 2ecf7fb92..42a7283cb 100644 --- a/tooltipmanager.cpp +++ b/tooltipmanager.cpp @@ -217,6 +217,8 @@ void ToolTipManager::setContent(QGraphicsWidget *widget, const ToolTipContent &d } d->tipWidget->setContent(widget, data); + d->tipWidget->prepareShowing(); + d->tipWidget->moveTo(m_corona->popupPosition(d->currentWidget, d->tipWidget->size())); } } From 2be355b79d8dee5ce053124c83c5ea505067bbe0 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Thu, 15 Jan 2009 16:41:04 +0000 Subject: [PATCH 17/78] bring into line with Applet::list*; source compat, binary incompat. few users of this, though, and only applications, so impact is nominal. could do it in a BC way by poluting the API with another method that just takes a QString, but we stil have that sliver of a window open before 4.2.0, so use it to keep the API pristine. we can make it ugly after ;) svn path=/branches/KDE/4.2/kdelibs/; revision=911556 --- dataenginemanager.cpp | 13 +++++++++++-- dataenginemanager.h | 10 ++++++++-- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/dataenginemanager.cpp b/dataenginemanager.cpp index 9bf78d43b..59098074e 100644 --- a/dataenginemanager.cpp +++ b/dataenginemanager.cpp @@ -165,10 +165,19 @@ void DataEngineManager::unloadEngine(const QString &name) } } -QStringList DataEngineManager::listAllEngines() +QStringList DataEngineManager::listAllEngines(const QString &parentApp) { + QString constraint; + + if (parentApp.isEmpty()) { + constraint.append("not exist [X-KDE-ParentApp]"); + } else { + constraint.append("[X-KDE-ParentApp] == '").append(parentApp).append("'"); + } + + KService::List offers = KServiceTypeTrader::self()->query("Plasma/DataEngine", constraint); + QStringList engines; - KService::List offers = KServiceTypeTrader::self()->query("Plasma/DataEngine"); foreach (const KService::Ptr &service, offers) { QString name = service->property("X-KDE-PluginInfo-Name").toString(); if (!name.isEmpty()) { diff --git a/dataenginemanager.h b/dataenginemanager.h index 3519cc510..56dc5ba7b 100644 --- a/dataenginemanager.h +++ b/dataenginemanager.h @@ -72,9 +72,15 @@ class PLASMA_EXPORT DataEngineManager: public QObject void unloadEngine(const QString &name); /** - * Returns a listing of all known engines by name + * @return a listing of all known engines by name + * + * @param parentApp the application to filter applets on. Uses the + * X-KDE-ParentApp entry (if any) in the plugin info. + * The default value of QString() will result in a + * list containing only applets not specifically + * registered to an application. */ - static QStringList listAllEngines(); + static QStringList listAllEngines(const QString &parentApp = QString()); private: /** From c79e301e5cb38f0bb0c73abf2948f28c23d1e13e Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Fri, 16 Jan 2009 00:43:16 +0000 Subject: [PATCH 18/78] neat bug: changing Activity type while widgets are locked caused Appearances settings to be permahidden. chased out a few other ways to trigger this once tha t one was fixed, works nicely now. CCBUG:180887 svn path=/branches/KDE/4.2/kdelibs/; revision=911730 --- applet.cpp | 12 +++++++++--- containment.cpp | 13 ++++++++----- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/applet.cpp b/applet.cpp index ae0b35ff8..5cf0309f4 100644 --- a/applet.cpp +++ b/applet.cpp @@ -897,11 +897,13 @@ void Applet::flushPendingConstraintsEvents() action->setVisible(unlocked); action->setEnabled(unlocked); } - if (!KAuthorized::authorize("PlasmaAllowConfigureWhenLocked")) { + + bool canConfig = unlocked || KAuthorized::authorize("PlasmaAllowConfigureWhenLocked"); + if (canConfig) { action = d->actions.action("configure"); if (action) { - action->setVisible(unlocked); - action->setEnabled(unlocked); + action->setVisible(canConfig); + action->setEnabled(canConfig); } } } @@ -1256,6 +1258,10 @@ void Applet::setHasConfigurationInterface(bool hasInterface) configAction = new QAction(i18n("%1 Settings", name()), this); configAction->setIcon(KIcon("configure")); configAction->setShortcutContext(Qt::WidgetShortcut); //don't clash with other views + bool unlocked = immutability() == Mutable; + bool canConfig = unlocked || KAuthorized::authorize("PlasmaAllowConfigureWhenLocked"); + configAction->setVisible(canConfig); + configAction->setEnabled(canConfig); if (isContainment()) { //kDebug() << "I am a containment"; configAction->setShortcut(QKeySequence("ctrl+shift+s")); diff --git a/containment.cpp b/containment.cpp index 699c97b1f..e39854205 100644 --- a/containment.cpp +++ b/containment.cpp @@ -153,8 +153,9 @@ void Containment::init() QAction *configureActivityAction = new QAction(i18n("Appearance Settings"), this); configureActivityAction->setIcon(KIcon("configure")); - configureActivityAction->setVisible(unlocked); - configureActivityAction->setEnabled(unlocked); + bool canConfig = unlocked || KAuthorized::authorize("PlasmaAllowConfigureWhenLocked"); + configureActivityAction->setVisible(canConfig); + configureActivityAction->setEnabled(canConfig); connect(configureActivityAction, SIGNAL(triggered()), this, SLOT(requestConfiguration())); d->actions().addAction("activity settings", configureActivityAction); @@ -1599,11 +1600,13 @@ void ContainmentPrivate::containmentConstraintsEvent(Plasma::Constraints constra action->setText(unlocked ? i18n("Lock Widgets") : i18n("Unlock Widgets")); action->setIcon(KIcon(unlocked ? "object-locked" : "object-unlocked")); } - if (!KAuthorized::authorize("PlasmaAllowConfigureWhenLocked")) { + + bool canConfig = unlocked || KAuthorized::authorize("PlasmaAllowConfigureWhenLocked"); + if (canConfig) { action = actions().action("activity settings"); if (action) { - action->setVisible(unlocked); - action->setEnabled(unlocked); + action->setVisible(canConfig); + action->setEnabled(canConfig); } } From 27271961302dcd78d1dda1a2feecf33141b342ba Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Fri, 16 Jan 2009 13:30:09 +0000 Subject: [PATCH 19/78] SVN_SILENT made messages (.desktop file) svn path=/branches/KDE/4.2/kdelibs/; revision=911978 --- servicetypes/plasma-animator.desktop | 2 +- servicetypes/plasma-applet.desktop | 2 +- servicetypes/plasma-dataengine.desktop | 2 +- servicetypes/plasma-runner.desktop | 2 +- servicetypes/plasma-wallpaper.desktop | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/servicetypes/plasma-animator.desktop b/servicetypes/plasma-animator.desktop index 802ad2e8f..bf88631ff 100644 --- a/servicetypes/plasma-animator.desktop +++ b/servicetypes/plasma-animator.desktop @@ -6,7 +6,7 @@ Comment=Plasma Animation Engine Comment[ar]=محرك تحريك البلازما Comment[be@latin]=Systema animacyi „Plasma” Comment[bn]=প্লাসমা অ্যানিমেশন ইঞ্জিন -Comment[bn_IN]=প্লাসমা অ্যানিমেশন ইঞ্জিন +Comment[bn_IN]=Plasma অ্যানিমেশন ইঞ্জিন Comment[ca]=Motor d'animació del Plasma Comment[cs]=Animační nástroj Plasma Comment[da]=Plasma-animationsmotor diff --git a/servicetypes/plasma-applet.desktop b/servicetypes/plasma-applet.desktop index 0b02b0f38..a15a04eb7 100644 --- a/servicetypes/plasma-applet.desktop +++ b/servicetypes/plasma-applet.desktop @@ -8,7 +8,7 @@ Comment[as]=Plasma এপ্লেট Comment[be@latin]=Aplet „Plasma” Comment[bg]=Аплет за Plasma Comment[bn]=প্লাসমা অ্যাপলেট -Comment[bn_IN]=প্লাসমা অ্যাপলেট +Comment[bn_IN]=Plasma অ্যাপ্লেট Comment[ca]=Miniaplicació del Plasma Comment[da]=Plasma-applet Comment[de]=Plasma-Miniprogramm diff --git a/servicetypes/plasma-dataengine.desktop b/servicetypes/plasma-dataengine.desktop index 20c1dbcd8..9ad4d96ce 100644 --- a/servicetypes/plasma-dataengine.desktop +++ b/servicetypes/plasma-dataengine.desktop @@ -6,7 +6,7 @@ Comment=Plasma Data Engine Comment[ar]=محرك بيانات بلازما Comment[be@latin]=Systema dostupu da źviestak „Plasma” Comment[bn]=প্লাসমা ডাটা ইঞ্জিন -Comment[bn_IN]=প্লাসমা ডাটা ইঞ্জিন +Comment[bn_IN]=Plasma ডাটা ইঞ্জিন Comment[ca]=Motor de dades del Plasma Comment[cs]=Datový nástroj plasma Comment[da]=Plasma datamotor diff --git a/servicetypes/plasma-runner.desktop b/servicetypes/plasma-runner.desktop index d36adf93e..353984528 100644 --- a/servicetypes/plasma-runner.desktop +++ b/servicetypes/plasma-runner.desktop @@ -8,7 +8,7 @@ Comment[as]=KRunner প্লাগ-ইন Comment[be@latin]=Plugin dla „KRunner” Comment[bg]=Приставка за KRunner Comment[bn]=কে-রানার প্লাগ-ইন -Comment[bn_IN]=কে-রানার প্লাগ-ইন +Comment[bn_IN]=KRunner প্লাগ-ইন Comment[ca]=Connector del KRunner Comment[cs]=KRunner modul Comment[da]=KRunner-plugin diff --git a/servicetypes/plasma-wallpaper.desktop b/servicetypes/plasma-wallpaper.desktop index 3737eccf2..30f281041 100644 --- a/servicetypes/plasma-wallpaper.desktop +++ b/servicetypes/plasma-wallpaper.desktop @@ -7,7 +7,7 @@ Comment[ar]=خلفية شاشة بلازما Comment[be@latin]=Špalery „Plasma” Comment[bg]=Тапет за Plasma Comment[bn]=প্লাসমা ওয়ালপেপার -Comment[bn_IN]=প্লাসমা ওয়ালপেপার +Comment[bn_IN]=Plasma ওয়াল-পেপার Comment[ca]=Paper pintat del Plasma Comment[cs]=Tapeta Plasma Comment[da]=Plasma-baggrundsbillede From 3e1acc8e02a834f678a17356d67791a69fcd2ab4 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Fri, 16 Jan 2009 17:21:48 +0000 Subject: [PATCH 20/78] delete the config file first before the temp file so that it doesn't write itself out after the tempfile has been removed, avoiding spawning endless temp fil es. CCBBUG:180966 svn path=/branches/KDE/4.2/kdelibs/; revision=912083 --- private/service_p.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/private/service_p.h b/private/service_p.h index f82f4eb16..c345f2ac7 100644 --- a/private/service_p.h +++ b/private/service_p.h @@ -29,6 +29,8 @@ #include +#include "plasma/configloader.h" + namespace Plasma { @@ -74,8 +76,10 @@ public: tempFile(0) { } + ~ServicePrivate() { + delete config; delete tempFile; } From e87fe2244c2cd7010986041b2888d3b4882bad86 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Fri, 16 Jan 2009 20:14:05 +0000 Subject: [PATCH 21/78] backport the last chunks of svg fixes, namely now resize() and size() always behave as expected and the natural svg size is cached on disk svn path=/branches/KDE/4.2/kdelibs/; revision=912162 --- svg.cpp | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/svg.cpp b/svg.cpp index 60207ce98..7a6c3ede1 100644 --- a/svg.cpp +++ b/svg.cpp @@ -139,6 +139,17 @@ class SvgPrivate QObject::connect(KGlobalSettings::self(), SIGNAL(kdisplayPaletteChanged()), q, SLOT(colorsChanged())); } + + QRectF rect; + bool found = Theme::defaultTheme()->findInRectsCache(path, "_Natural", rect); + + if (found && !rect.isValid()) { + createRenderer(); + naturalSize = renderer->defaultSize(); + Theme::defaultTheme()->insertIntoRectsCache(path, "_Natural", QRectF(QPointF(0,0), naturalSize)); + } else { + naturalSize = rect.size(); + } } else if (QFile::exists(imagePath)) { path = imagePath; } else { @@ -454,6 +465,10 @@ void Svg::paint(QPainter *painter, int x, int y, int width, int height, const QS QSize Svg::size() const { + if (d->size.isEmpty()) { + d->size = d->naturalSize; + } + return d->size.toSize(); } @@ -475,17 +490,12 @@ void Svg::resize(const QSizeF &size) void Svg::resize() { - QSizeF newSize; - if (d->renderer) { - newSize = d->renderer->defaultSize(); - } - - if (qFuzzyCompare(newSize.width(), d->size.width()) && - qFuzzyCompare(newSize.height(), d->size.height())) { + if (qFuzzyCompare(d->naturalSize.width(), d->size.width()) && + qFuzzyCompare(d->naturalSize.height(), d->size.height())) { return; } - d->size = newSize; + d->size = d->naturalSize; d->localRectCache.clear(); } @@ -514,11 +524,11 @@ bool Svg::hasElement(const QString &elementId) const bool found = Theme::defaultTheme()->findInRectsCache(d->path, id, elementRect); if (found) { + d->localRectCache.insert(id, elementRect); return elementRect.isValid(); } else { // kDebug() << "** ** *** !!!!!!!! *** ** ** creating renderer due to hasElement miss" << d->path << elementId; - d->findAndCacheElementRect(elementId); - return d->renderer->elementExists(elementId); + return d->findAndCacheElementRect(elementId).isValid(); } } From e714099989c3e04c5f9f7d9abe6542494e0645ed Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Mon, 19 Jan 2009 14:10:42 +0000 Subject: [PATCH 22/78] SVN_SILENT made messages (.desktop file) svn path=/branches/KDE/4.2/kdelibs/; revision=913548 --- servicetypes/plasma-applet-extenderapplet.desktop | 1 + servicetypes/plasma-packagestructure.desktop | 1 + 2 files changed, 2 insertions(+) diff --git a/servicetypes/plasma-applet-extenderapplet.desktop b/servicetypes/plasma-applet-extenderapplet.desktop index e67f19a93..91ac8cb84 100644 --- a/servicetypes/plasma-applet-extenderapplet.desktop +++ b/servicetypes/plasma-applet-extenderapplet.desktop @@ -32,6 +32,7 @@ Name[pt_BR]=Recipiente de extensão interna Name[ro]=Container extensibil intern Name[ru]=Внутренний расширенный контейнер Name[sk]=Vnútorný predlžovací kontajner +Name[sl]=Notranji razširitveni vsebovalnik Name[sr]=унутрашњи садржалац проширивача Name[sr@latin]=unutrašnji sadržalac proširivača Name[sv]=Intern utökningsbehållare diff --git a/servicetypes/plasma-packagestructure.desktop b/servicetypes/plasma-packagestructure.desktop index 4bf8d7ed0..2061526ea 100644 --- a/servicetypes/plasma-packagestructure.desktop +++ b/servicetypes/plasma-packagestructure.desktop @@ -25,6 +25,7 @@ Comment[ja]=Plasma パッケージ構造の定義 Comment[km]=កា​រកំណត់​រចនាសម្ព័ន្ធ​កញ្ចប់​របស់​ប្លាស្មា Comment[ko]=Plasma 패키지 구조 정의 Comment[ku]=Daxuyaniya çêbûna pakêta Plasma +Comment[lt]=Plasma paketo struktūros aprašymas Comment[lv]=Plasma pakotņu struktūras definīcija Comment[mai]=प्लाजमा पैकेज संरचनाक परिभाषा Comment[ml]=പ്ലാസ്മ പാക്കേജ് സ്ട്രക്ചര്‍ ഡെഫനിഷന്‍ From 20f4e402d8e10f24747bd6e9135020b4b2ce6ddc Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Mon, 19 Jan 2009 16:04:03 +0000 Subject: [PATCH 23/78] Backport 913616 svn path=/branches/KDE/4.2/kdelibs/; revision=913618 --- extenderitem.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/extenderitem.cpp b/extenderitem.cpp index 94db3aa55..d57a1ebcc 100644 --- a/extenderitem.cpp +++ b/extenderitem.cpp @@ -95,6 +95,12 @@ ExtenderItem::ExtenderItem(Extender *hostExtender, uint extenderItemId) d->extenderItemId = ++ExtenderItemPrivate::s_maxExtenderItemId; } + //create the toolbox. + d->toolbox = new QGraphicsWidget(this); + d->toolboxLayout = new QGraphicsLinearLayout(d->toolbox); + d->toolbox->setLayout(d->toolboxLayout); + + //create items's configgroup KConfigGroup cg = hostExtender->d->applet->config("ExtenderItems"); KConfigGroup dg = KConfigGroup(&cg, QString::number(d->extenderItemId)); @@ -136,11 +142,6 @@ ExtenderItem::ExtenderItem(Extender *hostExtender, uint extenderItemId) connect(d->sourceApplet, SIGNAL(destroyed()), this, SLOT(sourceAppletRemoved())); connect(d->collapseIcon, SIGNAL(clicked()), this, SLOT(toggleCollapse())); - //create the toolbox. - d->toolbox = new QGraphicsWidget(this); - d->toolboxLayout = new QGraphicsLinearLayout(d->toolbox); - d->toolbox->setLayout(d->toolboxLayout); - //set the extender we want to move to. setExtender(hostExtender); From 35cd88ab4efadeaf458028c66b63d208b29c4562 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Tue, 20 Jan 2009 02:39:27 +0000 Subject: [PATCH 24/78] update() on icon config changes BUG:181298 svn path=/branches/KDE/4.2/kdelibs/; revision=913905 --- widgets/iconwidget.cpp | 19 +++++++++++++++++-- widgets/iconwidget.h | 3 ++- widgets/iconwidget_p.h | 2 ++ 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/widgets/iconwidget.cpp b/widgets/iconwidget.cpp index c58fe02b0..6b0370e0f 100644 --- a/widgets/iconwidget.cpp +++ b/widgets/iconwidget.cpp @@ -88,6 +88,19 @@ void IconWidgetPrivate::readColors() shadowColor = Plasma::Theme::defaultTheme()->color(Theme::BackgroundColor); } +void IconWidgetPrivate::colorConfigChanged() +{ + readColors(); + q->update(); +} + +void IconWidgetPrivate::iconConfigChanged() +{ + if (!icon.isNull()) { + q->update(); + } +} + IconAction::IconAction(IconWidget *icon, QAction *action) : m_icon(icon), m_action(action), @@ -296,8 +309,9 @@ IconWidget::~IconWidget() void IconWidgetPrivate::init() { readColors(); - QObject::connect(Plasma::Theme::defaultTheme(), SIGNAL(themeChanged()), q, SLOT(readColors())); - QObject::connect(KGlobalSettings::self(), SIGNAL(kdisplayPaletteChanged()), q, SLOT(readColors())); + QObject::connect(Plasma::Theme::defaultTheme(), SIGNAL(themeChanged()), q, SLOT(colorConfigChanged())); + QObject::connect(KGlobalSettings::self(), SIGNAL(kdisplayPaletteChanged()), q, SLOT(colorConfigChanged())); + QObject::connect(KGlobalSettings::self(), SIGNAL(iconChanged(int)), q, SLOT(iconConfigChanged())); // setAcceptedMouseButtons(Qt::LeftButton); q->setAcceptsHoverEvents(true); @@ -517,6 +531,7 @@ void IconWidget::setSvg(const QString &svgFilePath, const QString &elementId) d->iconSvg->setContainsMultipleImages(!elementId.isNull()); d->iconSvgElement = elementId; d->iconSvgElementChanged = true; + d->icon = QIcon(); update(); } diff --git a/widgets/iconwidget.h b/widgets/iconwidget.h index 2b9537b7d..2033742da 100644 --- a/widgets/iconwidget.h +++ b/widgets/iconwidget.h @@ -281,8 +281,9 @@ private: Q_PRIVATE_SLOT(d, void clearAction()) Q_PRIVATE_SLOT(d, void svgChanged()) Q_PRIVATE_SLOT(d, void actionDestroyed(QObject *obj)) - Q_PRIVATE_SLOT(d, void readColors()) Q_PRIVATE_SLOT(d, void hoverAnimationUpdate(qreal progress)) + Q_PRIVATE_SLOT(d, void colorConfigChanged()) + Q_PRIVATE_SLOT(d, void iconConfigChanged()) IconWidgetPrivate * const d; friend class IconWidgetPrivate; diff --git a/widgets/iconwidget_p.h b/widgets/iconwidget_p.h index 1782dbd6f..20f7d442b 100644 --- a/widgets/iconwidget_p.h +++ b/widgets/iconwidget_p.h @@ -179,6 +179,8 @@ public: void actionDestroyed(QObject *obj); void readColors(); + void colorConfigChanged(); + void iconConfigChanged(); void hoverAnimationUpdate(qreal progress); void init(); void layoutIcons(const QStyleOptionGraphicsItem *option); From 4f1ab996c25ce852560c538b9ca81b09477d40ef Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Tue, 20 Jan 2009 13:20:56 +0000 Subject: [PATCH 25/78] SVN_SILENT made messages (.desktop file) svn path=/branches/KDE/4.2/kdelibs/; revision=914107 --- servicetypes/plasma-animator.desktop | 1 + servicetypes/plasma-applet-extenderapplet.desktop | 1 + servicetypes/plasma-applet.desktop | 2 ++ 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, 13 insertions(+) diff --git a/servicetypes/plasma-animator.desktop b/servicetypes/plasma-animator.desktop index bf88631ff..527d26284 100644 --- a/servicetypes/plasma-animator.desktop +++ b/servicetypes/plasma-animator.desktop @@ -23,6 +23,7 @@ Comment[he]=מנוע אנימציה של Plasma Comment[hsb]=Plasma-engine za animacije Comment[hu]=Plasma animációkezelő Comment[is]=Plasma hreyfingastjóri +Comment[it]=Motore animazione Plasma Comment[ja]=Plasma アニメーションエンジン Comment[km]=ម៉ាស៊ីន​ចលនា​របស់ប្លាស្មា Comment[ko]=Plasma 애니메이션 엔진 diff --git a/servicetypes/plasma-applet-extenderapplet.desktop b/servicetypes/plasma-applet-extenderapplet.desktop index 91ac8cb84..f62ed09a4 100644 --- a/servicetypes/plasma-applet-extenderapplet.desktop +++ b/servicetypes/plasma-applet-extenderapplet.desktop @@ -16,6 +16,7 @@ Name[gu]=આંતરિક વિસ્તારક ધરાવનાર Name[he]=תוחם מרחיב פנימי Name[hu]=Tartóelem belső kiegészítésekhez Name[is]=Útvíkkaður innbyggður grunnur +Name[it]=Contenitore di estensione interno Name[km]=ឧបករណ៍​ផ្ទុក​កម្មវិធី​ពង្រីក​ខាង​ក្នុង Name[ku]=Wergirî ya Firehkera Hûndirîn Name[lv]=Iekšējais ekstendera konteineris diff --git a/servicetypes/plasma-applet.desktop b/servicetypes/plasma-applet.desktop index a15a04eb7..b6bba2f5c 100644 --- a/servicetypes/plasma-applet.desktop +++ b/servicetypes/plasma-applet.desktop @@ -18,11 +18,13 @@ Comment[et]=Plasma aplett Comment[eu]=Plasma appleta Comment[fi]=Plasma-sovelma Comment[fr]=Applet Plasma +Comment[fy]=Plasma Applet Comment[gl]=Applet de Plasma Comment[gu]=પ્લાઝમા એપ્લેટ Comment[he]=יישומון של Plasma Comment[hu]=Plasma-kisalkalmazás Comment[is]=Plasma smáforrit +Comment[it]=Applet Plasma Comment[ja]=Plasma アプレット Comment[km]=អាប់ភ្លេត​ប្លាស្មា Comment[ko]=Plasma 애플릿 diff --git a/servicetypes/plasma-containment.desktop b/servicetypes/plasma-containment.desktop index 8a5be5d84..aef57c712 100644 --- a/servicetypes/plasma-containment.desktop +++ b/servicetypes/plasma-containment.desktop @@ -22,6 +22,7 @@ Comment[he]=תוחם של יישומון Plasma וצובע הרקע 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 +Comment[it]=Contenitore applet Plasma e disegnatore dello sfondo Comment[ja]=Plasma アプレットの入れ物、背景の描画 Comment[km]=ឧបករណ៍​ផ្ទុក​អាប់ភ្លេត​ប្លាស្មា និង​កម្មវិធី​គូរ​ផ្ទៃខាងក្រោយ Comment[ku]=Embarvanê sepanoka Plasma û nexşevanê rûerdê diff --git a/servicetypes/plasma-dataengine.desktop b/servicetypes/plasma-dataengine.desktop index 9ad4d96ce..ff24c7617 100644 --- a/servicetypes/plasma-dataengine.desktop +++ b/servicetypes/plasma-dataengine.desktop @@ -23,6 +23,7 @@ Comment[he]=מנוע מידע עבור Plasma Comment[hsb]=Datowa engine za Plasma Comment[hu]=Plasma adatkezelő Comment[is]=Plasma gagnavél +Comment[it]=Motore dati Plasma Comment[ja]=Plasma データエンジン Comment[km]=ម៉ាស៊ីន​ទិន្នន័យ​ប្លាស្មា Comment[ko]=Plasma 데이터 엔진 diff --git a/servicetypes/plasma-packagestructure.desktop b/servicetypes/plasma-packagestructure.desktop index 2061526ea..69afd9ea8 100644 --- a/servicetypes/plasma-packagestructure.desktop +++ b/servicetypes/plasma-packagestructure.desktop @@ -21,6 +21,7 @@ Comment[he]=הגדרת מבנה של חבילת Plasma Comment[hsb]=Strukturna definicija Plasma-pakćika Comment[hu]=Struktúraleíró Plasma-csomagokhoz Comment[is]=Skilgreiningar Plasma pakkauppbyggingar +Comment[it]=Definizione struttura pacchetto Plasma Comment[ja]=Plasma パッケージ構造の定義 Comment[km]=កា​រកំណត់​រចនាសម្ព័ន្ធ​កញ្ចប់​របស់​ប្លាស្មា Comment[ko]=Plasma 패키지 구조 정의 diff --git a/servicetypes/plasma-runner.desktop b/servicetypes/plasma-runner.desktop index 353984528..27ed41347 100644 --- a/servicetypes/plasma-runner.desktop +++ b/servicetypes/plasma-runner.desktop @@ -24,6 +24,7 @@ Comment[gu]=KRunner પ્લગઈન Comment[he]=תוסף KRunner Comment[hu]=KRunner-bővítmény Comment[is]=KRunner íforrit +Comment[it]=Plugin KRunner Comment[ja]=KRunner プラグイン Comment[kk]=KRunner плагині Comment[km]=កម្មវិធី​ជំនួយ​របស់ KRunner diff --git a/servicetypes/plasma-scriptengine.desktop b/servicetypes/plasma-scriptengine.desktop index 6bbfbccf9..a70260c68 100644 --- a/servicetypes/plasma-scriptengine.desktop +++ b/servicetypes/plasma-scriptengine.desktop @@ -22,6 +22,7 @@ Comment[he]=הרחבת שפת תסריטים של Plasma Comment[hsb]=Skriptowa rěč jako Plasma-ekstensija Comment[hu]=Szkriptkezelő bővítmény a Plasmához Comment[is]=Framlenging á skriftunarmál fyrir Plasma +Comment[it]=Estensione linguaggio scripting per Plasma Comment[ja]=Plasma のためのスクリプト言語拡張 Comment[km]=ផ្នែក​បន្ថែម​ភាសា​ស្គ្រីប​សម្រាប់​ប្លាស្មា Comment[ko]=Plasma 스크립트 언어 확장 diff --git a/servicetypes/plasma-wallpaper.desktop b/servicetypes/plasma-wallpaper.desktop index 30f281041..ee299b76f 100644 --- a/servicetypes/plasma-wallpaper.desktop +++ b/servicetypes/plasma-wallpaper.desktop @@ -24,6 +24,7 @@ Comment[he]=תמונת רקע של Plasma Comment[hsb]=Tapeta za Plasma Comment[hu]=Plasma háttérkép Comment[is]=Plasma veggfóður +Comment[it]=Sfondo Plasma Comment[ja]=Plasma 壁紙 Comment[km]=ផ្ទាំង​រូបភាព​ប្លាស្មា Comment[ko]=Plasma 배경 그림 diff --git a/tests/packagemetadatatest.desktop b/tests/packagemetadatatest.desktop index e1fe06ad7..4ad482e4e 100644 --- a/tests/packagemetadatatest.desktop +++ b/tests/packagemetadatatest.desktop @@ -17,6 +17,7 @@ Name[he]=חבילת בדיקה של מטה־מידע Name[hsb]=Testowa dataja za metadata pakćika Name[hu]=PackageMetaData tesztfájl Name[is]=Package metagagna prófunarskrá +Name[it]=File di prova metadati pacchetto Name[km]=ឯកសារ​សាកល្បង​ទិន្នន័យ​មេតា​កញ្ចប់ Name[ko]=패키지 메타데이터 테스트 파일 Name[ku]=Pela ceribandinê ya serdana yê pakêtê @@ -64,6 +65,7 @@ Comment[he]=קובץ desktop לבדיקה של מחלקה 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 +Comment[it]=Un file desktop di prova per verificare la classe PackageMetaData. Comment[km]=ឯកសារ​ផ្ទៃតុ​សាកល្បង​ ដើម្បី​សាកល្បង​ថ្នាក់​របស់ PackageMetaData ។ Comment[ko]=PackageMetaData 클래스를 테스트하는 데스크톱 파일. Comment[ku]=Pela ceribandina sermasê ku beşên SerDanayêPakêtê diceribîne. diff --git a/tests/testengine/plasma-dataengine-testengine.desktop b/tests/testengine/plasma-dataengine-testengine.desktop index 8e120bc8f..9111a725e 100644 --- a/tests/testengine/plasma-dataengine-testengine.desktop +++ b/tests/testengine/plasma-dataengine-testengine.desktop @@ -19,6 +19,7 @@ Name[gu]=ચકાસણી માહિતી એન્જિન Name[he]=בדיקה למנוע מידע Name[hu]=Az adatkezelő modul tesztje Name[is]=Gagnaprófunarvél +Name[it]=Motore dati di prova Name[km]=សាកល្បង​ម៉ាស៊ីន​ទិន្នន័យ Name[ko]=테스트 데이터 엔진 Name[ku]=Motora Dane Ceribandinê From 72d8113c75a4e67227e96293258505f882581b4b Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Wed, 21 Jan 2009 06:19:33 +0000 Subject: [PATCH 26/78] need to do this before 4.2.0 so it can be public svn path=/branches/KDE/4.2/kdelibs/; revision=914447 --- applet.h | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/applet.h b/applet.h index 3239bd9f9..c4b095531 100644 --- a/applet.h +++ b/applet.h @@ -563,6 +563,16 @@ class PLASMA_EXPORT Applet : public QGraphicsWidget */ bool destroyed() const; + /** + * Reimplement this method so provide a configuration interface, + * parented to the supplied widget. Ownership of the widgets is passed + * to the parent widget. + * + * @param parent the dialog which is the parent of the configuration + * widgets + */ + virtual void createConfigurationInterface(KConfigDialog *parent); + Q_SIGNALS: /** * This signal indicates that an application launch, window @@ -727,16 +737,6 @@ class PLASMA_EXPORT Applet : public QGraphicsWidget */ void setConfigurationRequired(bool needsConfiguring, const QString &reason = QString()); - /** - * Reimplement this method so provide a configuration interface, - * parented to the supplied widget. Ownership of the widgets is passed - * to the parent widget. - * - * @param parent the dialog which is the parent of the configuration - * widgets - */ - virtual void createConfigurationInterface(KConfigDialog *parent); - /** * Called when any of the geometry constraints have been updated. * @@ -775,7 +775,6 @@ class PLASMA_EXPORT Applet : public QGraphicsWidget */ bool isRegisteredAsDragHandle(QGraphicsItem *item); - /** * @return the extender of this applet. */ From c989e14438464321dc6f6b93df40575249a06c2f Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Wed, 21 Jan 2009 13:40:16 +0000 Subject: [PATCH 27/78] SVN_SILENT made messages (.desktop file) svn path=/branches/KDE/4.2/kdelibs/; revision=914644 --- servicetypes/plasma-applet.desktop | 1 + servicetypes/plasma-runner.desktop | 1 + 2 files changed, 2 insertions(+) diff --git a/servicetypes/plasma-applet.desktop b/servicetypes/plasma-applet.desktop index b6bba2f5c..f85b13b88 100644 --- a/servicetypes/plasma-applet.desktop +++ b/servicetypes/plasma-applet.desktop @@ -19,6 +19,7 @@ Comment[eu]=Plasma appleta Comment[fi]=Plasma-sovelma Comment[fr]=Applet Plasma Comment[fy]=Plasma Applet +Comment[ga]=Feidhmchláirín Plasma Comment[gl]=Applet de Plasma Comment[gu]=પ્લાઝમા એપ્લેટ Comment[he]=יישומון של Plasma diff --git a/servicetypes/plasma-runner.desktop b/servicetypes/plasma-runner.desktop index 27ed41347..cc9071469 100644 --- a/servicetypes/plasma-runner.desktop +++ b/servicetypes/plasma-runner.desktop @@ -19,6 +19,7 @@ Comment[et]=KRunneri plugin Comment[eu]=KRnner plugin-a Comment[fi]=KRunner-liitännäinen Comment[fr]=Module KRunner +Comment[ga]=Breiseán KRunner Comment[gl]=Extensión KFileWrite Comment[gu]=KRunner પ્લગઈન Comment[he]=תוסף KRunner From cba376cd4c8036636380af2078be6caa621458c6 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Wed, 21 Jan 2009 18:24:47 +0000 Subject: [PATCH 28/78] actually need to update queueCount otherwise we just go until we run out of sources and an assert due to dequeuing an empty stack. whoops. svn path=/branches/KDE/4.2/kdelibs/; revision=914769 --- dataengine.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dataengine.cpp b/dataengine.cpp index e37943e89..1691a7e8c 100644 --- a/dataengine.cpp +++ b/dataengine.cpp @@ -636,9 +636,10 @@ DataContainer *DataEnginePrivate::requestSource(const QString &sourceName, bool void DataEnginePrivate::trimQueue() { uint queueCount = sourceQueue.count(); - while (queueCount >= limit) { + while (queueCount >= limit && !sourceQueue.isEmpty()) { DataContainer *punted = sourceQueue.dequeue(); q->removeSource(punted->objectName()); + queueCount = sourceQueue.count(); } } From 972ecd365b71fc1bbda7ea9362b21aa965b25d6e Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Wed, 21 Jan 2009 23:53:05 +0000 Subject: [PATCH 29/78] setIsContainment creates the toolbox which now reads the config, so we need the Corona sooner to get the right config file svn path=/branches/KDE/4.2/kdelibs/; revision=914888 --- corona.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/corona.cpp b/corona.cpp index 0a35ec44b..ae9e4b95b 100644 --- a/corona.cpp +++ b/corona.cpp @@ -152,9 +152,9 @@ public: containment->setFormFactor(Plasma::Planar); } + q->addItem(containment); static_cast(containment)->d->setIsContainment(true); containments.append(containment); - q->addItem(containment); if (!delayedInit) { containment->init(); @@ -300,7 +300,6 @@ void Corona::loadLayout(const QString &configName) continue; } - //addItem(c); c->init(); c->restore(containmentConfig); } From ce3cf3943c8b3627722114709a1f7ea00ad49715 Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Fri, 23 Jan 2009 13:13:26 +0000 Subject: [PATCH 30/78] SVN_SILENT made messages (.desktop file) svn path=/branches/KDE/4.2/kdelibs/; revision=915637 --- servicetypes/plasma-animator.desktop | 1 - servicetypes/plasma-applet-extenderapplet.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 - 11 files changed, 12 deletions(-) diff --git a/servicetypes/plasma-animator.desktop b/servicetypes/plasma-animator.desktop index 527d26284..5fa1a8f27 100644 --- a/servicetypes/plasma-animator.desktop +++ b/servicetypes/plasma-animator.desktop @@ -41,7 +41,6 @@ Comment[pl]=Silnik animacji Plazmy Comment[pt]=Motor de Animação do Plasma Comment[pt_BR]=Mecanismo de animação do Plasma Comment[ro]=Motor de animație Plasma -Comment[ru]=Движок анимации Plasma Comment[sk]=Engine animácii plasmy Comment[sl]=Animacijski pogon za Plasmo Comment[sr]=Плазма мотор анимација diff --git a/servicetypes/plasma-applet-extenderapplet.desktop b/servicetypes/plasma-applet-extenderapplet.desktop index f62ed09a4..811c38209 100644 --- a/servicetypes/plasma-applet-extenderapplet.desktop +++ b/servicetypes/plasma-applet-extenderapplet.desktop @@ -31,7 +31,6 @@ Name[pl]=Wewnętrzny kontener rozszerzeń Name[pt]=Contentor de Extensão Interno Name[pt_BR]=Recipiente de extensão interna Name[ro]=Container extensibil intern -Name[ru]=Внутренний расширенный контейнер Name[sk]=Vnútorný predlžovací kontajner Name[sl]=Notranji razširitveni vsebovalnik Name[sr]=унутрашњи садржалац проширивача diff --git a/servicetypes/plasma-applet.desktop b/servicetypes/plasma-applet.desktop index f85b13b88..b6231656e 100644 --- a/servicetypes/plasma-applet.desktop +++ b/servicetypes/plasma-applet.desktop @@ -42,7 +42,6 @@ Comment[pl]=Aplet Plazmy Comment[pt]='Applet' do Plasma Comment[pt_BR]=Miniaplicativo do Plasma Comment[ro]=Miniaplicație Plasma -Comment[ru]=Виджет Plasma Comment[sl]=Plasma programček Comment[sr]=Плазма аплет Comment[sr@latin]=Plasma aplet diff --git a/servicetypes/plasma-containment.desktop b/servicetypes/plasma-containment.desktop index aef57c712..1a626b5d7 100644 --- a/servicetypes/plasma-containment.desktop +++ b/servicetypes/plasma-containment.desktop @@ -38,7 +38,6 @@ Comment[pl]=Kontener apletu Plazmy i rysowanie tła Comment[pt]=Contentor de 'applets' do Plasma e pintor do fundo Comment[pt_BR]=Recipiente de miniaplicativos do Plasma e pintor de plano de fundo Comment[ro]=Container de miniaplicații Plasma și desenator de fundal -Comment[ru]=Контейнер виджета Plasma Comment[sk]=Plasma applet kontajner a popisovať na pozadí Comment[sl]=Vsebnik programčkov in izrisovalnik ozadja za Plasmo Comment[sr]=Садржалац плазма аплетâ и исцртавач позадине diff --git a/servicetypes/plasma-dataengine.desktop b/servicetypes/plasma-dataengine.desktop index ff24c7617..59393cf83 100644 --- a/servicetypes/plasma-dataengine.desktop +++ b/servicetypes/plasma-dataengine.desktop @@ -41,7 +41,6 @@ Comment[pl]=Silnik danych Plazmy Comment[pt]=Motor de Dados do Plasma Comment[pt_BR]=Mecanismo de dados do Plasma Comment[ro]=Motor de date Plasma -Comment[ru]=Движок Plasma для работы с данными Comment[sl]=Podatkovni pogon za Plasmo Comment[sr]=Плазма датомотор Comment[sr@latin]=Plasma datomotor diff --git a/servicetypes/plasma-packagestructure.desktop b/servicetypes/plasma-packagestructure.desktop index 69afd9ea8..cb516f745 100644 --- a/servicetypes/plasma-packagestructure.desktop +++ b/servicetypes/plasma-packagestructure.desktop @@ -39,7 +39,6 @@ Comment[pl]=Definicja struktury pakietu Plazmy Comment[pt]=Definição da estrutura de pacotes do Plasma Comment[pt_BR]=Definição de estrutura de pacote do Plasma Comment[ro]=Definiție de structură a pachetului Plasma -Comment[ru]=Определение структуры пакета Plasma Comment[sk]=Balík definícii štruktúry plasmy Comment[sl]=Definicija strukture paketa za Plasmo Comment[sr]=Дефиниција структуре плазма пакета diff --git a/servicetypes/plasma-runner.desktop b/servicetypes/plasma-runner.desktop index cc9071469..a2b1f4586 100644 --- a/servicetypes/plasma-runner.desktop +++ b/servicetypes/plasma-runner.desktop @@ -44,7 +44,6 @@ Comment[pl]=Wtyczka KRunnera Comment[pt]='Plugin' do KRunner Comment[pt_BR]=Plug-in do KRunner Comment[ro]=Modul KRunner -Comment[ru]=Расширение KRunner Comment[sk]=KRunner rozšírenie Comment[sl]=Vstavek za KRunner Comment[sr]=Прикључак за К‑извођач diff --git a/servicetypes/plasma-scriptengine.desktop b/servicetypes/plasma-scriptengine.desktop index a70260c68..18d31bb5a 100644 --- a/servicetypes/plasma-scriptengine.desktop +++ b/servicetypes/plasma-scriptengine.desktop @@ -39,7 +39,6 @@ Comment[pl]=Rozszerzenie języka skryptów dla Plazmy Comment[pt]=Extensão de linguagens de programação para o Plasma Comment[pt_BR]=Extensão de linguagem de script do Plasma Comment[ro]=Extensie de limbaj pentru scripturi Plasma -Comment[ru]=Поддержка скриптовых языков для Plasma Comment[sk]=Rozšírenie skryptovacieho jazyku pre Plasmu Comment[sl]=Razširitev s skriptnim jezikom za Plasmo Comment[sr]=Проширење Плазме за скриптне језике diff --git a/servicetypes/plasma-wallpaper.desktop b/servicetypes/plasma-wallpaper.desktop index ee299b76f..517bb7721 100644 --- a/servicetypes/plasma-wallpaper.desktop +++ b/servicetypes/plasma-wallpaper.desktop @@ -41,7 +41,6 @@ Comment[pl]=Tapeta Plazmy Comment[pt]=Papel de parede do Plasma Comment[pt_BR]=Papel de parede do Plasma Comment[ro]=Fundal Plasma -Comment[ru]=Обои Plasma Comment[sk]=Plasma Pozadie Comment[sl]=Tapeta za Plasmo Comment[sr]=Плазма тапет diff --git a/tests/packagemetadatatest.desktop b/tests/packagemetadatatest.desktop index 4ad482e4e..6f39e87e9 100644 --- a/tests/packagemetadatatest.desktop +++ b/tests/packagemetadatatest.desktop @@ -33,7 +33,6 @@ Name[pl]=Plik tekstowy metadanych pakietu Name[pt]=Ficheiro de testes de meta-dados dos pacotes Name[pt_BR]=Arquivo de teste dos metadados do pacote Name[ro]=Fișier de testat metadatele pachetelor -Name[ru]=Тестовый файл пакета с метаданными Name[sk]=Balík metadát testovacieho súboru Name[sl]=Datoteka za test metapodatkov paketa Name[sr]=Пробни фајл метаподатака пакета @@ -81,7 +80,6 @@ Comment[pl]=Plik testowy desktop do testowania klasy PackageMetaData. Comment[pt]=Um ficheiro 'desktop' de testes da classe PackageMetaData. Comment[pt_BR]=Um arquivo desktop de testes para a classe PackageMetaData. Comment[ro]=Un fișier de probă pentru a verifica clasa PackageMetadata. -Comment[ru]=Тестовый файл .desktop для проверки класса PackageMetaData Comment[sk]=Testovací súbor na ploche na testovanie PackageMetaData triedy. Comment[sl]=Namizna datoteka za test razreda PackageMetaData. Comment[sr]=Пробни .десктоп фајл за класу PackageMetaData. diff --git a/tests/testengine/plasma-dataengine-testengine.desktop b/tests/testengine/plasma-dataengine-testengine.desktop index 9111a725e..c134a15fc 100644 --- a/tests/testengine/plasma-dataengine-testengine.desktop +++ b/tests/testengine/plasma-dataengine-testengine.desktop @@ -35,7 +35,6 @@ Name[pl]=Silnik testów danych Name[pt]=Motor de Dados de Teste Name[pt_BR]=Mecanismo de dados de teste Name[ro]=Motor de date pentru teste -Name[ru]=Тестовый движок для работы с данными Name[sk]=Engine testovacích dát Name[sl]=Preizkusni pogon s podatki Name[sr]=пробни датомотор података From 107173a80e3d6051afd4ef15ca3b0ba2fc678519 Mon Sep 17 00:00:00 2001 From: Chani Armitage Date: Sun, 25 Jan 2009 04:24:22 +0000 Subject: [PATCH 31/78] disable the settings action when it's darn well supposed to be disabled svn path=/branches/KDE/4.2/kdelibs/; revision=916332 --- containment.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/containment.cpp b/containment.cpp index e39854205..c79736d98 100644 --- a/containment.cpp +++ b/containment.cpp @@ -1602,12 +1602,10 @@ void ContainmentPrivate::containmentConstraintsEvent(Plasma::Constraints constra } bool canConfig = unlocked || KAuthorized::authorize("PlasmaAllowConfigureWhenLocked"); - if (canConfig) { - action = actions().action("activity settings"); - if (action) { - action->setVisible(canConfig); - action->setEnabled(canConfig); - } + action = actions().action("activity settings"); + if (action) { + action->setVisible(canConfig); + action->setEnabled(canConfig); } // tell the applets too From 96832755098514c28232a98c40a6410e9fe3be0e Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Sun, 25 Jan 2009 19:22:36 +0000 Subject: [PATCH 32/78] backport a fix to a crash when removing the currently active tab svn path=/branches/KDE/4.2/kdelibs/; revision=916690 --- widgets/tabbar.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/widgets/tabbar.cpp b/widgets/tabbar.cpp index 478d59a49..d655e7d9e 100644 --- a/widgets/tabbar.cpp +++ b/widgets/tabbar.cpp @@ -360,18 +360,23 @@ void TabBar::removeTab(int index) return; } - int currentIndex = d->tabProxy->native->currentIndex(); - + int oldCurrentIndex = d->tabProxy->native->currentIndex(); d->tabProxy->native->removeTab(index); QGraphicsWidget *page = d->pages.takeAt(index); - if (index == currentIndex) { - setCurrentIndex(currentIndex); + int currentIndex = d->tabProxy->native->currentIndex(); + + if (oldCurrentIndex == index) { + d->tabWidgetLayout->removeAt(1); } scene()->removeItem(page); page->deleteLater(); + if (oldCurrentIndex != currentIndex) { + setCurrentIndex(currentIndex); + } + d->updateTabWidgetMode(); d->tabProxy->setPreferredSize(d->tabProxy->native->sizeHint()); } From 0e15fbe835637d299abf113e752d61acde29ef8f Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Mon, 26 Jan 2009 03:16:53 +0000 Subject: [PATCH 33/78] return whether the popup widget is shown as a popup, not whether it's at all visible BUG:181884 svn path=/branches/KDE/4.2/kdelibs/; revision=916813 --- popupapplet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/popupapplet.cpp b/popupapplet.cpp index a4726659e..5325b561d 100644 --- a/popupapplet.cpp +++ b/popupapplet.cpp @@ -435,7 +435,7 @@ bool PopupApplet::isPassivePopup() const bool PopupApplet::isPopupShowing() const { - return !d->dialog || d->dialog->isVisible(); + return d->dialog && d->dialog->isVisible(); } PopupAppletPrivate::PopupAppletPrivate(PopupApplet *applet) From 06406afafac4516e504a493baf43c2c4e0891b11 Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Mon, 26 Jan 2009 13:01:53 +0000 Subject: [PATCH 34/78] SVN_SILENT made messages (.desktop file) svn path=/branches/KDE/4.2/kdelibs/; revision=916904 --- servicetypes/plasma-applet.desktop | 1 + servicetypes/plasma-containment.desktop | 1 + servicetypes/plasma-scriptengine.desktop | 1 + servicetypes/plasma-wallpaper.desktop | 1 + tests/packagemetadatatest.desktop | 1 + tests/testengine/plasma-dataengine-testengine.desktop | 1 + 6 files changed, 6 insertions(+) diff --git a/servicetypes/plasma-applet.desktop b/servicetypes/plasma-applet.desktop index b6231656e..5286f78af 100644 --- a/servicetypes/plasma-applet.desktop +++ b/servicetypes/plasma-applet.desktop @@ -30,6 +30,7 @@ Comment[ja]=Plasma アプレット Comment[km]=អាប់ភ្លេត​ប្លាស្មា Comment[ko]=Plasma 애플릿 Comment[ku]=Sepanoka Plasma +Comment[lt]=Plasma įskiepis Comment[lv]=Plasma aplets Comment[mai]=प्लाजमा एप्पलेट Comment[ml]=പ്ലാസ്മ ലഘുപ്രയോഗം diff --git a/servicetypes/plasma-containment.desktop b/servicetypes/plasma-containment.desktop index 1a626b5d7..1ad4251c0 100644 --- a/servicetypes/plasma-containment.desktop +++ b/servicetypes/plasma-containment.desktop @@ -26,6 +26,7 @@ Comment[it]=Contenitore applet Plasma e disegnatore dello sfondo Comment[ja]=Plasma アプレットの入れ物、背景の描画 Comment[km]=ឧបករណ៍​ផ្ទុក​អាប់ភ្លេត​ប្លាស្មា និង​កម្មវិធី​គូរ​ផ្ទៃខាងក្រោយ 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 Comment[mai]=प्लाजमा एप्पलेट कंटेनर आओर पृष्ठभूमि पेंटर Comment[ml]=പ്ലാസ്മ ലഘുപ്രയോഗം കണ്ടൈനറും പശ്ചാത്തല പെയിന്ററും diff --git a/servicetypes/plasma-scriptengine.desktop b/servicetypes/plasma-scriptengine.desktop index 18d31bb5a..6d06c3793 100644 --- a/servicetypes/plasma-scriptengine.desktop +++ b/servicetypes/plasma-scriptengine.desktop @@ -27,6 +27,7 @@ Comment[ja]=Plasma のためのスクリプト言語拡張 Comment[km]=ផ្នែក​បន្ថែម​ភាសា​ស្គ្រីប​សម្រាប់​ប្លាស្មា Comment[ko]=Plasma 스크립트 언어 확장 Comment[ku]=Pêveka zimanê skrîpt kirinê ji bo Plasma +Comment[lt]=Scenarijų kalbos praplėtimas, skirtas Plasma Comment[lv]=Skriptēšanas valodu Plasma paplašinājums Comment[mai]=प्लाजमाक लेल स्क्रिप्टिंग भाषाक विस्तार Comment[ml]=പ്ലാസ്മയ്ക്കുള്ള സ്ക്രിപ്റ്റിങ്ങ് ഭാഷാ എക്സ്റ്റന്‍ഷന്‍ diff --git a/servicetypes/plasma-wallpaper.desktop b/servicetypes/plasma-wallpaper.desktop index 517bb7721..1d1328674 100644 --- a/servicetypes/plasma-wallpaper.desktop +++ b/servicetypes/plasma-wallpaper.desktop @@ -29,6 +29,7 @@ Comment[ja]=Plasma 壁紙 Comment[km]=ផ្ទាំង​រូបភាព​ប្លាស្មា Comment[ko]=Plasma 배경 그림 Comment[ku]=Wêne-rûerdê Plasma +Comment[lt]=Plasma apmušalas Comment[lv]=Plasma ekrāntapete Comment[mai]=प्लाजमा वालपेपर Comment[ml]=പ്ലാസ്മ ചുമര്‍ച്ചിത്രം diff --git a/tests/packagemetadatatest.desktop b/tests/packagemetadatatest.desktop index 6f39e87e9..51351197a 100644 --- a/tests/packagemetadatatest.desktop +++ b/tests/packagemetadatatest.desktop @@ -21,6 +21,7 @@ Name[it]=File di prova metadati pacchetto Name[km]=ឯកសារ​សាកល្បង​ទិន្នន័យ​មេតា​កញ្ចប់ Name[ko]=패키지 메타데이터 테스트 파일 Name[ku]=Pela ceribandinê ya serdana yê pakêtê +Name[lt]=Paketo metaduomenų bandomasis failas Name[lv]=Pakotņu metadatu testa fails Name[mai]=संकुलक मेटाडाटा जाँचि फाइल Name[ml]=പാക്കേജ് മെറ്റാഡാറ്റാ പരിശോധനാ ഫയല്‍ diff --git a/tests/testengine/plasma-dataengine-testengine.desktop b/tests/testengine/plasma-dataengine-testengine.desktop index c134a15fc..1921d7854 100644 --- a/tests/testengine/plasma-dataengine-testengine.desktop +++ b/tests/testengine/plasma-dataengine-testengine.desktop @@ -23,6 +23,7 @@ Name[it]=Motore dati di prova Name[km]=សាកល្បង​ម៉ាស៊ីន​ទិន្នន័យ Name[ko]=테스트 데이터 엔진 Name[ku]=Motora Dane Ceribandinê +Name[lt]=Bandomasis duomenų variklis Name[lv]=Testēšanas datu dzinējs Name[mai]=जाँचि डाटा इंडन Name[ml]=പരിശോധനാ ഡാറ്റാ എഞ്ചിന്‍ From ee34edad4a821f2973447d6600347acd81945527 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexis=20M=C3=A9nard?= Date: Wed, 28 Jan 2009 08:13:19 +0000 Subject: [PATCH 35/78] SVN commit 917619 Add an appletDestroyed signal instead of catching the destruction in containments with qobject destroyed signal. This fix errors because we give an invalid pointer to public appletRemoved signal. svn path=/branches/KDE/4.2/kdelibs/; revision=917622 --- applet.cpp | 3 +++ applet.h | 5 +++++ containment.cpp | 12 ++---------- containment.h | 2 +- private/containment_p.h | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/applet.cpp b/applet.cpp index 5cf0309f4..d4bf267a7 100644 --- a/applet.cpp +++ b/applet.cpp @@ -133,6 +133,9 @@ Applet::Applet(QObject *parentObject, const QVariantList &args) Applet::~Applet() { + //let people know that i will die + emit appletDestroyed(this); + if (d->transient) { d->resetConfigurationObject(); } else if (d->extender) { diff --git a/applet.h b/applet.h index c4b095531..5f5a21576 100644 --- a/applet.h +++ b/applet.h @@ -609,6 +609,11 @@ class PLASMA_EXPORT Applet : public QGraphicsWidget */ void activate(); + /** + * Emitted when the applet is deleted + */ + void appletDestroyed(Plasma::Applet *applet); + public Q_SLOTS: /** * Sets the immutability type for this applet (not immutable, diff --git a/containment.cpp b/containment.cpp index c79736d98..055b4a684 100644 --- a/containment.cpp +++ b/containment.cpp @@ -742,7 +742,7 @@ void Containment::addApplet(Applet *applet, const QPointF &pos, bool delayInit) connect(applet, SIGNAL(configNeedsSaving()), this, SIGNAL(configNeedsSaving())); connect(applet, SIGNAL(releaseVisualFocus()), this, SIGNAL(releaseVisualFocus())); - connect(applet, SIGNAL(destroyed(QObject*)), this, SLOT(appletDestroyed(QObject*))); + connect(applet, SIGNAL(appletDestroyed(Plasma::Applet*)), this, SLOT(appletDestroyed(Plasma::Applet*))); if (pos != QPointF(-1, -1)) { applet->setPos(pos); @@ -1709,16 +1709,8 @@ bool ContainmentPrivate::regionIsEmpty(const QRectF ®ion, Applet *ignoredAppl return true; } -void ContainmentPrivate::appletDestroyed(QObject *object) +void ContainmentPrivate::appletDestroyed(Plasma::Applet *applet) { - // we do a static_cast here since it really isn't an Applet by this - // point anymore since we are in the qobject dtor. we don't actually - // try and do anything with it, we just need the value of the pointer - // so this unsafe looking code is actually just fine. - // - // NOTE: DO NOT USE THE applet VARIABLE FOR ANYTHING OTHER THAN COMPARING - // THE ADDRESS! ACTUALLY USING THE OBJECT WILL RESULT IN A CRASH!!! - Applet *applet = static_cast(object); applets.removeAll(applet); if (focusedApplet == applet) { focusedApplet = 0; diff --git a/containment.h b/containment.h index 354ccb751..e2343415a 100644 --- a/containment.h +++ b/containment.h @@ -507,7 +507,7 @@ class PLASMA_EXPORT Containment : public Applet const QGraphicsItem *toolBoxItem() const; private: - Q_PRIVATE_SLOT(d, void appletDestroyed(QObject*)) + Q_PRIVATE_SLOT(d, void appletDestroyed(Plasma::Applet*)) Q_PRIVATE_SLOT(d, void containmentAppletAnimationComplete(QGraphicsItem *item, Plasma::Animator::Animation anim)) Q_PRIVATE_SLOT(d, void triggerShowAddWidgets()) diff --git a/private/containment_p.h b/private/containment_p.h index 6fe21b7bf..0a91b981c 100644 --- a/private/containment_p.h +++ b/private/containment_p.h @@ -75,7 +75,7 @@ public: void positionContainments(); void setLockToolText(); void handleDisappeared(AppletHandle *handle); - void appletDestroyed(QObject*); + void appletDestroyed(Plasma::Applet*); void containmentAppletAnimationComplete(QGraphicsItem *item, Plasma::Animator::Animation anim); void zoomIn(); void zoomOut(); From 2e983845d1ac01a8b6ad1af8f051537b95ed4dcf Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Thu, 29 Jan 2009 17:06:57 +0000 Subject: [PATCH 36/78] backport the initialization of some vars svn path=/branches/KDE/4.2/kdelibs/; revision=918217 --- widgets/busywidget.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/widgets/busywidget.cpp b/widgets/busywidget.cpp index efbc7005d..3a2d0741b 100644 --- a/widgets/busywidget.cpp +++ b/widgets/busywidget.cpp @@ -36,7 +36,9 @@ class BusyWidgetPrivate public: BusyWidgetPrivate() : svg(0), - timerId(0) + timerId(0), + rotationAngle(0), + rotation(0) { } From 930eaad353bbcc06a47fb7cdc51ffcb9a1551e07 Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Thu, 29 Jan 2009 17:17:20 +0000 Subject: [PATCH 37/78] SVN_SILENT made messages (.desktop file) svn path=/branches/KDE/4.2/kdelibs/; revision=918220 --- servicetypes/plasma-animator.desktop | 1 + servicetypes/plasma-applet-extenderapplet.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 + 11 files changed, 12 insertions(+) diff --git a/servicetypes/plasma-animator.desktop b/servicetypes/plasma-animator.desktop index 5fa1a8f27..b603b7807 100644 --- a/servicetypes/plasma-animator.desktop +++ b/servicetypes/plasma-animator.desktop @@ -41,6 +41,7 @@ Comment[pl]=Silnik animacji Plazmy Comment[pt]=Motor de Animação do Plasma Comment[pt_BR]=Mecanismo de animação do Plasma Comment[ro]=Motor de animație Plasma +Comment[ru]=Движок анимации для Plasma Comment[sk]=Engine animácii plasmy Comment[sl]=Animacijski pogon za Plasmo Comment[sr]=Плазма мотор анимација diff --git a/servicetypes/plasma-applet-extenderapplet.desktop b/servicetypes/plasma-applet-extenderapplet.desktop index 811c38209..840bb9c6c 100644 --- a/servicetypes/plasma-applet-extenderapplet.desktop +++ b/servicetypes/plasma-applet-extenderapplet.desktop @@ -31,6 +31,7 @@ Name[pl]=Wewnętrzny kontener rozszerzeń Name[pt]=Contentor de Extensão Interno Name[pt_BR]=Recipiente de extensão interna Name[ro]=Container extensibil intern +Name[ru]=Внутренний контейнер Name[sk]=Vnútorný predlžovací kontajner Name[sl]=Notranji razširitveni vsebovalnik Name[sr]=унутрашњи садржалац проширивача diff --git a/servicetypes/plasma-applet.desktop b/servicetypes/plasma-applet.desktop index 5286f78af..698e91cb6 100644 --- a/servicetypes/plasma-applet.desktop +++ b/servicetypes/plasma-applet.desktop @@ -43,6 +43,7 @@ Comment[pl]=Aplet Plazmy Comment[pt]='Applet' do Plasma Comment[pt_BR]=Miniaplicativo do Plasma Comment[ro]=Miniaplicație Plasma +Comment[ru]=Виджет Plasma Comment[sl]=Plasma programček Comment[sr]=Плазма аплет Comment[sr@latin]=Plasma aplet diff --git a/servicetypes/plasma-containment.desktop b/servicetypes/plasma-containment.desktop index 1ad4251c0..0c8303643 100644 --- a/servicetypes/plasma-containment.desktop +++ b/servicetypes/plasma-containment.desktop @@ -39,6 +39,7 @@ Comment[pl]=Kontener apletu Plazmy i rysowanie tła Comment[pt]=Contentor de 'applets' do Plasma e pintor do fundo Comment[pt_BR]=Recipiente de miniaplicativos do Plasma e pintor de plano de fundo Comment[ro]=Container de miniaplicații Plasma și desenator de fundal +Comment[ru]=Контейнер и модуль отрисовки виджета Plasma Comment[sk]=Plasma applet kontajner a popisovať na pozadí Comment[sl]=Vsebnik programčkov in izrisovalnik ozadja za Plasmo Comment[sr]=Садржалац плазма аплетâ и исцртавач позадине diff --git a/servicetypes/plasma-dataengine.desktop b/servicetypes/plasma-dataengine.desktop index 59393cf83..6f8c073d4 100644 --- a/servicetypes/plasma-dataengine.desktop +++ b/servicetypes/plasma-dataengine.desktop @@ -41,6 +41,7 @@ Comment[pl]=Silnik danych Plazmy Comment[pt]=Motor de Dados do Plasma Comment[pt_BR]=Mecanismo de dados do Plasma Comment[ro]=Motor de date Plasma +Comment[ru]=Источник данных Plasma Comment[sl]=Podatkovni pogon za Plasmo Comment[sr]=Плазма датомотор Comment[sr@latin]=Plasma datomotor diff --git a/servicetypes/plasma-packagestructure.desktop b/servicetypes/plasma-packagestructure.desktop index cb516f745..69afd9ea8 100644 --- a/servicetypes/plasma-packagestructure.desktop +++ b/servicetypes/plasma-packagestructure.desktop @@ -39,6 +39,7 @@ Comment[pl]=Definicja struktury pakietu Plazmy Comment[pt]=Definição da estrutura de pacotes do Plasma Comment[pt_BR]=Definição de estrutura de pacote do Plasma Comment[ro]=Definiție de structură a pachetului Plasma +Comment[ru]=Определение структуры пакета Plasma Comment[sk]=Balík definícii štruktúry plasmy Comment[sl]=Definicija strukture paketa za Plasmo Comment[sr]=Дефиниција структуре плазма пакета diff --git a/servicetypes/plasma-runner.desktop b/servicetypes/plasma-runner.desktop index a2b1f4586..cc9071469 100644 --- a/servicetypes/plasma-runner.desktop +++ b/servicetypes/plasma-runner.desktop @@ -44,6 +44,7 @@ Comment[pl]=Wtyczka KRunnera Comment[pt]='Plugin' do KRunner Comment[pt_BR]=Plug-in do KRunner Comment[ro]=Modul KRunner +Comment[ru]=Расширение KRunner Comment[sk]=KRunner rozšírenie Comment[sl]=Vstavek za KRunner Comment[sr]=Прикључак за К‑извођач diff --git a/servicetypes/plasma-scriptengine.desktop b/servicetypes/plasma-scriptengine.desktop index 6d06c3793..2cac671ce 100644 --- a/servicetypes/plasma-scriptengine.desktop +++ b/servicetypes/plasma-scriptengine.desktop @@ -40,6 +40,7 @@ Comment[pl]=Rozszerzenie języka skryptów dla Plazmy Comment[pt]=Extensão de linguagens de programação para o Plasma Comment[pt_BR]=Extensão de linguagem de script do Plasma Comment[ro]=Extensie de limbaj pentru scripturi Plasma +Comment[ru]=Поддержка скриптовых языков для Plasma Comment[sk]=Rozšírenie skryptovacieho jazyku pre Plasmu Comment[sl]=Razširitev s skriptnim jezikom za Plasmo Comment[sr]=Проширење Плазме за скриптне језике diff --git a/servicetypes/plasma-wallpaper.desktop b/servicetypes/plasma-wallpaper.desktop index 1d1328674..7934d4a8e 100644 --- a/servicetypes/plasma-wallpaper.desktop +++ b/servicetypes/plasma-wallpaper.desktop @@ -42,6 +42,7 @@ Comment[pl]=Tapeta Plazmy Comment[pt]=Papel de parede do Plasma Comment[pt_BR]=Papel de parede do Plasma Comment[ro]=Fundal Plasma +Comment[ru]=Обои Plasma Comment[sk]=Plasma Pozadie Comment[sl]=Tapeta za Plasmo Comment[sr]=Плазма тапет diff --git a/tests/packagemetadatatest.desktop b/tests/packagemetadatatest.desktop index 51351197a..cf0c2b625 100644 --- a/tests/packagemetadatatest.desktop +++ b/tests/packagemetadatatest.desktop @@ -34,6 +34,7 @@ Name[pl]=Plik tekstowy metadanych pakietu Name[pt]=Ficheiro de testes de meta-dados dos pacotes Name[pt_BR]=Arquivo de teste dos metadados do pacote Name[ro]=Fișier de testat metadatele pachetelor +Name[ru]=Тестовый файл метаданных пакета Name[sk]=Balík metadát testovacieho súboru Name[sl]=Datoteka za test metapodatkov paketa Name[sr]=Пробни фајл метаподатака пакета @@ -81,6 +82,7 @@ Comment[pl]=Plik testowy desktop do testowania klasy PackageMetaData. Comment[pt]=Um ficheiro 'desktop' de testes da classe PackageMetaData. Comment[pt_BR]=Um arquivo desktop de testes para a classe PackageMetaData. Comment[ro]=Un fișier de probă pentru a verifica clasa PackageMetadata. +Comment[ru]=Тестовый файл .desktop для проверки класса PackageMetaData. Comment[sk]=Testovací súbor na ploche na testovanie PackageMetaData triedy. Comment[sl]=Namizna datoteka za test razreda PackageMetaData. Comment[sr]=Пробни .десктоп фајл за класу PackageMetaData. diff --git a/tests/testengine/plasma-dataengine-testengine.desktop b/tests/testengine/plasma-dataengine-testengine.desktop index 1921d7854..8aac3e342 100644 --- a/tests/testengine/plasma-dataengine-testengine.desktop +++ b/tests/testengine/plasma-dataengine-testengine.desktop @@ -36,6 +36,7 @@ Name[pl]=Silnik testów danych Name[pt]=Motor de Dados de Teste Name[pt_BR]=Mecanismo de dados de teste Name[ro]=Motor de date pentru teste +Name[ru]=Тестовый источник данных Name[sk]=Engine testovacích dát Name[sl]=Preizkusni pogon s podatki Name[sr]=пробни датомотор података From 5171e27826b4fadb8d49048b09af2af1e763d217 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Sun, 1 Feb 2009 14:56:57 +0000 Subject: [PATCH 38/78] improved context menu handling svn path=/branches/KDE/4.2/kdelibs/; revision=919700 --- widgets/webview.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/widgets/webview.cpp b/widgets/webview.cpp index 8066baa65..fe003a5c7 100644 --- a/widgets/webview.cpp +++ b/widgets/webview.cpp @@ -232,9 +232,16 @@ void WebView::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) QContextMenuEvent ce(static_cast(event->reason()), event->pos().toPoint(), event->screenPos()); - d->page->event(&ce); - if (ce.isAccepted()) { + + if (d->page->swallowContextMenuEvent(&ce)) { event->accept(); + } else { + d->page->updatePositionDependentActions(event->pos().toPoint()); + + d->page->event(&ce); + if (ce.isAccepted()) { + event->accept(); + } } } From 2bbae9fb2db596aa73e4f2ae2b0a63b160a0c472 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20K=C3=BCgler?= Date: Sun, 1 Feb 2009 21:58:14 +0000 Subject: [PATCH 39/78] Make sure the source applet still exists backported from trunk svn path=/branches/KDE/4.2/kdelibs/; revision=919946 --- extenderitem.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/extenderitem.cpp b/extenderitem.cpp index d57a1ebcc..2504f1a31 100644 --- a/extenderitem.cpp +++ b/extenderitem.cpp @@ -449,10 +449,12 @@ void ExtenderItem::setCollapsed(bool collapsed) void ExtenderItem::returnToSource() { - if (!d->sourceApplet) { + if (!d || !d->sourceApplet) { return; } - setExtender(d->sourceApplet->d->extender); + if (d->sourceApplet->d) { + setExtender(d->sourceApplet->d->extender); + } } void ExtenderItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, From da498987a70d3be26b644f87a3a76f02229a59f1 Mon Sep 17 00:00:00 2001 From: Ambroz Bizjak Date: Tue, 3 Feb 2009 23:03:25 +0000 Subject: [PATCH 40/78] backport 916941 Don't wait for startup complete, it makes the applet obtain proper geometry too late, which causes the desktop applet positioning algorithm to calculate a wrong initial position. BUG: 181854 svn path=/branches/KDE/4.2/kdelibs/; revision=920881 --- popupapplet.cpp | 9 --------- private/popupapplet_p.h | 1 - 2 files changed, 10 deletions(-) diff --git a/popupapplet.cpp b/popupapplet.cpp index 5325b561d..a5c9873d4 100644 --- a/popupapplet.cpp +++ b/popupapplet.cpp @@ -131,14 +131,6 @@ void PopupAppletPrivate::checkExtenderAppearance(Plasma::FormFactor f) void PopupAppletPrivate::popupConstraintsEvent(Plasma::Constraints constraints) { - if (constraints & Plasma::StartupCompletedConstraint) { - startupComplete = true; - } - - if (!startupComplete) { - return; - } - Plasma::FormFactor f = q->formFactor(); if (constraints & Plasma::LocationConstraint) { @@ -446,7 +438,6 @@ PopupAppletPrivate::PopupAppletPrivate(PopupApplet *applet) popupPlacement(Plasma::FloatingPopup), savedAspectRatio(Plasma::InvalidAspectRatioMode), timer(0), - startupComplete(false), popupLostFocus(false), passive(false) { diff --git a/private/popupapplet_p.h b/private/popupapplet_p.h index 2c0e6d3bc..e0bc44fe4 100644 --- a/private/popupapplet_p.h +++ b/private/popupapplet_p.h @@ -46,7 +46,6 @@ public: Plasma::AspectRatioMode savedAspectRatio; QTimer *timer; QPoint clicked; - bool startupComplete : 1; bool popupLostFocus : 1; bool passive : 1; }; From f6e8ddef98185cb33050702d2bff674209637401 Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Sat, 7 Feb 2009 08:47:44 +0000 Subject: [PATCH 41/78] SVN_SILENT made messages (.desktop file) svn path=/branches/KDE/4.2/kdelibs/; revision=922551 --- servicetypes/plasma-animator.desktop | 1 + servicetypes/plasma-applet-extenderapplet.desktop | 1 + servicetypes/plasma-containment.desktop | 1 + servicetypes/plasma-dataengine.desktop | 1 + servicetypes/plasma-packagestructure.desktop | 1 + servicetypes/plasma-scriptengine.desktop | 1 + servicetypes/plasma-wallpaper.desktop | 1 + tests/packagemetadatatest.desktop | 2 ++ tests/testengine/plasma-dataengine-testengine.desktop | 2 ++ 9 files changed, 11 insertions(+) diff --git a/servicetypes/plasma-animator.desktop b/servicetypes/plasma-animator.desktop index b603b7807..94f5c3abf 100644 --- a/servicetypes/plasma-animator.desktop +++ b/servicetypes/plasma-animator.desktop @@ -17,6 +17,7 @@ Comment[et]=Plasma animatsiooni mootor Comment[eu]=Plasma animazio motorra Comment[fi]=Plasma-animointimoottori Comment[fr]=Moteur d'animation Plasma +Comment[ga]=Inneall Beochana Plasma Comment[gl]=Motor de animación de Plasma Comment[gu]=પ્લાઝમા એનિમેશન એન્જિન Comment[he]=מנוע אנימציה של Plasma diff --git a/servicetypes/plasma-applet-extenderapplet.desktop b/servicetypes/plasma-applet-extenderapplet.desktop index 840bb9c6c..d7e39514b 100644 --- a/servicetypes/plasma-applet-extenderapplet.desktop +++ b/servicetypes/plasma-applet-extenderapplet.desktop @@ -11,6 +11,7 @@ Name[et]=Sisemine laienduse konteiner Name[eu]=Barne edukiontzia hedatua Name[fi]=Sisäinen laajennussisällyttäjä Name[fr]=Extenseur de conteneur interne +Name[ga]=Gabhdán Sínteoirí Inmheánacha Name[gl]=Continente de extensor interno Name[gu]=આંતરિક વિસ્તારક ધરાવનાર Name[he]=תוחם מרחיב פנימי diff --git a/servicetypes/plasma-containment.desktop b/servicetypes/plasma-containment.desktop index 0c8303643..ed47de7a0 100644 --- a/servicetypes/plasma-containment.desktop +++ b/servicetypes/plasma-containment.desktop @@ -16,6 +16,7 @@ Comment[et]=Plasma apleti konteiner ja tausta joonistaja Comment[eu]=Plasma appletaren edukontzia eta atzeko planoaren margolaria Comment[fi]=Plasma sovelmasisällyttäjä ja taustapiirtäjä Comment[fr]=Conteneur d'applet Plasma et affichage d'arrière-plan +Comment[ga]=Coimeádán feidhmchláiríní Plasma agus péintéir cúlra Comment[gl]=Un contedor de applet de Plasma e pintor do fondo Comment[gu]=પ્લાઝમા એપ્લેટ ધરાવનાર અને પાશ્ચભાગ રંગનાર Comment[he]=תוחם של יישומון Plasma וצובע הרקע diff --git a/servicetypes/plasma-dataengine.desktop b/servicetypes/plasma-dataengine.desktop index 6f8c073d4..78040b2c2 100644 --- a/servicetypes/plasma-dataengine.desktop +++ b/servicetypes/plasma-dataengine.desktop @@ -17,6 +17,7 @@ Comment[et]=Plasma andmemootor Comment[eu]=Plasma datu motorra Comment[fi]=Plasma-tietomoottori Comment[fr]=Moteur de données Plasma +Comment[ga]=Inneall Sonraí Plasma Comment[gl]=Motor de dados de plasma Comment[gu]=પ્લાઝમા માહિતી એન્જિન Comment[he]=מנוע מידע עבור Plasma diff --git a/servicetypes/plasma-packagestructure.desktop b/servicetypes/plasma-packagestructure.desktop index 69afd9ea8..b8c31158b 100644 --- a/servicetypes/plasma-packagestructure.desktop +++ b/servicetypes/plasma-packagestructure.desktop @@ -15,6 +15,7 @@ Comment[et]=Plasma paketi struktuuri definitsioon Comment[eu]=Plassma paketearen egituraren definizioa Comment[fi]=Plasma-pakettirakenteen määritelmä Comment[fr]=Définition de la structure des paquetages Plasma +Comment[ga]=Sainmhíniú ar struchtúr pacáiste Plasma Comment[gl]=Definición da estrutura do paquete de Plasma Comment[gu]=પ્લાઝમા પેકેજ માળખાંની વ્યાખ્યા Comment[he]=הגדרת מבנה של חבילת Plasma diff --git a/servicetypes/plasma-scriptengine.desktop b/servicetypes/plasma-scriptengine.desktop index 2cac671ce..eb74b8f15 100644 --- a/servicetypes/plasma-scriptengine.desktop +++ b/servicetypes/plasma-scriptengine.desktop @@ -16,6 +16,7 @@ Comment[et]=Skriptikeele laiendus Plasmale Comment[eu]=Plasmarako script lengoaien gehigarria Comment[fi]=Skriptauskielituki Plasmalle Comment[fr]=Langage de script d'extension pour Plasma +Comment[ga]=Eisínteacht teanga scriptithe le haghaidh Plasma Comment[gl]=Extensicón de linguaxe de scripting para Plasma Comment[gu]=પ્લાઝમા માટે સ્ક્રિપ્ટીંગ ભાષા એક્સટેન્શન Comment[he]=הרחבת שפת תסריטים של Plasma diff --git a/servicetypes/plasma-wallpaper.desktop b/servicetypes/plasma-wallpaper.desktop index 7934d4a8e..62dd6c71f 100644 --- a/servicetypes/plasma-wallpaper.desktop +++ b/servicetypes/plasma-wallpaper.desktop @@ -18,6 +18,7 @@ Comment[et]=Plasma taustapilt Comment[eu]=Plasma horma papera Comment[fi]=Plasma-taustakuva Comment[fr]=Fond d'écran Plasma +Comment[ga]=Cúlbhrat Plasma Comment[gl]=Fondo de escritorio de Plasma Comment[gu]=પ્લાઝમા વોલપેપર Comment[he]=תמונת רקע של Plasma diff --git a/tests/packagemetadatatest.desktop b/tests/packagemetadatatest.desktop index cf0c2b625..5823d5e58 100644 --- a/tests/packagemetadatatest.desktop +++ b/tests/packagemetadatatest.desktop @@ -11,6 +11,7 @@ Name[es]=Archivo de pruebas de metadatos de paquete Name[et]=Plasma metaandmete testfail Name[eu]=Paketeen metadatuen proba fitxategia Name[fr]=Fichier de test des métadonnées de paquetage +Name[ga]=Comhad tástála le haghaidh PackageMetaData Name[gl]=Ficheiro de proba de metadatos de paquete Name[gu]=પેકેજ મેટાડેટા ચકાસણી ફાઇલ Name[he]=חבילת בדיקה של מטה־מידע @@ -60,6 +61,7 @@ Comment[es]=Un archivo de escritorio para probar la clase PackageMetaData. Comment[et]=Testtöölauafail klassi PackageMetaData testimiseks. Comment[eu]=PackageMetaData klasea probatzeko probako mahaigain fitxategia. Comment[fr]=Un fichier de bureau de démonstration pour tester la classe PackageMetaData. +Comment[ga]=Comhad tástála deisce a úsáidtear chun aicme PackageMetaData a thástáil. Comment[gl]=Un ficheiro de escritorio de proba para probar a clase PackageMetaData. Comment[gu]=પેકેજમેટાડેટા વર્ગ ચકાસવા માટે ચકાસણી ડેસ્કટોપ ફાઇલ. Comment[he]=קובץ desktop לבדיקה של מחלקה PackageMetaData. diff --git a/tests/testengine/plasma-dataengine-testengine.desktop b/tests/testengine/plasma-dataengine-testengine.desktop index 8aac3e342..172d8f698 100644 --- a/tests/testengine/plasma-dataengine-testengine.desktop +++ b/tests/testengine/plasma-dataengine-testengine.desktop @@ -6,6 +6,7 @@ Name[be@latin]=Systema spraŭdžvańnia dla źviestak Name[bn]=টেস্ট ডাটা ইঞ্জিন Name[bn_IN]=টেস্ট ডাটা ইঞ্জিন Name[ca]=Motor de dades de prova +Name[cs]=Testovací datový nástroj Name[da]=Test datamotor Name[de]=Test-Datentreiber Name[el]=Μηχανή δεδομένων ελέγχου @@ -14,6 +15,7 @@ Name[et]=Testandmemootor Name[eu]=Proba datuen motorra Name[fi]=Testitietomoottori Name[fr]=Moteur de données de test +Name[ga]=Inneall Sonraí Tástála Name[gl]=Motor de datos de probas Name[gu]=ચકાસણી માહિતી એન્જિન Name[he]=בדיקה למנוע מידע From b158bab9a125f40277a6c9797506f698e77696c4 Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Wed, 11 Feb 2009 08:18:52 +0000 Subject: [PATCH 42/78] SVN_SILENT made messages (.desktop file) svn path=/branches/KDE/4.2/kdelibs/; revision=924599 --- servicetypes/plasma-animator.desktop | 1 + servicetypes/plasma-applet-extenderapplet.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 + 11 files changed, 12 insertions(+) diff --git a/servicetypes/plasma-animator.desktop b/servicetypes/plasma-animator.desktop index 94f5c3abf..84bd72cd5 100644 --- a/servicetypes/plasma-animator.desktop +++ b/servicetypes/plasma-animator.desktop @@ -21,6 +21,7 @@ Comment[ga]=Inneall Beochana Plasma Comment[gl]=Motor de animación de Plasma Comment[gu]=પ્લાઝમા એનિમેશન એન્જિન Comment[he]=מנוע אנימציה של Plasma +Comment[hne]=प्लाज्मा एनिमेशन इंजिन 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 d7e39514b..e15ab6535 100644 --- a/servicetypes/plasma-applet-extenderapplet.desktop +++ b/servicetypes/plasma-applet-extenderapplet.desktop @@ -15,6 +15,7 @@ Name[ga]=Gabhdán Sínteoirí Inmheánacha Name[gl]=Continente de extensor interno Name[gu]=આંતરિક વિસ્તારક ધરાવનાર Name[he]=תוחם מרחיב פנימי +Name[hne]=इंटरनल एक्सटेंडर कंटेनर Name[hu]=Tartóelem belső kiegészítésekhez Name[is]=Útvíkkaður innbyggður grunnur Name[it]=Contenitore di estensione interno diff --git a/servicetypes/plasma-applet.desktop b/servicetypes/plasma-applet.desktop index 698e91cb6..e1610f376 100644 --- a/servicetypes/plasma-applet.desktop +++ b/servicetypes/plasma-applet.desktop @@ -23,6 +23,7 @@ Comment[ga]=Feidhmchláirín Plasma Comment[gl]=Applet de Plasma Comment[gu]=પ્લાઝમા એપ્લેટ Comment[he]=יישומון של Plasma +Comment[hne]=प्लाज्मा एपलेट Comment[hu]=Plasma-kisalkalmazás Comment[is]=Plasma smáforrit Comment[it]=Applet Plasma diff --git a/servicetypes/plasma-containment.desktop b/servicetypes/plasma-containment.desktop index ed47de7a0..c22920c8b 100644 --- a/servicetypes/plasma-containment.desktop +++ b/servicetypes/plasma-containment.desktop @@ -20,6 +20,7 @@ Comment[ga]=Coimeádán feidhmchláiríní Plasma agus péintéir cúlra Comment[gl]=Un contedor de applet de Plasma e pintor do fondo Comment[gu]=પ્લાઝમા એપ્લેટ ધરાવનાર અને પાશ્ચભાગ રંગનાર Comment[he]=תוחם של יישומון Plasma וצובע הרקע +Comment[hne]=प्लाज्मा एपलेट कंटेनर अउ पिछोत पुतइया 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 78040b2c2..d966112af 100644 --- a/servicetypes/plasma-dataengine.desktop +++ b/servicetypes/plasma-dataengine.desktop @@ -21,6 +21,7 @@ Comment[ga]=Inneall Sonraí Plasma Comment[gl]=Motor de dados de plasma Comment[gu]=પ્લાઝમા માહિતી એન્જિન Comment[he]=מנוע מידע עבור Plasma +Comment[hne]=प्लाज्मा डाटा इंजिन 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 b8c31158b..5615f5012 100644 --- a/servicetypes/plasma-packagestructure.desktop +++ b/servicetypes/plasma-packagestructure.desktop @@ -19,6 +19,7 @@ Comment[ga]=Sainmhíniú ar struchtúr pacáiste Plasma Comment[gl]=Definición da estrutura do paquete de Plasma Comment[gu]=પ્લાઝમા પેકેજ માળખાંની વ્યાખ્યા Comment[he]=הגדרת מבנה של חבילת Plasma +Comment[hne]=प्लाज्मा पैकेज स्ट्रक्चर परिभासा 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 cc9071469..cced5b81d 100644 --- a/servicetypes/plasma-runner.desktop +++ b/servicetypes/plasma-runner.desktop @@ -23,6 +23,7 @@ Comment[ga]=Breiseán KRunner Comment[gl]=Extensión KFileWrite Comment[gu]=KRunner પ્લગઈન Comment[he]=תוסף KRunner +Comment[hne]=के-रनरइट प्लगइन 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 eb74b8f15..bd54e1393 100644 --- a/servicetypes/plasma-scriptengine.desktop +++ b/servicetypes/plasma-scriptengine.desktop @@ -20,6 +20,7 @@ Comment[ga]=Eisínteacht teanga scriptithe le haghaidh Plasma Comment[gl]=Extensicón de linguaxe de scripting para Plasma Comment[gu]=પ્લાઝમા માટે સ્ક્રિપ્ટીંગ ભાષા એક્સટેન્શન Comment[he]=הרחבת שפת תסריטים של Plasma +Comment[hne]=प्लाज्मा बर स्क्रिप्टिंग भाखा 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 62dd6c71f..d23088b37 100644 --- a/servicetypes/plasma-wallpaper.desktop +++ b/servicetypes/plasma-wallpaper.desktop @@ -22,6 +22,7 @@ Comment[ga]=Cúlbhrat Plasma Comment[gl]=Fondo de escritorio de Plasma Comment[gu]=પ્લાઝમા વોલપેપર Comment[he]=תמונת רקע של Plasma +Comment[hne]=प्लाज्मा वालपेपर 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 5823d5e58..c38ee7ab9 100644 --- a/tests/packagemetadatatest.desktop +++ b/tests/packagemetadatatest.desktop @@ -15,6 +15,7 @@ Name[ga]=Comhad tástála le haghaidh PackageMetaData Name[gl]=Ficheiro de proba de metadatos de paquete Name[gu]=પેકેજ મેટાડેટા ચકાસણી ફાઇલ Name[he]=חבילת בדיקה של מטה־מידע +Name[hne]=पैकेज मेटाडाटा जांच फाइल Name[hsb]=Testowa dataja za metadata pakćika Name[hu]=PackageMetaData tesztfájl Name[is]=Package metagagna prófunarskrá @@ -65,6 +66,7 @@ Comment[ga]=Comhad tástála deisce a úsáidtear chun aicme PackageMetaData a t Comment[gl]=Un ficheiro de escritorio de proba para probar a clase PackageMetaData. Comment[gu]=પેકેજમેટાડેટા વર્ગ ચકાસવા માટે ચકાસણી ડેસ્કટોપ ફાઇલ. Comment[he]=קובץ desktop לבדיקה של מחלקה PackageMetaData. +Comment[hne]=पैकेज मेटाडाटा क्लास ल जांचे बर जांच डेस्कटाप फाइल 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 172d8f698..350091658 100644 --- a/tests/testengine/plasma-dataengine-testengine.desktop +++ b/tests/testengine/plasma-dataengine-testengine.desktop @@ -19,6 +19,7 @@ Name[ga]=Inneall Sonraí Tástála Name[gl]=Motor de datos de probas Name[gu]=ચકાસણી માહિતી એન્જિન Name[he]=בדיקה למנוע מידע +Name[hne]=जांच डाटा इंजिन Name[hu]=Az adatkezelő modul tesztje Name[is]=Gagnaprófunarvél Name[it]=Motore dati di prova From c0a59aee37c6c352c414b35dc2b0b064577b8f28 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Thu, 12 Feb 2009 18:21:32 +0000 Subject: [PATCH 43/78] make this a dummy function with qt 4.5 (removed completely in trunk) svn path=/branches/KDE/4.2/kdelibs/; revision=925208 --- extender.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/extender.cpp b/extender.cpp index 6dda436e7..696c7c1bb 100644 --- a/extender.cpp +++ b/extender.cpp @@ -467,6 +467,9 @@ void ExtenderPrivate::updateBorders() void ExtenderPrivate::adjustSizeHints() { +#if (QT_VERSION >= QT_VERSION_CHECK(4, 90, 0)) + return; +#endif //FIXME: what happens in this function are some nasty workarounds for a bug in qt4.4's QGL. //Alexis has told me they are working on a fix for qt4.5, so this can be removed once the bug //has been fixed in Qt. From 515aaf9895643bf8d614de439fade54c7a53b97f Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Tue, 17 Feb 2009 06:27:43 +0000 Subject: [PATCH 44/78] SVN_SILENT made messages (.desktop file) svn path=/branches/KDE/4.2/kdelibs/; revision=927240 --- servicetypes/plasma-animator.desktop | 1 + servicetypes/plasma-applet-extenderapplet.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 + 11 files changed, 12 insertions(+) diff --git a/servicetypes/plasma-animator.desktop b/servicetypes/plasma-animator.desktop index 84bd72cd5..f42943e8b 100644 --- a/servicetypes/plasma-animator.desktop +++ b/servicetypes/plasma-animator.desktop @@ -44,6 +44,7 @@ Comment[pt]=Motor de Animação do Plasma Comment[pt_BR]=Mecanismo de animação do Plasma Comment[ro]=Motor de animație Plasma Comment[ru]=Движок анимации для Plasma +Comment[se]=Plasma-animerenmohtor Comment[sk]=Engine animácii plasmy Comment[sl]=Animacijski pogon za Plasmo Comment[sr]=Плазма мотор анимација diff --git a/servicetypes/plasma-applet-extenderapplet.desktop b/servicetypes/plasma-applet-extenderapplet.desktop index e15ab6535..75d3b2f05 100644 --- a/servicetypes/plasma-applet-extenderapplet.desktop +++ b/servicetypes/plasma-applet-extenderapplet.desktop @@ -34,6 +34,7 @@ Name[pt]=Contentor de Extensão Interno Name[pt_BR]=Recipiente de extensão interna Name[ro]=Container extensibil intern Name[ru]=Внутренний контейнер +Name[se]=Siskkáldas viiddáduslihtti Name[sk]=Vnútorný predlžovací kontajner Name[sl]=Notranji razširitveni vsebovalnik Name[sr]=унутрашњи садржалац проширивача diff --git a/servicetypes/plasma-applet.desktop b/servicetypes/plasma-applet.desktop index e1610f376..9300e88b1 100644 --- a/servicetypes/plasma-applet.desktop +++ b/servicetypes/plasma-applet.desktop @@ -45,6 +45,7 @@ Comment[pt]='Applet' do Plasma Comment[pt_BR]=Miniaplicativo do Plasma Comment[ro]=Miniaplicație Plasma Comment[ru]=Виджет Plasma +Comment[se]=Plasma-prográmmaš Comment[sl]=Plasma programček Comment[sr]=Плазма аплет Comment[sr@latin]=Plasma aplet diff --git a/servicetypes/plasma-containment.desktop b/servicetypes/plasma-containment.desktop index c22920c8b..5fdab47d3 100644 --- a/servicetypes/plasma-containment.desktop +++ b/servicetypes/plasma-containment.desktop @@ -42,6 +42,7 @@ Comment[pt]=Contentor de 'applets' do Plasma e pintor do fundo Comment[pt_BR]=Recipiente de miniaplicativos do Plasma e pintor de plano de fundo Comment[ro]=Container de miniaplicații Plasma și desenator de fundal Comment[ru]=Контейнер и модуль отрисовки виджета Plasma +Comment[se]=Plasma-prográmmašlihtti ja -duogášmálejeaddji Comment[sk]=Plasma applet kontajner a popisovať na pozadí Comment[sl]=Vsebnik programčkov in izrisovalnik ozadja za Plasmo Comment[sr]=Садржалац плазма аплетâ и исцртавач позадине diff --git a/servicetypes/plasma-dataengine.desktop b/servicetypes/plasma-dataengine.desktop index d966112af..f4bd070bf 100644 --- a/servicetypes/plasma-dataengine.desktop +++ b/servicetypes/plasma-dataengine.desktop @@ -44,6 +44,7 @@ Comment[pt]=Motor de Dados do Plasma Comment[pt_BR]=Mecanismo de dados do Plasma Comment[ro]=Motor de date Plasma Comment[ru]=Источник данных Plasma +Comment[se]=Plasma-dáhtamohtor Comment[sl]=Podatkovni pogon za Plasmo Comment[sr]=Плазма датомотор Comment[sr@latin]=Plasma datomotor diff --git a/servicetypes/plasma-packagestructure.desktop b/servicetypes/plasma-packagestructure.desktop index 5615f5012..9491d6d8d 100644 --- a/servicetypes/plasma-packagestructure.desktop +++ b/servicetypes/plasma-packagestructure.desktop @@ -42,6 +42,7 @@ Comment[pt]=Definição da estrutura de pacotes do Plasma Comment[pt_BR]=Definição de estrutura de pacote do Plasma Comment[ro]=Definiție de structură a pachetului Plasma Comment[ru]=Определение структуры пакета Plasma +Comment[se]=Plasma-páhkkaráhkadusdefinišuvdna Comment[sk]=Balík definícii štruktúry plasmy Comment[sl]=Definicija strukture paketa za Plasmo Comment[sr]=Дефиниција структуре плазма пакета diff --git a/servicetypes/plasma-runner.desktop b/servicetypes/plasma-runner.desktop index cced5b81d..9e24f0966 100644 --- a/servicetypes/plasma-runner.desktop +++ b/servicetypes/plasma-runner.desktop @@ -46,6 +46,7 @@ Comment[pt]='Plugin' do KRunner Comment[pt_BR]=Plug-in do KRunner Comment[ro]=Modul KRunner Comment[ru]=Расширение KRunner +Comment[se]=KRunner-lassemodula Comment[sk]=KRunner rozšírenie Comment[sl]=Vstavek za KRunner Comment[sr]=Прикључак за К‑извођач diff --git a/servicetypes/plasma-scriptengine.desktop b/servicetypes/plasma-scriptengine.desktop index bd54e1393..6c161bf02 100644 --- a/servicetypes/plasma-scriptengine.desktop +++ b/servicetypes/plasma-scriptengine.desktop @@ -43,6 +43,7 @@ Comment[pt]=Extensão de linguagens de programação para o Plasma Comment[pt_BR]=Extensão de linguagem de script do Plasma Comment[ro]=Extensie de limbaj pentru scripturi Plasma Comment[ru]=Поддержка скриптовых языков для Plasma +Comment[se]=Skriptagiellaviiddádus Plasmai Comment[sk]=Rozšírenie skryptovacieho jazyku pre Plasmu Comment[sl]=Razširitev s skriptnim jezikom za Plasmo Comment[sr]=Проширење Плазме за скриптне језике diff --git a/servicetypes/plasma-wallpaper.desktop b/servicetypes/plasma-wallpaper.desktop index d23088b37..5d1a4bee4 100644 --- a/servicetypes/plasma-wallpaper.desktop +++ b/servicetypes/plasma-wallpaper.desktop @@ -45,6 +45,7 @@ Comment[pt]=Papel de parede do Plasma Comment[pt_BR]=Papel de parede do Plasma Comment[ro]=Fundal Plasma Comment[ru]=Обои Plasma +Comment[se]=Plasma-duogášgovva Comment[sk]=Plasma Pozadie Comment[sl]=Tapeta za Plasmo Comment[sr]=Плазма тапет diff --git a/tests/packagemetadatatest.desktop b/tests/packagemetadatatest.desktop index c38ee7ab9..453741bba 100644 --- a/tests/packagemetadatatest.desktop +++ b/tests/packagemetadatatest.desktop @@ -37,6 +37,7 @@ Name[pt]=Ficheiro de testes de meta-dados dos pacotes Name[pt_BR]=Arquivo de teste dos metadados do pacote Name[ro]=Fișier de testat metadatele pachetelor Name[ru]=Тестовый файл метаданных пакета +Name[se]=Páhkametedáhtaid geahččalanfiila Name[sk]=Balík metadát testovacieho súboru Name[sl]=Datoteka za test metapodatkov paketa Name[sr]=Пробни фајл метаподатака пакета @@ -87,6 +88,7 @@ Comment[pt]=Um ficheiro 'desktop' de testes da classe PackageMetaData. Comment[pt_BR]=Um arquivo desktop de testes para a classe PackageMetaData. Comment[ro]=Un fișier de probă pentru a verifica clasa PackageMetadata. Comment[ru]=Тестовый файл .desktop для проверки класса PackageMetaData. +Comment[se]=Geahččalan desktop-fiilla mainna geahččala PackageMeta-luohká. Comment[sk]=Testovací súbor na ploche na testovanie PackageMetaData triedy. Comment[sl]=Namizna datoteka za test razreda PackageMetaData. Comment[sr]=Пробни .десктоп фајл за класу PackageMetaData. diff --git a/tests/testengine/plasma-dataengine-testengine.desktop b/tests/testengine/plasma-dataengine-testengine.desktop index 350091658..5fe5b953d 100644 --- a/tests/testengine/plasma-dataengine-testengine.desktop +++ b/tests/testengine/plasma-dataengine-testengine.desktop @@ -40,6 +40,7 @@ Name[pt]=Motor de Dados de Teste Name[pt_BR]=Mecanismo de dados de teste Name[ro]=Motor de date pentru teste Name[ru]=Тестовый источник данных +Name[se]=Geahččalandáhtamohtor Name[sk]=Engine testovacích dát Name[sl]=Preizkusni pogon s podatki Name[sr]=пробни датомотор података From 6ebe8f0b9fd890d7c1a06eddb1896b41df13de6d Mon Sep 17 00:00:00 2001 From: Ambroz Bizjak Date: Wed, 18 Feb 2009 14:01:30 +0000 Subject: [PATCH 45/78] backport revision 927886 Fix regressions introduced by 914888. On the other hand, Corona::addItem indirectly calls Containment::itemChange, which ends up calling AppletPrivate::mainConfigGroup, which then creates a config group in the wrong file (plasmarc) because isContainment was not set. This also caused a regression where removed applets reappeared on next plasma run. Fix: Manually set isContainment before adding the item to the corona, then call setIsContainment with a new argument to force the initialization. svn path=/branches/KDE/4.2/kdelibs/; revision=927891 --- applet.cpp | 4 ++-- corona.cpp | 3 ++- private/applet_p.h | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/applet.cpp b/applet.cpp index d4bf267a7..940ab2b44 100644 --- a/applet.cpp +++ b/applet.cpp @@ -1769,9 +1769,9 @@ void Applet::lower() setZValue(--AppletPrivate::s_minZValue); } -void AppletPrivate::setIsContainment(bool nowIsContainment) +void AppletPrivate::setIsContainment(bool nowIsContainment, bool forceUpdate) { - if (isContainment == nowIsContainment) { + if (isContainment == nowIsContainment && !forceUpdate) { return; } diff --git a/corona.cpp b/corona.cpp index ae9e4b95b..4cf2db94e 100644 --- a/corona.cpp +++ b/corona.cpp @@ -152,8 +152,9 @@ public: containment->setFormFactor(Plasma::Planar); } + static_cast(containment)->d->isContainment = true; q->addItem(containment); - static_cast(containment)->d->setIsContainment(true); + static_cast(containment)->d->setIsContainment(true, true); containments.append(containment); if (!delayedInit) { diff --git a/private/applet_p.h b/private/applet_p.h index 0c0a680f3..87e27c2ca 100644 --- a/private/applet_p.h +++ b/private/applet_p.h @@ -58,7 +58,7 @@ public: /** * Sets whether or not this Applet is acting as a Containment */ - void setIsContainment(bool isContainment); + void setIsContainment(bool isContainment, bool forceUpdate = false); QString globalName() const; QString instanceName(); From c4e98d21ed8986660c72e1b5e61b553aff0e1c64 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Thu, 19 Feb 2009 19:58:04 +0000 Subject: [PATCH 46/78] backport fix for br#176280 BUG:176280 svn path=/branches/KDE/4.2/kdelibs/; revision=928672 --- containment.cpp | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/containment.cpp b/containment.cpp index 055b4a684..82f24bbb5 100644 --- a/containment.cpp +++ b/containment.cpp @@ -1071,6 +1071,19 @@ const QGraphicsItem *Containment::toolBoxItem() const void Containment::resizeEvent(QGraphicsSceneResizeEvent *event) { Applet::resizeEvent(event); + + if (!ContainmentPrivate::s_positioning) { + switch (d->type) { + case Containment::PanelContainment: + case Containment::CustomPanelContainment: + d->positionPanel(); + break; + default: + d->positionContainments(); + break; + } + } + if (d->wallpaper) { d->wallpaper->setBoundingRect(boundingRect()); } @@ -1639,18 +1652,6 @@ void ContainmentPrivate::containmentConstraintsEvent(Plasma::Constraints constra } } - if (constraints & Plasma::SizeConstraint && !ContainmentPrivate::s_positioning) { - switch (q->containmentType()) { - case Containment::PanelContainment: - case Containment::CustomPanelContainment: - positionPanel(); - break; - default: - positionContainments(); - break; - } - } - if (toolBox && (constraints & Plasma::SizeConstraint || constraints & Plasma::FormFactorConstraint || constraints & Plasma::ScreenConstraint || @@ -1826,6 +1827,7 @@ void ContainmentPrivate::positionPanel(bool force) // we position panels in negative coordinates, and stack all horizontal // and all vertical panels with each other. + const QPointF p = q->pos(); if (!force && From 2321a47eaeb10c3030ba5372ee636f433190bc51 Mon Sep 17 00:00:00 2001 From: Ambroz Bizjak Date: Fri, 20 Feb 2009 23:24:50 +0000 Subject: [PATCH 47/78] backport revision 929233 Fix handle possibly moving to the other side if the cursor exist for a short time. Remove the handle if the cursor goes away before we even appear, previously the handle was kept invisible until the cursor next entered. svn path=/branches/KDE/4.2/kdelibs/; revision=929237 --- private/applethandle.cpp | 40 +++++++++++++++++++--------------------- private/applethandle_p.h | 4 ++-- 2 files changed, 21 insertions(+), 23 deletions(-) diff --git a/private/applethandle.cpp b/private/applethandle.cpp index 40b6cf0e1..64db9889b 100644 --- a/private/applethandle.cpp +++ b/private/applethandle.cpp @@ -102,7 +102,7 @@ AppletHandle::AppletHandle(Containment *parent, Applet *applet, const QPointF &h m_leaveTimer->setSingleShot(true); m_leaveTimer->setInterval(500); - connect(m_hoverTimer, SIGNAL(timeout()), this, SLOT(fadeIn())); + connect(m_hoverTimer, SIGNAL(timeout()), this, SLOT(hoverTimeout())); connect(m_leaveTimer, SIGNAL(timeout()), this, SLOT(leaveTimeout())); connect(m_applet, SIGNAL(destroyed(QObject*)), this, SLOT(appletDestroyed())); @@ -145,7 +145,7 @@ void AppletHandle::detachApplet () return; } - disconnect(m_hoverTimer, SIGNAL(timeout()), this, SLOT(fadeIn())); + disconnect(m_hoverTimer, SIGNAL(timeout()), this, SLOT(hoverTimeout())); disconnect(m_leaveTimer, SIGNAL(timeout()), this, SLOT(leaveTimeout())); m_applet->disconnect(this); @@ -771,29 +771,29 @@ void AppletHandle::hoverEnterEvent(QGraphicsSceneHoverEvent *event) //kDebug() << "hover enter"; //if a disappear was scheduled stop the timer - m_leaveTimer->stop(); - + if (m_leaveTimer->isActive()) { + m_leaveTimer->stop(); + } // if we're already fading out, fade back in - if (m_animId != 0 && m_anim == FadeOut) { - startFading(FadeIn, m_entryPos); - } else { - //schedule appear - m_hoverTimer->start(); + else if (m_animId != 0 && m_anim == FadeOut) { + startFading(FadeIn, m_entryPos, true); } } void AppletHandle::hoverMoveEvent(QGraphicsSceneHoverEvent *event) { - Q_UNUSED(event); - m_leaveTimer->stop(); + hoverEnterEvent(event); } void AppletHandle::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) { Q_UNUSED(event); - m_hoverTimer->stop(); - if (m_pressedButton != NoButton) { + // if we haven't even showed up yet, remove the handle + if (m_hoverTimer->isActive()) { + m_hoverTimer->stop(); + QTimer::singleShot(0, this, SLOT(emitDisappear())); + } else if (m_pressedButton != NoButton) { m_pendingFade = true; } else { //wait a moment to hide the handle in order to recheck the mouse position @@ -829,7 +829,7 @@ void AppletHandle::fadeAnimation(qreal progress) update(); } -void AppletHandle::fadeIn() +void AppletHandle::hoverTimeout() { startFading(FadeIn, m_entryPos); } @@ -856,20 +856,16 @@ void AppletHandle::setHoverPos(const QPointF &hoverPos) m_entryPos = hoverPos; } -void AppletHandle::startFading(FadeType anim, const QPointF &hoverPos) +void AppletHandle::startFading(FadeType anim, const QPointF &hoverPos, bool preserveSide) { if (m_animId != 0) { Animator::self()->stopCustomAnimation(m_animId); } - m_hoverTimer->stop(); - m_leaveTimer->stop(); - m_entryPos = hoverPos; qreal time = 100; - if (!m_applet || (anim == FadeOut && m_hoverTimer->isActive())) { - // fading out before we've started fading in + if (!m_applet) { m_anim = FadeOut; fadeAnimation(1.0); return; @@ -879,7 +875,9 @@ void AppletHandle::startFading(FadeType anim, const QPointF &hoverPos) //kDebug() << m_entryPos.x() << m_applet->pos().x(); prepareGeometryChange(); bool wasOnRight = m_buttonsOnRight; - m_buttonsOnRight = m_entryPos.x() > (m_applet->size().width() / 2); + if (!preserveSide) { + m_buttonsOnRight = m_entryPos.x() > (m_applet->size().width() / 2); + } calculateSize(); QPolygonF region = mapToParent(m_rect).intersected(parentWidget()->boundingRect()); //kDebug() << region << m_rect << mapToParent(m_rect) << parentWidget()->boundingRect(); diff --git a/private/applethandle_p.h b/private/applethandle_p.h index 34238505d..78ba3d68f 100644 --- a/private/applethandle_p.h +++ b/private/applethandle_p.h @@ -63,7 +63,7 @@ class AppletHandle : public QObject, public QGraphicsItem QRectF boundingRect() const; QPainterPath shape() const; void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0); - void startFading(FadeType anim, const QPointF &hoverPos); + void startFading(FadeType anim, const QPointF &hoverPos, bool preserveSide = false); void setHoverPos(const QPointF &hoverPos); protected: @@ -83,7 +83,7 @@ class AppletHandle : public QObject, public QGraphicsItem void fadeAnimation(qreal progress); void appletDestroyed(); void appletResized(); - void fadeIn(); + void hoverTimeout(); void leaveTimeout(); void emitDisappear(); From be24975ed6c260ccc291d937f1c719ec647b8075 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Tue, 24 Feb 2009 02:54:13 +0000 Subject: [PATCH 48/78] backport: don't leak config dialogs that are open when the widget goes away svn path=/branches/KDE/4.2/kdelibs/; revision=930711 --- applet.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/applet.cpp b/applet.cpp index 940ab2b44..33e06c46a 100644 --- a/applet.cpp +++ b/applet.cpp @@ -155,6 +155,7 @@ Applet::~Applet() d->extender->saveState(); } + delete KConfigDialog::exists(d->configDialogId()); delete d; } From 5e59421a1fa1e0b659ea1b81be84d16475c6904e Mon Sep 17 00:00:00 2001 From: Andreas Pakulat Date: Tue, 24 Feb 2009 11:07:43 +0000 Subject: [PATCH 49/78] revert r930711, it breaks compilation because configDialogId() doesn't exist on AppletPrivate. CCMAIL:aseigo@kde.org svn path=/branches/KDE/4.2/kdelibs/; revision=930815 --- applet.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/applet.cpp b/applet.cpp index 33e06c46a..940ab2b44 100644 --- a/applet.cpp +++ b/applet.cpp @@ -155,7 +155,6 @@ Applet::~Applet() d->extender->saveState(); } - delete KConfigDialog::exists(d->configDialogId()); delete d; } From eba8c2db85fea78300b3f21d0e5784cee3ba3197 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Tue, 24 Feb 2009 14:19:33 +0000 Subject: [PATCH 50/78] delete the dialog svn path=/branches/KDE/4.2/kdelibs/; revision=930930 --- applet.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/applet.cpp b/applet.cpp index 940ab2b44..4e5016fbb 100644 --- a/applet.cpp +++ b/applet.cpp @@ -155,6 +155,8 @@ Applet::~Applet() d->extender->saveState(); } + const QString dialogId = QString("%1settings%2").arg(id()).arg(name()); + delete KConfigDialog::exists(dialogId); delete d; } From 59896b6e9516c466a36e090a7c812f174c241c90 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Tue, 24 Feb 2009 16:58:06 +0000 Subject: [PATCH 51/78] backport correct margin calculation svn path=/branches/KDE/4.2/kdelibs/; revision=931032 --- framesvg.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framesvg.cpp b/framesvg.cpp index 0e4422795..05973c5b2 100644 --- a/framesvg.cpp +++ b/framesvg.cpp @@ -681,7 +681,7 @@ void FrameSvgPrivate::updateSizes() frame->leftWidth = q->elementSize(prefix + "left").width(); if (q->hasElement(prefix + "hint-left-margin")) { - frame->leftMargin = q->elementSize(prefix + "hint-left-margin").height(); + frame->leftMargin = q->elementSize(prefix + "hint-left-margin").width(); } else { frame->leftMargin = frame->leftWidth; } @@ -693,7 +693,7 @@ void FrameSvgPrivate::updateSizes() frame->rightWidth = q->elementSize(prefix + "right").width(); if (q->hasElement(prefix + "hint-right-margin")) { - frame->rightMargin = q->elementSize(prefix + "hint-right-margin").height(); + frame->rightMargin = q->elementSize(prefix + "hint-right-margin").width(); } else { frame->rightMargin = frame->rightWidth; } From 334a27933d2071e464c4e79ace6e8a46c7b051df Mon Sep 17 00:00:00 2001 From: Ambroz Bizjak Date: Tue, 24 Feb 2009 20:31:25 +0000 Subject: [PATCH 52/78] backport revision 931126 Fix bug 184930. The containment's screen can change after it is initially created, so make sure it is changed in the view as well. svn path=/branches/KDE/4.2/kdelibs/; revision=931127 --- view.cpp | 8 ++++++++ view.h | 1 + 2 files changed, 9 insertions(+) diff --git a/view.cpp b/view.cpp index cc58ebe1c..57ddf92db 100644 --- a/view.cpp +++ b/view.cpp @@ -86,6 +86,12 @@ public: containment = 0; } + void containmentScreenChanged(int wasScreen, int newScreen, Plasma::Containment *containment) + { + lastScreen = newScreen; + lastDesktop = this->containment->desktop(); + } + void initGraphicsView() { q->setFrameShape(QFrame::NoFrame); @@ -196,6 +202,7 @@ void View::setContainment(Plasma::Containment *containment) if (d->containment) { disconnect(d->containment, SIGNAL(destroyed(QObject*)), this, SLOT(containmentDestroyed())); disconnect(d->containment, SIGNAL(geometryChanged()), this, SLOT(updateSceneRect())); + disconnect(d->containment, SIGNAL(screenChanged(int, int, Plasma::Containment *)), this, SLOT(containmentScreenChanged(int, int, Plasma::Containment *))); d->containment->removeAssociatedWidget(this); } @@ -247,6 +254,7 @@ void View::setContainment(Plasma::Containment *containment) d->updateSceneRect(); connect(containment, SIGNAL(destroyed(QObject*)), this, SLOT(containmentDestroyed())); connect(containment, SIGNAL(geometryChanged()), this, SLOT(updateSceneRect())); + connect(containment, SIGNAL(screenChanged(int, int, Plasma::Containment *)), this, SLOT(containmentScreenChanged(int, int, Plasma::Containment *))); } Containment *View::containment() const diff --git a/view.h b/view.h index 6c7bf0863..8fc3e2f98 100644 --- a/view.h +++ b/view.h @@ -197,6 +197,7 @@ private: Q_PRIVATE_SLOT(d, void updateSceneRect()) Q_PRIVATE_SLOT(d, void containmentDestroyed()) + Q_PRIVATE_SLOT(d, void containmentScreenChanged(int, int, Plasma::Containment *)) friend class ViewPrivate; }; From d18c772f294fb4d2a7fcc446d8424735d9b4b3a4 Mon Sep 17 00:00:00 2001 From: Richard Dale Date: Thu, 26 Feb 2009 11:11:45 +0000 Subject: [PATCH 53/78] * The default package structure of a scripting data engine needs to be a plasmoid, otherwise custom main script names won't work svn path=/branches/KDE/4.2/kdelibs/; revision=932319 --- scripting/scriptengine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripting/scriptengine.cpp b/scripting/scriptengine.cpp index a5d265b33..02e024964 100644 --- a/scripting/scriptengine.cpp +++ b/scripting/scriptengine.cpp @@ -224,10 +224,10 @@ PackageStructure::Ptr defaultPackageStructure(ComponentType type) { switch (type) { case AppletComponent: + case DataEngineComponent: return PackageStructure::Ptr(new PlasmoidPackage()); break; case RunnerComponent: - case DataEngineComponent: { PackageStructure::Ptr structure(new PackageStructure()); structure->addFileDefinition("mainscript", "code/main", i18n("Main Script File")); From 186416f391b44e9ce66b05a661ff7326d8482caf Mon Sep 17 00:00:00 2001 From: Jacopo De Simoi Date: Tue, 3 Mar 2009 02:08:31 +0000 Subject: [PATCH 54/78] backport - prevents deadlock (deferredRun) CCBUG: 181057 svn path=/branches/KDE/4.2/kdelibs/; revision=934418 --- runnermanager.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/runnermanager.cpp b/runnermanager.cpp index 6c8dbdb2a..f81d4c1b1 100644 --- a/runnermanager.cpp +++ b/runnermanager.cpp @@ -287,8 +287,9 @@ public: FindMatchesJob *runJob = static_cast(job); if (deferredRun.isEnabled() && runJob->runner() == deferredRun.runner()) { //kDebug() << "job actually done, running now **************"; - deferredRun.run(context); - deferredRun = QueryMatch(0); + QueryMatch tmpRun = deferredRun; + deferredRun = QueryMatch(0); + tmpRun.run(context); } searchJobs.removeAll(runJob); delete runJob; @@ -382,10 +383,12 @@ void RunnerManager::run(const QueryMatch &match) } } - match.run(d->context); - if (d->deferredRun.isValid()) { d->deferredRun = QueryMatch(0); + + match.run(d->context); + + } } @@ -507,8 +510,9 @@ void RunnerManager::reset() if (d->deferredRun.isEnabled()) { //kDebug() << "job actually done, running now **************"; - d->deferredRun.run(d->context); + QueryMatch tmpRun = d->deferredRun; d->deferredRun = QueryMatch(0); + tmpRun.run(d->context); } d->context.reset(); From a0c4af373d19715db3ccd2f346d951775eb32709 Mon Sep 17 00:00:00 2001 From: Jacopo De Simoi Date: Tue, 3 Mar 2009 07:52:25 +0000 Subject: [PATCH 55/78] Added a way to flag old searchJobs as stale, make sure that obsoleted matches do not interfere with new ones, corrected a misplaced brace in the previous commit svn path=/branches/KDE/4.2/kdelibs/; revision=934465 --- runnercontext.cpp | 21 +++++++++++++++++---- runnermanager.cpp | 30 +++++++++++++++++++++++++----- 2 files changed, 42 insertions(+), 9 deletions(-) diff --git a/runnercontext.cpp b/runnercontext.cpp index 7a654e215..6eb8e35dc 100644 --- a/runnercontext.cpp +++ b/runnercontext.cpp @@ -142,8 +142,15 @@ void RunnerContext::reset() { // We will detach if we are a copy of someone. But we will reset // if we are the 'main' context others copied from. Resetting - // one RunnerContext makes all the copies oneobsolete. + // one RunnerContext makes all the copies obsolete. + + d->q = 0; //we need to mark the q pointer of the detached RunnerContextPrivate + //as dirty on detach to avoid receiving results for old queries + d.detach(); + + d->q = this; //now that we detached the d pointer we need to mark its q pointer as + //this to receive the signals // we still have to remove all the matches, since if the // ref count was 1 (e.g. only the RunnerContext is using @@ -151,7 +158,7 @@ void RunnerContext::reset() if (!d->matches.isEmpty()) { d->matchesById.clear(); d->matches.clear(); - emit d->q->matchesChanged(); + emit matchesChanged(); } d->term.clear(); @@ -194,7 +201,7 @@ bool RunnerContext::addMatches(const QString &term, const QList &mat { Q_UNUSED(term) - if (matches.isEmpty()) { + if (matches.isEmpty() || (!d->q)) { //Bail out if the query is empty or the qptr is dirty return false; } @@ -214,6 +221,7 @@ bool RunnerContext::addMatches(const QString &term, const QList &mat // we always want to sent the signal of the object that created // the d pointer emit d->q->matchesChanged(); + return true; } @@ -221,12 +229,17 @@ bool RunnerContext::addMatch(const QString &term, const QueryMatch &match) { Q_UNUSED(term) + if (!d->q) { // Bail out if the qptr is dirty + return false; + } + LOCK_FOR_WRITE(this) d->matches.append(match); d->matchesById.insert(match.id(), &d->matches.at(d->matches.size() - 1)); UNLOCK(this); //kDebug()<< "added match" << match->text(); - emit d->q->matchesChanged(); + emit d->q->matchesChanged(); + return true; } diff --git a/runnermanager.cpp b/runnermanager.cpp index f81d4c1b1..b9dc8a961 100644 --- a/runnermanager.cpp +++ b/runnermanager.cpp @@ -138,19 +138,23 @@ public: int priority() const; Plasma::AbstractRunner *runner() const; + void setStale(); + bool isStale() const; protected: void run(); private: Plasma::RunnerContext *m_context; Plasma::AbstractRunner *m_runner; + bool m_stale; }; FindMatchesJob::FindMatchesJob(Plasma::AbstractRunner *runner, Plasma::RunnerContext *context, QObject *parent) : ThreadWeaver::Job(parent), m_context(context), - m_runner(runner) + m_runner(runner), + m_stale(false) { if (runner->speed() == Plasma::AbstractRunner::SlowSpeed) { assignQueuePolicy(&RunnerRestrictionPolicy::instance()); @@ -174,6 +178,16 @@ Plasma::AbstractRunner *FindMatchesJob::runner() const return m_runner; } +void FindMatchesJob::setStale() +{ + m_stale = true; +} + +bool FindMatchesJob::isStale() const +{ + return m_stale; +} + /***************************************************** * RunnerManager::Private class * @@ -376,8 +390,8 @@ void RunnerManager::run(const QueryMatch &match) AbstractRunner *runner = match.runner(); foreach (FindMatchesJob *job, d->searchJobs) { - if (job->runner() == runner && !job->isFinished()) { - //kDebug() << "!!!!!!!!!!!!!!!!!!! uh oh!"; + if (job->runner() == runner && !job->isFinished() && !job->isStale()) { + kDebug() << "!!!!!!!!!!!!!!!!!!! uh oh!"; d->deferredRun = match; return; } @@ -385,11 +399,12 @@ void RunnerManager::run(const QueryMatch &match) if (d->deferredRun.isValid()) { d->deferredRun = QueryMatch(0); - + } + match.run(d->context); - } + } QList RunnerManager::actionsForMatch(const QueryMatch &match) @@ -506,6 +521,11 @@ void RunnerManager::reset() d->searchJobs.clear(); } else { Weaver::instance()->dequeue(); + // Since we cannot safely delete the jobs, mark them as stale + // TODO: delete them eventually? + foreach (FindMatchesJob *job, d->searchJobs) { + job->setStale(); + } } if (d->deferredRun.isEnabled()) { From aed33b30e2d579942e21df3376e0a4a1102a8cff Mon Sep 17 00:00:00 2001 From: Jacopo De Simoi Date: Wed, 4 Mar 2009 21:05:24 +0000 Subject: [PATCH 56/78] "And they lived happily ever after with no more duplicate matches =)" A local copy of the context is now created in the FindMatchesJob ctor, not anymore in AbstractRunner, this prevents old queries to be run with a valid dptr svn path=/branches/KDE/4.2/kdelibs/; revision=935345 --- abstractrunner.cpp | 5 ++--- runnermanager.cpp | 10 +++++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/abstractrunner.cpp b/abstractrunner.cpp index 207f8bc9c..321858a8d 100644 --- a/abstractrunner.cpp +++ b/abstractrunner.cpp @@ -132,14 +132,13 @@ void AbstractRunner::reloadConfiguration() { } -void AbstractRunner::performMatch(Plasma::RunnerContext &globalContext) +void AbstractRunner::performMatch(Plasma::RunnerContext &localContext) { static const int reasonableRunTime = 1500; static const int fastEnoughTime = 250; d->runtime.restart(); -//TODO :this is a copy ctor - RunnerContext localContext(globalContext, 0); + match(localContext); // automatically rate limit runners that become slooow const int runtime = d->runtime.elapsed(); diff --git a/runnermanager.cpp b/runnermanager.cpp index b9dc8a961..c70655195 100644 --- a/runnermanager.cpp +++ b/runnermanager.cpp @@ -144,7 +144,7 @@ public: protected: void run(); private: - Plasma::RunnerContext *m_context; + Plasma::RunnerContext m_context; Plasma::AbstractRunner *m_runner; bool m_stale; }; @@ -152,7 +152,7 @@ private: FindMatchesJob::FindMatchesJob(Plasma::AbstractRunner *runner, Plasma::RunnerContext *context, QObject *parent) : ThreadWeaver::Job(parent), - m_context(context), + m_context(*context, 0), m_runner(runner), m_stale(false) { @@ -165,7 +165,7 @@ void FindMatchesJob::run() { // kDebug() << "Running match for " << m_runner->objectName() // << " in Thread " << thread()->id() << endl; - m_runner->performMatch(*m_context); + m_runner->performMatch(m_context); } int FindMatchesJob::priority() const @@ -501,8 +501,8 @@ bool RunnerManager::execQuery(const QString &term, const QString &runnerName) //kDebug() << "ignored!"; return false; } - - r->performMatch(d->context); + RunnerContext localContext(d->context, 0); + r->performMatch(localContext); //kDebug() << "succeeded with" << d->context.matches().count() << "results"; emit matchesChanged(d->context.matches()); return true; From 1bbfa8724f83dea4eb967fb66f0d83597b9ae3fd Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Thu, 5 Mar 2009 07:48:14 +0000 Subject: [PATCH 57/78] SVN_SILENT made messages (.desktop file) svn path=/branches/KDE/4.2/kdelibs/; revision=935438 --- servicetypes/plasma-containment.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servicetypes/plasma-containment.desktop b/servicetypes/plasma-containment.desktop index 5fdab47d3..faf27f6f8 100644 --- a/servicetypes/plasma-containment.desktop +++ b/servicetypes/plasma-containment.desktop @@ -20,7 +20,7 @@ Comment[ga]=Coimeádán feidhmchláiríní Plasma agus péintéir cúlra Comment[gl]=Un contedor de applet de Plasma e pintor do fondo Comment[gu]=પ્લાઝમા એપ્લેટ ધરાવનાર અને પાશ્ચભાગ રંગનાર Comment[he]=תוחם של יישומון Plasma וצובע הרקע -Comment[hne]=प्लाज्मा एपलेट कंटेनर अउ पिछोत पुतइया +Comment[hne]=प्लाज्मा एपलेट कंटेनर अउ पिछोत अंगना पुतइया 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 From 583b829b333f523e3bd01d4cc89396dbba897195 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Thu, 5 Mar 2009 20:37:52 +0000 Subject: [PATCH 58/78] no to be shown svn path=/branches/KDE/4.2/kdelibs/; revision=935626 --- 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 75d3b2f05..5517d1440 100644 --- a/servicetypes/plasma-applet-extenderapplet.desktop +++ b/servicetypes/plasma-applet-extenderapplet.desktop @@ -50,6 +50,7 @@ Name[zh_CN]=内部扩展容器 Name[zh_TW]=內部延伸容器 Type=Service Icon=utilities-desktop-extra +NoDisplay=true X-KDE-ServiceTypes=Plasma/Applet X-KDE-PluginInfo-Name=internal:extender X-KDE-PluginInfo-EnabledByDefault=false From 2b2d7c6e5dd41a0570039e06636c8be7a4767482 Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Sun, 15 Mar 2009 07:45:33 +0000 Subject: [PATCH 59/78] SVN_SILENT made messages (.desktop file) svn path=/branches/KDE/4.2/kdelibs/; revision=939531 --- servicetypes/plasma-animator.desktop | 1 - servicetypes/plasma-applet-extenderapplet.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 - 11 files changed, 12 deletions(-) diff --git a/servicetypes/plasma-animator.desktop b/servicetypes/plasma-animator.desktop index f42943e8b..00b986b9f 100644 --- a/servicetypes/plasma-animator.desktop +++ b/servicetypes/plasma-animator.desktop @@ -34,7 +34,6 @@ Comment[lt]=Plasma animacijos varikliukas Comment[lv]=Plasma animācijas dzinējs Comment[mai]=प्लाजमा भावचिन्ह इंजन Comment[ml]=പ്ലാസ്മ അനിമേഷന്‍ എഞ്ചിന്‍ -Comment[nb]=Plasma animasjonsmotor Comment[nds]=Plasma-Animeerkarn Comment[nl]=Plasma-animatie-engine Comment[nn]=Plasma animasjonsmotor diff --git a/servicetypes/plasma-applet-extenderapplet.desktop b/servicetypes/plasma-applet-extenderapplet.desktop index 5517d1440..10592e729 100644 --- a/servicetypes/plasma-applet-extenderapplet.desktop +++ b/servicetypes/plasma-applet-extenderapplet.desktop @@ -24,7 +24,6 @@ Name[ku]=Wergirî ya Firehkera Hûndirîn Name[lv]=Iekšējais ekstendera konteineris Name[mai]=भीतरका विस्तारक कंटेनर Name[ml]=ഇന്റേണല്‍ എക്സ്റ്റന്‍ഡര്‍ കണ്ടൈനര്‍ -Name[nb]=Beholder for interne utvidere Name[nds]=Intern Verwiederngelaats Name[nl]=Interne uitbreidingscontainer Name[nn]=Intern utvidingsbehaldar diff --git a/servicetypes/plasma-applet.desktop b/servicetypes/plasma-applet.desktop index 9300e88b1..8ce8ff0ac 100644 --- a/servicetypes/plasma-applet.desktop +++ b/servicetypes/plasma-applet.desktop @@ -35,7 +35,6 @@ Comment[lt]=Plasma įskiepis Comment[lv]=Plasma aplets Comment[mai]=प्लाजमा एप्पलेट Comment[ml]=പ്ലാസ്മ ലഘുപ്രയോഗം -Comment[nb]=Plasma miniprogram Comment[nds]=Plasma-Lüttprogramm Comment[nl]=Plasma-applet Comment[nn]=Plasma-element diff --git a/servicetypes/plasma-containment.desktop b/servicetypes/plasma-containment.desktop index faf27f6f8..1a05f8405 100644 --- a/servicetypes/plasma-containment.desktop +++ b/servicetypes/plasma-containment.desktop @@ -32,7 +32,6 @@ Comment[lt]=Plasma įskiepio dėklas ir fono paišiklis Comment[lv]=Plasma apletu turis un fona zīmētājs Comment[mai]=प्लाजमा एप्पलेट कंटेनर आओर पृष्ठभूमि पेंटर Comment[ml]=പ്ലാസ്മ ലഘുപ്രയോഗം കണ്ടൈനറും പശ്ചാത്തല പെയിന്ററും -Comment[nb]=Plasma beholder for miniprogram og bakgrunnsopptegner Comment[nds]=Plasma-Gelaats för Lüttprogrammen un Achtergrundpleger Comment[nl]=Container voor plasma-applets en achtergrondinvulling Comment[nn]=Plasma-behaldar og bakgrunnsmålar diff --git a/servicetypes/plasma-dataengine.desktop b/servicetypes/plasma-dataengine.desktop index f4bd070bf..7f6312de4 100644 --- a/servicetypes/plasma-dataengine.desktop +++ b/servicetypes/plasma-dataengine.desktop @@ -34,7 +34,6 @@ Comment[lt]=Plasma duomenų varikliukas Comment[lv]=Plasma datu dzinējs Comment[mai]=प्लाजमा डेटा इंजन Comment[ml]=പ്ലാസ്മ ഡാറ്റ എഞ്ചിന്‍ -Comment[nb]=Plasma datamotor Comment[nds]=Plasma-Datenkarn Comment[nl]=Plasma-gegevensengine Comment[nn]=Plasma-datamotor diff --git a/servicetypes/plasma-packagestructure.desktop b/servicetypes/plasma-packagestructure.desktop index 9491d6d8d..4aa60a072 100644 --- a/servicetypes/plasma-packagestructure.desktop +++ b/servicetypes/plasma-packagestructure.desktop @@ -32,7 +32,6 @@ Comment[lt]=Plasma paketo struktūros aprašymas Comment[lv]=Plasma pakotņu struktūras definīcija Comment[mai]=प्लाजमा पैकेज संरचनाक परिभाषा Comment[ml]=പ്ലാസ്മ പാക്കേജ് സ്ട്രക്ചര്‍ ഡെഫനിഷന്‍ -Comment[nb]=Definisjon av Plasma pakkestruktur Comment[nds]=Paketstruktuur-Fastleggen vun Plasma Comment[nl]=Structuurdefinitie van plasmapakket Comment[nn]=Pakkestrukturdefinisjon for Plasma diff --git a/servicetypes/plasma-runner.desktop b/servicetypes/plasma-runner.desktop index 9e24f0966..f64c880e7 100644 --- a/servicetypes/plasma-runner.desktop +++ b/servicetypes/plasma-runner.desktop @@ -36,7 +36,6 @@ Comment[lt]=KRunner priedas Comment[lv]=KRunner spraudnis Comment[mai]=केरनर प्लगइन Comment[ml]=കെറണ്ണര്‍ സംയോജകം -Comment[nb]=KRunner-programtillegg Comment[nds]=KRunner-Moduul Comment[nl]=KRunner-plugin Comment[nn]=KRunner-tillegg diff --git a/servicetypes/plasma-scriptengine.desktop b/servicetypes/plasma-scriptengine.desktop index 6c161bf02..570a33e36 100644 --- a/servicetypes/plasma-scriptengine.desktop +++ b/servicetypes/plasma-scriptengine.desktop @@ -33,7 +33,6 @@ Comment[lt]=Scenarijų kalbos praplėtimas, skirtas Plasma Comment[lv]=Skriptēšanas valodu Plasma paplašinājums Comment[mai]=प्लाजमाक लेल स्क्रिप्टिंग भाषाक विस्तार Comment[ml]=പ്ലാസ്മയ്ക്കുള്ള സ്ക്രിപ്റ്റിങ്ങ് ഭാഷാ എക്സ്റ്റന്‍ഷന്‍ -Comment[nb]=Skriptspråk-utvidelse for Plasma Comment[nds]=Skriptspraak-Verwiedern för Plasma Comment[nl]=Scripttaalextensie voor Plasma Comment[nn]=Skriptspråkutviding for Plasma diff --git a/servicetypes/plasma-wallpaper.desktop b/servicetypes/plasma-wallpaper.desktop index 5d1a4bee4..b2ab58fb1 100644 --- a/servicetypes/plasma-wallpaper.desktop +++ b/servicetypes/plasma-wallpaper.desktop @@ -35,7 +35,6 @@ Comment[lt]=Plasma apmušalas Comment[lv]=Plasma ekrāntapete Comment[mai]=प्लाजमा वालपेपर Comment[ml]=പ്ലാസ്മ ചുമര്‍ച്ചിത്രം -Comment[nb]=Plasma tapet Comment[nds]=Plasma-Achtergrundbild Comment[nl]=Plasma-bureaubladachtergrond Comment[nn]=Plasmabakgrunn diff --git a/tests/packagemetadatatest.desktop b/tests/packagemetadatatest.desktop index 453741bba..715e03a59 100644 --- a/tests/packagemetadatatest.desktop +++ b/tests/packagemetadatatest.desktop @@ -27,7 +27,6 @@ Name[lt]=Paketo metaduomenų bandomasis failas Name[lv]=Pakotņu metadatu testa fails Name[mai]=संकुलक मेटाडाटा जाँचि फाइल Name[ml]=പാക്കേജ് മെറ്റാഡാറ്റാ പരിശോധനാ ഫയല്‍ -Name[nb]=Testfil for Package metadata Name[nds]=Paketmetadaten-Testdatei Name[nl]=Testbestand voor pakketmetadata Name[nn]=Testfil for pakkemetadata @@ -78,7 +77,6 @@ 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[mai]=PackageMetaData वर्गक जाँचबाक लेल एकटा जाँचि डेस्कटाप फाइल. Comment[ml]=പാക്കേജ്മെറ്റാഡാറ്റാ ക്ലാസ് പരിശോധിയ്ക്കാനുള്ള പരിശോധനാ പണിയിട ഫയല്‍. -Comment[nb]=En skrivebordsfil med testdata for klassen PackageMetaData. Comment[nds]=En Test-Schriefdischdatei för't Utproberen vun de Klass "PackageMetaData". Comment[nl]=Een desktop-bestand voor het testen van de PackageMetaData-klasse. Comment[nn]=Ei .desktop-fil for testing av PackageMetaData-klassen diff --git a/tests/testengine/plasma-dataengine-testengine.desktop b/tests/testengine/plasma-dataengine-testengine.desktop index 5fe5b953d..82fd6aa9c 100644 --- a/tests/testengine/plasma-dataengine-testengine.desktop +++ b/tests/testengine/plasma-dataengine-testengine.desktop @@ -30,7 +30,6 @@ Name[lt]=Bandomasis duomenų variklis Name[lv]=Testēšanas datu dzinējs Name[mai]=जाँचि डाटा इंडन Name[ml]=പരിശോധനാ ഡാറ്റാ എഞ്ചിന്‍ -Name[nb]=Testdata-motor Name[nds]=Test-Datenkarn Name[nl]=Testgegevensengine Name[nn]=Testdatamotor From 5de018f830e1a468756c2f10ef5e8282f175ca85 Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Mon, 16 Mar 2009 07:50:58 +0000 Subject: [PATCH 60/78] SVN_SILENT made messages (.desktop file) svn path=/branches/KDE/4.2/kdelibs/; revision=939958 --- servicetypes/plasma-animator.desktop | 1 + servicetypes/plasma-applet-extenderapplet.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 + 11 files changed, 12 insertions(+) diff --git a/servicetypes/plasma-animator.desktop b/servicetypes/plasma-animator.desktop index 00b986b9f..f42943e8b 100644 --- a/servicetypes/plasma-animator.desktop +++ b/servicetypes/plasma-animator.desktop @@ -34,6 +34,7 @@ Comment[lt]=Plasma animacijos varikliukas Comment[lv]=Plasma animācijas dzinējs Comment[mai]=प्लाजमा भावचिन्ह इंजन Comment[ml]=പ്ലാസ്മ അനിമേഷന്‍ എഞ്ചിന്‍ +Comment[nb]=Plasma animasjonsmotor Comment[nds]=Plasma-Animeerkarn Comment[nl]=Plasma-animatie-engine Comment[nn]=Plasma animasjonsmotor diff --git a/servicetypes/plasma-applet-extenderapplet.desktop b/servicetypes/plasma-applet-extenderapplet.desktop index 10592e729..5517d1440 100644 --- a/servicetypes/plasma-applet-extenderapplet.desktop +++ b/servicetypes/plasma-applet-extenderapplet.desktop @@ -24,6 +24,7 @@ Name[ku]=Wergirî ya Firehkera Hûndirîn Name[lv]=Iekšējais ekstendera konteineris Name[mai]=भीतरका विस्तारक कंटेनर Name[ml]=ഇന്റേണല്‍ എക്സ്റ്റന്‍ഡര്‍ കണ്ടൈനര്‍ +Name[nb]=Beholder for interne utvidere Name[nds]=Intern Verwiederngelaats Name[nl]=Interne uitbreidingscontainer Name[nn]=Intern utvidingsbehaldar diff --git a/servicetypes/plasma-applet.desktop b/servicetypes/plasma-applet.desktop index 8ce8ff0ac..9300e88b1 100644 --- a/servicetypes/plasma-applet.desktop +++ b/servicetypes/plasma-applet.desktop @@ -35,6 +35,7 @@ Comment[lt]=Plasma įskiepis Comment[lv]=Plasma aplets Comment[mai]=प्लाजमा एप्पलेट Comment[ml]=പ്ലാസ്മ ലഘുപ്രയോഗം +Comment[nb]=Plasma miniprogram Comment[nds]=Plasma-Lüttprogramm Comment[nl]=Plasma-applet Comment[nn]=Plasma-element diff --git a/servicetypes/plasma-containment.desktop b/servicetypes/plasma-containment.desktop index 1a05f8405..faf27f6f8 100644 --- a/servicetypes/plasma-containment.desktop +++ b/servicetypes/plasma-containment.desktop @@ -32,6 +32,7 @@ Comment[lt]=Plasma įskiepio dėklas ir fono paišiklis Comment[lv]=Plasma apletu turis un fona zīmētājs Comment[mai]=प्लाजमा एप्पलेट कंटेनर आओर पृष्ठभूमि पेंटर Comment[ml]=പ്ലാസ്മ ലഘുപ്രയോഗം കണ്ടൈനറും പശ്ചാത്തല പെയിന്ററും +Comment[nb]=Plasma beholder for miniprogram og bakgrunnsopptegner Comment[nds]=Plasma-Gelaats för Lüttprogrammen un Achtergrundpleger Comment[nl]=Container voor plasma-applets en achtergrondinvulling Comment[nn]=Plasma-behaldar og bakgrunnsmålar diff --git a/servicetypes/plasma-dataengine.desktop b/servicetypes/plasma-dataengine.desktop index 7f6312de4..f4bd070bf 100644 --- a/servicetypes/plasma-dataengine.desktop +++ b/servicetypes/plasma-dataengine.desktop @@ -34,6 +34,7 @@ Comment[lt]=Plasma duomenų varikliukas Comment[lv]=Plasma datu dzinējs Comment[mai]=प्लाजमा डेटा इंजन Comment[ml]=പ്ലാസ്മ ഡാറ്റ എഞ്ചിന്‍ +Comment[nb]=Plasma datamotor Comment[nds]=Plasma-Datenkarn Comment[nl]=Plasma-gegevensengine Comment[nn]=Plasma-datamotor diff --git a/servicetypes/plasma-packagestructure.desktop b/servicetypes/plasma-packagestructure.desktop index 4aa60a072..9491d6d8d 100644 --- a/servicetypes/plasma-packagestructure.desktop +++ b/servicetypes/plasma-packagestructure.desktop @@ -32,6 +32,7 @@ Comment[lt]=Plasma paketo struktūros aprašymas Comment[lv]=Plasma pakotņu struktūras definīcija Comment[mai]=प्लाजमा पैकेज संरचनाक परिभाषा Comment[ml]=പ്ലാസ്മ പാക്കേജ് സ്ട്രക്ചര്‍ ഡെഫനിഷന്‍ +Comment[nb]=Definisjon av Plasma pakkestruktur Comment[nds]=Paketstruktuur-Fastleggen vun Plasma Comment[nl]=Structuurdefinitie van plasmapakket Comment[nn]=Pakkestrukturdefinisjon for Plasma diff --git a/servicetypes/plasma-runner.desktop b/servicetypes/plasma-runner.desktop index f64c880e7..9e24f0966 100644 --- a/servicetypes/plasma-runner.desktop +++ b/servicetypes/plasma-runner.desktop @@ -36,6 +36,7 @@ Comment[lt]=KRunner priedas Comment[lv]=KRunner spraudnis Comment[mai]=केरनर प्लगइन Comment[ml]=കെറണ്ണര്‍ സംയോജകം +Comment[nb]=KRunner-programtillegg Comment[nds]=KRunner-Moduul Comment[nl]=KRunner-plugin Comment[nn]=KRunner-tillegg diff --git a/servicetypes/plasma-scriptengine.desktop b/servicetypes/plasma-scriptengine.desktop index 570a33e36..6c161bf02 100644 --- a/servicetypes/plasma-scriptengine.desktop +++ b/servicetypes/plasma-scriptengine.desktop @@ -33,6 +33,7 @@ Comment[lt]=Scenarijų kalbos praplėtimas, skirtas Plasma Comment[lv]=Skriptēšanas valodu Plasma paplašinājums Comment[mai]=प्लाजमाक लेल स्क्रिप्टिंग भाषाक विस्तार Comment[ml]=പ്ലാസ്മയ്ക്കുള്ള സ്ക്രിപ്റ്റിങ്ങ് ഭാഷാ എക്സ്റ്റന്‍ഷന്‍ +Comment[nb]=Skriptspråk-utvidelse for Plasma Comment[nds]=Skriptspraak-Verwiedern för Plasma Comment[nl]=Scripttaalextensie voor Plasma Comment[nn]=Skriptspråkutviding for Plasma diff --git a/servicetypes/plasma-wallpaper.desktop b/servicetypes/plasma-wallpaper.desktop index b2ab58fb1..5d1a4bee4 100644 --- a/servicetypes/plasma-wallpaper.desktop +++ b/servicetypes/plasma-wallpaper.desktop @@ -35,6 +35,7 @@ Comment[lt]=Plasma apmušalas Comment[lv]=Plasma ekrāntapete Comment[mai]=प्लाजमा वालपेपर Comment[ml]=പ്ലാസ്മ ചുമര്‍ച്ചിത്രം +Comment[nb]=Plasma tapet Comment[nds]=Plasma-Achtergrundbild Comment[nl]=Plasma-bureaubladachtergrond Comment[nn]=Plasmabakgrunn diff --git a/tests/packagemetadatatest.desktop b/tests/packagemetadatatest.desktop index 715e03a59..453741bba 100644 --- a/tests/packagemetadatatest.desktop +++ b/tests/packagemetadatatest.desktop @@ -27,6 +27,7 @@ Name[lt]=Paketo metaduomenų bandomasis failas Name[lv]=Pakotņu metadatu testa fails Name[mai]=संकुलक मेटाडाटा जाँचि फाइल Name[ml]=പാക്കേജ് മെറ്റാഡാറ്റാ പരിശോധനാ ഫയല്‍ +Name[nb]=Testfil for Package metadata Name[nds]=Paketmetadaten-Testdatei Name[nl]=Testbestand voor pakketmetadata Name[nn]=Testfil for pakkemetadata @@ -77,6 +78,7 @@ 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[mai]=PackageMetaData वर्गक जाँचबाक लेल एकटा जाँचि डेस्कटाप फाइल. Comment[ml]=പാക്കേജ്മെറ്റാഡാറ്റാ ക്ലാസ് പരിശോധിയ്ക്കാനുള്ള പരിശോധനാ പണിയിട ഫയല്‍. +Comment[nb]=En skrivebordsfil med testdata for klassen PackageMetaData. Comment[nds]=En Test-Schriefdischdatei för't Utproberen vun de Klass "PackageMetaData". Comment[nl]=Een desktop-bestand voor het testen van de PackageMetaData-klasse. Comment[nn]=Ei .desktop-fil for testing av PackageMetaData-klassen diff --git a/tests/testengine/plasma-dataengine-testengine.desktop b/tests/testengine/plasma-dataengine-testengine.desktop index 82fd6aa9c..5fe5b953d 100644 --- a/tests/testengine/plasma-dataengine-testengine.desktop +++ b/tests/testengine/plasma-dataengine-testengine.desktop @@ -30,6 +30,7 @@ Name[lt]=Bandomasis duomenų variklis Name[lv]=Testēšanas datu dzinējs Name[mai]=जाँचि डाटा इंडन Name[ml]=പരിശോധനാ ഡാറ്റാ എഞ്ചിന്‍ +Name[nb]=Testdata-motor Name[nds]=Test-Datenkarn Name[nl]=Testgegevensengine Name[nn]=Testdatamotor From b157fbba5cf3c42d71db024304c3463f8f693d55 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 18 Mar 2009 18:07:57 +0000 Subject: [PATCH 61/78] Backport 941021 Plasma::Svg: Round the drawing size to the pixmap size, otherwise we can get bad arctefacts. (noticable on the eyes applet) svn path=/branches/KDE/4.2/kdelibs/; revision=941024 --- svg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svg.cpp b/svg.cpp index 7a6c3ede1..a5c672cf9 100644 --- a/svg.cpp +++ b/svg.cpp @@ -454,7 +454,7 @@ void Svg::paint(QPainter *painter, int x, int y, const QString &elementID) void Svg::paint(QPainter *painter, const QRectF &rect, const QString &elementID) { QPixmap pix(d->findInCache(elementID, rect.size())); - painter->drawPixmap(rect, pix, QRectF(QPointF(0, 0), pix.size())); + painter->drawPixmap(QRectF(rect.topLeft(), pix.size()), pix, QRectF(QPointF(0, 0), pix.size())); } void Svg::paint(QPainter *painter, int x, int y, int width, int height, const QString &elementID) From 8198de1cd66956a1b6796ea9094ce67133676f80 Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Fri, 20 Mar 2009 08:13:28 +0000 Subject: [PATCH 62/78] SVN_SILENT made messages (.desktop file) svn path=/branches/KDE/4.2/kdelibs/; revision=941644 --- servicetypes/plasma-runner.desktop | 1 + 1 file changed, 1 insertion(+) diff --git a/servicetypes/plasma-runner.desktop b/servicetypes/plasma-runner.desktop index 9e24f0966..368528bcd 100644 --- a/servicetypes/plasma-runner.desktop +++ b/servicetypes/plasma-runner.desktop @@ -47,6 +47,7 @@ Comment[pt_BR]=Plug-in do KRunner Comment[ro]=Modul KRunner Comment[ru]=Расширение KRunner Comment[se]=KRunner-lassemodula +Comment[si]=KRunner ප්ලගීනය Comment[sk]=KRunner rozšírenie Comment[sl]=Vstavek za KRunner Comment[sr]=Прикључак за К‑извођач From 1b85d9edb94b6face2527d04e30818d5956b2adc Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Sat, 21 Mar 2009 08:16:07 +0000 Subject: [PATCH 63/78] SVN_SILENT made messages (.desktop file) svn path=/branches/KDE/4.2/kdelibs/; revision=942136 --- tests/packagemetadatatest.desktop | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/packagemetadatatest.desktop b/tests/packagemetadatatest.desktop index 453741bba..00c41b00e 100644 --- a/tests/packagemetadatatest.desktop +++ b/tests/packagemetadatatest.desktop @@ -4,6 +4,7 @@ Name[ar]=ملف اختبار البيانات الوصفية للحزمة Name[as]=সৰঞ্জাম মিটাডাটাৰ পৰীক্ষাৰ নথিপত্ৰ Name[be@latin]=Fajł spraŭdžvańnia metaźviestak pakunka Name[ca]=Fitxer de proves de metadades de paquet +Name[cs]=Testovací soubor metadat balíčku Name[da]=Testfil til pakke-metadata Name[de]=Testdatei für Paket-Metadaten Name[el]=Δοκιμαστικό αρχείο μεταδεδομένων του πακέτου @@ -56,6 +57,7 @@ Comment[ar]=ملف اختبار سطح المكتب لختبار صف PackageMe Comment[as]=PackageMetaData class পৰীক্ষা কৰিবলৈ এটা ডেষ্কট'প পৰীক্ষাৰ নথিপত্ৰ । Comment[be@latin]=Testavy fajł rabočaha stała dla spraŭdžvańnia klasy „PackageMetaData”. Comment[ca]=Un fitxer d'escriptori de proves per provar la classe PackageMetaData. +Comment[cs]=Testovací soubor plochy pro otestování třídy PackageMetaData. Comment[da]=En desktop-testfil til test af PackageMetaData-klassen. Comment[de]=Eine Test-Desktop-Datei zum Testen der Klasse „PackageMetaData“. Comment[el]=Ένα δοκιμαστικό αρχείο desktop για τον έλεγχο τς κλάσης PackageMetaData. From 01932833a71d9ad0e36172e81b093e5cdb5ac289 Mon Sep 17 00:00:00 2001 From: Jacopo De Simoi Date: Mon, 23 Mar 2009 16:06:22 +0000 Subject: [PATCH 64/78] Backporting 93708-9 by aseigo Set the compression timeout to 50ms to improve consistency svn path=/branches/KDE/4.2/kdelibs/; revision=943287 --- runnermanager.cpp | 54 ++++++++++++++++++++--------------------------- 1 file changed, 23 insertions(+), 31 deletions(-) diff --git a/runnermanager.cpp b/runnermanager.cpp index c70655195..3e1fc779b 100644 --- a/runnermanager.cpp +++ b/runnermanager.cpp @@ -138,23 +138,19 @@ public: int priority() const; Plasma::AbstractRunner *runner() const; - void setStale(); - bool isStale() const; protected: void run(); private: Plasma::RunnerContext m_context; Plasma::AbstractRunner *m_runner; - bool m_stale; }; FindMatchesJob::FindMatchesJob(Plasma::AbstractRunner *runner, Plasma::RunnerContext *context, QObject *parent) : ThreadWeaver::Job(parent), m_context(*context, 0), - m_runner(runner), - m_stale(false) + m_runner(runner) { if (runner->speed() == Plasma::AbstractRunner::SlowSpeed) { assignQueuePolicy(&RunnerRestrictionPolicy::instance()); @@ -178,16 +174,6 @@ Plasma::AbstractRunner *FindMatchesJob::runner() const return m_runner; } -void FindMatchesJob::setStale() -{ - m_stale = true; -} - -bool FindMatchesJob::isStale() const -{ - return m_stale; -} - /***************************************************** * RunnerManager::Private class * @@ -207,7 +193,7 @@ public: void scheduleMatchesChanged() { - matchChangeTimer.start(0); + matchChangeTimer.start(50); } void matchesChanged() @@ -305,8 +291,17 @@ public: deferredRun = QueryMatch(0); tmpRun.run(context); } - searchJobs.removeAll(runJob); + + searchJobs.remove(runJob); + oldSearchJobs.remove(runJob); delete runJob; + + if (searchJobs.isEmpty() && context.matches().isEmpty()) { + // we finished our run, and there are no valid matches, and so no + // signal will have been sent out. so we need to emit the signal + // ourselves here + emit q->matchesChanged(context.matches()); + } } RunnerManager *q; @@ -314,7 +309,8 @@ public: RunnerContext context; QTimer matchChangeTimer; QHash runners; - QList searchJobs; + QSet searchJobs; + QSet oldSearchJobs; // QStringList prioritylist; bool loadAll; KConfigGroup config; @@ -390,8 +386,8 @@ void RunnerManager::run(const QueryMatch &match) AbstractRunner *runner = match.runner(); foreach (FindMatchesJob *job, d->searchJobs) { - if (job->runner() == runner && !job->isFinished() && !job->isStale()) { - kDebug() << "!!!!!!!!!!!!!!!!!!! uh oh!"; + if (job->runner() == runner && !job->isFinished()) { + kDebug() << "deferred run"; d->deferredRun = match; return; } @@ -400,11 +396,8 @@ void RunnerManager::run(const QueryMatch &match) if (d->deferredRun.isValid()) { d->deferredRun = QueryMatch(0); } - + match.run(d->context); - - - } QList RunnerManager::actionsForMatch(const QueryMatch &match) @@ -460,7 +453,7 @@ void RunnerManager::launchQuery(const QString &term, const QString &runnerName) FindMatchesJob *job = new FindMatchesJob(r, &d->context, this); connect(job, SIGNAL(done(ThreadWeaver::Job*)), this, SLOT(jobDone(ThreadWeaver::Job*))); Weaver::instance()->enqueue(job); - d->searchJobs.append(job); + d->searchJobs.insert(job); } } } @@ -518,16 +511,15 @@ void RunnerManager::reset() // If ThreadWeaver is idle, it is safe to clear previous jobs if (Weaver::instance()->isIdle()) { qDeleteAll(d->searchJobs); - d->searchJobs.clear(); + qDeleteAll(d->oldSearchJobs); + d->oldSearchJobs.clear(); } else { Weaver::instance()->dequeue(); - // Since we cannot safely delete the jobs, mark them as stale - // TODO: delete them eventually? - foreach (FindMatchesJob *job, d->searchJobs) { - job->setStale(); - } + d->oldSearchJobs += d->searchJobs; } + d->searchJobs.clear(); + if (d->deferredRun.isEnabled()) { //kDebug() << "job actually done, running now **************"; QueryMatch tmpRun = d->deferredRun; From 28c29ce9ff4d665900c5819abe5a42b2bb6fdece Mon Sep 17 00:00:00 2001 From: Jacopo De Simoi Date: Mon, 23 Mar 2009 16:58:02 +0000 Subject: [PATCH 65/78] Backporting 938728 - 938752 - 938756 - 938778 by aseigo svn path=/branches/KDE/4.2/kdelibs/; revision=943315 --- runnermanager.cpp | 74 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 70 insertions(+), 4 deletions(-) diff --git a/runnermanager.cpp b/runnermanager.cpp index 3e1fc779b..7bebb721b 100644 --- a/runnermanager.cpp +++ b/runnermanager.cpp @@ -174,6 +174,61 @@ Plasma::AbstractRunner *FindMatchesJob::runner() const return m_runner; } +class DelayedJobCleaner : public QObject +{ +public: + DelayedJobCleaner(QSet jobs, ThreadWeaver::WeaverInterface *weaver); + +private Q_SLOTS: + void jobDone(ThreadWeaver::Job*); + void checkIfFinished(); + //connect(ThreadWeaver::instance(), SIGNAL(finished()), this, SLOT(checkIfFinished())); + +private: + ThreadWeaver::WeaverInterface *m_weaver; + QSet m_jobs; +}; + +DelayedJobCleaner::DelayedJobCleaner(QSet jobs, ThreadWeaver::WeaverInterface *weaver) + : QObject(weaver), + m_weaver(weaver), + m_jobs(jobs) +{ + connect(m_weaver, SIGNAL(finished()), this, SLOT(checkIfFinished())); + + foreach (FindMatchesJob *job, m_jobs) { + connect(job, SIGNAL(done(ThreadWeaver::Job*)), this, SLOT(jobDone(ThreadWeaver::Job*))); + } +} + +void DelayedJobCleaner::jobDone(ThreadWeaver::Job *job) +{ + FindMatchesJob *runJob = dynamic_cast(job); + + if (!runJob) { + return; + } + + m_jobs.remove(runJob); + delete runJob; + + if (m_jobs.isEmpty()) { + deleteLater(); + } +} + +void DelayedJobCleaner::checkIfFinished() +{ + if (m_weaver->isIdle()) { + qDeleteAll(m_jobs); + m_jobs.clear(); + deleteLater(); + } +} + + + + /***************************************************** * RunnerManager::Private class * @@ -212,8 +267,9 @@ public: const int maxThreads = config.readEntry("maxThreads", 16); const int numThreads = qMin(maxThreads, 2 + ((numProcs - 1) * 2)); //kDebug() << "setting up" << numThreads << "threads for" << numProcs << "processors"; - Weaver::instance()->setMaximumNumberOfThreads(numThreads); - + if (numThreads > Weaver::instance()->maximumNumberOfThreads()) { + Weaver::instance()->setMaximumNumberOfThreads(numThreads); + } //Preferred order of execution of runners //prioritylist = config.readEntry("priority", QStringList()); @@ -284,7 +340,12 @@ public: void jobDone(ThreadWeaver::Job *job) { - FindMatchesJob *runJob = static_cast(job); + FindMatchesJob *runJob = dynamic_cast(job); + + if (!runJob) { + return; + } + if (deferredRun.isEnabled() && runJob->runner() == deferredRun.runner()) { //kDebug() << "job actually done, running now **************"; QueryMatch tmpRun = deferredRun; @@ -342,6 +403,11 @@ RunnerManager::RunnerManager(KConfigGroup &c, QObject *parent) RunnerManager::~RunnerManager() { + if (!qApp->closingDown() && (!d->searchJobs.isEmpty() || !d->oldSearchJobs.isEmpty())) { + new DelayedJobCleaner(d->searchJobs + d->oldSearchJobs, Weaver::instance()); + } + + delete d; } @@ -450,7 +516,7 @@ void RunnerManager::launchQuery(const QString &term, const QString &runnerName) foreach (Plasma::AbstractRunner *r, runable) { if ((r->ignoredTypes() & d->context.type()) == 0) { // kDebug() << "launching" << r->name(); - FindMatchesJob *job = new FindMatchesJob(r, &d->context, this); + FindMatchesJob *job = new FindMatchesJob(r, &d->context, Weaver::instance()); connect(job, SIGNAL(done(ThreadWeaver::Job*)), this, SLOT(jobDone(ThreadWeaver::Job*))); Weaver::instance()->enqueue(job); d->searchJobs.insert(job); From 397c4285aeabf5af9cd61e33265df54ae37cc4a5 Mon Sep 17 00:00:00 2001 From: Jacopo De Simoi Date: Wed, 25 Mar 2009 13:00:11 +0000 Subject: [PATCH 66/78] backporting 934733 svn path=/branches/KDE/4.2/kdelibs/; revision=944333 --- abstractrunner.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/abstractrunner.cpp b/abstractrunner.cpp index 321858a8d..cb750c22d 100644 --- a/abstractrunner.cpp +++ b/abstractrunner.cpp @@ -152,8 +152,7 @@ void AbstractRunner::performMatch(Plasma::RunnerContext &localContext) setSpeed(SlowSpeed); } - //If matches were not added, delete items on the heap - if (slowed && runtime < fastEnoughTime) { + if (slowed && runtime < fastEnoughTime && localContext.query().size() > 2) { ++d->fastRuns; if (d->fastRuns > 2) { From 696869421d203f7e475c0d32640c9c4614f05a8e Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Thu, 26 Mar 2009 08:11:53 +0000 Subject: [PATCH 67/78] SVN_SILENT made messages (.desktop file) svn path=/branches/KDE/4.2/kdelibs/; revision=944807 --- 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 5517d1440..61b67168e 100644 --- a/servicetypes/plasma-applet-extenderapplet.desktop +++ b/servicetypes/plasma-applet-extenderapplet.desktop @@ -3,6 +3,7 @@ Name=Internal Extender Container Name[ar]=حاوية الممدد الداخلي Name[be@latin]=Schovišča ŭnutranaha pašyreńnia Name[ca]=Contenidor d'extensió intern +Name[cs]=Interní rozšiřující kontejner Name[da]=Beholder til intern udvider Name[de]=Interner Erweiterungs-Container Name[el]=Εσωτερικός υποδοχέας επέκτασης From 1c95aa91711c236072603af7ff88644214227831 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20G=C3=A2teau?= Date: Mon, 30 Mar 2009 10:35:36 +0000 Subject: [PATCH 68/78] Use Qt::Tool window flags for popups to avoid having them shown over screensaver. CCBUG:179924 svn path=/branches/KDE/4.2/kdelibs/; revision=946770 --- popupapplet.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/popupapplet.cpp b/popupapplet.cpp index a5c9873d4..f4b6cbf35 100644 --- a/popupapplet.cpp +++ b/popupapplet.cpp @@ -275,7 +275,8 @@ void PopupAppletPrivate::popupConstraintsEvent(Plasma::Constraints constraints) //stuff out of your Dialog (extenders). Monitor WindowDeactivate events so we can //emulate the same kind of behavior as Qt::Popup (close when you click somewhere //else. - Qt::WindowFlags wflags = Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint; + //Use Qt::Tool otherwise dialogs get shown over screensaver (bug #179924). + Qt::WindowFlags wflags = Qt::Tool | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint; if (passive) { wflags |= Qt::X11BypassWindowManagerHint; @@ -410,10 +411,12 @@ void PopupApplet::setPassivePopup(bool passive) d->passive = passive; if (d->dialog) { - Qt::WindowFlags wflags = Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint; + Qt::WindowFlags wflags = d->dialog->windowFlags(); if (d->passive) { wflags |= Qt::X11BypassWindowManagerHint; + } else { + wflags &= ~Qt::X11BypassWindowManagerHint; } d->dialog->setWindowFlags(wflags); From bbff7fd4cfc7fce31ebbf78d274651d275bc3953 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Thu, 2 Apr 2009 19:08:49 +0000 Subject: [PATCH 69/78] backport fix for folderview during rename of files svn path=/branches/KDE/4.2/kdelibs/; revision=948318 --- private/applethandle.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/private/applethandle.cpp b/private/applethandle.cpp index 64db9889b..4cffd572c 100644 --- a/private/applethandle.cpp +++ b/private/applethandle.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -789,6 +790,15 @@ void AppletHandle::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) { Q_UNUSED(event); + foreach (QWidget *widget, QApplication::topLevelWidgets()) { + QMenu *menu = qobject_cast(widget); + if (menu && menu->isVisible()) { + connect(menu, SIGNAL(aboutToHide()), this, SLOT(leaveTimeout())); + return; + } + } + + // if we haven't even showed up yet, remove the handle if (m_hoverTimer->isActive()) { m_hoverTimer->stop(); From 988c51290b7b97ce61d5315bea5bc5771839d844 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Thu, 2 Apr 2009 19:10:24 +0000 Subject: [PATCH 70/78] backport the fix to the last fix Don't start the fade out animation if the applet handle is still under the mouse svn path=/branches/KDE/4.2/kdelibs/; revision=948320 --- private/applethandle.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/private/applethandle.cpp b/private/applethandle.cpp index 4cffd572c..7f1f0f34f 100644 --- a/private/applethandle.cpp +++ b/private/applethandle.cpp @@ -846,7 +846,9 @@ void AppletHandle::hoverTimeout() void AppletHandle::leaveTimeout() { - startFading(FadeOut, m_entryPos); + if (!isUnderMouse()) { + startFading(FadeOut, m_entryPos); + } } void AppletHandle::appletDestroyed() From 676ae0970b1541ced716a732b287bb924956177e Mon Sep 17 00:00:00 2001 From: Jacopo De Simoi Date: Fri, 3 Apr 2009 17:13:41 +0000 Subject: [PATCH 71/78] backported 948747 - ignore leading/following whitespaces CCBUG: 188665 svn path=/branches/KDE/4.2/kdelibs/; revision=948748 --- runnermanager.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/runnermanager.cpp b/runnermanager.cpp index 7bebb721b..f52c42a69 100644 --- a/runnermanager.cpp +++ b/runnermanager.cpp @@ -481,8 +481,10 @@ void RunnerManager::launchQuery(const QString &term) launchQuery(term, QString()); } -void RunnerManager::launchQuery(const QString &term, const QString &runnerName) +void RunnerManager::launchQuery(const QString &untrimmedTerm, const QString &runnerName) { + QString term = untrimmedTerm.trimmed(); + if (d->runners.isEmpty()) { d->loadRunners(); } @@ -529,8 +531,10 @@ bool RunnerManager::execQuery(const QString &term) return execQuery(term, QString()); } -bool RunnerManager::execQuery(const QString &term, const QString &runnerName) +bool RunnerManager::execQuery(const QString &untrimmedTerm, const QString &runnerName) { + QString term = untrimmedTerm.trimmed(); + if (d->runners.isEmpty()) { d->loadRunners(); } From f523814bfc317bbfbe5344d0a5e0e44c24da6b1f Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Thu, 9 Apr 2009 04:21:08 +0000 Subject: [PATCH 72/78] revert backport svn path=/branches/KDE/4.2/kdelibs/; revision=951367 --- popupapplet.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/popupapplet.cpp b/popupapplet.cpp index f4b6cbf35..95779b035 100644 --- a/popupapplet.cpp +++ b/popupapplet.cpp @@ -275,8 +275,7 @@ void PopupAppletPrivate::popupConstraintsEvent(Plasma::Constraints constraints) //stuff out of your Dialog (extenders). Monitor WindowDeactivate events so we can //emulate the same kind of behavior as Qt::Popup (close when you click somewhere //else. - //Use Qt::Tool otherwise dialogs get shown over screensaver (bug #179924). - Qt::WindowFlags wflags = Qt::Tool | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint; + Qt::WindowFlags wflags = Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint; if (passive) { wflags |= Qt::X11BypassWindowManagerHint; From 76b571b6bcda97b364909e9b308d604f7981464b Mon Sep 17 00:00:00 2001 From: Davide Bettio Date: Mon, 20 Apr 2009 19:11:50 +0000 Subject: [PATCH 73/78] Backported 956845: Added 2 missing update()s. svn path=/branches/KDE/4.2/kdelibs/; revision=956847 --- widgets/svgwidget.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/widgets/svgwidget.cpp b/widgets/svgwidget.cpp index 09600d6cc..0a291c817 100644 --- a/widgets/svgwidget.cpp +++ b/widgets/svgwidget.cpp @@ -67,6 +67,7 @@ void SvgWidget::mouseReleaseEvent ( QGraphicsSceneMouseEvent * event ) void SvgWidget::setSvg(Svg *svg) { d->svg = svg; + update(); } Svg *SvgWidget::svg() const @@ -77,6 +78,7 @@ Svg *SvgWidget::svg() const void SvgWidget::setElementID(const QString &elementID) { d->elementID = elementID; + update(); } QString SvgWidget::elementID() const From 259e98fdfc10fc207702ba887cdb26487d33f481 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20G=C3=A2teau?= Date: Tue, 21 Apr 2009 09:20:10 +0000 Subject: [PATCH 74/78] Do not let plasma popup appear over screensaver. BUG: 179924 CCMAIL:aseigo@kde.org svn path=/branches/KDE/4.2/kdelibs/; revision=956998 --- popupapplet.cpp | 30 +++++++++++++----------------- private/popupapplet_p.h | 1 + 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/popupapplet.cpp b/popupapplet.cpp index 95779b035..9d4a46523 100644 --- a/popupapplet.cpp +++ b/popupapplet.cpp @@ -275,13 +275,8 @@ void PopupAppletPrivate::popupConstraintsEvent(Plasma::Constraints constraints) //stuff out of your Dialog (extenders). Monitor WindowDeactivate events so we can //emulate the same kind of behavior as Qt::Popup (close when you click somewhere //else. - Qt::WindowFlags wflags = Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint; - - if (passive) { - wflags |= Qt::X11BypassWindowManagerHint; - } - - dialog->setWindowFlags(wflags); + dialog->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint); + updateDialogFlags(); KWindowSystem::setState(dialog->winId(), NET::SkipTaskbar | NET::SkipPager); dialog->installEventFilter(q); @@ -339,7 +334,7 @@ void PopupApplet::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) bool PopupApplet::eventFilter(QObject *watched, QEvent *event) { - if (watched == d->dialog && (event->type() == QEvent::WindowDeactivate)) { + if (!d->passive && watched == d->dialog && (event->type() == QEvent::WindowDeactivate)) { d->popupLostFocus = true; hidePopup(); QTimer::singleShot(100, this, SLOT(clearPopupLostFocus())); @@ -410,15 +405,7 @@ void PopupApplet::setPassivePopup(bool passive) d->passive = passive; if (d->dialog) { - Qt::WindowFlags wflags = d->dialog->windowFlags(); - - if (d->passive) { - wflags |= Qt::X11BypassWindowManagerHint; - } else { - wflags &= ~Qt::X11BypassWindowManagerHint; - } - - d->dialog->setWindowFlags(wflags); + d->updateDialogFlags(); } } @@ -627,6 +614,15 @@ void PopupAppletPrivate::updateDialogPosition() dialog->move(pos); } + + +void PopupAppletPrivate::updateDialogFlags() +{ + Q_ASSERT(dialog); + dialog->setAttribute(Qt::WA_X11NetWmWindowTypeNotification, passive); +} + + } // Plasma namespace #include "popupapplet.moc" diff --git a/private/popupapplet_p.h b/private/popupapplet_p.h index e0bc44fe4..7301b64b3 100644 --- a/private/popupapplet_p.h +++ b/private/popupapplet_p.h @@ -35,6 +35,7 @@ public: void dialogSizeChanged(); void dialogStatusChanged(bool status); void updateDialogPosition(); + void updateDialogFlags(); void popupConstraintsEvent(Plasma::Constraints constraints); void checkExtenderAppearance(Plasma::FormFactor f); From bfec24062b5864d35b78dd1a34b1e0b75ddeccc6 Mon Sep 17 00:00:00 2001 From: Jacopo De Simoi Date: Wed, 22 Apr 2009 22:58:40 +0000 Subject: [PATCH 75/78] Backport the isValid() method along with 957813 and 957814 CCBUG: 188940 svn path=/branches/KDE/4.2/kdelibs/; revision=957816 --- runnercontext.cpp | 43 +++++++++++++++++++++++++++++++------------ runnercontext.h | 20 ++++++++++++++++++++ runnermanager.cpp | 8 ++++---- 3 files changed, 55 insertions(+), 16 deletions(-) diff --git a/runnercontext.cpp b/runnercontext.cpp index 6eb8e35dc..f7a83d0ed 100644 --- a/runnercontext.cpp +++ b/runnercontext.cpp @@ -110,6 +110,11 @@ class RunnerContextPrivate : public QSharedData } } + void invalidate() + { + q = &s_dummyContext; + } + QReadWriteLock lock; QList matches; QMap matchesById; @@ -117,8 +122,11 @@ class RunnerContextPrivate : public QSharedData QString mimeType; RunnerContext::Type type; RunnerContext * q; + static RunnerContext s_dummyContext; }; +RunnerContext RunnerContextPrivate::s_dummyContext; + RunnerContext::RunnerContext(QObject *parent) : QObject(parent), d(new RunnerContextPrivate(this)) @@ -143,14 +151,17 @@ void RunnerContext::reset() // We will detach if we are a copy of someone. But we will reset // if we are the 'main' context others copied from. Resetting // one RunnerContext makes all the copies obsolete. - - d->q = 0; //we need to mark the q pointer of the detached RunnerContextPrivate - //as dirty on detach to avoid receiving results for old queries + + // We need to invalidate the RunnerContextPrivate before detaching + // to avoid receiving results for old queries. + + d->invalidate(); d.detach(); - - d->q = this; //now that we detached the d pointer we need to mark its q pointer as - //this to receive the signals + + // Now that we detached the d pointer we need to reset its q pointer + + d->q = this; // we still have to remove all the matches, since if the // ref count was 1 (e.g. only the RunnerContext is using @@ -197,11 +208,18 @@ QString RunnerContext::mimeType() const return d->mimeType; } +bool RunnerContext::isValid() +{ + // if our qptr is dirty, we aren't useful anymore + return (d->q != &(d->s_dummyContext)); +} + bool RunnerContext::addMatches(const QString &term, const QList &matches) { Q_UNUSED(term) - if (matches.isEmpty() || (!d->q)) { //Bail out if the query is empty or the qptr is dirty + if (matches.isEmpty() || (!isValid())) { + //Bail out if the query is empty or the qptr is dirty return false; } @@ -221,7 +239,7 @@ bool RunnerContext::addMatches(const QString &term, const QList &mat // we always want to sent the signal of the object that created // the d pointer emit d->q->matchesChanged(); - + return true; } @@ -229,17 +247,18 @@ bool RunnerContext::addMatch(const QString &term, const QueryMatch &match) { Q_UNUSED(term) - if (!d->q) { // Bail out if the qptr is dirty + if (!isValid()) { + // Bail out if the qptr is dirty return false; } - + LOCK_FOR_WRITE(this) d->matches.append(match); d->matchesById.insert(match.id(), &d->matches.at(d->matches.size() - 1)); UNLOCK(this); //kDebug()<< "added match" << match->text(); - emit d->q->matchesChanged(); - + emit d->q->matchesChanged(); + return true; } diff --git a/runnercontext.h b/runnercontext.h index baa2112fd..ab68fd0c6 100644 --- a/runnercontext.h +++ b/runnercontext.h @@ -102,6 +102,26 @@ class PLASMA_EXPORT RunnerContext : public QObject */ QString mimeType() const; + /** + * @returns true if this context is no longer valid and therefore + * matching using it should abort. Most useful as an optimization technique + * inside of AbstractRunner subclasses in the match method, e.g.: + * + * while (.. a possibly large iteration) { + * if (!context.isValid()) { + * return; + * } + * + * ... some processing ... + * } + * + * While not required to be used within runners, it provies a nice way + * to avoid unecessary processing in runners that may run for an extended + * period (as measured in 10s of ms) and therefore improve the user experience. @since 4.2.3 + */ + bool isValid(); + + /** * Appends lists of matches to the list of matches. * diff --git a/runnermanager.cpp b/runnermanager.cpp index f52c42a69..5962077a4 100644 --- a/runnermanager.cpp +++ b/runnermanager.cpp @@ -161,7 +161,7 @@ void FindMatchesJob::run() { // kDebug() << "Running match for " << m_runner->objectName() // << " in Thread " << thread()->id() << endl; - m_runner->performMatch(m_context); + if (m_context.isValid()) m_runner->performMatch(m_context); } int FindMatchesJob::priority() const @@ -349,7 +349,7 @@ public: if (deferredRun.isEnabled() && runJob->runner() == deferredRun.runner()) { //kDebug() << "job actually done, running now **************"; QueryMatch tmpRun = deferredRun; - deferredRun = QueryMatch(0); + deferredRun = QueryMatch(0); tmpRun.run(context); } @@ -484,7 +484,7 @@ void RunnerManager::launchQuery(const QString &term) void RunnerManager::launchQuery(const QString &untrimmedTerm, const QString &runnerName) { QString term = untrimmedTerm.trimmed(); - + if (d->runners.isEmpty()) { d->loadRunners(); } @@ -534,7 +534,7 @@ bool RunnerManager::execQuery(const QString &term) bool RunnerManager::execQuery(const QString &untrimmedTerm, const QString &runnerName) { QString term = untrimmedTerm.trimmed(); - + if (d->runners.isEmpty()) { d->loadRunners(); } From 7334b569d05a41be812f253b3a5e62317460ede7 Mon Sep 17 00:00:00 2001 From: Jacopo De Simoi Date: Thu, 23 Apr 2009 02:14:43 +0000 Subject: [PATCH 76/78] Style corrected svn path=/branches/KDE/4.2/kdelibs/; revision=957857 --- runnermanager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/runnermanager.cpp b/runnermanager.cpp index 5962077a4..d1d44ceba 100644 --- a/runnermanager.cpp +++ b/runnermanager.cpp @@ -161,7 +161,9 @@ void FindMatchesJob::run() { // kDebug() << "Running match for " << m_runner->objectName() // << " in Thread " << thread()->id() << endl; - if (m_context.isValid()) m_runner->performMatch(m_context); + if (m_context.isValid()) { + m_runner->performMatch(m_context); + } } int FindMatchesJob::priority() const From bf61997a9fff067c6ce8569e5685bde8fa2c00f3 Mon Sep 17 00:00:00 2001 From: Richard Dale Date: Thu, 23 Apr 2009 10:56:21 +0000 Subject: [PATCH 77/78] * Allow scripting PopupApplets to be created if the metadata.desktop for the applet has a 'ServiceTypes=Plasma/PopupApplet' line svn path=/branches/KDE/4.2/kdelibs/; revision=958045 --- applet.cpp | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/applet.cpp b/applet.cpp index 4e5016fbb..82557196b 100644 --- a/applet.cpp +++ b/applet.cpp @@ -1572,14 +1572,27 @@ Applet *Applet::load(const QString &appletName, uint appletId, const QVariantLis //TODO: what would be -really- cool is offer to try and download the applet // from the network at this point offers = KServiceTypeTrader::self()->query("Plasma/Containment", constraint); - isContainment = true; - if (offers.isEmpty()) { - kDebug() << "offers is empty for " << appletName; - return 0; + if (offers.count() > 0) { + isContainment = true; } - } /* else if (offers.count() > 1) { + } + + bool isPopupApplet = false; + if (offers.isEmpty()) { + offers = KServiceTypeTrader::self()->query("Plasma/PopupApplet", constraint); + if (offers.count() > 0) { + isPopupApplet = true; + } + } + + /* if (offers.count() > 1) { kDebug() << "hey! we got more than one! let's blindly take the first one"; } */ + + if (offers.isEmpty()) { + kDebug() << "offers is empty for " << appletName; + return 0; + } KService::Ptr offer = offers.first(); @@ -1587,13 +1600,19 @@ Applet *Applet::load(const QString &appletName, uint appletId, const QVariantLis appletId = ++AppletPrivate::s_maxAppletId; } + QVariantList allArgs; + allArgs << offer->storageId() << appletId << args; + if (!offer->property("X-Plasma-API").toString().isEmpty()) { kDebug() << "we have a script using the" << offer->property("X-Plasma-API").toString() << "API"; if (isContainment) { - return new Containment(0, offer->storageId(), appletId); + return new Containment(0, allArgs); + } else if (isPopupApplet) { + return new PopupApplet(0, allArgs); + } else { + return new Applet(0, allArgs); } - return new Applet(0, offer->storageId(), appletId); } KPluginLoader plugin(*offer); @@ -1603,8 +1622,6 @@ Applet *Applet::load(const QString &appletName, uint appletId, const QVariantLis return 0; } - QVariantList allArgs; - allArgs << offer->storageId() << appletId << args; QString error; Applet *applet; From 58fb144475e8fbc413c50d8fa5ab0baf261818cd Mon Sep 17 00:00:00 2001 From: Jacopo De Simoi Date: Wed, 29 Apr 2009 04:02:44 +0000 Subject: [PATCH 78/78] Constify the isValid() method (backported around one week ago) Will fix in trunk on monday, but I have to do this before tagging (tomorrow) here in branch. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thanks to André for noticing that. CCMAIL: Woebbeking@kde.org CCMAIL: kde-core-devel@kde.org svn path=/branches/KDE/4.2/kdelibs/; revision=960777 --- runnercontext.cpp | 2 +- runnercontext.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/runnercontext.cpp b/runnercontext.cpp index f7a83d0ed..643a42275 100644 --- a/runnercontext.cpp +++ b/runnercontext.cpp @@ -208,7 +208,7 @@ QString RunnerContext::mimeType() const return d->mimeType; } -bool RunnerContext::isValid() +bool RunnerContext::isValid() const { // if our qptr is dirty, we aren't useful anymore return (d->q != &(d->s_dummyContext)); diff --git a/runnercontext.h b/runnercontext.h index ab68fd0c6..7de05cc03 100644 --- a/runnercontext.h +++ b/runnercontext.h @@ -119,7 +119,7 @@ class PLASMA_EXPORT RunnerContext : public QObject * to avoid unecessary processing in runners that may run for an extended * period (as measured in 10s of ms) and therefore improve the user experience. @since 4.2.3 */ - bool isValid(); + bool isValid() const; /**