author | sandman <sandman> | 2002-12-23 03:12:28 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-12-23 03:12:28 (UTC) |
commit | 726d2ac455446ee194c8e83df16f48357b619988 (patch) (side-by-side diff) | |
tree | ada7a041dc001ba6220908594d91111efa729c32 | |
parent | 10c21667cb5e4266dc9a9b481ae11b199ffffc2e (diff) | |
download | opie-726d2ac455446ee194c8e83df16f48357b619988.zip opie-726d2ac455446ee194c8e83df16f48357b619988.tar.gz opie-726d2ac455446ee194c8e83df16f48357b619988.tar.bz2 |
Fixed a few typos and removed some qDebugs
-rw-r--r-- | libopie/odevice.cpp | 8 | ||||
-rw-r--r-- | libopie/odevice.h | 2 |
2 files changed, 3 insertions, 7 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp index f93d1ed..a3c30cb 100644 --- a/libopie/odevice.cpp +++ b/libopie/odevice.cpp @@ -132,49 +132,49 @@ struct i_button { Qt::Key code; char *utext; char *pix; char *fpressedservice; char *fpressedaction; char *fheldservice; char *fheldaction; } ipaq_buttons [] = { { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx, Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"), "devicebuttons/ipaq_calendar", "datebook", "nextView()", "today", "raise()" }, { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx, Qt::Key_F10, QT_TRANSLATE_NOOP("Button", "Contacts Button"), "devicebuttons/ipaq_contact", "addressbook", "raise()", "addressbook", "beamBusinessCard()" }, { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx, Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"), "devicebuttons/ipaq_menu", "QPE/TaskBar", "toggleMenu()", "QPE/TaskBar", "toggleStartMenu()" }, { Model_iPAQ_H38xx | Model_iPAQ_H39xx, - Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Mail Button"), + Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Mail Button"), "devicebuttons/ipaq_mail", "mail", "raise()", "mail", "newMail()" }, { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx, Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), "devicebuttons/ipaq_home", "QPE/Launcher", "home()", "buttonsettings", "raise()" }, { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx, Qt::Key_F24, QT_TRANSLATE_NOOP("Button", "Record Button"), "devicebuttons/ipaq_record", "QPE/VMemo", "toggleRecord()", "sound", "raise()" }, }; struct z_button { Qt::Key code; char *utext; char *pix; char *fpressedservice; char *fpressedaction; char *fheldservice; char *fheldaction; } z_buttons [] = { @@ -585,60 +585,56 @@ void iPAQ::init ( ) d-> m_model = Model_Unknown; f. close ( ); } f. setName ( "/etc/familiar-version" ); if ( f. open ( IO_ReadOnly )) { d-> m_systemstr = "Familiar"; d-> m_system = System_Familiar; QTextStream ts ( &f ); d-> m_sysverstr = ts. readLine ( ). mid ( 10 ); f. close ( ); } m_leds [0] = m_leds [1] = Led_Off; m_power_timer = 0; for ( uint i = 0; i < ( sizeof( ipaq_buttons ) / sizeof( i_button )); i++ ) { i_button *ib = ipaq_buttons + i; ODeviceButton b; - qDebug ( "%d: %d", i, ib-> model ); - if (( ib-> model & d-> m_model ) == d-> m_model ) { b. setKeycode ( ib-> code ); b. setUserText ( qApp-> translate ( "Button", ib-> utext )); b. setPixmap ( Resource::loadPixmap ( ib-> pix )); b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( ib-> fpressedservice ), ib-> fpressedaction )); b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib-> fheldservice ), ib-> fheldaction )); d-> m_buttons. append ( b ); - - qDebug ( "code: %d", ib-> code ); } } reloadButtonMapping ( ); if ( d-> m_qwsserver ) QWSServer::setKeyboardFilter ( this ); } //#include <linux/h3600_ts.h> // including kernel headers is evil ... typedef struct { unsigned char OffOnBlink; /* 0=off 1=on 2=Blink */ unsigned char TotalTime; /* Units of 5 seconds */ unsigned char OnTime; /* units of 100m/s */ unsigned char OffTime; /* units of 100m/s */ } LED_IN; typedef struct { unsigned char mode; unsigned char pwr; unsigned char brightness; } FLITE_IN; #define LED_ON OD_IOW( 'f', 5, LED_IN ) @@ -733,49 +729,49 @@ bool iPAQ::filter ( int /*unicode*/, int keycode, int modifiers, bool isPress, b ( d-> m_model == Model_iPAQ_H38xx )) { newkeycode = Key_Left + ( keycode - Key_Left + 2 ) % 4; } break; } // map Power Button short/long press to F34/F35 case Key_SysReq: { if ( isPress ) { if ( m_power_timer ) killTimer ( m_power_timer ); m_power_timer = startTimer ( 500 ); } else if ( m_power_timer ) { killTimer ( m_power_timer ); m_power_timer = 0; QWSServer::sendKeyEvent ( -1, HardKey_Suspend, 0, true, false ); QWSServer::sendKeyEvent ( -1, HardKey_Suspend, 0, false, false ); } newkeycode = Key_unknown; break; } } - if ( newkeycode != keycode ) { +k if ( newkeycode != keycode ) { if ( newkeycode != Key_unknown ) QWSServer::sendKeyEvent ( -1, newkeycode, modifiers, isPress, autoRepeat ); return true; } else return false; } void iPAQ::timerEvent ( QTimerEvent * ) { killTimer ( m_power_timer ); m_power_timer = 0; QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, true, false ); QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, false, false ); } void iPAQ::alarmSound ( ) { #ifndef QT_NO_SOUND static Sound snd ( "alarm" ); int fd; int vol; bool vol_reset = false; diff --git a/libopie/odevice.h b/libopie/odevice.h index ce62f1a..54b85a2 100644 --- a/libopie/odevice.h +++ b/libopie/odevice.h @@ -62,49 +62,49 @@ enum OSystem { System_Familiar, System_Zaurus, System_OpenZaurus }; enum OLedState { Led_Off, Led_On, Led_BlinkSlow, Led_BlinkFast }; enum OLed { Led_Mail, Led_Power, Led_BlueTooth }; enum OHardKey { HardKey_Datebook = Qt::Key_F9, HardKey_Contacts = Qt::Key_F10, HardKey_Menu = Qt::Key_F11, HardKey_Home = Qt::Key_F12, - HardKey_Mail = Qt::Key_F14, + HardKey_Mail = Qt::Key_F13, HardKey_Record = Qt::Key_F24, HardKey_Suspend = Qt::Key_F34, HardKey_Backlight = Qt::Key_F35, }; class ODevice : public QObject { Q_OBJECT private: ODevice ( const ODevice & ); protected: ODevice ( ); virtual void init ( ); ODeviceData *d; public: virtual ~ODevice ( ); static ODevice *inst ( ); |