diff -r 4785f57bf3d4 -r 03646e8da489 homescreenapp/widgetplugins/hsshortcutwidgetplugin/src/hsshortcutwidget.cpp --- a/homescreenapp/widgetplugins/hsshortcutwidgetplugin/src/hsshortcutwidget.cpp Thu May 27 12:46:08 2010 +0300 +++ b/homescreenapp/widgetplugins/hsshortcutwidgetplugin/src/hsshortcutwidget.cpp Fri Jun 11 13:30:16 2010 +0300 @@ -98,6 +98,28 @@ } /*! + Returns the text property. This property is needed by css selector. +*/ +QString HsShortcutWidget::text() const +{ + if ( mText ) { + return mText->text(); + } else { + return QString(); + } +} + +/*! + Sets the text property. This property is needed by css selector. +*/ +void HsShortcutWidget::setText(const QString& textItem) +{ + if ( mText ) { + mText->setText(textItem); + } +} + +/*! Filters touch area events. */ bool HsShortcutWidget::eventFilter(QObject *watched, QEvent *event) @@ -239,11 +261,10 @@ } // Text - if (!mText) { + if ( HsConfiguration::shortcutLabelsVisible() && !mText ) { mText = new HbTextItem(this); HbStyle::setItemName(mText, QLatin1String("text")); - } - + } // Touch Area if (!mTouchArea) { mTouchArea = new HbTouchArea(this); @@ -261,7 +282,9 @@ mCaEntryFlags = caEntry.flags(); mCaEntryTypeName = caEntry.entryTypeName(); mIcon->setIcon(caEntry.makeIcon()); - mText->setText(caEntry.text()); + if (mText) { + mText->setText(caEntry.text()); + } } /*! @@ -320,3 +343,5 @@ emit finished(); } } + +