Diffstat (limited to 'libopie2/opiecore/device/odevice_mypal.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiecore/device/odevice_mypal.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/libopie2/opiecore/device/odevice_mypal.cpp b/libopie2/opiecore/device/odevice_mypal.cpp index 7eb8d1d..208be46 100644 --- a/libopie2/opiecore/device/odevice_mypal.cpp +++ b/libopie2/opiecore/device/odevice_mypal.cpp | |||
@@ -47,55 +47,58 @@ | |||
47 | /* STD */ | 47 | /* STD */ |
48 | #include <fcntl.h> | 48 | #include <fcntl.h> |
49 | #include <math.h> | 49 | #include <math.h> |
50 | #include <stdlib.h> | 50 | #include <stdlib.h> |
51 | #include <signal.h> | 51 | #include <signal.h> |
52 | #include <sys/ioctl.h> | 52 | #include <sys/ioctl.h> |
53 | #include <sys/time.h> | 53 | #include <sys/time.h> |
54 | #include <unistd.h> | 54 | #include <unistd.h> |
55 | #ifndef QT_NO_SOUND | 55 | #ifndef QT_NO_SOUND |
56 | #include <linux/soundcard.h> | 56 | #include <linux/soundcard.h> |
57 | #endif | 57 | #endif |
58 | 58 | ||
59 | 59 | ||
60 | using namespace Opie::Core; | 60 | using namespace Opie::Core; |
61 | using namespace Opie::Core::Internal; | 61 | using namespace Opie::Core::Internal; |
62 | 62 | ||
63 | #define Model_Keyboardless_2_6 (Model_MyPal_716) | ||
64 | |||
63 | struct m_button mypal_buttons [] = { | 65 | struct m_button mypal_buttons [] = { |
64 | { Model_MyPal_716, | 66 | // Common button map for all keyboardless devices with 2.6 kernel |
67 | { Model_Keyboardless_2_6, | ||
65 | Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"), | 68 | Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"), |
66 | "devicebuttons/ipaq_calendar", | 69 | "devicebuttons/ipaq_calendar", |
67 | "datebook", "nextView()", | 70 | "datebook", "nextView()", |
68 | "today", "raise()" }, | 71 | "today", "raise()" }, |
69 | { Model_MyPal_716, | 72 | { Model_Keyboardless_2_6, |
70 | Qt::Key_F10, QT_TRANSLATE_NOOP("Button", "Contacts Button"), | 73 | Qt::Key_F10, QT_TRANSLATE_NOOP("Button", "Contacts Button"), |
71 | "devicebuttons/ipaq_contact", | 74 | "devicebuttons/ipaq_contact", |
72 | "addressbook", "raise()", | 75 | "addressbook", "raise()", |
73 | "addressbook", "beamBusinessCard()" }, | 76 | "addressbook", "beamBusinessCard()" }, |
74 | { Model_MyPal_716, | 77 | { Model_Keyboardless_2_6, |
75 | Qt::Key_F8, QT_TRANSLATE_NOOP("Button", "Mail Button"), | 78 | Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Mail Button"), |
76 | "devicebuttons/ipaq_mail", | 79 | "devicebuttons/ipaq_mail", |
77 | "opiemail", "raise()", | 80 | "opiemail", "raise()", |
78 | "opiemail", "newMail()" }, | 81 | "opiemail", "newMail()" }, |
79 | { Model_MyPal_716, | 82 | { Model_Keyboardless_2_6, |
80 | Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), | 83 | Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), |
81 | "devicebuttons/ipaq_home", | 84 | "devicebuttons/ipaq_home", |
82 | "QPE/Launcher", "home()", | 85 | "QPE/Launcher", "home()", |
83 | "buttonsettings", "raise()" }, | 86 | "buttonsettings", "raise()" }, |
84 | { Model_MyPal_716, | 87 | { Model_Keyboardless_2_6, |
85 | Qt::Key_F7, QT_TRANSLATE_NOOP("Button", "Record Button"), | 88 | Qt::Key_F24, QT_TRANSLATE_NOOP("Button", "Record Button"), |
86 | "devicebuttons/ipaq_record", | 89 | "devicebuttons/ipaq_record", |
87 | "QPE/VMemo", "toggleRecord()", | 90 | "QPE/VMemo", "toggleRecord()", |
88 | "sound", "raise()" }, | 91 | "sound", "raise()" }, |
89 | }; | 92 | }; |
90 | 93 | ||
91 | void MyPal::init(const QString& model) | 94 | void MyPal::init(const QString& model) |
92 | { | 95 | { |
93 | d->m_vendorstr = "Asus"; | 96 | d->m_vendorstr = "Asus"; |
94 | d->m_vendor = Vendor_Asus; | 97 | d->m_vendor = Vendor_Asus; |
95 | 98 | ||
96 | d->m_modelstr = model.mid(model.findRev('A')); | 99 | d->m_modelstr = model.mid(model.findRev('A')); |
97 | if ( d->m_modelstr == "A716" ) | 100 | if ( d->m_modelstr == "A716" ) |
98 | d->m_model = Model_MyPal_716; | 101 | d->m_model = Model_MyPal_716; |
99 | else | 102 | else |
100 | d->m_model = Model_Unknown; | 103 | d->m_model = Model_Unknown; |
101 | 104 | ||