summaryrefslogtreecommitdiffstats
path: root/src/welcome.cpp
diff options
context:
space:
mode:
authorMavridis Philippe <[email protected]>2021-01-14 18:44:41 +0200
committerMavridis Philippe <[email protected]>2021-01-14 18:44:41 +0200
commitaac398599f21a276f15475c0dc33e6b204bfa08a (patch)
tree3b78f0ce151c2b9bffec742eb2c25662a86090e3 /src/welcome.cpp
parent831757bf1013fbd4db10c6c33ec611079e058be3 (diff)
downloadklamav-aac398599f21a276f15475c0dc33e6b204bfa08a.tar.gz
klamav-aac398599f21a276f15475c0dc33e6b204bfa08a.zip
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 <[email protected]>
Diffstat (limited to 'src/welcome.cpp')
-rwxr-xr-xsrc/welcome.cpp87
1 files changed, 87 insertions, 0 deletions
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 <robert at roberthogan dot net>
+ */
+
+#include "welcome.h"
+#include "version.h"
+
+#include <tdelocale.h>
+
+#include <kstandarddirs.h>
+
+#include <tqlayout.h>
+#include <tdehtml_part.h>
+#include <tqfile.h>
+
+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"
+
+
+
+
+