Fix bug with configuring boot.log.

Fixed Cron and Mail text strings for consistency.
Fixed configuration dialog width to eliminate scrolling.
This partially resolves bug report 336.
(cherry picked from commit 2d75f12d50)
v3.5.13-sru
Darrell Anderson 13 years ago committed by Slávek Banko
parent 3689183f2c
commit 176b50575b

@ -76,7 +76,7 @@ AC_CONFIG_FILES([ ksystemlog/src/cron/Makefile ])
AC_CONFIG_FILES([ ksystemlog/src/cups/Makefile ]) AC_CONFIG_FILES([ ksystemlog/src/cups/Makefile ])
AC_CONFIG_FILES([ ksystemlog/src/daemon/Makefile ]) AC_CONFIG_FILES([ ksystemlog/src/daemon/Makefile ])
AC_CONFIG_FILES([ ksystemlog/src/kernel/Makefile ]) AC_CONFIG_FILES([ ksystemlog/src/kernel/Makefile ])
AC_CONFIG_FILES([ ksystemlog/src/postfix/Makefile ]) AC_CONFIG_FILES([ ksystemlog/src/mail/Makefile ])
AC_CONFIG_FILES([ ksystemlog/src/samba/Makefile ]) AC_CONFIG_FILES([ ksystemlog/src/samba/Makefile ])
AC_CONFIG_FILES([ ksystemlog/src/system/Makefile ]) AC_CONFIG_FILES([ ksystemlog/src/system/Makefile ])
AC_CONFIG_FILES([ ksystemlog/src/xorg/Makefile ]) AC_CONFIG_FILES([ ksystemlog/src/xorg/Makefile ])

@ -35,7 +35,7 @@
<Doc10 NumberOfViews="1" URL="file:///mnt/boulot/devel/playground/sysadmin/ksystemlog/src/samba/sambaReader.cpp" > <Doc10 NumberOfViews="1" URL="file:///mnt/boulot/devel/playground/sysadmin/ksystemlog/src/samba/sambaReader.cpp" >
<View0 line="0" Type="Source" /> <View0 line="0" Type="Source" />
</Doc10> </Doc10>
<Doc11 NumberOfViews="1" URL="file:///mnt/boulot/devel/playground/sysadmin/ksystemlog/src/postfix/postfixOptions.cpp" > <Doc11 NumberOfViews="1" URL="file:///mnt/boulot/devel/playground/sysadmin/ksystemlog/src/mail/mailOptions.cpp" >
<View0 line="41" Type="Source" /> <View0 line="41" Type="Source" />
</Doc11> </Doc11>
<Doc12 NumberOfViews="1" URL="file:///mnt/boulot/devel/playground/sysadmin/ksystemlog/src/cups/cupsReader.cpp" > <Doc12 NumberOfViews="1" URL="file:///mnt/boulot/devel/playground/sysadmin/ksystemlog/src/cups/cupsReader.cpp" >

@ -93,7 +93,7 @@ msgstr ""
msgid "" msgid ""
"<qt>" "<qt>"
"<p>These files will be analyzed to display <b>Cron Logs</b> " "<p>These files will be analyzed to display <b>Cron Logs</b> "
"(i.e. planned tasks logs). This list also determines the order in which the " "(planned tasks logs). This list also determines the order in which the "
"files are read.</p></qt>" "files are read.</p></qt>"
msgstr "" msgstr ""

@ -97,7 +97,7 @@ msgstr ""
msgid "" msgid ""
"<qt>" "<qt>"
"<p>These files will be analyzed to display <b>Cron Logs</b> " "<p>These files will be analyzed to display <b>Cron Logs</b> "
"(i.e. planned tasks logs). This list also determines the order in which the " "(planned tasks logs). This list also determines the order in which the "
"files are read.</p></qt>" "files are read.</p></qt>"
msgstr "" msgstr ""

@ -97,7 +97,7 @@ msgstr ""
msgid "" msgid ""
"<qt>" "<qt>"
"<p>These files will be analyzed to display <b>Cron Logs</b> " "<p>These files will be analyzed to display <b>Cron Logs</b> "
"(i.e. planned tasks logs). This list also determines the order in which the " "(planned tasks logs). This list also determines the order in which the "
"files are read.</p></qt>" "files are read.</p></qt>"
msgstr "" msgstr ""

@ -110,12 +110,12 @@ msgstr ""
msgid "" msgid ""
"<qt>" "<qt>"
"<p>These files will be analyzed to display <b>Cron Logs</b> " "<p>These files will be analyzed to display <b>Cron Logs</b> "
"(i.e. planned tasks logs). This list also determines the order in which the " "(planned tasks logs). This list also determines the order in which the "
"files are read.</p></qt>" "files are read.</p></qt>"
msgstr "" msgstr ""
"<qt>" "<qt>"
"<p>These files will be analysed to display <b>Cron Logs</b> " "<p>These files will be analysed to display <b>Cron Logs</b> "
"(i.e. planned tasks logs). This list also determines the order in which the " "(planned tasks logs). This list also determines the order in which the "
"files are read.</p></qt>" "files are read.</p></qt>"
#: cronReader.cpp:40 cupsAccessReader.cpp:39 systemReader.cpp:39 #: cronReader.cpp:40 cupsAccessReader.cpp:39 systemReader.cpp:39

