summaryrefslogtreecommitdiff
path: root/library
authorzecke <zecke>2004-06-27 19:36:48 (UTC)
committer zecke <zecke>2004-06-27 19:36:48 (UTC)
commit78cd13f15c6057e18b6f095841a90bb438dd6fd2 (patch) (unidiff)
tree08376c584867032bc4fa5725467d46615b02e700 /library
parent0ef75ca5409d290df36d1c0bbf0413e37bfd4124 (diff)
downloadopie-78cd13f15c6057e18b6f095841a90bb438dd6fd2.zip
opie-78cd13f15c6057e18b6f095841a90bb438dd6fd2.tar.gz
opie-78cd13f15c6057e18b6f095841a90bb438dd6fd2.tar.bz2
Safe eilers some time for weak symbols on MacOS X
Diffstat (limited to 'library') (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpeapplication.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
index 4bc0c5f..b686e2e 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -1268,97 +1268,103 @@ void QPEApplication::setDefaultRotation( int r )
1268 Config config("qpe"); 1268 Config config("qpe");
1269 config.setGroup( "Rotation" ); 1269 config.setGroup( "Rotation" );
1270 config.writeEntry( "Rot", r ); 1270 config.writeEntry( "Rot", r );
1271 } 1271 }
1272 else { 1272 else {
1273#ifndef QT_NO_COP 1273#ifndef QT_NO_COP
1274 { QCopEnvelope e( "QPE/System", "setDefaultRotation(int)" ); 1274 { QCopEnvelope e( "QPE/System", "setDefaultRotation(int)" );
1275 e << r; 1275 e << r;
1276 } 1276 }
1277#endif 1277#endif
1278 1278
1279 } 1279 }
1280} 1280}
1281 1281
1282#include <qgfx_qws.h> 1282#include <qgfx_qws.h>
1283#include <qwindowsystem_qws.h> 1283#include <qwindowsystem_qws.h>
1284 1284
1285extern void qws_clearLoadedFonts(); 1285extern void qws_clearLoadedFonts();
1286 1286
1287void QPEApplication::setCurrentMode( int x, int y, int depth ) 1287void QPEApplication::setCurrentMode( int x, int y, int depth )
1288{ 1288{
1289 // Reset the caches 1289 // Reset the caches
1290 qws_clearLoadedFonts(); 1290 qws_clearLoadedFonts();
1291 QPixmapCache::clear(); 1291 QPixmapCache::clear();
1292 1292
1293 // Change the screen mode 1293 // Change the screen mode
1294 qt_screen->setMode(x, y, depth); 1294 qt_screen->setMode(x, y, depth);
1295 1295
1296 if ( qApp->type() == GuiServer ) { 1296 if ( qApp->type() == GuiServer ) {
1297 // Reconfigure the GuiServer 1297 // Reconfigure the GuiServer
1298 qwsServer->beginDisplayReconfigure(); 1298 qwsServer->beginDisplayReconfigure();
1299 qwsServer->endDisplayReconfigure(); 1299 qwsServer->endDisplayReconfigure();
1300 1300
1301 // Get all the running apps to reset 1301 // Get all the running apps to reset
1302 QCopEnvelope env( "QPE/System", "reset()" ); 1302 QCopEnvelope env( "QPE/System", "reset()" );
1303 } 1303 }
1304} 1304}
1305 1305
1306void QPEApplication::reset() { 1306void QPEApplication::reset() {
1307 // Reconnect to the screen 1307 // Reconnect to the screen
1308 qt_screen->disconnect(); 1308 qt_screen->disconnect();
1309 qt_screen->connect( QString::null ); 1309 qt_screen->connect( QString::null );
1310 1310
1311 // Redraw everything 1311 // Redraw everything
1312 applyStyle(); 1312 applyStyle();
1313} 1313}
1314 1314
1315 1315
1316extern bool qt_left_hand_scrollbars __attribute__(( weak )); 1316#ifdef Q_OS_MACX
1317#define WEAK_SYMBOL __attribute__((weak_import))
1318#else
1319#define WEAK_SYMBOL __attribute__((weak))
1320#endif
1321
1322extern bool qt_left_hand_scrollbars WEAK_SYMBOL;
1317/*! 1323/*!
1318 \internal 1324 \internal
1319*/ 1325*/
1320void QPEApplication::applyStyle() 1326void QPEApplication::applyStyle()
1321{ 1327{
1322 Config config( "qpe" ); 1328 Config config( "qpe" );
1323 config.setGroup( "Appearance" ); 1329 config.setGroup( "Appearance" );
1324 1330
1325#if QT_VERSION > 233 1331#if QT_VERSION > 233
1326#if !defined(OPIE_NO_OVERRIDE_QT) 1332#if !defined(OPIE_NO_OVERRIDE_QT)
1327 // don't block ourselves ... 1333 // don't block ourselves ...
1328 Opie::force_appearance = 0; 1334 Opie::force_appearance = 0;
1329 1335
1330 static QString appname = Opie::binaryName ( ); 1336 static QString appname = Opie::binaryName ( );
1331 1337
1332 QStringList ex = config. readListEntry ( "NoStyle", ';' ); 1338 QStringList ex = config. readListEntry ( "NoStyle", ';' );
1333 int nostyle = 0; 1339 int nostyle = 0;
1334 for ( QStringList::Iterator it = ex. begin ( ); it != ex. end ( ); ++it ) { 1340 for ( QStringList::Iterator it = ex. begin ( ); it != ex. end ( ); ++it ) {
1335 if ( QRegExp (( *it ). mid ( 1 ), false, true ). find ( appname, 0 ) >= 0 ) { 1341 if ( QRegExp (( *it ). mid ( 1 ), false, true ). find ( appname, 0 ) >= 0 ) {
1336 nostyle = ( *it ). left ( 1 ). toInt ( 0, 32 ); 1342 nostyle = ( *it ). left ( 1 ). toInt ( 0, 32 );
1337 break; 1343 break;
1338 } 1344 }
1339 } 1345 }
1340#else 1346#else
1341 int nostyle = 0; 1347 int nostyle = 0;
1342#endif 1348#endif
1343 1349
1344 // Widget style 1350 // Widget style
1345 QString style = config.readEntry( "Style", "FlatStyle" ); 1351 QString style = config.readEntry( "Style", "FlatStyle" );
1346 1352
1347 // don't set a custom style 1353 // don't set a custom style
1348 if ( nostyle & Opie::Force_Style ) 1354 if ( nostyle & Opie::Force_Style )
1349 style = "FlatStyle"; 1355 style = "FlatStyle";
1350 1356
1351 internalSetStyle ( style ); 1357 internalSetStyle ( style );
1352 1358
1353 // Colors - from /etc/colors/Liquid.scheme 1359 // Colors - from /etc/colors/Liquid.scheme
1354 QColor bgcolor( config.readEntry( "Background", "#E0E0E0" ) ); 1360 QColor bgcolor( config.readEntry( "Background", "#E0E0E0" ) );
1355 QColor btncolor( config.readEntry( "Button", "#96c8fa" ) ); 1361 QColor btncolor( config.readEntry( "Button", "#96c8fa" ) );
1356 QPalette pal( btncolor, bgcolor ); 1362 QPalette pal( btncolor, bgcolor );
1357 QString color = config.readEntry( "Highlight", "#73adef" ); 1363 QString color = config.readEntry( "Highlight", "#73adef" );
1358 pal.setColor( QColorGroup::Highlight, QColor( color ) ); 1364 pal.setColor( QColorGroup::Highlight, QColor( color ) );
1359 color = config.readEntry( "HighlightedText", "#FFFFFF" ); 1365 color = config.readEntry( "HighlightedText", "#FFFFFF" );
1360 pal.setColor( QColorGroup::HighlightedText, QColor( color ) ); 1366 pal.setColor( QColorGroup::HighlightedText, QColor( color ) );
1361 color = config.readEntry( "Text", "#000000" ); 1367 color = config.readEntry( "Text", "#000000" );
1362 pal.setColor( QColorGroup::Text, QColor( color ) ); 1368 pal.setColor( QColorGroup::Text, QColor( color ) );
1363 color = config.readEntry( "ButtonText", "#000000" ); 1369 color = config.readEntry( "ButtonText", "#000000" );
1364 pal.setColor( QPalette::Active, QColorGroup::ButtonText, QColor( color ) ); 1370 pal.setColor( QPalette::Active, QColorGroup::ButtonText, QColor( color ) );