summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--kmicromail/kmicromailE.pro4
-rw-r--r--kmicromail/koprefsdialog.cpp16
-rw-r--r--kmicromail/koprefsdialog.h3
-rw-r--r--korganizer/koprefsdialog.cpp12
-rw-r--r--korganizer/koprefsdialog.h3
5 files changed, 34 insertions, 4 deletions
diff --git a/kmicromail/kmicromailE.pro b/kmicromail/kmicromailE.pro
index 0d6cf86..75ba92f 100644
--- a/kmicromail/kmicromailE.pro
+++ b/kmicromail/kmicromailE.pro
@@ -33,38 +33,38 @@ SOURCES = main.cpp \
settingsdialog.cpp \
statuswidget.cpp \
newmaildir.cpp \
selectstore.cpp \
selectsmtp.cpp \
nntpgroups.cpp \
koprefs.cpp\
koprefsdialog.cpp\
nntpgroupsdlg.cpp
INTERFACES = editaccountsui.ui \
selectmailtypeui.ui \
imapconfigui.ui \
pop3configui.ui \
nntpconfigui.ui \
smtpconfigui.ui \
composemailui.ui \
settingsdialogui.ui \
statuswidgetui.ui \
newmaildirui.ui \
selectstoreui.ui \
nntpgroupsui.ui
-INCLUDEPATH += . $(KDEPIMDIR) $(KDEPIMDIR)/qtcompat $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore libetpan/include $(KDEPIMDIR)/microkde/kdeui $(QPEDIR)/include
-LIBS += -L$(QPEDIR)/lib -lkmicromailwrapper -lqpe -lkmicrolibetpan -lmicrokde -lmicroqtcompat -lssl -lcrypto -ljpeg -lmicrokde -lmicroqtcompat -lmicrokabc -lmicrokcal -lmicrokdepim
+INCLUDEPATH += . $(KDEPIMDIR) $(KDEPIMDIR)/libkdepim $(KDEPIMDIR)/qtcompat $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore libetpan/include $(KDEPIMDIR)/microkde/kdeui $(QPEDIR)/include
+LIBS += -L$(QPEDIR)/lib -lkmicromailwrapper -lqpe -lkmicrolibetpan -lmicrokde -lmicroqtcompat -lssl -lcrypto -ljpeg -lmicroqtcompat -lmicrokdepim
LIBS += $(QTOPIALIB)
#LIBS += -lqtopia
#next line for Zaurus only
#LIBS += -luuid
#
OBJECTS_DIR = obj/$(PLATFORM)
MOC_DIR = moc/$(PLATFORM)
DESTDIR=$(QPEDIR)/bin
TARGET = ompi
diff --git a/kmicromail/koprefsdialog.cpp b/kmicromail/koprefsdialog.cpp
index 7d7bd2a..598d12f 100644
--- a/kmicromail/koprefsdialog.cpp
+++ b/kmicromail/koprefsdialog.cpp
@@ -39,83 +39,94 @@
#include <qcheckbox.h>
#include <qradiobutton.h>
#include <qpushbutton.h>
#include <qstrlist.h>
#include <qapplication.h>
#include <kcolorbutton.h>
#include <kdebug.h>
#include <klocale.h>
#include <kglobal.h>
#include <kfontdialog.h>
#include <kfiledialog.h>
#include <kmessagebox.h>
#include <kcolordialog.h>
#include <kiconloader.h>
#include <kemailsettings.h>
#include <kstandarddirs.h>
#include <klineedit.h>
#include "koprefs.h"
#include "koprefsdialog.h"
+//#include <kprefswidget.h>
KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) :
KPrefsDialog(KOPrefs::instance(),parent,name,true)
{
setCaption( i18n("Settings - some need a restart (nr)"));
+ setupGlobalTab();
setupMainTab();
setupMailTab();;
setupFontsTab();
readConfig();
#if 0
setupMainTab();
setupLocaleTab();
setupTimeZoneTab();
setupTimeTab();
setupLocaleDateTab();
setupFontsTab();
setupColorsTab();
setupViewsTab();
//setupSyncTab();
//setupSyncAlgTab();
//setupPrinterTab();
//setupGroupSchedulingTab();
//setupGroupAutomationTab();
#endif
}
+#include "kpimglobalprefs.h"
KOPrefsDialog::~KOPrefsDialog()
{
}
+void KOPrefsDialog::setupGlobalTab()
+{
+ QFrame *topFrame = addPage(i18n("Global"),0,0);
+ kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" );
+ QVBoxLayout *topLayout = new QVBoxLayout(topFrame);
+ topLayout->addWidget( kdelibcfg );
+
+}
void KOPrefsDialog::setupMainTab()
{
QFrame *topFrame = addPage(i18n("General"),0,0);
QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
topLayout->setSpacing(spacingHint());
topLayout->setMargin(marginHint());
mNameEdit = new QLineEdit(topFrame);
mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame);
topLayout->addWidget(mNameLabel,0,0);
topLayout->addWidget(mNameEdit,0,1);
mEmailEdit = new QLineEdit(topFrame);
mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame);
topLayout->addWidget(mEmailLabel,1,0);
topLayout->addWidget(mEmailEdit,1,1);
QLabel *lab = new QLabel( i18n("HINT: Separate multiple\neMail addresses by \";\""), topFrame);
topLayout->addMultiCellWidget(lab,2,2,0,1);
KPrefsDialogWidBool* ttt = addWidBool(i18n("Ignore above settings and\nuse KA/Pi \"Who am I\" instead!"),
&(KOPrefs::instance()->mUseKapi),topFrame);
topLayout->addMultiCellWidget(ttt->checkBox(),3,3,0,1);
}
@@ -160,57 +171,58 @@ void KOPrefsDialog::setupFontsTab()
timeLabelsFont =
addWidFont(i18n("Dear Mr."),i18n("Compose mail:"),
&(KOPrefs::instance()->mComposeFont),topFrame);
topLayout->addWidget(timeLabelsFont->label(),i,0);
topLayout->addWidget(timeLabelsFont->preview(),i,1);
topLayout->addWidget(timeLabelsFont->button(),i,2);
++i;
KPrefsDialogWidFont *timeBarFont =
addWidFont(i18n("Hello"),i18n("Read mail:"),
&(KOPrefs::instance()->mReadFont),topFrame);
topLayout->addWidget(timeBarFont->label(),i,0);
topLayout->addWidget(timeBarFont->preview(),i,1);
topLayout->addWidget(timeBarFont->button(),i,2);
++i;
topLayout->setColStretch(1,1);
topLayout->setRowStretch(4,1);
}
void KOPrefsDialog::usrReadConfig()
{
- qDebug("read ");
+
mNameEdit->setText(KOPrefs::instance()->mName);
mEmailEdit->setText(KOPrefs::instance()->mEmail);
+ kdelibcfg->readConfig();
}
void KOPrefsDialog::usrWriteConfig()
{
- qDebug("write ");
KOPrefs::instance()->mName = mNameEdit->text();
KOPrefs::instance()->mEmail = mEmailEdit->text();
+ kdelibcfg->writeConfig();
}
#if 0
void KOPrefsDialog::setupLocaleDateTab()
{
QFrame *topFrame = addPage(i18n("Date Format"),0,0);
QGridLayout *topLayout = new QGridLayout(topFrame,3,2);
topLayout->setSpacing(spacingHint());
topLayout->setMargin(marginHint());
int iii = 0;
KPrefsWidRadios *syncPrefsGroup =
addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame);
QString format;
if ( QApplication::desktop()->width() < 480 )
format = "(%d.%m.%Y)";
else
format = "(%d.%m.%Y|%A %d %B %Y)";
syncPrefsGroup->addRadio(i18n("24.03.2004 "+format));
if ( QApplication::desktop()->width() < 480 )
format = "(%m.%d.%Y)";
diff --git a/kmicromail/koprefsdialog.h b/kmicromail/koprefsdialog.h
index 4b6bd4b..615574b 100644
--- a/kmicromail/koprefsdialog.h
+++ b/kmicromail/koprefsdialog.h
@@ -11,75 +11,78 @@
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
As a special exception, permission is given to link this program
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#ifndef _KOPREFSDIALOG_H
#define _KOPREFSDIALOG_H
#include <qframe.h>
#include <qdict.h>
#include <qcolor.h>
#include <qlistview.h>
#include <kdialogbase.h>
#include <libkdepim/kprefsdialog.h>
#include <libkdepim/kdateedit.h>
+#include <kcmconfigs/kdepimconfigwidget.h>
class KColorButton;
class QSpinBox;
class QSlider;
class KURLRequester;
class QComboBox;
class QLineEdit;
class QStringList;
/** Dialog to change the korganizer configuration.
*/
class KOPrefsDialog : public KPrefsDialog
{
Q_OBJECT
public:
/** Initialize dialog and pages */
KOPrefsDialog(QWidget *parent=0,char *name=0,bool modal=false);
~KOPrefsDialog();
protected:
void usrReadConfig();
void usrWriteConfig();
void setupMainTab();
+ void setupGlobalTab();
void setupMailTab();
void setupFontsTab();
private:
+ KDEPIMConfigWidget* kdelibcfg;
QLineEdit *mNameEdit;
QLineEdit *mEmailEdit;
QLabel *mNameLabel;
QLabel *mEmailLabel;
#if 0
/*
public slots:
void showPrinterTab();
void updateCategories();
void showSyncPage();
protected slots:
void selectSoundFile();
void setCategoryColor();
void updateCategoryColor();
void updateTimezoneOffset( int );
void warningExperimental(bool on);
void warningGroupScheduling();
void warningProjectView();
void toggleEmailSettings(bool);
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp
index 1c30faa..7dafcd8 100644
--- a/korganizer/koprefsdialog.cpp
+++ b/korganizer/koprefsdialog.cpp
@@ -46,79 +46,89 @@
#include <kdebug.h>
#include <klocale.h>
#include <kglobal.h>
#include <kfontdialog.h>
#include <kfiledialog.h>
#include <kmessagebox.h>
#include <kcolordialog.h>
#include <kiconloader.h>
#include <kemailsettings.h>
#include <kstandarddirs.h>
#include <kurlrequester.h>
#include <klineedit.h>
#if defined(USE_SOLARIS)
#include <sys/param.h>
#define ZONEINFODIR "/usr/share/lib/zoneinfo"
#define INITFILE "/etc/default/init"
#endif
#include "koprefs.h"
#include "koprefsdialog.h"
+#include "kpimglobalprefs.h"
KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) :
KPrefsDialog(KOPrefs::instance(),parent,name,true)
{
setCaption( i18n("Preferences - some settings need a restart (nr)"));
mCategoryDict.setAutoDelete(true);
KGlobal::locale()->insertCatalogue("timezones");
+ setupGlobalTab();
setupMainTab();
setupLocaleTab();
setupTimeZoneTab();
setupTimeTab();
setupLocaleDateTab();
setupFontsTab();
setupColorsTab();
setupViewsTab();
//setupSyncTab();
//setupSyncAlgTab();
//setupPrinterTab();
//setupGroupSchedulingTab();
//setupGroupAutomationTab();
}
KOPrefsDialog::~KOPrefsDialog()
{
}
+void KOPrefsDialog::setupGlobalTab()
+{
+ QFrame *topFrame = addPage(i18n("Global"),0,0);
+ kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" );
+ QVBoxLayout *topLayout = new QVBoxLayout(topFrame);
+ topLayout->addWidget( kdelibcfg );
+
+}
void KOPrefsDialog::setupLocaleDateTab()
{
QFrame *topFrame = addPage(i18n("Date Format"),0,0);
QGridLayout *topLayout = new QGridLayout(topFrame,3,2);
topLayout->setSpacing(spacingHint());
topLayout->setMargin(marginHint());
int iii = 0;
KPrefsDialogWidRadios *syncPrefsGroup =
addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame);
QString format;
if ( QApplication::desktop()->width() < 480 )
format = "(%d.%m.%Y)";
else
format = "(%d.%m.%Y|%A %d %B %Y)";
syncPrefsGroup->addRadio(i18n("24.03.2004 "+format));
if ( QApplication::desktop()->width() < 480 )
format = "(%m.%d.%Y)";
else
format = "(%m.%d.%Y|%A %B %d %Y)";
syncPrefsGroup->addRadio(i18n("03.24.2004 "+format));
if ( QApplication::desktop()->width() < 480 )
format = "(%Y-%m-%d)";
@@ -1300,48 +1310,49 @@ void KOPrefsDialog::setupGroupAutomationTab()
void KOPrefsDialog::showPrinterTab()
{
showPage(pageIndex(mPrinterTab));
}
void KOPrefsDialog::setCombo(QComboBox *combo, const QString & text,
const QStringList *tags)
{
if (tags) {
int i = tags->findIndex(text);
if (i > 0) combo->setCurrentItem(i);
} else {
for(int i=0;i<combo->count();++i) {
if (combo->text(i) == text) {
combo->setCurrentItem(i);
break;
}
}
}
}
void KOPrefsDialog::usrReadConfig()
{
+ kdelibcfg->readConfig();
mNameEdit->setText(KOPrefs::instance()->fullName());
mEmailEdit->setText(KOPrefs::instance()->email());
mAutoSaveIntervalSpin->setValue(KOPrefs::instance()->mAutoSaveInterval);
QDate current ( 2001, 1,1);
mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1));
mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1));
setCombo(mTimeZoneCombo,i18n(KOPrefs::instance()->mTimeZoneId));
//mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset);
mStartTimeSpin->setValue(KOPrefs::instance()->mStartTime);
mDefaultDurationSpin->setValue(KOPrefs::instance()->mDefaultDuration);
mAlarmTimeCombo->setCurrentItem(KOPrefs::instance()->mAlarmTime);
// if (KOPrefs::instance()->mAllDaySize > 47 )
// KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize/2;
//mHourSizeSlider->setValue(KOPrefs::instance()->mAllDaySize);
mNextXDaysSpin->setValue(KOPrefs::instance()->mNextXDays);
mWhatsNextSpin->setValue(KOPrefs::instance()->mWhatsNextDays);
mPrioSpin->setValue(KOPrefs::instance()->mWhatsNextPrios);
// mAMails->clear();
// for ( QStringList::Iterator it = KOPrefs::instance()->mAdditionalMails.begin();
// it != KOPrefs::instance()->mAdditionalMails.end(); ++it ) {
// QListViewItem *item = new QListViewItem(mAMails);
// item->setText(0,*it);
@@ -1349,48 +1360,49 @@ void KOPrefsDialog::usrReadConfig()
// }
// mRemoteIPEdit->setText(KOPrefs::instance()->mRemoteIP);
//mRemoteUser->setText(KOPrefs::instance()->mRemoteUser);
//mRemotePassWd->setText(KOPrefs::instance()->mRemotePassWd);
//mRemoteFile->setText(KOPrefs::instance()->mRemoteFile);
//that soundmLocalTempFile->setText(KOPrefs::instance()->mLocalTempFile);
mDefaultAlarmFile->setText(KOPrefs::instance()->mDefaultAlarmFile);
QString dummy = KOPrefs::instance()->mUserDateFormatLong;
mUserDateFormatLong->setText(dummy.replace( QRegExp("K"), QString(",") ));
dummy = KOPrefs::instance()->mUserDateFormatShort;
mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") ));
updateCategories();
mAlarmPlayBeeps->setValue(KOPrefs::instance()->mAlarmPlayBeeps );
mAlarmSuspendTime->setValue(KOPrefs::instance()->mAlarmSuspendTime );
mAlarmSuspendCount->setValue(KOPrefs::instance()->mAlarmSuspendCount );
mAlarmBeepInterval->setValue(KOPrefs::instance()->mAlarmBeepInterval );
}
void KOPrefsDialog::usrWriteConfig()
{
+ kdelibcfg->writeConfig();
// KOPrefs::instance()->mRemoteIP = mRemoteIPEdit->text();
//KOPrefs::instance()->mRemoteUser = mRemoteUser->text();
//KOPrefs::instance()->mRemotePassWd = mRemotePassWd->text();
//KOPrefs::instance()->mRemoteFile= mRemoteFile->text();
//KOPrefs::instance()->mLocalTempFile =mLocalTempFile->text();
KOPrefs::instance()->mDefaultAlarmFile =mDefaultAlarmFile->text();
KOPrefs::instance()->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") );
KOPrefs::instance()->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") );
KOPrefs::instance()->setFullName(mNameEdit->text());
KOPrefs::instance()->setEmail(mEmailEdit->text());
KOPrefs::instance()->mAutoSaveInterval = mAutoSaveIntervalSpin->value();
KOPrefs::instance()->mTimeZoneId = mTimeZoneCombo->currentText();
QDate date;
date = mStartDateSavingEdit->date();
int sub = 0;
if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 )
sub = 1;
KOPrefs::instance()->mDaylightsavingStart = date.dayOfYear()-sub;
date = mEndDateSavingEdit->date();
if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 )
sub = 1;
diff --git a/korganizer/koprefsdialog.h b/korganizer/koprefsdialog.h
index 83dc1eb..e20969a 100644
--- a/korganizer/koprefsdialog.h
+++ b/korganizer/koprefsdialog.h
@@ -11,115 +11,118 @@
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
As a special exception, permission is given to link this program
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#ifndef _KOPREFSDIALOG_H
#define _KOPREFSDIALOG_H
#include <qframe.h>
#include <qdict.h>
#include <qcolor.h>
#include <qlistview.h>
#include <kdialogbase.h>
#include <libkdepim/kprefsdialog.h>
#include <libkdepim/kdateedit.h>
+#include <kcmconfigs/kdepimconfigwidget.h>
class KColorButton;
class QSpinBox;
class QSlider;
class KURLRequester;
class QComboBox;
class QLineEdit;
class QStringList;
/** Dialog to change the korganizer configuration.
*/
class KOPrefsDialog : public KPrefsDialog
{
Q_OBJECT
public:
/** Initialize dialog and pages */
KOPrefsDialog(QWidget *parent=0,char *name=0,bool modal=false);
~KOPrefsDialog();
public slots:
void showPrinterTab();
/** Update controls for categories */
void updateCategories();
void showSyncPage();
protected slots:
void selectSoundFile();
void setCategoryColor();
void updateCategoryColor();
void updateTimezoneOffset( int );
void warningExperimental(bool on);
void warningGroupScheduling();
void warningProjectView();
void toggleEmailSettings(bool);
//additional emails
void addItem();
void removeItem();
void updateItem();
void updateInput();
protected:
void usrReadConfig();
void usrWriteConfig();
+ void setupGlobalTab();
void setupMainTab();
void setupTimeTab();
void setupTimeZoneTab();
void setupLocaleTab();
void setupLocaleDateTab();
void setupFontsTab();
void setupColorsTab();
void setupViewsTab();
void setupDisplayTab();
void setupPrinterTab();
void setupGroupSchedulingTab();
void setupGroupAutomationTab();
void setupSyncTab();
void setupSyncAlgTab();
void setCombo(QComboBox *combo,const QString & text, const QStringList *tags = 0);
private:
+ KDEPIMConfigWidget* kdelibcfg;
KPrefsDialogWidBool *mEnableGroupScheduling;
KPrefsDialogWidBool *mEnableProjectView;
QFrame *mPrinterTab;
QLineEdit *nameEdit;
QLineEdit *emailEdit;
QComboBox *timeCombo;
QComboBox *tzCombo;
// widgets holding preferences data
QLineEdit *mNameEdit;
QLineEdit *mEmailEdit;
QLabel *mNameLabel;
QLabel *mEmailLabel;
QLineEdit *mAdditionalEdit;
QSpinBox *mAutoSaveIntervalSpin;
QSpinBox *mPrioSpin;
// QListView *mAMails;
QLineEdit *aEmailsEdit;
QComboBox *mTimeZoneCombo;
QStringList tzonenames;