author | mickeyl <mickeyl> | 2006-08-02 19:12:38 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2006-08-02 19:12:38 (UTC) |
commit | cc2f5d3f3173be64d177ad827864b7da95343a1d (patch) (side-by-side diff) | |
tree | 8c278fc6b108667e3fdc2b98d91dd5377756c95a /libopie2 | |
parent | 3e77cb64e7ca0d89656e6665c1007bff6b34d609 (diff) | |
download | opie-cc2f5d3f3173be64d177ad827864b7da95343a1d.zip opie-cc2f5d3f3173be64d177ad827864b7da95343a1d.tar.gz opie-cc2f5d3f3173be64d177ad827864b7da95343a1d.tar.bz2 |
improve ipaq 2200, 4xxx, 4700 support. patches courtesy R.Wagner, E.Hovland, P.Sokolovsky. thanks guys
-rw-r--r-- | libopie2/opiecore/device/odevice.h | 1 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_ipaq.cpp | 47 |
2 files changed, 42 insertions, 6 deletions
diff --git a/libopie2/opiecore/device/odevice.h b/libopie2/opiecore/device/odevice.h index c2fa411..a8362cd 100644 --- a/libopie2/opiecore/device/odevice.h +++ b/libopie2/opiecore/device/odevice.h @@ -73,2 +73,3 @@ enum OModel { Model_iPAQ_HX4700 = ( Model_iPAQ | 0x000A ), + Model_iPAQ_H4xxx = ( Model_iPAQ | 0x000b ), Model_Jornada = ( 6 << 16 ), diff --git a/libopie2/opiecore/device/odevice_ipaq.cpp b/libopie2/opiecore/device/odevice_ipaq.cpp index 63b60a7..00939bf 100644 --- a/libopie2/opiecore/device/odevice_ipaq.cpp +++ b/libopie2/opiecore/device/odevice_ipaq.cpp @@ -87,3 +87,3 @@ typedef struct { struct i_button ipaq_buttons [] = { - { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx | Model_iPAQ_H191x, + { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx | Model_iPAQ_H191x | Model_iPAQ_H22xx | Model_iPAQ_HX4700 | Model_iPAQ_H4xxx, Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"), @@ -92,3 +92,3 @@ struct i_button ipaq_buttons [] = { "today", "raise()" }, - { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx | Model_iPAQ_H191x, + { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx | Model_iPAQ_H191x | Model_iPAQ_H22xx | Model_iPAQ_HX4700 | Model_iPAQ_H4xxx, Qt::Key_F10, QT_TRANSLATE_NOOP("Button", "Contacts Button"), @@ -107,3 +107,3 @@ struct i_button ipaq_buttons [] = { "opiemail", "newMail()" }, - { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx | Model_iPAQ_H191x, + { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx | Model_iPAQ_H191x | Model_iPAQ_H4xxx, Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), @@ -118,3 +118,3 @@ struct i_button ipaq_buttons [] = { - { Model_iPAQ_H191x, + { Model_iPAQ_H191x | Model_iPAQ_H4xxx, Qt::Key_F8, QT_TRANSLATE_NOOP("Button", "Mail Button"), @@ -123,3 +123,3 @@ struct i_button ipaq_buttons [] = { "opiemail", "newMail()" }, - { Model_iPAQ_H191x, + { Model_iPAQ_H191x | Model_iPAQ_H4xxx, Qt::Key_F7, QT_TRANSLATE_NOOP("Button", "Record Button"), @@ -129,2 +129,30 @@ struct i_button ipaq_buttons [] = { + //h2200 has different button mapping + { Model_iPAQ_H22xx, + Qt::Key_NumLock, QT_TRANSLATE_NOOP("Button", "Mail Button"), + "devicebuttons/ipaq_mail", + "opiemail", "raise()", + "opiemail", "newMail()" }, + { Model_iPAQ_H22xx, + Qt::Key_ScrollLock, QT_TRANSLATE_NOOP("Button", "Menu Button"), + "devicebuttons/ipaq_menu", + "QPE/TaskBar", "toggleMenu()", + "QPE/TaskBar", "toggleStartMenu()" }, + // and hx4700 has different button mapping still + { Model_iPAQ_HX4700, + Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Mail Button"), + "devicebuttons/ipaq_mail", + "opiemail", "raise()", + "opiemail", "newMail()" }, + { Model_iPAQ_HX4700, + Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Record Button"), + "devicebuttons/ipaq_record", + "QPE/VMemo", "toggleRecord()", + "sound", "raise()" }, + { Model_iPAQ_HX4700, + Qt::Key_Home, QT_TRANSLATE_NOOP("Button", "Home Button"), + "devicebuttons/ipaq_home", + "QPE/Launcher", "home()", + "buttonsettings", "raise()" }, + }; @@ -158,2 +186,4 @@ void iPAQ::init(const QString& model) d->m_model = Model_iPAQ_HX4700; + else if ( d->m_modelstr == "H4000" ) + d->m_model = Model_iPAQ_H4xxx; @@ -172,2 +202,3 @@ void iPAQ::init(const QString& model) case Model_iPAQ_HX4700: + case Model_iPAQ_H4xxx: d->m_rotation = Rot0; @@ -311,2 +342,3 @@ bool iPAQ::filter ( int /*unicode*/, int keycode, int modifiers, bool isPress, b ( d->m_model == Model_iPAQ_H191x ) || + ( d->m_model == Model_iPAQ_H4xxx ) || ( d->m_model == Model_iPAQ_H1940 )) @@ -318,3 +350,3 @@ bool iPAQ::filter ( int /*unicode*/, int keycode, int modifiers, bool isPress, b case Key_F6: - if ( d->m_model != Model_iPAQ_H191x ) + if ( d->m_model != Model_iPAQ_H191x && d->m_model != Model_iPAQ_H4xxx ) break; @@ -382,2 +414,3 @@ bool iPAQ::setDisplayBrightness ( int bright ) case Model_iPAQ_H191x: + case Model_iPAQ_H4xxx: { @@ -441,2 +474,3 @@ int iPAQ::displayBrightnessResolution() const case Model_iPAQ_HX4700: + case Model_iPAQ_H4xxx: return 255; @@ -485,2 +519,3 @@ bool iPAQ::hasLightSensor() const case Model_iPAQ_H191x: + case Model_iPAQ_H4xxx: return false; |