File klamav_0.46-75f04527_to_a3c768f6.patch of Package klamav

diff -Naru klamav-0.46_orig/src/Makefile.am klamav-0.46/src/Makefile.am
--- klamav-0.46_orig/src/Makefile.am	2021-04-09 14:26:15.068002606 +0900
+++ klamav-0.46/src/Makefile.am	2021-04-12 16:16:32.997330629 +0900
@@ -22,15 +22,15 @@
 klamav_LDADD   = $(LIB_KFILE) $(LIB_KPARTS) $(LIB_KHTML) $(LIB_SQLITE) $(LIB_SQLITE_LOCAL) $(LIB_CLAM)
 
 # which sources should be compiled for klamav
+# autoscanoptions.ui excluded until autoscan is reimplemented 
 klamav_SOURCES =  main.cpp klamav.cpp freshklam.cpp sigtool.cpp klamscan.cpp \
-			klamd.cpp kuarantine.cpp \
-			aboutklamav.cpp  dbviewer.cpp  \
+			kuarantine.cpp aboutklamav.cpp  dbviewer.cpp  \
 			frame.cpp tabwidget.cpp viewer.cpp pageviewer.cpp klamav_run.cpp dcopklamscan.skel \
 			directorylist.cpp scanviewer.cpp schedule.cpp datepicker.cpp cthost.cpp \
 			ctcron.cpp ctmonth.cpp 	ctdom.cpp ctdow.cpp cttask.cpp 	ctvariable.cpp \
 			ktlistitem.cpp ktlisttask.cpp ktlisttasks.cpp ktview.cpp ktlistcron.cpp \
-			kticon.cpp activityviewer.cpp collectiondb.cpp archivelimits.ui \
-			archivetypes.ui specialfiletypes.ui firstrunwizard.ui configdialog.cpp autoscanoptions.ui logoptions.ui klamavconfig.kcfgc k3bjobprogressosd_mod.cpp update.cpp
+			kticon.cpp activityviewer.cpp collectiondb.cpp archives.ui \
+			specialfiletypes.ui firstrunwizard.ui configdialog.cpp logoptions.ui klamavconfig.kcfgc k3bjobprogressosd_mod.cpp backend.ui
 
 
 
@@ -63,5 +63,5 @@
 kde_kcfg_DATA = klamavconfig.kcfg
 
 
-main.o : archivelimits.h archivetypes.h specialfiletypes.h firstrunwizard.h autoscanoptions.h logoptions.h klamavconfig.h
+main.o : archives.h specialfiletypes.h firstrunwizard.h logoptions.h klamavconfig.h
 
diff -Naru klamav-0.46_orig/src/about/main.html klamav-0.46/src/about/main.html
--- klamav-0.46_orig/src/about/main.html	2009-02-28 19:27:27.000000000 +0900
+++ klamav-0.46/src/about/main.html	2021-04-09 15:27:25.425406030 +0900
@@ -1,53 +1,69 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
-"http://www.w3.org/TR/REC-html40/loose.dtd"><HTML>
-<HEAD>
-<meta name="description" content="" />
-<meta name="author" content="Hans de Raad"/>
-<meta name="keywords" content="KlamAV, Anti-Virus, AV, Linux, KDE, ClamAV, Freshklam, GUI" />
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
-<link rel="shortcut icon" HREF="http://klamav.sf.net/favicon.ico" />
-<TITLE>KlamAV</TITLE>
-<STYLE>BODY {color: black; 
-	font-size: 10pt;
-	margin-left: 5%;
-	margin-right: 5%;
-	}
-.KANormal {
-	 font-size: 9pt;
-	 color: black;
-	 }
-.KASmall {
-	 font-size: 8pt;
-	 color: black;
-	 }
-A:LINK {
-	font-size: 9pt;	
-	color: black;
-	}
-
-A:VISITED {
-	font-size: 9pt;
-	color: black}
-
-A:HOVER {
-	font-size: 9pt;
-	font-weight: bold;
-	color: #FFFFFF;
-	background-color: #000000;
-	}	</STYLE>
-</HEAD>
-<BODY>
-<table><tr><td><img src=klam.png width=100 height=100></td><td><h2>KlamAV Virus Browser</H2></td></tr></table><table width=100% height=100%><tr><td class=KASmall align=left valign=top width=25% height=100%><a href="http://klamav.sourceforge.net/index.php?content=ka_home"><b>Home</b></a><br><a href="http://klamav.sourceforge.net/index.php?content=ka_news"><b>News</b></a><br><a href="https://sourceforge.net/project/showfiles.php?group_id=102171"><b>Download KlamAV</b></a><br><a href="https://sourceforge.net/project/showfiles.php?group_id=86638"><b>Download ClamAV</b></a><br><a href="http://klamav.sourceforge.net/index.php?content=ka_security_notes"><b>Security Notes</b></a><br><br><br><br><br><p class=KANormal></p><br><br><br><br><br><br></td><td class=KANormal align=left valign=top width=75% height=100%>
-<p class=KANormal>
-            <p>KlamAV's Virus Browser allows you to research
-            the viruses detected by ClamAV. With the virus browser you can:</p>
-	    <p>* Right-click on a virus-name to choose whether to research a virus using Google or VirusPool.</p>
-	<p>* Right-click on a detected virus in the 'Scan' tab to research it in the virus browser.</p>
-	<p>* Right-click on a detected virus in the 'Quarantine' tab to research it in the virus browser.</p>
-	<p></p>
-	<p>NB: The filter on the top-left is experimental. Filtering can take a while so use with care!!</p>
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
-	<p>Good Luck.</p><p></p>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <meta name="generator" content=
+  "HTML Tidy for Linux/x86 (vers 1st August 2004), see www.w3.org" />
 
