summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sysinfo/devicesinfo.cpp79
-rw-r--r--noncore/settings/sysinfo/devicesinfo.h6
-rw-r--r--noncore/settings/sysinfo/sysinfo.pro2
-rw-r--r--noncore/settings/sysinfo/sysloginfo.cpp6
-rw-r--r--noncore/settings/sysinfo/sysloginfo.h4
5 files changed, 81 insertions, 16 deletions
diff --git a/noncore/settings/sysinfo/devicesinfo.cpp b/noncore/settings/sysinfo/devicesinfo.cpp
index 4940286..76c9b79 100644
--- a/noncore/settings/sysinfo/devicesinfo.cpp
+++ b/noncore/settings/sysinfo/devicesinfo.cpp
@@ -30,32 +30,33 @@ _;:,     .>    :=|. This program is free software; you can
30/* OPIE */ 30/* OPIE */
31#include <opie2/odebug.h> 31#include <opie2/odebug.h>
32#include <opie2/oinputsystem.h> 32#include <opie2/oinputsystem.h>
33#include <opie2/opcmciasystem.h> 33#include <opie2/opcmciasystem.h>
34#include <opie2/olayout.h> 34#include <opie2/olayout.h>
35#include <opie2/olistview.h> 35#include <opie2/olistview.h>
36#include <qpe/qpeapplication.h> 36#include <qpe/qpeapplication.h>
37using namespace Opie::Core; 37using namespace Opie::Core;
38using namespace Opie::Ui; 38using namespace Opie::Ui;
39 39
40/* QT */ 40/* QT */
41#include <qobjectlist.h> 41#include <qobjectlist.h>
42#include <qlistview.h> 42#include <qlistview.h>
43#include <qcombobox.h> 43#include <qcombobox.h>
44#include <qfile.h> 44#include <qfile.h>
45#include <qpushbutton.h> 45#include <qpushbutton.h>
46#include <qstringlist.h>
46#include <qtextstream.h> 47#include <qtextstream.h>
47#include <qtextview.h> 48#include <qtextview.h>
48#include <qtimer.h> 49#include <qtimer.h>
49#include <qwhatsthis.h> 50#include <qwhatsthis.h>
50 51
51//================================================================================================= 52//=================================================================================================
52DevicesView::DevicesView( QWidget* parent, const char* name, WFlags fl ) 53DevicesView::DevicesView( QWidget* parent, const char* name, WFlags fl )
53 :Opie::Ui::OListView( parent, name, fl ) 54 :Opie::Ui::OListView( parent, name, fl )
54{ 55{
55 addColumn( tr( "My Computer" ) ); 56 addColumn( tr( "My Computer" ) );
56 setAllColumnsShowFocus( true ); 57 setAllColumnsShowFocus( true );
57 setRootIsDecorated( true ); 58 setRootIsDecorated( true );
58 QWhatsThis::add( this, tr( "This is a list of all the devices currently recognized on this device." ) ); 59 QWhatsThis::add( this, tr( "This is a list of all the devices currently recognized on this device." ) );
59 60
60 DevicesView* root = this; 61 DevicesView* root = this;
61 ( new CpuCategory( root ) )->populate(); 62 ( new CpuCategory( root ) )->populate();
@@ -83,33 +84,33 @@ void DevicesView::selectionChanged( QListViewItem* item )
83 { 84 {
84 odebug << "DevicesView::not a device node." << oendl; 85 odebug << "DevicesView::not a device node." << oendl;
85 } 86 }
86} 87}
87 88
88 89
89//================================================================================================= 90//=================================================================================================
90DevicesInfo::DevicesInfo( QWidget* parent, const char* name, WFlags fl ) 91DevicesInfo::DevicesInfo( QWidget* parent, const char* name, WFlags fl )
91 :QWidget( parent, name, fl ), details( 0 ) 92 :QWidget( parent, name, fl ), details( 0 )
92{ 93{
93 layout = new OAutoBoxLayout( this ); 94 layout = new OAutoBoxLayout( this );
94 layout->setSpacing( 2 ); 95 layout->setSpacing( 2 );
95 layout->setMargin( 2 ); 96 layout->setMargin( 2 );
96 view = new DevicesView( this ); 97 view = new DevicesView( this );
97 layout->addWidget( view, 100 ); 98 layout->addWidget( view, 100 );
98 stack = new QWidgetStack( this ); 99 stack = new QWidgetStack( this );
99 layout->addWidget( stack, 70 ); 100 layout->addWidget( stack, 80 );
100} 101}
101 102
102 103
103DevicesInfo::~DevicesInfo() 104DevicesInfo::~DevicesInfo()
104{ 105{
105} 106}
106 107
107 108
108void DevicesInfo::setDetailsWidget( QWidget* w ) 109void DevicesInfo::setDetailsWidget( QWidget* w )
109{ 110{
110 if ( details ) 111 if ( details )
111 { 112 {
112 qDebug( "hiding widget '%s' ('%s')", details->name(), details->className() ); 113 qDebug( "hiding widget '%s' ('%s')", details->name(), details->className() );
113 stack->removeWidget( w ); 114 stack->removeWidget( w );
114 } 115 }
115 116
@@ -173,55 +174,57 @@ void CpuCategory::populate()
173InputCategory::InputCategory( DevicesView* parent ) 174InputCategory::InputCategory( DevicesView* parent )
174 :Category( parent, "2. Input Subsystem" ) 175 :Category( parent, "2. Input Subsystem" )
175{ 176{
176} 177}
177 178
178InputCategory::~InputCategory() 179InputCategory::~InputCategory()
179{ 180{
180} 181}
181 182
182void InputCategory::populate() 183void InputCategory::populate()
183{ 184{
184 odebug << "InputCategory::populate()" << oendl; 185 odebug << "InputCategory::populate()" << oendl;
185 OInputSystem* sys = OInputSystem::instance(); 186 OInputSystem* sys = OInputSystem::instance();
186 OInputSystem::DeviceIterator it = sys->iterator(); 187 OInputSystem::DeviceIterator it = sys->iterator();
187 while ( it.current() ) 188 while ( it.current() )
188 { 189 {
189 new InputDevice( this, it.current()->identity() ); 190 InputDevice* dev = new InputDevice( this, it.current()->identity() );
191 dev->setInfo( it.current() );
190 ++it; 192 ++it;
191 } 193 }
192} 194}
193 195
194//================================================================================================= 196//=================================================================================================
195CardsCategory::CardsCategory( DevicesView* parent ) 197CardsCategory::CardsCategory( DevicesView* parent )
196 :Category( parent, "3. Removable Cards" ) 198 :Category( parent, "3. Removable Cards" )
197{ 199{
198} 200}
199 201
200CardsCategory::~CardsCategory() 202CardsCategory::~CardsCategory()
201{ 203{
202} 204}
203 205
204void CardsCategory::populate() 206void CardsCategory::populate()
205{ 207{
206 odebug << "CardsCategory::populate()" << oendl; 208 odebug << "CardsCategory::populate()" << oendl;
207 OPcmciaSystem* sys = OPcmciaSystem::instance(); 209 OPcmciaSystem* sys = OPcmciaSystem::instance();
208 OPcmciaSystem::CardIterator it = sys->iterator(); 210 OPcmciaSystem::CardIterator it = sys->iterator();
209 while ( it.current() ) 211 while ( it.current() )
210 { 212 {
211 new CardDevice( this, it.current()->identity() ); 213 CardDevice *dev = new CardDevice( this, it.current()->identity() );
214 dev->setInfo( it.current() );
212 ++it; 215 ++it;
213 } 216 }
214} 217}
215 218
216//================================================================================================= 219//=================================================================================================
217UsbCategory::UsbCategory( DevicesView* parent ) 220UsbCategory::UsbCategory( DevicesView* parent )
218 :Category( parent, "4. Universal Serial Bus" ) 221 :Category( parent, "4. Universal Serial Bus" )
219{ 222{
220} 223}
221 224
222UsbCategory::~UsbCategory() 225UsbCategory::~UsbCategory()
223{ 226{
224} 227}
225 228
226void UsbCategory::populate() 229void UsbCategory::populate()
227{ 230{
@@ -313,46 +316,108 @@ CpuDevice::~CpuDevice()
313{ 316{
314} 317}
315 318
316void CpuDevice::addInfo( const QString& info ) 319void CpuDevice::addInfo( const QString& info )
317{ 320{
318 int dp = info.find( ':' ); 321 int dp = info.find( ':' );
319 if ( dp != -1 ) 322 if ( dp != -1 )
320 { 323 {
321 new OListViewItem( (OListView*) details, info.left( dp ), info.right( info.length()-dp ) ); 324 new OListViewItem( (OListView*) details, info.left( dp ), info.right( info.length()-dp ) );
322 } 325 }
323} 326}
324 327
325//================================================================================================= 328//=================================================================================================
326CardDevice::CardDevice( Category* parent, const QString& name ) 329CardDevice::CardDevice( Category* parent, const QString& name )
327 :Device( parent, name ) 330 :Device( parent, name )
328{ 331{
329 details = new QPushButton( name, devinfo ); 332 OListView* w = new OListView( devinfo );
330 details->hide(); 333 details = w;
334 w->addColumn( "Info" );
335 w->addColumn( "Value" );
336 w->hide();
337}
338
339void CardDevice::setInfo( const OPcmciaSocket* card )
340{
341 QStringList vendorlst = card->productIdentityVector();
342 for( QStringList::Iterator it = vendorlst.begin(); it != vendorlst.end(); ++it )
343 {
344 new OListViewItem( (OListView*) details, "VendorID", *it );
345 }
346 new OListViewItem( (OListView*) details, "Manufacturer", card->manufacturerIdentity() );
347 new OListViewItem( (OListView*) details, "Function", card->function() );
348
349 QStringList text;
350 OPcmciaSocket::OPcmciaSocketCardStatus status = card->status();
351 if ( status )
352 {
353 if ( status & OPcmciaSocket::Occupied ) text += "Occupied";
354 if ( status & OPcmciaSocket::OccupiedCardBus ) text += "CardBus";
355 if ( status & OPcmciaSocket::WriteProtected ) text += "WriteProtected";
356 if ( status & OPcmciaSocket::BatteryLow ) text += "BatteryLow";
357 if ( status & OPcmciaSocket::BatteryDead ) text += "BatteryDead";
358 if ( status & OPcmciaSocket::Ready ) text += "Ready";
359 if ( status & OPcmciaSocket::Suspended ) text += "Suspended";
360 if ( status & OPcmciaSocket::Attention ) text += "Attention";
361 if ( status & OPcmciaSocket::InsertionInProgress ) text += "InsertionInProgress";
362 if ( status & OPcmciaSocket::RemovalInProgress ) text += "RemovalInProgress";
363 if ( status & OPcmciaSocket::ThreeVolts ) text += "3V";
364 if ( status & OPcmciaSocket::SupportsVoltage ) text += "SupportsVoltage";
365 }
366 else
367 {
368 text += "<unknown>";
369 }
370 new OListViewItem( (OListView*) details, "Status", text.join( ", " ) );
331} 371}
332 372
333CardDevice::~CardDevice() 373CardDevice::~CardDevice()
334{ 374{
335} 375}
336 376
337//================================================================================================= 377//=================================================================================================
338InputDevice::InputDevice( Category* parent, const QString& name ) 378InputDevice::InputDevice( Category* parent, const QString& name )
339 :Device( parent, name ) 379 :Device( parent, name )
340{ 380{
341 details = new QPushButton( name, devinfo ); 381 OListView* w = new OListView( devinfo );
342 details->hide(); 382 details = w;
383 w->addColumn( "Info" );
384 w->addColumn( "Value" );
385 w->hide();
386}
387
388void InputDevice::setInfo( const OInputDevice* dev )
389{
390 new OListViewItem( (OListView*) details, "Identity", dev->identity() );
391 new OListViewItem( (OListView*) details, "Path", dev->path() );
392 new OListViewItem( (OListView*) details, "Unique", dev->uniq() );
393
394 QStringList text;
395 if ( dev->hasFeature( OInputDevice::Synchronous ) ) text += "Synchronous";
396 if ( dev->hasFeature( OInputDevice::Keys ) ) text += "Keys";
397 if ( dev->hasFeature( OInputDevice::Relative ) ) text += "Relative";
398 if ( dev->hasFeature( OInputDevice::Absolute ) ) text += "Absolute";
399 if ( dev->hasFeature( OInputDevice::Miscellaneous ) ) text += "Miscellaneous";
400 if ( dev->hasFeature( OInputDevice::Leds ) ) text += "Leds";
401 if ( dev->hasFeature( OInputDevice::Sound ) ) text += "Sound";
402 if ( dev->hasFeature( OInputDevice::AutoRepeat ) ) text += "AutoRepeat";
403 if ( dev->hasFeature( OInputDevice::ForceFeedback ) ) text += "ForceFeedback";
404 if ( dev->hasFeature( OInputDevice::PowerManagement ) ) text += "PowerManagement";
405 if ( dev->hasFeature( OInputDevice::ForceFeedbackStatus ) ) text += "ForceFeedbackStatus";
406 new OListViewItem( (OListView*) details, "Features", text.join( ", " ) );
407
343} 408}
344 409
345InputDevice::~InputDevice() 410InputDevice::~InputDevice()
346{ 411{
347} 412}
348 413
349//================================================================================================= 414//=================================================================================================
350UsbDevice::UsbDevice( Category* parent, const QString& name ) 415UsbDevice::UsbDevice( Category* parent, const QString& name )
351 :Device( parent, name ) 416 :Device( parent, name )
352{ 417{
353 details = new QPushButton( name, devinfo ); 418 details = new QPushButton( name, devinfo );
354 details->hide(); 419 details->hide();
355} 420}
356 421
357//================================================================================================= 422//=================================================================================================
358UsbDevice::UsbDevice( UsbDevice* parent, const QString& name ) 423UsbDevice::UsbDevice( UsbDevice* parent, const QString& name )
diff --git a/noncore/settings/sysinfo/devicesinfo.h b/noncore/settings/sysinfo/devicesinfo.h
index c601a96..c4e3637 100644
--- a/noncore/settings/sysinfo/devicesinfo.h
+++ b/noncore/settings/sysinfo/devicesinfo.h
@@ -24,32 +24,34 @@ _;:,     .>    :=|. This program is free software; you can
24 If not, write to the Free Software Foundation, 24 If not, write to the Free Software Foundation,
25 Inc., 59 Temple Place - Suite 330, 25 Inc., 59 Temple Place - Suite 330,
26 Boston, MA 02111-1307, USA. 26 Boston, MA 02111-1307, USA.
27*/ 27*/
28 28
29#ifndef DEVICESINFO_H 29#ifndef DEVICESINFO_H
30#define DEVICESINFO_H 30#define DEVICESINFO_H
31 31
32/* OPIE */ 32/* OPIE */
33#include <opie2/olistview.h> 33#include <opie2/olistview.h>
34#include <opie2/olayout.h> 34#include <opie2/olayout.h>
35 35
36/* QT */ 36/* QT */
37#include <qwidget.h> 37#include <qwidget.h>
38#include <qwidgetstack.h> 38#include <qwidgetstack.h>
39 39
40namespace Opie { namespace Core { class OPcmciaSocket; class OInputDevice; }; };
41
40//================================================================================================= 42//=================================================================================================
41class DevicesView : public Opie::Ui::OListView 43class DevicesView : public Opie::Ui::OListView
42{ 44{
43 Q_OBJECT 45 Q_OBJECT
44public: 46public:
45 DevicesView( QWidget* parent = 0, const char* name = 0, WFlags f = 0 ); 47 DevicesView( QWidget* parent = 0, const char* name = 0, WFlags f = 0 );
46 ~DevicesView(); 48 ~DevicesView();
47public slots: 49public slots:
48 void selectionChanged( QListViewItem* item ); 50 void selectionChanged( QListViewItem* item );
49}; 51};
50 52
51//================================================================================================= 53//=================================================================================================
52class DevicesInfo : public QWidget 54class DevicesInfo : public QWidget
53{ 55{
54 Q_OBJECT 56 Q_OBJECT
55public: 57public:
@@ -89,33 +91,32 @@ public:
89//================================================================================================= 91//=================================================================================================
90class InputCategory : public Category 92class InputCategory : public Category
91{ 93{
92public: 94public:
93 InputCategory( DevicesView* parent ); 95 InputCategory( DevicesView* parent );
94 virtual ~InputCategory(); 96 virtual ~InputCategory();
95 97
96 virtual void populate(); 98 virtual void populate();
97}; 99};
98 100
99//================================================================================================= 101//=================================================================================================
100class CardsCategory : public Category 102class CardsCategory : public Category
101{ 103{
102public: 104public:
103 CardsCategory( DevicesView* parent ); 105 CardsCategory( DevicesView* parent );
104 virtual ~CardsCategory(); 106 virtual ~CardsCategory();
105
106 virtual void populate(); 107 virtual void populate();
107}; 108};
108 109
109//================================================================================================= 110//=================================================================================================
110class UsbCategory : public Category 111class UsbCategory : public Category
111{ 112{
112public: 113public:
113 UsbCategory( DevicesView* parent ); 114 UsbCategory( DevicesView* parent );
114 virtual ~UsbCategory(); 115 virtual ~UsbCategory();
115 116
116 virtual void populate(); 117 virtual void populate();
117}; 118};
118 119
119//================================================================================================= 120//=================================================================================================
120class Device : public Opie::Ui::OListViewItem 121class Device : public Opie::Ui::OListViewItem
121{ 122{
@@ -136,41 +137,44 @@ class CpuDevice : public Device
136public: 137public:
137 CpuDevice( Category* parent, const QString& name ); 138 CpuDevice( Category* parent, const QString& name );
138 ~CpuDevice(); 139 ~CpuDevice();
139 140
140 void addInfo( const QString& line ); 141 void addInfo( const QString& line );
141 142
142// virtual QWidget* detailsWidget(); 143// virtual QWidget* detailsWidget();
143}; 144};
144 145
145//================================================================================================= 146//=================================================================================================
146class InputDevice : public Device 147class InputDevice : public Device
147{ 148{
148public: 149public:
149 InputDevice( Category* parent, const QString& name ); 150 InputDevice( Category* parent, const QString& name );
150 ~InputDevice(); 151 ~InputDevice();
151 152
153 void setInfo( const Opie::Core::OInputDevice* dev );
154
152// virtual QWidget* detailsWidget(); 155// virtual QWidget* detailsWidget();
153}; 156};
154 157
155//================================================================================================= 158//=================================================================================================
156class CardDevice : public Device 159class CardDevice : public Device
157{ 160{
158public: 161public:
159 CardDevice( Category* parent, const QString& name ); 162 CardDevice( Category* parent, const QString& name );
160 ~CardDevice(); 163 ~CardDevice();
164 void setInfo( const Opie::Core::OPcmciaSocket* card );
161 165
162// virtual QWidget* detailsWidget(); 166// virtual QWidget* detailsWidget();
163}; 167};
164 168
165//================================================================================================= 169//=================================================================================================
166class UsbDevice : public Device 170class UsbDevice : public Device
167{ 171{
168public: 172public:
169 UsbDevice( Category* parent, const QString& name ); 173 UsbDevice( Category* parent, const QString& name );
170 UsbDevice( UsbDevice* parent, const QString& name ); 174 UsbDevice( UsbDevice* parent, const QString& name );
171 ~UsbDevice(); 175 ~UsbDevice();
172 176
173// virtual QWidget* detailsWidget(); 177// virtual QWidget* detailsWidget();
174}; 178};
175 179
176#endif 180#endif
diff --git a/noncore/settings/sysinfo/sysinfo.pro b/noncore/settings/sysinfo/sysinfo.pro
index 8b23a57..ed9bc0e 100644
--- a/noncore/settings/sysinfo/sysinfo.pro
+++ b/noncore/settings/sysinfo/sysinfo.pro
@@ -21,19 +21,19 @@ SOURCES = \
21 devicesinfo.cpp \ 21 devicesinfo.cpp \
22 storage.cpp \ 22 storage.cpp \
23 processinfo.cpp \ 23 processinfo.cpp \
24 modulesinfo.cpp \ 24 modulesinfo.cpp \
25 detail.cpp \ 25 detail.cpp \
26 contrib/dhry.c contrib/fft.c \ 26 contrib/dhry.c contrib/fft.c \
27 benchmarkinfo.cpp \ 27 benchmarkinfo.cpp \
28 sysloginfo.cpp \ 28 sysloginfo.cpp \
29 versioninfo.cpp \ 29 versioninfo.cpp \
30 sysinfo.cpp 30 sysinfo.cpp
31 31
32INCLUDEPATH += $(OPIEDIR)/include 32INCLUDEPATH += $(OPIEDIR)/include
33DEPENDPATH += $(OPIEDIR)/include 33DEPENDPATH += $(OPIEDIR)/include
34LIBS += -lqpe -lopiecore2 -lopieui2 34LIBS += -lqpe -lopiecore2 -lopieui2
35DEFINES += UNIX 35DEFINES += UNIX
36TARGET = sysinfo 36TARGET = sysinfo
37VERSION = 1.3.0 37VERSION = 1.3.1
38 38
39include( $(OPIEDIR)/include.pro ) 39include( $(OPIEDIR)/include.pro )
diff --git a/noncore/settings/sysinfo/sysloginfo.cpp b/noncore/settings/sysinfo/sysloginfo.cpp
index 21427f4..279c335 100644
--- a/noncore/settings/sysinfo/sysloginfo.cpp
+++ b/noncore/settings/sysinfo/sysloginfo.cpp
@@ -1,24 +1,22 @@
1/********************************************************************** 1/**********************************************************************
2** SyslogInfo 2** SyslogInfo
3** 3**
4** Display Syslog information 4** Display Syslog information
5** 5**
6** Copyright (C) 2004, Michael Lauer 6** Copyright (C) 2004-2005 Michael 'Mickey' Lauer <mickey@Vanille.de>
7** mickey@tm.informatik.uni-frankfurt.de
8** http://www.Vanille.de
9** 7**
10** This file may be distributed and/or modified under the terms of the 8** This file may be distributed and/or modified under the terms of the
11** GNU General Public License version 2 as published by the Free Software 9** GNU General Public License version 2 as published by the Free Software
12** Foundation and appearing in the file LICENSE.GPL included in the 10** Foundation and appearing in the file LICENSE.GPL included in the
13** packaging of this file. 11** packaging of this file.
14** 12**
15** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 13** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 14** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17** 15**
18**********************************************************************/ 16**********************************************************************/
19 17
20#include "sysloginfo.h" 18#include "sysloginfo.h"
21#include "detail.h" 19#include "detail.h"
22 20
23/* OPIE */ 21/* OPIE */
24#include <opie2/olistview.h> 22#include <opie2/olistview.h>
@@ -56,33 +54,33 @@ using namespace Opie::Ui;
56#undef APPEND 54#undef APPEND
57 55
58const unsigned int bufsize = 16384; 56const unsigned int bufsize = 16384;
59char buf[bufsize]; 57char buf[bufsize];
60 58
61SyslogInfo::SyslogInfo( QWidget* parent, const char* name, WFlags fl ) 59SyslogInfo::SyslogInfo( QWidget* parent, const char* name, WFlags fl )
62 : QWidget( parent, name, fl ) 60 : QWidget( parent, name, fl )
63{ 61{
64 QGridLayout *layout = new QGridLayout( this ); 62 QGridLayout *layout = new QGridLayout( this );
65 layout->setSpacing( 2 ); 63 layout->setSpacing( 2 );
66 layout->setMargin( 0 ); 64 layout->setMargin( 0 );
67 65
68 syslogview = new QTextView( this ); 66 syslogview = new QTextView( this );
69 syslogview->setTextFormat( PlainText ); 67 syslogview->setTextFormat( PlainText );
70 OConfig cfg( "qpe" ); 68 OConfig cfg( "qpe" );
71 cfg.setGroup( "Appearance" ); 69 cfg.setGroup( "Appearance" );
72 syslogview->setFont( QFont( "Fixed", cfg.readNumEntry( "FontSize", 10 ) ) ); 70 syslogview->setFont( QFont( cfg.readEntry( "FixedFontFamily", "Fixed" ), cfg.readNumEntry( "FixedFontSize", 10 ) ) );
73 layout->addWidget( syslogview, 0, 0 ); 71 layout->addWidget( syslogview, 0, 0 );
74 syslogview->setText( "..." ); 72 syslogview->setText( "..." );
75 73
76 memset( buf, 0, bufsize ); 74 memset( buf, 0, bufsize );
77 ::klogctl( SYSLOG_READ_ALL, buf, bufsize ); 75 ::klogctl( SYSLOG_READ_ALL, buf, bufsize );
78 syslogview->setText( buf ); 76 syslogview->setText( buf );
79 77
80#ifdef APPEND 78#ifdef APPEND
81 fd = ::open( "/proc/kmsg", O_RDONLY|O_SYNC ); 79 fd = ::open( "/proc/kmsg", O_RDONLY|O_SYNC );
82 if ( fd == -1 ) 80 if ( fd == -1 )
83 { 81 {
84 syslogview->setText( "Couldn't open /proc/kmsg: " + QString( strerror( errno ) ) ); 82 syslogview->setText( "Couldn't open /proc/kmsg: " + QString( strerror( errno ) ) );
85 return; 83 return;
86 } 84 }
87 QSocketNotifier *sn = new QSocketNotifier( fd, QSocketNotifier::Read, this ); 85 QSocketNotifier *sn = new QSocketNotifier( fd, QSocketNotifier::Read, this );
88 QObject::connect( sn, SIGNAL(activated(int)), this, SLOT(updateData()) ); 86 QObject::connect( sn, SIGNAL(activated(int)), this, SLOT(updateData()) );
diff --git a/noncore/settings/sysinfo/sysloginfo.h b/noncore/settings/sysinfo/sysloginfo.h
index 7bf8d17..f9e522a 100644
--- a/noncore/settings/sysinfo/sysloginfo.h
+++ b/noncore/settings/sysinfo/sysloginfo.h
@@ -1,24 +1,22 @@
1/********************************************************************** 1/**********************************************************************
2** SyslogInfo 2** SyslogInfo
3** 3**
4** Display Syslog information 4** Display Syslog information
5** 5**
6** Copyright (C) 2004, Michael Lauer 6** Copyright (C) 2004-2005, Michael 'Mickey' Lauer <mickey@Vanille.de>
7** mickey@tm.informatik.uni-frankfurt.de
8** http://www.Vanille.de
9** 7**
10** This file may be distributed and/or modified under the terms of the 8** This file may be distributed and/or modified under the terms of the
11** GNU General Public License version 2 as published by the Free Software 9** GNU General Public License version 2 as published by the Free Software
12** Foundation and appearing in the file LICENSE.GPL included in the 10** Foundation and appearing in the file LICENSE.GPL included in the
13** packaging of this file. 11** packaging of this file.
14** 12**
15** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 13** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 14** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17** 15**
18**********************************************************************/ 16**********************************************************************/
19 17
20#ifndef SYSLOGINFO_H 18#ifndef SYSLOGINFO_H
21#define SYSLOGINFO_H 19#define SYSLOGINFO_H
22 20
23#include <qwidget.h> 21#include <qwidget.h>
24 22