summaryrefslogtreecommitdiff
path: root/core/applets/rotateapplet/rotate.cpp
authorharlekin <harlekin>2003-03-25 23:06:12 (UTC)
committer harlekin <harlekin>2003-03-25 23:06:12 (UTC)
commitaca404f0c049c5b1bace7e842e7e64b987f04616 (patch) (unidiff)
tree31c0722de0784b8e5c83d2fd5a93d39cb96f13a5 /core/applets/rotateapplet/rotate.cpp
parent8ee32661cc5086c2cc34c4587de9649cd290579d (diff)
downloadopie-aca404f0c049c5b1bace7e842e7e64b987f04616.zip
opie-aca404f0c049c5b1bace7e842e7e64b987f04616.tar.gz
opie-aca404f0c049c5b1bace7e842e7e64b987f04616.tar.bz2
better interaction with the rotate app
Diffstat (limited to 'core/applets/rotateapplet/rotate.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/applets/rotateapplet/rotate.cpp6
1 files changed, 3 insertions, 3 deletions
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
@@ -38,13 +38,12 @@
38 38
39 39
40RotateApplet::RotateApplet ( ) 40RotateApplet::RotateApplet ( )
41 : QObject ( 0, "RotateApplet" ), ref ( 0 ) 41 : QObject ( 0, "RotateApplet" ), ref ( 0 )
42{ 42{
43 m_native = true; 43 m_native = true;
44 m_startupRot = QPEApplication::defaultRotation();
45} 44}
46 45
47RotateApplet::~RotateApplet ( ) 46RotateApplet::~RotateApplet ( )
48{ 47{
49} 48}
50 49
@@ -87,17 +86,18 @@ QPopupMenu *RotateApplet::popup ( QWidget * ) const
87{ 86{
88 return 0; 87 return 0;
89} 88}
90 89
91void RotateApplet::activated ( ) 90void RotateApplet::activated ( )
92{ 91{
92 int currentRotation = QPEApplication::defaultRotation();
93 int newRotation; 93 int newRotation;
94 if ( m_native == true ) { 94 if ( m_native == true ) {
95 newRotation = m_startupRot + 90; 95 newRotation = currentRotation + 90;
96 } else { 96 } else {
97 newRotation = m_startupRot; 97 newRotation = currentRotation - 90;
98 } 98 }
99 QCopEnvelope env( "QPE/System", "setCurrentRotation(int)" ); 99 QCopEnvelope env( "QPE/System", "setCurrentRotation(int)" );
100 env << newRotation; 100 env << newRotation;
101 QCopEnvelope env2( "QPE/System", "setDefaultRotation(int)" ); 101 QCopEnvelope env2( "QPE/System", "setDefaultRotation(int)" );
102 env2 << newRotation; 102 env2 << newRotation;
103 103