From 2d75f12d50a292b836229ae0156d36ed064732ff Mon Sep 17 00:00:00 2001 From: Darrell Anderson Date: Tue, 3 Apr 2012 19:14:45 -0500 Subject: 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. --- configure.in | 2 +- ksystemlog.kdevses | 2 +- ksystemlog/po/br.po | 2 +- ksystemlog/po/da.po | 2 +- ksystemlog/po/el.po | 2 +- ksystemlog/po/en_GB.po | 4 +- ksystemlog/po/ga.po | 2 +- ksystemlog/po/it.po | 2 +- ksystemlog/po/ksystemlog.pot | 12 +-- ksystemlog/po/pa.po | 2 +- ksystemlog/po/pl.po | 2 +- ksystemlog/po/rw.po | 2 +- ksystemlog/po/sv.po | 2 +- ksystemlog/po/tr.po | 2 +- ksystemlog/src/Makefile.am | 6 +- .../src/bootauth/bootAuthenticationOptions.cpp | 11 +-- ksystemlog/src/config/ksystemlog.kcfg | 16 ++-- ksystemlog/src/cron/cronOptions.cpp | 6 +- ksystemlog/src/daemon/daemonOptions.cpp | 4 +- ksystemlog/src/globals.cpp | 8 +- ksystemlog/src/globals.h | 4 +- ksystemlog/src/kernel/kernelOptions.cpp | 4 +- ksystemlog/src/ksystemlog.cpp | 18 ++-- ksystemlog/src/ksystemlogui.rc | 2 +- ksystemlog/src/main.cpp | 2 +- ksystemlog/src/options.cpp | 20 ++--- ksystemlog/src/options.h | 6 +- ksystemlog/src/postfix/Makefile.am | 7 -- ksystemlog/src/postfix/postfixOptions.cpp | 100 --------------------- ksystemlog/src/postfix/postfixOptions.h | 60 ------------- ksystemlog/src/readerFactory.cpp | 18 ++-- ksystemlog/src/readerFactory.h | 4 +- ksystemlog/src/system/systemOptions.cpp | 1 - 33 files changed, 82 insertions(+), 255 deletions(-) delete mode 100644 ksystemlog/src/postfix/Makefile.am delete mode 100644 ksystemlog/src/postfix/postfixOptions.cpp delete mode 100644 ksystemlog/src/postfix/postfixOptions.h diff --git a/configure.in b/configure.in index e6480f4..316673f 100644 --- a/configure.in +++ b/configure.in @@ -76,7 +76,7 @@ AC_CONFIG_FILES([ ksystemlog/src/cron/Makefile ]) AC_CONFIG_FILES([ ksystemlog/src/cups/Makefile ]) AC_CONFIG_FILES([ ksystemlog/src/daemon/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/system/Makefile ]) AC_CONFIG_FILES([ ksystemlog/src/xorg/Makefile ]) diff --git a/ksystemlog.kdevses b/ksystemlog.kdevses index eb90439..8e11eb8 100644 --- a/ksystemlog.kdevses +++ b/ksystemlog.kdevses @@ -35,7 +35,7 @@ - + diff --git a/ksystemlog/po/br.po b/ksystemlog/po/br.po index fae75fc..a168471 100644 --- a/ksystemlog/po/br.po +++ b/ksystemlog/po/br.po @@ -93,7 +93,7 @@ msgstr "" msgid "" "" "

