summaryrefslogtreecommitdiff
path: root/noncore/settings/sysinfo/sysloginfo.cpp
Side-by-side diff
Diffstat (limited to 'noncore/settings/sysinfo/sysloginfo.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sysinfo/sysloginfo.cpp6
1 files changed, 2 insertions, 4 deletions
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,32 +1,30 @@
/**********************************************************************
** SyslogInfo
**
** Display Syslog information
**
-** Copyright (C) 2004, Michael Lauer
-** mickey@tm.informatik.uni-frankfurt.de
-** http://www.Vanille.de
+** Copyright (C) 2004-2005 Michael 'Mickey' Lauer <mickey@Vanille.de>
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
**********************************************************************/
#include "sysloginfo.h"
#include "detail.h"
/* OPIE */
#include <opie2/olistview.h>
#include <opie2/oconfig.h>
using namespace Opie::Core;
using namespace Opie::Ui;
/* QT */
#include <qcombobox.h>
#include <qfile.h>
#include <qlayout.h>
@@ -48,49 +46,49 @@ using namespace Opie::Ui;
#include <string.h>
#include <errno.h>
#define SYSLOG_READ 2
#define SYSLOG_READ_ALL 3
#define SYSLOG_READ_ALL_CLEAR 4
#define SYSLOG_UNREAD 9
#undef APPEND
const unsigned int bufsize = 16384;
char buf[bufsize];
SyslogInfo::SyslogInfo( QWidget* parent, const char* name, WFlags fl )
: QWidget( parent, name, fl )
{
QGridLayout *layout = new QGridLayout( this );
layout->setSpacing( 2 );
layout->setMargin( 0 );
syslogview = new QTextView( this );
syslogview->setTextFormat( PlainText );
OConfig cfg( "qpe" );
cfg.setGroup( "Appearance" );
- syslogview->setFont( QFont( "Fixed", cfg.readNumEntry( "FontSize", 10 ) ) );
+ syslogview->setFont( QFont( cfg.readEntry( "FixedFontFamily", "Fixed" ), cfg.readNumEntry( "FixedFontSize", 10 ) ) );
layout->addWidget( syslogview, 0, 0 );
syslogview->setText( "..." );
memset( buf, 0, bufsize );
::klogctl( SYSLOG_READ_ALL, buf, bufsize );
syslogview->setText( buf );
#ifdef APPEND
fd = ::open( "/proc/kmsg", O_RDONLY|O_SYNC );
if ( fd == -1 )
{
syslogview->setText( "Couldn't open /proc/kmsg: " + QString( strerror( errno ) ) );
return;
}
QSocketNotifier *sn = new QSocketNotifier( fd, QSocketNotifier::Read, this );
QObject::connect( sn, SIGNAL(activated(int)), this, SLOT(updateData()) );
#else
QPushButton* pb = new QPushButton( "&Refresh", this );
layout->addWidget( pb, 1, 0 );
QObject::connect( pb, SIGNAL(clicked()), this, SLOT(updateData()) );
#endif
}
SyslogInfo::~SyslogInfo()