-</td></tr></table>
-</BODY></HTML>
\ ファイル末尾に改行がありません
+  <style type="text/css">
+  /*<![CDATA[*/
+    @import "%1"; /* klamav.css */
+    @import "%1"; /* kde_infopage.css */
+    %1 /* maybe @import "kde_infopage_rtl.css"; */
+  /*]]>*/
+  </style>
+
+  <title>%1</title>
+</head>
+
+<body>
+  <div id="header">
+    <div id="headerL"></div>
+    <div id="headerCenter"></div>
+    <div id="headerR"></div>
+
+    <div id="title">
+      %1 <!-- Virus Browser-->
+    </div>
+
+    <div id="tagline">
+      %1 <!-- version number -->
+    </div>
+  </div>
+
+  <!-- the bar -->
+  <div id="bar">
+   <div id="barT"><div id="barTL"></div><div id="barTR"></div><div id="barTC"></div></div>
+    <div id="barL">
+      <div id="barR">
+        <div id="barCenter" class="bar_text">
+	  %1 <!-- KlamAV's Virus Browser allows you to research the viruses detected by ClamAV. -->
+        </div>
+      </div>
+    </div>
+    <div id="barB"><div id="barBL"></div><div id="barBR"></div><div id="barBC"></div></div>
+  </div>
+
+  <!-- the main text box -->
+  <div id="box">
+   <div id="boxT"><div id="boxTL"></div><div id="boxTR"></div><div id="boxTC"></div></div>
+    <div id="boxL">
+      <div id="boxR">
+        <div id="boxCenter">
+	  %1 <!-- Usage is simple: -->
+	  <ul>
+	    <li>%1</li> <!-- Right-click on a virus-name to choose whether to research a virus using Google or TrendMicro. -->
+	    <li>%1</li> <!-- Right-click on a detected virus in the 'Scan' tab to research it in the virus browser. -->
+	    <li>%1</li> <!-- Right-click on a detected virus in the 'Quarantine' tab to research it in the virus browser. -->
+	  </ul>
+	</div>
+      </div>
+    </div>
+    <div id="boxB"><div id="boxBL"></div><div id="boxBR"></div><div id="boxBC"></div></div>
+  </div>
+
+  <div id="footer"><div id="footerL"></div><div id="footerR"></div></div>
+</body>
+</html>
diff -Naru klamav-0.46_orig/src/about/nodb.html klamav-0.46/src/about/nodb.html
--- klamav-0.46_orig/src/about/nodb.html	2009-02-28 19:27:27.000000000 +0900
+++ klamav-0.46/src/about/nodb.html	2021-04-09 15:27:25.425406030 +0900
@@ -1,46 +1,51 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
-"http://www.w3.org/TR/REC-html40/loose.dtd"><HTML>
-<HEAD>
-<meta name="description" content="" />
-<meta name="author" content="Hans de Raad"/>
-<meta name="keywords" content="KlamAV, Anti-Virus, AV, Linux, KDE, ClamAV, Freshklam, GUI" />
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
-<link rel="shortcut icon" HREF="http://klamav.sf.net/favicon.ico" />
-<TITLE>KlamAV</TITLE>
-<STYLE>BODY {color: black; 
-	font-size: 10pt;
-	margin-left: 5%;
-	margin-right: 5%;
-	}
-.KANormal {
-	 font-size: 9pt;
-	 color: black;
-	 }
-.KASmall {
-	 font-size: 8pt;
-	 color: black;
-	 }
-A:LINK {
-	font-size: 9pt;	
-	color: black;
-	}
-
-A:VISITED {
-	font-size: 9pt;
-	color: black}
-
-A:HOVER {
-	font-size: 9pt;
-	font-weight: bold;
-	color: #FFFFFF;
-	background-color: #000000;
-	}	</STYLE>
-</HEAD>
-<BODY>
-<table><tr><td><img src=klam.png width=100 height=100></td><td><h2>KlamAV Virus Browser</H2></td></tr></table><table width=100% height=100%><tr><td class=KASmall align=left valign=top width=25% height=100%><a href="http://klamav.sourceforge.net/index.php?content=ka_home"><b>Home</b></a><br><a href="http://klamav.sourceforge.net/index.php?content=ka_news"><b>News</b></a><br><a href="https://sourceforge.net/project/showfiles.php?group_id=102171"><b>Download KlamAV</b></a><br><a href="https://sourceforge.net/project/showfiles.php?group_id=86638"><b>Download ClamAV</b></a><br><a href="http://klamav.sourceforge.net/index.php?content=ka_security_notes"><b>Security Notes</b></a><br><br><br><br><br><p class=KANormal></p><br><br><br><br><br><br></td><td class=KANormal align=left valign=top width=75% height=100%>
-<p class=KANormal>
-THERE'S NO DATABASE TO LOAD - DOWNLOAD ONE USING THE UPDATES SECTION!!
-</p>
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
-</td></tr></table>
-</BODY></HTML>
\ ファイル末尾に改行がありません
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <meta name="generator" content=
+  "HTML Tidy for Linux/x86 (vers 1st August 2004), see www.w3.org" />
+
+  <style type="text/css">
+  /*<![CDATA[*/
+    @import "%1"; /* klamav.css */
+    @import "%1"; /* kde_infopage.css */
+    %1 /* maybe @import "kde_infopage_rtl.css"; */
+  /*]]>*/
+  </style>
+
+  <title>%1</title>
+</head>
+
+<body>
+  <div id="header">
+    <div id="headerL"></div>
+    <div id="headerCenter"></div>
+    <div id="headerR"></div>
+
+    <div id="title">
+      %1 <!-- Virus Browser-->
+    </div>
+
+    <div id="tagline">
+      %1 <!-- version number -->
+    </div>
+  </div>
+
+  <!-- the bar -->
+  <div id="bar">
+   <div id="barT"><div id="barTL"></div><div id="barTR"></div><div id="barTC"></div></div>
+    <div id="barL">
+      <div id="barR">
+        <div id="barCenter" class="bar_text">
+	  <big>%1</big><br><br> %1 <!-- The virus database could not be loaded. / Please ensure that you have downloaded one (using the Updates section) and try again. -->
+        </div>
+      </div>
+    </div>
+    <div id="barB"><div id="barBL"></div><div id="barBR"></div><div id="barBC"></div></div>
+  </div>
+
+  <div id="footer"><div id="footerL"></div><div id="footerR"></div></div>
+</body>
+</html>
diff -Naru klamav-0.46_orig/src/about/wait.html klamav-0.46/src/about/wait.html
--- klamav-0.46_orig/src/about/wait.html	2009-02-28 19:27:27.000000000 +0900
+++ klamav-0.46/src/about/wait.html	2021-04-09 15:27:25.425406030 +0900
@@ -1,46 +1,51 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
-"http://www.w3.org/TR/REC-html40/loose.dtd"><HTML>
-<HEAD>
-<meta name="description" content="" />
-<meta name="author" content="Hans de Raad"/>
-<meta name="keywords" content="KlamAV, Anti-Virus, AV, Linux, KDE, ClamAV, Freshklam, GUI" />
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
-<link rel="shortcut icon" HREF="http://klamav.sf.net/favicon.ico" />
-<TITLE>KlamAV</TITLE>
-<STYLE>BODY {color: black; 
-	font-size: 10pt;
-	margin-left: 5%;
-	margin-right: 5%;
-	}
-.KANormal {
-	 font-size: 9pt;
-	 color: black;
-	 }
-.KASmall {
-	 font-size: 8pt;
-	 color: black;
-	 }
-A:LINK {
-	font-size: 9pt;	
-	color: black;
-	}
-
-A:VISITED {
-	font-size: 9pt;
-	color: black}
-
-A:HOVER {
-	font-size: 9pt;
-	font-weight: bold;
-	color: #FFFFFF;
-	background-color: #000000;
-	}	</STYLE>
-</HEAD>
-<BODY>
-<table><tr><td><img src=klam.png width=100 height=100></td><td><h2>KlamAV Virus Browser</H2></td></tr></table><table width=100% height=100%><tr><td class=KASmall align=left valign=top width=25% height=100%><a href="http://klamav.sourceforge.net/index.php?content=ka_home"><b>Home</b></a><br><a href="http://klamav.sourceforge.net/index.php?content=ka_news"><b>News</b></a><br><a href="https://sourceforge.net/project/showfiles.php?group_id=102171"><b>Download KlamAV</b></a><br><a href="https://sourceforge.net/project/showfiles.php?group_id=86638"><b>Download ClamAV</b></a><br><a href="http://klamav.sourceforge.net/index.php?content=ka_security_notes"><b>Security Notes</b></a><br><br><br><br><br><p class=KANormal></p><br><br><br><br><br><br></td><td class=KANormal align=left valign=top width=75% height=100%>
-<p class=KANormal>
-Please wait while the database loads...
-</p>
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
-</td></tr></table>
-</BODY></HTML>
\ ファイル末尾に改行がありません
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <meta name="generator" content=
+  "HTML Tidy for Linux/x86 (vers 1st August 2004), see www.w3.org" />
+
+  <style type="text/css">
+  /*<![CDATA[*/
+    @import "%1"; /* klamav.css */
+    @import "%1"; /* kde_infopage.css */
+    %1 /* maybe @import "kde_infopage_rtl.css"; */
+  /*]]>*/
+  </style>
+
+  <title>%1</title>
+</head>
+
+<body>
+  <div id="header">
+    <div id="headerL"></div>
+    <div id="headerCenter"></div>
+    <div id="headerR"></div>
+
+    <div id="title">
+      %1 <!-- Virus Browser-->
+    </div>
+
+    <div id="tagline">
+      %1 <!-- version number -->
+    </div>
+  </div>
+
+  <!-- the bar -->
+  <div id="bar">
+   <div id="barT"><div id="barTL"></div><div id="barTR"></div><div id="barTC"></div></div>
+    <div id="barL">
+      <div id="barR">
+        <div id="barCenter" class="bar_text">
+	  %1 <!-- Please wait while the database loads... -->
+        </div>
+      </div>
+    </div>
+    <div id="barB"><div id="barBL"></div><div id="barBR"></div><div id="barBC"></div></div>
+  </div>
+
+  <div id="footer"><div id="footerL"></div><div id="footerR"></div></div>
+</body>
+</html>
diff -Naru klamav-0.46_orig/src/activityviewer.cpp klamav-0.46/src/activityviewer.cpp
--- klamav-0.46_orig/src/activityviewer.cpp	2009-02-28 19:27:27.000000000 +0900
+++ klamav-0.46/src/activityviewer.cpp	2021-04-09 15:27:25.425406030 +0900
@@ -201,10 +201,10 @@
 				eventdate = *it;
 				i++;
 			}else if (i==1){
-				eventtype = *it;
+				eventtype = i18n((*it).ascii());
 				i++;
 			}else if (i==2){
-				event = *it;
+				event = i18n((*it).ascii());
 				i++;
 			}else if (i==3){
 				file = *it;
diff -Naru klamav-0.46_orig/src/archivelimits.ui klamav-0.46/src/archivelimits.ui
--- klamav-0.46_orig/src/archivelimits.ui	2021-04-09 14:26:15.068002606 +0900
+++ klamav-0.46/src/archivelimits.ui	1970-01-01 09:00:00.000000000 +0900
@@ -1,233 +0,0 @@
-<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
-<class>ArchiveLimits</class>
-<widget class="QWidget">
-    <property name="name">
-        <cstring>ArchiveLimits</cstring>
-    </property>
-    <property name="geometry">
-        <rect>
-            <x>0</x>
-            <y>0</y>
-            <width>474</width>
-            <height>377</height>
-        </rect>
-    </property>
-    <property name="caption">
-        <string>Archive Limits</string>
-    </property>
-    <spacer>
-        <property name="name">
-            <cstring>spacer13</cstring>
-        </property>
-        <property name="orientation">
-            <enum>Vertical</enum>
-        </property>
-        <property name="sizeType">
-            <enum>Expanding</enum>
-        </property>
-        <property name="sizeHint">
-            <size>
-                <width>20</width>
-                <height>110</height>
-            </size>
-        </property>
-        <property name="geometry">
-            <rect>
-                <x>184</x>
-                <y>256</y>
-                <width>20</width>
-                <height>110</height>
-            </rect>
-        </property>
-    </spacer>
-    <widget class="QGroupBox">
-        <property name="name">
-            <cstring>LimitsGroup</cstring>
-        </property>
-        <property name="geometry">
-            <rect>
-                <x>10</x>
-                <y>10</y>
-                <width>430</width>
-                <height>230</height>
-            </rect>
-        </property>
-        <property name="title">
-            <string>Archive Limits</string>
-        </property>
-        <widget class="QLayoutWidget">
-            <property name="name">
-                <cstring>layout35</cstring>
-            </property>
-            <property name="geometry">
-                <rect>
-                    <x>11</x>
-                    <y>34</y>
-                    <width>400</width>
-                    <height>160</height>
-                </rect>
-            </property>
-            <grid>
-                <property name="name">
-                    <cstring>unnamed</cstring>
-                </property>
-                <widget class="QLayoutWidget" row="0" column="0">
-                    <property name="name">
-                        <cstring>layout34</cstring>
-                    </property>
-                    <grid>
-                        <property name="name">
-                            <cstring>unnamed</cstring>
-                        </property>
-                        <widget class="QLabel" row="0" column="0">
-                            <property name="name">
-                                <cstring>MaxFilesExt</cstring>
-                            </property>
-                            <property name="text">
-                                <string>Maximum Number of Files to Extract</string>
-                            </property>
-                        </widget>
-                        <spacer row="0" column="1">
-                            <property name="name">
-                                <cstring>spacer21</cstring>
-                            </property>
-                            <property name="orientation">
-                                <enum>Horizontal</enum>
-                            </property>
-                            <property name="sizeType">
-                                <enum>Expanding</enum>
-                            </property>
-                            <property name="sizeHint">
-                                <size>
-                                    <width>70</width>
-                                    <height>20</height>
-                                </size>
-                            </property>
-                        </spacer>
-                        <spacer row="2" column="1">
-                            <property name="name">
-                                <cstring>spacer21_3</cstring>
-                            </property>
-                            <property name="orientation">
-                                <enum>Horizontal</enum>
-                            </property>
-                            <property name="sizeType">
-                                <enum>Expanding</enum>
-                            </property>
-                            <property name="sizeHint">
-                                <size>
-                                    <width>70</width>
-                                    <height>20</height>
-                                </size>
-                            </property>
-                        </spacer>
-                        <spacer row="3" column="1">
-                            <property name="name">
-                                <cstring>spacer21_4</cstring>
-                            </property>
-                            <property name="orientation">
-                                <enum>Horizontal</enum>
-                            </property>
-                            <property name="sizeType">
-                                <enum>Expanding</enum>
-                            </property>
-                            <property name="sizeHint">
-                                <size>
-                                    <width>70</width>
-                                    <height>20</height>
-                                </size>
-                            </property>
-                        </spacer>
-                        <widget class="QLabel" row="2" column="0">
-                            <property name="name">
-                                <cstring>MaxLevRecur</cstring>
-                            </property>
-                            <property name="text">
-                                <string>Maximum Level of Recursion</string>
-                            </property>
-                        </widget>
-                        <widget class="QSpinBox" row="3" column="2">
-                            <property name="name">
-                                <cstring>kcfg_MaxScanSize</cstring>
-                            </property>
-                            <property name="specialValueText">
-                                <string>Default</string>
-                            </property>
-                            <property name="maxValue">
-                                <number>9999</number>
-                            </property>
-                        </widget>
-                        <widget class="QLabel" row="1" column="0">
-                            <property name="name">
-                                <cstring>MaxMBsEx</cstring>
-                            </property>
-                            <property name="text">
-                                <string>Maximum MBs to Extract</string>
-                            </property>
-                        </widget>
-                        <spacer row="1" column="1">
-                            <property name="name">
-                                <cstring>spacer21_2</cstring>
-                            </property>
-                            <property name="orientation">
-                                <enum>Horizontal</enum>
-                            </property>
-                            <property name="sizeType">
-                                <enum>Expanding</enum>
-                            </property>
-                            <property name="sizeHint">
-                                <size>
-                                    <width>70</width>
-                                    <height>20</height>
-                                </size>
-                            </property>
-                        </spacer>
-                        <widget class="QSpinBox" row="1" column="2">
-                            <property name="name">
-                                <cstring>kcfg_MaxFileSize</cstring>
-                            </property>
-                            <property name="specialValueText">
-                                <string>Default</string>
-                            </property>
-                            <property name="maxValue">
-                                <number>9999</number>
-                            </property>
-                        </widget>
-                        <widget class="QSpinBox" row="0" column="2">
-                            <property name="name">
-                                <cstring>kcfg_NoFilesToExtract</cstring>
-                            </property>
-                            <property name="specialValueText">
-                                <string>Default</string>
-                            </property>
-                            <property name="maxValue">
-                                <number>9999</number>
-                            </property>
-                        </widget>
-                        <widget class="QSpinBox" row="2" column="2">
-                            <property name="name">
-                                <cstring>kcfg_RecursionLevel</cstring>
-                            </property>
-                            <property name="specialValueText">
-                                <string>Default</string>
-                            </property>
-                            <property name="maxValue">
-                                <number>9999</number>
-                            </property>
-                        </widget>
-                        <widget class="QLabel" row="3" column="0">
-                            <property name="name">
-                                <cstring>MaxCompRatio</cstring>
-                            </property>
-                            <property name="text">
-                                <string>Maximum MBs of Files to Scan</string>
-                            </property>
-                        </widget>
-                    </grid>
-                </widget>
-            </grid>
-        </widget>
-    </widget>
-</widget>
-<layoutdefaults spacing="6" margin="11"/>
-</UI>
diff -Naru klamav-0.46_orig/src/archives.ui klamav-0.46/src/archives.ui
--- klamav-0.46_orig/src/archives.ui	1970-01-01 09:00:00.000000000 +0900
+++ klamav-0.46/src/archives.ui	2021-04-09 15:27:25.425406030 +0900
@@ -0,0 +1,156 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>ArchiveOptions</class>
+<widget class="QWidget">
+    <property name="name">
+        <cstring>ArchiveOptions</cstring>
+    </property>
+    <property name="geometry">
+        <rect>
+            <x>0</x>
+            <y>0</y>
+            <width>436</width>
+            <height>282</height>
+    </rect>
+    </property>
+    <property name="caption">
+        <string>Archive Options</string>
+    </property>
+    <vbox>
+    <property name="name">
+            <cstring>unnamed</cstring>
+    </property>
+        <widget class="QGroupBox">
+	    <property name="name">
+                <cstring>groupBox4</cstring>
+            </property>
+            <property name="title">
+                <string>Archive Scanning</string>
+            </property>
+            <vbox>
+                <property name="name">
+                    <cstring>unnamed</cstring>
+                </property>
+                <widget class="QCheckBox">
+                    <property name="name">
+                        <cstring>kcfg_scanArchives</cstring>
+                    </property>
+                    <property name="text">
+                        <string>Scan archives</string>
+                    </property>
+                </widget>
+            </vbox>
+        </widget>
+        <widget class="QGroupBox">
+            <property name="name">
+		    <cstring>LimitsGroup</cstring>
+            </property>
+            <property name="sizePolicy">
+                <sizepolicy>
+                    <hsizetype>7</hsizetype>
+                    <vsizetype>7</vsizetype>
+                    <horstretch>1</horstretch>
+                    <verstretch>1</verstretch>
+                </sizepolicy>
+	    </property>
+            <property name="frameShape">
+                <enum>NoFrame</enum>
+	    </property>
+            <property name="title">
+                <string>Archive Limits</string>
+            </property>
+            <vbox>
+		    <property name="name">
+                    <cstring>unnamed</cstring>
+                </property>
+                <widget class="QLayoutWidget">
+    			<property name="name">
+                        <cstring>layout11</cstring>
+    			</property>
+                    <grid>
+                        <property name="name">
+                            <cstring>unnamed</cstring>
+                        </property>
+                        <widget class="QLabel" row="2" column="0">
+    				<property name="name">
+                                <cstring>MaxLevRecur</cstring>
+    				</property>
+                            <property name="text">
+                                <string>Maximum Level of Recursion</string>
+			    </property>
+                        </widget>
+                        <widget class="QLabel" row="3" column="0">
+    				<property name="name">
+                                <cstring>MaxCompRatio</cstring>
+    				</property>
+                            <property name="text">
+                                <string>Maximum MBs of Files to Scan</string>
+			    </property>
+                        </widget>
+                        <widget class="QSpinBox" row="2" column="1">
+    				<property name="name">
+                                <cstring>kcfg_RecursionLevel</cstring>
+    				</property>
+                            <property name="specialValueText">
+                                <string>Default</string>
+                            </property>
+                            <property name="maxValue">
+                                <number>9999</number>
+                            </property>
+		    	</widget>
+                        <widget class="QLabel" row="0" column="0">
+                             <property name="name">
+                                <cstring>MaxFilesExt</cstring>
+ 			     </property>
+                            <property name="text">
+                                <string>Maximum Number of Files to Extract</string>
+			    </property>
+                        </widget>
+                        <widget class="QSpinBox" row="3" column="1">
+    				<property name="name">
+                                <cstring>kcfg_MaxScanSize</cstring>
+    				</property>
+                            <property name="specialValueText">
+                                <string>Default</string>
+                            </property>
+                            <property name="maxValue">
+                                <number>9999</number>
+                            </property>
+                        </widget>
+                        <widget class="QSpinBox" row="0" column="1">
+    				<property name="name">
+                                <cstring>kcfg_NoFilesToExtract</cstring>
+                            </property>
+                            <property name="specialValueText">
+                                <string>Default</string>
+                            </property>
+                            <property name="maxValue">
+                                <number>9999</number>
+                            </property>
+                        </widget>
+                        <widget class="QLabel" row="1" column="0">
+    				<property name="name">
+                                <cstring>MaxMBsEx</cstring>
+                            </property>
+                            <property name="text">
+                                <string>Maximum MBs to Extract</string>
+                            </property>
+                        </widget>
+                        <widget class="QSpinBox" row="1" column="1">
+                            <property name="name">
+                                <cstring>kcfg_MaxFileSize</cstring>
+				</property>
+                            <property name="specialValueText">
+                                <string>Default</string>
+                            </property>
+                            <property name="maxValue">
+                                <number>9999</number>
+                            </property>
+                        </widget>
+                    </grid>
+                </widget>
+            </vbox>
+	</widget>
+    </vbox>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff -Naru klamav-0.46_orig/src/archivetypes.ui klamav-0.46/src/archivetypes.ui
--- klamav-0.46_orig/src/archivetypes.ui	2021-04-09 14:26:16.924020822 +0900
+++ klamav-0.46/src/archivetypes.ui	2021-04-09 15:27:25.425406030 +0900
@@ -1,3 +1,4 @@
+DISABLED
 <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
 <class>ArchiveTypes</class>
 <widget class="QWidget">
diff -Naru klamav-0.46_orig/src/autoscanoptions.ui klamav-0.46/src/autoscanoptions.ui
--- klamav-0.46_orig/src/autoscanoptions.ui	2021-04-09 14:26:15.068002606 +0900
+++ klamav-0.46/src/autoscanoptions.ui	2021-04-09 15:27:25.425406030 +0900
@@ -1,3 +1,4 @@
+DISABLED
 <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
 <class>AutoScanOptions</class>
 <widget class="QWidget">
@@ -8,169 +9,88 @@
         <rect>
             <x>0</x>
             <y>0</y>
-            <width>529</width>
-            <height>386</height>
-        </rect>
+            <width>538</width>
+            <height>341</height>
+    </rect>
     </property>
     <property name="caption">
         <string>Options for On-Access Scanning</string>
     </property>
-    <spacer>
-        <property name="name">
-            <cstring>spacer13</cstring>
-        </property>
-        <property name="orientation">
-            <enum>Vertical</enum>
-        </property>
-        <property name="sizeType">
-            <enum>Expanding</enum>
-        </property>
-        <property name="sizeHint">
-            <size>
-                <width>20</width>
-                <height>159</height>
-            </size>
-        </property>
-        <property name="geometry">
-            <rect>
-                <x>189</x>
-                <y>215</y>
-                <width>20</width>
-                <height>159</height>
-            </rect>
-        </property>
-    </spacer>
-    <widget class="QGroupBox">
-        <property name="name">
-            <cstring>LimitsGroup</cstring>
-        </property>
-        <property name="geometry">
-            <rect>
-                <x>10</x>
-                <y>10</y>
-                <width>460</width>
-                <height>180</height>
-            </rect>
-        </property>
-        <property name="title">
-            <string>Auto-Scan Options</string>
-        </property>
-        <spacer>
-            <property name="name">
-                <cstring>spacer13_3</cstring>
-            </property>
-            <property name="orientation">
-                <enum>Vertical</enum>
-            </property>
-            <property name="sizeType">
-                <enum>Expanding</enum>
-            </property>
-            <property name="sizeHint">
-                <size>
-                    <width>20</width>
-                    <height>16</height>
-                </size>
-            </property>
-            <property name="geometry">
-                <rect>
-                    <x>180</x>
-                    <y>10</y>
-                    <width>20</width>
-                    <height>16</height>
-                </rect>
-            </property>
-        </spacer>
-        <spacer>
-            <property name="name">
-                <cstring>spacer13_2</cstring>
-            </property>
-            <property name="orientation">
-                <enum>Vertical</enum>
-            </property>
-            <property name="sizeType">
-                <enum>Expanding</enum>
-            </property>
-            <property name="sizeHint">
-                <size>
-                    <width>20</width>
-                    <height>16</height>
-                </size>
-            </property>
-            <property name="geometry">
-                <rect>
-                    <x>140</x>
-                    <y>160</y>
-                    <width>20</width>
-                    <height>16</height>
-                </rect>
-            </property>
-        </spacer>
-        <widget class="QLayoutWidget">
-            <property name="name">
-                <cstring>layout4</cstring>
-            </property>
-            <property name="geometry">
-                <rect>
-                    <x>10</x>
-                    <y>25</y>
-                    <width>440</width>
-                    <height>130</height>
-                </rect>
-            </property>
+    <vbox>
+    	    <property name="name">
+            <cstring>unnamed</cstring>
+    	    </property>
+        <widget class="QGroupBox">
+		    <property name="name">
+                <cstring>LimitsGroup</cstring>
+		    </property>
+            <property name="title">
+                <string>Auto-Scan Options</string>
+		    </property>
             <vbox>
                 <property name="name">
                     <cstring>unnamed</cstring>
                 </property>
-                <widget class="QCheckBox">
-                    <property name="name">
-                        <cstring>kcfg_Executed</cstring>
-                    </property>
-                    <property name="text">
-                        <string>Scan Files When They are &amp;Executed</string>
-                    </property>
-                    <property name="accel">
-                        <string>Alt+E</string>
-                    </property>
-                </widget>
-                <widget class="QCheckBox">
-                    <property name="name">
-                        <cstring>kcfg_Created</cstring>
-                    </property>
-                    <property name="enabled">
-                        <bool>false</bool>
-                    </property>
-                    <property name="text">
-                        <string>Scan Files When The&amp;y are Created/Modified (Linux 2.4 Only)</string>
-                    </property>
-                    <property name="accel">
-                        <string>Alt+Y</string>
-                    </property>
-                </widget>
-                <widget class="QCheckBox">
-                    <property name="name">
-                        <cstring>kcfg_Opened</cstring>
-                    </property>
-                    <property name="text">
-                        <string>Scan &amp;Files When They are Opened</string>
-                    </property>
-                    <property name="accel">
-                        <string>Alt+F</string>
-                    </property>
-                </widget>
-                <widget class="QCheckBox">
-                    <property name="name">
-                        <cstring>kcfg_Closed</cstring>
-                    </property>
-                    <property name="text">
-                        <string>Scan Files &amp;When They are Closed</string>
-                    </property>
-                    <property name="accel">
-                        <string>Alt+W</string>
-                    </property>
-                </widget>
+                <widget class="QLayoutWidget">
+    			<property name="name">
+                        <cstring>layout4</cstring>
+    			</property>
+                    <vbox>
+                        <property name="name">
+                            <cstring>unnamed</cstring>
+                        </property>
+                        <widget class="QCheckBox">
+                            <property name="name">
+                                <cstring>kcfg_Executed</cstring>
+                            </property>
+                            <property name="text">
+                                <string>Scan Files When They are &amp;Executed</string>
+                            </property>
+                            <property name="accel">
+                                <string>Alt+E</string>
+                            </property>
+                        </widget>
+                        <widget class="QCheckBox">
+                            <property name="name">
+                                <cstring>kcfg_Created</cstring>
+                            </property>
+                            <property name="enabled">
+                                <bool>true</bool>
+                            </property>
+                            <property name="text">
+                                <string>Scan Files When The&amp;y are Created/Modified</string>
+                            </property>
+                            <property name="accel">
+                                <string>Alt+Y</string>
+                            </property>
+                        </widget>
+                        <widget class="QCheckBox">
+                            <property name="name">
+                                <cstring>kcfg_Opened</cstring>
+                            </property>
+                            <property name="text">
+                                <string>Scan &amp;Files When They are Opened</string>
+                            </property>
+                            <property name="accel">
+                                <string>Alt+F</string>
+                            </property>
+                        </widget>
+                        <widget class="QCheckBox">
+                            <property name="name">
+                                <cstring>kcfg_Closed</cstring>
+                            </property>
+                            <property name="text">
+                                <string>Scan Files &amp;When They are Closed</string>
+                            </property>
+                            <property name="accel">
+                                <string>Alt+W</string>
+                            </property>
+                        </widget>
+                    </vbox>
+		</widget>
             </vbox>
         </widget>
-    </widget>
+    </vbox>
 </widget>
 <connections>
     <connection>
diff -Naru klamav-0.46_orig/src/backend.ui klamav-0.46/src/backend.ui
--- klamav-0.46_orig/src/backend.ui	1970-01-01 09:00:00.000000000 +0900
+++ klamav-0.46/src/backend.ui	2021-04-09 15:27:25.425406030 +0900
@@ -0,0 +1,94 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>KlamBackend</class>
+<widget class="QWidget">
+    <property name="name">
+        <cstring>KlamBackend</cstring>
+    </property>
+    <property name="geometry">
+        <rect>
+            <x>0</x>
+            <y>0</y>
+            <width>600</width>
+            <height>480</height>
+        </rect>
+    </property>
+    <property name="caption">
+        <string>Scanning Backend</string>
+    </property>
+    <vbox>
+        <property name="name">
+            <cstring>unnamed</cstring>
+        </property>
+        <widget class="QButtonGroup">
+            <property name="name">
+                <cstring>backendConfig</cstring>
+            </property>
+            <property name="title">
+                <string>Scanning Backend</string>
+            </property>
+            <grid>
+                <property name="name">
+                    <cstring>unnamed</cstring>
+                </property>
+                <widget class="QRadioButton" row="0" column="0" rowspan="1" colspan="2">
+                    <property name="name">
+                        <cstring>kcfg_ScannerClamscan</cstring>
+                    </property>
+                    <property name="text">
+                        <string>Standalone scanner</string>
+                    </property>
+                    <property name="checked">
+                        <bool>false</bool>
+                    </property>
+                </widget>
+                <widget class="QCheckBox" row="1" column="1">
+                    <property name="name">
+                        <cstring>kcfg_ClamdMultiscan</cstring>
+                    </property>
+                    <property name="text">
+                        <string>Force Multiscan mode</string>
+                    </property>
+                    <property name="checked">
+                        <bool>true</bool>
+                    </property>
+                </widget>
+                <widget class="QRadioButton" row="1" column="0">
+                    <property name="name">
+                        <cstring>kcfg_ScannerClamdscan</cstring>
+                    </property>
+                    <property name="text">
+                        <string>ClamAV daemon</string>
+                    </property>
+                    <property name="checked">
+                        <bool>true</bool>
+                    </property>
+                </widget>
+            </grid>
+        </widget>
+        <widget class="KTextBrowser">
+            <property name="name">
+                <cstring>backendHelpMessage</cstring>
+            </property>
+            <property name="textFormat">
+                <enum>RichText</enum>
+            </property>
+            <property name="text">
+                <string>Here you can choose the backend you'd like to use with KlamAV.
+&lt;p&gt;&lt;b&gt;Standalone scanner&lt;/b&gt; uses the 'clamscan' command to perform a scan. This backend is configurable via KlamAV, but takes longer to start. This backend is also the easiest to set up, as it does not require running a system-wide daemon.&lt;/p&gt;
+&lt;p&gt;&lt;b&gt;ClamAV daemon&lt;/b&gt; uses the 'clamdscan' command to perform a scan. This backend depends on a running instance of the &lt;i&gt;clamd&lt;/i&gt; daemon and depends on the options of the daemon. This backend starts up faster and also makes use of the Multiscan feature.&lt;/p</string>
+            </property>
+        </widget>
+    </vbox>
+</widget>
+<slots>
+    <slot>slotToggleClamdcan(bool)</slot>
+</slots>
+<functions>
+    <function access="private" specifier="non virtual">init()</function>
+</functions>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+    <includehint>ktextbrowser.h</includehint>
+</includehints>
+</UI>
+
diff -Naru klamav-0.46_orig/src/configdialog.cpp klamav-0.46/src/configdialog.cpp
--- klamav-0.46_orig/src/configdialog.cpp	2021-04-09 14:26:15.068002606 +0900
+++ klamav-0.46/src/configdialog.cpp	2021-04-12 14:26:53.656239026 +0900
@@ -14,11 +14,11 @@
  ***************************************************************************/
 
 #include "configdialog.h"
-#include "archivelimits.h"
-#include "archivetypes.h"
+#include "backend.h"
+#include "archives.h"
 #include "specialfiletypes.h"
-#include "autoscanoptions.h"
 #include "logoptions.h"
+#include "sigtool.h"
 
 #include <qcombobox.h>
 #include <qgroupbox.h>
@@ -29,6 +29,7 @@
 #include <qobjectlist.h>
 #include <qpushbutton.h>
 #include <qradiobutton.h>
+#include <qcheckbox.h>
 #include <qspinbox.h>
 #include <qtextcodec.h>
 #include <qtooltip.h>
@@ -51,17 +52,20 @@
     setWFlags( WDestructiveClose );
 
     // IMPORTANT Don't simply change the page names, they are used as identifiers in other parts of the app.
-            m_archivelimits = new ArchiveLimits( 0, "Archive Limits" );
-            m_archivetypes = new ArchiveTypes( 0, "Archive Types" );
-            m_specialfiletypes = new SpecialFileTypes( 0, "File Types" );
-	    m_autoscanoptions = new AutoScanOptions( 0, "Auto-Scan" );
+            m_klambackend = new KlamBackend( 0, "Scanning Backend" );
+            m_archives = new ArchiveOptions( 0, "Archives" );
+	    m_emailprotection = new Sigtool ( 0, "E-mail protection" );
+	    m_specialfiletypes = new SpecialFileTypes( 0, "File Types" );
 	    m_logoptions = new LogOptions( 0, "Event Logging" );
 
     // add pages
-    addPage( m_archivelimits, i18n( "Archive Limits" ), "ark", i18n( "Configure Archive Limits" ) );
-    addPage( m_archivetypes,   i18n( "Archive Types" ), "tgz", i18n( "Configure Archive Types" ) );
+    addPage( m_klambackend, i18n( "Backend" ), "system-run", i18n( "Configure Scanning Backend" ) );
+    connect( m_klambackend->kcfg_ScannerClamdscan, SIGNAL(toggled(bool)), this, SLOT(slotToggleClamdscan(bool)) );
+    slotToggleClamdscan( m_klambackend->kcfg_ScannerClamdscan->isOn() ); // initial state
+
+    addPage( m_archives, i18n( "Archives" ), "ark", i18n( "Configure Archive Scanning" ) );
+    addPage( m_emailprotection, i18n( "E-mail protection" ), "email", i18n( "Set up your e-mail client to use Klammail" ) );
     addPage( m_specialfiletypes, i18n( "File Types" ), "folder", i18n( "Configure File Types" ) );
-    //addPage( m_autoscanoptions, i18n( "Auto-Scan" ), "filefind", i18n( "Configure Auto-Scan" ) );
     addPage( m_logoptions, i18n( "Event Logging" ), "kate", i18n( "Configure Events to Log" ) );
 
     QObjectList *list = queryList( "QLabel", "infoPixmap" );
@@ -82,8 +86,13 @@
 {
 }
 
-
-
+void KlamavConfigDialog::slotToggleClamdscan(bool on)
+{
+        m_klambackend->kcfg_ClamdMultiscan->setEnabled(on);
+        m_archives->setEnabled(!on);
+        m_specialfiletypes->setEnabled(!on);
+}
+		 
 /** Show page by object name */
 void KlamavConfigDialog::showPage( const QCString& page )
 {
diff -Naru klamav-0.46_orig/src/configdialog.h klamav-0.46/src/configdialog.h
--- klamav-0.46_orig/src/configdialog.h	2009-02-28 19:27:27.000000000 +0900
+++ klamav-0.46/src/configdialog.h	2021-04-12 14:27:13.840294428 +0900
@@ -40,14 +40,16 @@
 
         void showPage( const QCString& page );
 
-
+    public slots:
+        void slotToggleClamdscan( bool on );
+ 
     private:
-
-
-        class ArchiveLimits  *m_archivelimits;
-        class ArchiveTypes  *m_archivetypes;
+        bool clamdscan;
+ 
+	class KlamBackend *m_klambackend;
+	class ArchiveOptions  *m_archives;
         class SpecialFileTypes     *m_specialfiletypes;
-	class AutoScanOptions     *m_autoscanoptions;
+	class Sigtool	*m_emailprotection;
 	class LogOptions     *m_logoptions;
 
         QValueList<QWidget*> m_pageList;
diff -Naru klamav-0.46_orig/src/dbviewer.cpp klamav-0.46/src/dbviewer.cpp
--- klamav-0.46_orig/src/dbviewer.cpp	2021-04-09 14:26:15.072002645 +0900
+++ klamav-0.46/src/dbviewer.cpp	2021-04-12 15:34:33.874520797 +0900
@@ -12,11 +12,13 @@
 #include "pageviewer.h"
 #include "tabwidget.h"
 #include "freshklam.h"
+#include "version.h"
 #include "../config.h"
 
 #include <qheader.h>
 #include <qlayout.h>
 #include <qpopupmenu.h>
+#include <qstringlist.h>
 
 #include <ktoolbarbutton.h> //ctor
 #include <ktempfile.h>
@@ -32,6 +34,8 @@
 #include <kstandarddirs.h>
 #include <kiconloader.h>
 
+#include <kurl.h>
+
 #define TAR_BLOCKSIZE 512
 #define FILEBUFF 8192
 
@@ -65,8 +69,8 @@
     dblayout = new QGridLayout( privateLayoutWidget, 1, 1, 2, 2, "dblayout"); 
     dblayout->setColStretch(1, 1);
 
-    tabBrowser = new TabWidget(privateLayoutWidget);
-
+    tabBrowser = new TabWidget(privateLayoutWidget, "KlamDB", QStringList("Home"));
+ 
     
     dblayout->addMultiCellWidget( tabBrowser, 0, 1, 1, 1 );
         
@@ -87,16 +91,9 @@
     menu = new QPopupMenu( VirusList );
 
     QPixmap gicon;
-    QPixmap vicon;
     QPixmap ticon;
 
-    QString iconPath = locate("cache", KMimeType::favIconForURL("http://www.viruspool.net")+".png");
-    if ( iconPath.isEmpty() )
-      vicon = SmallIcon("find");
-    else
-      vicon = QPixmap( iconPath );
-
-    iconPath = locate("cache", KMimeType::favIconForURL("http://www.google.com")+".png");
+    QString iconPath = locate("cache", KMimeType::favIconForURL("http://www.google.com")+".png");
     if ( iconPath.isEmpty() )
       gicon = SmallIcon("find");
     else
@@ -108,11 +105,12 @@
     else
       ticon = QPixmap( iconPath );
 
-    menu->insertItem(vicon, i18n("Search in VirusList"), this,SLOT(slotVirusList()) );
-    menu->insertItem(vicon, i18n("Search in VirusPool"), this,SLOT(slotVirusPool()) );
     menu->insertItem(ticon, i18n("Search with Trend Micro"), this,SLOT(slotTrendMicro()) );
     menu->insertItem(gicon, i18n("Search with Google"), this,SLOT(slotGoogle()) );
 
+    googlePrefix = QString::fromAscii("http://www.google.com/search?ie=ISO-8859-1&q=");
+    tMicroPrefix = QString::fromAscii("https://www.trendmicro.com/vinfo/us/threat-encyclopedia/search/");
+
     connect(VirusList, SIGNAL( contextMenuRequested( QListViewItem *, const QPoint& , int ) ), 
     this, SLOT( slotRMB( QListViewItem *, const QPoint &, int ) ) );
 
@@ -149,7 +147,7 @@
  */
 void KlamDB::languageChange()
 {
-    setCaption( i18n( "Form1" ) );
+    setCaption("Form1");
     tabBrowser->changeTab( tab, i18n( "Info" ) );
     VirusList->header()->setLabel( 0, i18n( "All Known Viruses" ) );
     VirusList->clear();
@@ -216,8 +214,8 @@
 
     KTempFile* tn = new KTempFile(tf->name());
     
-    if((tmpd = fopen(tn->name(), "wb+")) == NULL) {
-        printf("!listdb(): Can't create temporary file \n");
+    if((tmpd = fopen(tn->name().ascii(), "wb+")) == NULL) {
+	printf("!listdb(): Can't create temporary file \n");
         delete tf;
         delete tn;
         free(buffer);
@@ -234,10 +232,10 @@
     fflush(tmpd);
     fseek(tmpd, 0L, SEEK_SET);
 
-    if(cli_untgz(fileno(tmpd), tf->name())) {
-        printf("!listdb(): Can't unpack CVD file.\n");
-        cli_rmdirs(tf->name());
-        delete tf;
+    if(cli_untgz(fileno(tmpd), tf->name().ascii())) {
+	printf("!listdb(): Can't unpack CVD file.\n");
+        cli_rmdirs(tf->name().ascii());
+	delete tf;
         delete tn;
         fclose(tmpd);
         free(buffer);
@@ -249,9 +247,9 @@
     /* wrapper end */
 
     /* list extracted directory */
-    listdir(tf->name());
-
-    cli_rmdirs(tf->name());
+    listdir(tf->name().ascii());
+ 
+    cli_rmdirs(tf->name().ascii());
     delete tf;
     
     return 0;
@@ -695,25 +693,63 @@
 {
 
     static struct cl_stat *dbstat=NULL;
-    QString location;
-
+    QString location, res;
+ 
     if ((current == this) && (!(loadinprogress))){
         QString db = kmain->freshklam->getCurrentDBDir();
     
-        if (checkdir((const char *)db) == -1){
-            kdDebug() << "returned -1" << endl;
+        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 ")+QString(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;
         }
 
 
         if ( ((cl_statchkdir(dbstat) == 1) || (dbstat == NULL))) {
             location = locate("data", "klamav/about/wait.html");
-            homepage->openURL(location);
+            res = homepage->loadFile(location);
 
-                        loadinprogress = true;
+	    /* 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 ")+QString(KLAMAV_VERSION) )
+		.arg( i18n("Please wait while the database loads...") );
+
+	    homepage->begin();
+	    homepage->write(res);
+	    homepage->end();
+
+            loadinprogress = true;
+ 
             sigs = ( int )getSigNos();
             progress = new KProgressDialog (this, "progress", i18n( "Loading .." ), i18n( "Loading..." ), true);
             progress->setAllowCancel(false);
@@ -734,8 +770,8 @@
 
 //             QString db = kmain->freshklam->getCurrentDBDir();
 
-            listdir((const char *)db);
-
+            listdir(db.ascii());
+ 
         
             prog->setProgress (sigs);
             
@@ -749,18 +785,36 @@
             
             memset(dbstat, 0, sizeof(struct cl_stat));
 
-            cl_statinidir((const char *)db, dbstat);
-            
+            cl_statinidir(db.ascii(), dbstat);
+             
           
             loadinprogress = false;
-            // Default english
-            QString location = locate( "data", "klamav/about/main-" + KGlobal::locale()->language() + ".html" );
-            if( location != QString::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 ")+QString(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();
+	}
     }
 }
 
@@ -797,21 +851,15 @@
     lastDownloadPaths = config->readListEntry("lastDownloadPaths");
     dbdir = lastDownloadPaths.first();
 
-#ifdef SUPPORT_CLAMAV_V095
       if((engine = cl_engine_new()) == NULL) {
           printf("Database initialization error: %s\n", cl_strerror(ret));;
           cl_engine_free(engine);
           return 0;
       }
-#endif
 
-#ifdef SUPPORT_CLAMAV_V095
-    ret = cl_load((const char *)dbdir, engine, &no, CL_DB_STDOPT);
+    ret = cl_load(dbdir.ascii(), engine, &no, CL_DB_STDOPT);
     cl_engine_free(engine);
-#else
-    ret = cl_load((const char *)dbdir, &engine, &no, CL_DB_STDOPT);
-    cl_free(engine);
-#endif
+
     kdDebug() << "no of sigs" << no << endl;
     return no;
 
@@ -924,34 +972,17 @@
     page->openURL(prefix+url);
 }
 
-void KlamDB::slotVirusPool()
-{
-    QString url = VirusList->selectedItem()->text(0);
-    QString prefix = QString("http://www.viruspool.net/virus.cms?&name=");
-    slotOpenPrefix(prefix,"VirusPool",url);
-}
-
-void KlamDB::slotVirusList()
-{
-    QString url = VirusList->selectedItem()->text(0);
-    QString prefix = QString("http://www.viruslist.com/en/find?search_mode=virus&words=");
-    slotOpenPrefix(prefix,"VirusList",url);
-}
-
 void KlamDB::slotGoogle()
 {
-
-    QString url = VirusList->selectedItem()->text(0);
-    QString prefix = QString("http://www.google.com/search?ie=ISO-8859-1&q=");
-    slotOpenPrefix(prefix,"Google",url);
+    QString url = KURL::encode_string( VirusList->selectedItem()->text(0) );
+    slotOpenPrefix(googlePrefix,"Google",url);
 }
 
 void KlamDB::slotTrendMicro()
 {
 
-    QString url = VirusList->selectedItem()->text(0);
-    QString prefix = QString("http://www.trendmicro.com/vinfo/virusencyclo/default2.asp?m=q&virus=");
-    slotOpenPrefix(prefix,"TrendMicro",url);
+    QString url = KURL::encode_string( VirusList->selectedItem()->text(0) );
+    slotOpenPrefix(tMicroPrefix,"TrendMicro",url);
 }
 
 void KlamDB::slotExternal(QString name,QString service)
@@ -959,14 +990,10 @@
     kmain->showVirusBrowser();
     shouldIShow(this);
     QString prefix;
-    if (service == "VirusPool")
-        prefix = QString("http://www.viruspool.net/virus.cms?&name=");
-    else if (service == "Google")
-        prefix = QString("http://www.google.com/search?ie=ISO-8859-1&q=");
-        else if (service == "VirusList")
-                prefix = QString("http://www.viruslist.com/en/find?search_mode=virus&words=");
+    if (service == "Google")
+        prefix = googlePrefix;
     else
-        prefix = QString("http://www.trendmicro.com/vinfo/virusencyclo/default2.asp?m=q&virus=");
+        prefix = tMicroPrefix;
     slotOpenPrefix(prefix,service,name);
 }
 
diff -Naru klamav-0.46_orig/src/dbviewer.h klamav-0.46/src/dbviewer.h
--- klamav-0.46_orig/src/dbviewer.h	2009-02-28 19:27:27.000000000 +0900
+++ klamav-0.46/src/dbviewer.h	2021-04-12 13:46:42.969407595 +0900
@@ -75,14 +75,14 @@
 	void slotOpenPrefix(QString prefix, QString title,QString url);
 	KlamAV::PageViewer* homepage;
         bool loadinprogress;
+        QString googlePrefix;
+        QString tMicroPrefix;
 protected slots:
     virtual void languageChange();
     void slotOpenTab(QListViewItem * item , const QPoint &point, int num );
     void slotOpenTabPlain(const KURL& url, bool background = false);
     void slotTabCaption(const QString &capt);
     void slotRMB( QListViewItem* Item, const QPoint & point, int num);
-	void slotVirusPool();
-	void slotVirusList();
 	void slotGoogle();
 	void slotTrendMicro();
 
diff -Naru klamav-0.46_orig/src/directorylist.cpp klamav-0.46/src/directorylist.cpp
--- klamav-0.46_orig/src/directorylist.cpp	2021-04-09 14:26:15.072002645 +0900
+++ klamav-0.46/src/directorylist.cpp	2021-04-09 15:27:25.425406030 +0900
@@ -20,6 +20,9 @@
 #include <qtooltip.h>
 #include <qdir.h>
 
+#include <kconfig.h>
+#include <kglobal.h>
+#include <kmessagebox.h>
 #include <kfileitem.h>
 #include <klocale.h>
 #include <kdebug.h>
@@ -29,7 +32,6 @@
 #include <kapplication.h>
 #include <dcopref.h>
 #include <dcopclient.h>
-#include <kautomount.h>
 
 #include "directorylist.h"
 
@@ -39,11 +41,13 @@
 CollectionSetup* CollectionSetup::s_instance;
 
 
-CollectionSetup::CollectionSetup( QWidget *parent, bool recursive )
-    : QVBox( parent )
+CollectionSetup::CollectionSetup( QWidget *parent, bool recursive, bool fullMode, QStringList dirs )
+    	: QVBox( parent )
 {
     s_instance = this;
 
+    m_dirs = dirs;
+
 //     (new QLabel( i18n(
 //         "Select the folder(s) to scan. "), this ))->setAlignment( Qt::WordBreak );
 
@@ -68,8 +72,8 @@
     reinterpret_cast<QWidget*>(m_view->header())->hide();
     new Item(  m_view, i18n( "System Folder" ), "/", "folder_red" );
     new Item(  m_view, i18n( "Home Folder" ), QDir::homeDirPath(), "folder_home" );
-//    new DeviceItem(  m_view ); //
-    
+    if( fullMode ) new DeviceItem( m_view );
+ 
     setSpacing( 6 );
 }
 
@@ -432,6 +436,21 @@
    QCheckListItem::paintCell( p, isDisabled() ? listView()->palette().disabled() : _cg, column, width, align );
 }
 
+QString DeviceItem::getMountPoint( const QString & device )
+{
+	DCOPRef mediamanager("kded", "mediamanager");
+	DCOPReply reply = mediamanager.call( "properties", device );
+
+	QStringList properties;
+	reply.get( properties, "QStringList" );
+
+	QString mountpoint = * (properties.at(7) );
+
+	return mountpoint;
+
+}
+
+
 void
 DeviceItem::mountDevice( const QString & device)
 {
@@ -439,36 +458,86 @@
     if (!kapp->dcopClient()->isAttached())
         kapp->dcopClient()->attach();
 
+	QString mountpoint;
+	mountpoint = getMountPoint(device);
 
-	//Set Up our DCOP Calls
+	if( mountpoint != QString::null ) // already mounted
+		return;
 
-    QStringList retVal;
-    QCString mediacall="mediamanager";
-    QCString devicecall="properties";
-    if ( KDE::versionMajor() == 3 && KDE::versionMinor() < 4 )
-    {
-       mediacall="mountwatcher";
-       devicecall="basicDeviceInfo";
-    }
-    
-	
-	//Mount any devices that are not already mounted
+	DCOPRef mediamanager("kded", "mediamanager");
+	DCOPReply reply = mediamanager.call( "mountByNode", device );
 
-	DCOPRef mediamanager("kded", mediacall);
-	DCOPReply reply = mediamanager.call( devicecall, device );
+	bool success;
+	reply.get( success, "bool" );
 
-	if ( !reply.isValid() )
-	{
-		////kdDebug() << "not valid" << endl;
+	mountpoint = getMountPoint(device);
+
+	if(! success || mountpoint == QString::null ) {
+		KMessageBox::sorry( 0, i18n("Cannot mount device '%1'. Please check that you have the permissions needed to mount the device, as well as the needed kernel modules loaded.").arg(device) );
 	}
-	retVal = reply;
-	////kdDebug() << retVal << endl;
-	////kdDebug() << retVal[1] << endl;
-	////kdDebug() << retVal[10] << endl;
-	if (!(retVal[10].contains("_mounted")))
-		new KAutoMount( true, "", retVal[5], "","", false );
 }
 
+QStringList CollectionSetup::pruneSelectedDirs( QStringList listOfUrls ){
+    // This gets rid of redundant sub-directories
+    // from the list of dirs to be scanned.
+
+    QStringList filepattern;
+
+    listOfUrls.sort();
+
+    QString prev;
+    QStringList prevdirs;
+    struct stat sb;
+	 
+    for (QStringList::Iterator it = listOfUrls.begin(); it != listOfUrls.end(); it++ ){
+        //kdDebug() << "dir: " << (*it) << endl;
+        (*it) = (*it).stripWhiteSpace();
+
+        // replace block devices with mountpoints
+        lstat( (*it).ascii(), &sb );
+        if ( (sb.st_mode & S_IFMT) == S_IFBLK ) {
+            // This is actually from directorylist.cpp
+            DCOPRef mediamanager("kded", "mediamanager");
+            DCOPReply reply = mediamanager.call( "properties", (*it) );
+
+            QStringList properties;
+            reply.get( properties, "QStringList" );
+
+            (*it) = * (properties.at(7) );
+        } else {
+                (*it) = (*it) + "/";
+        }
+
+        if (prevdirs.isEmpty()){
+            //kdDebug() << (*it) << endl;
+            filepattern.append(*it);
+            prevdirs.append((*it));
+        }else{
+            filepattern.append(*it);
+            bool shouldappend = true;
+            for (QStringList::Iterator it2 = prevdirs.begin(); it2 != prevdirs.end(); it2++ ){
+                if ((*it).contains(*it2)){
+                    //kdDebug() << (*it) << endl;
+                    filepattern.remove((*it));
+                    shouldappend = false;
+                    break;
+                }
+            }
 
+            if (shouldappend)
+                prevdirs.append((*it));
+        }
+    }
+
+    return filepattern;
+}
+
+void CollectionSetup::writeConfig( const char* optGroup, const char* optName )
+{
+    KConfig *config = KGlobal::config();
+    config->setGroup( optGroup );
+    config->writeEntry( optName, dirs() );
+    config->sync();
+}
 
 #include "directorylist.moc"
diff -Naru klamav-0.46_orig/src/directorylist.h klamav-0.46/src/directorylist.h
--- klamav-0.46_orig/src/directorylist.h	2009-02-28 19:27:27.000000000 +0900
+++ klamav-0.46/src/directorylist.h	2021-04-09 15:27:25.425406030 +0900
@@ -22,6 +22,7 @@
 #include <qcheckbox.h>  //inlined functions
 #include <qlistview.h>  //baseclass
 #include <qvbox.h>      //baseclass
+#include <qstringlist.h>
 
 #include <kdirlister.h> //stack allocated
 #include <kurl.h>       //stack allocated
@@ -38,8 +39,8 @@
 public:
     static CollectionSetup* instance() { return s_instance; }
 
-    CollectionSetup( QWidget* ,bool );
-
+    CollectionSetup( QWidget *parent, bool recursive, bool fullMode = true, QStringList dirs = QStringList() );
+ 
     QStringList dirs() const { return m_dirs; }
     bool recursive() const { return m_recursive; }
 //     bool monitor() const { return m_monitor->isChecked(); }
@@ -47,6 +48,9 @@
     QStringList m_dirs;
     QMap<QString,int> m_refcount;
 
+    static QStringList pruneSelectedDirs( QStringList listOfUrls = 0 );
+    void writeConfig( const char* optGroup, const char* optName );
+ 
 signals:
     void dirsSelected(QStringList& dirs);
 
@@ -108,11 +112,12 @@
       void stateChange( bool ); // reimpl.
       void activate(); // reimpl.
       void paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int align ); // reimpl.
+      QString getMountPoint(const QString & device);
    public slots:
       void newItems( const KFileItemList& );
       void completed() { if( childCount() == 0 ) { setExpandable( false ); repaint(); } }
    private:
-	  void mountDevice(const QString & device);
+      void mountDevice(const QString & device);
       KDirLister m_lister;
       KURL       m_url;
       bool       m_listed;
diff -Naru klamav-0.46_orig/src/eventsrc klamav-0.46/src/eventsrc
--- klamav-0.46_orig/src/eventsrc	2009-02-28 19:27:27.000000000 +0900
+++ klamav-0.46/src/eventsrc	2021-04-09 15:27:25.429406013 +0900
@@ -44,9 +44,3 @@
 default_presentation=16
 # None = 0, Sound = 1, Messagebox = 2, Logfile = 4, Stderr = 8, PassivePopup = 16, Execute = 32
 
-[CantRegister]
-Name=CantRegister
-Comment=Can't register with Dazuko! Check the permissions on file /dev/dazuko.
-default_sound=k3b_success1.wav
-default_presentation=16
-# None = 0, Sound = 1, Messagebox = 2, Logfile = 4, Stderr = 8, PassivePopup = 16, Execute = 32
diff -Naru klamav-0.46_orig/src/firstrunwizard.ui klamav-0.46/src/firstrunwizard.ui
--- klamav-0.46_orig/src/firstrunwizard.ui	2021-04-09 14:26:16.924020822 +0900
+++ klamav-0.46/src/firstrunwizard.ui	2021-04-09 15:27:25.429406013 +0900
@@ -37,7 +37,7 @@
 &lt;h2&gt;What is ClamAV?&lt;/h2&gt;
 &lt;p&gt;ClamAV is signature-based virus and malware detection software with a world-class updates infrastructure and a rapid development cycle.&lt;/p&gt;
 &lt;h2&gt;What is KlamAV?&lt;/h2&gt;
-&lt;p&gt;KlamAV is an anti-virus manager for the KDE desktop that allows you to manage your virus-scanning, scheduling, virus research and software/database updates. In other words, it's a front-end.&lt;/p&gt;
+&lt;p&gt;KlamAV is an anti-virus manager for KDE desktop that allows you to manage your virus-scanning, scheduling, virus research and database updates. In other words, it's a front-end.&lt;/p&gt;
 &lt;p&gt;
 &lt;p&gt;This wizard will help you setup KlamAV in one simple step. Click &lt;i&gt;Next&lt;/i&gt; to begin, or if you do not like wizards, click &lt;i&gt;Skip&lt;/i&gt;.&lt;/p&gt;
 
diff -Naru klamav-0.46_orig/src/freshklam.cpp klamav-0.46/src/freshklam.cpp
--- klamav-0.46_orig/src/freshklam.cpp	2021-04-09 14:26:15.068002606 +0900
+++ klamav-0.46/src/freshklam.cpp	2021-04-12 16:17:12.189435511 +0900
@@ -5,7 +5,6 @@
 
 #include "freshklam.h"
 #include "klamav.h"
-#include "klamd.h"
 #include "collectiondb.h"
 /*#include "gmanedb.h"*/
 #include "klamavconfig.h"
@@ -32,7 +31,6 @@
 #include <kprogress.h>
 #include <kprocio.h>
 #include <knotifyclient.h>
-#include <dom/html_misc.h>
 #include <kapplication.h>
 #include <dcopclient.h>
 #include <kuser.h>
@@ -82,9 +80,6 @@
 
 //    MetaDB* updater = new MetaDB();
 //    updater->update();
-    updater = new KlamavUpdate(this);
-    connect( updater,   SIGNAL( getCurrentVersionOfClamAV() ), SLOT( getCurrentVersionOfClamAV() ) );
-    connect( updater,   SIGNAL( toggleUpgradeButtons(bool) ), SLOT( toggleUpgradeButtons(bool) ) );
 
 
 
@@ -356,18 +351,35 @@
         errorMessage = item2.mid(pos,pos2);
     }
 
-    if ((pos = item2.find("Database updated")) != -1){
-	   CollectionDB::instance()->insertEvent("Updates","Database Updated",dir_combo->url());
-        KNotifyClient::event(kmain->_tray->winId(),"UpdatedDatabase", "Virus Database Updated.");
+    // Notifications
+    // -> Database updated
+    if ((pos = item2.find("daily.cvd updated")) != -1 || (pos = item2.find("daily.cld updated")) != -1 ){
+	CollectionDB::instance()->insertEvent("Updates","Daily Database Updated",dir_combo->url());
+        KNotifyClient::event(kmain->_tray->winId(),"UpdatedDatabase", "Updated Daily DB (1 out of 3).");
         updateMailClient();
     }
 
-    if ((pos = item2.find("daily.cvd is up to date")) != -1){
-	   CollectionDB::instance()->insertEvent("Updates","Database Already Up To Date",dir_combo->url());
-        KNotifyClient::event(kmain->_tray->winId(),"DatabaseUpToDate", "Virus Database Up To Date.");
+    if ((pos = item2.find("main.cvd updated")) != -1 || (pos = item2.find("main.cld updated")) != -1 ){
+        KNotifyClient::event(kmain->_tray->winId(),"UpdatedDatabase", "Updated Main DB (2 out of 3).");
+    }
+
+    if ((pos = item2.find("bytecode.cvd updated")) != -1 || (pos = item2.find("bytecode.cld updated")) != -1 ){
+        KNotifyClient::event(kmain->_tray->winId(),"UpdatedDatabase", "Updated Bytecode DB (3 out of 3).");
+    }
+
+    // -> Database already up to date
+    if ((pos = item2.find("daily.cvd database is up to date")) != -1 || (pos = item2.find("daily.cld database is up to date")) != -1){
+        KNotifyClient::event(kmain->_tray->winId(),"DatabaseUpToDate", "Daily DB Up To Date (1 out of 3).");
         updateMailClient();
     }
 
+    if ((pos = item2.find("main.cvd database is up to date")) != -1 || (pos = item2.find("main.cld database is up to date")) != -1){
+        KNotifyClient::event(kmain->_tray->winId(),"DatabaseUpToDate", "Main DB Up To Date (2 out of 3).");
+    }
+
+    if ((pos = item2.find("bytecode.cvd database is up to date")) != -1 || (pos = item2.find("bytecode.cld database is up to date")) != -1){
+        KNotifyClient::event(kmain->_tray->winId(),"DatabaseUpToDate", "Bytecode DB Up To Date (3 out of 3).");
+    }
 
     if ((pos = item2.find("Recommended version:")) != -1){
 
@@ -386,7 +398,7 @@
 //                    updater->downloadComponent("clamav",version,"tar.gz");
 //            }
 //        }else if (!(clamav_box->isChecked()))
-//            KNotifyClient::event(kmain->_tray->winId(),"ClamAVOutDated", QString("Your copy of ClamAV is out of date! Please Upgrade to ClamAV %1!").arg(version));
+//            KNotifyClient::event(kmain->_tray->winId(),"ClamAVOutDated", QString(i18n("Your copy of ClamAV is out of date! Please Upgrade to ClamAV %1!")).arg(version));
     }
 
 
@@ -433,16 +445,6 @@
         freshklamAlive = TRUE;
     }
     
-    if (!(KApplication::kApplication()->isRestored())){
-
-        if (kmain->klamd->isKlamdAlive()){
-            QString klamdconf = kmain->klamd->getKlamdConfFile();
-            ////kdDebug() << klamdconf << endl;
-            command += " --daemon-notify=";
-            command += klamdconf;
-        }        
-    }
-        
     writeConf();
     command += " --config-file=";
     command += tempFileName;
@@ -461,11 +463,6 @@
     connect( childproc, SIGNAL(receivedStdout(KProcess *, char *, int)),
         SLOT(receivedOutput(KProcess *, char *, int)) );
     
-//     if (kmain->klamd->isKlamdAlive())
-//         kmain->_tray->setPixmap(KSystemTray::loadIcon("klamavdl"));    
-//     else
-//         kmain->_tray->setPixmap(KSystemTray::loadIcon("klamavbwdl"));    
-
     kmain->EnableFreshklam->setEnabled(FALSE);
     kmain->DisableFreshklam->setEnabled(TRUE);
 
@@ -473,15 +470,15 @@
 
 void Freshklam::finish()
 {
+    CollectionDB::instance()->insertEvent("Updates","Virus Database Updated",dir_combo->url());
+    KNotifyClient::event(kmain->_tray->winId(),"UpdatedDatabase", "Virus Database updated successfully.");
+
     search_button->setEnabled(true);
     cancel_button->setEnabled(false);
 
     enableInputs();
-    if (kmain->klamd->isKlamdAlive())
-        kmain->_tray->setPixmap(KSystemTray::loadIcon("klamav_on_acc_enabled"));    
-    else
-        kmain->_tray->setPixmap(KSystemTray::loadIcon("klamav_on_acc_disabled"));
-
+    kmain->_tray->setPixmap(KSystemTray::loadIcon("klamav_on_acc_disabled"));
+ 
     buf += '\n';
     processOutput();
     delete childproc;
@@ -852,11 +849,7 @@
 
     if (dbdir != dir_combo->url()){
         /* load all available databases from default directory */
-#ifdef SUPPORT_CLAMAV_V095
-        ret = cl_load((const char *)dir_combo->url(), engine, &no, CL_DB_STDOPT);
-#else
-        ret = cl_load((const char *)dir_combo->url(), &engine, &no, CL_DB_STDOPT);
-#endif
+        ret = cl_load(dir_combo->url().ascii(), engine, &no, CL_DB_STDOPT);
         //ret = cl_loaddbdir((const char *)dir_combo->url(), &root, &no);
         ////kdDebug() << "ret " << ret << endl;
         if (no == 0){
@@ -893,7 +886,7 @@
         if (!klamavqdir.exists() && !klamavqdir.mkdir(path))
             ok = false;
         else
-            chmod((const char *)path,0700);
+            chmod(path.ascii(),0700);
     }
 
     if (ok){
diff -Naru klamav-0.46_orig/src/freshklam.h klamav-0.46/src/freshklam.h
--- klamav-0.46_orig/src/freshklam.h	2021-04-09 14:26:15.064002567 +0900
+++ klamav-0.46/src/freshklam.h	2021-04-12 16:17:38.721506514 +0900
@@ -14,8 +14,6 @@
 #include <kdirlister.h> //stack allocated
 #include <kurl.h>       //stack allocated
 #include <kresolver.h> // namespace
-#include <khtml_part.h>
-#include "update.h"
 
 namespace DOM {
   class Node;
@@ -39,8 +37,6 @@
 class KLineEdit;
 class KProgressDialog;
 class KProcIO;
-class KHTMLPart;
-class KlamavUpdate;
 
 /**
  * This class serves as the main window for Freshklam.  It handles the
@@ -198,7 +194,6 @@
 //     KDirLister klamav_lister;
 //     KURL       klamav_url;
      KURL       m_url;
-    KlamavUpdate* updater;
 };
 
 #endif // _Freshklam_H_
diff -Naru klamav-0.46_orig/src/klamav.cpp klamav-0.46/src/klamav.cpp
--- klamav-0.46_orig/src/klamav.cpp	2021-04-09 14:26:15.068002606 +0900
+++ klamav-0.46/src/klamav.cpp	2021-04-12 16:34:27.984207410 +0900
@@ -4,7 +4,6 @@
 
 #include "klamav.h"
 #include "freshklam.h"
-#include "klamd.h"
 #include "sigtool.h"
 #include "klamscan.h"
 #include "kuarantine.h"
@@ -15,6 +14,7 @@
 #include "firstrunwizard.h"
 #include "collectiondb.h"
 #include "configdialog.h"
+#include "tabwidget.h"
 #include "klamavconfig.h"
 
 #include <klocale.h>
@@ -24,17 +24,19 @@
 #include <qpushbutton.h>
 #include <qlayout.h>
 #include <ksystemtray.h>
+#include <kmenubar.h>
 #include <kpopupmenu.h>
 #include <kdebug.h>
 #include <kmessagebox.h>
 #include <kurl.h>
+#include <qtooltip.h>
 
 #include <qdir.h>
 #include <qfile.h>
 
 Klamav *kmain = 0L;
 
-
+using namespace KlamAV;
 
 Klamav::Klamav()
     : KMainWindow( 0, "KlamAV " )
@@ -44,34 +46,34 @@
 	downloadClamAVForWizard = false;
 
 	kmain = this;
-	QVBoxLayout *top = new QVBoxLayout(this,10,10);
-	tab = new QTabWidget(this);
-	
+	QVBoxLayout *top = new QVBoxLayout(this,3,0);
+
+	// We don't want these tabs closed
+	QStringList fixedTabs;
+	fixedTabs << i18n("Scan") << i18n("Update");
+
+	tab = new TabWidget(this, "KlamAV", fixedTabs);
+	connect( tab, SIGNAL(tabClosed(QString)), this, SLOT(tabClosed(QString)) );
+ 
   	_tray = new KSystemTray(kmain, "klamav tray");
-	_tray->setPixmap(KSystemTray::loadIcon("klamav_on_acc_disabled"));
+	_tray->setPixmap(KSystemTray::loadIcon("klamav"));
 	connect(_tray,SIGNAL(quitSelected()),SLOT(shuttingDown()));
 	
 	KPopupMenu *conf_menu = _tray->contextMenu();
-    //EnableKlamd = new KAction(i18n("&Enable Auto-Scan"), "klamav_on_acc_enabled", 0,this, SLOT(contextEnable()),actionCollection(),"klamd_enable");
-    //DisableKlamd = new KAction(i18n("&Disable Auto-Scan"),"klamav_on_acc_disabled", 0,this, SLOT(contextDisable()),actionCollection(),"klamd_disable");
         
-	EnableFreshklam = new KAction(i18n("&Enable Auto-Updates"), "klamav", 0,this, SLOT(contextEnableFK()),actionCollection(),"fk_enable");
-    DisableFreshklam = new KAction(i18n("&Disable Auto-Updates"),"klamavbw", 0,this, SLOT(contextDisableFK()),actionCollection(),"fk_disable");
+	EnableFreshklam = new KAction(i18n("&Enable Auto-Updates"), "system-software-update", 0,this, SLOT(contextEnableFK()),actionCollection(),"fk_enable");
+	DisableFreshklam = new KAction(i18n("&Disable Auto-Updates"), 0, 0,this, SLOT(contextDisableFK()),actionCollection(),"fk_disable");
 
 	EnableFreshklam->plug(conf_menu);
 	DisableFreshklam->plug(conf_menu);
-	//EnableKlamd->plug(conf_menu);
-	//DisableKlamd->plug(conf_menu);
 	
 	QToolTip::add( _tray, i18n( "KlamAV - Virus Protection for KDE" ) );
 	_tray->show();
 	
 	DisableFreshklam->setEnabled(FALSE);
 	EnableFreshklam->setEnabled(TRUE);
-	//DisableKlamd->setEnabled(FALSE);
-	//EnableKlamd->setEnabled(TRUE);
 
-        KConfig* config = KGlobal::config();
+        config = KGlobal::config();
         config->setGroup("Freshklam");
         QStringList DatabasePaths = config->readListEntry("lastDownloadPaths");
 
@@ -83,41 +85,55 @@
             firstRunWizard();
         }
 
-	activityviewer = new Activityviewer(this);
-
+	// Menus
+	KPopupMenu *scanner_menu = new KPopupMenu(this);
+	scanner_menu->insertItem( i18n("Scan &File..."), this, SLOT(slotScanFile()), CTRL+Key_O );
+	scanner_menu->insertItem( i18n("Scan &Directory..."), this, SLOT(slotScanDir()) );
+	scanner_menu->insertSeparator();
+	scanner_menu->insertItem( i18n("&Schedule scan..."), this, SLOT(slotScheduleScan()) );
+	scanner_menu->insertItem( i18n("&Options..."), this, SLOT(slotOptions()) );
+	scanner_menu->insertSeparator();
+	scanner_menu->insertItem( i18n("&Quit"), kapp, SLOT(quit()) );
+
+
+	tabs_menu = new KPopupMenu(this);
+	tabs_menu->setCheckable(true);
+	showWelcomeTab = tabs_menu->insertItem( i18n("Show &Welcome tab"), this, SLOT(slotToggleWelcome()) );
+	showQuarantineTab = tabs_menu->insertItem( i18n("Show &Quarantine tab"), this, SLOT(slotToggleQuarantine()) );
+	showDBViewerTab = tabs_menu->insertItem( i18n("Show &Virus Browser tab"), this, SLOT(slotToggleDBViewer()) );
+	showEventsTab = tabs_menu->insertItem( i18n("Show &Events tab"), this, SLOT(slotToggleEvents()) );
+
+	// Menu bar
+	KMenuBar *menubar = this->menuBar();
+	menubar->insertItem( i18n("&Scanner"), scanner_menu );
+	menubar->insertItem( i18n("&Tabs"), tabs_menu );
+	menubar->insertItem( i18n("&Help"), helpMenu(false) );
+
+	top->setMenuBar(menubar);
+
+	activityviewer = new Activityviewer(this, "Events");
+
+	aboutklamav = new Aboutklamav(this, "Welcome");
+	updateTabState(0, true); // Welcome tab
+ 
 	klamscan = new Klamscan(this);
-	tab->addTab(klamscan, i18n("&Scan"));
-
-	//klamd = new Klamd(this);
-	//tab->addTab(klamd, i18n("&Auto-Scan"));
-
-	//connect(klamd->search_button,SIGNAL(clicked()),SLOT(contextEnable()));
-	//connect(klamd->cancel_button,SIGNAL(clicked()),SLOT(contextDisable()));
+	tab->addTab(klamscan, i18n("Scan"));
 
-		
 	freshklam = new Freshklam(this);
-	tab->addTab(freshklam, i18n("&Update"));
+	tab->addTab(freshklam, i18n("Update"));
 
 	connect(freshklam->search_button,SIGNAL(clicked()),SLOT(contextUpdateFK()));
 	connect(freshklam->cancel_button,SIGNAL(clicked()),SLOT(contextDisableFK()));
 	
-	sigtool = new Sigtool(this);
-	tab->addTab(sigtool, i18n("&E-Mail Protection"));
 	
-	
-	kuarantine = new Kuarantine(this);
-	tab->addTab(kuarantine, i18n("&Quarantine"));
+	kuarantine = new Kuarantine(this, "Quarantine");
+	updateTabState(1, true); // Quarantine tab
 
-	klamdb = new KlamDB(this);
-	tab->addTab(klamdb, i18n("Virus Browser"));
+	klamdb = new KlamDB(this, "DBViewer");
+	updateTabState(2, true); // Virus Browser tab
 
-	tab->addTab(activityviewer, i18n("Events"));
-	
-	aboutklamav = new Aboutklamav(this);
-	tab->addTab(aboutklamav, i18n("Abou&t"));
+	updateTabState(3, true); // Events tab
 	
-  
-
 
 	top->addWidget(tab);
 	
@@ -127,17 +143,6 @@
 	KStdAction::quit(this, SLOT(shuttingDown()), actionCollection());
   
   	if (KApplication::kApplication()->isRestored()){
-/*		config = KGlobal::config();
-		config->setGroup("Klamd");
-		QString RunKlamd = config->readEntry("Enabled");
-		
-		if (RunKlamd == "Yes"){
-			_tray->setPixmap(KSystemTray::loadIcon("klamav"));
-			DisableKlamd->setEnabled(TRUE);
-			EnableKlamd->setEnabled(FALSE);
-
-		}
-*/
 		hide();
 	}else{
 		show();
@@ -150,8 +155,6 @@
 		tab->setCurrentPage(2);
 		freshklam->slotSearch();
 	}
-        if (downloadClamAVForWizard)
-//            freshklam->checkForNewClamAVNow();
 	//klamdb->shouldIShow();
 
 	CollectionDB::instance()->insertEvent("Launch","KlamAV Launched");
@@ -159,6 +162,85 @@
     setCaption(QString("KlamAV %1 (Using ClamAV %2)").arg(KLAMAV_VERSION).arg(KlamavConfig::clamAVVersion()));
 }
 	
+void Klamav::updateTabState( int tabId, bool init ) {
+	if( config->group() != "Tabs" )
+		config->setGroup("Tabs");
+
+	QString optionName, tabName;
+	QWidget* tabWidget;
+	int itemId;
+
+	switch(tabId) {
+		case 0: // Welcome tab
+			optionName="ShowWelcomeTab";
+			tabName=i18n("Welcome");
+			tabWidget=aboutklamav;
+			itemId=showWelcomeTab;
+			break;
+
+		case 1: // Quarantine tab
+			optionName="ShowQuarantineTab";
+			tabName=i18n("Quarantine");
+			tabWidget=kuarantine;
+			itemId=showQuarantineTab;
+			break;
+
+		case 2: // DBViewer tab
+			optionName="ShowDBViewerTab";
+			tabName=i18n("Virus Browser");
+			tabWidget=klamdb;
+			itemId=showDBViewerTab;
+			break;
+
+		case 3: // Events tab
+			optionName="ShowEventsTab";
+			tabName=i18n("Events");
+			tabWidget=activityviewer;
+			itemId=showEventsTab;
+			break;
+		}
+
+	if( config->readBoolEntry(optionName, true) ) {
+		tab->insertTab(tabWidget, tabName);
+		tabWidget->show();
+
+		if(!init) tab->setCurrentPage( tab->indexOf(tabWidget) );
+	} else {
+		if( tab->currentPageIndex() == tabId )
+			tab->setCurrentPage(0);
+
+		if( tab->indexOf( tabWidget ) != -1 ) {
+			tab->removePage( tabWidget );
+		}
+		tabWidget->hide();
+	}
+
+	tabs_menu->setItemChecked(itemId, config->readBoolEntry(optionName, true) );
+}
+
+void Klamav::tabClosed(QString name) {
+	int uncheck;
+	QString optionName;
+
+	if ( name == "Welcome" ) {
+		uncheck=showWelcomeTab;
+		optionName="ShowWelcomeTab";
+	} else if ( name == "Quarantine" ) {
+		uncheck=showQuarantineTab;
+		optionName="ShowQuarantineTab";
+	} else if ( name == "DBViewer" ) {
+		uncheck=showDBViewerTab;
+		optionName="ShowDBViewerTab";
+	} else if ( name == "Events" ) {
+		uncheck=showEventsTab;
+		optionName="ShowEventsTab";
+	}
+
+	tabs_menu->setItemChecked(uncheck, false);
+	config->setGroup("Tabs");
+	config->writeEntry(optionName, false);
+}
+
 Klamav::~Klamav()
 {
     KlamavConfig::writeConfig();
@@ -172,53 +254,84 @@
 }
 
 bool Klamav::queryClose() {
-/*	if (freshklam->isFreshklamAlive()){
+	if ( freshklam->isFreshklamAlive() || klamscan->scanGoingOn() ){
         KMessageBox::information (this,i18n("<p>KlamAV will stay open in the system tray. <br><br>"
-        " <b>Remember</b> - you can't close KlamAV while <br> "
-        " auto-updating is still running!</p>"),"KlamAV","dontshow");
-		hide();
-		return false;
-
+        " <b>Remember</b> - you can't quit KlamAV while <br> "
+        " a scan, Fresklam or KlamOnAcc is active!</p>"),"KlamAV","dontshow");
+	hide();
+	return false;
+			
 	}
-*/
 	return true;
 }
 
 
-void Klamav::contextEnable() {
-	
-	klamd->startKlamd();
-	//if (klamd->startKlamd()){
-			//_tray->setPixmap(KSystemTray::loadIcon("klamav"));
-			//EnableKlamd->setEnabled(FALSE);
-			//DisableKlamd->setEnabled(TRUE);
-	//}
-}
-
 void Klamav::clamdStopped() {
 /*	if (freshklam->isFreshklamAlive())
 		_tray->setPixmap(KSystemTray::loadIcon("klamavbwdl"));
 	else*/
 	_tray->setPixmap(KSystemTray::loadIcon("klamav_on_acc_disabled"));
-	DisableKlamd->setEnabled(FALSE);
-	EnableKlamd->setEnabled(TRUE);
 }
 
-void Klamav::contextDisable() {
-	klamd->slotCancel();
-    resetAutoScan();
+// Menu slots
+void Klamav::slotScanFile() {
+	klamscan->slotScanFile();
 }
 
-void Klamav::resetAutoScan() {
-/*	if (freshklam->isFreshklamAlive())
-		_tray->setPixmap(KSystemTray::loadIcon("klamavbwdl"));
-	else*/
-	_tray->setPixmap(KSystemTray::loadIcon("klamav_on_acc_disabled"));
-	//DisableKlamd->setEnabled(FALSE);
-	//EnableKlamd->setEnabled(TRUE);
+void Klamav::slotScanDir() {
+	klamscan->slotScanDir();
+}
+
+void Klamav::slotScheduleScan() {
+	klamscan->slotSchedule();
+}
+void Klamav::slotOptions() {
+	slotConfigKlamav("Scanning Backend");
 }
 
+void Klamav::slotToggleWelcome() {
+  if( config->group() != "Tabs" )
+    config->setGroup("Tabs");
+
+	bool newState = ! config->readBoolEntry("ShowWelcomeTab", true);
+	config->writeEntry("ShowWelcomeTab", newState);
+	config->sync();
+
+	updateTabState(0, false);
+}
+void Klamav::slotToggleQuarantine() {
+  if( config->group() != "Tabs" )
+    config->setGroup("Tabs");
+
+	bool newState = ! config->readBoolEntry("ShowQuarantineTab", true);
+	config->writeEntry("ShowQuarantineTab", newState);
+	config->sync();
+
+	updateTabState(1, false);
+}
+
+void Klamav::slotToggleDBViewer() {
+  if( config->group() != "Tabs" )
+    config->setGroup("Tabs");
+
+	bool newState = ! config->readBoolEntry("ShowDBViewerTab", true);
+	config->writeEntry("ShowDBViewerTab", newState);
+	config->sync();
+
+	updateTabState(2, false);
+}
+void Klamav::slotToggleEvents() {
+  if( config->group() != "Tabs" )
+    config->setGroup("Tabs");
+
+	bool newState = ! config->readBoolEntry("ShowEventsTab", true);
+	config->writeEntry("ShowEventsTab", newState);
+	config->sync();
+
+	updateTabState(3, false);
+}
 
+ 
 void Klamav::contextUpdateFK() {
 
     freshklam->slotSearch();
@@ -317,7 +430,7 @@
         if (!klamavqdir.exists() && !klamavqdir.mkdir(path))
             ok = false;
         else
-            chmod((const char *)path,0700);
+            chmod(path.ascii(),0700);
     }
 
 }
diff -Naru klamav-0.46_orig/src/klamav.h klamav-0.46/src/klamav.h
--- klamav-0.46_orig/src/klamav.h	2009-02-28 19:27:27.000000000 +0900
+++ klamav-0.46/src/klamav.h	2021-04-12 15:18:58.488032781 +0900
@@ -30,7 +30,6 @@
 class Freshklam;
 class Sigtool;
 class Klamscan;
-class Klamd;
 class KlamavDock;
 class Kuarantine;
 class Activityviewer;
@@ -67,11 +66,8 @@
 
     KlamavDock *m_dock;
     KSystemTray *_tray;
-    KAction *EnableKlamd;
-    KAction *DisableKlamd;
     KAction *EnableFreshklam;
     KAction *DisableFreshklam;
-    Klamd *klamd;
     Freshklam *freshklam;
     bool firstDownload;
     bool downloadDBForWizard;
@@ -81,7 +77,6 @@
     Klamscan *klamscan;
     Activityviewer *activityviewer;
     void showVirusBrowser();
-    void resetAutoScan();
     QTabWidget *tab;
 
 
@@ -109,14 +104,22 @@
     //void readProperties(KConfig *);
 
 public slots:
-	void contextDisable();
     void clamdStopped();
 	void slotConfigKlamav( const QCString& page );
 private slots:
-	void contextEnable();
+	void slotScanFile();
+	void slotScanDir();
+	void slotScheduleScan();
+	void slotOptions();
+	void slotToggleWelcome();
+	void slotToggleQuarantine();
+	void slotToggleDBViewer();
+	void slotToggleEvents();
 	void contextEnableFK();
         void contextUpdateFK();
 	void contextDisableFK();
+	void tabClosed(QString name);
+ 
 
 private:
     void setupAccel();
@@ -124,6 +127,7 @@
     void firstRunWizard();
     void createDefaultKlamAVDir(QString type);
     void checkDir(QString path);
+    void updateTabState(int tabId, bool init);
 
 private:
     //KlamavView *m_view;
@@ -156,6 +160,11 @@
     Sigtool *sigtool;
     Aboutklamav *aboutklamav;
     
+    KPopupMenu *tabs_menu;
+    int showWelcomeTab;
+    int showQuarantineTab;
+    int showDBViewerTab;
+    int showEventsTab;
 };
 
 extern Klamav *kmain;
diff -Naru klamav-0.46_orig/src/klamavconfig.kcfg klamav-0.46/src/klamavconfig.kcfg
--- klamav-0.46_orig/src/klamavconfig.kcfg	2009-02-28 19:27:27.000000000 +0900
+++ klamav-0.46/src/klamavconfig.kcfg	2021-04-09 15:27:25.429406013 +0900
@@ -3,8 +3,30 @@
 <kcfg> 
 <kcfgfile name="klamavrc"/> 
 
-<group name="ArchiveLimits"> 
-    <entry name="RecursionLevel" type="Int">
+<group name="KlamavBackend">
+    <entry name="ScannerClamscan" type="Bool">
+        <label>Standalone scanner</label>
+        <whatsthis>Use KlamAV without the ClamAV daemon.</whatsthis>
+        <default>true</default>
+    </entry>
+    <entry name="ScannerClamdscan" type="Bool">
+        <label>ClamAV daemon</label>
+        <whatsthis>Use KlamAV with the ClamAV daemon.</whatsthis>
+        <default>false</default>
+    </entry>
+    <entry name="ClamdMultiscan" type="Bool">
+        <label>Force Multiscan mode</label>
+        <whatsthis>Force clamdscan to use multiscan mode (scan multiple directories at once in separate threads). May lower scanning time.</whatsthis>
+        <default>true</default>
+    </entry>
+</group>
+
+<group name="Archives">
+    <entry name="scanArchives" type="Bool">
+        <label>Look into archives while scanning</label>
+        <default>true</default>
+    </entry>
+	<entry name="RecursionLevel" type="Int">
         <label>Maximum Recursion Level</label>
         <whatsthis>The maximum number of subdirectories in a zip file to open before .</whatsthis>
         <default>0</default>
@@ -26,133 +48,53 @@
     </entry>
 </group>
 
-<group name="ArchiveTypes"> 
-    <entry name="ScanDeb" type="Bool">
-        <label>Scan DEB files</label>
-        <whatsthis>Scan DEB files using the named program.</whatsthis>
-        <default>false</default>
-    </entry>
-    <entry name="DebUsing" type="String">
-        <label>Program to scan DEB files.</label>
-        <whatsthis>Scan DEB files using the named program.</whatsthis>
-    </entry>
-
-    <entry name="ScanTar" type="Bool">
-        <label>Scan TAR files</label>
-        <whatsthis>Scan TAR files using the named program.</whatsthis>
-	<default>false</default>
-    </entry>
-    <entry name="TarUsing" type="String">
-        <label>Program to scan TAR files.</label>
-        <whatsthis>Scan TAR files using the named program.</whatsthis>
-    </entry>
-
-    <entry name="ScanJar" type="Bool">
-        <label>Scan JAR files</label>
-        <whatsthis>Scan JAR files using the named program.</whatsthis>
-	<default>false</default>
-    </entry>
-    <entry name="JarUsing" type="String">
-        <label>Program to scan JAR files.</label>
-        <whatsthis>Scan JAR files using the named program.</whatsthis>
-    </entry>
-
-    <entry name="ScanLzh" type="Bool">
-        <label>Scan LZH files</label>
-        <whatsthis>Scan LZH files using the named program.</whatsthis>
-	<default>false</default>
-    </entry>
-    <entry name="LzhUsing" type="String">
-        <label>Program to scan LZH files.</label>
-        <whatsthis>Scan LZH files using the named program.</whatsthis>
-    </entry>
-
-    <entry name="ScanZoo" type="Bool">
-        <label>Scan Zoo files</label>
-        <whatsthis>Scan Zoo files using the named program.</whatsthis>
-	<default>false</default>
-    </entry>
-    <entry name="ZooUsing" type="String">
-        <label>Program to scan Zoo files.</label>
-        <whatsthis>Scan Zoo files using the named program.</whatsthis>
-    </entry>
-
-    <entry name="ScanRar" type="Bool">
-        <label>Scan RAR files</label>
-        <whatsthis>Scan RAR files using the named program.</whatsthis>
-	<default>false</default>
-    </entry>
-    <entry name="RarUsing" type="String">
-        <label>Program to scan RAR files.</label>
-        <whatsthis>Scan RAR files using the named program.</whatsthis>
-    </entry>
-
-    <entry name="ScanZip" type="Bool">
-        <label>Scan Zip files</label>
-        <whatsthis>Scan Zip files using the named program.</whatsthis>
-	<default>false</default>
-    </entry>
-    <entry name="ZipUsing" type="String">
-        <label>Program to scan Zip files.</label>
-        <whatsthis>Scan Zip files using the named program.</whatsthis>
-    </entry>
-
-    <entry name="ScanTgz" type="Bool">
-        <label>Scan TGZ files</label>
-        <whatsthis>Scan TGZ files using the named program.</whatsthis>
-	<default>false</default>
-    </entry>
-    <entry name="TgzUsing" type="String">
-        <label>Program to scan TGZ files.</label>
-        <whatsthis>Scan TGZ files using the named program.</whatsthis>
-    </entry>
-
-    <entry name="ScanArj" type="Bool">
-        <label>Scan ARJ files</label>
-        <whatsthis>Scan ARJ files using the named program.</whatsthis>
-	<default>false</default>
-    </entry>
-    <entry name="ArjUsing" type="String">
-        <label>Program to scan ARJ files.</label>
-        <whatsthis>Scan ARJ files using the named program.</whatsthis>
-    </entry>
-
-</group>
-
 <group name="FileTypes"> 
     <entry name="VirusEncrypted" type="Bool">
         <label>Mark Encrypted Files as Suspicious</label>
-        <whatsthis>Mark Encrypted Files as Suspicious.</whatsthis>
 	<default>true</default>
     </entry>
     <entry name="VirusBroken" type="Bool">
         <label>Mark Broken Files as Suspicious</label>
-        <whatsthis>Mark Broken Files as Suspicious.</whatsthis>
 	<default>true</default>
     </entry>
     <entry name="ExcludeQuarantine" type="Bool">
         <label>Exclude Quarantine Directories from scanning</label>
-        <whatsthis>Exclude Quarantine Directories from scanning.</whatsthis>
 	<default>true</default>
     </entry>
+    <entry name="ScanELF" type="Bool">
+        <label>Scan Executable and Linkable Format files</label>
+        <default>true</default>
+    </entry>
+    <entry name="ScanSWF" type="Bool">
+        <label>Scan Adobe Flash movies</label>
+        <default>true</default>
+    </entry>
+    <entry name="ScanHWP3" type="Bool">
+        <label>Scan Hangul Word Processor documents</label>
+        <default>true</default>
+    </entry>
+    <entry name="ScanPDF" type="Bool">
+        <label>Scan Portable Document Format documents</label>
+        <default>true</default>
+    </entry>
+    <entry name="ScanXML" type="Bool">
+        <label>Scan documents formatted as XML</label>
+        <default>true</default>
+    </entry>
     <entry name="ScanMacros" type="Bool">
         <label>Scan Microsoft Office Macros</label>
-        <whatsthis>Scan Microsoft Office Macros.</whatsthis>
 	<default>true</default>
     </entry>
     <entry name="ScanPE" type="Bool">
         <label>Scan Portable Executable Files</label>
-        <whatsthis>Scan Portable Executable Files.</whatsthis>
 	<default>true</default>
     </entry>
     <entry name="ScanMail" type="Bool">
         <label>Scan Emails</label>
-        <whatsthis>Scan Emails.</whatsthis>
 	<default>true</default>
     </entry>
     <entry name="ScanHTML" type="Bool">
         <label>Scan HTML Files</label>
-        <whatsthis>Scan HTML Files.</whatsthis>
 	<default>true</default>
     </entry>
 
@@ -162,22 +104,18 @@
 <group name="Autoscan"> 
     <entry name="Executed" type="Bool">
         <label>Scan Files When They Are Executed</label>
-        <whatsthis>Scan Files When They Are Executed.</whatsthis>
 	<default>true</default>
     </entry>
     <entry name="Opened" type="Bool">
         <label>Scan Files When They Are Opened</label>
-        <whatsthis>Scan Files When They Are Opened.</whatsthis>
 	<default>true</default>
     </entry>
     <entry name="Closed" type="Bool">
         <label>Scan Files When They Are Closed</label>
-        <whatsthis>Scan Files When They Are Closed.</whatsthis>
 	<default>true</default>
     </entry>
     <entry name="Created" type="Bool">
         <label>Scan Files When They Are Created or Modified</label>
-        <whatsthis>Scan Files When They Are Created or Modified.</whatsthis>
 	<default>false</default>
     </entry>
 
@@ -186,42 +124,34 @@
 <group name="EventLogging"> 
     <entry name="ExpireDays" type="Int">
         <label>Expire Events After the Specified Number of Days</label>
-        <whatsthis>Expire Events After the Specified Number of Days.</whatsthis>
 	<default>30</default>
     </entry>
     <entry name="SoftwareUpdates" type="Bool">
         <label>Log Software Update Events</label>
-        <whatsthis>Log Software Update Events.</whatsthis>
 	<default>true</default>
     </entry>
     <entry name="Quarantined" type="Bool">
         <label>Log Quarantine Events</label>
-        <whatsthis>Log Quarantine Events.</whatsthis>
 	<default>true</default>
     </entry>
     <entry name="LaunchShutdown" type="Bool">
         <label>Log KlamAV launching and shutting-down Events</label>
-        <whatsthis>Log KlamAV launching and shutting-down Events.</whatsthis>
 	<default>false</default>
     </entry>
     <entry name="DBUpdates" type="Bool">
         <label>Log Database Events</label>
-        <whatsthis>Log Database Events.</whatsthis>
 	<default>true</default>
     </entry>
     <entry name="StartedStoppedCancelled" type="Bool">
         <label>Log StartedStoppedCancelled Events</label>
-        <whatsthis>Log StartedStoppedCancelled Events.</whatsthis>
 	<default>true</default>
     </entry>
     <entry name="VirusFound" type="Bool">
         <label>Log VirusFound Events</label>
-        <whatsthis>Log VirusFound Events.</whatsthis>
 	<default>true</default>
     </entry>
     <entry name="Error" type="Bool">
         <label>Log Error Events</label>
-        <whatsthis>Log Error Events.</whatsthis>
 	<default>true</default>
     </entry>
 
@@ -231,7 +161,6 @@
 <group name="Misc"> 
     <entry name="ClamAVVersion" type="String">
         <label>Expire Events After the Specified Number of Days</label>
-        <whatsthis>Expire Events After the Specified Number of Days.</whatsthis>
     </entry>
 </group>
 
diff -Naru klamav-0.46_orig/src/klamd.cpp klamav-0.46/src/klamd.cpp
--- klamav-0.46_orig/src/klamd.cpp	2021-04-09 14:26:15.068002606 +0900
+++ klamav-0.46/src/klamd.cpp	2021-04-09 15:27:25.429406013 +0900
@@ -1,3 +1,5 @@
+DISABLED
+
 /*
  * Copyright (C) 2004 Robert Hogan <robert at roberthogan dot net>
  */
diff -Naru klamav-0.46_orig/src/klamd.h klamav-0.46/src/klamd.h
--- klamav-0.46_orig/src/klamd.h	2009-02-28 19:27:27.000000000 +0900
+++ klamav-0.46/src/klamd.h	2021-04-09 15:27:25.429406013 +0900
@@ -1,3 +1,5 @@
+DISABLED
+
 /*
  * Copyright (C) 2004 Robert Hogan <robert at roberthogan dot net>
  */
diff -Naru klamav-0.46_orig/src/klamdoptions.cpp klamav-0.46/src/klamdoptions.cpp
--- klamav-0.46_orig/src/klamdoptions.cpp	2009-02-28 19:27:27.000000000 +0900
+++ klamav-0.46/src/klamdoptions.cpp	2021-04-09 15:27:25.429406013 +0900
@@ -1,3 +1,5 @@
+DISABLED
+
 /****************************************************************************
 ** Form implementation generated from reading ui file 'klamdoptions.ui'
 **
diff -Naru klamav-0.46_orig/src/klamdoptions.h klamav-0.46/src/klamdoptions.h
--- klamav-0.46_orig/src/klamdoptions.h	2009-02-28 19:27:27.000000000 +0900
+++ klamav-0.46/src/klamdoptions.h	2021-04-09 15:27:25.429406013 +0900
@@ -1,3 +1,5 @@
+DISABLED
+
 /****************************************************************************
 ** Form interface generated from reading ui file 'klamdoptions.ui'
 **
diff -Naru klamav-0.46_orig/src/klamscan.cpp klamav-0.46/src/klamscan.cpp
--- klamav-0.46_orig/src/klamscan.cpp	2009-02-28 19:27:27.000000000 +0900
+++ klamav-0.46/src/klamscan.cpp	2021-04-12 15:28:46.249577455 +0900
@@ -4,7 +4,6 @@
 
 #include "klamscan.h"
 #include "klamav.h"
-#include "klamd.h"
 #include "klamscanoptions.h"
 #include "schedule.h"
 #include "directorylist.h"
@@ -18,6 +17,7 @@
 #include <kstatusbar.h>
 #include <kdebug.h>
 #include <ksystemtray.h>
+#include <kfiledialog.h>
 
 
 #include <qpushbutton.h>
@@ -26,12 +26,16 @@
 #include <kmessagebox.h>
 #include <qtooltip.h>
 #include <qtoolbutton.h>
+#include <qstringlist.h>
 #include <dcopclient.h>
 #include <qdir.h>
 #include <kprogress.h>
 #include <dcopref.h>
 #include <dcopclient.h>
 
+
+#include <sys/stat.h> // KDEIO does not seem to have what we need
+
 using namespace KlamAV;
 
 Klamscan::Klamscan(QWidget *parent, const char *name)
@@ -46,7 +50,7 @@
     QBoxLayout *top = new QVBoxLayout(this,10,10);
 
 
-    tabBrowser = new TabWidget(this);
+    tabBrowser = new TabWidget(this, "Klamscan", QStringList( i18n("Launcher") ));
     tabBrowser->setMargin(5);
     top->addWidget(tabBrowser);
 
@@ -200,31 +204,43 @@
 
 
 
-void Klamscan::slotScan()
-{
-
+bool Klamscan::scanGoingOn() {
+    // Find any tab in which scanning hasn't finished yet
+    for( int i = 1; i < tabBrowser->count(); i++ ) {
+        if( dynamic_cast<ScanViewer*>( tabBrowser->page(i) )->scanGoingOn() )
+            return true;
+    }
+    return false;
+}
 
+void Klamscan::scan( QStringList filepattern ) {
     ScanViewer* homepage = new ScanViewer(this, "page");
-    
+
     connect( homepage, SIGNAL( scanFinished(QWidget *) ), this,
         SLOT( slotManageButtons(QWidget *) ) );
-    
+		
     connect( homepage, SIGNAL( scanStartingAgain(QWidget *) ), this,
         SLOT( slotManageButtons(QWidget *) ) );
-
-
-	kmain->_tray->setPixmap(KSystemTray::loadIcon("klamav_scanning"));
-
+		    
+		    
+    kmain->_tray->setPixmap(KSystemTray::loadIcon("klamav_scanning"));
+			
     QDate today = QDate::currentDate();
     QTime now = QTime::currentTime();
     QString suffix = QString("%1 %2")
-        .arg(today.toString("ddd MMMM d yyyy"))
-        .arg(now.toString("hh:mm ap"));
-    
+            .arg(today.toString("ddd MMMM d yyyy"))
+            .arg(now.toString("hh:mm ap"));
+
     tabBrowser->addTab(homepage,suffix);
     tabBrowser->setCurrentPage(tabBrowser->count() - 1);
-    //return;
-    
+  
+    CollectionDB::instance()->insertEvent("Manual Scan",QString("Commencing Scan"),filepattern.join(" "));
+
+    homepage->slotScan(filepattern, check_combo->currentItem(),setup->recursive(),false);
+}
+
+void Klamscan::slotScan()
+{
     QStringList filepattern;
 
     KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
@@ -239,16 +255,37 @@
        prevdir = listOfUrlsToScan.first();
 
     }else{    
-            filepattern = pruneSelectedDirs();
+       filepattern = setup->pruneSelectedDirs(setup->dirs());
     }
-        //kdDebug() << filepattern << endl;    
-    CollectionDB::instance()->insertEvent("Manual Scan",QString("Commencing Scan"),filepattern.join(" "));
 
- 
-    homepage->slotScan(filepattern, check_combo->currentItem(),setup->recursive(),false);
+    scan( filepattern );
+}
+
+
+
+void Klamscan::slotScanFile() {
+	KURL::List urls( KFileDialog::getOpenURLs(QString::null,QString::null,this) );
+	QStringList filepattern;
+
+	KURL::List::iterator it;
+	for( it = urls.begin(); it != urls.end(); ++it ) {
+		filepattern.append( (*it).pathOrURL() );
+	}
+
+	if( filepattern.count() == 0 )
+		return;
+
+	scan( filepattern );
 }
 
+void Klamscan::slotScanDir() {
+	QString dir=KFileDialog::getExistingDirectory(QString::null,this);
+
+	if( dir == QString::null )
+		return;
 
+	scan( QStringList(dir) );
+}
 
 void  Klamscan::slotAdvOptions(){
 
@@ -260,15 +297,15 @@
     dialog->raise();
     dialog->setActiveWindow();*/
 
-    kmain->slotConfigKlamav( "Archive Limits" );
-    
+    kmain->slotConfigKlamav( "Scanning Backend" );
+     
 
 }
 
 void  Klamscan::slotSchedule(){
 
-    QStringList filepattern = pruneSelectedDirs();
-
+    QStringList filepattern = setup->pruneSelectedDirs(setup->dirs());
+ 
 
     if (filepattern.isEmpty()){
         KMessageBox::error(this, i18n( "Please select something to scan!") );
@@ -379,11 +416,8 @@
 
 void  Klamscan::slotStopScanning(){
 
-    if (kmain->klamd->isKlamdAlive())
-      kmain->_tray->setPixmap(KSystemTray::loadIcon("klamav_on_acc_enabled"));
-    else
-      kmain->_tray->setPixmap(KSystemTray::loadIcon("klamav_on_acc_disabled"));
-
+    kmain->_tray->setPixmap(KSystemTray::loadIcon("klamav_on_acc_disabled"));
+ 
     ////kdDebug() << tabBrowser->currentPage()->name() << endl;
     ScanViewer* cur = static_cast<ScanViewer*>(tabBrowser->currentPage());
     cur->slotCancel();
@@ -408,10 +442,7 @@
 
 void  Klamscan::slotRemoveTab(){
 
-    if (kmain->klamd->isKlamdAlive())
-      kmain->_tray->setPixmap(KSystemTray::loadIcon("klamav_on_acc_enabled"));
-    else
-      kmain->_tray->setPixmap(KSystemTray::loadIcon("klamav_on_acc_disabled"));
+    kmain->_tray->setPixmap(KSystemTray::loadIcon("klamav_on_acc_disabled"));
     ////kdDebug() << tabBrowser->currentPage()->name() << endl;
     if (tabBrowser->currentPageIndex() != 0){
         slotStopScanning();
@@ -441,44 +472,4 @@
 
 }
 
-QStringList Klamscan::pruneSelectedDirs(){
-
-
-    //This gets rid of redundant sub-directories from the list of dirs to be scanned.
-
-    QStringList filepattern;
-    QStringList listOfUrlsToScan = setup->dirs();
-    listOfUrlsToScan.sort();
-    QString prev;
-    QStringList prevdirs;
-    for (QStringList::Iterator it = listOfUrlsToScan.begin(); it != listOfUrlsToScan.end(); it++ ){
-        //kdDebug() << "dir: " << (*it) << endl;
-        (*it) = (*it).stripWhiteSpace() + "/";
-        if (prevdirs.isEmpty()){
-            //kdDebug() << (*it) << endl;
-            filepattern.append(*it);
-            prevdirs.append((*it));
-        }else{
-            filepattern.append(*it);
-            bool shouldappend = true;
-            for (QStringList::Iterator it2 = prevdirs.begin(); it2 != prevdirs.end(); it2++ ){
-                if ((*it).contains(*it2)){
-                    //kdDebug() << (*it) << endl;
-                    filepattern.remove((*it));
-                    shouldappend = false;
-                    break;
-                }
-            }
-            if (shouldappend)
-               prevdirs.append((*it));
-        }
-    }
-
-
-       
-        return filepattern;
-
-}
-
-
 #include "klamscan.moc"
diff -Naru klamav-0.46_orig/src/klamscan.h klamav-0.46/src/klamscan.h
--- klamav-0.46_orig/src/klamscan.h	2009-02-28 19:27:27.000000000 +0900
+++ klamav-0.46/src/klamscan.h	2021-04-12 14:33:25.781315333 +0900
@@ -66,6 +66,7 @@
     
     void  setDirName(QString);
     bool isMultiScan();
+    bool scanGoingOn();
 protected:
     /**
      * Overridden virtuals for Qt drag 'n drop (XDND)
@@ -96,11 +97,14 @@
 signals:
 
 public slots:
+    void scan(QStringList);
     void scanURLs(const QString &urls);
+    void slotSchedule();
+    void slotScanFile();
+    void slotScanDir();
 private slots:
     void slotScan();
     void slotAdvOptions();
-    void slotSchedule();
 
     void slotStopScanning();
     void slotStartAgain();
@@ -108,7 +112,6 @@
     void slotManageButtons(QWidget *current);
 private:
     void setDefaults();
-    QStringList pruneSelectedDirs();
     QLineEdit *template_edit;
     QComboBox *files_combo, *pattern_combo, *check_combo;
     QCheckBox *recursive_box;
diff -Naru klamav-0.46_orig/src/klamscan.hpre klamav-0.46/src/klamscan.hpre
--- klamav-0.46_orig/src/klamscan.hpre	2009-02-28 19:27:27.000000000 +0900
+++ klamav-0.46/src/klamscan.hpre	2021-04-12 13:46:54.265443066 +0900
@@ -126,7 +126,6 @@
     void slotQuarantineSelected();
     void slotAdvOptions();
     void slotSchedule();
-    void slotVirusPool();
     void slotGoogle();
     //void patternTextChanged( const QString &);
 private:
diff -Naru klamav-0.46_orig/src/kuarantine.cpp klamav-0.46/src/kuarantine.cpp
--- klamav-0.46_orig/src/kuarantine.cpp	2009-02-28 19:27:27.000000000 +0900
+++ klamav-0.46/src/kuarantine.cpp	2021-04-12 13:47:57.129640465 +0900
@@ -545,7 +545,7 @@
         if (!klamavqdir.exists() && !klamavqdir.mkdir(path))
             ok = false;
         else
-            chmod((const char *)path,0700);
+            chmod(path.ascii(),0700);
     }
 
     if (ok){
@@ -637,16 +637,12 @@
 
     if (Item->listView() == currentbox){
         qmenu->clear();
-        qmenu->insertItem( vlicon,i18n("Search for %1 with VirusList").arg(Item->text(1)), this, SLOT(slotVirusListCurrent()) );
-        qmenu->insertItem( vicon,i18n("Search for %1 with VirusPool").arg(Item->text(1)), this, SLOT(slotVirusPoolCurrent()) );
         qmenu->insertItem( ticon,i18n("Search for %1 with Trend Micro").arg(Item->text(1)), this, SLOT(slotTrendMicroCurrent()) );
         qmenu->insertItem( gicon,i18n("Search for %1 with Google").arg(Item->text(1)), this, SLOT(slotGoogleCurrent()) );
     
         qmenu->popup( point );
     }else if (Item->listView() == historybox){
         hmenu->clear();
-        hmenu->insertItem( vicon,i18n("Search for %1 with VirusPool").arg(Item->text(1)), this, SLOT(slotVirusPoolHistory()) );
-        hmenu->insertItem( vicon,i18n("Search for %1 with VirusList").arg(Item->text(1)), this, SLOT(slotVirusListHistory()) );
         hmenu->insertItem( ticon,i18n("Search for %1 with Trend Micro").arg(Item->text(1)), this, SLOT(slotTrendMicroHistory()) );
         hmenu->insertItem( gicon,i18n("Search for %1 with Google").arg(Item->text(1)), this, SLOT(slotGoogleHistory()) );
     
@@ -655,18 +651,6 @@
     }
 }
 
-void Kuarantine::slotVirusPoolCurrent()
-{
-    QString name = currentbox->currentItem()->text(1);
-    kmain->klamdb->slotExternal(name,"VirusPool");
-}
-
-void Kuarantine::slotVirusListCurrent()
-{
-    QString name = currentbox->currentItem()->text(1);
-    kmain->klamdb->slotExternal(name,"VirusList");
-}
-
 void Kuarantine::slotGoogleCurrent()
 {
     QString name = currentbox->currentItem()->text(1);
@@ -680,18 +664,6 @@
 }
 
 
-void Kuarantine::slotVirusPoolHistory()
-{
-    QString name = historybox->currentItem()->text(1);
-    kmain->klamdb->slotExternal(name,"VirusPool");
-}
-
-void Kuarantine::slotVirusListHistory()
-{
-    QString name = historybox->currentItem()->text(1);
-    kmain->klamdb->slotExternal(name,"VirusList");
-}
-
 void Kuarantine::slotGoogleHistory()
 {
     QString name = historybox->currentItem()->text(1);
diff -Naru klamav-0.46_orig/src/kuarantine.h klamav-0.46/src/kuarantine.h
--- klamav-0.46_orig/src/kuarantine.h	2009-02-28 19:27:27.000000000 +0900
+++ klamav-0.46/src/kuarantine.h	2021-04-12 13:48:11.209684677 +0900
@@ -126,14 +126,10 @@
     void slotClearHistory();
     void slotDeleteHistory();
     void updateLastQuarLocations();
-    void slotVirusPoolCurrent();
-    void slotVirusListCurrent();
     void slotGoogleCurrent();
     void slotTrendMicroCurrent();
-    void slotVirusPoolHistory();
     void slotGoogleHistory();
     void slotTrendMicroHistory();
-    void slotVirusListHistory();
 
     //void patternTextChanged( const QString &);
 private:
diff -Naru klamav-0.46_orig/src/main.cpp klamav-0.46/src/main.cpp
--- klamav-0.46_orig/src/main.cpp	2009-02-28 19:27:27.000000000 +0900
+++ klamav-0.46/src/main.cpp	2021-04-12 12:30:19.611686432 +0900
@@ -30,7 +30,8 @@
     KCmdLineArgs::init(argc, argv, &about);
     KCmdLineArgs::addCmdLineOptions(options);
     KUniqueApplication app;
-    
+
+    about.addAuthor( "Robert Hogan", "Original Author", "robert@roberthogan.net" );
 
     // register ourselves as a dcop client
     //app.dcopClient()->registerAs(app.name(), false);
diff -Naru klamav-0.46_orig/src/scanviewer.cpp klamav-0.46/src/scanviewer.cpp
--- klamav-0.46_orig/src/scanviewer.cpp	2009-02-28 19:27:27.000000000 +0900
+++ klamav-0.46/src/scanviewer.cpp	2021-04-12 13:48:56.785827790 +0900
@@ -8,7 +8,6 @@
 #include "directorylist.h"
 #include "dbviewer.h"
 #include "collectiondb.h"
-#include "klamd.h"
 
 #include <config.h>
 #include "klamavconfig.h"
@@ -91,7 +90,7 @@
     
     //matches_label = new QLabel(status_frame);
     //QFontMetrics ml_fm(matches_label->fontMetrics());
-    //matches_label->setFixedWidth(ml_fm.width(i18n("9999 viruseses/errors found")));
+    //matches_label->setFixedWidth(ml_fm.width(i18n("9999 viruses/errors found")));
     //matches_label->setFixedHeight(ml_fm.lineSpacing());
     //status_layout->addWidget(matches_label, 0);
     
@@ -111,7 +110,7 @@
 
     prog = new KProgress(status2_frame);
     progosd = new K3bJobProgressOSD();
-    progosd->setText("Scanning..");
+    progosd->setText( i18n("Scanning..") );
     progosd->readSettings(KGlobal::config());
 
     status2_layout->addWidget(prog, 10);
@@ -133,12 +132,10 @@
 
     matches2_label = new QLabel(status2_frame);
     QFontMetrics ml_fm2(matches2_label->fontMetrics());
-    matches2_label->setFixedWidth(ml_fm2.width(i18n("9999 viruseses/problems found")));
+    matches2_label->setFixedWidth(ml_fm2.width(i18n("9999 viruses/problems found")));
     matches2_label->setFixedHeight(ml_fm2.lineSpacing());
     status2_layout->addWidget(matches2_label, 0);
     
-    QToolTip::add(matches2_label, i18n("cf. 'Flanderseses' - Homer Simpson. This childish joke will be removed when KlamAV is more mature."));
-
     status2_layout->activate();
     status2_frame->adjustSize();
     status2_frame->setMinimumSize(status2_frame->size());
@@ -188,7 +185,7 @@
             int fnameStartPoint = 0;
             int fnameEndPoint = item2.findRev(":");
             QString tmpFName = item2.mid(fnameStartPoint,(fnameEndPoint - fnameStartPoint));
-            tmpFName = i18n(tmpFName);
+            tmpFName = i18n(tmpFName.ascii());
             if ((pos = (item2.find(" FOUND"))) != -1){
             //if ((pos = buf.section('\n',j,j).find("FOUND")) != -1){
                 QString tmpVirusName = item2.mid((fnameEndPoint+1),(item2.length() - (fnameEndPoint+1)));
@@ -200,7 +197,7 @@
 
                 if ((tmpVirusName.find("FOUND")) != -1){
                     tmpVirusName.replace("FOUND","");
-                    tm = new QListViewItem( resultview, tmpFName, tmpVirusName.stripWhiteSpace(),"Loose");
+                    tm = new QListViewItem( resultview, tmpFName, tmpVirusName.stripWhiteSpace(), i18n("Loose") );
                     tm->setPixmap( 0, SmallIcon("klamav_virus") );
                     //resultview->insertItem(buf.section('\n',j,j));
                     QuarantineList.append(tmpFName+":"+tmpVirusName+suffix);
@@ -214,7 +211,7 @@
             //}else if ((pos = buf.section('\n',j,j).find("ERROR:")) != -1){
             }else if ((pos = (item2.find("ERROR:"))) != -1){
                 QString tmpVirusName = item2.mid((fnameEndPoint+1),(item2.length() - (fnameEndPoint+1)));
-                tm = new QListViewItem( resultview, tmpFName, tmpVirusName.stripWhiteSpace(),"Not a Virus");
+                tm = new QListViewItem( resultview, tmpFName, tmpVirusName.stripWhiteSpace(), i18n("Not a Virus") );
                 tm->setPixmap( 0, SmallIcon("klamav_error") );
                 //resultview->insertItem(buf.section('\n',j,j));
                 CollectionDB::instance()->insertEvent("Error Found",tmpVirusName,tmpFName);
@@ -266,7 +263,7 @@
     QString str;
     str.setNum(resultview->childCount());
 
-    str += i18n(" viruseses/problems found");
+    str += i18n(" viruses/problems found");
     matches2_label->setText(str);
 
     if (showProgress){
@@ -346,6 +343,9 @@
 
     config = KGlobal::config();
 
+    config->setGroup("KlamavBackend");
+    clamdscan = config->readBoolEntry("ScannerClamdscan", false);
+
     slotClear();
     QuarantineList.clear();
     
@@ -368,8 +368,8 @@
     ////kdDebug() << "here 2" << endl;    
     QString dbpath;
     QString excludes;
-    QString options;
-    
+    QString options; // can not be used for clamdscan
+
     if (!(db.isEmpty()))
         dbpath = QString(" -d %1 ").arg(db);
 
@@ -382,7 +382,7 @@
         for (QStringList::Iterator ita = lastQuarLocations.begin(); ita == lastQuarLocations.begin() ; ita++){
                 quarloc = *ita;
         }
-        excludes += QString(" --exclude=%1 ").arg(quarloc);
+        excludes += QString(" --exclude-dir=%1 ").arg(quarloc);
     }
 
     
@@ -416,113 +416,97 @@
 //     if (KlamavConfig::virusLimitsExceeded())
 //         options += "--block-max ";
 
-    if (KlamavConfig::virusEncrypted())
-        options += "--block-encrypted ";
+    if (!(KlamavConfig::scanArchives()))
+        options += "--scan-archive=no ";
 
+    if (KlamavConfig::virusEncrypted())
+        options += "--alert-encrypted ";
+     
     if (!(KlamavConfig::scanMail()))
-        options += "--no-mail ";
-
+        options += "--scan-mail=no ";
+     
     if (!(KlamavConfig::scanHTML()))
-        options += "--no-html ";
-        
+        options += "--scan-html=no ";
+     
     if (!(KlamavConfig::scanPE()))
-        options += "--no-pe ";
-
+        options += "--scan-pe=no ";
+     
     if (!(KlamavConfig::scanMacros()))
-        options += "--no-ole2 ";
-
-    if (KlamavConfig::virusBroken())
-        options += "--detect-broken ";
-
-
-    if (KlamavConfig::scanZip()){
-        options += "--unzip";
-        if ((KlamavConfig::zipUsing()) != "")
-            options += "="+(KlamavConfig::zipUsing())+" ";
-        else
-            options+=" ";
-    }
-
-    if (KlamavConfig::scanRar()){
-        options += "--unrar";
-        if ((KlamavConfig::rarUsing()) != "")
-            options += "="+(KlamavConfig::rarUsing())+" ";
-        else
-            options+=" ";
-    }
-    
-    if (KlamavConfig::scanArj()){
-        options += "--arj";
-        if ((KlamavConfig::arjUsing()) != "")
-            options += "="+(KlamavConfig::arjUsing())+" ";
-        else
-            options+=" ";
-    }
-
-    if (KlamavConfig::scanZoo()){
-        options += "--unzoo";
-        if ((KlamavConfig::zooUsing()) != "")
-            options += "="+(KlamavConfig::zooUsing())+" ";
-        else
-            options+=" ";
-    }
-    
-    if (KlamavConfig::scanLzh()){
-        options += "--lha";
-        if ((KlamavConfig::lzhUsing()) != "")
-            options += "="+(KlamavConfig::lzhUsing())+" ";
-        else
-            options+=" ";
-    }
-
-    if (KlamavConfig::scanJar()){
-        options += "--jar";
-        if ((KlamavConfig::jarUsing()) != "")
-            options += "="+(KlamavConfig::jarUsing())+" ";
-        else
-            options+=" ";
-    }
-
-    if (KlamavConfig::scanDeb()){
-        options += "--deb";
-        if ((KlamavConfig::debUsing()) != "")
-            options += "="+(KlamavConfig::debUsing())+" ";
-        else
-            options+=" ";
-    }
-
-    if (KlamavConfig::scanTar()){
-        options += "--tar";
-        if ((KlamavConfig::tarUsing()) != "")
-            options += "="+(KlamavConfig::tarUsing())+" ";
-        else
-            options+=" ";
-    }
-
-    if (KlamavConfig::scanTgz()){
-        options += "--tgz";
-        if ((KlamavConfig::tgzUsing()) != "")
-            options += "="+(KlamavConfig::tgzUsing())+" ";
-        else
-            options+=" ";
+        options += "--scan-ole2=no ";
+     
+    if(!(KlamavConfig::scanELF()))
+        options += "--scan-elf=no ";
+
+    if(!(KlamavConfig::scanPDF()))
+        options += "--scan-pdf=no ";
+
+    if(!(KlamavConfig::scanHWP3()))
+        options += "--scan-hwp3=no ";
+
+    if(!(KlamavConfig::scanSWF()))
+        options += "--scan-pdf=no ";
+
+    if(!(KlamavConfig::scanXML()))
+        options += "--scan-xmldocs=no ";
+
+	if (KlamavConfig::virusBroken())
+        options += "--alert-broken ";
+     
+
+    if(clamdscan) {
+        // make sure that clamd is running
+        FILE* clamdpid;
+        if( clamdpid = fopen("/run/clamav/clamd.pid","r") )
+            fclose(clamdpid); // it's ok
+        else {
+            int choice = KMessageBox::warningYesNoCancel(
+                this,
+                i18n("The ClamAV daemon does not seem to be running on this system. Do you really want to continue with this scan or would you like to launch a standalone scan instead?'"),
+                i18n("Clamd not running"),
+                i18n("Continue this scan"),
+                i18n("Launch standalone scan"),
+                i18n("Do not ask me again")
+            );
+
+            switch(choice) {
+                case 2: // cancel
+                    return;
+                    break;
+                case 4: // launch standalone scan
+                    clamdscan = false;
+                    break;
+            }
+        }
     }
-
-    kdDebug() << "clamscan -v "
-    << excludes << " " 
-    << dbpath << " " 
-    << options << " "
-    << "'" + m_filepattern.join("' '") + "'" << endl;
-
+ 
     childproc = new KProcIO();
     childproc->setUseShell(TRUE);
     childproc->setUsePty (KProcIO::Stdout,TRUE);
 
-    *childproc << "clamscan -v ";
-    *childproc << excludes << " ";
-    *childproc << dbpath << " ";
-    *childproc << options << " ";
-    
-    *childproc << "'" + m_filepattern.join("' '") + "'";
+    if(clamdscan) {
+	config->setGroup("KlamavBackend");
+	QString multiscanOption = config->readBoolEntry("ClamdMultiscan", true) ? " -m " : "";
+
+        kdDebug() << "clamdscan -v --fdpass "
+		  << multiscanOption
+                  << "'" + m_filepattern.join("' '") + "'" << endl;
+
+        *childproc << "clamdscan -v ";
+	*childproc << multiscanOption;
+    } else {
+        kdDebug() << "clamscan -v "
+                  << excludes << " "
+                  << dbpath << " "
+                  << options << " "
+                  << "'" + m_filepattern.join("' '") + "'" << endl;
+
+        *childproc << "clamscan -v ";
+        *childproc << excludes << " ";
+        *childproc << dbpath << " ";
+        *childproc << options << " ";
+    }
+
+	*childproc << "'" + m_filepattern.join("' '") + "'";
 
 
 /*    connect( childproc, SIGNAL(processExited(KProcess *)),
@@ -594,10 +578,7 @@
 
 void ScanViewer::resetSysTray()
 {
-    if (kmain->klamd->isKlamdAlive())
-      kmain->_tray->setPixmap(KSystemTray::loadIcon("klamav_on_acc_enabled"));
-    else
-      kmain->_tray->setPixmap(KSystemTray::loadIcon("klamav_on_acc_disabled"));
+    kmain->_tray->setPixmap(KSystemTray::loadIcon("klamav_on_acc_disabled"));
 }
 
 void ScanViewer::childExited()
@@ -613,10 +594,10 @@
     	kmain->_tray->setPixmap(KSystemTray::loadIcon("klamav_scan_safe"));
         QTimer::singleShot( 10000, this, SLOT(resetSysTray()) );
         if (!(errorsEncountered))
-            KNotifyClient::event(kmain->_tray->winId(),i18n( "ScanCompleteNoVirus" ), i18n( "Scan Complete - No Viruses Found!" ));
-        else
-            KNotifyClient::event(kmain->_tray->winId(),i18n( "ScanCompleteNoVirusButErrors" ), i18n( "Scan Complete - No Viruses Found But Some Errors Encountered!" ));
-
+            KNotifyClient::event(kmain->_tray->winId(),"ScanCompleteNoVirus", i18n("Scan Complete - No Viruses Found!"));
+	else
+            KNotifyClient::event(kmain->_tray->winId(),"ScanCompleteNoVirusButErrors", i18n("Scan Complete - No Viruses Found But Some Errors Encountered!"));
+	 
     }else if(status == 1){
     	kmain->_tray->setPixmap(KSystemTray::loadIcon("klamav_scan_found"));
         switch (m_mode) {
@@ -694,7 +675,7 @@
     resultview->clear();
 
 //    status2_label->setText(i18n("Ready"));
-    matches2_label->setText(i18n("0 viruseses/problems found"));
+    matches2_label->setText(i18n("0 viruses/problems found"));
 
 }
 
@@ -738,9 +719,9 @@
                 if (lastQuarItems.contains(item2))
                     lastQuarItems.remove(item2);
                 lastQuarItems.prepend(item2);
-                (resultview->findItem(fname,0))->setText(2,"Quarantined");
+                (resultview->findItem(fname,0))->setText(2,i18n("Quarantined"));
                 (resultview->findItem(fname,0))->setPixmap( 0, SmallIcon("klamav") );
-                chmod((const char *)qname,0400);
+                chmod(qname.ascii(),0400);
                 CollectionDB::instance()->insertEvent("Quarantine",QString("Quarantined"),fname);
 
             }else{
@@ -750,12 +731,9 @@
             
         }
     }
-    if (allQuarantined) {
-      if (kmain->klamd->isKlamdAlive())
-        kmain->_tray->setPixmap(KSystemTray::loadIcon("klamav_on_acc_enabled"));
-      else
-        kmain->_tray->setPixmap(KSystemTray::loadIcon("klamav_on_acc_disabled"));
-    }else
+    if (allQuarantined)
+	kmain->_tray->setPixmap(KSystemTray::loadIcon("klamav_on_acc_disabled"));
+    else
         kmain->_tray->setPixmap(KSystemTray::loadIcon("klamav_scan_found"));
     config->writeEntry(QString("Items %1").arg(quarloc), lastQuarItems);
     config->sync();
@@ -801,9 +779,7 @@
 
     menu->clear();
         menu->insertItem( "Quarantine Selected", this,SLOT(slotQuarantineSelected()) );
-        menu->insertItem( vlicon,i18n("Search for %1 with VirusList").arg(Item->text(1)), this, SLOT(slotVirusList()) );
 
-        menu->insertItem( vicon,i18n("Search for %1 with VirusPool").arg(Item->text(1)), this, SLOT(slotVirusPool()) );
         menu->insertItem( ticon,i18n("Search for %1 with Trend Micro").arg(Item->text(1)), this, SLOT(slotTrendMicro()) );
 
         menu->insertItem( gicon,i18n("Search for %1 with Google").arg(Item->text(1)), this, SLOT(slotGoogle()) );
@@ -842,24 +818,12 @@
     kmain->klamdb->slotExternal(name, "Google");
 }
 
-void ScanViewer::slotVirusPool()
-{
-    QString name = resultview->currentItem()->text(1);
-    kmain->klamdb->slotExternal(name, "VirusPool");
-}
-
 void ScanViewer::slotTrendMicro()
 {
     QString name = resultview->currentItem()->text(1);
     kmain->klamdb->slotExternal(name, "TrendMicro");
 }
 
-void ScanViewer::slotVirusList()
-{
-    QString name = resultview->currentItem()->text(1);
-    kmain->klamdb->slotExternal(name, "VirusList");
-}
-
 void ScanViewer::slotStartAgain()
 {
     calculateTime = TRUE;
diff -Naru klamav-0.46_orig/src/scanviewer.h klamav-0.46/src/scanviewer.h
--- klamav-0.46_orig/src/scanviewer.h	2009-02-28 19:27:27.000000000 +0900
+++ klamav-0.46/src/scanviewer.h	2021-04-12 13:49:12.793878057 +0900
@@ -117,8 +117,6 @@
     void slotClear();
     void slotRMB( QListViewItem *, const QPoint &, int );
     void slotQuarantineSelected();
-    void slotVirusPool();
-    void slotVirusList();
     void slotGoogle();
     void slotTrendMicro();
 	void slotCancelScanTime();
@@ -130,6 +128,7 @@
     void Quarantine();
     void askUser();
     int countFiles( QDir & root);
+    QString scanner;
     //void ScanViewer::startProgress();
     QLineEdit *template_edit;
     QComboBox *files_combo, *pattern_combo, *check_combo;
@@ -175,6 +174,7 @@
 	bool calculateTime;
 	bool showProgress;
     QFrame *status_frame;
+  bool clamdscan;
 };
 
 #endif // _SCANVIEWER_H_
diff -Naru klamav-0.46_orig/src/schedule.cpp klamav-0.46/src/schedule.cpp
--- klamav-0.46_orig/src/schedule.cpp	2009-02-28 19:27:27.000000000 +0900
+++ klamav-0.46/src/schedule.cpp	2021-04-09 15:27:25.429406013 +0900
@@ -21,7 +21,9 @@
 #include <kstdguiitem.h>
 #include <sys/stat.h>
 
-
+/* Finding out ICEauthority path */
+#include <kprocio.h>
+ 
 Schedule::Schedule( QWidget* parent, QStringList filepattern, const char* name, bool modal, WFlags fl )
     : QDialog( parent, name, modal, fl )
 {
@@ -35,7 +37,9 @@
 //  	CTCronIterator i = const_cast<CTHost&>(cth).cron.begin();
 // 	CTCron* ctcron((CTCron*)*i);	
 
-
+  /* Figure out where the ICEauthority file is located */
+  getICEauth();
+ 
 	_filepattern = filepattern;
 	//bool isRTL = QApplication::reverseLayout();
 	QVBoxLayout *vbox = new QVBoxLayout(this, KDialog::marginHint(),
@@ -352,8 +356,8 @@
 		.arg(today.toString("ddMMyy"))
 		.arg(now.toString("hhmmss"));
 
-	QFile file( QString("%1/ScanWithKlamav_%2.sh").arg(path).arg(timestring ));
-
+	QFile file( QString("%1/ScanWithKlamav.sh").arg(path) );
+ 
 	if ( file.open( IO_WriteOnly ) ) {
 		QTextStream ts( &file );
 	
@@ -361,14 +365,18 @@
 	
 	
 		ts << "#!/bin/bash" << "\n";
-		ts << "HOSTNAME=`hostname`" << "\n";
-		ts << "export HOSTNAME" << "\n";
-		ts << QString("PATH=%1").arg(QString(getenv("PATH"))) << "\n";
-		ts << "export PATH" << "\n";
-		ts << "DCOPSERVER=`cat /home/${USER}/.DCOPserver_${HOSTNAME}_:0 | grep local`" << "\n";
-		ts << "export DCOPSERVER" << "\n";
-		ts << "DISPLAY=:0" << "\n";
-		ts << "export DISPLAY" << "\n";
+		ts << "export HOSTNAME=`hostname`" << "\n";
+		ts << QString("export PATH=%1").arg(QString(getenv("PATH"))) << "\n";
+		/* The following inspired by https://unix.stackexchange.com/a/17278 */
+		ts << "if [ -z \"$DISPLAY\" ]; then" << "\n";
+		ts << "        for d in /tmp/.X11-unix/X*" << "\n";
+		ts << "        do" << "\n";
+		ts << "                export DISPLAY=$(echo $d|sed \"s!/tmp/.X11-unix/X!:!\")" << "\n";
+		ts << "        done" << "\n";
+		ts << "fi" << "\n";
+		ts << "export DCOPSERVER=`cat ${HOME}/.DCOPserver_${HOSTNAME}_${DISPLAY} | grep local`" << "\n";
+    /* This path is always the same for the current user */
+    ts << QString("export ICEAUTHORITY=%1 # issue 21").arg(iceauth) << "\n";
 		ts << "# Execution starts here" << "\n";
 		ts << "if [ \"$1\" = \"\" ]; then" << "\n";
 		ts << "        exit 1" << "\n";
@@ -393,7 +401,7 @@
 		ts << "fi" << "\n";
 	
 		file.close();
-		chmod((const char *)file.name(), S_IWUSR | S_IRUSR | S_IEXEC );
+		chmod(file.name().ascii(), S_IWUSR | S_IRUSR | S_IEXEC );
 		return file.name();
 	}else
 		return QString("Error");
@@ -459,13 +467,56 @@
 		ts << "Terminal=0" << "\n";
 	
 		file.close();
-		chmod((const char *)file.name(), S_IWUSR | S_IRUSR | S_IEXEC );
+		chmod(file.name().ascii(), S_IWUSR | S_IRUSR | S_IEXEC );
 		return file.name();
 	}else
 		return QString("Error");
 
 }
 
+void Schedule::getICEauth()
+{
+    /* Code taken from freshklam.cpp */
+    QString command=QString("iceauth -v exit");
+
+    iceproc = new KProcIO();
+    iceproc->setUseShell(TRUE);
+    iceproc->setUsePty(KProcIO::Stdout,TRUE);
+
+    *iceproc<<command;
+
+    connect( iceproc, SIGNAL(readReady(KProcIO *)),
+             SLOT(slotICEoutput(KProcIO *)) );
+    connect( iceproc, SIGNAL(processExited(TDEProcess *)),
+             SLOT(slotICEexited()) );
+
+    iceproc->start(KProcIO::NotifyOnExit);
+    iceproc->closeWhenDone();
+}
+
+
+void Schedule::slotICEexited()
+{
+    delete iceproc;
+}
+
+void Schedule::slotICEoutput(KProcIO *)
+{
+    QString lineout = "";
+    int pos;
+
+    if ((pos = (iceproc->readln(lineout))) != -1) {
+        if ((pos = (lineout.find("Using authority file"))) != -1){
+            lineout = lineout.stripWhiteSpace();
+            int StartPoint = (lineout.find("Using authority file") + 20);
+            iceauth = lineout.mid(StartPoint).stripWhiteSpace();
+            //    kdDebug() << "iceauth file: " << iceauth << endl;
+        }
+    }
+
+    iceproc->ackRead();
+    lineout = "";
+}
 
 
 HMSTimeWidget::HMSTimeWidget(QWidget *parent, const char *name) :
diff -Naru klamav-0.46_orig/src/schedule.h klamav-0.46/src/schedule.h
--- klamav-0.46_orig/src/schedule.h	2009-02-28 19:27:27.000000000 +0900
+++ klamav-0.46/src/schedule.h	2021-04-09 15:27:25.429406013 +0900
@@ -43,6 +43,7 @@
 class CollectionSetup;
 class QToolButton;
 class QHBoxLayout;
+class KProcIO;
 
 class HMSTimeWidget : public KIntSpinBox
 {
@@ -123,11 +124,17 @@
 	void slotDelete();
 	void slotOK();
 	void slotCancel();
+
+  void slotICEoutput(KProcIO *);
+  void slotICEexited();
 private:
     void setupAccel();
     void setupActions();
     QString createScanScript();
     QString createStartupScript();
+
+    QString iceauth;
+    void getICEauth();
 private:
 
 signals:
@@ -163,6 +170,7 @@
     CTHost* cthost;
     CTTask* cttask;
     CTCron* ctcron;
+    KProcIO *iceproc;
 };
 
 
diff -Naru klamav-0.46_orig/src/sigtool.cpp klamav-0.46/src/sigtool.cpp
--- klamav-0.46_orig/src/sigtool.cpp	2009-02-28 19:27:27.000000000 +0900
+++ klamav-0.46/src/sigtool.cpp	2021-04-09 15:27:25.429406013 +0900
@@ -14,10 +14,11 @@
 #include <kurlrequester.h>
 #include <qlayout.h>
 #include <kmessagebox.h>
-
+#include <qtextbrowser.h>
+ 
 const char *mail_clients[] = {
     "KMail",
-    "Ximian Evolution",
+    "Evolution",
     0
 };
 
@@ -81,8 +82,8 @@
 
 
 	
-	QString text = i18n( "This will help you configure your email client to scan incoming and outgoing mail with KlamAV. Not all mail clients are fully supported yet. Infected mail is clearly marked as such and is wrapped in another email from KlamAV telling you the name of the virus and other relevant details." );
-	
+	const QString text = i18n( "This will help you configure your email client to scan incoming and outgoing mail with KlamAV. Not all mail clients are fully supported yet. Infected mail is clearly marked as such and is wrapped in another email from KlamAV telling you the name of the virus and other relevant details." );
+ 	
 	QGroupBox *Notes = new QGroupBox(i18n("Notes"), this);
 	vbox->addWidget(Notes);
 	
@@ -98,11 +99,11 @@
 	notes_layout->addMultiCellWidget(notes_hlp, 1,1, 0,1);
 	QHBoxLayout *notes_box = new QHBoxLayout(notes_hlp, KDialog::spacingHint() );
 	
-	notes_label = new QLabel(i18n(text), notes_hlp);
-	notes_label->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) );
-	//notes_label->setFixedSize(notes_label->sizeHint());
-	notes_box->addWidget(notes_label);
-
+	notes_browser = new QTextBrowser(notes_hlp);
+	notes_browser->setText(text);
+	notes_browser->setAlignment( Qt::AlignCenter );
+	notes_box->addWidget(notes_browser);
+ 
 	
 
 
@@ -203,20 +204,20 @@
 void  Sigtool::manualKMail(){
 
 
-	QString text = i18n( "Mail scanning support is provided by a program called 'klammail'. This was installed automatically as part of the KlamAV installation. To use this program to scan your email as you send and receive it you need to set up a 'filter' in KMail to 'pipe' mail through klammail as it is coming in/going out. You should then set up a filter after this one to put any mail with the word 'virus-found' in the header into the quarantine folder of your choice. The mail will be clearly marked as infected and will tell you the name of the virus and who the mail is from." );
-
-	notes_label->setText( text );
-
+	const QString text = i18n( "Mail scanning support is provided by a program called 'klammail'. This was installed automatically as part of the KlamAV installation. To use this program to scan your email as you send and receive it you need to set up a 'filter' in KMail to 'pipe' mail through klammail as it is coming in/going out. You should then set up a filter after this one to put any mail with the word 'virus-found' in the header into the quarantine folder of your choice. The mail will be clearly marked as infected and will tell you the name of the virus and who the mail is from." );
+ 
+	notes_browser->setText( text );
+ 
 	
 }
 
-void  Sigtool::manualXimian(){
-
-	QString text = i18n( "Mail scanning support is provided by a program called 'klammail'. This was installed automatically as part of the KlamAV installation. To use this program to scan your email as you send and receive it you need to set up a 'filter' in Ximian Evolution to 'pipe' mail through klammail as it is coming in/going out. You should then set up a filter after this one to put any mail with the word 'virus-found' in the header into the quarantine folder of your choice. The mail will be clearly marked as infected and will tell you the name of the virus and who the mail is from." );
-
-	notes_label->setText( text );
-	notes_label->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) );
-
+void  Sigtool::manualEvolution(){
+	 
+	const QString text = i18n( "Mail scanning support is provided by a program called 'klammail'. This was installed automatically as part of the KlamAV installation. To use this program to scan your email as you send and receive it you need to set up a 'filter' in Evolution to 'pipe' mail through klammail as it is coming in/going out. You should then set up a filter after this one to put any mail with the word 'virus-found' in the header into the quarantine folder of your choice. The mail will be clearly marked as infected and will tell you the name of the virus and who the mail is from." );
+ 
+	notes_browser->setText( text );
+	notes_browser->setAlignment( Qt::AlignCenter );
+ 
 	
 }
 
@@ -225,7 +226,7 @@
 	
 	switch (check_combo->currentItem()) {
         case 0 : manualKMail();break;
-        case 1 : manualXimian(); break;
+        case 1 : manualEvolution(); break;
 	}
 
 
diff -Naru klamav-0.46_orig/src/sigtool.h klamav-0.46/src/sigtool.h
--- klamav-0.46_orig/src/sigtool.h	2009-02-28 19:27:27.000000000 +0900
+++ klamav-0.46/src/sigtool.h	2021-04-09 15:27:25.429406013 +0900
@@ -23,6 +23,7 @@
 class QListBox;
 class QPushButton;
 class QLabel;
+class QTextBrowser;
 class KProcess;
 class KConfig;
 class KURLRequester;
@@ -113,7 +114,7 @@
 private slots:
     void configureKMail();
     void manualKMail();
-    void manualXimian();
+    void manualEvolution();
     void manual();
     void dobuttons();
 private:
@@ -131,7 +132,7 @@
     QStringList lastSearchItems;
     QStringList lastSearchPaths;
     QComboBox *check_combo;
-    QLabel *notes_label;
+    QTextBrowser *notes_browser;
 };
 
 #endif // _Sigtool_H_
diff -Naru klamav-0.46_orig/src/specialfiletypes.ui klamav-0.46/src/specialfiletypes.ui
--- klamav-0.46_orig/src/specialfiletypes.ui	2021-04-09 14:26:15.068002606 +0900
+++ klamav-0.46/src/specialfiletypes.ui	2021-04-09 15:27:25.429406013 +0900
@@ -8,152 +8,160 @@
         <rect>
             <x>0</x>
             <y>0</y>
-            <width>540</width>
-            <height>385</height>
-        </rect>
+            <width>592</width>
+            <height>430</height>
+    </rect>
     </property>
     <property name="caption">
         <string>Special File Types</string>
     </property>
-    <grid>
-        <property name="name">
+    <vbox>
+    	    <property name="name">
             <cstring>unnamed</cstring>
         </property>
-        <widget class="QGroupBox" row="0" column="0">
-            <property name="name">
+        <widget class="QGroupBox">
+    		<property name="name">
                 <cstring>Special_File_Types</cstring>
             </property>
             <property name="title">
                 <string>Special File Types</string>
             </property>
-            <widget class="QLayoutWidget">
-                <property name="name">
-                    <cstring>layout9</cstring>
-                </property>
-                <property name="geometry">
-                    <rect>
-                        <x>20</x>
-                        <y>30</y>
-                        <width>480</width>
-                        <height>210</height>
-                    </rect>
-                </property>
-                <grid>
-                    <property name="name">
-                        <cstring>unnamed</cstring>
-                    </property>
-                    <widget class="QCheckBox" row="6" column="0">
-                        <property name="name">
-                            <cstring>kcfg_VirusEncrypted</cstring>
-                        </property>
-                        <property name="paletteForegroundColor">
-                            <color>
-                                <red>255</red>
-                                <green>0</green>
-                                <blue>0</blue>
-                            </color>
-                        </property>
-                        <property name="text">
-                            <string>Mark Encr&amp;ypted Files as Suspicious</string>
-                        </property>
-                        <property name="accel">
-                            <string>Alt+Y</string>
-                        </property>
-                    </widget>
-                    <widget class="QCheckBox" row="5" column="0">
-                        <property name="name">
-                            <cstring>kcfg_VirusBroken</cstring>
-                        </property>
-                        <property name="paletteForegroundColor">
-                            <color>
-                                <red>255</red>
-                                <green>0</green>
-                                <blue>0</blue>
-                            </color>
-                        </property>
-                        <property name="text">
-                            <string>Treat &amp;a Broken Executable as a Virus</string>
-                        </property>
-                        <property name="accel">
-                            <string>Alt+A</string>
-                        </property>
-                    </widget>
-                    <widget class="QCheckBox" row="4" column="0">
-                        <property name="name">
-                            <cstring>kcfg_ExcludeQuarantine</cstring>
-                        </property>
-                        <property name="text">
-                            <string>Exclude &amp;Quarantine Directory</string>
-                        </property>
-                        <property name="accel">
-                            <string>Alt+Q</string>
-                        </property>
-                    </widget>
-                    <widget class="QCheckBox" row="3" column="0">
-                        <property name="name">
-                            <cstring>kcfg_ScanMacros</cstring>
-                        </property>
-                        <property name="text">
-                            <string>&amp;Scan the Macros in Microsoft Office Files</string>
-                        </property>
-                        <property name="accel">
-                            <string>Alt+S</string>
-                        </property>
-                    </widget>
-                    <widget class="QCheckBox" row="1" column="0">
-                        <property name="name">
-                            <cstring>kcfg_ScanPE</cstring>
-                        </property>
-                        <property name="text">
-                            <string>Scan 'Portable E&amp;xecutable' Files</string>
-                        </property>
-                        <property name="accel">
-                            <string>Alt+X</string>
-                        </property>
-                    </widget>
-                    <widget class="QCheckBox" row="0" column="0">
-                        <property name="name">
-                            <cstring>kcfg_ScanMail</cstring>
-                        </property>
-                        <property name="text">
-                            <string>Scan Files Containin&amp;g E-Mail(s)</string>
-                        </property>
-                        <property name="accel">
-                            <string>Alt+G</string>
-                        </property>
-                    </widget>
-                    <widget class="QCheckBox" row="2" column="0">
-                        <property name="name">
-                            <cstring>kcfg_ScanHTML</cstring>
-                        </property>
-                        <property name="text">
-                            <string>Scan &amp;HTML Files for Exploits</string>
-                        </property>
-                        <property name="accel">
-                            <string>Alt+H</string>
-                        </property>
-                    </widget>
-                </grid>
-            </widget>
-        </widget>
-        <spacer row="1" column="0">
-            <property name="name">
-                <cstring>spacer3</cstring>
-            </property>
-            <property name="orientation">
-                <enum>Vertical</enum>
-            </property>
-            <property name="sizeType">
-                <enum>Expanding</enum>
-            </property>
-            <property name="sizeHint">
-                <size>
-                    <width>20</width>
-                    <height>111</height>
-                </size>
-            </property>
-        </spacer>
-    </grid>
+            <vbox>
+    		    <property name="name">
+                    <cstring>unnamed</cstring>
+    		    </property>
+                <widget class="QCheckBox">
+                    <property name="name">
+                        <cstring>kcfg_ExcludeQuarantine</cstring>
+                    </property>
+                    <property name="text">
+                        <string>Exclude &amp;Quarantine Directory</string>
+                    </property>
+                    <property name="accel">
+                        <string>Alt+Q</string>
+                    </property>
+                </widget>
+                <widget class="QCheckBox">
+                    <property name="name">
+                        <cstring>kcfg_ScanMail</cstring>
+                    </property>
+                    <property name="text">
+                        <string>Scan Files Containin&amp;g E-Mail(s)</string>
+                    </property>
+                    <property name="accel">
+                        <string>Alt+G</string>
+                    </property>
+                </widget>
+                <widget class="QCheckBox">
+		    <property name="name">
+                        <cstring>kcfg_ScanELF</cstring>
+                    </property>
+                    <property name="text">
+                        <string>Scan ELF Files</string>
+                    </property>
+                </widget>
+                <widget class="QCheckBox">
+                    <property name="name">
+			    <cstring>kcfg_ScanPE</cstring>
+                    </property>
+                    <property name="text">
+                        <string>Scan 'Portable E&amp;xecutable' Files</string>
+                    </property>
+                    <property name="accel">
+                        <string>Alt+X</string>
+                    </property>
+                </widget>
+                <widget class="QCheckBox">
+                    <property name="name">
+                        <cstring>kcfg_ScanSWF</cstring>
+                    </property>
+                    <property name="text">
+                        <string>Scan Adobe Flash Files</string>
+                    </property>
+                    <property name="accel">
+                        <string></string>
+                    </property>
+                </widget>
+                <widget class="QCheckBox">
+                    <property name="name">
+                        <cstring>kcfg_ScanPDF</cstring>
+                    </property>
+                    <property name="text">
+                        <string>Scan PDF Files</string>
+                    </property>
+                </widget>
+                <widget class="QCheckBox">
+                    <property name="name">
+			    <cstring>kcfg_ScanHTML</cstring>
+                    </property>
+                    <property name="text">
+                        <string>Scan &amp;HTML Files for Exploits</string>
+                    </property>
+                    <property name="accel">
+                        <string>Alt+H</string>
+                    </property>
+                </widget>
+                <widget class="QCheckBox">
+                    <property name="name">
+                        <cstring>kcfg_ScanMacros</cstring>
+                    </property>
+                    <property name="text">
+                        <string>&amp;Scan the Macros in Microsoft Office Files</string>
+                    </property>
+                    <property name="accel">
+                        <string>Alt+S</string>
+                    </property>
+                </widget>
+                <widget class="QCheckBox">
+                    <property name="name">
+                        <cstring>kcfg_ScanHWP3</cstring>
+                    </property>
+                    <property name="text">
+                        <string>Scan HWP3 Documents</string>
+                    </property>
+                    <property name="accel">
+                        <string></string>
+                    </property>
+                </widget>
+                <widget class="QCheckBox">
+                    <property name="name">
+			    <cstring>kcfg_VirusBroken</cstring>
+                    </property>
+                    <property name="paletteForegroundColor">
+                        <color>
+                            <red>255</red>
+                            <green>0</green>
+                            <blue>0</blue>
+                        </color>
+                    </property>
+                    <property name="text">
+                        <string>Treat &amp;a Broken Executable as a Virus</string>
+                    </property>
+                    <property name="accel">
+                        <string>Alt+A</string>
+                    </property>
+                </widget>
+                <widget class="QCheckBox">
+                    <property name="name">
+                        <cstring>kcfg_VirusEncrypted</cstring>
+                    </property>
+                    <property name="paletteForegroundColor">
+                        <color>
+                            <red>255</red>
+                            <green>0</green>
+                            <blue>0</blue>
+                        </color>
+                    </property>
+                    <property name="text">
+                        <string>Mark Encr&amp;ypted Files as Suspicious</string>
+                    </property>
+                    <property name="accel">
+                        <string>Alt+Y</string>
+                    </property>
+                </widget>
+            </vbox>
+    </widget>
+    </vbox>
 </widget>
 <layoutdefaults spacing="6" margin="11"/>
 </UI>
diff -Naru klamav-0.46_orig/src/tabwidget.cpp klamav-0.46/src/tabwidget.cpp
--- klamav-0.46_orig/src/tabwidget.cpp	2009-02-28 19:27:27.000000000 +0900
+++ klamav-0.46/src/tabwidget.cpp	2021-04-12 14:56:19.536791094 +0900
@@ -9,6 +9,7 @@
 
 #include <qstyle.h>
 #include <qclipboard.h>
+#include <qstringlist.h>
 
 #include <kapplication.h>
 #include <ktabbar.h>
@@ -22,10 +23,11 @@
 
 using namespace KlamAV;
 
-TabWidget::TabWidget(QWidget * parent, const char *name)
+TabWidget::TabWidget(QWidget * parent, const char *name, QStringList fixed)
         :KTabWidget(parent, name), m_CurrentMaxLength(30)
 {
-    setTabReorderingEnabled(false);
+    fixedTabs = QStringList(fixed);
+    setTabReorderingEnabled(true);
     connect( this, SIGNAL( currentChanged(QWidget *) ), this,
             SLOT( slotTabChanged(QWidget *) ) );
     connect(this, SIGNAL(closeRequest(QWidget*)), this, SLOT(slotCloseRequest(QWidget*)));
@@ -150,19 +152,37 @@
 
 void TabWidget::contextMenu(int i, const QPoint &p)
 {
+   currentItemId = i;
    currentItem = page(i);
    KPopupMenu popup;
-   //popup.insertTitle(tabLabel(currentItem));
-   //int detachTab = popup.insertItem( SmallIcon("tab_breakoff"), i18n("Detach Tab"), this, SLOT( slotDetachTab() ) );
-   //int copyLink = popup.insertItem( i18n("Copy Link Address"), this, SLOT( slotCopyLinkAddress() ) );
-   //popup.insertSeparator();
-   int closeTab = popup.insertItem( SmallIcon("tab_remove"), i18n("Close Tab"), this, SLOT( slotCloseTab() ) );
-   if(indexOf(currentItem) == 0) { // you can't detach or close articles tab..
-     // popup.setItemEnabled(detachTab, false);
+
+   int moveTabLeft = popup.insertItem( SmallIcon("back"), i18n("Move Tab &Left"), this, SLOT(slotMoveTabLeft()) );
+   int moveTabRight = popup.insertItem( SmallIcon("forward"), i18n("Move Tab &Right"), this, SLOT(slotMoveTabRight()) );
+   popup.insertSeparator();
+   int closeTab = popup.insertItem( SmallIcon("tab_remove"), i18n("Close Tab"), this, SLOT(slotCloseTab()) );
+
+   if(currentItemId == 0)
+      popup.setItemEnabled(moveTabLeft, false);
+
+   if(currentItemId == count() - 1)
+      popup.setItemEnabled(moveTabRight, false);
+
+   for( QStringList::Iterator it = fixedTabs.begin(); it != fixedTabs.end(); ++it) {
+    if( QString(*it) == label(currentItemId).replace('&',QString::null)  )
       popup.setItemEnabled(closeTab, false);
-      //popup.setItemEnabled(copyLink, false);
    }
-   popup.exec(p);
+
+    popup.exec(p);
+}
+
+void TabWidget::slotMoveTabLeft() {
+  if( currentItemId > 0 )
+    moveTab(currentItemId, currentItemId-1);
+}
+
+void TabWidget::slotMoveTabRight() {
+  if( currentItemId < count() - 1 )
+    moveTab(currentItemId, currentItemId+1);
 }
 
 void TabWidget::slotDetachTab()
@@ -191,7 +211,7 @@
 {
    if(!currentItem) return;
    removePage(currentItem);
-   delete currentItem;
+   emit tabClosed( currentItem->name() );
    currentItem = 0;
 }
 
diff -Naru klamav-0.46_orig/src/tabwidget.h klamav-0.46/src/tabwidget.h
--- klamav-0.46_orig/src/tabwidget.h	2009-02-28 19:27:27.000000000 +0900
+++ klamav-0.46/src/tabwidget.h	2021-04-12 14:57:03.336889045 +0900
@@ -13,6 +13,7 @@
 #include <ktabwidget.h>
 
 #include <qptrdict.h>
+#include <qstringlist.h>
 
 namespace KlamAV
 {
@@ -22,7 +23,7 @@
     Q_OBJECT
 
     public:
-        TabWidget(QWidget * parent = 0, const char *name = 0);
+        TabWidget(QWidget * parent = 0, const char *name = 0, QStringList fixedTabs = 0);
         ~TabWidget();
         void addFrame(Frame *f);
         Frame *currentFrame();
@@ -37,12 +38,15 @@
     signals:
         
         void currentFrameChanged(Frame *);
-        
+	void tabClosed(QString);
+         
     private: // methods
         
     private slots:
         
-        void slotDetachTab();
+	void slotMoveTabLeft();
+	void slotMoveTabRight();
+	void slotDetachTab();
         void slotCopyLinkAddress();
         void slotCloseTab();
         void slotCloseRequest(QWidget* widget);
@@ -53,7 +57,9 @@
 
        QPtrDict<Frame> m_frames;
        unsigned int m_CurrentMaxLength;
+       int currentItemId;
        QWidget* currentItem;
+       QStringList fixedTabs;
 };
 
 }
diff -Naru klamav-0.46_orig/src/update.cpp klamav-0.46/src/update.cpp
--- klamav-0.46_orig/src/update.cpp	2009-02-28 19:27:27.000000000 +0900
+++ klamav-0.46/src/update.cpp	2021-04-12 16:17:45.677525129 +0900
@@ -1,3 +1,4 @@
+DISABLED
 /***************************************************************************
  *   Copyright (C) 2004 by Robert Hogan                                    *
  *   robert@roberthogan.net                                                *
diff -Naru klamav-0.46_orig/src/update.h klamav-0.46/src/update.h
--- klamav-0.46_orig/src/update.h	2009-02-28 19:27:27.000000000 +0900
+++ klamav-0.46/src/update.h	2021-04-12 16:17:56.493554074 +0900
@@ -1,3 +1,4 @@
+DISABLED
 /***************************************************************************
  *   Copyright (C) 2006 by Robert Hogan   *
  *   robert@roberthogan.net   *
diff -Naru klamav-0.46_orig/src/version.h klamav-0.46/src/version.h
--- klamav-0.46_orig/src/version.h	2009-02-28 19:27:27.000000000 +0900
+++ klamav-0.46/src/version.h	2021-04-09 15:27:25.429406013 +0900
@@ -4,4 +4,4 @@
 
 #define VERSION_KLAMAV 0.46
 #define KLAMAV_VERSION "0.46"
-
+ 
diff -Naru klamav-0.46_orig/src/viewer.cpp klamav-0.46/src/viewer.cpp
--- klamav-0.46_orig/src/viewer.cpp	2009-02-28 19:27:27.000000000 +0900
+++ klamav-0.46/src/viewer.cpp	2021-04-09 15:27:25.429406013 +0900
@@ -13,6 +13,7 @@
 #include <kpopupmenu.h>
 
 #include <qclipboard.h>
+#include <qfile.h>
 #include <qpaintdevicemetrics.h>
 
 #include "viewer.h"
@@ -68,6 +69,23 @@
 }
 
 
+/* borrowed from Konqueror */
+QString Viewer::loadFile( const QString& file ) {
+   QString res;
+   if( file.isEmpty() )
+       return res;
+
+   QFile f(file);
+
+   if( !f.open(IO_ReadOnly) )
+       return res;
+
+   QTextStream t(&f);
+   res = t.read();
+
+   return res;
+}
+
 bool Viewer::closeURL()
 {
     emit browserExtension()->loadingProgress(-1);
diff -Naru klamav-0.46_orig/src/viewer.h klamav-0.46/src/viewer.h
--- klamav-0.46_orig/src/viewer.h	2009-02-28 19:27:27.000000000 +0900
+++ klamav-0.46/src/viewer.h	2021-04-09 15:27:25.429406013 +0900
@@ -26,7 +26,8 @@
             Viewer(QWidget* parent, const char* name);
             virtual bool closeURL();
             virtual bool openURL(const KURL &);
-            
+            QString loadFile( const QString& file );
+             
             /** used by the BrowserRun object to call KHTMLPart::openURL() */
             void openPage(const KURL& url) { KHTMLPart::openURL(url);}
 
openSUSE Build Service is sponsored by