summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/device/odevice_zaurus.cpp
Unidiff
Diffstat (limited to 'libopie2/opiecore/device/odevice_zaurus.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice_zaurus.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libopie2/opiecore/device/odevice_zaurus.cpp b/libopie2/opiecore/device/odevice_zaurus.cpp
index 1434e69..e8b813e 100644
--- a/libopie2/opiecore/device/odevice_zaurus.cpp
+++ b/libopie2/opiecore/device/odevice_zaurus.cpp
@@ -70,97 +70,97 @@ struct z_button z_buttons [] = {
70 "QPE/Launcher", "home()", 70 "QPE/Launcher", "home()",
71 "buttonsettings", "raise()" }, 71 "buttonsettings", "raise()" },
72 { Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"), 72 { Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"),
73 "devicebuttons/z_menu", 73 "devicebuttons/z_menu",
74 "QPE/TaskBar", "toggleMenu()", 74 "QPE/TaskBar", "toggleMenu()",
75 "QPE/TaskBar", "toggleStartMenu()" }, 75 "QPE/TaskBar", "toggleStartMenu()" },
76 { Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Mail Button"), 76 { Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Mail Button"),
77 "devicebuttons/z_mail", 77 "devicebuttons/z_mail",
78 "opiemail", "raise()", 78 "opiemail", "raise()",
79 "opiemail", "newMail()" }, 79 "opiemail", "newMail()" },
80}; 80};
81 81
82struct z_button z_buttons_c700 [] = { 82struct z_button z_buttons_c700 [] = {
83 { Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"), 83 { Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"),
84 "devicebuttons/z_calendar", 84 "devicebuttons/z_calendar",
85 "datebook", "nextView()", 85 "datebook", "nextView()",
86 "today", "raise()" }, 86 "today", "raise()" },
87 { Qt::Key_F10, QT_TRANSLATE_NOOP("Button", "Contacts Button"), 87 { Qt::Key_F10, QT_TRANSLATE_NOOP("Button", "Contacts Button"),
88 "devicebuttons/z_contact", 88 "devicebuttons/z_contact",
89 "addressbook", "raise()", 89 "addressbook", "raise()",
90 "addressbook", "beamBusinessCard()" }, 90 "addressbook", "beamBusinessCard()" },
91 { Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), 91 { Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"),
92 "devicebuttons/z_home", 92 "devicebuttons/z_home",
93 "QPE/Launcher", "home()", 93 "QPE/Launcher", "home()",
94 "buttonsettings", "raise()" }, 94 "buttonsettings", "raise()" },
95 { Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"), 95 { Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"),
96 "devicebuttons/z_menu", 96 "devicebuttons/z_menu",
97 "QPE/TaskBar", "toggleMenu()", 97 "QPE/TaskBar", "toggleMenu()",
98 "QPE/TaskBar", "toggleStartMenu()" }, 98 "QPE/TaskBar", "toggleStartMenu()" },
99 { Qt::Key_F14, QT_TRANSLATE_NOOP("Button", "Display Rotate"), 99 { Qt::Key_F14, QT_TRANSLATE_NOOP("Button", "Display Rotate"),
100 "devicebuttons/z_hinge", 100 "devicebuttons/z_hinge",
101 "QPE/Rotation", "rotateDefault()", 101 "QPE/Rotation", "rotateDefault()",
102 "QPE/Dummy", "doNothing()" }, 102 "QPE/Dummy", "doNothing()" },
103}; 103};
104 104
105// FIXME This gets unnecessary complicated. We should think about splitting the Zaurus 105// FIXME This gets unnecessary complicated. We should think about splitting the Zaurus
106// class up into individual classes. We need three classes 106// class up into individual classes. We need three classes
107// 107//
108// Zaurus-Collie (SA-model w/ 320x240 lcd, for SL5500 and SL5000) 108// Zaurus-Collie (SA-model w/ 320x240 lcd, for SL5500 and SL5000)
109// Zaurus-Poodle (PXA-model w/ 320x240 lcd, for SL5600) 109// Zaurus-Poodle (PXA-model w/ 320x240 lcd, for SL5600)
110// Zaurus-Corgi (PXA-model w/ 640x480 lcd, for C700, C750, C760, and C860) 110// Zaurus-Corgi (PXA-model w/ 640x480 lcd, for C700, C750, C760, and C860)
111// 111//
112// Only question right now is: Do we really need to do it? Because as soon 112// Only question right now is: Do we really need to do it? Because as soon
113// as the OpenZaurus kernel is ready, there will be a unified interface for all 113// as the OpenZaurus kernel is ready, there will be a unified interface for all
114// Zaurus models (concerning apm, backlight, buttons, etc.) 114// Zaurus models (concerning apm, backlight, buttons, etc.)
115// 115//
116// Comments? - mickeyl. 116// Comments? - mickeyl.
117 117
118void Zaurus::init() 118void Zaurus::init(const QString&)
119{ 119{
120 d->m_vendorstr = "Sharp"; 120 d->m_vendorstr = "Sharp";
121 d->m_vendor = Vendor_Sharp; 121 d->m_vendor = Vendor_Sharp;
122 m_embedix = true; // Not openzaurus means: It has an embedix kernel ! 122 m_embedix = true; // Not openzaurus means: It has an embedix kernel !
123 123
124 // QFile f ( "/proc/filesystems" ); 124 // QFile f ( "/proc/filesystems" );
125 QString model; 125 QString model;
126 126
127 // It isn't a good idea to check the system configuration to 127 // It isn't a good idea to check the system configuration to
128 // detect the distribution ! 128 // detect the distribution !
129 // Otherwise it may happen that any other distribution is detected as openzaurus, just 129 // Otherwise it may happen that any other distribution is detected as openzaurus, just
130 // because it uses a jffs2 filesystem.. 130 // because it uses a jffs2 filesystem..
131 // (eilers) 131 // (eilers)
132 // if ( f. open ( IO_ReadOnly ) && ( QTextStream ( &f ). read(). find ( "\tjffs2\n" ) >= 0 )) { 132 // if ( f. open ( IO_ReadOnly ) && ( QTextStream ( &f ). read(). find ( "\tjffs2\n" ) >= 0 )) {
133 QFile f ("/etc/oz_version"); 133 QFile f ("/etc/oz_version");
134 if ( f.exists() ){ 134 if ( f.exists() ){
135 d->m_vendorstr = "OpenZaurus Team"; 135 d->m_vendorstr = "OpenZaurus Team";
136 d->m_systemstr = "OpenZaurus"; 136 d->m_systemstr = "OpenZaurus";
137 d->m_system = System_OpenZaurus; 137 d->m_system = System_OpenZaurus;
138 138
139 if ( f. open ( IO_ReadOnly )) { 139 if ( f. open ( IO_ReadOnly )) {
140 QTextStream ts ( &f ); 140 QTextStream ts ( &f );
141 d->m_sysverstr = ts. readLine();//. mid ( 10 ); 141 d->m_sysverstr = ts. readLine();//. mid ( 10 );
142 f. close(); 142 f. close();
143 } 143 }
144 144
145 // Openzaurus sometimes uses the embedix kernel! 145 // Openzaurus sometimes uses the embedix kernel!
146 // => Check whether this is an embedix kernel 146 // => Check whether this is an embedix kernel
147 FILE *uname = popen("uname -r", "r"); 147 FILE *uname = popen("uname -r", "r");
148 QString line; 148 QString line;
149 if ( f.open(IO_ReadOnly, uname) ) { 149 if ( f.open(IO_ReadOnly, uname) ) {
150 QTextStream ts ( &f ); 150 QTextStream ts ( &f );
151 line = ts. readLine(); 151 line = ts. readLine();
152 int loc = line. find ( "embedix" ); 152 int loc = line. find ( "embedix" );
153 if ( loc != -1 ) 153 if ( loc != -1 )
154 m_embedix = true; 154 m_embedix = true;
155 else 155 else
156 m_embedix = false; 156 m_embedix = false;
157 f. close(); 157 f. close();
158 } 158 }
159 pclose(uname); 159 pclose(uname);
160 } 160 }
161 else { 161 else {
162 d->m_systemstr = "Zaurus"; 162 d->m_systemstr = "Zaurus";
163 d->m_system = System_Zaurus; 163 d->m_system = System_Zaurus;
164 } 164 }
165 165
166 f. setName ( "/proc/cpuinfo" ); 166 f. setName ( "/proc/cpuinfo" );