author | mickeyl <mickeyl> | 2005-01-23 21:35:29 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2005-01-23 21:35:29 (UTC) |
commit | dd410f1eb69e68f04cf26b6d3e6bca88f0987f71 (patch) (unidiff) | |
tree | 0f2b59bae4c326011783e9cdea0754e180ae0e27 | |
parent | 78e658cecc7521cf3932f5eb44d3f551d73f3181 (diff) | |
download | opie-dd410f1eb69e68f04cf26b6d3e6bca88f0987f71.zip opie-dd410f1eb69e68f04cf26b6d3e6bca88f0987f71.tar.gz opie-dd410f1eb69e68f04cf26b6d3e6bca88f0987f71.tar.bz2 |
remove setSoftSuspend() from ODevice. this is a left-over from the old days
-rw-r--r-- | core/launcher/main.cpp | 7 | ||||
-rw-r--r-- | core/opie-login/main.cpp | 7 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice.cpp | 5 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice.h | 2 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_genuineintel.cpp | 6 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_genuineintel.h | 2 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_ipaq.cpp | 21 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_ipaq.h | 2 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_zaurus.cpp | 44 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_zaurus.h | 2 |
10 files changed, 3 insertions, 95 deletions
diff --git a/core/launcher/main.cpp b/core/launcher/main.cpp index 734d072..5bbed59 100644 --- a/core/launcher/main.cpp +++ b/core/launcher/main.cpp | |||
@@ -160,5 +160,2 @@ int initApplication( int argc, char ** argv ) | |||
160 | 160 | ||
161 | #ifndef Q_OS_MACX | ||
162 | ODevice::inst()->setSoftSuspend( true ); | ||
163 | #endif | ||
164 | { | 161 | { |
@@ -197,6 +194,2 @@ int initApplication( int argc, char ** argv ) | |||
197 | 194 | ||
198 | #ifndef Q_OS_MACX | ||
199 | ODevice::inst()->setSoftSuspend( false ); | ||
200 | #endif | ||
201 | |||
202 | odebug << "returning from qpe/initapplication..." << oendl; | 195 | odebug << "returning from qpe/initapplication..." << oendl; |
diff --git a/core/opie-login/main.cpp b/core/opie-login/main.cpp index 0699d0a..2de0180 100644 --- a/core/opie-login/main.cpp +++ b/core/opie-login/main.cpp | |||
@@ -194,4 +194,3 @@ int main ( int argc, char **argv ) | |||
194 | QWSServer::setDesktopBackground( QImage() ); | 194 | QWSServer::setDesktopBackground( QImage() ); |
195 | ODevice::inst ( )-> setDisplayStatus ( true ); | 195 | ODevice::inst()->setDisplayStatus( true ); |
196 | ODevice::inst ( )-> setSoftSuspend ( false ); | ||
197 | LoginApplication *app = new LoginApplication ( argc, argv, ppid ); | 196 | LoginApplication *app = new LoginApplication ( argc, argv, ppid ); |
@@ -337,4 +336,2 @@ int login_main ( int argc, char **argv, pid_t ppid ) | |||
337 | 336 | ||
338 | ODevice::inst ( )-> setSoftSuspend ( true ); | ||
339 | |||
340 | if ( QWSServer::mouseHandler() && | 337 | if ( QWSServer::mouseHandler() && |
@@ -363,4 +360,2 @@ int login_main ( int argc, char **argv, pid_t ppid ) | |||
363 | 360 | ||
364 | ODevice::inst ( )-> setSoftSuspend ( false ); | ||
365 | |||
366 | if ( app-> loginAs ( )) { | 361 | if ( app-> loginAs ( )) { |
diff --git a/libopie2/opiecore/device/odevice.cpp b/libopie2/opiecore/device/odevice.cpp index a824392..3d69614 100644 --- a/libopie2/opiecore/device/odevice.cpp +++ b/libopie2/opiecore/device/odevice.cpp | |||
@@ -256,7 +256,2 @@ ODevice::~ODevice() | |||
256 | 256 | ||
257 | bool ODevice::setSoftSuspend ( bool /*soft*/ ) | ||
258 | { | ||
259 | return false; | ||
260 | } | ||
261 | |||
262 | //#include <linux/apm_bios.h> | 257 | //#include <linux/apm_bios.h> |
diff --git a/libopie2/opiecore/device/odevice.h b/libopie2/opiecore/device/odevice.h index bbc32fa..96a41fc 100644 --- a/libopie2/opiecore/device/odevice.h +++ b/libopie2/opiecore/device/odevice.h | |||
@@ -257,4 +257,2 @@ public: | |||
257 | // system | 257 | // system |
258 | |||
259 | virtual bool setSoftSuspend ( bool on ); | ||
260 | virtual bool suspend(); | 258 | virtual bool suspend(); |
diff --git a/libopie2/opiecore/device/odevice_genuineintel.cpp b/libopie2/opiecore/device/odevice_genuineintel.cpp index 61ba052..1584249 100644 --- a/libopie2/opiecore/device/odevice_genuineintel.cpp +++ b/libopie2/opiecore/device/odevice_genuineintel.cpp | |||
@@ -162,8 +162,2 @@ void GenuineIntel::playAlarmSound() | |||
162 | 162 | ||
163 | bool GenuineIntel::setSoftSuspend ( bool ) | ||
164 | { | ||
165 | return false; | ||
166 | } | ||
167 | |||
168 | |||
169 | bool GenuineIntel::setDisplayBrightness ( int ) | 163 | bool GenuineIntel::setDisplayBrightness ( int ) |
diff --git a/libopie2/opiecore/device/odevice_genuineintel.h b/libopie2/opiecore/device/odevice_genuineintel.h index 52c5fc6..69316af 100644 --- a/libopie2/opiecore/device/odevice_genuineintel.h +++ b/libopie2/opiecore/device/odevice_genuineintel.h | |||
@@ -49,4 +49,2 @@ class GenuineIntel : public ODevice, public QWSServer::KeyboardFilter | |||
49 | public: | 49 | public: |
50 | virtual bool setSoftSuspend( bool soft ); | ||
51 | |||
52 | virtual bool setDisplayBrightness( int b ); | 50 | virtual bool setDisplayBrightness( int b ); |
diff --git a/libopie2/opiecore/device/odevice_ipaq.cpp b/libopie2/opiecore/device/odevice_ipaq.cpp index 9e01a0c..2ce38a9 100644 --- a/libopie2/opiecore/device/odevice_ipaq.cpp +++ b/libopie2/opiecore/device/odevice_ipaq.cpp | |||
@@ -338,23 +338,2 @@ void iPAQ::playAlarmSound() | |||
338 | 338 | ||
339 | |||
340 | bool iPAQ::setSoftSuspend ( bool soft ) | ||
341 | { | ||
342 | bool res = false; | ||
343 | int fd; | ||
344 | |||
345 | if (( fd = ::open ( "/proc/sys/ts/suspend_button_mode", O_WRONLY )) >= 0 ) { | ||
346 | if ( ::write ( fd, soft ? "1" : "0", 1 ) == 1 ) | ||
347 | res = true; | ||
348 | else | ||
349 | ::perror ( "write to /proc/sys/ts/suspend_button_mode" ); | ||
350 | |||
351 | ::close ( fd ); | ||
352 | } | ||
353 | else | ||
354 | ::perror ( "/proc/sys/ts/suspend_button_mode" ); | ||
355 | |||
356 | return res; | ||
357 | } | ||
358 | |||
359 | |||
360 | bool iPAQ::setDisplayBrightness ( int bright ) | 339 | bool iPAQ::setDisplayBrightness ( int bright ) |
diff --git a/libopie2/opiecore/device/odevice_ipaq.h b/libopie2/opiecore/device/odevice_ipaq.h index cc0b8ac..b1dac74 100644 --- a/libopie2/opiecore/device/odevice_ipaq.h +++ b/libopie2/opiecore/device/odevice_ipaq.h | |||
@@ -49,4 +49,2 @@ class iPAQ : public ODevice, public QWSServer::KeyboardFilter | |||
49 | public: | 49 | public: |
50 | virtual bool setSoftSuspend( bool soft ); | ||
51 | |||
52 | virtual bool setDisplayBrightness( int b ); | 50 | virtual bool setDisplayBrightness( int b ); |
diff --git a/libopie2/opiecore/device/odevice_zaurus.cpp b/libopie2/opiecore/device/odevice_zaurus.cpp index b22ee70..cbc7a24 100644 --- a/libopie2/opiecore/device/odevice_zaurus.cpp +++ b/libopie2/opiecore/device/odevice_zaurus.cpp | |||
@@ -382,39 +382,2 @@ bool Zaurus::setLedState( OLed which, OLedState st ) | |||
382 | 382 | ||
383 | bool Zaurus::setSoftSuspend ( bool soft ) | ||
384 | { | ||
385 | if (!m_embedix) { | ||
386 | /* non-Embedix kernels dont have kernel autosuspend */ | ||
387 | return ODevice::setSoftSuspend( soft ); | ||
388 | } | ||
389 | |||
390 | bool res = false; | ||
391 | int fd; | ||
392 | |||
393 | if ((( fd = ::open ( "/dev/apm_bios", O_RDWR )) >= 0 ) || | ||
394 | (( fd = ::open ( "/dev/misc/apm_bios",O_RDWR )) >= 0 )) { | ||
395 | |||
396 | int sources = ::ioctl( fd, APM_IOCGEVTSRC, 0 ); // get current event sources | ||
397 | |||
398 | if ( sources >= 0 ) { | ||
399 | if ( soft ) | ||
400 | sources &= ~APM_EVT_POWER_BUTTON; | ||
401 | else | ||
402 | sources |= APM_EVT_POWER_BUTTON; | ||
403 | |||
404 | if ( ::ioctl( fd, APM_IOCSEVTSRC, sources ) >= 0 ) // set new event sources | ||
405 | res = true; | ||
406 | else | ||
407 | perror ( "APM_IOCGEVTSRC" ); | ||
408 | } | ||
409 | else | ||
410 | perror ( "APM_IOCGEVTSRC" ); | ||
411 | |||
412 | ::close( fd ); | ||
413 | } | ||
414 | else | ||
415 | perror( "/dev/apm_bios or /dev/misc/apm_bios" ); | ||
416 | |||
417 | return res; | ||
418 | } | ||
419 | |||
420 | int Zaurus::displayBrightnessResolution() const | 383 | int Zaurus::displayBrightnessResolution() const |
@@ -542,5 +505,3 @@ Transformation Zaurus::rotation() const | |||
542 | Transformation rot; | 505 | Transformation rot; |
543 | int handle = 0; | 506 | |
544 | int retval = 0; | ||
545 | |||
546 | switch ( d->m_model ) { | 507 | switch ( d->m_model ) { |
@@ -568,4 +529,3 @@ ODirection Zaurus::direction() const | |||
568 | ODirection dir; | 529 | ODirection dir; |
569 | int handle = 0; | 530 | |
570 | int retval = 0; | ||
571 | switch ( d->m_model ) { | 531 | switch ( d->m_model ) { |
diff --git a/libopie2/opiecore/device/odevice_zaurus.h b/libopie2/opiecore/device/odevice_zaurus.h index c763798..04e73c4 100644 --- a/libopie2/opiecore/device/odevice_zaurus.h +++ b/libopie2/opiecore/device/odevice_zaurus.h | |||
@@ -96,4 +96,2 @@ class Zaurus : public ODevice | |||
96 | public: | 96 | public: |
97 | virtual bool setSoftSuspend( bool soft ); | ||
98 | |||
99 | virtual bool setDisplayBrightness( int b ); | 97 | virtual bool setDisplayBrightness( int b ); |