author | mickeyl <mickeyl> | 2004-06-12 16:54:50 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-06-12 16:54:50 (UTC) |
commit | b1235df3628d178891eeefed630a22da46b25952 (patch) (unidiff) | |
tree | c88a3cb04adcc9fe214ff08e3c0b96b21e3c4f0a /libopie2/opiecore/device/odevice_yopy.cpp | |
parent | 7a62e8e3601ee98f5f06261c361fe8132334cd56 (diff) | |
download | opie-b1235df3628d178891eeefed630a22da46b25952.zip opie-b1235df3628d178891eeefed630a22da46b25952.tar.gz opie-b1235df3628d178891eeefed630a22da46b25952.tar.bz2 |
- refactor the distribution detection code
- add detection of OpenEmbedded and generic linux distributions
- simplify the zaurus model detection code
Diffstat (limited to 'libopie2/opiecore/device/odevice_yopy.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiecore/device/odevice_yopy.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/libopie2/opiecore/device/odevice_yopy.cpp b/libopie2/opiecore/device/odevice_yopy.cpp index 493ed25..223aa76 100644 --- a/libopie2/opiecore/device/odevice_yopy.cpp +++ b/libopie2/opiecore/device/odevice_yopy.cpp | |||
@@ -57,60 +57,51 @@ using namespace Opie::Core; | |||
57 | using namespace Opie::Core::Internal; | 57 | using namespace Opie::Core::Internal; |
58 | 58 | ||
59 | struct yopy_button yopy_buttons [] = { | 59 | struct yopy_button yopy_buttons [] = { |
60 | { Qt::Key_F10, QT_TRANSLATE_NOOP( "Button", "Action Button" ), | 60 | { Qt::Key_F10, QT_TRANSLATE_NOOP( "Button", "Action Button" ), |
61 | "devicebuttons/yopy_action", | 61 | "devicebuttons/yopy_action", |
62 | "datebook", "nextView()", | 62 | "datebook", "nextView()", |
63 | "today", "raise()" }, | 63 | "today", "raise()" }, |
64 | { Qt::Key_F11, QT_TRANSLATE_NOOP( "Button", "OK Button" ), | 64 | { Qt::Key_F11, QT_TRANSLATE_NOOP( "Button", "OK Button" ), |
65 | "devicebuttons/yopy_ok", | 65 | "devicebuttons/yopy_ok", |
66 | "addressbook", "raise()", | 66 | "addressbook", "raise()", |
67 | "addressbook", "beamBusinessCard()" }, | 67 | "addressbook", "beamBusinessCard()" }, |
68 | { Qt::Key_F12, QT_TRANSLATE_NOOP( "Button", "End Button" ), | 68 | { Qt::Key_F12, QT_TRANSLATE_NOOP( "Button", "End Button" ), |
69 | "devicebuttons/yopy_end", | 69 | "devicebuttons/yopy_end", |
70 | "QPE/Launcher", "home()", | 70 | "QPE/Launcher", "home()", |
71 | "buttonsettings", "raise()" }, | 71 | "buttonsettings", "raise()" }, |
72 | }; | 72 | }; |
73 | 73 | ||
74 | void Yopy::init(const QString&) | 74 | void Yopy::init(const QString&) |
75 | { | 75 | { |
76 | d->m_vendorstr = "G.Mate"; | 76 | d->m_vendorstr = "G.Mate"; |
77 | d->m_vendor = Vendor_GMate; | 77 | d->m_vendor = Vendor_GMate; |
78 | d->m_modelstr = "Yopy3700"; | 78 | d->m_modelstr = "Yopy3700"; |
79 | d->m_model = Model_Yopy_3700; | 79 | d->m_model = Model_Yopy_3700; |
80 | d->m_rotation = Rot0; | 80 | d->m_rotation = Rot0; |
81 | |||
82 | d->m_systemstr = "Linupy"; | 81 | d->m_systemstr = "Linupy"; |
83 | d->m_system = System_Linupy; | 82 | d->m_system = System_Linupy; |
84 | 83 | // Distribution detection code now in the base class | |
85 | QFile f ( "/etc/issue" ); | ||
86 | if ( f. open ( IO_ReadOnly ) ) | ||
87 | { | ||
88 | QTextStream ts ( &f ); | ||
89 | ts.readLine(); | ||
90 | d->m_sysverstr = ts. readLine(); | ||
91 | f. close(); | ||
92 | } | ||
93 | } | 84 | } |
94 | 85 | ||
95 | 86 | ||
96 | void Yopy::initButtons() | 87 | void Yopy::initButtons() |
97 | { | 88 | { |
98 | if ( d->m_buttons ) | 89 | if ( d->m_buttons ) |
99 | return ; | 90 | return ; |
100 | 91 | ||
101 | d->m_buttons = new QValueList <ODeviceButton>; | 92 | d->m_buttons = new QValueList <ODeviceButton>; |
102 | 93 | ||
103 | for ( uint i = 0; i < ( sizeof( yopy_buttons ) / sizeof( yopy_button ) ); i++ ) | 94 | for ( uint i = 0; i < ( sizeof( yopy_buttons ) / sizeof( yopy_button ) ); i++ ) |
104 | { | 95 | { |
105 | 96 | ||
106 | yopy_button *ib = yopy_buttons + i; | 97 | yopy_button *ib = yopy_buttons + i; |
107 | 98 | ||
108 | ODeviceButton b; | 99 | ODeviceButton b; |
109 | 100 | ||
110 | b. setKeycode ( ib->code ); | 101 | b. setKeycode ( ib->code ); |
111 | b. setUserText ( QObject::tr ( "Button", ib->utext ) ); | 102 | b. setUserText ( QObject::tr ( "Button", ib->utext ) ); |
112 | b. setPixmap ( Resource::loadPixmap ( ib->pix ) ); | 103 | b. setPixmap ( Resource::loadPixmap ( ib->pix ) ); |
113 | b. setFactoryPresetPressedAction | 104 | b. setFactoryPresetPressedAction |
114 | ( OQCopMessage( makeChannel( ib->fpressedservice ), ib->fpressedaction ) ); | 105 | ( OQCopMessage( makeChannel( ib->fpressedservice ), ib->fpressedaction ) ); |
115 | b. setFactoryPresetHeldAction | 106 | b. setFactoryPresetHeldAction |
116 | ( OQCopMessage( makeChannel( ib->fheldservice ), ib->fheldaction ) ); | 107 | ( OQCopMessage( makeChannel( ib->fheldservice ), ib->fheldaction ) ); |