summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/device/odevice_palm.cpp
Side-by-side diff
Diffstat (limited to 'libopie2/opiecore/device/odevice_palm.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice_palm.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libopie2/opiecore/device/odevice_palm.cpp b/libopie2/opiecore/device/odevice_palm.cpp
index 76399f8..399c08c 100644
--- a/libopie2/opiecore/device/odevice_palm.cpp
+++ b/libopie2/opiecore/device/odevice_palm.cpp
@@ -68,49 +68,49 @@ struct palm_button palm_buttons [] = {
"buttonsettings", "raise()" },
{ Model_Palm_TX | Model_Palm_LD | Model_Palm_Z72,
Qt::Key_F10, QT_TRANSLATE_NOOP( "Button", "Calendar Button" ),
"devicebuttons/palm_calendar",
"datebook", "nextView()",
"today", "raise()" },
{ Model_Palm_TX | Model_Palm_LD | Model_Palm_Z72,
Qt::Key_F11, QT_TRANSLATE_NOOP( "Button", "Todo Button" ),
"devicebuttons/palm_todo",
"todolist", "raise()",
"todolist", "create()" },
{ Model_Palm_TX | Model_Palm_LD | Model_Palm_Z72,
Qt::Key_F12, QT_TRANSLATE_NOOP( "Button", "Mail Button" ),
"devicebuttons/palm_mail",
"opiemail", "raise()",
"opiemail", "newmail()" },
{ Model_Palm_LD,
Qt::Key_F7, QT_TRANSLATE_NOOP( "Button", "Voice Memo Button" ),
"devicebuttons/palm_voice_memo",
"QPE/TaskBar", "toggleMenu()",
"QPE/TaskBar", "toggleStartMenu()" },
{ Model_Palm_LD,
Qt::Key_F8, QT_TRANSLATE_NOOP( "Button", "Rotate Button" ),
"devicebuttons/palm_rotate",
- "QPE/Rotation", "flip()",0},
+ "QPE/Rotation", "flip()",0,0},
};
void Palm::init(const QString& cpu_info)
{
d->m_vendorstr = "Palm";
d->m_vendor = Vendor_Palm;
QString model = "unknown";
int loc = cpu_info.find( ":" );
if ( loc != -1 )
model = cpu_info.mid( loc+2 ).simplifyWhiteSpace();
else
model = cpu_info;
if ( model == "Palm LifeDrive" ) {
d->m_modelstr = "Palm LifeDrive";
d->m_model = Model_Palm_LD;
}
else if ( model == "Palm TX" ) {
d->m_modelstr = "Palm TX";
d->m_model = Model_Palm_TX;
}
else if ( model == "Palm Zire 72" ) {
@@ -197,48 +197,50 @@ bool Palm::filter ( int /*unicode*/, int keycode, int modifiers, bool isPress, b
}
bool Palm::suspend()
{
// some Palms do not implement their own power management at the moment.
bool res = false;
if ( !isQWS( ) ) // only qwsserver is allowed to suspend
return false;
switch ( d->m_model ) {
case Model_Palm_LD:
case Model_Palm_Z72:
{
QCopChannel::send( "QPE/System", "aboutToSuspend()" );
::sync(); // flush fs caches
res = ( ::system ( "apm --suspend" ) == 0 );
QCopChannel::send( "QPE/System", "returnFromSuspend()" );
}
break;
+ default:
+ break;
}
return res;
}
int Palm::displayBrightnessResolution() const
{
int res = 1;
switch ( d->m_model )
{
case Model_Palm_LD:
case Model_Palm_TX:
case Model_Palm_Z72:
int fd = ::open( m_backlightdev + "max_brightness", O_RDONLY|O_NONBLOCK );
if ( fd )
{
char buf[100];
if ( ::read( fd, &buf[0], sizeof buf ) ) ::sscanf( &buf[0], "%d", &res );
::close( fd );
}
break;