summaryrefslogtreecommitdiffstats
path: root/src/dbviewer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/dbviewer.cpp')
-rw-r--r--src/dbviewer.cpp77
1 files changed, 67 insertions, 10 deletions
diff --git a/src/dbviewer.cpp b/src/dbviewer.cpp
index e4e9525..d91dd42 100644
--- a/src/dbviewer.cpp
+++ b/src/dbviewer.cpp
@@ -12,6 +12,7 @@
#include "pageviewer.h"
#include "tabwidget.h"
#include "freshklam.h"
+#include "version.h"
#include "../config.h"
#include <tqheader.h>
@@ -692,7 +693,7 @@ void KlamDB::shouldIShow(TQWidget * current)
{
static struct cl_stat *dbstat=NULL;
- TQString location;
+ TQString location, res;
if ((current == this) && (!(loadinprogress))){
TQString db = tdemain->freshklam->getCurrentDBDir();
@@ -700,7 +701,26 @@ void KlamDB::shouldIShow(TQWidget * current)
if (checkdir(db.ascii()) == -1){
kdDebug() << "returned -1" << endl;
location = locate("data", "klamav/about/nodb.html");
- homepage->openURL(location);
+ res = homepage->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( i18n("Virus Browser") )
+ .arg( i18n("Virus Browser") )
+ .arg( i18n("Version ")+TQString(KLAMAV_VERSION) )
+ .arg( i18n("The virus database could not be loaded.") )
+ .arg( i18n("Please ensure that you have downloaded one (using the Updates section) and try again.") );
+
+ homepage->begin();
+ homepage->write(res);
+ homepage->end();
return;
}
@@ -708,9 +728,28 @@ void KlamDB::shouldIShow(TQWidget * current)
if ( ((cl_statchkdir(dbstat) == 1) || (dbstat == NULL))) {
location = locate("data", "klamav/about/wait.html");
- homepage->openURL(location);
+ res = homepage->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( i18n("Virus Browser") )
+ .arg( i18n("Virus Browser") )
+ .arg( i18n("Version ")+TQString(KLAMAV_VERSION) )
+ .arg( i18n("Please wait while the database loads...") );
+
+ homepage->begin();
+ homepage->write(res);
+ homepage->end();
+
+ loadinprogress = true;
- loadinprogress = true;
sigs = ( int )getSigNos();
progress = new KProgressDialog (this, "progress", i18n( "Loading .." ), i18n( "Loading..." ), true);
progress->setAllowCancel(false);
@@ -750,13 +789,31 @@ void KlamDB::shouldIShow(TQWidget * current)
loadinprogress = false;
- // Default english
- TQString location = locate( "data", "klamav/about/main-" + TDEGlobal::locale()->language() + ".html" );
- if( location != TQString::null )
- homepage->openURL( location );
- else
- homepage->openURL( locate("data", "klamav/about/main.html") );
+ location = locate("data", "klamav/about/main.html");
+ res = homepage->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( i18n("Virus Browser") )
+ .arg( i18n("Virus Browser") )
+ .arg( i18n("Version ")+TQString(KLAMAV_VERSION) )
+ .arg( i18n("KlamAV's Virus Browser allows you to research the viruses detected by ClamAV.") )
+ .arg( i18n("Usage is simple:") )
+ .arg( i18n("Right-click on a virus-name to choose whether to research a virus using Google or TrendMicro.") )
+ .arg( i18n("Right-click on a detected virus in the 'Scan' tab to research it in the virus browser.") )
+ .arg( i18n("Right-click on a detected virus in the 'Quarantine' tab to research it in the virus browser.") );
+
+ homepage->begin();
+ homepage->write(res);
+ homepage->end();
}
}
}