author | kergoth <kergoth> | 2003-03-26 21:58:02 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2003-03-26 21:58:02 (UTC) |
commit | 01e8da96a688b8a84133b7c3e5a89c295a71d9fd (patch) (side-by-side diff) | |
tree | 84ea398894de7dbf077273c6bbad3b9667d4fade | |
parent | 17ac2947f6485a31db216c431fa667192f1fc8a0 (diff) | |
download | opie-01e8da96a688b8a84133b7c3e5a89c295a71d9fd.zip opie-01e8da96a688b8a84133b7c3e5a89c295a71d9fd.tar.gz opie-01e8da96a688b8a84133b7c3e5a89c295a71d9fd.tar.bz2 |
Instead of writing the entire QWS_DISPLAY field in setDefaultRotation, write out a single numeric rotation value field, which is the degrees to rotate.
-rw-r--r-- | library/qpeapplication.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp index 7463074..ac7b779 100644 --- a/library/qpeapplication.cpp +++ b/library/qpeapplication.cpp @@ -898,97 +898,97 @@ QString QPEApplication::qpeDir() /*! Returns the user's current Document directory. There is a trailing "/". .. well, it does now,, and there's no trailing '/' */ QString QPEApplication::documentDir() { const char* base = getenv( "HOME"); if ( base ) return QString( base ) + "/Documents"; return QString( "../Documents" ); } static int deforient = -1; /*! \internal */ int QPEApplication::defaultRotation() { if ( deforient < 0 ) { QString d = getenv( "QWS_DISPLAY" ); if ( d.contains( "Rot90" ) ) { deforient = 90; } else if ( d.contains( "Rot180" ) ) { deforient = 180; } else if ( d.contains( "Rot270" ) ) { deforient = 270; } else { deforient = 0; } } return deforient; } /*! \internal */ void QPEApplication::setDefaultRotation( int r ) { if ( qApp->type() == GuiServer ) { deforient = r; setenv( "QWS_DISPLAY", QString( "Transformed:Rot%1:0" ).arg( r ).latin1(), 1 ); Config config("qpe"); config.setGroup( "Rotation" ); - config.writeEntry( "Screen", getenv("QWS_DISPLAY") ); + config.writeEntry( "Rot", r ); } else { #ifndef QT_NO_COP { QCopEnvelope e( "QPE/System", "setDefaultRotation(int)" ); e << r; } #endif } } /*! \internal */ void QPEApplication::applyStyle() { Config config( "qpe" ); config.setGroup( "Appearance" ); // don't block ourselves ... Opie::force_appearance = 0; static QString appname = Opie::binaryName ( ); QStringList ex = config. readListEntry ( "NoStyle", ';' ); int nostyle = 0; for ( QStringList::Iterator it = ex. begin ( ); it != ex. end ( ); ++it ) { if ( QRegExp (( *it ). mid ( 1 ), false, true ). find ( appname, 0 ) >= 0 ) { nostyle = ( *it ). left ( 1 ). toInt ( 0, 32 ); break; } } // Widget style QString style = config.readEntry( "Style", "Light" ); // don't set a custom style if ( nostyle & Opie::Force_Style ) style = "Light"; internalSetStyle ( style ); // Colors QColor bgcolor( config.readEntry( "Background", "#E5E1D5" ) ); QColor btncolor( config.readEntry( "Button", "#D6CDBB" ) ); QPalette pal( btncolor, bgcolor ); QString color = config.readEntry( "Highlight", "#800000" ); |