author | paule <paule> | 2007-06-13 08:44:48 (UTC) |
---|---|---|
committer | paule <paule> | 2007-06-13 08:44:48 (UTC) |
commit | 4b3ffb4d533f034513d5bd9cae497aa117b2afaf (patch) (unidiff) | |
tree | 42d2d51f93eac1b0d53f626327f472a9a71de7b5 | |
parent | 85dfcf4f5e7fb28990606b83a02043af19a8c15d (diff) | |
download | opie-4b3ffb4d533f034513d5bd9cae497aa117b2afaf.zip opie-4b3ffb4d533f034513d5bd9cae497aa117b2afaf.tar.gz opie-4b3ffb4d533f034513d5bd9cae497aa117b2afaf.tar.bz2 |
Set vendor for HTC ODevice - patch by Marex (see bug #1855)
-rw-r--r-- | libopie2/opiecore/device/odevice_htc.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libopie2/opiecore/device/odevice_htc.cpp b/libopie2/opiecore/device/odevice_htc.cpp index 7f82369..4bc8c49 100644 --- a/libopie2/opiecore/device/odevice_htc.cpp +++ b/libopie2/opiecore/device/odevice_htc.cpp | |||
@@ -73,128 +73,129 @@ struct htc_button htc_buttons [] = { | |||
73 | "devicebuttons/z_home", | 73 | "devicebuttons/z_home", |
74 | "QPE/Launcher", "home()", | 74 | "QPE/Launcher", "home()", |
75 | "buttonsettings", "raise()" }, | 75 | "buttonsettings", "raise()" }, |
76 | { Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"), | 76 | { Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"), |
77 | "devicebuttons/z_menu", | 77 | "devicebuttons/z_menu", |
78 | "QPE/TaskBar", "toggleMenu()", | 78 | "QPE/TaskBar", "toggleMenu()", |
79 | "QPE/TaskBar", "toggleStartMenu()" }, | 79 | "QPE/TaskBar", "toggleStartMenu()" }, |
80 | { Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Mail Button"), | 80 | { Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Mail Button"), |
81 | "devicebuttons/z_mail", | 81 | "devicebuttons/z_mail", |
82 | "opiemail", "raise()", | 82 | "opiemail", "raise()", |
83 | "opiemail", "newMail()" }, | 83 | "opiemail", "newMail()" }, |
84 | }; | 84 | }; |
85 | 85 | ||
86 | struct htc_button htc_buttons_universal [] = { | 86 | struct htc_button htc_buttons_universal [] = { |
87 | { Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"), | 87 | { Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"), |
88 | "devicebuttons/z_calendar", | 88 | "devicebuttons/z_calendar", |
89 | "datebook", "nextView()", | 89 | "datebook", "nextView()", |
90 | "today", "raise()" }, | 90 | "today", "raise()" }, |
91 | { Qt::Key_F10, QT_TRANSLATE_NOOP("Button", "Contacts Button"), | 91 | { Qt::Key_F10, QT_TRANSLATE_NOOP("Button", "Contacts Button"), |
92 | "devicebuttons/z_contact", | 92 | "devicebuttons/z_contact", |
93 | "addressbook", "raise()", | 93 | "addressbook", "raise()", |
94 | "addressbook", "beamBusinessCard()" }, | 94 | "addressbook", "beamBusinessCard()" }, |
95 | { Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), | 95 | { Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), |
96 | "devicebuttons/z_home", | 96 | "devicebuttons/z_home", |
97 | "QPE/Launcher", "home()", | 97 | "QPE/Launcher", "home()", |
98 | "buttonsettings", "raise()" }, | 98 | "buttonsettings", "raise()" }, |
99 | { Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"), | 99 | { Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"), |
100 | "devicebuttons/z_menu", | 100 | "devicebuttons/z_menu", |
101 | "QPE/TaskBar", "toggleMenu()", | 101 | "QPE/TaskBar", "toggleMenu()", |
102 | "QPE/TaskBar", "toggleStartMenu()" }, | 102 | "QPE/TaskBar", "toggleStartMenu()" }, |
103 | { Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Mail Button"), | 103 | { Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Mail Button"), |
104 | "devicebuttons/z_mail", | 104 | "devicebuttons/z_mail", |
105 | "opiemail", "raise()", | 105 | "opiemail", "raise()", |
106 | "opiemail", "newMail()" }, | 106 | "opiemail", "newMail()" }, |
107 | 107 | ||
108 | { Qt::Key_F15, QT_TRANSLATE_NOOP("Button", "Hinge1"), | 108 | { Qt::Key_F15, QT_TRANSLATE_NOOP("Button", "Hinge1"), |
109 | "devicebuttons/z_hinge1", | 109 | "devicebuttons/z_hinge1", |
110 | "QPE/Rotation", "rotateDefault()",0,0}, | 110 | "QPE/Rotation", "rotateDefault()",0,0}, |
111 | { Qt::Key_F16, QT_TRANSLATE_NOOP("Button", "Hinge2"), | 111 | { Qt::Key_F16, QT_TRANSLATE_NOOP("Button", "Hinge2"), |
112 | "devicebuttons/z_hinge2", | 112 | "devicebuttons/z_hinge2", |
113 | "QPE/Rotation", "rotateDefault()",0,0}, | 113 | "QPE/Rotation", "rotateDefault()",0,0}, |
114 | { Qt::Key_F17, QT_TRANSLATE_NOOP("Button", "Hinge3"), | 114 | { Qt::Key_F17, QT_TRANSLATE_NOOP("Button", "Hinge3"), |
115 | "devicebuttons/z_hinge3", | 115 | "devicebuttons/z_hinge3", |
116 | "QPE/Rotation", "rotateDefault()",0,0}, | 116 | "QPE/Rotation", "rotateDefault()",0,0}, |
117 | }; | 117 | }; |
118 | 118 | ||
119 | 119 | ||
120 | // | 120 | // |
121 | // HTC-Universal (PXA-model w/ 480x640 3.6" lcd) | 121 | // HTC-Universal (PXA-model w/ 480x640 3.6" lcd) |
122 | // HTC-Alpine (PXA-model w/ 240x320 3.5" lcd) | 122 | // HTC-Alpine (PXA-model w/ 240x320 3.5" lcd) |
123 | // HTC-Apache (PXA-model w/ 240x320 2.8" lcd) | 123 | // HTC-Apache (PXA-model w/ 240x320 2.8" lcd) |
124 | // HTC-Beetles (PXA-model w/ 240x240 3.0" lcd) | 124 | // HTC-Beetles (PXA-model w/ 240x240 3.0" lcd) |
125 | // HTC-Blueangel (PXA-model w/ 240x320 3.5" lcd) | 125 | // HTC-Blueangel (PXA-model w/ 240x320 3.5" lcd) |
126 | // HTC-Himalaya (PXA-model w/ 240x320 3.5" lcd) | 126 | // HTC-Himalaya (PXA-model w/ 240x320 3.5" lcd) |
127 | // HTC-Magician (PXA-model w/ 240x320 2.8" lcd) | 127 | // HTC-Magician (PXA-model w/ 240x320 2.8" lcd) |
128 | 128 | ||
129 | void HTC::init(const QString& cpu_info) | 129 | void HTC::init(const QString& cpu_info) |
130 | { | 130 | { |
131 | qDebug( "HTC::init()" ); | 131 | qDebug( "HTC::init()" ); |
132 | // Set the time to wait until the system is really suspended | 132 | // Set the time to wait until the system is really suspended |
133 | // the delta between apm --suspend and sleeping | 133 | // the delta between apm --suspend and sleeping |
134 | setAPMTimeOut( 15000 ); | 134 | setAPMTimeOut( 15000 ); |
135 | 135 | ||
136 | d->m_vendorstr = "Xanadux Team"; | 136 | d->m_vendorstr = "Xanadux Team"; |
137 | d->m_vendor = Vendor_HTC; | ||
137 | d->m_systemstr = "Familiar"; | 138 | d->m_systemstr = "Familiar"; |
138 | d->m_system = System_Familiar; | 139 | d->m_system = System_Familiar; |
139 | 140 | ||
140 | // check the HTC model | 141 | // check the HTC model |
141 | QString model; | 142 | QString model; |
142 | int loc = cpu_info.find( ":" ); | 143 | int loc = cpu_info.find( ":" ); |
143 | if ( loc != -1 ) | 144 | if ( loc != -1 ) |
144 | model = cpu_info.mid( loc+2 ).simplifyWhiteSpace(); | 145 | model = cpu_info.mid( loc+2 ).simplifyWhiteSpace(); |
145 | else | 146 | else |
146 | model = cpu_info; | 147 | model = cpu_info; |
147 | 148 | ||
148 | d->m_model = Model_HTC_Universal; | 149 | d->m_model = Model_HTC_Universal; |
149 | d->m_modelstr = "Unknown HTC"; | 150 | d->m_modelstr = "Unknown HTC"; |
150 | 151 | ||
151 | if ( model == "HTC Universal" ) { | 152 | if ( model == "HTC Universal" ) { |
152 | d->m_model = Model_HTC_Universal; | 153 | d->m_model = Model_HTC_Universal; |
153 | d->m_modelstr = "HTC Universal"; | 154 | d->m_modelstr = "HTC Universal"; |
154 | } | 155 | } |
155 | if ( model == "HTC Alpine" ) { | 156 | if ( model == "HTC Alpine" ) { |
156 | d->m_model = Model_HTC_Alpine; | 157 | d->m_model = Model_HTC_Alpine; |
157 | d->m_modelstr = "HTC Alpine"; | 158 | d->m_modelstr = "HTC Alpine"; |
158 | } | 159 | } |
159 | if ( model == "HTC Apache" ) { | 160 | if ( model == "HTC Apache" ) { |
160 | d->m_model = Model_HTC_Apache; | 161 | d->m_model = Model_HTC_Apache; |
161 | d->m_modelstr = "HTC Apache"; | 162 | d->m_modelstr = "HTC Apache"; |
162 | } | 163 | } |
163 | if ( model == "HTC Beetles" ) { | 164 | if ( model == "HTC Beetles" ) { |
164 | d->m_model = Model_HTC_Beetles; | 165 | d->m_model = Model_HTC_Beetles; |
165 | d->m_modelstr = "HTC Beetles"; | 166 | d->m_modelstr = "HTC Beetles"; |
166 | } | 167 | } |
167 | if ( model == "HTC Blueangel" ) { | 168 | if ( model == "HTC Blueangel" ) { |
168 | d->m_model = Model_HTC_Blueangel; | 169 | d->m_model = Model_HTC_Blueangel; |
169 | d->m_modelstr = "HTC Blueangel"; | 170 | d->m_modelstr = "HTC Blueangel"; |
170 | } | 171 | } |
171 | if ( model == "HTC Himalaya" ) { | 172 | if ( model == "HTC Himalaya" ) { |
172 | d->m_model = Model_HTC_Himalaya; | 173 | d->m_model = Model_HTC_Himalaya; |
173 | d->m_modelstr = "HTC Himalaya"; | 174 | d->m_modelstr = "HTC Himalaya"; |
174 | } | 175 | } |
175 | if ( model == "HTC Magician" ) { | 176 | if ( model == "HTC Magician" ) { |
176 | d->m_model = Model_HTC_Magician; | 177 | d->m_model = Model_HTC_Magician; |
177 | d->m_modelstr = "HTC Magician"; | 178 | d->m_modelstr = "HTC Magician"; |
178 | } | 179 | } |
179 | 180 | ||
180 | 181 | ||
181 | // set path to backlight device | 182 | // set path to backlight device |
182 | switch ( d->m_model ) | 183 | switch ( d->m_model ) |
183 | { | 184 | { |
184 | case Model_HTC_Universal: | 185 | case Model_HTC_Universal: |
185 | case Model_HTC_Magician: | 186 | case Model_HTC_Magician: |
186 | case Model_HTC_Alpine: | 187 | case Model_HTC_Alpine: |
187 | case Model_HTC_Beetles: | 188 | case Model_HTC_Beetles: |
188 | case Model_HTC_Apache: | 189 | case Model_HTC_Apache: |
189 | m_backlightdev = "/sys/class/backlight/corgi-bl/"; | 190 | m_backlightdev = "/sys/class/backlight/corgi-bl/"; |
190 | break; | 191 | break; |
191 | case Model_HTC_Blueangel: | 192 | case Model_HTC_Blueangel: |
192 | case Model_HTC_Himalaya: | 193 | case Model_HTC_Himalaya: |
193 | m_backlightdev = "/sys/class/backlight/w100fb/"; | 194 | m_backlightdev = "/sys/class/backlight/w100fb/"; |
194 | break; | 195 | break; |
195 | default: | 196 | default: |
196 | m_backlightdev = "/sys/class/backlight/corgi-bl/"; | 197 | m_backlightdev = "/sys/class/backlight/corgi-bl/"; |
197 | } | 198 | } |
198 | 199 | ||
199 | // set initial rotation | 200 | // set initial rotation |
200 | switch( d->m_model ) | 201 | switch( d->m_model ) |