[meego-commits] 14700: Changes to devel:qt-mtf/meegotouch-home
Miroslav Safr
no_reply at build.meego.com
Fri Mar 11 09:06:38 UTC 2011
Hi,
I have made the following changes to meegotouch-home in project devel:qt-mtf. Please review and accept ASAP.
Thank You,
Miroslav Safr
[This message was auto-generated]
---
Request #14700:
submit: home:msafr/meegotouch-home(r45) -> devel:qt-mtf/meegotouch-home
Message:
* Fri Mar 11 2011 Miroslav Safr <miroslav.safr at tieto.com.com> 0.23.10
- added BMC_13578_application_name_in_thumbnail.patch
- BMC#14028 - Update meegotouch components to week 9
- updated to 0.20.10
State: new 2011-03-11T01:05:54 msafr
Comment: None
changes files:
--------------
--- meegotouch-home.changes
+++ meegotouch-home.changes
@@ -0,0 +1,3 @@
+* Fri Mar 11 2011 Miroslav Safr <miroslav.safr at tieto.com.com> 0.23.10
+- added BMC_13578_application_name_in_thumbnail.patch
+
@@ -2 +5,2 @@
-- updated to 0.20.10
+- BMC#14028 - Update meegotouch components to week 9
+ - updated to 0.20.10
old:
----
meegotouch-home-0.23.10.tar.bz2
new:
----
BMC_13578_application_name_in_thumbnail.patch
meegotouch-home-0.23.13.tar.bz2
spec files:
-----------
--- meegotouch-home.spec
+++ meegotouch-home.spec
@@ -7,7 +7,7 @@
Name: meegotouch-home
Summary: MeeGo Touch Homescreen
-Version: 0.23.10
+Version: 0.23.13
Release: 1
Group: System/Desktop
License: LGPL v2.1
@@ -19,6 +19,7 @@
Patch1: 0001-Remove-labels-from-QuickLaunchBarButtons.patch
Patch2: disabled_tests.patch
Patch3: adjust_numberof_LauncherPage_icons.patch
+Patch4: BMC_13578_application_name_in_thumbnail.patch
Requires: libmeegotouchhome
BuildRequires: pkgconfig(QtCore) >= 4.6.0
BuildRequires: pkgconfig(QtOpenGL)
@@ -96,6 +97,8 @@
%patch2 -p1
# adjust_numberof_LauncherPage_icons.patch
%patch3 -p1
+# BMC_13578_application_name_in_thumbnail.patch
+%patch4 -p1
# >> setup
# << setup
other changes:
--------------
++++++ BMC_13578_application_name_in_thumbnail.patch (new)
--- BMC_13578_application_name_in_thumbnail.patch
+++ BMC_13578_application_name_in_thumbnail.patch
+From 0e72852469ea7a47a800135cef55b0fc8a3b700b Mon Sep 17 00:00:00 2001
+From: Alexandr Ivanov <alexandr.ivanov at tieto.com>
+Date: Wed, 9 Mar 2011 18:17:53 +0200
+Subject: [PATCH] Fixes: BMC#13578, there is no application name in dialer thumbnail window
+
+RevBy:
+
+Details: Switcher uses applications title bar text, when it's empty, this fix will use X11 application name/class.
+libmeegotouchhome-default.css updated to workaround situation when orientation can't be determined and 'Close' button is not displayed at all.
+---
+ src/libmeegotouchhome/windowinfo.cpp | 17 +++++++++++++++++
+ .../style/libmeegotouchhome-default.css | 4 ++++
+ 2 files changed, 21 insertions(+), 0 deletions(-)
+
+diff --git a/src/libmeegotouchhome/windowinfo.cpp b/src/libmeegotouchhome/windowinfo.cpp
+index b79fc0e..b5d72e9 100644
+--- a/src/libmeegotouchhome/windowinfo.cpp
++++ b/src/libmeegotouchhome/windowinfo.cpp
+@@ -185,6 +185,23 @@ bool WindowInfo::updateWindowTitle()
+
+ if (result != 0) {
+ d->title = QString::fromUtf8((const char *)textProperty.value);
++
++ if (d->title.isEmpty()) {
++ // Get application name
++ XClassHint classhint;
++ if (XGetClassHint(dpy, d->window, &classhint)) {
++ if (classhint.res_name) {
++ // If "-name NAME" is given on the command line, NAME is used as the instance name.
++ d->title = QString::fromUtf8(classhint.res_name);
++ XFree(classhint.res_name);
++ } else if (d->title.isEmpty() && classhint.res_class) {
++ // Class names are specified by the application writer. Examples of commonly used class names include: "Emacs", "XTerm", "XClock", "XLoad"
++ d->title = QString::fromUtf8(classhint.res_class);
++ XFree(classhint.res_class);
++ }
++ }
++ }
++
+ X11Wrapper::XFree(textProperty.value);
+ updated = true;
+ }
+diff --git a/themes/base/meegotouch/libmeegotouchhome/style/libmeegotouchhome-default.css b/themes/base/meegotouch/libmeegotouchhome/style/libmeegotouchhome-default.css
+index 9e5fafd..7a37093 100644
+--- a/themes/base/meegotouch/libmeegotouchhome/style/libmeegotouchhome-default.css
++++ b/themes/base/meegotouch/libmeegotouchhome/style/libmeegotouchhome-default.css
+@@ -318,6 +318,10 @@ SwitcherButtonStyle#DetailviewButton.Portrait {
+ icon-size: 27.0mm 44.2mm;
+ }
+
++SwitcherButtonWithTitleBarStyle#DetailviewButton {
++ close-icon: "icon-m-framework-close-thumbnail";
++}
++
+ SwitcherButtonWithTitleBarStyle#DetailviewButton.Portrait:large {
+ close-icon: "icon-m-framework-close-thumbnail";
+ }
+--
+1.6.1
+
++++++ meegotouch-home-0.23.10.tar.bz2 -> meegotouch-home-0.23.13.tar.bz2
--- debian/changelog
+++ debian/changelog
@@ -1,3 +1,21 @@
+meegotouchhome (0.23.13-1) unstable; urgency=low
+
+ * Fixes: NB#233151 - homescreen is rotated 90 degrees
+
+ -- Vesa Halttunen <vesa.halttunen at nokia.com> Fri, 04 Mar 2011 12:46:47 +0200
+
+meegotouchhome (0.23.12-1) unstable; urgency=low
+
+ * Fixes: NB#226955 - Locked portrait mode breaks SDK environment
+
+ -- Vesa Halttunen <vesa.halttunen at nokia.com> Wed, 02 Mar 2011 17:35:25 +0200
+
+meegotouchhome (0.23.11-1) unstable; urgency=low
+
+ * Fixes: NB#230342 - _MEEGOTOUCH_VISIBLE_IN_SWITCHER not set
+
+ -- Vesa Halttunen <vesa.halttunen at nokia.com> Wed, 02 Mar 2011 14:46:57 +0200
+
meegotouchhome (0.23.10-1) unstable; urgency=low
* Fixes: NB#222322 - [Harmmattan03-8]Ovi Store icon is missing after rebooting if user updated the ovi store client
--- src/libmeegotouchhome/homeapplication.cpp
+++ src/libmeegotouchhome/homeapplication.cpp
@@ -41,53 +41,22 @@
static const QString HOME_READY_SIGNAL_INTERFACE = "com.nokia.duihome.readyNotifier";
static const QString HOME_READY_SIGNAL_NAME = "ready";
-/*!
- * Checks whether an upstart command line parameter was given.
- * This is checked for stopping the application after it's ready,
- * and we only want to do that when run by upstart, not
- * when run by Matti or manually.
- *
- * \param argc number of parameters
- * \param argv parameters
- * \return true if in upstart mode, false otherwise
- */
-static bool isUpstartMode(int argc, char *argv[])
-{
- if (argc < 2) {
- return false;
- }
- static const char optChar = 'u';
- static const char *optString = "u";
- static struct option optLong[] = {
- { "upstart", 0, NULL, optChar },
- { 0, 0, 0, 0 }
- };
- opterr = 0;
- int c = 0;
- while ((c = getopt_long_only(argc, argv,
- optString,
- optLong,
- 0)) != -1) {
- if (c == optChar) {
- return true;
- }
- }
- return false;
-}
-
HomeApplication::HomeApplication(int &argc, char **argv, const QString& appIdentifier) :
MApplication(argc, argv, appIdentifier),
+ upstartMode(false),
+ lockedOrientation_(QVariant::Invalid),
homeScreenService(new HomeScreenService),
xEventListeners(),
iteratorActiveForEventListenerContainer(false),
toBeRemovedEventListeners()
{
+ parseArguments(argc, argv);
+
// Enable prestart mode
MApplication::setPrestartMode(M::TerminateOnClose);
// launch a timer for sending a dbus-signal upstart when home is ready
// and on screen
- upstartMode = isUpstartMode(argc, argv);
connect(&startupNotificationTimer, SIGNAL(timeout()),
this, SLOT(sendStartupNotifications()));
startupNotificationTimer.setSingleShot(true);
@@ -128,6 +97,11 @@
}
}
+QVariant HomeApplication::lockedOrientation() const
+{
+ return lockedOrientation_;
+}
+
void HomeApplication::sendStartupNotifications()
{
static QDBusConnection systemBus = QDBusConnection::systemBus();
@@ -136,6 +110,8 @@
HOME_READY_SIGNAL_INTERFACE,
HOME_READY_SIGNAL_NAME);
systemBus.send(homeReadySignal);
+
+ // Stop the application after it's ready but only when run by upstart
if (upstartMode) {
static pid_t selfPid = getpid();
kill(selfPid, SIGSTOP);
@@ -167,3 +143,31 @@
return eventHandled;
}
+
+void HomeApplication::parseArguments(int argc, char *argv[])
+{
+ if (argc >= 2) {
+ static const char upstartChar = 'u';
+ static const char orientationChar = 'o';
+ static const char *optString = "uo::";
+ static struct option optLong[] = {
+ { "upstart", 0, NULL, upstartChar },
+ { "locked-orientation", 2, NULL, orientationChar },
+ { 0, 0, 0, 0 }
+ };
+ opterr = 0;
+ int c = 0;
+ while ((c = getopt_long_only(argc, argv, optString, optLong, 0)) != -1) {
+ switch (c) {
+ case upstartChar:
+ upstartMode = true;
+ break;
+ case orientationChar:
+ lockedOrientation_ = QVariant(optarg);
+ break;
+ default:
+ break;
+ }
+ }
+ }
+}
--- src/libmeegotouchhome/homeapplication.h
+++ src/libmeegotouchhome/homeapplication.h
@@ -23,6 +23,7 @@
#include <MApplication>
#include <QTimer>
#include <QSet>
+#include <QVariant>
class HomeScreenService;
class XEventListener;
@@ -65,6 +66,19 @@
*/
void removeXEventListener(XEventListener *listener);
+ /*!
+ * Returns the locked orientation as set using the command line
+ * arguments. The orientation is returned as a QVariant. If the
+ * variant is not valid, the orientation locking has not been set
+ * through the command line arguments. Otherwise the variant
+ * contains a string representing the orientation to which the
+ * UI should be locked to: either an empty string (meaning no
+ * locking), portrait or landscape.
+ *
+ * \return a QVariant representing the locked orientation: invalid (use default), an empty string (unlocked), portrait or landscape
+ */
+ QVariant lockedOrientation() const;
+
signals:
/*!
* \brief A Signal to request launcher focus on specific launcher application
@@ -89,9 +103,21 @@
void sendStartupNotifications();
private:
+ /*!
+ * Parses the command line parameters and sets upstart mode and forced
+ * orientation locking based on the arguments.
+ *
+ * \param argc number of parameters
+ * \param argv parameters
+ */
+ void parseArguments(int argc, char *argv[]);
+
//! Flag that indicates whether the process was started by upstart or not
bool upstartMode;
+ //! A QVariant representing the locked orientation: invalid (use default), an empty string (unlocked), portrait or landscape
+ QVariant lockedOrientation_;
+
//! Timer used for sending startup notifications
QTimer startupNotificationTimer;
--- src/libmeegotouchhome/mainwindow.cpp
+++ src/libmeegotouchhome/mainwindow.cpp
@@ -20,10 +20,9 @@
#include "mainwindow.h"
#include "mainwindowstyle.h"
#include "home.h"
-
+#include "homeapplication.h"
#include <QGLWidget>
#include <QDBusInterface>
-#include <MApplication>
#include <MSceneManager>
#include <MTheme>
#include "x11wrapper.h"
@@ -101,15 +100,36 @@
void MainWindow::applyStyle()
{
- const MainWindowStyle *style = static_cast<const MainWindowStyle *>(MTheme::style("MainWindowStyle", "", "", "", M::Landscape, NULL));
- if (style->lockedOrientation() == "landscape") {
+ // Check whether the orientation has been locked using command line arguments
+ QVariant lockedOrientationVariant(QVariant::Invalid);
+ HomeApplication *app = dynamic_cast<HomeApplication*>(qApp);
+ if (app != NULL) {
+ lockedOrientationVariant = app->lockedOrientation();
+ }
+
+ QString lockedOrientation;
+ if (lockedOrientationVariant.isValid()) {
+ // Orientation has been locked using command line arguments
+ lockedOrientation = lockedOrientationVariant.toString();
+ } else {
+ // Orientation has not been locked using command line arguments, so get it from the style
+ const MainWindowStyle *style = static_cast<const MainWindowStyle *>(MTheme::style("MainWindowStyle", "", "", "", M::Landscape, NULL));
+ lockedOrientation = style->lockedOrientation();
+ }
+
+ if (lockedOrientation == "landscape") {
setLandscapeOrientation();
+ setOrientationAngle(M::Angle0);
setOrientationLocked(true);
- } else if (style->lockedOrientation() == "portrait") {
+ setOrientationAngleLocked(true);
+ } else if (lockedOrientation == "portrait") {
setPortraitOrientation();
+ setOrientationAngle(M::Angle270);
setOrientationLocked(true);
+ setOrientationAngleLocked(true);
} else {
setOrientationLocked(false);
+ setOrientationAngleLocked(false);
}
}
--- src/libmeegotouchhome/switcherbutton.cpp
+++ src/libmeegotouchhome/switcherbutton.cpp
@@ -30,7 +30,10 @@
Atom SwitcherButton::visibleAtom = 0;
SwitcherButton::SwitcherButton(QGraphicsItem *parent, SwitcherButtonModel *model) :
- MButton(parent, model)
+ MButton(parent, model),
+ visibility(false),
+ visibilityPropertyEnabled(true),
+ visibilityInitialized(false)
{
// Configure timers
windowCloseTimer.setSingleShot(true);
@@ -42,10 +45,6 @@
}
connect(this, SIGNAL(clicked()), this, SLOT(switchToWindow()));
-
- // Initialize to negation to force the property initialization
- visibility = !isVisible();
- setVisibilityPropertyEnabled(true);
}
SwitcherButton::~SwitcherButton()
@@ -99,25 +98,26 @@
void SwitcherButton::setVisibleInSwitcherProperty(bool set)
{
- if(visibilityPropertyEnabled && visibility != set) {
+ if (visibilityPropertyEnabled && (visibility != set || !visibilityInitialized)) {
Display *dpy = QX11Info::display();
- if (dpy) {
- if (set) {
- unsigned char data = 1;
- X11Wrapper::XChangeProperty(dpy, xWindow(), visibleAtom, XA_CARDINAL, 8, PropModeReplace, &data, 1);
- } else {
- unsigned char data = 0;
- X11Wrapper::XChangeProperty(dpy, xWindow(), visibleAtom, XA_CARDINAL, 8, PropModeReplace, &data, 1);
- }
- visibility = set;
+ if (set) {
+ unsigned char data = 1;
+ X11Wrapper::XChangeProperty(dpy, xWindow(), visibleAtom, XA_CARDINAL, 8, PropModeReplace, &data, 1);
+ } else {
+ unsigned char data = 0;
+ X11Wrapper::XChangeProperty(dpy, xWindow(), visibleAtom, XA_CARDINAL, 8, PropModeReplace, &data, 1);
}
+
+ visibility = set;
+ visibilityInitialized = true;
}
}
void SwitcherButton::setVisibilityPropertyEnabled(bool enable)
{
visibilityPropertyEnabled = enable;
- if(enable) {
- setVisibleInSwitcherProperty(isVisible());
+
+ if (enable) {
+ setVisibleInSwitcherProperty(isOnDisplay());
}
}
--- src/libmeegotouchhome/switcherbutton.h
+++ src/libmeegotouchhome/switcherbutton.h
@@ -142,6 +142,9 @@
//! Whether the updating of the visibility property is enabled
bool visibilityPropertyEnabled;
+
+ //! Whether visibility has been initialized or not
+ bool visibilityInitialized;
};
#endif // SWITCHERBUTTON_H
--- tests/stubs/homeapplication_stub.h
+++ tests/stubs/homeapplication_stub.h
@@ -33,6 +33,7 @@
virtual void removeXEventListener(XEventListener *listener);
virtual bool x11EventFilter(XEvent *event);
virtual void sendStartupNotifications();
+ virtual QVariant lockedOrientation();
};
// 2. IMPLEMENT STUB
@@ -73,6 +74,12 @@
stubMethodEntered("sendStartupNotifications");
}
+QVariant HomeApplicationStub::lockedOrientation()
+{
+ stubMethodEntered("lockedOrientation");
+ return stubReturnValue<QVariant>("lockedOrientation");
+}
+
// 3. CREATE A STUB INSTANCE
HomeApplicationStub gDefaultHomeApplicationStub;
HomeApplicationStub *gHomeApplicationStub = &gDefaultHomeApplicationStub;
@@ -109,5 +116,10 @@
gHomeApplicationStub->sendStartupNotifications();
}
+QVariant HomeApplication::lockedOrientation() const
+{
+ return gHomeApplicationStub->lockedOrientation();
+}
+
#endif
--- tests/ut_mainwindow/ut_mainwindow.cpp
+++ tests/ut_mainwindow/ut_mainwindow.cpp
@@ -23,8 +23,8 @@
#include "x11wrapper_stub.h"
#include "mainwindow.h"
#include "mainwindowstyle.h"
-#include <MApplication>
-#include <MApplicationPage>
+#include "homeapplication_stub.h"
+#include <MSceneWindow>
#include <QDBusInterface>
// Stub the Dbus call used by status bar to open a menu
@@ -79,13 +79,13 @@
}
// Home stubs
-class Home : public MApplicationPage
+class Home : public MSceneWindow
{
public:
Home(QGraphicsItem *parent = 0);
};
-Home::Home(QGraphicsItem *parent) : MApplicationPage(parent)
+Home::Home(QGraphicsItem *parent) : MSceneWindow(parent)
{
}
@@ -96,6 +96,12 @@
mWindowOrientationLocked = locked;
}
+bool mWindowOrientationAngleLocked = false;
+void MWindow::setOrientationAngleLocked(bool locked)
+{
+ mWindowOrientationAngleLocked = locked;
+}
+
QString mWindowOrientation;
void MWindow::setLandscapeOrientation()
{
@@ -107,11 +113,17 @@
mWindowOrientation = "portrait";
}
+M::OrientationAngle mWindowOrientationAngle;
+void MWindow::setOrientationAngle(M::OrientationAngle angle)
+{
+ mWindowOrientationAngle = angle;
+}
+
void Ut_MainWindow::initTestCase()
{
static int argc = 1;
static char *app_name = (char *)"./ut_mainwindow";
- app = new MApplication(argc, &app_name);
+ app = new HomeApplication(argc, &app_name);
mainWindow = MainWindow::instance(true);
@@ -346,35 +358,48 @@
void Ut_MainWindow::testOrientationLocking_data()
{
- QTest::addColumn<QString>("lockedOrientation");
+ QTest::addColumn<QVariant>("commandLineLockedOrientation");
+ QTest::addColumn<QString>("styleLockedOrientation");
QTest::addColumn<bool>("orientationLocked");
QTest::addColumn<QString>("expectedOrientation");
+ QTest::addColumn<int>("expectedOrientationAngle");
- QTest::newRow("No locking") << QString() << false << QString();
- QTest::newRow("Locked to landscape") << QString("landscape") << true << QString("landscape");
- QTest::newRow("Locked to portrait") << QString("portrait") << true << QString("portrait");
- QTest::newRow("Locked to something else") << QString("unknown") << false << QString();
+ QTest::newRow("Command line: Default / Style: No locking") << QVariant(QVariant::Invalid) << QString() << false << QString() << (int)M::Angle180;
+ QTest::newRow("Command line: Default / Style: Locked to landscape") << QVariant(QVariant::Invalid) << QString("landscape") << true << QString("landscape") << (int)M::Angle0;
+ QTest::newRow("Command line: Default / Style: Locked to portrait") << QVariant(QVariant::Invalid) << QString("portrait") << true << QString("portrait") << (int)M::Angle270;
+ QTest::newRow("Command line: Default / Style: Locked to something else") << QVariant(QVariant::Invalid) << QString("unknown") << false << QString() << (int)M::Angle180;
+ QTest::newRow("Command line: No locking / Style: Locked to portrait") << QVariant("") << QString("portrait") << false << QString() << (int)M::Angle180;
+ QTest::newRow("Command line: Locked to landscape / Style: Locked to portrait") << QVariant("landscape") << QString("portrait") << true << QString("landscape") << (int)M::Angle0;
+ QTest::newRow("Command line: Locked to portrait / Style: Locked to landscape") << QVariant("portrait") << QString("landscape") << true << QString("portrait") << (int)M::Angle270;
+ QTest::newRow("Command line: Locked to something else / Style: Locked to landscape") << QVariant("unknown") << QString("landscape") << false << QString() << (int)M::Angle180;
}
void Ut_MainWindow::testOrientationLocking()
{
- QFETCH(QString, lockedOrientation);
+ QFETCH(QVariant, commandLineLockedOrientation);
+ QFETCH(QString, styleLockedOrientation);
QFETCH(bool, orientationLocked);
QFETCH(QString, expectedOrientation);
+ QFETCH(int, expectedOrientationAngle);
// Reset the stubs
mWindowOrientationLocked = false;
+ mWindowOrientationAngleLocked = false;
mWindowOrientation = QString();
+ mWindowOrientationAngle = M::Angle180;
+ gHomeApplicationStub->stubSetReturnValue("lockedOrientation", commandLineLockedOrientation);
// Set the style
MainWindowStyle *style = const_cast<MainWindowStyle *>(static_cast<const MainWindowStyle *>(MTheme::style("MainWindowStyle", "", "", "", M::Landscape, NULL)));
- style->setLockedOrientation(lockedOrientation);
+ style->setLockedOrientation(styleLockedOrientation);
// Create a new window
delete mainWindow;
mainWindow = MainWindow::instance(true);
QCOMPARE(mWindowOrientationLocked, orientationLocked);
+ QCOMPARE(mWindowOrientationAngleLocked, orientationLocked);
QCOMPARE(mWindowOrientation, expectedOrientation);
+ QCOMPARE(mWindowOrientationAngle, (M::OrientationAngle)expectedOrientationAngle);
}
QTEST_APPLESS_MAIN(Ut_MainWindow)
--- tests/ut_mainwindow/ut_mainwindow.pro
+++ tests/ut_mainwindow/ut_mainwindow.pro
@@ -13,7 +13,8 @@
HEADERS += \
ut_mainwindow.h \
$$SRCDIR/mainwindow.h \
- $$SRCDIR/mainwindowstyle.h
+ $$SRCDIR/mainwindowstyle.h \
+ $$SRCDIR/homeapplication.h
SOURCES +=
include(../common_bot.pri)
--- tests/ut_switcherbutton/ut_switcherbutton.cpp
+++ tests/ut_switcherbutton/ut_switcherbutton.cpp
@@ -194,13 +194,22 @@
QVERIFY(prepareGeometryChangeCalled);
}
+void Ut_SwitcherButton::testSetVisibleInSwitcherProperty_data()
+{
+ QTest::addColumn<bool>("visibleInSwitcher");
+ QTest::addColumn<unsigned char>("propertyData");
+
+ QTest::newRow("Visible") << true << (unsigned char)1;
+ QTest::newRow("Not visible") << false << (unsigned char)0;
+}
+
void Ut_SwitcherButton::testSetVisibleInSwitcherProperty()
{
- // Initialize to invisible
- button->setVisibleInSwitcherProperty(false);
+ QFETCH(bool, visibleInSwitcher);
+ QFETCH(unsigned char, propertyData);
// Set window visible in the Switcher
- button->setVisibleInSwitcherProperty(true);
+ button->setVisibleInSwitcherProperty(visibleInSwitcher);
// Check correct values passed to X11Wrapper::XChangeProperty()
QCOMPARE(Ut_SwitcherButton::xChangePropertyWindow, button->xWindow());
@@ -211,19 +220,7 @@
QCOMPARE(Ut_SwitcherButton::xChangePropertyNElements, 1);
unsigned char *data = (unsigned char *)xChangePropertyData;
- QVERIFY(data[0] == 1);
-
- // Set window not visible in the Switcher
- button->setVisibleInSwitcherProperty(false);
-
- // Check correct values passed to X11Wrapper::XChangeProperty()
- QCOMPARE(Ut_SwitcherButton::xChangePropertyWindow, button->xWindow());
- QCOMPARE(Ut_SwitcherButton::xChangePropertyProperty, (Atom)TEST_MEEGOTOUCH_VISIBLE_IN_SWITCHER_ATOM);
- QCOMPARE(Ut_SwitcherButton::xChangePropertyFormat, 8);
- QCOMPARE(Ut_SwitcherButton::xChangePropertyMode, PropModeReplace);
- QCOMPARE(Ut_SwitcherButton::xChangePropertyType, XA_CARDINAL);
- QCOMPARE(Ut_SwitcherButton::xChangePropertyNElements, 1);
- QVERIFY(data[0] == 0);
+ QCOMPARE(data[0], propertyData);
}
void Ut_SwitcherButton::testSetVisibleInSwitcherPropertyNotUpdatedWhenValueDoesNotChange()
@@ -248,6 +245,8 @@
QCOMPARE(Ut_SwitcherButton::xChangePropertyWindow, Window(0));
QCOMPARE(bool(Ut_SwitcherButton::xChangePropertyData[0]), false);
button->setVisibilityPropertyEnabled(true);
+ // TODO: this should actually check that setVisibilityPropertyEnabled(true) causes the visibility to be set based on isOnDisplay()
+ button->setVisibleInSwitcherProperty(true);
QCOMPARE(Ut_SwitcherButton::xChangePropertyWindow, button->xWindow());
QCOMPARE(bool(Ut_SwitcherButton::xChangePropertyData[0]), true);
}
--- tests/ut_switcherbutton/ut_switcherbutton.h
+++ tests/ut_switcherbutton/ut_switcherbutton.h
@@ -81,7 +81,7 @@
void testClosingWithTimeout();
void testClosingWithoutTimeout();
void testPrepareGeometryChange();
- // Test that X11 properties are set correctly if visible in switcher
+ void testSetVisibleInSwitcherProperty_data();
void testSetVisibleInSwitcherProperty();
void testSetVisibleInSwitcherPropertyNotUpdatedWhenValueDoesNotChange();
void testWhenVisibilityPropertyDisabledThenPropertyChangesOnlyWhenEnabledAgain();
++++++ meegotouch-home.yaml
--- meegotouch-home.yaml
+++ meegotouch-home.yaml
@@ -1,6 +1,6 @@
Name: meegotouch-home
Summary: MeeGo Touch Homescreen
-Version: 0.23.10
+Version: 0.23.13
Release: 1
Group: System/Desktop
License: LGPL v2.1
@@ -13,6 +13,7 @@
- 0001-Remove-labels-from-QuickLaunchBarButtons.patch
- disabled_tests.patch
- adjust_numberof_LauncherPage_icons.patch
+ - BMC_13578_application_name_in_thumbnail.patch
Description: The home screen for the MeeGo Touch environment
PkgBR:
- fdupes
More information about the MeeGo-commits
mailing list