author | paule <paule> | 2007-06-29 05:58:46 (UTC) |
---|---|---|
committer | paule <paule> | 2007-06-29 05:58:46 (UTC) |
commit | 06bcedc305af0c1fe026abde4f4cc64b12b8ed63 (patch) (unidiff) | |
tree | 455f3bbc826a3a04f970bc7d7860d9a79c5f6cef /libopie2 | |
parent | 703d2871544d48268e1003a5534454f79f162b16 (diff) | |
download | opie-06bcedc305af0c1fe026abde4f4cc64b12b8ed63.zip opie-06bcedc305af0c1fe026abde4f4cc64b12b8ed63.tar.gz opie-06bcedc305af0c1fe026abde4f4cc64b12b8ed63.tar.bz2 |
Palm patches:
* Reorder keys (bug #1860)
* Add key F6 as rotate screen button for Palm LifeDrive (bug #1861)
* Fix backlight on Palm Treo 650 (bug #1862)
* Rotate function of directional keys when screen rotated (bug #1863)
Patches courtesy of Marek Vasut <marek.vasut@gmail.com>
-rw-r--r-- | libopie2/opiecore/device/odevice_palm.cpp | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/libopie2/opiecore/device/odevice_palm.cpp b/libopie2/opiecore/device/odevice_palm.cpp index 892083e..6d94687 100644 --- a/libopie2/opiecore/device/odevice_palm.cpp +++ b/libopie2/opiecore/device/odevice_palm.cpp | |||
@@ -61,6 +61,27 @@ using namespace Opie::Core; | |||
61 | using namespace Opie::Core::Internal; | 61 | using namespace Opie::Core::Internal; |
62 | 62 | ||
63 | struct palm_button palm_buttons [] = { | 63 | struct palm_button palm_buttons [] = { |
64 | { Model_Palm_LD, | ||
65 | Qt::Key_F6, QT_TRANSLATE_NOOP( "Button", "Rotate Button" ), | ||
66 | "devicebuttons/palm_rotate", | ||
67 | "QPE/Rotation", "flip()", | ||
68 | 0, 0 }, | ||
69 | { Model_Palm_LD | Model_Palm_Z72 | Model_Palm_T600 | Model_Palm_T650 | | ||
70 | Model_Palm_T680 | Model_Palm_T700W | Model_Palm_T700P | | ||
71 | Model_Palm_T750 | Model_Palm_T755P, | ||
72 | Qt::Key_F7, QT_TRANSLATE_NOOP( "Button", "Record Button" ), | ||
73 | "devicebuttons/palm_record", | ||
74 | "QPE/VMemo", "toggleRecord()", | ||
75 | "sound", "raise()" }, | ||
76 | { Model_Palm_TT | Model_Palm_TT2 | Model_Palm_TT3 | Model_Palm_TT5 | | ||
77 | Model_Palm_TE | Model_Palm_TE2 | Model_Palm_TC | Model_Palm_LD | | ||
78 | Model_Palm_TX | Model_Palm_Z71 | Model_Palm_Z72 | Model_Palm_T600 | | ||
79 | Model_Palm_T650 | Model_Palm_T680 | Model_Palm_T700W | | ||
80 | Model_Palm_T700P | Model_Palm_T750 | Model_Palm_T755P, | ||
81 | Qt::Key_F8, QT_TRANSLATE_NOOP( "Button", "Suspend Button" ), | ||
82 | "devicebuttons/palm_suspend", | ||
83 | "suspend", "raise()", | ||
84 | "suspend", "raise()" }, | ||
64 | { Model_Palm_TT | Model_Palm_TT2 | Model_Palm_TT3 | Model_Palm_TT5 | | 85 | { Model_Palm_TT | Model_Palm_TT2 | Model_Palm_TT3 | Model_Palm_TT5 | |
65 | Model_Palm_TE | Model_Palm_TE2 | Model_Palm_TC | Model_Palm_LD | | 86 | Model_Palm_TE | Model_Palm_TE2 | Model_Palm_TC | Model_Palm_LD | |
66 | Model_Palm_TX | Model_Palm_Z71 | Model_Palm_Z72 | Model_Palm_T600 | | 87 | Model_Palm_TX | Model_Palm_Z71 | Model_Palm_Z72 | Model_Palm_T600 | |
@@ -97,22 +118,6 @@ struct palm_button palm_buttons [] = { | |||
97 | "devicebuttons/palm_mail", | 118 | "devicebuttons/palm_mail", |
98 | "opiemail", "raise()", | 119 | "opiemail", "raise()", |
99 | "opiemail", "newmail()" }, | 120 | "opiemail", "newmail()" }, |
100 | { Model_Palm_LD | Model_Palm_Z72 | Model_Palm_T600 | Model_Palm_T650 | | ||
101 | Model_Palm_T680 | Model_Palm_T700W | Model_Palm_T700P | | ||
102 | Model_Palm_T750 | Model_Palm_T755P, | ||
103 | Qt::Key_F7, QT_TRANSLATE_NOOP( "Button", "Record Button" ), | ||
104 | "devicebuttons/palm_record", | ||
105 | "QPE/VMemo", "toggleRecord()", | ||
106 | "sound", "raise()" }, | ||
107 | { Model_Palm_TT | Model_Palm_TT2 | Model_Palm_TT3 | Model_Palm_TT5 | | ||
108 | Model_Palm_TE | Model_Palm_TE2 | Model_Palm_TC | Model_Palm_LD | | ||
109 | Model_Palm_TX | Model_Palm_Z71 | Model_Palm_Z72 | Model_Palm_T600 | | ||
110 | Model_Palm_T650 | Model_Palm_T680 | Model_Palm_T700W | | ||
111 | Model_Palm_T700P | Model_Palm_T750 | Model_Palm_T755P, | ||
112 | Qt::Key_F8, QT_TRANSLATE_NOOP( "Button", "Suspend Button" ), | ||
113 | "devicebuttons/palm_suspend", | ||
114 | "suspend", "raise()", | ||
115 | "suspend", "raise()" }, | ||
116 | }; | 121 | }; |
117 | 122 | ||
118 | void Palm::init(const QString& cpu_info) | 123 | void Palm::init(const QString& cpu_info) |
@@ -216,6 +221,7 @@ void Palm::init(const QString& cpu_info) | |||
216 | case Model_Palm_TX: | 221 | case Model_Palm_TX: |
217 | case Model_Palm_TE2: | 222 | case Model_Palm_TE2: |
218 | case Model_Palm_Z72: | 223 | case Model_Palm_Z72: |
224 | case Model_Palm_T650: | ||
219 | m_backlightdev = "/sys/class/backlight/pxapwm-bl/"; | 225 | m_backlightdev = "/sys/class/backlight/pxapwm-bl/"; |
220 | d->m_rotation = Rot0; | 226 | d->m_rotation = Rot0; |
221 | d->m_direction = CCW; | 227 | d->m_direction = CCW; |
@@ -228,7 +234,6 @@ void Palm::init(const QString& cpu_info) | |||
228 | case Model_Palm_Z71: | 234 | case Model_Palm_Z71: |
229 | m_backlightdev = "/sys/class/backlight/omap-bl/"; | 235 | m_backlightdev = "/sys/class/backlight/omap-bl/"; |
230 | break; | 236 | break; |
231 | case Model_Palm_T650: | ||
232 | case Model_Palm_T680: | 237 | case Model_Palm_T680: |
233 | case Model_Palm_T700W: | 238 | case Model_Palm_T700W: |
234 | case Model_Palm_T700P: | 239 | case Model_Palm_T700P: |
@@ -286,7 +291,7 @@ bool Palm::filter ( int /*unicode*/, int keycode, int modifiers, bool isPress, b | |||
286 | case Key_Right: | 291 | case Key_Right: |
287 | case Key_Up : | 292 | case Key_Up : |
288 | case Key_Down : | 293 | case Key_Down : |
289 | newkeycode = Key_Left + ( keycode - Key_Left + (int) qt_screen->transformOrientation() ) % 4; | 294 | newkeycode = Key_Left + ( keycode - Key_Left + 4 ) % 4; |
290 | default: | 295 | default: |
291 | break; | 296 | break; |
292 | } | 297 | } |