@ -97,7 +97,7 @@ msgstr ""
msgid "" msgid ""
"<qt>" "<qt>"
"<p>These files will be analyzed to display <b>Cron Logs</b> " "<p>These files will be analyzed to display <b>Cron Logs</b> "
"(i.e. planned tasks logs). This list also determines the order in which the " "(planned tasks logs). This list also determines the order in which the "
"files are read.</p></qt>" "files are read.</p></qt>"
msgstr "" msgstr ""

@ -97,7 +97,7 @@ msgstr ""
msgid "" msgid ""
"<qt>" "<qt>"
"<p>These files will be analyzed to display <b>Cron Logs</b> " "<p>These files will be analyzed to display <b>Cron Logs</b> "
"(i.e. planned tasks logs). This list also determines the order in which the " "(planned tasks logs). This list also determines the order in which the "
"files are read.</p></qt>" "files are read.</p></qt>"
msgstr "" msgstr ""

@ -335,7 +335,7 @@ msgid "Authentication Log"
msgstr "" msgstr ""
#: globals.cpp:121 options.cpp:200 #: globals.cpp:121 options.cpp:200
msgid "Cron Log" msgid "Planned Tasks Cron Log"
msgstr "" msgstr ""
#: globals.cpp:124 #: globals.cpp:124
@ -363,7 +363,7 @@ msgid "Apache Access Log"
msgstr "" msgstr ""
#: globals.cpp:142 options.cpp:369 #: globals.cpp:142 options.cpp:369
msgid "Postfix Log" msgid "Mail Log"
msgstr "" msgstr ""
#: itemFactory.cpp:85 #: itemFactory.cpp:85
@ -718,7 +718,7 @@ msgid ""
msgstr "" msgstr ""
#: ksystemlog.cpp:428 #: ksystemlog.cpp:428
msgid "&Planned Tasks Log" msgid "&Planned Tasks Cron Log"
msgstr "" msgstr ""
#: ksystemlog.cpp:429 #: ksystemlog.cpp:429
@ -824,16 +824,16 @@ msgid ""
msgstr "" msgstr ""
#: ksystemlog.cpp:485 #: ksystemlog.cpp:485
msgid "&Postfix Log" msgid "&Mail Log"
msgstr "" msgstr ""
#: ksystemlog.cpp:486 #: ksystemlog.cpp:486
msgid "Display the Postfix log." msgid "Display the mail log."
msgstr "" msgstr ""
#: ksystemlog.cpp:487 #: ksystemlog.cpp:487
msgid "" msgid ""
"<qt>Displays the Postfix log in the current tab. Postfix is the most known " "<qt>Displays the mail log in the current tab. Mail is the most known "
"and used mail server in the Linux world.</qt>" "and used mail server in the Linux world.</qt>"
msgstr "" msgstr ""

@ -97,7 +97,7 @@ msgstr ""
msgid "" msgid ""
"<qt>" "<qt>"
"<p>These files will be analyzed to display <b>Cron Logs</b> " "<p>These files will be analyzed to display <b>Cron Logs</b> "
"(i.e. planned tasks logs). This list also determines the order in which the " "(planned tasks logs). This list also determines the order in which the "
"files are read.</p></qt>" "files are read.</p></qt>"
msgstr "" msgstr ""

@ -115,7 +115,7 @@ msgstr ""
msgid "" msgid ""
"<qt>" "<qt>"
"<p>These files will be analyzed to display <b>Cron Logs</b> " "<p>These files will be analyzed to display <b>Cron Logs</b> "
"(i.e. planned tasks logs). This list also determines the order in which the " "(planned tasks logs). This list also determines the order in which the "
"files are read.</p></qt>" "files are read.</p></qt>"
msgstr "" msgstr ""
"<qt>" "<qt>"

@ -133,7 +133,7 @@ msgstr ""
msgid "" msgid ""
"<qt>" "<qt>"
"<p>These files will be analyzed to display <b>Cron Logs</b> " "<p>These files will be analyzed to display <b>Cron Logs</b> "
"(i.e. planned tasks logs). This list also determines the order in which the " "(planned tasks logs). This list also determines the order in which the "
"files are read.</p></qt>" "files are read.</p></qt>"
msgstr "<qt><p>e." msgstr "<qt><p>e."

@ -111,7 +111,7 @@ msgstr ""
msgid "" msgid ""
"<qt>" "<qt>"
"<p>These files will be analyzed to display <b>Cron Logs</b> " "<p>These files will be analyzed to display <b>Cron Logs</b> "
"(i.e. planned tasks logs). This list also determines the order in which the " "(planned tasks logs). This list also determines the order in which the "
"files are read.</p></qt>" "files are read.</p></qt>"
msgstr "" msgstr ""
"<qt>" "<qt>"

