-rw-r--r-- | libopie/odevice.cpp | 28 |
1 files changed, 3 insertions, 25 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp index 4258d60..013f804 100644 --- a/libopie/odevice.cpp +++ b/libopie/odevice.cpp @@ -348,70 +348,48 @@ struct s_button { { Model_SIMpad_CL4 | Model_SIMpad_SL4 | Model_SIMpad_SLC | Model_SIMpad_TSinus, Qt::Key_F7, QT_TRANSLATE_NOOP("Button", "Upper+Right"), "devicebuttons/simpad_upper_right", "QPE/TaskBar", "toggleMenu()", "QPE/TaskBar", "toggleStartMenu()" }, { Model_SIMpad_CL4 | Model_SIMpad_SL4 | Model_SIMpad_SLC | Model_SIMpad_TSinus, Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Upper+Left"), "devicebuttons/simpad_upper_left", "QPE/Rotation", "flip()", "QPE/Rotation", "flip()" }, /* { Model_SIMpad_CL4 | Model_SIMpad_SL4 | Model_SIMpad_SLC | Model_SIMpad_TSinus, Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Lower+Upper"), "devicebuttons/simpad_lower_upper", "QPE/Launcher", "home()", "buttonsettings", "raise()" }, { Model_SIMpad_CL4 | Model_SIMpad_SL4 | Model_SIMpad_SLC | Model_SIMpad_TSinus, Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Lower+Upper"), "devicebuttons/simpad_upper_lower", "QPE/Launcher", "home()", "buttonsettings", "raise()" }, */ }; -struct r_button { - uint model; - Qt::Key code; - char *utext; - char *pix; - char *fpressedservice; - char *fpressedaction; - char *fheldservice; - char *fheldaction; -} ramses_buttons [] = { - { Model_Ramses_MNCI, - Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"), - "devicebuttons/z_menu", - "QPE/TaskBar", "toggleMenu()", - "QPE/TaskBar", "toggleStartMenu()" }, - { Model_Ramses_MNCI, - Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), - "devicebuttons/ipaq_home", - "QPE/Launcher", "home()", - "buttonsettings", "raise()" }, -}; - class Yopy : public ODevice { protected: virtual void init ( ); virtual void initButtons ( ); public: virtual bool suspend ( ); virtual bool setDisplayBrightness ( int b ); virtual int displayBrightnessResolution ( ) const; static bool isYopy ( ); }; struct yopy_button { Qt::Key code; char *utext; char *pix; char *fpressedservice; char *fpressedaction; char *fheldservice; char *fheldaction; } yopy_buttons [] = { { Qt::Key_F10, QT_TRANSLATE_NOOP("Button", "Action Button"), @@ -431,54 +409,54 @@ struct yopy_button { static QCString makeChannel ( const char *str ) { if ( str && !::strchr ( str, '/' )) return QCString ( "QPE/Application/" ) + str; else return str; } static inline bool isQWS() { return qApp ? ( qApp-> type ( ) == QApplication::GuiServer ) : false; } ODevice *ODevice::inst ( ) { static ODevice *dev = 0; if ( !dev ) { if ( QFile::exists ( "/proc/hal/model" )) dev = new iPAQ ( ); else if ( Zaurus::isZaurus() ) dev = new Zaurus ( ); else if ( QFile::exists ( "/proc/ucb1x00" ) && QFile::exists ( "/proc/cs3" )) dev = new SIMpad ( ); - else if ( QFile::exists ( "/proc/sys/board/name" )) - dev = new Ramses ( ); else if ( Yopy::isYopy() ) dev = new Yopy ( ); else if ( Jornada::isJornada() ) dev = new Jornada ( ); + else if ( QFile::exists ( "/proc/sys/board/sys_name" )) + dev = new Ramses ( ); else dev = new ODevice ( ); dev-> init ( ); } return dev; } /************************************************** * * common * **************************************************/ ODevice::ODevice ( ) { d = new ODeviceData; d-> m_modelstr = "Unknown"; d-> m_model = Model_Unknown; d-> m_vendorstr = "Unknown"; d-> m_vendor = Vendor_Unknown; d-> m_systemstr = "Unknown"; @@ -2507,49 +2485,49 @@ bool SIMpad::setDisplayBrightness ( int bright ) } int SIMpad::displayBrightnessResolution ( ) const { return 255; // All SIMpad models share the same display } /************************************************** * * Ramses * **************************************************/ void Ramses::init() { d->m_vendorstr = "M und N"; d->m_vendor = Vendor_MundN; QFile f("/proc/sys/board/ramses"); d->m_modelstr = "Ramses"; d->m_model = Model_Ramses_MNCI; - d->m_rotation = Rot0; + d->m_rotation = Rot90; d->m_holdtime = 1000; f.setName("/etc/oz_version"); if (f.open(IO_ReadOnly)) { d->m_systemstr = "OpenEmbedded/Ramses"; d->m_system = System_OpenZaurus; QTextStream ts(&f); ts.setDevice(&f); d->m_sysverstr = ts.readLine(); f.close(); } m_power_timer = 0; #ifdef QT_QWS_ALLOW_OVERCLOCK #warning *** Overclocking enabled - this may fry your hardware - you have been warned *** #define OC(x...) x #else #define OC(x...) #endif |