summaryrefslogtreecommitdiff
path: root/library/qpeapplication.cpp
authorsandman <sandman>2002-12-07 19:58:03 (UTC)
committer sandman <sandman>2002-12-07 19:58:03 (UTC)
commitd856a53635479f5ace72159aa513480ecd90bf1e (patch) (unidiff)
treeaba6aaa2cc9168ebd364308f37cdc9c4286c6703 /library/qpeapplication.cpp
parent09aa2b9a766e02e52ad64c0294e8b72e6fda8c85 (diff)
downloadopie-d856a53635479f5ace72159aa513480ecd90bf1e.zip
opie-d856a53635479f5ace72159aa513480ecd90bf1e.tar.gz
opie-d856a53635479f5ace72159aa513480ecd90bf1e.tar.bz2
- removed the libpreload stuff from global.cpp
- added qt_override.* which provides the same functionality as libpreload (the new -override patch for Qt/E is needed for this to work/compile) - changed qpeapplication a bit to accomodate the new interface
Diffstat (limited to 'library/qpeapplication.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpeapplication.cpp40
1 files changed, 14 insertions, 26 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
index 7cbda92..4c93111 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -86,6 +86,8 @@
86#include <sys/ioctl.h> 86#include <sys/ioctl.h>
87#include <sys/soundcard.h> 87#include <sys/soundcard.h>
88 88
89#include "qt_override_p.h"
90
89 91
90class QPEApplicationData 92class QPEApplicationData
91{ 93{
@@ -899,8 +901,6 @@ void QPEApplication::setDefaultRotation( int r )
899 } 901 }
900} 902}
901 903
902// exported to libpreload.so
903int opie_block_style = 0;
904 904
905/*! 905/*!
906 \internal 906 \internal
@@ -911,25 +911,9 @@ void QPEApplication::applyStyle()
911 config.setGroup( "Appearance" ); 911 config.setGroup( "Appearance" );
912 912
913 // don't block ourselves ... 913 // don't block ourselves ...
914 opie_block_style = 0; 914 Opie::force_appearance = 0;
915 915
916 916 static QString appname = Opie::binaryName ( );
917 static QString appname;
918
919 if ( appname. isNull ( )) {
920 char src [32];
921 char dst [PATH_MAX + 1];
922 ::sprintf ( src, "/proc/%d/exe", ::getpid ( ));
923 int l = ::readlink ( src, dst, PATH_MAX );
924 if ( l > 0 ) {
925 dst [l] = 0;
926 const char *b = ::strrchr ( dst, '/' );
927 appname = ( b ? b + 1 : dst );
928 }
929 else
930 appname = "";
931 }
932
933 917
934 QStringList ex = config. readListEntry ( "NoStyle", ';' ); 918 QStringList ex = config. readListEntry ( "NoStyle", ';' );
935 int nostyle = 0; 919 int nostyle = 0;
@@ -944,7 +928,7 @@ void QPEApplication::applyStyle()
944 QString style = config.readEntry( "Style", "Light" ); 928 QString style = config.readEntry( "Style", "Light" );
945 929
946 // don't set a custom style 930 // don't set a custom style
947 if ( nostyle & 0x01 ) 931 if ( nostyle & Opie::Force_Style )
948 style = "Light"; 932 style = "Light";
949 933
950 internalSetStyle ( style ); 934 internalSetStyle ( style );
@@ -973,7 +957,7 @@ void QPEApplication::applyStyle()
973 QString dec = config.readEntry( "Decoration", "Qtopia" ); 957 QString dec = config.readEntry( "Decoration", "Qtopia" );
974 958
975 // don't set a custom deco 959 // don't set a custom deco
976 if ( nostyle & 0x04 ) 960 if ( nostyle & Opie::Force_Decoration )
977 dec = ""; 961 dec = "";
978 962
979 //qDebug ( "Setting Deco: %s -- old %s (%d)", dec.latin1(), d-> decorationName.latin1(), nostyle); 963 //qDebug ( "Setting Deco: %s -- old %s (%d)", dec.latin1(), d-> decorationName.latin1(), nostyle);
@@ -988,7 +972,7 @@ void QPEApplication::applyStyle()
988 int fs = config.readNumEntry( "FontSize", font().pointSize() ); 972 int fs = config.readNumEntry( "FontSize", font().pointSize() );
989 973
990 // don't set a custom font 974 // don't set a custom font
991 if ( nostyle & 0x02 ) { 975 if ( nostyle & Opie::Force_Font ) {
992 ff = "Helvetica"; 976 ff = "Helvetica";
993 fs = 10; 977 fs = 10;
994 } 978 }
@@ -996,8 +980,8 @@ void QPEApplication::applyStyle()
996 setFont ( QFont ( ff, fs ), true ); 980 setFont ( QFont ( ff, fs ), true );
997 981
998 // revert to global blocking policy ... 982 // revert to global blocking policy ...
999 opie_block_style = config. readBoolEntry ( "ForceStyle", false ) ? 0xff : 0x00; 983 Opie::force_appearance = config. readBoolEntry ( "ForceStyle", false ) ? Opie::Force_All : Opie::Force_None;
1000 opie_block_style -= nostyle; 984 Opie::force_appearance &= ~nostyle;
1001} 985}
1002 986
1003void QPEApplication::systemMessage( const QCString& msg, const QByteArray& data ) 987void QPEApplication::systemMessage( const QCString& msg, const QByteArray& data )
@@ -1693,6 +1677,10 @@ void QPEApplication::hideOrQuit()
1693 quit(); 1677 quit();
1694} 1678}
1695 1679
1680
1681// These 6 stubs below need 1.5K in the binary and besides that -
1682// we are not using ancient toolchains anymore - sandman
1683
1696#if defined(QT_QWS_IPAQ) || defined(QT_QWS_SHARP) 1684#if defined(QT_QWS_IPAQ) || defined(QT_QWS_SHARP)
1697 1685
1698// The libraries with the skiff package (and possibly others) have 1686// The libraries with the skiff package (and possibly others) have