@ -97,7 +97,7 @@ msgstr ""
msgid "" msgid ""
"<qt>" "<qt>"
"<p>These files will be analyzed to display <b>Cron Logs</b> " "<p>These files will be analyzed to display <b>Cron Logs</b> "
"(i.e. planned tasks logs). This list also determines the order in which the " "(planned tasks logs). This list also determines the order in which the "
"files are read.</p></qt>" "files are read.</p></qt>"
msgstr "" msgstr ""

@ -10,7 +10,7 @@ INCLUDES = -I$(top_srcdir)/ksystemlog/src -I$(top_builddir)/ksystemlog/src/
-I$(top_srcdir)/ksystemlog/src/apache -I$(top_srcdir)/ksystemlog/src/bootauth \ -I$(top_srcdir)/ksystemlog/src/apache -I$(top_srcdir)/ksystemlog/src/bootauth \
-I$(top_srcdir)/ksystemlog/src/cron -I$(top_srcdir)/ksystemlog/src/cups \ -I$(top_srcdir)/ksystemlog/src/cron -I$(top_srcdir)/ksystemlog/src/cups \
-I$(top_srcdir)/ksystemlog/src/daemon -I$(top_srcdir)/ksystemlog/src/kernel \ -I$(top_srcdir)/ksystemlog/src/daemon -I$(top_srcdir)/ksystemlog/src/kernel \
-I$(top_srcdir)/ksystemlog/src/postfix -I$(top_srcdir)/ksystemlog/src/samba \ -I$(top_srcdir)/ksystemlog/src/mail -I$(top_srcdir)/ksystemlog/src/samba \
-I$(top_srcdir)/ksystemlog/src/system -I$(top_srcdir)/ksystemlog/src/xorg $(all_includes) -I$(top_srcdir)/ksystemlog/src/system -I$(top_srcdir)/ksystemlog/src/xorg $(all_includes)
# the library search path. # the library search path.
@ -24,7 +24,7 @@ ksystemlog_LDADD = \
$(top_builddir)/ksystemlog/src/daemon/libksystemlog_daemon.la \ $(top_builddir)/ksystemlog/src/daemon/libksystemlog_daemon.la \
$(top_builddir)/ksystemlog/src/cups/libksystemlog_cups.la \ $(top_builddir)/ksystemlog/src/cups/libksystemlog_cups.la \
$(top_builddir)/ksystemlog/src/kernel/libksystemlog_kernel.la \ $(top_builddir)/ksystemlog/src/kernel/libksystemlog_kernel.la \
$(top_builddir)/ksystemlog/src/postfix/libksystemlog_postfix.la \ $(top_builddir)/ksystemlog/src/mail/libksystemlog_mail.la \
$(top_builddir)/ksystemlog/src/xorg/libksystemlog_xorg.la \ $(top_builddir)/ksystemlog/src/xorg/libksystemlog_xorg.la \
$(top_builddir)/ksystemlog/src/system/libksystemlog_system.la \ $(top_builddir)/ksystemlog/src/system/libksystemlog_system.la \
$(top_builddir)/ksystemlog/src/cron/libksystemlog_cron.la \ $(top_builddir)/ksystemlog/src/cron/libksystemlog_cron.la \
@ -72,5 +72,5 @@ noinst_HEADERS = defaultReader.h detailDialog.h fileList.h generalOptions.h \
readerFactory.h itemFactory.h logViewColumns.h loadingDialog.h slotLogAction.h \ readerFactory.h itemFactory.h logViewColumns.h loadingDialog.h slotLogAction.h \
slotLogActionCompatibility.h parsingHelper.h logLineFilter.h loggerDialog.h findManager.h slotLogActionCompatibility.h parsingHelper.h logLineFilter.h loggerDialog.h findManager.h
SUBDIRS = config bootauth acpid apache cron system xorg postfix kernel cups daemon samba . SUBDIRS = config bootauth acpid apache cron system xorg mail kernel cups daemon samba .

