From a0dd69741995f33de4eea6a5f97f46b91dff4cb8 Mon Sep 17 00:00:00 2001 From: kergoth Date: Tue, 15 Apr 2003 03:04:15 +0000 Subject: Add a third rotation direction, for 180 degree. --- (limited to 'core') 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 ( ) cfg.setGroup( "Appearance" ); // 0 -> 90° clockwise, 1 -> 90° counterclockwise - bool rotDirection = cfg.readBoolEntry( "rotatedir", 0 ); + int rotDirection = cfg.readNumEntry( "rotatedir", 0 ); // hide inputs methods before rotation QCopEnvelope en( "QPE/TaskBar", "hideInputMethod()" ); @@ -107,11 +107,13 @@ void RotateApplet::activated ( ) // regardless of rotation direction newRotation = defaultRotation; } else { - if ( rotDirection ) { + if ( rotDirection == 1 ) { newRotation = ( defaultRotation + 90 ) % 360; - } else { + } else if ( rotDirection == 0 ) { newRotation = ( defaultRotation + 270 ) % 360; - } + } else { + newRotation = ( defaultRotation + 180 ) % 360; + } } QCopEnvelope env( "QPE/System", "setCurrentRotation(int)" ); -- cgit v0.9.0.2