I have made the following changes intended for :
  CE:UX:MTF / meegotouch-controlpanel

Please review and accept or decline.
BOSS has already run some checks on this request.
See the "Messages from BOSS" section below.

https://build.pub.meego.com//request/show/5322

Thank You,
Marko Saukko

[This message was auto-generated]

---

Request # 5322:

Messages from BOSS:

State: review at 2012-07-28T07:31:57 by bossbot

Reviews:
       accepted by bossbot : Prechecks succeeded.
       new for CE-maintainers : Please replace this text with a review and 
approve/reject the review (not the SR). BOSS will take care of the rest

Changes:
  submit: Project:MTF:UX / meegotouch-controlpanel -> CE:UX:MTF / 
meegotouch-controlpanel
  
changes files:
--------------
--- meegotouch-controlpanel.changes
+++ meegotouch-controlpanel.changes
@@ -0,0 +1,4 @@
+* Fri Jul 27 2012 Dmitry Rozhkov <[email protected]> - 0.14.7.1
+- NEMO#270 - Detect screen orientation and set correct rotation for graphic
+  object of the QML plugin.
+

new:
----
  0001-Detect-device-orientation-and-set-proper-rotation-fo.patch

spec files:
-----------
--- meegotouch-controlpanel.spec
+++ meegotouch-controlpanel.spec
@@ -1,11 +1,13 @@
 # 
 # Do NOT Edit the Auto-generated Part!
-# Generated by: spectacle version 0.23
+# Generated by: spectacle version 0.24.1
 # 
+
+Name:       meegotouch-controlpanel
+
 # >> macros
 # << macros
 
-Name:       meegotouch-controlpanel
 Summary:    MeeGo Control Panel
 Version:    0.14.7.1
 Release:    1
@@ -19,17 +21,16 @@
 Patch1:     meegotouch-controlpanel-0.14.2.2-libcreds3-dependency-removal.patch
 Patch2:     0001-Remove-empty-variables-from-categories.patch
 Patch3:     0002-Add-HideIfEmpty-1-to-not-used-meego-variant-categori.patch
+Patch4:     0001-Detect-device-orientation-and-set-proper-rotation-fo.patch
 Requires:   meegotouch-controlpanel-l10n-engineering-english
 BuildRequires:  pkgconfig(QtGui)
 BuildRequires:  pkgconfig(meegotouch)
 BuildRequires:  pkgconfig(clean-device)
 BuildRequires:  desktop-file-utils
 
-
 %description
 The meegotouch-controlpanel provides a common place for device and application 
settings in a pluggable way
 
-
 %package -n libmeegocontrolpanel
 Summary:    Library for the control panel application and its applets
 Group:      System/Libraries
@@ -102,6 +103,8 @@
 %patch2 -p1
 # 0002-Add-HideIfEmpty-1-to-not-used-meego-variant-categori.patch
 %patch3 -p1
+# 0001-Detect-device-orientation-and-set-proper-rotation-fo.patch
+%patch4 -p1
 # >> setup
 # << setup
 
@@ -115,6 +118,7 @@
 
 # >> build post
 # << build post
+
 %install
 rm -rf %{buildroot}
 # >> install pre
@@ -127,35 +131,15 @@
 # We should not ship examples
 rm -rf %{buildroot}/usr/share/duicontrolpanel/categories/examples
 # << install post
+
 desktop-file-install --delete-original       \
   --dir %{buildroot}%{_datadir}/applications             \
    %{buildroot}%{_datadir}/applications/*.desktop
 
-
-
-
-
-
-
 %post -n libmeegocontrolpanel -p /sbin/ldconfig
 
 %postun -n libmeegocontrolpanel -p /sbin/ldconfig
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
 %files
 %defattr(-,root,root,-)
 %attr(755,root,root) %{_bindir}/duicontrolpanel*
@@ -173,7 +157,6 @@
 # >> files
 # << files
 
-
 %files -n libmeegocontrolpanel
 %defattr(-,root,root,-)
 %{_libdir}/libduicontrolpanel.so.0
@@ -226,4 +209,3 @@
 %{_datadir}/l10n/meegotouch/duicontrolpanel-skeletonapplet.qm
 # >> files meegotouchcp-skeleton-l10n-engineering-english
 # << files meegotouchcp-skeleton-l10n-engineering-english
-

other changes:
--------------

++++++ 0001-Detect-device-orientation-and-set-proper-rotation-fo.patch (new)
--- 0001-Detect-device-orientation-and-set-proper-rotation-fo.patch
+++ 0001-Detect-device-orientation-and-set-proper-rotation-fo.patch
@@ -0,0 +1,29 @@
+From 71b8f6e7e2e92f71057fdc6a6607b6eaab817756 Mon Sep 17 00:00:00 2001
+From: Dmitry Rozhkov <[email protected]>
+Date: Fri, 27 Jul 2012 14:43:27 +0300
+Subject: [PATCH] Detect device orientation and set proper rotation for widget
+
+---
+ qmlapplet/dcpqmlwidget.cpp |    6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/qmlapplet/dcpqmlwidget.cpp b/qmlapplet/dcpqmlwidget.cpp
+index 4e14f5c..cd97131 100644
+--- a/qmlapplet/dcpqmlwidget.cpp
++++ b/qmlapplet/dcpqmlwidget.cpp
+@@ -89,7 +89,11 @@ void DcpQmlWidget::create()
+                     "screen.setAllowedOrientations(Screen.Portrait);"
+                     ).evaluate();
+ #endif
+-            m_Object->setRotation (90);
++            // FIXME: is there a less perverted way to get current 
orientation?
++            //        So far this way is the most reliable.
++            QString orientation = 
QDeclarativeExpression(engine->rootContext(),
++                m_Object, "screen.orientationString;").evaluate().toString();
++            orientation == "Portrait" ? m_Object->setRotation(90) : 
m_Object->setRotation(0);
+ 
+             QTimer::singleShot (0, this, SLOT(adjustObjectSize()));
+         } else {
+-- 
+1.7.9.5
+

++++++ meegotouch-controlpanel.yaml
--- meegotouch-controlpanel.yaml
+++ meegotouch-controlpanel.yaml
@@ -13,6 +13,7 @@
     - meegotouch-controlpanel-0.14.2.2-libcreds3-dependency-removal.patch
     - 0001-Remove-empty-variables-from-categories.patch
     - 0002-Add-HideIfEmpty-1-to-not-used-meego-variant-categori.patch
+    - 0001-Detect-device-orientation-and-set-proper-rotation-fo.patch
 
 Description: The meegotouch-controlpanel provides a common place for device 
and application settings in a pluggable way
 PkgConfigBR:



Reply via email to