summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt12
-rw-r--r--bin/kdepim/kaddressbook/germantranslation.txt2
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt7
-rw-r--r--korganizer/koeditorgeneral.cpp7
-rw-r--r--korganizer/koeditorgeneral.h2
-rw-r--r--korganizer/koeventeditor.cpp4
-rw-r--r--korganizer/koeventviewer.cpp8
-rw-r--r--korganizer/koincidenceeditor.cpp5
-rw-r--r--korganizer/koincidenceeditor.h3
-rw-r--r--korganizer/kotodoeditor.cpp4
-rw-r--r--libkdepim/ksyncprefsdialog.cpp4
11 files changed, 50 insertions, 8 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 03bc03b..cd37aac 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,26 +1,38 @@
Info about the changes in new versions of KDE-Pim/Pi
+********** VERSION 2.2.8 ************
+
+
+I forgot what I fixed...
+
+Some minor fixes in KA/Pi and KO/Pi.
+
+KA/Pi uses popup menu now for quick category selection in contact edit dialog.
+
+In the Pi-syc mode of KO/Pi it is now possible to define specific resources which can be synced with the remote pi-sync server.
+This feature must be considered as unstable - it still needs some more testing.
+
********** VERSION 2.2.7 ************
Added for Desktop Versions (Windows + Linux) the possibility to specify an email client to call if the user clicks on an emailaddress.
(Menu: Config->Global Settings->Extern.Applications: E-mail).
Added as default (and example) Mozilla Thunderbird settings.
If the path to the binary in this Mozilla Thunderbird example is not matching your environment you can take these settings as an template and configure "User defined email client".
********** VERSION 2.2.6 ************
KO/Pi:
Made navigation in datepicker more userfriendly when using keyboard for scrolling.
KO/Pi Alarm applet:
Made font size for the two popup menus with larger font configurable:
Change size with menu:
Play Beeps->Font Size
Save settings such that it will be restored after next reboot with menu:
Play Beeps->Config->Save.
KA/Pi:
Big change! Needed for the upcoming Outlook sync:
(Outlook sync available appr. end of 2005)
Telephone number types are now fixed in KA/Pi
(but still compatible with the vCard standard, of cource)
and they are compatible with the types used by the evil empire.
That makes syncing with OL possible and make it possible to sync better with mobile devices.
diff --git a/bin/kdepim/kaddressbook/germantranslation.txt b/bin/kdepim/kaddressbook/germantranslation.txt
index 3448dcc..e03dafb 100644
--- a/bin/kdepim/kaddressbook/germantranslation.txt
+++ b/bin/kdepim/kaddressbook/germantranslation.txt
@@ -808,29 +808,31 @@
{ "Eeek, there I am ticklish!","Huch, da bin ich kitzlig!" },
{ "Save using LOCAL storage","Speichere nutze LOCAL Pfad" },
{ "...and %1 more\ncontact(s) selected","...und noch %1 Kontakte\n mehr ausgewählt" },
{ "Do you really\nwant to delete the\nsetected contact(s)?\n\n","Möchten Sie wirklich\ndie ausgewählten\nKontakte löschen?\n\n" },
{ "%1 contacts\nsuccessfully\nimported.","%1 Kontakte\nerfolgreich\nimportiert." },
{ "Import this contact?","Importiere diesen Kontakt?" },
{ "Import all!","Importiere alle!" },
{ "Loading addressbook data ... please wait","Lade Adressbuchdaten ... bitte warten" },
{ "Import Format","Import Format" },
{ "Select import format!\nDefault and standard is Utf8.\nLatin1 may be the right\nfor some West Europian languages.","Wähle Import Format!\nDefault und Standard ist Utf8.\nLatin1 kann das richtige für\nWesteuropäische Sprachen sein." },
{ "Home2","Privat2" },
{ "Work2","Arbeit2" },
{ "Fax (Work)","Fax (Arbeit)" },
{ "Fax (Home)","Fax (Privat)" },
{ "Assistent","Sekretär(in)" },
{ "Company","Firma" },
{ "Mobile2","Handy2" },
{ "Callback","Rückruf" },
{ "Fax (Other)","Fax (Sonst.)" },
{ "Primary","Bevorzugt" },
{ "Mobile","Handy" },
{ "Unfiled","Nicht zugeordnet" },
{ "Format.n.:","Format.N.:" },
{ "Other Phone","Sonst. Telefon" },
+{ "Pi-Sync - all calendars ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync - alle Kalender ( direktes Kx/Pi mit Kx/Pi syncen )" },
+{ "Pi-Sync - selected calendars ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync - ausgewählte Kalender ( direktes Kx/Pi mit Kx/Pi syncen )" },
{ "","" },
{ "","" },
{ "","" },
{ "","" },
{ "","" }, \ No newline at end of file
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index 767e243..2dec521 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -915,49 +915,48 @@
{ "5 minutes","5 Min." },
{ "1 minute","1 Min." },
{ "23","23" },
{ "Mon 15","Mon 15" },
{ "Configure KO","Konfiguriere KO" },
{ "Event text","Termin Text" },
{ "ToDo","Todo" },
{ "Today","Heute" },
{ "What's Next View","What's Next Ansicht" },
{ "Allday Agenda view shows todos","Ganztag Agenda zeigt Todos" },
{ "Alarm","Alarm" },
{ "Used %1 Client","Benutzter %1 Client" },
{ "No email client installed","Kein Email Klient installiert" },
{ "Userdefined email client","Benutzerdef. Email Klient" },
{ "OM/Pi email client","OM/Pi Email Klient" },
{ "Include in multiple ","Beziehe in multiple " },
{ "calendar ","Kalender " },
{ "addressbook ","Adressbuch " },
{ "pwmanager","PWmanager" },
{ " sync"," Sync ein" },
{ "Write back synced data","Schreibe gesyncte Daten zurück" },
{ "-- Write back (on remote) existing entries only","-- Schreibe nur existierende (entfernte) Einträge zurück" },
{ "-- Write back (calendar) entries in future only","-- Schreibe nur zukünftige Kalender-Einträge zurück" },
{ "---- Max. weeks in future: ","---- Max. wochen in der Zukunft: " },
-{ "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" },
{ "Mobile device (cell phone)","Mobiles Gerät (Handy)" },
{ "Help...","Hilfe..." },
{ "Local file Cal:","Lokale Datei Kal:" },
{ "Local file ABook:","Lokale Datei ABuch:" },
{ "Local file PWMgr:","Lokale Datei PWMgr:" },
{ "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" },
{ "Calendar:","Kalender:" },
{ "AddressBook:","AdressBuch:" },
{ "PWManager:","PWManager:" },
{ "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" },
{ "ssh/scp","ssh/scp" },
{ "ftp","ftp" },
{ "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" },
{ "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" },
{ "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" },
{ "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" },
{ "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" },
{ "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" },
{ "KDE-Pim sync config","KDE-Pim sync Konfig" },
{ "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" },
{ "Recommended: Leave empty!\n(Such that model can\nbe auto detected)\nOr insert name of model:\n","Empfohlen: Leer lassen!\n(So dass das Model\nautomatisch erkannt\nwerden kann)\nOder füge Model Name ein:\n" },
{ "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" },
{ "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" },
{ "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" },
@@ -1550,31 +1549,37 @@
{ "Enable conflict detection","Schalte Konflikterkennung an" },
{ "Filter for the edited event","Filter für den bearbeiteten Termin" },
{ "Filter for other events","Filter für die anderen Termine" },
{ "Check Allday with Allday","Prüfe GanzTag mit GanzTag" },
{ "Check Allday with NonAllday","Prüfe GanzTag mit NichtGanzTag" },
{ "Check NonAllday with Allday","Prüfe NichtGanzTag mit GanzTag" },
{ "Check NonAllday with NonAllday","Prüfe NichtGanzTag mit NichtGanzTag" },
{ "Conflict detection","Konflikterkennung" },
{ "Loading calendar files ... please wait","Lade Kalenderdateien ... bitte warten" },
{ "Show multiday allday ev. in date nav.","Zeige Multi-Ganzt.Term.in Datums Nav." },
{ "Include events which "show as free"","Inklusive Termine mit "Zeige Zeit als frei"" },
{ "Conflict detection checks an <b>edited event</b> with <b>other events</b> for overlapping.","Konflikterkennung prüft einen <b>bearbeiteten Termin</b> auf Überschneidungen mit <b>anderen Terminen</b>." },
{ " Yes, close "," Ja, beenden " },
{ "Export All Data","Exportiere alle Daten" },
{ "You can save all data\nto another file via\nFile->Export->Export All Data","Sie können alle Daten in\neine andere Datei speichern unter\nDatei->Exportiere->Exportiere alle Daten" },
{ "<p><b>Duration:</b> %1 days</p>","<p><b>Dauer:</b> %1 Tage</p>" },
{ " (Duration: %1 days)"," (Dauer: %1 Tage)" },
{ "Autosave enabled!","Auto-Speichern angeschaltet!" },
{ "Autosave disabled! Save timer stopped!","Auto-Speichern ausgeschaltet! Speicher Timer gestoppt!" },
{ "Autosave disabled!","Auto-Speichern ist ausgeschaltet!" },
{ "Yes, Save!","Ja, Speichern!" },
{ "Calendar is modified\nbut Autosave is disabled!\nDo you want\nto save the data?","Der Kalender wurde verändert,\naber Auto-Speichern ist\nabgeschaltet. Möchten Sie\ndie Daten speichern?" },
{ "<p><b>C+ctrl</b>: Dis/enable automatic saving</p>\n","<p><b>C+ctrl</b>: Auto-Speichern ab/anschalten</p>\n" },
{ "<br>The calendar contains<br><b>%1 events<br>%2 todos<br>%3 journals</b>","<br>Der Kalender enthält<br><b>%1 Termine<br>%2 Todos<br>%3 Journale</b>" },
+{ "Enable alarm in resource settings","Schalte Alarm in Resourcenansicht wieder an" },
+{ "The alarm for this calendar\nis currently disabled!\nEnable it in resource settings.","Der Alarm für diesen Kalender\nist abgeschaltet.\nSchalten Sie ihn in der\nResourcenansicht ggf. an." },
+{ "Alarm disabled warning","Nichtaktiver Alarm" },
+{ "Pi-Sync - all calendars ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync - alle Kalender ( direktes Kx/Pi mit Kx/Pi syncen )" },
+{ "Pi-Sync - selected calendars ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync - ausgewählte Kalender ( direktes Kx/Pi mit Kx/Pi syncen )" },
+{ "","" },
{ "","" },
{ "","" },
{ "","" },
{ "","" },
{ "","" },
{ "","" },
{ "","" },
diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp
index 92e5a0f..21f220c 100644
--- a/korganizer/koeditorgeneral.cpp
+++ b/korganizer/koeditorgeneral.cpp
@@ -122,49 +122,48 @@ void KOEditorGeneral::initHeader(QWidget *parent,QBoxLayout *topLayout)
headerLayout->setColStretch( 3, 10);
mCalendarBox->setMaximumWidth( 64 );
}
else {
headerLayout->addWidget(mLocationEdit,1,1);
headerLayout->addWidget(mCalendarBox,1,2);
int str = 3;
if ( QApplication::desktop()->width() < 640 ) {
--str;
if ( QApplication::desktop()->width() < 320 )
--str;
}
headerLayout->setColStretch( 1, str);
headerLayout->setColStretch( 2, 1);
}
}
void KOEditorGeneral::setFocusOn( int i )
{
mNextFocus = i;
QTimer::singleShot( 0, this, SLOT ( slotSetFocusOn() ));
}
void KOEditorGeneral::slotSetFocusOn()
{
- mNextFocus;
if ( mNextFocus == 1 ) {
mDescriptionEdit->setFocus();
mDescriptionEdit->setCursorPosition( mDescriptionEdit->numLines (), 333);
}
if ( mNextFocus == 2 ) {
mSummaryEdit->setFocus();
}
}
void KOEditorGeneral::editCategories()
{
// qDebug("KOEditorGeneral::editCategories() ");
KPIM::CategorySelectDialog* csd = new KPIM::CategorySelectDialog( KOPrefs::instance(), 0 );
connect(csd,SIGNAL(categoriesSelected(const QString &)), this ,SLOT(setCategories(const QString &)));
//KOGlobals::fitDialogToScreen( csd );
csd->setColorEnabled();
csd->setSelected( QStringList::split (",", mCategoriesLabel->text()) );
csd->exec();
delete csd;
}
void KOEditorGeneral::showCatPopup()
{
mCatPopup->clear();
QStringList checkedCategories = QStringList::split (",", mCategoriesLabel->text());
@@ -334,49 +333,49 @@ void KOEditorGeneral::pickAlarmProgram()
bool oldState = mAlarmProgramButton->isOn();
QString fileName(KFileDialog::getOpenFileName(mAlarmProgram,i18n("Procedure Alarm: ") , 0));
if (!fileName.isEmpty()) {
mAlarmProgram = fileName;
QToolTip::remove(mAlarmProgramButton);
QString dispStr = i18n("Running '%1'").arg(fileName);
QToolTip::add(mAlarmProgramButton, dispStr);
mAlarmSoundButton->setOn(false);
mAlarmProgramButton->setOn(true);
QToolTip::add(mAlarmSoundButton, i18n("No sound set"));
} else {
mAlarmProgramButton->setOn(!oldState);
mAlarmSoundButton->setOn(oldState);
}
if (mAlarmProgramButton->isOn())
((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) );
if ( mAlarmSoundButton->isOn())
((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) );
}
-QString KOEditorGeneral::getFittingPath( const QString s )
+QString KOEditorGeneral::getFittingPath( const QString & s )
{
int maxlen = 50;
if ( QApplication::desktop()->width() < 640 ) {
if ( QApplication::desktop()->width() < 320 )
maxlen = 22;
else
maxlen = 35;
}
if ( s.length() > maxlen ) {
return "..."+s.right(maxlen -3);
}
return s;
}
void KOEditorGeneral::enableAlarmEdit(bool enable)
{
if ( enable ) {
if (!mAlarmProgramButton->isOn() && !mAlarmSoundButton->isOn()) {
mAlarmSoundButton->setOn( true );
if ( mAlarmSound.isEmpty() )
mAlarmSound = KOPrefs::instance()->mDefaultAlarmFile;
else {
if ( ! QFile::exists( mAlarmSound ) )
mAlarmSound = KOPrefs::instance()->mDefaultAlarmFile;
@@ -599,26 +598,28 @@ void KOEditorGeneral::writeIncidence(Incidence *event)
if (mAlarmIncrCombo->currentItem() == 1)
j = j * 60;
else if (mAlarmIncrCombo->currentItem() == 2)
j = j * (60 * 24);
alarm->setStartOffset( j );
if (!mAlarmProgram.isEmpty() && mAlarmProgramButton->isOn()) {
alarm->setProcedureAlarm(mAlarmProgram);
}
else if (!mAlarmSound.isEmpty() && mAlarmSoundButton->isOn())
alarm->setAudioAlarm(mAlarmSound);
else
alarm->setType(Alarm::Invalid);
//alarm->setAudioAlarm("default");
// TODO: Deal with multiple alarms
break; // For now, stop after the first alarm
}
} else {
Alarm* alarm = event->alarms().first();
if ( alarm ) {
alarm->setEnabled(false);
alarm->setType(Alarm::Invalid);
}
}
- event->setCalID( getCalendarID() );
+ int id = getCalendarID();
+ event->setCalID( id );
+ event->setAlarmEnabled( KOPrefs::instance()->getCalendar( id )->isAlarmEnabled );
}
diff --git a/korganizer/koeditorgeneral.h b/korganizer/koeditorgeneral.h
index d8b15af..b10a5d4 100644
--- a/korganizer/koeditorgeneral.h
+++ b/korganizer/koeditorgeneral.h
@@ -95,31 +95,31 @@ class KOEditorGeneral : public QObject
protected:
void fillCalCombo( int setToID = 0 );
int mNextFocus;
//QLineEdit *mSummaryEdit;
//QLineEdit *mLocationEdit;
KOLocationBox *mSummaryEdit;
KOLocationBox *mLocationEdit;
QComboBox *mCalendarBox;
QLabel *mAlarmBell;
QCheckBox *mAlarmButton;
QSpinBox *mAlarmTimeEdit;
QPushButton *mAlarmSoundButton;
QPushButton *mAlarmProgramButton;
QComboBox *mAlarmIncrCombo;
KTextEdit *mDescriptionEdit;
QLabel *mOwnerLabel;
QComboBox *mSecrecyCombo;
QCheckBox *mCancelBox;
QPushButton *mCategoriesButton;
QPushButton *mCategoriesLabel;
private:
QPopupMenu * mCatPopup;
- QString getFittingPath( const QString ) ;
+ QString getFittingPath( const QString &) ;
QString mAlarmSound;
QString mAlarmProgram;
QString mAlarmMessage;
};
#endif
diff --git a/korganizer/koeventeditor.cpp b/korganizer/koeventeditor.cpp
index 9ede543..3e87197 100644
--- a/korganizer/koeventeditor.cpp
+++ b/korganizer/koeventeditor.cpp
@@ -4,48 +4,49 @@
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., 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.
*/
#include <qtooltip.h>
#include <qframe.h>
#include <qpixmap.h>
#include <qhbox.h>
+#include <qtimer.h>
#include <qdir.h>
#include <qlayout.h>
#include <qwidgetstack.h>
#include <qapplication.h>
#include <kiconloader.h>
#include <kstandarddirs.h>
#include <kdebug.h>
#include <klocale.h>
#include <kfiledialog.h>
#include <kmessagebox.h>
#include <libkcal/calendarresources.h>
#include <libkcal/resourcecalendar.h>
#include <kresources/resourceselectdialog.h>
#include <libkdepim/categoryselectdialog.h>
#include <libkcal/calendarlocal.h>
#include <libkcal/icalformat.h>
#include "koprefs.h"
#include "koeventeditor.h"
extern int globalFlagBlockAgenda;
@@ -228,48 +229,51 @@ bool KOEventEditor::processInput( bool emitTime )
Event *event = 0;
if (mEvent) event = mEvent;
else {
event = new Event;
event->setOrganizer(KOPrefs::instance()->email());
}
writeEvent(event);
if ( emitTime ) {
globalFlagBlockAgenda = 1;
emit showAgendaView( false );
emit jumpToTime( event->dtStart().date() );
globalFlagBlockAgenda = 2;
}
if (mEvent) {
event->setRevision(event->revision()+1);
emit eventChanged(event);
} else {
mCalendar->addEvent(event);
mEvent = event;
emit eventAdded(event);
+ if ( event->isAlarmEnabled () && !event->alarmEnabled () ) {
+ QTimer::singleShot( 0, this, SLOT ( alarmWarning() ) );
+ }
}
return true;
}
void KOEventEditor::deleteEvent()
{
kdDebug() << "Delete event" << endl;
if (mEvent) {
if (KOPrefs::instance()->mConfirm) {
switch (msgItemDelete()) {
case KMessageBox::Continue: // OK
emit eventToBeDeleted(mEvent);
emit dialogClose(mEvent);
mCalendar->deleteEvent(mEvent);
emit eventDeleted();
reject();
break;
}
}
else {
emit eventToBeDeleted(mEvent);
emit dialogClose(mEvent);
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp
index 02b54da..607e549 100644
--- a/korganizer/koeventviewer.cpp
+++ b/korganizer/koeventviewer.cpp
@@ -383,48 +383,52 @@ void KOEventViewer::appendEvent(Event *event, int mode )
addTag("p",i18n("<b>Last recurrence was on:</b>") +" " + KGlobal::locale()->formatDate( nextd, shortDate ));
} else{
addTag("p",i18n("<b>Last recurrence was on:</b>") );
addTag("p", KGlobal::locale()->formatDate( nextd, shortDate ));
}
}
}
} else {
mMailSubject += i18n(" - " )+event->dtStartStr( true );
}
if (event->isAlarmEnabled()) {
Alarm *alarm =event->alarms().first() ;
QDateTime t = alarm->time();
QString s =i18n("( %1 before )").arg( alarm->offsetText() );
if(wideScreen ){
addTag("p",i18n("<b>Alarm on: ") + s +" </b>"+ KGlobal::locale()->formatDateTime( t, shortDate ));
}else{
addTag("p",i18n("<b>Alarm on: ") + s +" </b>");
addTag("p", KGlobal::locale()->formatDateTime( t, shortDate ));
}
//addTag("p",s);
+ if ( !(event->alarmEnabled() ) ) {
+ addTag("p", "<em>("+i18n("Enable alarm in resource settings") + ")</em>");
+
+ }
}
addTag("p","<b>"+i18n("Access: ") + "</b>" + event->secrecyStr());
formatCategories(event);
formatAttendees(event);
if ( KOPrefs::instance()->mEVshowCreated ) {
if(wideScreen ){
addTag("p",i18n("<b>Created: ") +" </b>"+KGlobal::locale()->formatDateTime( event->created(), shortDate ));
}else{
addTag("p",i18n("<b>Created: ") +" </b>");
addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate ));
}
}
if ( KOPrefs::instance()->mEVshowChanged ) {
if(wideScreen ){
addTag("p",i18n("<b>Last modified: ") +" </b>" + KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ) );
}else{
addTag("p",i18n("<b>Last modified: ") +" </b>");
addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ));
@@ -500,48 +504,52 @@ void KOEventViewer::appendTodo(Todo *event, int mode )
if (event->hasStartDate()) {
mText.append(i18n("<p><b>Start on:</b> %1</p>").arg(event->dtStartStr(KOPrefs::instance()->mShortDateInViewer)));
}
if (event->hasDueDate()) {
mText.append(i18n("<p><b>Due on:</b> %1</p>").arg(event->dtDueStr(KOPrefs::instance()->mShortDateInViewer)));
mMailSubject += i18n(" - " )+event->dtDueStr( true );
}
if (!event->location().isEmpty()) {
addTag("p","<b>"+i18n("Location: ")+"</b>"+ deTag(event->location() ) );
mMailSubject += i18n(" at ") + event->location();
}
mText.append(i18n("<p><b>Priority:</b> %2</p>")
.arg(QString::number(event->priority())));
if (event->isAlarmEnabled()) {
Alarm *alarm =event->alarms().first() ;
QDateTime t = alarm->time();
QString s =i18n("( %1 before )").arg( alarm->offsetText() );
if ( wideScreen ) {
addTag("p",i18n("<b>Alarm on: ") + s +" </b>"+ KGlobal::locale()->formatDateTime( t, shortDate ));
} else {
addTag("p",i18n("<b>Alarm on: ") + s +" </b>");
addTag("p", KGlobal::locale()->formatDateTime( t, shortDate ));
}
+ if ( !(event->alarmEnabled() ) ) {
+ addTag("p", "<em>("+i18n("Enable alarm in resource settings") + ")</em>");
+
+ }
}
addTag("p","<b>"+i18n("Access: ") + "</b>" + event->secrecyStr());
formatCategories(event);
formatAttendees(event);
if ( KOPrefs::instance()->mEVshowCreated ) {
if(wideScreen ){
addTag("p",i18n("<b>Created: ") +" </b>"+KGlobal::locale()->formatDateTime( event->created(), shortDate ));
} else {
addTag("p",i18n("<b>Created: ") +" </b>");
addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate ));
}
}
if ( KOPrefs::instance()->mEVshowChanged ) {
if(wideScreen ){
addTag("p",i18n("<b>Last modified: ") +" </b>" +KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ) );
} else {
addTag("p",i18n("<b>Last modified: ") +" </b>");
diff --git a/korganizer/koincidenceeditor.cpp b/korganizer/koincidenceeditor.cpp
index 9bc0302..236f6f9 100644
--- a/korganizer/koincidenceeditor.cpp
+++ b/korganizer/koincidenceeditor.cpp
@@ -69,48 +69,53 @@ KOIncidenceEditor::KOIncidenceEditor( const QString &caption,
// KOGlobals::fitDialogToScreen( mCategoryDialog );
//connect(mCategoryDialog,SIGNAL(editCategories()),SIGNAL(editCategories()));
//connect( this, SIGNAL( defaultClicked() ), SLOT( slotLoadTemplate() ) );
// connect( this, SIGNAL( user1Clicked() ), SLOT( slotSaveTemplate() ) );
connect( this, SIGNAL( user1Clicked() ), SLOT( slotShowIncidence() ) );
}
KOIncidenceEditor::~KOIncidenceEditor()
{
//delete mCategoryDialog;
}
void KOIncidenceEditor::setupAttendeesTab()
{
QFrame *topFrame = addPage(i18n("Attendees"));
QBoxLayout *topLayout = new QVBoxLayout(topFrame);
mDetails = new KOEditorDetails(spacingHint()-2,topFrame);
topLayout->addWidget(mDetails);
}
+void KOIncidenceEditor::alarmWarning()
+{
+ KMessageBox::information( 0, i18n("The alarm for this calendar\nis currently disabled!\nEnable it in resource settings."), i18n("Alarm disabled warning"));
+
+}
void KOIncidenceEditor::slotApply()
{
processInput( false );
}
void KOIncidenceEditor::accept()
{
slotOk();
}
void KOIncidenceEditor::slotOk()
{
if ( processInput( false ) ) QDialog::accept();
}
void KOIncidenceEditor::updateCategoryConfig()
{
qDebug("KOIncidenceEditor::updateCategoryConfig() is dead! ");
//mCategoryDialog->updateCategoryConfig();
}
void KOIncidenceEditor::slotCancel()
{
reject();
}
diff --git a/korganizer/koincidenceeditor.h b/korganizer/koincidenceeditor.h
index bfd6cc6..2e4bbf8 100644
--- a/korganizer/koincidenceeditor.h
+++ b/korganizer/koincidenceeditor.h
@@ -44,49 +44,50 @@ class KOIncidenceEditor : public KDialogBase
public:
/**
Construct new IncidenceEditor.
*/
KOIncidenceEditor( const QString &caption, Calendar *calendar,
QWidget *parent );
virtual ~KOIncidenceEditor();
/** Initialize editor. This function creates the tab widgets. */
virtual void init() = 0;
void accept();
virtual void setCategories( QString )= 0;
virtual void reload() = 0;
public slots:
void updateCategoryConfig();
signals:
void editCategories();
void showAgendaView( bool );
void dialogClose( Incidence * );
void jumpToTime( const QDate & );
- protected slots:
+ protected slots:
+ void alarmWarning();
void slotApply();
void slotOk();
void slotCancel();
void slotShowIncidence();
virtual void slotLoadTemplate();
virtual void slotSaveTemplate();
virtual void saveTemplate( const QString & ) = 0;
protected:
void setupAttendeesTab();
void createSaveTemplateDialog( SaveTemplateDialog::IncidenceType );
QString loadTemplate( Calendar *cal, const QString &type,
const QStringList &templates );
void saveAsTemplate( Incidence *, const QString &name );
/**
Process user input and create or update event. Returns false if input is invalid.
*/
virtual bool processInput( bool emitTime ) { return false; }
diff --git a/korganizer/kotodoeditor.cpp b/korganizer/kotodoeditor.cpp
index 682f83b..20a35d2 100644
--- a/korganizer/kotodoeditor.cpp
+++ b/korganizer/kotodoeditor.cpp
@@ -6,48 +6,49 @@
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., 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.
*/
#include <qtooltip.h>
#include <qframe.h>
#include <qpixmap.h>
#include <qlayout.h>
#include <qhbox.h>
+#include <qtimer.h>
#include <qdir.h>
#include <qdatetime.h>
#include <qapplication.h>
#include <qtabwidget.h>
#include <kiconloader.h>
#include <klocale.h>
#include <kfiledialog.h>
#include <kstandarddirs.h>
#include <kmessagebox.h>
#include <libkdepim/categoryselectdialog.h>
#include <libkcal/calendarlocal.h>
#include <libkcal/calendarresources.h>
#include <libkcal/resourcecalendar.h>
#include <libkcal/icalformat.h>
#include <kresources/resourceselectdialog.h>
#include <libkdepim/kdateedit.h>
#include "koprefs.h"
#include "kolocationbox.h"
#include "kotodoeditor.h"
extern int globalFlagBlockAgenda;
@@ -238,48 +239,51 @@ bool KOTodoEditor::processInput( bool emitTime )
Todo *todo = 0;
if (mTodo) todo = mTodo;
else {
todo = new Todo;
todo->setOrganizer(KOPrefs::instance()->email());
}
writeTodo(todo);
if ( emitTime ) {
globalFlagBlockAgenda = 1;
emit showAgendaView( false );
if ( todo->hasDueDate() )
emit jumpToTime( todo->dtDue().date() );
globalFlagBlockAgenda = 2;
}
if (mTodo) {
todo->setRevision(todo->revision()+1);
emit todoChanged(todo);
} else {
mCalendar->addTodo(todo);
mTodo = todo;
emit todoAdded(todo);
+ if ( todo->isAlarmEnabled () && !todo->alarmEnabled () ) {
+ QTimer::singleShot( 0, this, SLOT ( alarmWarning() ) );
+ }
}
return true;
}
void KOTodoEditor::deleteTodo()
{
if (mTodo) {
if (KOPrefs::instance()->mConfirm) {
switch (msgItemDelete()) {
case KMessageBox::Continue: // OK
emit todoToBeDeleted(mTodo);
emit dialogClose(mTodo);
mCalendar->deleteTodo(mTodo);
emit todoDeleted();
reject();
break;
}
}
else {
emit todoToBeDeleted(mTodo);
emit dialogClose(mTodo);
mCalendar->deleteTodo(mTodo);
emit todoDeleted();
diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp
index 1f9afcb..b097277 100644
--- a/libkdepim/ksyncprefsdialog.cpp
+++ b/libkdepim/ksyncprefsdialog.cpp
@@ -220,51 +220,51 @@ void KSyncPrefsDialog::setupSyncAlgTab()
//++iii;
mWriteBackFuture= new QCheckBox( i18n("Write back (calendar) entries for time period only"), topFrame );
//topLayout->addMultiCellWidget(mWriteBackFuture, iii,iii,0,1);
//++iii;
QHGroupBox* gb3 = new QHGroupBox( i18n("Time period"), topFrame);
connect ( mWriteBackFuture, SIGNAL( toggled ( bool ) ), gb3, SLOT ( setEnabled ( bool ) ) );
new QLabel( i18n("From ") , gb3 );
mWriteBackPastWeeks= new QSpinBox(1,104, 1, gb3);
new QLabel( i18n(" weeks in the past to ") , gb3 );
mWriteBackFutureWeeks= new QSpinBox(1,104, 1, gb3);
new QLabel( i18n(" weeks in the future ") , gb3 );
//topLayout->addMultiCellWidget(mWriteBackFutureWeeks, iii,iii,1,1);
//++iii;
gb3->setEnabled( false );
connect ( mWriteBackExisting, SIGNAL( toggled ( bool ) ), gb4, SLOT ( setDisabled ( bool ) ) );
}
connect ( mWriteBackFile, SIGNAL( toggled ( bool ) ), gb2, SLOT ( setEnabled ( bool ) ) );
}
proGr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Profile kind"), topFrame);
gr = proGr;
topLayout->addMultiCellWidget(gr, iii,iii,0,1);
++iii;
mIsLocal = new QRadioButton ( i18n("Local file"), gr );
- mIsPi = new QRadioButton ( i18n("Pi-Sync - all resources ( direct Kx/Pi to Kx/Pi sync )"), gr );
+ mIsPi = new QRadioButton ( i18n("Pi-Sync - all calendars ( direct Kx/Pi to Kx/Pi sync )"), gr );
connect (mIsPi, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) );
- mIsPiSpecific = new QRadioButton ( i18n("Pi-Sync - selected resources ( direct Kx/Pi to Kx/Pi sync )"), gr );
+ mIsPiSpecific = new QRadioButton ( i18n("Pi-Sync - selected calendars ( direct Kx/Pi to Kx/Pi sync )"), gr );
connect (mIsPiSpecific, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) );
mIsNotLocal = new QRadioButton ( i18n("Remote file (w down/upload command)"), gr );
connect (mIsLocal, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) );
mIsPhone = new QRadioButton ( i18n("Mobile device (cell phone)"), gr );
connect (mIsPhone, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) );
QVGroupBox* gb1 = new QVGroupBox( i18n("Profile kind specific settings"), topFrame);
topLayout->addMultiCellWidget(gb1, iii,iii,0,1);
++iii;
// ******************************************
// Profile kind specific settings
{
// *** phone *******************************
QVGroupBox* topFrame = gb1;
phoneWidget = new QVBox( topFrame);
//topLayout->addMultiCellWidget(phoneWidget, iii,iii,0,1);
//++iii;
mWriteContactToSIM = 0;//new QCheckBox( i18n("Sync contacts with phone SIM card (If not, sync with phone memory)"), phoneWidget );
QHBox* temphb = new QHBox( phoneWidget );
new QLabel( i18n("I/O device: "), temphb );
mPhoneDevice = new QLineEdit( temphb);
button = new QPushButton( i18n("Help..."), temphb );
connect ( button, SIGNAL( clicked()), this, SLOT ( helpDevice() ) );