From f23afbb9c09b4ee0f00af8f04ee4458181792cd0 Mon Sep 17 00:00:00 2001 From: zautrix Date: Wed, 20 Apr 2005 10:43:07 +0000 Subject: fixes --- diff --git a/bin/kdepim/kaddressbook/germantranslation.txt b/bin/kdepim/kaddressbook/germantranslation.txt index 0884a83..85aed43 100644 --- a/bin/kdepim/kaddressbook/germantranslation.txt +++ b/bin/kdepim/kaddressbook/germantranslation.txt @@ -456,7 +456,7 @@ { "User defined","Benutzerdefiniert" }, { "User long date:","Format langes Datum:" }, { "User short date:","Format kurzes Datum:" }, -{ "Daylight start:","Sommerzeit Beginn:" }, +{ "Daylight start:","Sommerzeit Start:" }, { "Daylight end:","Sommerzeit Ende:" }, { "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" }, { "Monday 19 April 2004: %A %d %B %Y","Monday 19 April 2004: %A %d %B %Y" }, diff --git a/bin/kdepim/kopiemail/germantranslation.txt b/bin/kdepim/kopiemail/germantranslation.txt index 903abdf..75fdd11 100644 --- a/bin/kdepim/kopiemail/germantranslation.txt +++ b/bin/kdepim/kopiemail/germantranslation.txt @@ -37,7 +37,7 @@ { "Timezone has daylight saving","Zeitzone hat Sommerzeit" }, { "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" }, { "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." }, -{ "Daylight start:","Sommerzeit Beginn:" }, +{ "Daylight start:","Sommerzeit Start:" }, { "Mon","Mo" }, { "Tue","Di" }, { "Wed","Mi" }, diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index 5693112..fa18304 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt @@ -445,7 +445,7 @@ { "Timezone has daylight saving","Zeitzone hat Sommerzeit" }, { "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" }, { "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." }, -{ "Daylight start:","Sommerzeit Beginn:" }, +{ "Daylight start:","Sommerzeit Start:" }, { "Daylight end:","Sommerzeit Ende:" }, { "Time Zone","Zeitzone" }, { "Monday 19 April 2004: %A %d %B %Y","Montag 19 April 2004: %A %d %B %Y" }, diff --git a/bin/kdepim/pwmanager/germantranslation.txt b/bin/kdepim/pwmanager/germantranslation.txt index beb066e..a50dd04 100644 --- a/bin/kdepim/pwmanager/germantranslation.txt +++ b/bin/kdepim/pwmanager/germantranslation.txt @@ -133,7 +133,7 @@ { "Timezone has daylight saving","Zeitzone hat Sommerzeit" }, { "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" }, { "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." }, -{ "Daylight start:","Sommerzeit Beginn:" }, +{ "Daylight start:","Sommerzeit Start:" }, { "Mon","Mo" }, { "Tue","Di" }, { "Wed","Mi" }, diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp index df606d0..c32a2a4 100644 --- a/korganizer/kodaymatrix.cpp +++ b/korganizer/kodaymatrix.cpp @@ -63,7 +63,7 @@ class KODaymatrixWhatsThis :public QWhatsThis { public: KODaymatrixWhatsThis( KODayMatrix* view ) : QWhatsThis( view ),_view (view) { ;}; - ~KODaymatrixWhatsThis() { ; }; + ~KODaymatrixWhatsThis() { qDebug("DELETE KODaymatrixWhatsThis "); }; protected: virtual QString text( const QPoint& p ) @@ -105,11 +105,9 @@ const int KODayMatrix::NUMDAYS = 42; KODayMatrix::KODayMatrix( QWidget *parent, const char *name ) : QFrame( parent, name , Qt::WRepaintNoErase ), mCalendar( 0 ) -#if 0 -KODayMatrix::KODayMatrix(QWidget *parent, Calendar* calendar, QDate date, const char *name) : - QFrame(parent, name) -#endif + { + mLastView = -1; oldW = 0; oldH = 0; myPix.resize( 150, 120 ); @@ -244,6 +242,12 @@ QColor KODayMatrix::getShadedColor(QColor color) KODayMatrix::~KODayMatrix() { +#if QT_VERSION >= 0x030000 + +#else + delete mKODaymatrixWhatsThis; +#endif + // delete mKODaymatrixWhatsThis; delete [] days; delete [] daylbls; diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index d9d7924..e4bee63 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp @@ -1028,10 +1028,6 @@ dummy = - - - - QHBox* hbo = new QHBox ( topFrame ); mDefaultAlarmFile = new QLineEdit(hbo); QPushButton * loadTemplate = new QPushButton(hbo); diff --git a/libkcal/icalformatimpl.cpp b/libkcal/icalformatimpl.cpp index fe7413f..2405682 100644 --- a/libkcal/icalformatimpl.cpp +++ b/libkcal/icalformatimpl.cpp @@ -695,12 +695,14 @@ icalcomponent *ICalFormatImpl::writeAlarm(Alarm *alarm) if (!alarm->programArguments().isEmpty()) { icalcomponent_add_property(a,icalproperty_new_description(alarm->programArguments().utf8())); } + icalattach_unref( attach ); break; case Alarm::Audio: action = ICAL_ACTION_AUDIO; if (!alarm->audioFile().isEmpty()) { attach = icalattach_new_from_url(QFile::encodeName( alarm->audioFile() ).data()); - icalcomponent_add_property(a,icalproperty_new_attach(attach)); + icalcomponent_add_property(a,icalproperty_new_attach(attach)); + icalattach_unref( attach ); } break; case Alarm::Email: { @@ -719,7 +721,8 @@ icalcomponent *ICalFormatImpl::writeAlarm(Alarm *alarm) if (attachments.count() > 0) { for (QStringList::Iterator at = attachments.begin(); at != attachments.end(); ++at) { attach = icalattach_new_from_url(QFile::encodeName( *at ).data()); - icalcomponent_add_property(a,icalproperty_new_attach(attach)); + icalcomponent_add_property(a,icalproperty_new_attach(attach)); + icalattach_unref( attach ); } } break; diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp index 753d90a..fbfbc45 100644 --- a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp +++ b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp @@ -35,14 +35,17 @@ $Id$ #include #include #include +#include #include #include #include #include +#include #include #include #include +#include #include #include #include @@ -109,12 +112,48 @@ KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent, setupTimeZoneTab(); setupExternalAppTab(); setupStoreTab(); - + setupBackupTab(); } void KDEPIMConfigWidget::showTimeZoneTab() { tabWidget->setCurrentPage ( 3 ) ; } +void KDEPIMConfigWidget::setupBackupTab() +{ + QVBox *colorPage = new QVBox( this ); + tabWidget->addTab( colorPage, i18n( "Backup" ) ); + QWidget* topFrame = new QWidget( colorPage ); + QVBoxLayout *topLayout = new QVBoxLayout(topFrame); + KPrefsWidBool *sb = addWidBool(i18n("Backup enabled"), + &(KPimGlobalPrefs::instance()->mBackupEnabled),topFrame); + topLayout->addWidget((QWidget*)sb->checkBox()); + QWidget* bupFrame = new QWidget( topFrame ); + topLayout->addWidget((bupFrame)); + QObject::connect ( sb->checkBox(), SIGNAL (toggled ( bool ) ), bupFrame, SLOT ( setEnabled( bool ) ) ); + QVBoxLayout *bupLayout = new QVBoxLayout(bupFrame); + sb = addWidBool(i18n("Use standard backup dir"), + &(KPimGlobalPrefs::instance()->mBackupEnabled),bupFrame); + bupLayout->addWidget((QWidget*)sb->checkBox()); + mBackupUrl = new KURLRequester( bupFrame ); + mBackupUrl->setURL( KGlobalSettings::backupDataDir() ); + QObject::connect ( sb->checkBox(), SIGNAL (toggled ( bool ) ), mBackupUrl ,SLOT ( setDisabled( bool ) ) ); + bupLayout->addWidget( mBackupUrl ); + + + QHBox *dummy = new QHBox(bupFrame); + new QLabel(i18n("Number of Backups:"),dummy); + mBackupNumbersSpin = new QSpinBox(1,21,1,dummy); + new QLabel(i18n(" "),dummy); + bupLayout->addWidget( dummy ); + + dummy = new QHBox(bupFrame); + new QLabel(i18n("Make backup every "),dummy); + mBackupDayCountSpin = new QSpinBox(1,28,1,dummy); + new QLabel(i18n(" days"),dummy); + new QLabel(i18n(" "),dummy); + bupLayout->addWidget( dummy ); + +} void KDEPIMConfigWidget::setupStoreTab() { QVBox *colorPage = new QVBox( this ); diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.h b/libkdepim/kcmconfigs/kdepimconfigwidget.h index 984e4e0..c0b92a9 100644 --- a/libkdepim/kcmconfigs/kdepimconfigwidget.h +++ b/libkdepim/kcmconfigs/kdepimconfigwidget.h @@ -79,6 +79,7 @@ class KDEPIMConfigWidget : public KPrefsWidget void setupLocaleTab(); void setupTimeZoneTab(); void setupStoreTab(); + void setupBackupTab(); KURLRequester* mStoreUrl; void setCombo(QComboBox *combo,const QString & text, const QStringList *tags = 0); @@ -152,7 +153,8 @@ class KDEPIMConfigWidget : public KPrefsWidget QString mSipOtherMessageParameters; - + KURLRequester* mBackupUrl; + QSpinBox* mBackupDayCountSpin, *mBackupNumbersSpin ; QMap mExternalAppsMap; // AddresseeWidget *mAddresseeWidget; diff --git a/libkdepim/kpimglobalprefs.cpp b/libkdepim/kpimglobalprefs.cpp index 873f0eb..90321b2 100644 --- a/libkdepim/kpimglobalprefs.cpp +++ b/libkdepim/kpimglobalprefs.cpp @@ -111,6 +111,13 @@ KPimGlobalPrefs::KPimGlobalPrefs( const QString &name ) addItemString("Ex2PhoneConnection",&mEx2PhoneConnection,"irda"); addItemString("Ex2PhoneModel",&mEx2PhoneModel,"6310i"); + KPrefs::setCurrentGroup( "BackupSettings" ); + addItemString("BackupDatadir",&mBackupDatadir,KGlobalSettings::backupDataDir()); + addItemInt( "BackupNumbers", &mBackupNumbers, 3 ); + addItemInt( "BackupDayCount", &mBackupDayCount, 2 ); + addItemBool( "BackupUseDefaultDir",&mBackupUseDefaultDir, true ); + addItemBool( "BackupEnabled",&mBackupEnabled, false ); + } void KPimGlobalPrefs::setGlobalConfig() diff --git a/libkdepim/kpimglobalprefs.h b/libkdepim/kpimglobalprefs.h index 36cc25a..94ac8ae 100644 --- a/libkdepim/kpimglobalprefs.h +++ b/libkdepim/kpimglobalprefs.h @@ -140,6 +140,12 @@ class KPimGlobalPrefs : public KPrefs QString mEx2PhoneConnection; QString mEx2PhoneModel; + + bool mBackupEnabled; + QString mBackupDatadir; + bool mBackupUseDefaultDir; + int mBackupNumbers; + int mBackupDayCount; }; #endif diff --git a/libkdepim/kprefsdialog.cpp b/libkdepim/kprefsdialog.cpp index dd9a602..b6ae775 100644 --- a/libkdepim/kprefsdialog.cpp +++ b/libkdepim/kprefsdialog.cpp @@ -280,7 +280,7 @@ KPrefsDialog::KPrefsDialog(KPrefs *prefs,QWidget *parent,char *name,bool modal) mPrefs = prefs; // This seems to cause a crash on exit. Investigate later. -// mPrefsWids.setAutoDelete(true); + mPrefsWids.setAutoDelete(true); connect(this,SIGNAL(defaultClicked()),SLOT(slotDefault())); //connect(this,SIGNAL(cancelClicked()),SLOT(slotDefault())); diff --git a/libkdepim/kprefsdialog.h b/libkdepim/kprefsdialog.h index ad13b78..efcb86a 100644 --- a/libkdepim/kprefsdialog.h +++ b/libkdepim/kprefsdialog.h @@ -46,7 +46,7 @@ class QButtonGroup; This class provides the interface for the preferences widgets used by KPrefsDialog. */ -class KPrefsDialogWid +class KPrefsDialogWid : public QObject { public: /** @@ -136,9 +136,8 @@ class KPrefsDialogWidTime : public KPrefsDialogWid This class provides a widget for configuring color values. It is meant to be used by KPrefsDialog. The user is responsible for the layout management. */ -class KPrefsDialogWidColor : public QObject, public KPrefsDialogWid +class KPrefsDialogWidColor : public KPrefsDialogWid { - Q_OBJECT public: /** Create a color widget consisting of a test field and a button for opening @@ -179,7 +178,7 @@ class KPrefsDialogWidColor : public QObject, public KPrefsDialogWid This class provides a widget for configuring font values. It is meant to be used by KPrefsDialog. The user is responsible for the layout management. */ -class KPrefsDialogWidFont : public QObject, public KPrefsDialogWid +class KPrefsDialogWidFont : public KPrefsDialogWid { Q_OBJECT public: diff --git a/microkde/kglobalsettings.cpp b/microkde/kglobalsettings.cpp index 5976aae..3f8a630 100644 --- a/microkde/kglobalsettings.cpp +++ b/microkde/kglobalsettings.cpp @@ -54,6 +54,15 @@ QString KGlobalSettings::timeTrackerDir() } return dir; } +QString KGlobalSettings::backupDataDir() +{ + static QString dir; + if ( dir.isEmpty() ) { + dir = locateLocal( "data", "backupdir/d.ttl" ); + dir = dir.left ( dir.length() - 5); + } + return dir; +} QFont KGlobalSettings::toolBarFont() { diff --git a/microkde/kglobalsettings.h b/microkde/kglobalsettings.h index 05ef279..4e4d87c 100644 --- a/microkde/kglobalsettings.h +++ b/microkde/kglobalsettings.h @@ -21,6 +21,7 @@ class KGlobalSettings static void setAlternateBackgroundColor(QColor); static QRect desktopGeometry( QWidget * ); static QString timeTrackerDir(); + static QString backupDataDir(); /** * Returns whether KDE runs in single (default) or double click -- cgit v0.9.0.2