summaryrefslogtreecommitdiffstats
path: root/src/schedule.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/schedule.cpp')
-rw-r--r--src/schedule.cpp27
1 files changed, 18 insertions, 9 deletions
diff --git a/src/schedule.cpp b/src/schedule.cpp
index c0250ed..743c551 100644
--- a/src/schedule.cpp
+++ b/src/schedule.cpp
@@ -2,6 +2,7 @@
* Copyright (C) 2004 Robert Hogan <robert at roberthogan dot net>
*/
+#include "directorylist.h"
#include "schedule.h"
#include "klamav.h"
#include "datepicker.h"
@@ -20,11 +21,12 @@
#include <dcopclient.h>
#include <kstdguiitem.h>
#include <sys/stat.h>
+#include <kdebug.h> // REMOVEME
/* Finding out ICEauthority path */
#include <kprocio.h>
-Schedule::Schedule( TQWidget* parent, TQStringList filepattern, const char* name, bool modal, WFlags fl )
+Schedule::Schedule( TQWidget* parent, const char* name, bool modal, WFlags fl )
: TQDialog( parent, name, modal, fl )
{
@@ -40,10 +42,16 @@ Schedule::Schedule( TQWidget* parent, TQStringList filepattern, const char* name
/* Figure out where the ICEauthority file is located */
getICEauth();
- _filepattern = filepattern;
//bool isRTL = TQApplication::reverseLayout();
- TQVBoxLayout *vbox = new TQVBoxLayout(this, KDialog::marginHint(),
- KDialog::spacingHint(), "vbox");
+ TQHBoxLayout *hbox = new TQHBoxLayout(this, KDialog::marginHint(),
+ KDialog::spacingHint(), "hbox");
+
+ /* CollectionSetup not in full mode due to issue #19 */
+ setup = new CollectionSetup(this, true, false);
+ hbox->addWidget(setup);
+
+ TQVBoxLayout *vbox = new TQVBoxLayout(0, 0, 0, "vbox");
+ hbox->addLayout(vbox);
TQGroupBox *group = new TQGroupBox("Schedule Scan of Selected Folders", this);
vbox->addWidget(group);
@@ -188,7 +196,8 @@ void Schedule::slotAddDateToCombo(TQDate newdate)
void Schedule::slotScheduleScan()
{
-
+ // Update directory list
+ filepattern = setup->dirs();
/* cthost = new CTHost();*/
/* const CTHost& cth(*cthost);
@@ -208,14 +217,14 @@ void Schedule::slotScheduleScan()
if (command.contains(i18n("When I log in to TDE")) ){
TQString startupcommand = createStartupScript();
- cttask->comment = (const char *)i18n("KlamAV Scheduled Scan at TDE Login of %1").arg(_filepattern.join(" ")).local8Bit();
+ cttask->comment = (const char *)i18n("KlamAV Scheduled Scan at TDE Login of %1").arg(filepattern.join(" ")).local8Bit();
cttask->command = (const char *)TQString("%1").arg(startupcommand).local8Bit();
cttask->enabled = FALSE;
}else{
- cttask->comment = (const char *)i18n("KlamAV Scheduled Scan of %1").arg(_filepattern.join(" ")).local8Bit();
- cttask->command = (const char *)TQString("%1 '%2'").arg(createScanScript()).arg(_filepattern.join("' '")).local8Bit();
+ cttask->comment = (const char *)i18n("KlamAV Scheduled Scan of %1").arg(filepattern.join(" ")).local8Bit();
+ cttask->command = (const char *)TQString("%1 '%2'").arg(createScanScript()).arg(filepattern.join("' '")).local8Bit();
cttask->enabled = TRUE;
}
cttask->silent = FALSE;
@@ -430,7 +439,7 @@ TQString Schedule::createStartupScript()
ts << "[Desktop Entry]" << "\n";
ts << "Encoding=UTF-8" << "\n";
ts << "Name=Klamav" << "\n";
- ts << TQString("Exec=klamav %i %m -caption \"%c\" --scanthis '%1'").arg(_filepattern.join("' '")) << "\n";
+ ts << TQString("Exec=klamav %i %m -caption \"%c\" --scanthis '%1'").arg(filepattern.join("' '")) << "\n";
ts << "Icon=klamav" << "\n";
ts << "Type=Application" << "\n";
ts << "DocPath=klamav/klamav.html" << "\n";