@ -52,19 +52,17 @@ BootAuthenticationOptions::BootAuthenticationOptions(TQWidget *parent) :
//Boot log file //Boot log file
TQVGroupBox* bootBox=new TQVGroupBox(i18n("Boot Log File"), this); TQVGroupBox* bootBox=new TQVGroupBox(i18n("Boot Log File"), this);
new TQLabel(i18n("Boot Log File:"), bootBox);
bootURLRequester=new KURLRequester(bootBox); bootURLRequester=new KURLRequester(bootBox);
bootURLRequester->setMode(KFile::File); bootURLRequester->setMode(KFile::File);
TQToolTip::add(bootURLRequester, i18n("<qt>Here, you can type or choose the boot log file (example: <i>/var/log/boot.log</i>).</qt>")); TQToolTip::add(bootURLRequester, i18n("<qt>Here, you can type or choose the boot log file (example: <i>/var/log/boot.log</i> or <i>/var/log/dmesg</i>).</qt>"));
TQWhatsThis::add(bootURLRequester, i18n("<qt>You can type or choose here the boot log file. This file will be analyzed by KSystemLog when you will choose the <b>Boot log</b> menu item. Generally, its name is <i>/var/log/boot.log</i></qt>")); TQWhatsThis::add(bootURLRequester, i18n("<qt>You can type or choose here the boot log file. This file will be analyzed by KSystemLog when you choose the <b>Boot log</b> menu item. Generally, the name is <i>/var/log/boot.log</i> or <i>/var/log/dmesg</i></qt>"));
connect(bootURLRequester, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(onOptionsChanged(const TQString&))); connect(bootURLRequester, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(onOptionsChanged(const TQString&)));
//Authentication log file //Authentication log file
TQVGroupBox* authenticationBox=new TQVGroupBox(i18n("Authentication Log File"), this); TQVGroupBox* authenticationBox=new TQVGroupBox(i18n("Authentication Log File"), this);
new TQLabel(i18n("Authentication Log File:"), authenticationBox);
authenticationURLRequester=new KURLRequester(authenticationBox); authenticationURLRequester=new KURLRequester(authenticationBox);
authenticationURLRequester->setMode(KFile::File); authenticationURLRequester->setMode(KFile::File);
@ -86,7 +84,7 @@ BootAuthenticationOptions::BootAuthenticationOptions(TQWidget *parent) :
void BootAuthenticationOptions::readConfig() { void BootAuthenticationOptions::readConfig() {
TQString file=KSystemLogConfig::bootPath(); TQString file=KSystemLogConfig::bootPath();
bootURLRequester->setURL(file); bootURLRequester->setURL(file);
file=KSystemLogConfig::authenticationPath(); file=KSystemLogConfig::authenticationPath();
authenticationURLRequester->setURL(file); authenticationURLRequester->setURL(file);
} }
@ -94,8 +92,7 @@ void BootAuthenticationOptions::readConfig() {
void BootAuthenticationOptions::saveConfig() { void BootAuthenticationOptions::saveConfig() {
kdDebug() << "Save config from Boot Authentication Options" << endl; kdDebug() << "Save config from Boot Authentication Options" << endl;
KSystemLogConfig::setAuthenticationPath(bootURLRequester->url()); KSystemLogConfig::setBootPath(bootURLRequester->url());
KSystemLogConfig::setAuthenticationPath(authenticationURLRequester->url()); KSystemLogConfig::setAuthenticationPath(authenticationURLRequester->url());
} }

@ -127,14 +127,14 @@
<default>/var/log/apache/access.log</default> <default>/var/log/apache/access.log</default>
</entry> </entry>
<!-- Postfix config entries --> <!-- Mail config entries -->
<entry name="PostfixPaths" type="StringList"> <entry name="MailPaths" type="StringList">
<label>The Postfix log files paths.</label> <label>The Mail log files paths.</label>
<default>/var/log/mail.info,/var/log/mail.warn,/var/log/mail.err</default> <default>/var/log/mail.err,/var/log/mail.warn,/var/log/mail.info</default>
</entry> </entry>
<entry name="PostfixLevels" type="IntList"> <entry name="MailLevels" type="IntList">
<label>The Postfix log files levels.</label> <label>The Mail log files levels.</label>
<default>2,4,5</default> <default>5,4,2</default>
</entry> </entry>
<!-- Samba config entries --> <!-- Samba config entries -->

@ -43,13 +43,13 @@
#include "ksystemlogConfig.h" #include "ksystemlogConfig.h"
CronOptions::CronOptions(TQWidget *parent) : CronOptions::CronOptions(TQWidget *parent) :
TQWidget(parent) TQWidget(parent)
{ {
TQHBoxLayout *layout = new TQHBoxLayout(this); TQHBoxLayout *layout = new TQHBoxLayout(this);
layout->setAutoAdd(true); layout->setAutoAdd(true);
TQString description= i18n("<qt><p>These files will be analyzed to display <b>Cron Logs</b> (i.e. planned tasks logs). This list also determines the order in which the files are read.</p></qt>"); TQString description= i18n("<qt><p>These files will be analyzed to display <b>Cron Logs</b> (planned tasks logs). This list also determines the order in which the files are read.</p></qt>");
fileList=new SpecificFileList(this, description); fileList=new SpecificFileList(this, description);
connect(fileList, TQT_SIGNAL(fileListChanged(int)), this, TQT_SLOT(slotFileListChanged(int))); connect(fileList, TQT_SIGNAL(fileListChanged(int)), this, TQT_SLOT(slotFileListChanged(int)));

@ -43,9 +43,9 @@
#include "ksystemlogConfig.h" #include "ksystemlogConfig.h"
DaemonOptions::DaemonOptions(TQWidget *parent) : DaemonOptions::DaemonOptions(TQWidget *parent) :
TQWidget(parent) TQWidget(parent)
{ {
TQHBoxLayout *layout = new TQHBoxLayout(this); TQHBoxLayout *layout = new TQHBoxLayout(this);
layout->setAutoAdd(true); layout->setAutoAdd(true);

@ -87,7 +87,7 @@ LogMode* Globals::cupsAccessMode=NULL;
LogMode* Globals::apacheMode=NULL; LogMode* Globals::apacheMode=NULL;
LogMode* Globals::apacheAccessMode=NULL; LogMode* Globals::apacheAccessMode=NULL;
LogMode* Globals::postfixMode=NULL; LogMode* Globals::mailMode=NULL;
LogMode* Globals::sambaMode=NULL; LogMode* Globals::sambaMode=NULL;
@ -118,7 +118,7 @@ void Globals::setupLogModes() {
Globals::authenticationMode=new LogMode(i++, i18n("Authentication Log"), AUTHENTICATION_MODE_ICON); Globals::authenticationMode=new LogMode(i++, i18n("Authentication Log"), AUTHENTICATION_MODE_ICON);
Globals::logModes.append(authenticationMode); Globals::logModes.append(authenticationMode);
Globals::cronMode=new LogMode(i++, i18n("Cron Log"), CRON_MODE_ICON); Globals::cronMode=new LogMode(i++, i18n("Planned Tasks Cron Log"), CRON_MODE_ICON);
Globals::logModes.append(cronMode); Globals::logModes.append(cronMode);
Globals::daemonMode=new LogMode(i++, i18n("Daemon Log"), DAEMON_MODE_ICON); Globals::daemonMode=new LogMode(i++, i18n("Daemon Log"), DAEMON_MODE_ICON);
@ -139,8 +139,8 @@ void Globals::setupLogModes() {
Globals::apacheAccessMode=new LogMode(i++, i18n("Apache Access Log"), APACHE_ACCESS_MODE_ICON); Globals::apacheAccessMode=new LogMode(i++, i18n("Apache Access Log"), APACHE_ACCESS_MODE_ICON);
Globals::logModes.append(apacheAccessMode); Globals::logModes.append(apacheAccessMode);
Globals::postfixMode=new LogMode(i++, i18n("Postfix Log"), POSTFIX_MODE_ICON); Globals::mailMode=new LogMode(i++, i18n("Mail Log"), MAIL_MODE_ICON);
Globals::logModes.append(postfixMode); Globals::logModes.append(mailMode);
Globals::sambaMode=new LogMode(i++, i18n("Samba Log"), SAMBA_MODE_ICON); Globals::sambaMode=new LogMode(i++, i18n("Samba Log"), SAMBA_MODE_ICON);
Globals::logModes.append(sambaMode); Globals::logModes.append(sambaMode);

@ -119,7 +119,7 @@ enum groupByType {
#define APACHE_MODE_ICON "network" #define APACHE_MODE_ICON "network"
#define APACHE_ACCESS_MODE_ICON "history" #define APACHE_ACCESS_MODE_ICON "history"
#define POSTFIX_MODE_ICON "email" #define MAIL_MODE_ICON "email"
#define SAMBA_MODE_ICON "samba" #define SAMBA_MODE_ICON "samba"
@ -155,7 +155,7 @@ class Globals {
static LogMode* apacheMode; static LogMode* apacheMode;
static LogMode* apacheAccessMode; static LogMode* apacheAccessMode;
static LogMode* postfixMode; static LogMode* mailMode;
static LogMode* sambaMode; static LogMode* sambaMode;

@ -36,7 +36,6 @@
#include <kurl.h> #include <kurl.h>
#include <kmessagebox.h> #include <kmessagebox.h>
#include <kiconloader.h> #include <kiconloader.h>
#include <kdebug.h> #include <kdebug.h>
//Project includes //Project includes
@ -44,7 +43,7 @@
#include "ksystemlogConfig.h" #include "ksystemlogConfig.h"
KernelOptions::KernelOptions(TQWidget *parent) : KernelOptions::KernelOptions(TQWidget *parent) :
TQWidget(parent) TQWidget(parent)
{ {
TQHBoxLayout *layout = new TQHBoxLayout(this); TQHBoxLayout *layout = new TQHBoxLayout(this);
@ -97,5 +96,4 @@ void KernelOptions::readConfig() {
fileList->readConfig(stringList, valueList); fileList->readConfig(stringList, valueList);
} }
#include "kernelOptions.moc" #include "kernelOptions.moc"

@ -131,7 +131,7 @@ KSystemLog::KSystemLog() :
//TODO Try to find an improvement of this _big_ hack //TODO Try to find an improvement of this _big_ hack
//Set its default size, the first time KSystemLog is loaded //Set its default size, the first time KSystemLog is loaded
if (!initialGeometrySet()) if (!initialGeometrySet())
resize(600,450); resize(790,590);
//Show before reading the config because users can think that KSystemLog //Show before reading the config because users can think that KSystemLog
//have not been launched if it takes too long time to start. //have not been launched if it takes too long time to start.
@ -446,7 +446,7 @@ void KSystemLog::setupLogActions() {
CONNECTED_SLOT(daemonAction) CONNECTED_SLOT(daemonAction)
//Cron Log Action //Cron Log Action
KToggleAction* cronAction=new KToggleAction(i18n("&Planned Tasks Log"), CRON_MODE_ICON, 0, NULL, NULL, actionCollection(), "cron_log" ); KToggleAction* cronAction=new KToggleAction(i18n("&Planned Tasks Cron Log"), CRON_MODE_ICON, 0, NULL, NULL, actionCollection(), "cron_log" );
cronAction->setToolTip(i18n("Display the planned tasks log (or Cron log).")); cronAction->setToolTip(i18n("Display the planned tasks log (or Cron log)."));
cronAction->setWhatsThis(i18n("<qt>Displays the planned tasks log in the current tab. Cron process is a program in charged of launching planned tasks on your system, like security checks, or auto-restarting of some services. Use this menu to see the last-launched processes.</qt>")); cronAction->setWhatsThis(i18n("<qt>Displays the planned tasks log in the current tab. Cron process is a program in charged of launching planned tasks on your system, like security checks, or auto-restarting of some services. Use this menu to see the last-launched processes.</qt>"));
cronAction->setExclusiveGroup(exclusiveGroup); cronAction->setExclusiveGroup(exclusiveGroup);
@ -502,13 +502,13 @@ void KSystemLog::setupLogActions() {
mapActionLogModes[apacheAccessAction]=Globals::apacheAccessMode; mapActionLogModes[apacheAccessAction]=Globals::apacheAccessMode;
CONNECTED_SLOT(apacheAccessAction) CONNECTED_SLOT(apacheAccessAction)
//Postfix Log Action //Mail Log Action
KToggleAction* postfixAction=new KToggleAction(i18n("&Postfix Log"), POSTFIX_MODE_ICON, 0, NULL, NULL, actionCollection(), "postfix_log" ); KToggleAction* mailAction=new KToggleAction(i18n("&Mail Log"), MAIL_MODE_ICON, 0, NULL, NULL, actionCollection(), "mail_log" );
postfixAction->setToolTip(i18n("Display the Postfix log.")); mailAction->setToolTip(i18n("Display the Mail log."));
postfixAction->setWhatsThis(i18n("<qt>Displays the Postfix log in the current tab. Postfix is the most known and used mail server in the Linux world.</qt>")); mailAction->setWhatsThis(i18n("<qt>Displays the mail log in the current tab. Mail is the most known and used mail server in the Linux world.</qt>"));
postfixAction->setExclusiveGroup(exclusiveGroup); mailAction->setExclusiveGroup(exclusiveGroup);
mapActionLogModes[postfixAction]=Globals::postfixMode; mapActionLogModes[mailAction]=Globals::mailMode;
CONNECTED_SLOT(postfixAction) CONNECTED_SLOT(mailAction)
//Samba Log Action //Samba Log Action
KToggleAction* sambaAction=new KToggleAction(i18n("&Samba Log"), SAMBA_MODE_ICON, 0, NULL, NULL, actionCollection(), "samba_log" ); KToggleAction* sambaAction=new KToggleAction(i18n("&Samba Log"), SAMBA_MODE_ICON, 0, NULL, NULL, actionCollection(), "samba_log" );

@ -48,7 +48,7 @@
<Action name="apache_log" /> <Action name="apache_log" />
<Action name="apache_access_log" /> <Action name="apache_access_log" />
</Menu> </Menu>
<Action name="postfix_log" /> <Action name="mail_log" />
<Action name="samba_log" /> <Action name="samba_log" />
</Menu> </Menu>

@ -27,7 +27,7 @@
#include <kcmdlineargs.h> #include <kcmdlineargs.h>
#include <klocale.h> #include <klocale.h>
static const char description[]=I18N_NOOP("System Logs Viewer Tool for KDE"); static const char description[]=I18N_NOOP("System Logs Viewer Tool for TDE");
static const char version[]="0.3.2"; static const char version[]="0.3.2";

@ -39,7 +39,7 @@ Options::Options(TQWidget* parent, const char *name, bool modal) :
KDialogBase(IconList, i18n("Configuration"), Ok|Apply|Cancel, Ok, parent, name, modal, true) KDialogBase(IconList, i18n("Configuration"), Ok|Apply|Cancel, Ok, parent, name, modal, true)
{ {
this->setMinimumSize(480, 500); this->setMinimumSize(640, 500);
setupGeneralOptions(); setupGeneralOptions();
@ -54,7 +54,7 @@ Options::Options(TQWidget* parent, const char *name, bool modal) :
setupCupsOptions(); setupCupsOptions();
setupApacheOptions(); setupApacheOptions();
setupPostfixOptions(); setupMailOptions();
disableApplyButton(); disableApplyButton();
@ -197,7 +197,7 @@ void Options::setupKernelOptions() {
} }
void Options::setupCronOptions() { void Options::setupCronOptions() {
TQFrame* frame=addPage(i18n("Cron Log"), i18n("Cron Log"), DesktopIcon(CRON_MODE_ICON)); TQFrame* frame=addPage(i18n("Planned Tasks Cron Log"), i18n("Planned Tasks Cron Log"), DesktopIcon(CRON_MODE_ICON));
TQGridLayout* frameLayout=new TQGridLayout(frame); TQGridLayout* frameLayout=new TQGridLayout(frame);
frameLayout->setSpacing(0); frameLayout->setSpacing(0);
@ -365,8 +365,8 @@ void Options::setupApacheOptions() {
} }
void Options::setupPostfixOptions() { void Options::setupMailOptions() {
TQFrame* frame=addPage(i18n("Postfix Log"), i18n("Postfix Log"), DesktopIcon(POSTFIX_MODE_ICON)); TQFrame* frame=addPage(i18n("Mail Log"), i18n("Mail Log"), DesktopIcon(MAIL_MODE_ICON));
TQGridLayout* frameLayout=new TQGridLayout(frame); TQGridLayout* frameLayout=new TQGridLayout(frame);
frameLayout->setSpacing(0); frameLayout->setSpacing(0);
@ -380,16 +380,16 @@ void Options::setupPostfixOptions() {
container->setLineWidth(0); container->setLineWidth(0);
container->setMidLineWidth(0); container->setMidLineWidth(0);
postfixOptions=new PostfixOptions(container->viewport()); mailOptions=new MailOptions(container->viewport());
container->addChild(postfixOptions, 0, 0); container->addChild(mailOptions, 0, 0);
//Done by the setAutoAdd method //Done by the setAutoAdd method
//frameLayout->addWidget(container, 0, 0, 0); //frameLayout->addWidget(container, 0, 0, 0);
connect(postfixOptions, TQT_SIGNAL(optionsChanged(bool)), this, TQT_SLOT(optionsChanged(bool))); connect(mailOptions, TQT_SIGNAL(optionsChanged(bool)), this, TQT_SLOT(optionsChanged(bool)));
connect(this, TQT_SIGNAL(applyClicked()), postfixOptions, TQT_SLOT(saveConfig())); connect(this, TQT_SIGNAL(applyClicked()), mailOptions, TQT_SLOT(saveConfig()));
connect(this, TQT_SIGNAL(okClicked()), postfixOptions, TQT_SLOT(saveConfig())); connect(this, TQT_SIGNAL(okClicked()), mailOptions, TQT_SLOT(saveConfig()));
} }

@ -45,7 +45,7 @@
#include "cupsOptions.h" #include "cupsOptions.h"
#include "apacheOptions.h" #include "apacheOptions.h"
#include "postfixOptions.h" #include "mailOptions.h"
class Options: public KDialogBase { class Options: public KDialogBase {
Q_OBJECT Q_OBJECT
@ -77,7 +77,7 @@ class Options: public KDialogBase {
CupsOptions* cupsOptions; CupsOptions* cupsOptions;
ApacheOptions* apacheOptions; ApacheOptions* apacheOptions;
PostfixOptions* postfixOptions; MailOptions* mailOptions;
void setupGeneralOptions(); void setupGeneralOptions();
void setupSystemOptions(); void setupSystemOptions();
@ -94,7 +94,7 @@ class Options: public KDialogBase {
void setupApacheOptions(); void setupApacheOptions();
void setupPostfixOptions(); void setupMailOptions();
}; };

@ -1,7 +0,0 @@
INCLUDES = -I$(top_srcdir)/ksystemlog/src -I$(top_builddir)/ksystemlog/src/config $(all_includes)
METASOURCES = AUTO
noinst_LTLIBRARIES = libksystemlog_postfix.la
libksystemlog_postfix_la_LDFLAGS = $(all_libraries)
libksystemlog_postfix_la_SOURCES = postfixOptions.cpp
noinst_HEADERS = postfixOptions.h

@ -1,100 +0,0 @@
/***************************************************************************
* Copyright (C) 2005 by Nicolas Ternisien *
* nicolas.ternisien@gmail.com *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
//TQt includes
#include <tqlayout.h>
#include <tqvgroupbox.h>
#include <tqbuttongroup.h>
#include <tqlabel.h>
#include <tqpushbutton.h>
#include <tqvbox.h>
#include <tqhbox.h>
//KDE includes
#include <klocale.h>
#include <kactioncollection.h>
#include <kbuttonbox.h>
#include <klistbox.h>
#include <kfiledialog.h>
#include <kurl.h>
#include <kmessagebox.h>
#include <kiconloader.h>
#include <kdebug.h>
//Project includes
#include "postfixOptions.h"
#include "ksystemlogConfig.h"
PostfixOptions::PostfixOptions(TQWidget *parent) :
TQWidget(parent)
{
TQHBoxLayout *layout = new TQHBoxLayout(this);
layout->setAutoAdd(true);
TQString description= i18n("<qt><p>These files will be analyzed to display <b>Postfix Logs</b>. This list also determine the order in which the files are read.</p></qt>");
fileList=new SpecificFileList(this, description);
connect(fileList, TQT_SIGNAL(fileListChanged(int)), this, TQT_SLOT(slotFileListChanged(int)));
readConfig();
}
PostfixOptions::~PostfixOptions() {
}
bool PostfixOptions::isValid() {
if (fileList->count()>0)
return(true);
else
return(false);
}
void PostfixOptions::slotFileListChanged(int itemLeft) {
if (itemLeft==0)
emit optionsChanged(false);
else
emit optionsChanged(true);
}
void PostfixOptions::saveConfig() {
kdDebug() << "Saving config from Daemon Options..." << endl;
TQStringList stringList;
TQValueList<int> valueList;
fileList->saveConfig(stringList, valueList);
KSystemLogConfig::setPostfixPaths(stringList);
KSystemLogConfig::setPostfixLevels(valueList);
}
void PostfixOptions::readConfig() {
TQStringList stringList=KSystemLogConfig::postfixPaths();
TQValueList<int> valueList=KSystemLogConfig::postfixLevels();
fileList->readConfig(stringList, valueList);
}
#include "postfixOptions.moc"

@ -1,60 +0,0 @@
/***************************************************************************
* Copyright (C) 2005 by Nicolas Ternisien *
* nicolas.ternisien@gmail.com *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#ifndef _POSTFIX_OPTIONS_H_
#define _POSTFIX_OPTIONS_H_
#include <tqframe.h>
#include <tqspinbox.h>
#include <kpopupmenu.h>
#include <kconfig.h>
#include <kdialogbase.h>
#include <kurlrequester.h>
#include <kurl.h>
#include <kaction.h>
#include "globals.h"
#include "specificFileList.h"
#include "logLevel.h"
class PostfixOptions : public TQWidget {
Q_OBJECT
TQ_OBJECT
public:
PostfixOptions(TQWidget *parent = 0);
~PostfixOptions();
bool isValid();
public slots:
void saveConfig();
void readConfig();
void slotFileListChanged(int itemLeft);
signals:
void optionsChanged(bool valid);
private:
SpecificFileList* fileList;
};
#endif

@ -139,10 +139,10 @@ Reader* ReaderFactory::createReader(LogMode* logMode) {
} }
/** /**
* Using Postfix Mode in the current view * Using Mail Mode in the current view
*/ */
else if (logMode==Globals::postfixMode) { else if (logMode==Globals::mailMode) {
Reader* reader=new SystemReader(NULL, "postfix_reader"); Reader* reader=new SystemReader(NULL, "mail_reader");
return(reader); return(reader);
} }
@ -289,11 +289,11 @@ LogFiles* ReaderFactory::createLogFiles(LogMode* logMode) {
} }
/** /**
* Using Postfix Mode in the current view * Using Mail Mode in the current view
*/ */
else if (logMode==Globals::postfixMode) { else if (logMode==Globals::mailMode) {
//Give the log file list to the reader //Give the log file list to the reader
LogFiles* list=ReaderFactory::getPostfixLogFiles(); LogFiles* list=ReaderFactory::getMailLogFiles();
return(list); return(list);
} }
@ -476,9 +476,9 @@ LogFiles* ReaderFactory::getApacheAccessLogFiles() {
return(getNoModeLogFiles(stringList)); return(getNoModeLogFiles(stringList));
} }
LogFiles* ReaderFactory::getPostfixLogFiles() { LogFiles* ReaderFactory::getMailLogFiles() {
TQStringList files=KSystemLogConfig::postfixPaths(); TQStringList files=KSystemLogConfig::mailPaths();
TQValueList<int> levels=KSystemLogConfig::postfixLevels(); TQValueList<int> levels=KSystemLogConfig::mailLevels();
return(ReaderFactory::getGenericLogFiles(files, levels)); return(ReaderFactory::getGenericLogFiles(files, levels));
} }

@ -102,9 +102,9 @@ class ReaderFactory {
static LogFiles* getApacheAccessLogFiles(); static LogFiles* getApacheAccessLogFiles();
/** /**
* Get Postfix log files from configuration * Get Mail log files from configuration
*/ */
static LogFiles* getPostfixLogFiles(); static LogFiles* getMailLogFiles();
/** /**
* Get Bool log file from configuration * Get Bool log file from configuration

@ -98,5 +98,4 @@ void SystemOptions::readConfig() {
fileList->readConfig(stringList, valueList); fileList->readConfig(stringList, valueList);
} }
#include "systemOptions.moc" #include "systemOptions.moc"

Loading…
Cancel
Save