These files will be analyzed to display Cron Logs " -"(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.

" msgstr "" diff --git a/ksystemlog/po/da.po b/ksystemlog/po/da.po index 890f008..8913fe8 100644 --- a/ksystemlog/po/da.po +++ b/ksystemlog/po/da.po @@ -97,7 +97,7 @@ msgstr "" msgid "" "" "

These files will be analyzed to display Cron Logs " -"(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.

" msgstr "" diff --git a/ksystemlog/po/el.po b/ksystemlog/po/el.po index 53c1ceb..13157ad 100644 --- a/ksystemlog/po/el.po +++ b/ksystemlog/po/el.po @@ -97,7 +97,7 @@ msgstr "" msgid "" "" "

These files will be analyzed to display Cron Logs " -"(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.

" msgstr "" diff --git a/ksystemlog/po/en_GB.po b/ksystemlog/po/en_GB.po index 3257dd0..26398eb 100644 --- a/ksystemlog/po/en_GB.po +++ b/ksystemlog/po/en_GB.po @@ -110,12 +110,12 @@ msgstr "" msgid "" "" "

These files will be analyzed to display Cron Logs " -"(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.

" msgstr "" "" "

These files will be analysed to display Cron Logs " -"(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.

" #: cronReader.cpp:40 cupsAccessReader.cpp:39 systemReader.cpp:39 diff --git a/ksystemlog/po/ga.po b/ksystemlog/po/ga.po index 593f234..87d9ebf 100644 --- a/ksystemlog/po/ga.po +++ b/ksystemlog/po/ga.po @@ -97,7 +97,7 @@ msgstr "" msgid "" "" "

These files will be analyzed to display Cron Logs " -"(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.

" msgstr "" diff --git a/ksystemlog/po/it.po b/ksystemlog/po/it.po index 3081f73..72749ca 100644 --- a/ksystemlog/po/it.po +++ b/ksystemlog/po/it.po @@ -97,7 +97,7 @@ msgstr "" msgid "" "" "

These files will be analyzed to display Cron Logs " -"(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.

" msgstr "" diff --git a/ksystemlog/po/ksystemlog.pot b/ksystemlog/po/ksystemlog.pot index d71c14f..fb05831 100644 --- a/ksystemlog/po/ksystemlog.pot +++ b/ksystemlog/po/ksystemlog.pot @@ -335,7 +335,7 @@ msgid "Authentication Log" msgstr "" #: globals.cpp:121 options.cpp:200 -msgid "Cron Log" +msgid "Planned Tasks Cron Log" msgstr "" #: globals.cpp:124 @@ -363,7 +363,7 @@ msgid "Apache Access Log" msgstr "" #: globals.cpp:142 options.cpp:369 -msgid "Postfix Log" +msgid "Mail Log" msgstr "" #: itemFactory.cpp:85 @@ -718,7 +718,7 @@ msgid "" msgstr "" #: ksystemlog.cpp:428 -msgid "&Planned Tasks Log" +msgid "&Planned Tasks Cron Log" msgstr "" #: ksystemlog.cpp:429 @@ -824,16 +824,16 @@ msgid "" msgstr "" #: ksystemlog.cpp:485 -msgid "&Postfix Log" +msgid "&Mail Log" msgstr "" #: ksystemlog.cpp:486 -msgid "Display the Postfix log." +msgid "Display the mail log." msgstr "" #: ksystemlog.cpp:487 msgid "" -"Displays the Postfix log in the current tab. Postfix is the most known " +"Displays the mail log in the current tab. Mail is the most known " "and used mail server in the Linux world." msgstr "" diff --git a/ksystemlog/po/pa.po b/ksystemlog/po/pa.po index 3b44365..bd8d4ef 100644 --- a/ksystemlog/po/pa.po +++ b/ksystemlog/po/pa.po @@ -97,7 +97,7 @@ msgstr "" msgid "" "" "

These files will be analyzed to display Cron Logs " -"(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.

" msgstr "" diff --git a/ksystemlog/po/pl.po b/ksystemlog/po/pl.po index 7600a06..546079a 100644 --- a/ksystemlog/po/pl.po +++ b/ksystemlog/po/pl.po @@ -115,7 +115,7 @@ msgstr "" msgid "" "" "

These files will be analyzed to display Cron Logs " -"(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.

" msgstr "" "" diff --git a/ksystemlog/po/rw.po b/ksystemlog/po/rw.po index ab317bc..adfc162 100644 --- a/ksystemlog/po/rw.po +++ b/ksystemlog/po/rw.po @@ -133,7 +133,7 @@ msgstr "" msgid "" "" "

These files will be analyzed to display Cron Logs " -"(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.

" msgstr "

e." diff --git a/ksystemlog/po/sv.po b/ksystemlog/po/sv.po index aead0f7..96c1951 100644 --- a/ksystemlog/po/sv.po +++ b/ksystemlog/po/sv.po @@ -111,7 +111,7 @@ msgstr "" msgid "" "" "

These files will be analyzed to display Cron Logs " -"(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.

" msgstr "" "" diff --git a/ksystemlog/po/tr.po b/ksystemlog/po/tr.po index e6ba09d..2ca7933 100644 --- a/ksystemlog/po/tr.po +++ b/ksystemlog/po/tr.po @@ -97,7 +97,7 @@ msgstr "" msgid "" "" "

These files will be analyzed to display Cron Logs " -"(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.

" msgstr "" diff --git a/ksystemlog/src/Makefile.am b/ksystemlog/src/Makefile.am index e09b0c3..c0588e3 100644 --- a/ksystemlog/src/Makefile.am +++ b/ksystemlog/src/Makefile.am @@ -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/cron -I$(top_srcdir)/ksystemlog/src/cups \ -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) # the library search path. @@ -24,7 +24,7 @@ ksystemlog_LDADD = \ $(top_builddir)/ksystemlog/src/daemon/libksystemlog_daemon.la \ $(top_builddir)/ksystemlog/src/cups/libksystemlog_cups.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/system/libksystemlog_system.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 \ 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 . diff --git a/ksystemlog/src/bootauth/bootAuthenticationOptions.cpp b/ksystemlog/src/bootauth/bootAuthenticationOptions.cpp index 6be3dfb..7ef49a4 100644 --- a/ksystemlog/src/bootauth/bootAuthenticationOptions.cpp +++ b/ksystemlog/src/bootauth/bootAuthenticationOptions.cpp @@ -52,19 +52,17 @@ BootAuthenticationOptions::BootAuthenticationOptions(TQWidget *parent) : //Boot log file TQVGroupBox* bootBox=new TQVGroupBox(i18n("Boot Log File"), this); - new TQLabel(i18n("Boot Log File:"), bootBox); bootURLRequester=new KURLRequester(bootBox); bootURLRequester->setMode(KFile::File); - TQToolTip::add(bootURLRequester, i18n("Here, you can type or choose the boot log file (example: /var/log/boot.log).")); - TQWhatsThis::add(bootURLRequester, i18n("You can type or choose here the boot log file. This file will be analyzed by KSystemLog when you will choose the Boot log menu item. Generally, its name is /var/log/boot.log")); + TQToolTip::add(bootURLRequester, i18n("Here, you can type or choose the boot log file (example: /var/log/boot.log or /var/log/dmesg).")); + TQWhatsThis::add(bootURLRequester, i18n("You can type or choose here the boot log file. This file will be analyzed by KSystemLog when you choose the Boot log menu item. Generally, the name is /var/log/boot.log or /var/log/dmesg")); connect(bootURLRequester, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(onOptionsChanged(const TQString&))); //Authentication log file TQVGroupBox* authenticationBox=new TQVGroupBox(i18n("Authentication Log File"), this); - new TQLabel(i18n("Authentication Log File:"), authenticationBox); authenticationURLRequester=new KURLRequester(authenticationBox); authenticationURLRequester->setMode(KFile::File); @@ -86,7 +84,7 @@ BootAuthenticationOptions::BootAuthenticationOptions(TQWidget *parent) : void BootAuthenticationOptions::readConfig() { TQString file=KSystemLogConfig::bootPath(); bootURLRequester->setURL(file); - + file=KSystemLogConfig::authenticationPath(); authenticationURLRequester->setURL(file); } @@ -94,8 +92,7 @@ void BootAuthenticationOptions::readConfig() { void BootAuthenticationOptions::saveConfig() { kdDebug() << "Save config from Boot Authentication Options" << endl; - KSystemLogConfig::setAuthenticationPath(bootURLRequester->url()); - + KSystemLogConfig::setBootPath(bootURLRequester->url()); KSystemLogConfig::setAuthenticationPath(authenticationURLRequester->url()); } diff --git a/ksystemlog/src/config/ksystemlog.kcfg b/ksystemlog/src/config/ksystemlog.kcfg index d611025..6d065cc 100644 --- a/ksystemlog/src/config/ksystemlog.kcfg +++ b/ksystemlog/src/config/ksystemlog.kcfg @@ -127,14 +127,14 @@ /var/log/apache/access.log - - - - /var/log/mail.info,/var/log/mail.warn,/var/log/mail.err - - - - 2,4,5 + + + + /var/log/mail.err,/var/log/mail.warn,/var/log/mail.info + + + + 5,4,2 diff --git a/ksystemlog/src/cron/cronOptions.cpp b/ksystemlog/src/cron/cronOptions.cpp index de63023..68ef2e5 100644 --- a/ksystemlog/src/cron/cronOptions.cpp +++ b/ksystemlog/src/cron/cronOptions.cpp @@ -43,13 +43,13 @@ #include "ksystemlogConfig.h" CronOptions::CronOptions(TQWidget *parent) : - TQWidget(parent) + TQWidget(parent) { - + TQHBoxLayout *layout = new TQHBoxLayout(this); layout->setAutoAdd(true); - TQString description= i18n("

These files will be analyzed to display Cron Logs (i.e. planned tasks logs). This list also determines the order in which the files are read.

"); + TQString description= i18n("

These files will be analyzed to display Cron Logs (planned tasks logs). This list also determines the order in which the files are read.

"); fileList=new SpecificFileList(this, description); connect(fileList, TQT_SIGNAL(fileListChanged(int)), this, TQT_SLOT(slotFileListChanged(int))); diff --git a/ksystemlog/src/daemon/daemonOptions.cpp b/ksystemlog/src/daemon/daemonOptions.cpp index 098c1d0..0c5864f 100644 --- a/ksystemlog/src/daemon/daemonOptions.cpp +++ b/ksystemlog/src/daemon/daemonOptions.cpp @@ -43,9 +43,9 @@ #include "ksystemlogConfig.h" DaemonOptions::DaemonOptions(TQWidget *parent) : - TQWidget(parent) + TQWidget(parent) { - + TQHBoxLayout *layout = new TQHBoxLayout(this); layout->setAutoAdd(true); diff --git a/ksystemlog/src/globals.cpp b/ksystemlog/src/globals.cpp index 1acea06..91f2309 100644 --- a/ksystemlog/src/globals.cpp +++ b/ksystemlog/src/globals.cpp @@ -87,7 +87,7 @@ LogMode* Globals::cupsAccessMode=NULL; LogMode* Globals::apacheMode=NULL; LogMode* Globals::apacheAccessMode=NULL; -LogMode* Globals::postfixMode=NULL; +LogMode* Globals::mailMode=NULL; LogMode* Globals::sambaMode=NULL; @@ -118,7 +118,7 @@ void Globals::setupLogModes() { Globals::authenticationMode=new LogMode(i++, i18n("Authentication Log"), AUTHENTICATION_MODE_ICON); 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::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::logModes.append(apacheAccessMode); - Globals::postfixMode=new LogMode(i++, i18n("Postfix Log"), POSTFIX_MODE_ICON); - Globals::logModes.append(postfixMode); + Globals::mailMode=new LogMode(i++, i18n("Mail Log"), MAIL_MODE_ICON); + Globals::logModes.append(mailMode); Globals::sambaMode=new LogMode(i++, i18n("Samba Log"), SAMBA_MODE_ICON); Globals::logModes.append(sambaMode); diff --git a/ksystemlog/src/globals.h b/ksystemlog/src/globals.h index da9b400..7658ab4 100644 --- a/ksystemlog/src/globals.h +++ b/ksystemlog/src/globals.h @@ -119,7 +119,7 @@ enum groupByType { #define APACHE_MODE_ICON "network" #define APACHE_ACCESS_MODE_ICON "history" -#define POSTFIX_MODE_ICON "email" +#define MAIL_MODE_ICON "email" #define SAMBA_MODE_ICON "samba" @@ -155,7 +155,7 @@ class Globals { static LogMode* apacheMode; static LogMode* apacheAccessMode; - static LogMode* postfixMode; + static LogMode* mailMode; static LogMode* sambaMode; diff --git a/ksystemlog/src/kernel/kernelOptions.cpp b/ksystemlog/src/kernel/kernelOptions.cpp index e42b2a9..f1afa4d 100644 --- a/ksystemlog/src/kernel/kernelOptions.cpp +++ b/ksystemlog/src/kernel/kernelOptions.cpp @@ -36,7 +36,6 @@ #include #include #include - #include //Project includes @@ -44,7 +43,7 @@ #include "ksystemlogConfig.h" KernelOptions::KernelOptions(TQWidget *parent) : - TQWidget(parent) + TQWidget(parent) { TQHBoxLayout *layout = new TQHBoxLayout(this); @@ -97,5 +96,4 @@ void KernelOptions::readConfig() { fileList->readConfig(stringList, valueList); } - #include "kernelOptions.moc" diff --git a/ksystemlog/src/ksystemlog.cpp b/ksystemlog/src/ksystemlog.cpp index 49cba9a..20e5bb5 100644 --- a/ksystemlog/src/ksystemlog.cpp +++ b/ksystemlog/src/ksystemlog.cpp @@ -131,7 +131,7 @@ KSystemLog::KSystemLog() : //TODO Try to find an improvement of this _big_ hack //Set its default size, the first time KSystemLog is loaded if (!initialGeometrySet()) - resize(600,450); + resize(790,590); //Show before reading the config because users can think that KSystemLog //have not been launched if it takes too long time to start. @@ -446,7 +446,7 @@ void KSystemLog::setupLogActions() { CONNECTED_SLOT(daemonAction) //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->setWhatsThis(i18n("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.")); cronAction->setExclusiveGroup(exclusiveGroup); @@ -502,13 +502,13 @@ void KSystemLog::setupLogActions() { mapActionLogModes[apacheAccessAction]=Globals::apacheAccessMode; CONNECTED_SLOT(apacheAccessAction) - //Postfix Log Action - KToggleAction* postfixAction=new KToggleAction(i18n("&Postfix Log"), POSTFIX_MODE_ICON, 0, NULL, NULL, actionCollection(), "postfix_log" ); - postfixAction->setToolTip(i18n("Display the Postfix log.")); - postfixAction->setWhatsThis(i18n("Displays the Postfix log in the current tab. Postfix is the most known and used mail server in the Linux world.")); - postfixAction->setExclusiveGroup(exclusiveGroup); - mapActionLogModes[postfixAction]=Globals::postfixMode; - CONNECTED_SLOT(postfixAction) + //Mail Log Action + KToggleAction* mailAction=new KToggleAction(i18n("&Mail Log"), MAIL_MODE_ICON, 0, NULL, NULL, actionCollection(), "mail_log" ); + mailAction->setToolTip(i18n("Display the Mail log.")); + mailAction->setWhatsThis(i18n("Displays the mail log in the current tab. Mail is the most known and used mail server in the Linux world.")); + mailAction->setExclusiveGroup(exclusiveGroup); + mapActionLogModes[mailAction]=Globals::mailMode; + CONNECTED_SLOT(mailAction) //Samba Log Action KToggleAction* sambaAction=new KToggleAction(i18n("&Samba Log"), SAMBA_MODE_ICON, 0, NULL, NULL, actionCollection(), "samba_log" ); diff --git a/ksystemlog/src/ksystemlogui.rc b/ksystemlog/src/ksystemlogui.rc index 7ac2e05..4f05f09 100644 --- a/ksystemlog/src/ksystemlogui.rc +++ b/ksystemlog/src/ksystemlogui.rc @@ -48,7 +48,7 @@ - + diff --git a/ksystemlog/src/main.cpp b/ksystemlog/src/main.cpp index 0562304..a89e219 100644 --- a/ksystemlog/src/main.cpp +++ b/ksystemlog/src/main.cpp @@ -27,7 +27,7 @@ #include #include -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"; diff --git a/ksystemlog/src/options.cpp b/ksystemlog/src/options.cpp index 3a68aac..27e9588 100644 --- a/ksystemlog/src/options.cpp +++ b/ksystemlog/src/options.cpp @@ -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) { - this->setMinimumSize(480, 500); + this->setMinimumSize(640, 500); setupGeneralOptions(); @@ -54,7 +54,7 @@ Options::Options(TQWidget* parent, const char *name, bool modal) : setupCupsOptions(); setupApacheOptions(); - setupPostfixOptions(); + setupMailOptions(); disableApplyButton(); @@ -197,7 +197,7 @@ void Options::setupKernelOptions() { } 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); frameLayout->setSpacing(0); @@ -365,8 +365,8 @@ void Options::setupApacheOptions() { } -void Options::setupPostfixOptions() { - TQFrame* frame=addPage(i18n("Postfix Log"), i18n("Postfix Log"), DesktopIcon(POSTFIX_MODE_ICON)); +void Options::setupMailOptions() { + TQFrame* frame=addPage(i18n("Mail Log"), i18n("Mail Log"), DesktopIcon(MAIL_MODE_ICON)); TQGridLayout* frameLayout=new TQGridLayout(frame); frameLayout->setSpacing(0); @@ -380,16 +380,16 @@ void Options::setupPostfixOptions() { container->setLineWidth(0); container->setMidLineWidth(0); - postfixOptions=new PostfixOptions(container->viewport()); - container->addChild(postfixOptions, 0, 0); + mailOptions=new MailOptions(container->viewport()); + container->addChild(mailOptions, 0, 0); //Done by the setAutoAdd method //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(okClicked()), postfixOptions, TQT_SLOT(saveConfig())); + connect(this, TQT_SIGNAL(applyClicked()), mailOptions, TQT_SLOT(saveConfig())); + connect(this, TQT_SIGNAL(okClicked()), mailOptions, TQT_SLOT(saveConfig())); } diff --git a/ksystemlog/src/options.h b/ksystemlog/src/options.h index eacebca..59ed781 100644 --- a/ksystemlog/src/options.h +++ b/ksystemlog/src/options.h @@ -45,7 +45,7 @@ #include "cupsOptions.h" #include "apacheOptions.h" -#include "postfixOptions.h" +#include "mailOptions.h" class Options: public KDialogBase { Q_OBJECT @@ -77,7 +77,7 @@ class Options: public KDialogBase { CupsOptions* cupsOptions; ApacheOptions* apacheOptions; - PostfixOptions* postfixOptions; + MailOptions* mailOptions; void setupGeneralOptions(); void setupSystemOptions(); @@ -94,7 +94,7 @@ class Options: public KDialogBase { void setupApacheOptions(); - void setupPostfixOptions(); + void setupMailOptions(); }; diff --git a/ksystemlog/src/postfix/Makefile.am b/ksystemlog/src/postfix/Makefile.am deleted file mode 100644 index b608b89..0000000 --- a/ksystemlog/src/postfix/Makefile.am +++ /dev/null @@ -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 diff --git a/ksystemlog/src/postfix/postfixOptions.cpp b/ksystemlog/src/postfix/postfixOptions.cpp deleted file mode 100644 index 57628ea..0000000 --- a/ksystemlog/src/postfix/postfixOptions.cpp +++ /dev/null @@ -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 -#include -#include -#include -#include -#include -#include - -//KDE includes -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -//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("

These files will be analyzed to display Postfix Logs. This list also determine the order in which the files are read.

"); - 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 valueList; - - fileList->saveConfig(stringList, valueList); - - KSystemLogConfig::setPostfixPaths(stringList); - KSystemLogConfig::setPostfixLevels(valueList); -} - -void PostfixOptions::readConfig() { - TQStringList stringList=KSystemLogConfig::postfixPaths(); - TQValueList valueList=KSystemLogConfig::postfixLevels(); - - fileList->readConfig(stringList, valueList); -} - -#include "postfixOptions.moc" diff --git a/ksystemlog/src/postfix/postfixOptions.h b/ksystemlog/src/postfix/postfixOptions.h deleted file mode 100644 index d2582e5..0000000 --- a/ksystemlog/src/postfix/postfixOptions.h +++ /dev/null @@ -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 -#include - -#include -#include -#include -#include -#include -#include - -#include "globals.h" -#include "specificFileList.h" -#include "logLevel.h" - -class PostfixOptions : public TQWidget { - Q_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 diff --git a/ksystemlog/src/readerFactory.cpp b/ksystemlog/src/readerFactory.cpp index 6f7eb85..0f1211b 100644 --- a/ksystemlog/src/readerFactory.cpp +++ b/ksystemlog/src/readerFactory.cpp @@ -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) { - Reader* reader=new SystemReader(NULL, "postfix_reader"); + else if (logMode==Globals::mailMode) { + Reader* reader=new SystemReader(NULL, "mail_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 - LogFiles* list=ReaderFactory::getPostfixLogFiles(); + LogFiles* list=ReaderFactory::getMailLogFiles(); return(list); } @@ -476,9 +476,9 @@ LogFiles* ReaderFactory::getApacheAccessLogFiles() { return(getNoModeLogFiles(stringList)); } -LogFiles* ReaderFactory::getPostfixLogFiles() { - TQStringList files=KSystemLogConfig::postfixPaths(); - TQValueList levels=KSystemLogConfig::postfixLevels(); +LogFiles* ReaderFactory::getMailLogFiles() { + TQStringList files=KSystemLogConfig::mailPaths(); + TQValueList levels=KSystemLogConfig::mailLevels(); return(ReaderFactory::getGenericLogFiles(files, levels)); } diff --git a/ksystemlog/src/readerFactory.h b/ksystemlog/src/readerFactory.h index 6760d8a..4f6ce0a 100644 --- a/ksystemlog/src/readerFactory.h +++ b/ksystemlog/src/readerFactory.h @@ -102,9 +102,9 @@ class ReaderFactory { 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 diff --git a/ksystemlog/src/system/systemOptions.cpp b/ksystemlog/src/system/systemOptions.cpp index bed499e..6c04af2 100644 --- a/ksystemlog/src/system/systemOptions.cpp +++ b/ksystemlog/src/system/systemOptions.cpp @@ -98,5 +98,4 @@ void SystemOptions::readConfig() { fileList->readConfig(stringList, valueList); } - #include "systemOptions.moc" -- cgit v1.2.1