From aca404f0c049c5b1bace7e842e7e64b987f04616 Mon Sep 17 00:00:00 2001 From: harlekin Date: Tue, 25 Mar 2003 23:06:12 +0000 Subject: better interaction with the rotate app --- (limited to 'core') diff --git a/core/applets/rotateapplet/rotate.cpp b/core/applets/rotateapplet/rotate.cpp index 8f323d6..653c61f 100644 --- a/core/applets/rotateapplet/rotate.cpp +++ b/core/applets/rotateapplet/rotate.cpp @@ -41,7 +41,6 @@ RotateApplet::RotateApplet ( ) : QObject ( 0, "RotateApplet" ), ref ( 0 ) { m_native = true; - m_startupRot = QPEApplication::defaultRotation(); } RotateApplet::~RotateApplet ( ) @@ -90,11 +89,12 @@ QPopupMenu *RotateApplet::popup ( QWidget * ) const void RotateApplet::activated ( ) { + int currentRotation = QPEApplication::defaultRotation(); int newRotation; if ( m_native == true ) { - newRotation = m_startupRot + 90; + newRotation = currentRotation + 90; } else { - newRotation = m_startupRot; + newRotation = currentRotation - 90; } QCopEnvelope env( "QPE/System", "setCurrentRotation(int)" ); env << newRotation; diff --git a/core/applets/rotateapplet/rotate.h b/core/applets/rotateapplet/rotate.h index 11e2ec9..c4087f9 100644 --- a/core/applets/rotateapplet/rotate.h +++ b/core/applets/rotateapplet/rotate.h @@ -55,7 +55,6 @@ public: private: bool m_native; - int m_startupRot; ulong ref; }; -- cgit v0.9.0.2