author | korovkin <korovkin> | 2006-12-13 19:31:16 (UTC) |
---|---|---|
committer | korovkin <korovkin> | 2006-12-13 19:31:16 (UTC) |
commit | 5a0012fb3b75ff41437b0685386731d1367e4e7b (patch) (unidiff) | |
tree | 39aaca04066159ed4c97a4ffae521d938d013780 /libopie2 | |
parent | a691909050b60b94f5525093062c23d0fab11d1b (diff) | |
download | opie-5a0012fb3b75ff41437b0685386731d1367e4e7b.zip opie-5a0012fb3b75ff41437b0685386731d1367e4e7b.tar.gz opie-5a0012fb3b75ff41437b0685386731d1367e4e7b.tar.bz2 |
Committed patch provided by Paul Solkolovsky which combines all
the 2.6 based PDAs togeter. Thank you Paul!
-rw-r--r-- | libopie2/opiecore/device/odevice_ipaq.cpp | 77 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_mypal.cpp | 17 |
2 files changed, 43 insertions, 51 deletions
diff --git a/libopie2/opiecore/device/odevice_ipaq.cpp b/libopie2/opiecore/device/odevice_ipaq.cpp index 00939bf..16ecc27 100644 --- a/libopie2/opiecore/device/odevice_ipaq.cpp +++ b/libopie2/opiecore/device/odevice_ipaq.cpp | |||
@@ -86,4 +86,8 @@ typedef struct { | |||
86 | 86 | ||
87 | #define Model_Keyboardless_2_6 (Model_iPAQ_H191x | Model_iPAQ_H22xx | Model_iPAQ_HX4700 | Model_iPAQ_H4xxx) | ||
88 | |||
87 | struct i_button ipaq_buttons [] = { | 89 | struct i_button ipaq_buttons [] = { |
88 | { 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, | 90 | |
91 | // Common button map for all keyboardless devices with 2.6 kernel | ||
92 | { Model_Keyboardless_2_6, | ||
89 | Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"), | 93 | Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"), |
@@ -92,3 +96,3 @@ struct i_button ipaq_buttons [] = { | |||
92 | "today", "raise()" }, | 96 | "today", "raise()" }, |
93 | { 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, | 97 | { Model_Keyboardless_2_6, |
94 | Qt::Key_F10, QT_TRANSLATE_NOOP("Button", "Contacts Button"), | 98 | Qt::Key_F10, QT_TRANSLATE_NOOP("Button", "Contacts Button"), |
@@ -97,9 +101,4 @@ struct i_button ipaq_buttons [] = { | |||
97 | "addressbook", "beamBusinessCard()" }, | 101 | "addressbook", "beamBusinessCard()" }, |
98 | { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx, | 102 | { Model_Keyboardless_2_6, |
99 | Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"), | 103 | Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Mail Button"), |
100 | "devicebuttons/ipaq_menu", | ||
101 | "QPE/TaskBar", "toggleMenu()", | ||
102 | "QPE/TaskBar", "toggleStartMenu()" }, | ||
103 | { Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx, | ||
104 | Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Mail Button"), | ||
105 | "devicebuttons/ipaq_mail", | 104 | "devicebuttons/ipaq_mail", |
@@ -107,3 +106,3 @@ struct i_button ipaq_buttons [] = { | |||
107 | "opiemail", "newMail()" }, | 106 | "opiemail", "newMail()" }, |
108 | { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx | Model_iPAQ_H191x | Model_iPAQ_H4xxx, | 107 | { Model_Keyboardless_2_6, |
109 | Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), | 108 | Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), |
@@ -112,3 +111,3 @@ struct i_button ipaq_buttons [] = { | |||
112 | "buttonsettings", "raise()" }, | 111 | "buttonsettings", "raise()" }, |
113 | { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx, | 112 | { Model_Keyboardless_2_6, |
114 | Qt::Key_F24, QT_TRANSLATE_NOOP("Button", "Record Button"), | 113 | Qt::Key_F24, QT_TRANSLATE_NOOP("Button", "Record Button"), |
@@ -118,21 +117,15 @@ struct i_button ipaq_buttons [] = { | |||
118 | 117 | ||
119 | { Model_iPAQ_H191x | Model_iPAQ_H4xxx, | 118 | // Devices with 2.4 kernel |
120 | Qt::Key_F8, QT_TRANSLATE_NOOP("Button", "Mail Button"), | 119 | { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx, |
121 | "devicebuttons/ipaq_mail", | 120 | Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"), |
122 | "opiemail", "raise()", | 121 | "devicebuttons/ipaq_calendar", |
123 | "opiemail", "newMail()" }, | 122 | "datebook", "nextView()", |
124 | { Model_iPAQ_H191x | Model_iPAQ_H4xxx, | 123 | "today", "raise()" }, |
125 | Qt::Key_F7, QT_TRANSLATE_NOOP("Button", "Record Button"), | 124 | { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx, |
126 | "devicebuttons/ipaq_record", | 125 | Qt::Key_F10, QT_TRANSLATE_NOOP("Button", "Contacts Button"), |
127 | "QPE/VMemo", "toggleRecord()", | 126 | "devicebuttons/ipaq_contact", |
128 | "sound", "raise()" }, | 127 | "addressbook", "raise()", |
129 | 128 | "addressbook", "beamBusinessCard()" }, | |
130 | //h2200 has different button mapping | 129 | { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx, |
131 | { Model_iPAQ_H22xx, | 130 | Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"), |
132 | Qt::Key_NumLock, QT_TRANSLATE_NOOP("Button", "Mail Button"), | ||
133 | "devicebuttons/ipaq_mail", | ||
134 | "opiemail", "raise()", | ||
135 | "opiemail", "newMail()" }, | ||
136 | { Model_iPAQ_H22xx, | ||
137 | Qt::Key_ScrollLock, QT_TRANSLATE_NOOP("Button", "Menu Button"), | ||
138 | "devicebuttons/ipaq_menu", | 131 | "devicebuttons/ipaq_menu", |
@@ -140,5 +133,4 @@ struct i_button ipaq_buttons [] = { | |||
140 | "QPE/TaskBar", "toggleStartMenu()" }, | 133 | "QPE/TaskBar", "toggleStartMenu()" }, |
141 | // and hx4700 has different button mapping still | 134 | { Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx, |
142 | { Model_iPAQ_HX4700, | 135 | Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Mail Button"), |
143 | Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Mail Button"), | ||
144 | "devicebuttons/ipaq_mail", | 136 | "devicebuttons/ipaq_mail", |
@@ -146,9 +138,4 @@ struct i_button ipaq_buttons [] = { | |||
146 | "opiemail", "newMail()" }, | 138 | "opiemail", "newMail()" }, |
147 | { Model_iPAQ_HX4700, | 139 | { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx, |
148 | Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Record Button"), | 140 | Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), |
149 | "devicebuttons/ipaq_record", | ||
150 | "QPE/VMemo", "toggleRecord()", | ||
151 | "sound", "raise()" }, | ||
152 | { Model_iPAQ_HX4700, | ||
153 | Qt::Key_Home, QT_TRANSLATE_NOOP("Button", "Home Button"), | ||
154 | "devicebuttons/ipaq_home", | 141 | "devicebuttons/ipaq_home", |
@@ -156,2 +143,7 @@ struct i_button ipaq_buttons [] = { | |||
156 | "buttonsettings", "raise()" }, | 143 | "buttonsettings", "raise()" }, |
144 | { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx, | ||
145 | Qt::Key_F24, QT_TRANSLATE_NOOP("Button", "Record Button"), | ||
146 | "devicebuttons/ipaq_record", | ||
147 | "QPE/VMemo", "toggleRecord()", | ||
148 | "sound", "raise()" }, | ||
157 | 149 | ||
@@ -348,7 +340,4 @@ bool iPAQ::filter ( int /*unicode*/, int keycode, int modifiers, bool isPress, b | |||
348 | 340 | ||
349 | // map Power Button short/long press to F6 for h191x | ||
350 | case Key_F6: | ||
351 | if ( d->m_model != Model_iPAQ_H191x && d->m_model != Model_iPAQ_H4xxx ) | ||
352 | break; | ||
353 | // map Power Button short/long press to F34/F35 | 341 | // map Power Button short/long press to F34/F35 |
342 | case HardKey_Suspend: // Hope we don't have infinite recursion here | ||
354 | case Key_SysReq: { | 343 | case Key_SysReq: { |
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 | |||
@@ -62,4 +62,7 @@ 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"), |
@@ -68,3 +71,3 @@ struct m_button mypal_buttons [] = { | |||
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"), |
@@ -73,4 +76,4 @@ struct m_button mypal_buttons [] = { | |||
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", |
@@ -78,3 +81,3 @@ struct m_button mypal_buttons [] = { | |||
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"), |
@@ -83,4 +86,4 @@ struct m_button mypal_buttons [] = { | |||
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", |