summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-04-20 10:43:07 (UTC)
committer zautrix <zautrix>2005-04-20 10:43:07 (UTC)
commitf23afbb9c09b4ee0f00af8f04ee4458181792cd0 (patch) (side-by-side diff)
tree807bcaf329d257ec2a0c5c6e3a6afc7ab53a6078
parent03f7f26ad34f50dd86f335c7c5a25a292d642793 (diff)
downloadkdepimpi-f23afbb9c09b4ee0f00af8f04ee4458181792cd0.zip
kdepimpi-f23afbb9c09b4ee0f00af8f04ee4458181792cd0.tar.gz
kdepimpi-f23afbb9c09b4ee0f00af8f04ee4458181792cd0.tar.bz2
fixes
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--bin/kdepim/kaddressbook/germantranslation.txt2
-rw-r--r--bin/kdepim/kopiemail/germantranslation.txt2
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt2
-rw-r--r--bin/kdepim/pwmanager/germantranslation.txt2
-rw-r--r--korganizer/kodaymatrix.cpp14
-rw-r--r--korganizer/koprefsdialog.cpp4
-rw-r--r--libkcal/icalformatimpl.cpp3
-rw-r--r--libkdepim/kcmconfigs/kdepimconfigwidget.cpp41
-rw-r--r--libkdepim/kcmconfigs/kdepimconfigwidget.h4
-rw-r--r--libkdepim/kpimglobalprefs.cpp7
-rw-r--r--libkdepim/kpimglobalprefs.h6
-rw-r--r--libkdepim/kprefsdialog.cpp2
-rw-r--r--libkdepim/kprefsdialog.h7
-rw-r--r--microkde/kglobalsettings.cpp9
-rw-r--r--microkde/kglobalsettings.h1
15 files changed, 86 insertions, 20 deletions
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
@@ -435,49 +435,49 @@
{ "Full Name","Voller Name" },
{ "Reverse Name","Namen umdrehen" },
{ "Contact","Kontakt" },
{ "Global","Allgemein" },
{ "Phone","Telefon" },
{ "SMS","SMS" },
{ "Language:(needs restart)","Sprache:(Neustart)" },
{ "English","English" },
{ "German","Deutsch" },
{ "French","Französisch" },
{ "Italian","Italienisch" },
{ "User defined (usertranslation.txt)","Benutzerdef. (usertranslation.txt)" },
{ "Time Format(nr):","Zeit Format(nr):" },
{ "24:00","24:00" },
{ "12:00am","12:00am" },
{ "Week starts on Sunday","Woche beginnt Sonntags" },
{ "Locale","Locale" },
{ "Date Format:","Datums Format:" },
{ "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" },
{ "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" },
{ "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" },
{ "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" },
{ "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" },
{ "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" },
{ "Date Format","Datums Format" },
{ "Timezone:","Zeitzone:" },
{ "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." },
{ "Timezone has daylight saving","Zeitzone hat Sommerzeit" },
{ "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" },
{ "Used Mail Client","Benutzter Mail Client" },
{ "Channel:","Channel:" },
{ "Message:","Message:" },
{ "Parameters:","Parameter:" },
{ "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" },
{ "extra Message:","extra Message:" },
{ "extra Parameters:","extra Parameter:" },
{ "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" },
{ "External Apps.","Externe Appl." },
{ "Used %1 Client","Benutzer %1 Client" },
{ "No email client installed","Keine Email Client installiert" },
{ "Userdefined email client","Benutzerdef. Email Client" },
{ "OM/Pi email client","OM/Pi Email Client" },
{ "Close KA/Pi?","Schließe KA/Pi?" },
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
@@ -16,49 +16,49 @@
{ "French","Französich" },
{ "Italian","Italienisch" },
{ "User defined (usertranslation.txt)","Benutzerdef.(usertranslation.txt)" },
{ "Time Format(nr):","Zeit Format(Neustart!)" },
{ "24:00","24:00" },
{ "12:00am","12:00am" },
{ "Week starts on Sunday","Woche beginnt Sonntags" },
{ "Locale","Localisation" },
{ "Date Format:","Datums Format:" },
{ "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" },
{ "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" },
{ "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" },
{ "User defined","Benutzerdefiniert" },
{ "User long date:","Format langes Datum:" },
{ "User short date:","Format kurzes Datum:" },
{ "Monday 19 April 2004: %A %d %B %Y","Montag 19 April 2004: %A %d %B %Y" },
{ "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" },
{ "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" },
{ "Date Format","Datums Format" },
{ "Timezone:","Zeitzone:" },
{ "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" },
{ "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" },
{ "Thu","Do" },
{ "Fri","Fr" },
{ "Sat","Sa" },
{ "Sun","So" },
{ "January","Januar" },
{ "February","Februar" },
{ "March","März" },
{ "April","April" },
{ "May","Mai" },
{ "June","Juni" },
{ "July","Juli" },
{ "August","August" },
{ "September","September" },
{ "October","Oktober" },
{ "November","November" },
{ "December","Dezember" },
{ "tomorrow","morgen" },
{ "today","heute" },
{ "yesterday","gestern" },
{ "Monday","Montag" },
{ "Tuesday","Dienstag" },
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
@@ -424,49 +424,49 @@
{ "View","Ansicht" },
{ "View Fonts","Schriftarten Ansichten" },
{ "Views","Ansichten" },
{ "Wed","Mi" },
{ "Wednesday","Mittwoch" },
{ "Week %1","Woche %1" },
{ "Weekly","Wöchentlich" },
{ "Week starts on Sunday","Woche beginnt Sonntags" },
{ "What's Next View:","What's Next Anz." },
{ "What's next ?","Was kommt als nächstes?(What's Next)" },
{ "Working Hours","Tägliche Arbeitszeit" },
{ "Working hours color:","Arbeitszeit in der Agenda Ansicht:" },
{ "Write back existing entries only","Nur exisitierende Einträge zurückschreiben" },
{ "Write back synced file","Syncronisierte Datei zurückschreiben" },
{ "Yearly","Jährlich" },
{ "year(s)","Jahr(e)" },
{ "Yes","Ja" },
{ "You have %d item(s) selected.\n","Sie haben %d Einträge ausgewählt.\n" },
{ "You have to restart KOrganizer for this setting to take effect.","Sie müssem Korganizer neu starten, damit diese Einstellung aktiviert wird." },
{ "week(s) on:","Woche(n) am: " },
{ "Full menu bar(nr)","Volle Menuleiste(bn)" },
{ "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" },
{ "%A: Monday --- %a: Mon","%A: Montag --- %a: Mon" },
{ "minutely","minütlich" },
{ "hourly","stündlich" },
{ "daily","täglich" },
{ "weekly","wöchentlich" },
{ "monthly","monatlich" },
{ "day-monthly","tag-monatlich" },
{ "month-yearly","monat-jährlich" },
{ "day-yearly","tag-jährlich" },
{ "position-yearly","pos-jährlich" },
{ "Edit item on doubleclick (if not, show)","Editiere mit Doppelklick(wenn nicht, zeige)" },
{ "Highlight current day in agenda","Hebe >>heute<< in Agenda hervor" },
{ "Use light color for highlight current day","Helle Farbe für >>heute<< Hervorhebung" },
{ "Highlight selection in Time Edit","Hebe Auswahl in Zeit Edit hervor" },
{ "Hold fullscreen on view change","Behalte Vollbild bei Ansichswechsel" },
{ "Hold non-fullscreen on view change","Behalte Nicht-Vollbild bei Ansichtsw." },
{ "Event list view uses full window","Listenansicht nutzt Vollbild" },
{ "Set agenda to DayBeginsAt on change","Setze Agenda auf TagBeginntUm bei Wechsel" },
{ "Set agenda to current time on change","Setze Agenda auf gegenw.Zeit bei Wechsel" },
{ "Listview uses monthly timespan","Listenansicht zeigt monatliche Zeitspanne" },
{ "ViewChange","Ansichtswechsel" },
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
@@ -112,49 +112,49 @@
{ "Italian","Italienisch" },
{ "User defined (usertranslation.txt)","Benutzerdef. (usertranslation.txt)" },
{ "Language","Sprache" },
{ "Time Format(nr):","Zeit Format(nr):" },
{ "24:00","24:00" },
{ "12:00am","12:00am" },
{ "Week starts on Sunday","Woche beginnt Sonntags" },
{ "Time Format","Zeit Format" },
{ "Date Format:","Datums Format:" },
{ "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" },
{ "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" },
{ "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" },
{ "User defined","Benutzerdefiniert" },
{ "User long date:","Format langes Datum:" },
{ "User short date:","Format kurzes Datum:" },
{ "Monday 19 April 2004: %A %d %B %Y","Monday 19 April 2004: %A %d %B %Y" },
{ "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" },
{ "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" },
{ "Date Format","Datums Format" },
{ "Timezone:","Zeitzone:" },
{ "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" },
{ "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" },
{ "Thu","Do" },
{ "Fri","Fr" },
{ "Sat","Sa" },
{ "Sun","So" },
{ "January","Januar" },
{ "February","Februar" },
{ "March","März" },
{ "April","April" },
{ "May","Mai" },
{ "June","Juni" },
{ "July","July" },
{ "August","August" },
{ "September","September" },
{ "October","October" },
{ "November","November" },
{ "December","Dezember" },
{ "tomorrow","Morgen" },
{ "today","Heute" },
{ "yesterday","Gestern" },
{ "Monday","Montag" },
{ "Tuesday","Dienstag" },
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp
index df606d0..c32a2a4 100644
--- a/korganizer/kodaymatrix.cpp
+++ b/korganizer/kodaymatrix.cpp
@@ -42,95 +42,93 @@
#include <kcalendarsystem.h>
#ifndef KORG_NOPLUGINS
#include "kocore.h"
#endif
#include "koprefs.h"
#include "koglobals.h"
#include "kodaymatrix.h"
// ============================================================================
// D Y N A M I C T I P
// ============================================================================
DynamicTip::DynamicTip( QWidget * parent )
: QToolTip( parent )
{
matrix = (KODayMatrix*)parent;
}
class KODaymatrixWhatsThis :public QWhatsThis
{
public:
KODaymatrixWhatsThis( KODayMatrix* view ) : QWhatsThis( view ),_view (view) { ;};
- ~KODaymatrixWhatsThis() { ; };
+ ~KODaymatrixWhatsThis() { qDebug("DELETE KODaymatrixWhatsThis "); };
protected:
virtual QString text( const QPoint& p )
{
return _view->getWhatsThisText( p ) ;
}
private:
KODayMatrix * _view;
};
void DynamicTip::maybeTip( const QPoint &pos )
{
//calculate which cell of the matrix the mouse is in
QRect sz = matrix->frameRect();
int dheight = sz.height()*7 / 42;
int dwidth = sz.width() / 7;
int row = pos.y()/dheight;
int col = pos.x()/dwidth;
QRect rct(col*dwidth, row*dheight, dwidth, dheight);
// kdDebug() << "DynamicTip::maybeTip matrix cell index [" <<
// col << "][" << row << "] => " <<(col+row*7) << endl;
//show holiday names only
QString str = matrix->getHolidayLabel(col+row*7);
if (str.isEmpty()) return;
tip(rct, str);
}
// ============================================================================
// K O D A Y M A T R I X
// ============================================================================
const int KODayMatrix::NOSELECTION = -1000;
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 );
mRedrawNeeded = true;
mKODaymatrixWhatsThis = new KODaymatrixWhatsThis(this);
mPendingUpdateBeforeRepaint = false;
mouseDown = false;
// initialize dynamic arrays
bDays.resize ( NUMDAYS );
pDays.resize ( NUMDAYS );
hDays.resize ( NUMDAYS );
eDays.resize ( NUMDAYS );
days = new QDate[NUMDAYS];
daylbls = new QString[NUMDAYS];
//events = new int[NUMDAYS];
mToolTip = new DynamicTip(this);
// set default values used for drawing the matrix
mDefaultBackColor = palette().active().base();
mDefaultTextColor = palette().active().foreground();
mDefaultTextColorShaded = getShadedColor(mDefaultTextColor);
mHolidayColorShaded = getShadedColor(KOPrefs::instance()->mHolidayColor);
mSelectedDaysColor = QColor("white");
mTodayMarginWidth = 2;
@@ -223,48 +221,54 @@ void KODayMatrix::setCalendar( Calendar *cal )
{
mCalendar = cal;
setAcceptDrops( mCalendar );
updateEvents();
}
QColor KODayMatrix::getShadedColor(QColor color)
{
QColor shaded;
int h=0;
int s=0;
int v=0;
color.hsv(&h,&s,&v);
s = s/4;
v = 192+v/4;
shaded.setHsv(h,s,v);
return shaded;
}
KODayMatrix::~KODayMatrix()
{
+#if QT_VERSION >= 0x030000
+
+#else
+ delete mKODaymatrixWhatsThis;
+#endif
+
// delete mKODaymatrixWhatsThis;
delete [] days;
delete [] daylbls;
//delete [] events;
delete mToolTip;
}
/*
void KODayMatrix::setStartDate(QDate start)
{
updateView(start);
}
*/
void KODayMatrix::addSelectedDaysTo(DateList& selDays)
{
if (mSelStart == NOSELECTION) {
return;
}
//cope with selection being out of matrix limits at top (< 0)
int i0 = mSelStart;
if (i0 < 0) {
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp
index d9d7924..e4bee63 100644
--- a/korganizer/koprefsdialog.cpp
+++ b/korganizer/koprefsdialog.cpp
@@ -1007,52 +1007,48 @@ dummy =
#endif
QHBox* dummyBox = new QHBox(topFrame);
new QLabel(i18n("Play beeps count:"),dummyBox);
mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox);
topLayout->addWidget(dummyBox,iii++,0);
dummyBox = new QHBox(topFrame);
new QLabel(i18n("Beeps interval in sec:"),dummyBox);
mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox);
topLayout->addWidget(dummyBox,iii++,0);
dummyBox = new QHBox(topFrame);
new QLabel(i18n("Default suspend time in min:"),dummyBox);
mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox);
topLayout->addWidget(dummyBox,iii++,0);
dummyBox = new QHBox(topFrame);
new QLabel(i18n("Auto suspend count:"),dummyBox);
mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox);
topLayout->addWidget(dummyBox,iii++,0);
-
-
-
-
QHBox* hbo = new QHBox ( topFrame );
mDefaultAlarmFile = new QLineEdit(hbo);
QPushButton * loadTemplate = new QPushButton(hbo);
QPixmap icon;
if ( QApplication::desktop()->width() < 321 )
icon = SmallIcon("fileimport16");
else
icon = SmallIcon("fileimport");
loadTemplate->setIconSet (icon ) ;
connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( selectSoundFile() ) );
int size = loadTemplate->sizeHint().height();
loadTemplate->setFixedSize( size, size );
//lab = new QLabel( i18n("This setting is useless for 5500 user!"), topFrame);
// topLayout->addWidget(lab ,iii++,0);
lab = new QLabel( i18n("Alarm *.wav file for newly created alarm:"), topFrame);
topLayout->addWidget(lab ,iii++,0);
topLayout->addWidget(hbo,iii++,0);
// lab = new QLabel( i18n("Note: This does not mean, that for every alarm this file is replayed. This file here is associated with a newly created alarm."), topFrame);
// topLayout->addWidget(lab ,iii++,0);
// #ifndef DESKTOP_VERSION
// lab->setAlignment( AlignLeft|WordBreak|AlignTop);
// #else
// lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop);
diff --git a/libkcal/icalformatimpl.cpp b/libkcal/icalformatimpl.cpp
index fe7413f..2405682 100644
--- a/libkcal/icalformatimpl.cpp
+++ b/libkcal/icalformatimpl.cpp
@@ -674,73 +674,76 @@ icalproperty *ICalFormatImpl::writeRecurrenceRule(Recurrence *recur)
kdDebug(5800) << " String: " << str << endl;
} else {
kdDebug(5800) << " No String" << endl;
}
#endif
return icalproperty_new_rrule(r);
}
icalcomponent *ICalFormatImpl::writeAlarm(Alarm *alarm)
{
icalcomponent *a = icalcomponent_new(ICAL_VALARM_COMPONENT);
icalproperty_action action;
icalattach *attach = 0;
switch (alarm->type()) {
case Alarm::Procedure:
action = ICAL_ACTION_PROCEDURE;
attach = icalattach_new_from_url( QFile::encodeName(alarm->programFile()).data() );
icalcomponent_add_property(a,icalproperty_new_attach(attach));
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));
+ icalattach_unref( attach );
}
break;
case Alarm::Email: {
action = ICAL_ACTION_EMAIL;
QValueList<Person> addresses = alarm->mailAddresses();
for (QValueList<Person>::Iterator ad = addresses.begin(); ad != addresses.end(); ++ad) {
icalproperty *p = icalproperty_new_attendee("MAILTO:" + (*ad).email().utf8());
if (!(*ad).name().isEmpty()) {
icalproperty_add_parameter(p,icalparameter_new_cn((*ad).name().utf8()));
}
icalcomponent_add_property(a,p);
}
icalcomponent_add_property(a,icalproperty_new_summary(alarm->mailSubject().utf8()));
icalcomponent_add_property(a,icalproperty_new_description(alarm->text().utf8()));
QStringList attachments = alarm->mailAttachments();
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));
+ icalattach_unref( attach );
}
}
break;
}
case Alarm::Display:
action = ICAL_ACTION_DISPLAY;
icalcomponent_add_property(a,icalproperty_new_description(alarm->text().utf8()));
break;
case Alarm::Invalid:
default:
kdDebug(5800) << "Unknown type of alarm" << endl;
action = ICAL_ACTION_NONE;
break;
}
icalcomponent_add_property(a,icalproperty_new_action(action));
// Trigger time
icaltriggertype trigger;
if ( alarm->hasTime() ) {
trigger.time = writeICalDateTime(alarm->time());
trigger.duration = icaldurationtype_null_duration();
} else {
trigger.time = icaltime_null_time();
Duration offset;
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
@@ -14,56 +14,59 @@
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.
*/
/*
Enhanced Version of the file for platform independent KDE tools.
Copyright (c) 2004 Ulf Schenk
$Id$
*/
#include <qlayout.h>
#include <qtabwidget.h>
#include <qcombobox.h>
#include <qgroupbox.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qbuttongroup.h>
+#include <qcheckbox.h>
#include <qfile.h>
#include <qvbox.h>
#include <qdir.h>
#include <qregexp.h>
+#include <qspinbox.h>
#include <kdialog.h>
#include <kprefsdialog.h>
#include <klocale.h>
+#include <kglobalsettings.h>
#include <kdateedit.h>
#include <kglobal.h>
#include <stdlib.h>
/*US
#include <qcheckbox.h>
#include <qframe.h>
#include <qpushbutton.h>
#include <qcombobox.h>
#include <qlineedit.h>
#include <qlabel.h>
#include <qfile.h>
#include <kconfig.h>
#include <kdebug.h>
#include <kdialog.h>
#include <klistview.h>
#include <klocale.h>
#include <kglobal.h>
#include <kmessagebox.h>
#include <kstandarddirs.h>
#ifndef KAB_EMBEDDED
#include <ktrader.h>
@@ -88,54 +91,90 @@ $Id$
KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent, const char *name )
: KPrefsWidget(prefs, parent, name )
{
mExternalAppsMap.insert(ExternalAppHandler::EMAIL, i18n("Email"));
mExternalAppsMap.insert(ExternalAppHandler::PHONE, i18n("Phone"));
mExternalAppsMap.insert(ExternalAppHandler::SMS, i18n("SMS"));
mExternalAppsMap.insert(ExternalAppHandler::FAX, i18n("Fax"));
mExternalAppsMap.insert(ExternalAppHandler::PAGER, i18n("Pager"));
mExternalAppsMap.insert(ExternalAppHandler::SIP, i18n("SIP"));
QVBoxLayout *topLayout = new QVBoxLayout( this, 0,
KDialog::spacingHint() );
tabWidget = new QTabWidget( this );
topLayout->addWidget( tabWidget );
setupLocaleTab();
setupLocaleDateTab();
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 );
tabWidget->addTab( colorPage, i18n( "Colors" ) );
QWidget* cw = new QWidget( colorPage );
KPrefsWidColor *holidayColor =
addWidColor(i18n("Alternating background of list views"),
&(KPimGlobalPrefs::instance()->mAlternateColor),cw);
QHBoxLayout *topLayout = new QHBoxLayout(cw);
topLayout->addWidget(holidayColor->label());
topLayout->addWidget( (QWidget* )holidayColor->button());
QVBox *storePage = new QVBox( this );
new QLabel( i18n("Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail").arg(KGlobal::dirs()->localkdedir()), storePage );
new QLabel( i18n("<b>New data storage dir:</b>"), storePage );
mStoreUrl = new KURLRequester( storePage );
mStoreUrl->setURL( KGlobal::dirs()->localkdedir() );
#ifdef DESKTOP_VERSION
QString confFile = qApp->applicationDirPath ()+ "/.microkdehome" ;
QFileInfo fi ( confFile );
if ( fi.exists() ) {
KConfig cfg ( confFile );
cfg.setGroup("Global");
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
@@ -58,48 +58,49 @@ class KDEPIMConfigWidget : public KPrefsWidget
protected:
/** Implement this to read custom configuration widgets. */
virtual void usrReadConfig();
/** Implement this to write custom configuration widgets. */
virtual void usrWriteConfig();
private slots:
// void configureExtension();
// void selectionChanged( QListViewItem* );
// void itemClicked( QListViewItem* );
void client_changed( int newClient );
void externalapp_changed( int newApp );
void saveStoreSettings();
void setStandardStore();
void setLocalStore();
private:
void setupExternalAppTab();
void setupLocaleDateTab();
void setupLocaleTab();
void setupTimeZoneTab();
void setupStoreTab();
+ void setupBackupTab();
KURLRequester* mStoreUrl;
void setCombo(QComboBox *combo,const QString & text, const QStringList *tags = 0);
void saveEditFieldSettings();
void updateClientWidgets();
QTabWidget *tabWidget;
QLineEdit* mUserDateFormatShort;
QLineEdit* mUserDateFormatLong;
QComboBox* mTimeZoneCombo;
KDateEdit* mStartDateSavingEdit;
KDateEdit* mEndDateSavingEdit;
// void restoreExtensionSettings();
// void saveExtensionSettings();
// KListView *mExtensionView;
// QCheckBox *mNameParsing;
// QCheckBox *mViewsSingleClickBox;
@@ -131,31 +132,32 @@ class KDEPIMConfigWidget : public KPrefsWidget
QString mPhoneOtherMessage;
QString mPhoneOtherMessageParameters;
int mFaxClient;
QString mFaxOtherChannel;
QString mFaxOtherMessage;
QString mFaxOtherMessageParameters;
int mSMSClient;
QString mSMSOtherChannel;
QString mSMSOtherMessage;
QString mSMSOtherMessageParameters;
int mPagerClient;
QString mPagerOtherChannel;
QString mPagerOtherMessage;
QString mPagerOtherMessageParameters;
int mSipClient;
QString mSipOtherChannel;
QString mSipOtherMessage;
QString mSipOtherMessageParameters;
-
+ KURLRequester* mBackupUrl;
+ QSpinBox* mBackupDayCountSpin, *mBackupNumbersSpin ;
QMap<ExternalAppHandler::Types, QString> mExternalAppsMap;
// AddresseeWidget *mAddresseeWidget;
};
#endif
diff --git a/libkdepim/kpimglobalprefs.cpp b/libkdepim/kpimglobalprefs.cpp
index 873f0eb..90321b2 100644
--- a/libkdepim/kpimglobalprefs.cpp
+++ b/libkdepim/kpimglobalprefs.cpp
@@ -90,48 +90,55 @@ KPimGlobalPrefs::KPimGlobalPrefs( const QString &name )
addItemString( "FaxChannel", &mFaxOtherChannel, "" );
addItemString( "FaxChannelMessage", &mFaxOtherMessage, "" );
addItemString( "FaxChannelParameters", &mFaxOtherMessageParameters, "" );
addItemInt( "SMSChannelType", &mSMSClient, NONE_SMC );
addItemString( "SMSChannel", &mSMSOtherChannel, "" );
addItemString( "SMSChannelMessage", &mSMSOtherMessage, "" );
addItemString( "SMSChannelParameters", &mSMSOtherMessageParameters, "" );
addItemInt( "PagerChannelType", &mPagerClient, NONE_PAC );
addItemString( "PagerChannel", &mPagerOtherChannel, "" );
addItemString( "PagerChannelMessage", &mPagerOtherMessage, "" );
addItemString( "PagerChannelParameters", &mPagerOtherMessageParameters, "" );
addItemInt( "SIPChannelType", &mSipClient, KPPI_SIC );
addItemString( "SIPChannel", &mSipOtherChannel, "" );
addItemString( "SIPChannelMessage", &mSipOtherMessage, "" );
addItemString( "SIPChannelParameters", &mSipOtherMessageParameters, "" );
KPrefs::setCurrentGroup( "PhoneAccess" );
addItemString("Ex2PhoneDevice",&mEx2PhoneDevice,"/dev/ircomm");
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()
{
if ( mLocaleDict == 0 ) {
QString fileName ;
QString name = KGlobal::getAppName() +"/";
#ifndef DESKTOP_VERSION
fileName= QString(getenv("QPEDIR"))+"/pics/kdepim/"+name;
#else
fileName = qApp->applicationDirPath () + "/kdepim/"+ name;
#endif
mLocaleDict = 0;
if ( mPreferredLanguage > 0 && mPreferredLanguage < 5 ) {
if ( mPreferredLanguage == 1 )
fileName = fileName+"germantranslation.txt";
else if ( mPreferredLanguage == 4 )
fileName = fileName+"usertranslation.txt";
else if ( mPreferredLanguage == 2 )
fileName = fileName+"frenchtranslation.txt";
else if ( mPreferredLanguage == 3 )
fileName = fileName+"italiantranslation.txt";
QFile file( fileName );
diff --git a/libkdepim/kpimglobalprefs.h b/libkdepim/kpimglobalprefs.h
index 36cc25a..94ac8ae 100644
--- a/libkdepim/kpimglobalprefs.h
+++ b/libkdepim/kpimglobalprefs.h
@@ -119,27 +119,33 @@ class KPimGlobalPrefs : public KPrefs
int mFaxClient;
QString mFaxOtherChannel;
QString mFaxOtherMessage;
QString mFaxOtherMessageParameters;
int mSMSClient;
QString mSMSOtherChannel;
QString mSMSOtherMessage;
QString mSMSOtherMessageParameters;
int mPagerClient;
QString mPagerOtherChannel;
QString mPagerOtherMessage;
QString mPagerOtherMessageParameters;
int mSipClient;
QString mSipOtherChannel;
QString mSipOtherMessage;
QString mSipOtherMessageParameters;
QString mEx2PhoneDevice;
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
@@ -259,49 +259,49 @@ void KPrefsDialogWidString::readConfig()
void KPrefsDialogWidString::writeConfig()
{
*mReference = mEdit->text();
}
QLabel *KPrefsDialogWidString::label()
{
return mLabel;
}
QLineEdit *KPrefsDialogWidString::lineEdit()
{
return mEdit;
}
KPrefsDialog::KPrefsDialog(KPrefs *prefs,QWidget *parent,char *name,bool modal) :
KDialogBase(IconList,i18n("Preferences"),Ok|Cancel|Default,Ok,parent,
name,modal,true)
{
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()));
//connect(this,SIGNAL(cancelClicked()),SLOT(reject()));
}
KPrefsDialog::~KPrefsDialog()
{
}
void KPrefsDialog::addWid(KPrefsDialogWid *wid)
{
mPrefsWids.append(wid);
}
KPrefsDialogWidBool *KPrefsDialog::addWidBool(const QString &text,bool *reference,QWidget *parent)
{
KPrefsDialogWidBool *w = new KPrefsDialogWidBool(text,reference,parent);
addWid(w);
return w;
}
KPrefsDialogWidTime *KPrefsDialog::addWidTime(const QString &text,int *reference,QWidget *parent)
{
diff --git a/libkdepim/kprefsdialog.h b/libkdepim/kprefsdialog.h
index ad13b78..efcb86a 100644
--- a/libkdepim/kprefsdialog.h
+++ b/libkdepim/kprefsdialog.h
@@ -25,49 +25,49 @@
// $Id$
#include <qptrlist.h>
#include <qlineedit.h>
#include <kdialogbase.h>
class KPrefs;
class KPrefsDialog;
class KColorButton;
class QCheckBox;
class QLabel;
class QSpinBox;
class QButtonGroup;
/**
@short Base class for widgets used by @ref KPrefsDialog.
@author Cornelius Schumacher
@see KPrefsDialog
This class provides the interface for the preferences widgets used by
KPrefsDialog.
*/
-class KPrefsDialogWid
+class KPrefsDialogWid : public QObject
{
public:
/**
This function is called to read value of the setting from the
stored configuration and display it in the widget.
*/
virtual void readConfig() = 0;
/**
This function is called to write the current setting of the widget to the
stored configuration.
*/
virtual void writeConfig() = 0;
};
/**
@short Widget for bool settings in @ref KPrefsDialog.
This class provides a widget for configuring bool values. It is meant to be
used by KPrefsDialog. The user is responsible for the layout management.
*/
class KPrefsDialogWidBool : public KPrefsDialogWid
{
public:
/**
@@ -115,92 +115,91 @@ class KPrefsDialogWidTime : public KPrefsDialogWid
Return QLabel used by this widget.
*/
QLabel *label();
/**
Return QSpinBox used by this widget.
*/
QSpinBox *spinBox();
void readConfig();
void writeConfig();
private:
int *mReference;
QLabel *mLabel;
QSpinBox *mSpin;
};
/**
@short Widget for color settings in @ref KPrefsDialog.
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
a color dialog.
@param text Text of button.
@param reference Pointer to variable read and written by this widget.
@param parent Parent widget.
*/
KPrefsDialogWidColor(const QString &text,QColor *reference,QWidget *parent);
/**
Destruct color setting widget.
*/
~KPrefsDialogWidColor();
/**
Return QLabel for the button
*/
QLabel *label();
/**
Return button opening the color dialog.
*/
KColorButton *button();
void readConfig();
void writeConfig();
private:
QColor *mReference;
QLabel *mLabel;
KColorButton *mButton;
};
/**
@short Widget for font settings in @ref KPrefsDialog.
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:
/**
Create a font widget consisting of a test field and a button for opening
a font dialog.
@param label Text of label.
@param reference Pointer to variable read and written by this widget.
@param parent Parent widget.
*/
KPrefsDialogWidFont(const QString &sampleText,const QString &labelText,
QFont *reference,QWidget *parent);
/**
Destruct font setting widget.
*/
~KPrefsDialogWidFont();
/**
Return label.
*/
QLabel *label();
/**
Return QFrame used as preview field.
diff --git a/microkde/kglobalsettings.cpp b/microkde/kglobalsettings.cpp
index 5976aae..3f8a630 100644
--- a/microkde/kglobalsettings.cpp
+++ b/microkde/kglobalsettings.cpp
@@ -33,48 +33,57 @@ QFont KGlobalSettings::generalMaxFont()
int size = 12;
if (QApplication::desktop()->width() < 480 ) {
size = 10;
}
#ifndef DESKTOP_VERSION
else
if (QApplication::desktop()->width() >= 480 && QApplication::desktop()->width() <= 640 )
size = 18;
#endif
QFont f = QApplication::font();
if ( f.pointSize() > size )
f.setPointSize( size );
return f;
}
QString KGlobalSettings::timeTrackerDir()
{
static QString dir;
if ( dir.isEmpty() ) {
dir = locateLocal( "data", "timetrackerdir/d.ttl" );
dir = dir.left ( dir.length() - 5);
}
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()
{
return QApplication::font();
}
QColor KGlobalSettings::toolBarHighlightColor()
{
return QColor( "black" );
}
QColor KGlobalSettings::alternateBackgroundColor()
{
return mAlternate;
}
void KGlobalSettings::setAlternateBackgroundColor(QColor c)
{
mAlternate = c;
}
QRect KGlobalSettings::desktopGeometry( QWidget * )
{
diff --git a/microkde/kglobalsettings.h b/microkde/kglobalsettings.h
index 05ef279..4e4d87c 100644
--- a/microkde/kglobalsettings.h
+++ b/microkde/kglobalsettings.h
@@ -1,35 +1,36 @@
#ifndef MICROKDE_KGLOBALSETTINGS_H
#define MICROKDE_KGLOBALSETTINGS_H
#include <qfont.h>
#include <qrect.h>
#define KDE_DEFAULT_SINGLECLICK true
class KGlobalSettings
{
public:
static QFont generalFont();
static QFont generalMaxFont();
static QFont toolBarFont();
static QColor mAlternate;
static QColor toolBarHighlightColor();
static QColor alternateBackgroundColor();
static void setAlternateBackgroundColor(QColor);
static QRect desktopGeometry( QWidget * );
static QString timeTrackerDir();
+ static QString backupDataDir();
/**
* Returns whether KDE runs in single (default) or double click
* mode.
* see http://developer.kde.org/documentation/standards/kde/style/mouse/index.html
* @return true if single click mode, or false if double click mode.
**/
static bool singleClick();
};
#endif