summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-06-11 15:15:54 (UTC)
committer zautrix <zautrix>2005-06-11 15:15:54 (UTC)
commit0cfaf22fc5d8f511320813171be84ce3436990c6 (patch) (side-by-side diff)
tree00f858c12e9c810c53acdd816a9fcfe7e880996a
parentd4501288ba7414ba89a791dd2c306e9f74eeb3fa (diff)
downloadkdepimpi-0cfaf22fc5d8f511320813171be84ce3436990c6.zip
kdepimpi-0cfaf22fc5d8f511320813171be84ce3436990c6.tar.gz
kdepimpi-0cfaf22fc5d8f511320813171be84ce3436990c6.tar.bz2
fixx
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt2
-rw-r--r--kalarmd/simplealarmdaemonimpl.cpp4
-rw-r--r--korganizer/calendarview.cpp6
3 files changed, 8 insertions, 4 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index ec6a4ec..a11fab3 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,57 +1,59 @@
Info about the changes in new versions of KDE-Pim/Pi
********** VERSION 2.1.6 ************
KO/Pi:
Added to the list view (the list view is used in search dialog as well) the possibility to print it.
Added to the list view the possibility to hide entries, if you do not want to print all entries of the list view.
Added to the list view the possibility to add all subtodos of selected todos to an export/beam.
Added to the search dialog the possibility to make an additive search such that you can get a better list for export/printout.
+Added to the search dialog the possibility to hide the checkboxes such that there is more space for the list view on the Zaurus.
+Fixed a problem in the AlarmTimer Applet: Now utf8 messages are displayed properly.
********** VERSION 2.1.5 ************
This is the new stable version.
Bugfix:
Fixed a problem with agenda popup on the desktop in KO/Pi.
Fixed a crash when reloading file, e.g. after a passive pi-sync synchronization.
Added config option to not display completed todos in agenda view.
Addressee view is now using the formatted name, if defined.
That makes it possible to display "lastname, firstname" in that view now.
To set the formatted name for all contacts, please use menu:
Edit->Change->Set formatted name.
Fixed the bug in KA/Pi that is was not possible to add images to a contact on Windows.
********** VERSION 2.1.4 ************
Fixed two more bugs in the KA/Pi CSV import dialog:
Made it possible to read multi-line fields and import it to the "Note" field.
Fixed a problem in mapping custom fields, whatever a custem field is...
********** VERSION 2.1.3 ************
Changed the menu structure of the alarm applet:
Moved "Simulate" to " Play Beeps" submenu and re-added "Todo List".
Fixed several problems in the KA/Pi CSV import dialog:
Added "Category", made codec configureable and made it possible to map many fields to the "Note" field.
********** VERSION 2.1.2 ************
Fixed a problem closing the alarm dialog on Zaurus with "OK" button.
Fixed a problem when importing data from Outlook with mutiple categories set.
Changed display of days in datenavigator:
Birthdays are now blue, not dark green.
When todo view is shown, no birtdays are shown and days with due todos are shown blue.
When journal view is shown, only holidays are shown and days with journals are blue.
Added Backup options to global config:
You can create now x-daily backups for KO/Pi, KA/Pi (for file resources only, file resource is the standard type) and PwM/Pi ( all files you will open ).
It is recommended to use another HDD/Memory card for the backup directory. If (very useful on the Zaurus) the specified backup directory does not exist you are asked if you want to try again to create a backup. That makes it possible to insert your memory card in the Zaurus and then trying again.
The backup is created when the application wants to save for the first time on a backup-day. You can specify the amount of backups and the day interval of backups.
********** VERSION 2.1.1 ************
Stable release 2.1.1!
diff --git a/kalarmd/simplealarmdaemonimpl.cpp b/kalarmd/simplealarmdaemonimpl.cpp
index 37e7d0d..d6e06c8 100644
--- a/kalarmd/simplealarmdaemonimpl.cpp
+++ b/kalarmd/simplealarmdaemonimpl.cpp
@@ -225,97 +225,97 @@ void SimpleAlarmDaemonImpl::saveSlot( int load )
configString += "PLBE " + QString::number( mPlayBeeps ) + "\n";
configString += "CUTE " + mCustomText + "\n";
configString += "CUMI " + QString::number( mCustomMinutes ) + "\n";
configString += "SUTI " + QString::number( mAlarmDialog->getSuspendTime( )) + "\n";
QTextStream ts( &file );
ts << configString ;
file.close();
}
}
void SimpleAlarmDaemonImpl::confSuspend( int num )
{
mSuspendPopUp->setItemChecked ( mSuspend,false );
mSuspend = num;
mSuspendPopUp->setItemChecked ( mSuspend,true );
}
void SimpleAlarmDaemonImpl::confPause( int num )
{
mPausePopUp->setItemChecked ( mPausePlay,false );
mPausePlay = num;
mPausePopUp->setItemChecked ( mPausePlay,true );
}
void SimpleAlarmDaemonImpl::confSound( int num )
{
if ( num == 0 ) {
wavAlarm = false;
mSoundPopUp->setItemChecked ( 0, true );
mSoundPopUp->setItemChecked ( 1, false );
} else {
wavAlarm = true;
mSoundPopUp->setItemChecked ( 0, false );
mSoundPopUp->setItemChecked ( 1, true );
}
}
void SimpleAlarmDaemonImpl::slotPlayBeep( int num )
{
if ( num == 1000 ) {
simulate();
return;
}
mBeepPopUp->setItemChecked ( mPlayBeeps,false );
mPlayBeeps = num;
mBeepPopUp->setItemChecked ( mPlayBeeps, true );
}
void SimpleAlarmDaemonImpl::recieve( const QCString& msg, const QByteArray& )
{
//qDebug("SimpleAlarmDaemonImpl::ALARM RECEIVED! %s", msg.data());
- QString mess = msg;
+ QString mess = QString::fromUtf8(msg.data());
mAlarmMessage = mess.mid( 9 );
QString filename = getenv("QPEDIR") ;
filename += "/pics/kdepim/korganizer/koalarm.wav";
QString tempfilename;
if ( mess.left( 13 ) == "suspend_alarm") {
bool error = false;
int len = mess.mid( 13 ).find("+++");
if ( len < 2 )
error = true;
else {
tempfilename = mess.mid( 13, len );
if ( !QFile::exists( tempfilename ) )
error = true;
}
if ( ! error ) {
filename = tempfilename;
}
mAlarmMessage = mess.mid( 13+len+3 );
//qDebug("suspend file %s ",tempfilename.latin1() );
startAlarm( mAlarmMessage, filename);
return;
}
if ( mess.left( 11 ) == "timer_alarm") {
mTimerTime = 0;
startAlarm( mess.mid( 11 ), filename );
return;
}
if ( mess.left( 10 ) == "proc_alarm") {
bool error = false;
int len = mess.mid( 10 ).find("+++");
if ( len < 2 )
error = true;
else {
tempfilename = mess.mid( 10, len );
if ( !QFile::exists( tempfilename ) )
error = true;
}
if ( error ) {
mAlarmMessage = "Procedure Alarm\nError - File not found\n";
mAlarmMessage += mess.mid( 10+len+3+9 );
} else {
{
QCopEnvelope e("QPE/Application/kopi", "-writeFileSilent");
}
//qDebug("-----system command %s ",tempfilename.latin1() );
if ( vfork () == 0 ) {
execl ( tempfilename.latin1(), 0 );
return;
@@ -577,97 +577,97 @@ void SimpleAlarmDaemonImpl::confTimer( int time )
spinm.setFixedSize( 110,62 );
lay.addWidget( &hbox);
QLabel lab5 ("Timer fires at:", &dia );
lab5.setAlignment( AlignCenter );
lay.addWidget( &lab5);
KODateLabel dl ( &dia );
dl.setAlignment( AlignCenter );
dl.setFont( fo );
connect ( &spinh, SIGNAL ( valueChanged (int)), &dl, SLOT ( slot_hours( int ) ) );
connect ( &spinm, SIGNAL ( valueChanged (int)), &dl, SLOT ( slot_minutes( int ) ) );
lay.addWidget( &dl);
spinh.setValue( mCustomMinutes/60 );
spinm.setValue( mCustomMinutes%60 );
QPushButton ok ( "Start timer", &dia);
ok.setDefault( true );
ok.setFont( fo );
spinh.setFocus();
lay.addWidget( &ok);
connect ( &ok, SIGNAL (clicked()), &dia, SLOT ( accept() ) );
dia.resize( dia.sizeHint().width(), dia.sizeHint().height() );
if ( !dia.exec() )
return;
mCustomText = lEdit.text();
mCustomMinutes = spinh.value()*60+spinm.value();
if ( mCustomMinutes == 0 )
mCustomMinutes = 1;
if ( mCustomMinutes > 1440 )
mCustomMinutes = 1440;
mess += mCustomText;
minutes = mCustomMinutes;
mRunningTimerText = mCustomText.stripWhiteSpace ();
int in = mRunningTimerText.find( " " );
mRunningTimerText = mRunningTimerText.left ( in );
}
else {
mess+= QString::number ( minutes ) + ( " minutes are past!");
int min = minutes;
if ( min % 60 == 0 )
mRunningTimerText = QString::number ( min/60 ) + ( " hours");
else
mRunningTimerText = QString::number ( minutes ) + ( " minutes");
}
}
//minutes = 1;
mRunningTimer = QDateTime::currentDateTime().addSecs( minutes * 60 );
timerMesssage = mess;
- AlarmServer::addAlarm ( mRunningTimer,"koalarm",timerMesssage.latin1());
+ AlarmServer::addAlarm ( mRunningTimer,"koalarm",timerMesssage.utf8());
mTimerTime = 1;
}
void SimpleAlarmDaemonImpl::writeFile()
{
QCopEnvelope e("QPE/Application/kopi", "-writeFileSilent");
//QCopEnvelope e("QPE/Application/kopi", "-writeFile");
}
void SimpleAlarmDaemonImpl::showWN()
{
QCopEnvelope e("QPE/Application/kopi", "-showWN");
}
void SimpleAlarmDaemonImpl::newTodo()
{
QCopEnvelope e("QPE/Application/kopi", "-newTodo");
}
void SimpleAlarmDaemonImpl::newEvent()
{
QCopEnvelope e("QPE/Application/kopi", "-newEvent");
}
void SimpleAlarmDaemonImpl::newMail()
{
QCopEnvelope e("QPE/Application/ompi", "newMail()");
}
void SimpleAlarmDaemonImpl::showAdd()
{
QCopEnvelope e("QPE/Application/kapi", "raise()");
}
void SimpleAlarmDaemonImpl::ringSync()
{
QCopEnvelope e("QPE/Application/kopi", "-ringSync");
}
void SimpleAlarmDaemonImpl::newCountdown()
{
//recieve("cal_alarm", 10 );
}
void SimpleAlarmDaemonImpl::simulate()
{
writeFile();
QString filename = getenv("QPEDIR") ;
filename += "/pics/kdepim/korganizer/koalarm.wav";
startAlarm("Alarm simulation", filename );
}
void SimpleAlarmDaemonImpl::showKO()
{
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 8d992b9..4b82aa8 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -605,103 +605,105 @@ void CalendarView::init()
mFlagEditDescription = false;
mSuspendTimer = new QTimer( this );
mAlarmTimer = new QTimer( this );
mRecheckAlarmTimer = new QTimer( this );
connect( mRecheckAlarmTimer, SIGNAL( timeout () ), SLOT( recheckTimerAlarm() ) );
connect( mSuspendTimer, SIGNAL( timeout () ), SLOT( suspendAlarm() ) );
connect( mAlarmTimer, SIGNAL( timeout () ), SLOT( timerAlarm() ) );
mAlarmDialog = new AlarmDialog( this );
connect( mAlarmDialog, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addSuspendAlarm(const QDateTime &, const QString & ) ) );
mAlarmDialog->setServerNotification( false );
mAlarmDialog->setSuspendTime( KOPrefs::instance()->mAlarmSuspendTime );
#ifndef DESKTOP_VERSION
//US listen for arriving address resultsets
connect(ExternalAppHandler::instance(), SIGNAL(receivedBirthdayListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)),
this, SLOT(insertBirthdays(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)));
#endif
mDateNavigator->setCalendar( mCalendar );
}
CalendarView::~CalendarView()
{
// kdDebug() << "~CalendarView()" << endl;
//qDebug("CalendarView::~CalendarView() ");
delete mDialogManager;
delete mViewManager;
delete mStorage;
delete mDateFrame ;
delete beamDialog;
delete mEventViewerDialog;
//kdDebug() << "~CalendarView() done" << endl;
}
void CalendarView::checkAlarms()
{
KConfig *config = KOGlobals::config();
config->setGroup( "AppRun" );
QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) );
int secto = dt.secsTo( QDateTime::currentDateTime() );
int secs = config->readNumEntry( "LatestProgramStop" , secto) - 30;
//secs -= ( 3600 * 24*3 ); // debug only
QDateTime latest = dt.addSecs ( secs );
qDebug("KO: Last termination on %s ", latest.toString().latin1());
QPtrList<Incidence> el = mCalendar->rawIncidences();
QPtrList<Incidence> al;
Incidence* inL = el.first();
+ QDateTime cur = QDateTime::currentDateTime().addSecs(-59);
+ qDebug("KO: Checking alarm until %s ", cur.toString().latin1());
while ( inL ) {
bool ok = false;
int offset = 0;
QDateTime next = inL->getNextAlarmDateTime(& ok, &offset, latest ) ;
if ( ok ) {
//qDebug("OK %s",next.toString().latin1());
- if ( next < QDateTime::currentDateTime() ) {
+ if ( next < cur ) {
al.append( inL );
//qDebug("found missed alarm: %s ", inL->summary().latin1() );
}
}
inL = el.next();
}
if ( al.count() ) {
QDialog* dia = new QDialog( this, "huhu", false, WDestructiveClose | WStyle_StaysOnTop );
dia->setCaption( i18n("KO/Pi: Missing alarms!") );
QVBoxLayout* lay = new QVBoxLayout( dia );
lay->setSpacing( 0 );
lay->setMargin( 0 );
MissedAlarmTextBrowser* matb = new MissedAlarmTextBrowser ( dia, al, latest );
connect( matb, SIGNAL( showIncidence( QString ) ),SLOT( showIncidence( QString ) ));
lay->addWidget( matb );
if ( QApplication::desktop()->width() == 480 || QApplication::desktop()->width() == 640 ) {
int wid = 210;
int x = QApplication::desktop()->width() - wid - 7;
int y = QApplication::desktop()->height() - wid - 70;
dia->setGeometry ( x,y,wid,wid);
} else {
int si = 220;
if ( QApplication::desktop()->width() > 470 )
si = 400;
dia->resize(si,si/2);
}
dia->setBackgroundColor( QColor( 255, 255, 255 ) );
dia->show();
}
}
void CalendarView::showDay( QDate d )
{
dateNavigator()->blockSignals( true );
dateNavigator()->selectDate( d );
dateNavigator()->blockSignals( false );
mViewManager->showDayView();
//dateNavigator()->selectDate( d );
}
void CalendarView::timerAlarm()
{
//qDebug("CalendarView::timerAlarm() ");
computeAlarm(mAlarmNotification );
}
void CalendarView::suspendAlarm()
{
//qDebug(" CalendarView::suspendAlarm() ");
@@ -787,97 +789,97 @@ void CalendarView::computeAlarm( QString msg )
return;
}
//qDebug("+++++++system command %s ",tempfilename.latin1() );
}
if ( mess.left( 11 ) == "audio_alarm") {
bool error = false;
int len = mess.mid( 11 ).find("+++");
if ( len < 2 )
error = true;
else {
tempfilename = mess.mid( 11, len );
if ( !QFile::exists( tempfilename ) )
error = true;
}
if ( ! error ) {
filename = tempfilename;
}
mAlarmMessage = mess.mid( 11+len+3+9 );
//qDebug("audio file command %s ",tempfilename.latin1() );
}
if ( mess.left( 9 ) == "cal_alarm") {
mAlarmMessage = mess.mid( 9 ) ;
}
startAlarm( mAlarmMessage, filename );
}
void CalendarView::addSuspendAlarm(const QDateTime &qdt, const QString &noti )
{
//qDebug("+++++addSUSPENDAlarm %s %s ", qdt.toString().latin1() , noti.latin1() );
mSuspendAlarmNotification = noti;
int ms = QDateTime::currentDateTime().secsTo( qdt )*1000;
//qDebug("Suspend Alarm timer started with secs: %d ", ms/1000);
mSuspendTimer->start( ms , true );
}
void CalendarView::addAlarm(const QDateTime &qdt, const QString &noti )
{
mNextAlarmDateTime = qdt;
//qDebug("+++++addAlarm %s %s ", qdt.toString().latin1() , noti.latin1() );
if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) {
#ifndef DESKTOP_VERSION
- AlarmServer::addAlarm ( qdt,"koalarm", noti.latin1() );
+ AlarmServer::addAlarm ( qdt,"koalarm", noti.utf8() );
#endif
return;
}
int maxSec;
//maxSec = 5; //testing only
maxSec = 86400+3600; // one day+1hour
mAlarmNotification = noti;
int sec = QDateTime::currentDateTime().secsTo( qdt );
if ( sec > maxSec ) {
mRecheckAlarmTimer->start( maxSec * 1000 );
// qDebug("recheck Alarm timer started with secs: %d next alarm in sec:%d", maxSec,sec );
return;
} else {
mRecheckAlarmTimer->stop();
}
//qDebug("Alarm timer started with secs: %d ", sec);
mAlarmTimer->start( sec *1000 , true );
}
// called by mRecheckAlarmTimer to get next alarm
// we need this, because a QTimer has only a max range of 25 days
void CalendarView::recheckTimerAlarm()
{
mAlarmTimer->stop();
mRecheckAlarmTimer->stop();
mCalendar->checkAlarmForIncidence( 0, true );
}
void CalendarView::removeAlarm(const QDateTime &qdt, const QString &noti )
{
//qDebug("-----removeAlarm %s %s ", qdt.toString().latin1() , noti.latin1() );
if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) {
#ifndef DESKTOP_VERSION
AlarmServer::deleteAlarm (qdt ,"koalarm" ,noti.latin1() );
#endif
return;
}
mAlarmTimer->stop();
}
void CalendarView::selectWeekNum ( int num )
{
dateNavigator()->blockSignals( true );
dateNavigator()->selectWeek( num );
dateNavigator()->blockSignals( false );
mViewManager->showWeekView();
}
KOViewManager *CalendarView::viewManager()
{
return mViewManager;