From aac398599f21a276f15475c0dc33e6b204bfa08a Mon Sep 17 00:00:00 2001 From: Mavridis Philippe Date: Thu, 14 Jan 2021 18:44:41 +0200 Subject: Replaced About tab with Welcome tab. The needed data is already provided through TDEAboutData, while translation credits are redundant since the old i18n files have been deleted. Signed-off-by: Mavridis Philippe --- src/welcome.cpp | 87 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100755 src/welcome.cpp (limited to 'src/welcome.cpp') diff --git a/src/welcome.cpp b/src/welcome.cpp new file mode 100755 index 0000000..9b45367 --- /dev/null +++ b/src/welcome.cpp @@ -0,0 +1,87 @@ +/* + * Copyright (C) 2004 Robert Hogan + */ + +#include "welcome.h" +#include "version.h" + +#include + +#include + +#include +#include +#include + +Aboutklamav::Aboutklamav(TQWidget *parent, const char *name) + : TQWidget(parent, name) +{ + TQVBoxLayout *vbox = new TQVBoxLayout(this, KDialog::marginHint(), + KDialog::spacingHint(), "vbox"); + + TQWidget* privateLayoutWidget = new TQWidget( this, "dblayout" ); + vbox->addWidget(privateLayoutWidget); + + TQGridLayout* dblayout = new TQGridLayout( privateLayoutWidget, 1, 1, 2, 2, "dblayout"); + dblayout->setColStretch(1, 1); + + htmlpart = new TDEHTMLPart(privateLayoutWidget); + dblayout->addMultiCellWidget( htmlpart->widget(), 0, 1, 1, 1 ); + + TQString location = locate("data", "klamav/about/aboutklamav.html"); + TQString res = loadFile(location); + + /* Stylesheets */ + res = res.arg( locate( "data", "klamav/about/klamav.css" ) ); + res = res.arg( locate( "data", "tdeui/about/kde_infopage.css" ) ); + if ( kapp->reverseLayout() ) + res = res.arg( "@import \"%1\";" ).arg( locate( "data", "tdeui/about/kde_infopage_rtl.css" ) ); + else + res = res.arg( "" ); + + + res = res.arg("KlamAV") + .arg("KlamAV") + .arg( i18n("Version ")+TQString(KLAMAV_VERSION) ) + .arg( i18n("An anti-virus manager for the Trinity Desktop Environment") ) + .arg( i18n("KlamAV is a convenient way to manage ClamAV. KlamAV provides:") ) + .arg( i18n("Scheduled scanning") ) + .arg( i18n("Automatic virus database updates") ) + .arg( i18n("E-Mail scanning") ) + .arg( i18n("Virus information browser") ) + .arg( i18n("Quarantine management") ) + .arg( i18n("This program is a front-end for") ); + + htmlpart->begin(); + htmlpart->write(res); + htmlpart->end(); +} + + +Aboutklamav::~Aboutklamav() +{ +} + +/* borrowed from Konqueror */ +TQString Aboutklamav::loadFile( const TQString& file ) { + TQString res; + if( file.isEmpty() ) + return res; + + TQFile f(file); + + if( !f.open(IO_ReadOnly) ) + return res; + + TQTextStream t(&f); + res = t.read(); + + return res; +} + +#include "welcome.moc" + + + + + -- cgit v1.2.1