summaryrefslogtreecommitdiff
path: root/core/applets
authorkergoth <kergoth>2003-04-15 03:04:15 (UTC)
committer kergoth <kergoth>2003-04-15 03:04:15 (UTC)
commita0dd69741995f33de4eea6a5f97f46b91dff4cb8 (patch) (unidiff)
tree2214fb9416b1914355d438cd5d0200b51d1fd2f4 /core/applets
parentf1379d479d192f8c1dc99cd982aaaf545c4867f6 (diff)
downloadopie-a0dd69741995f33de4eea6a5f97f46b91dff4cb8.zip
opie-a0dd69741995f33de4eea6a5f97f46b91dff4cb8.tar.gz
opie-a0dd69741995f33de4eea6a5f97f46b91dff4cb8.tar.bz2
Add a third rotation direction, for 180 degree.
Diffstat (limited to 'core/applets') (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/rotateapplet/rotate.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/core/applets/rotateapplet/rotate.cpp b/core/applets/rotateapplet/rotate.cpp
index 0ead016..b490626 100644
--- a/core/applets/rotateapplet/rotate.cpp
+++ b/core/applets/rotateapplet/rotate.cpp
@@ -97,7 +97,7 @@ void RotateApplet::activated ( )
97 cfg.setGroup( "Appearance" ); 97 cfg.setGroup( "Appearance" );
98 98
99 // 0 -> 90° clockwise, 1 -> 90° counterclockwise 99 // 0 -> 90° clockwise, 1 -> 90° counterclockwise
100 bool rotDirection = cfg.readBoolEntry( "rotatedir", 0 ); 100 int rotDirection = cfg.readNumEntry( "rotatedir", 0 );
101 101
102 // hide inputs methods before rotation 102 // hide inputs methods before rotation
103 QCopEnvelope en( "QPE/TaskBar", "hideInputMethod()" ); 103 QCopEnvelope en( "QPE/TaskBar", "hideInputMethod()" );
@@ -107,11 +107,13 @@ void RotateApplet::activated ( )
107 // regardless of rotation direction 107 // regardless of rotation direction
108 newRotation = defaultRotation; 108 newRotation = defaultRotation;
109 } else { 109 } else {
110 if ( rotDirection ) { 110 if ( rotDirection == 1 ) {
111 newRotation = ( defaultRotation + 90 ) % 360; 111 newRotation = ( defaultRotation + 90 ) % 360;
112 } else { 112 } else if ( rotDirection == 0 ) {
113 newRotation = ( defaultRotation + 270 ) % 360; 113 newRotation = ( defaultRotation + 270 ) % 360;
114 } 114 } else {
115 newRotation = ( defaultRotation + 180 ) % 360;
116 }
115 } 117 }
116 118
117 QCopEnvelope env( "QPE/System", "setCurrentRotation(int)" ); 119 QCopEnvelope env( "QPE/System", "setCurrentRotation(int)" );