summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-06-04 09:25:09 (UTC)
committer zautrix <zautrix>2005-06-04 09:25:09 (UTC)
commitd40cf5135c640506011334364274b8ee5df9998b (patch) (side-by-side diff)
tree56895a78e170856ff641dfa13f2f6eb4cc2b3488
parent0e0ac7a92ac2fe052b3e72d49e505a078b05e7f3 (diff)
downloadkdepimpi-d40cf5135c640506011334364274b8ee5df9998b.zip
kdepimpi-d40cf5135c640506011334364274b8ee5df9998b.tar.gz
kdepimpi-d40cf5135c640506011334364274b8ee5df9998b.tar.bz2
fix
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt2
-rw-r--r--korganizer/calendarview.cpp10
-rw-r--r--korganizer/calendarview.h1
-rw-r--r--korganizer/mainwindow.cpp7
4 files changed, 14 insertions, 6 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index cc8102c..5a27a10 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -1341,41 +1341,41 @@
{ "Todo is stopped","Todo ist gestoppt" },
{ "Start todo","Starte Todo" },
{ "The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?","Das Todo\n%1\nist gestoppt.\nWollen Sie es auf\ngestartet setzen?" },
{ "The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?","Das Todo\n%1\nwird geklont!\nEs hat Untertodos!\nMöchten Sie alle\nUntertodos auch klonen?" },
{ "Todo has subtodos","Todo hat Untertodos" },
{ "Block popup until mouse button release","Sperre Popup bis Mausknopf losgelassen" },
{ "Colors","Farben" },
{ "Click on new parent item","Klicke auf neues Übertodo" },
{ "Reparenting aborted!","Übertodo setzen abgebrochen" },
{ "Cannot move Todo to itself\nor a child of itself","Kann nicht Todo auf\nsich selbst oder\nein Untertodo verschieben" },
{ "Recursive reparenting not possible!","Rekursives Verschieben nicht möglich" },
{ "Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)","Entferne alle erledigten Todos?\n(Erledigte wiederholende Todos\nwerden nicht gelöscht!)" },
{ "Alternating background of list views","Abwechselnder Hintergrund für Listen" },
{ "times","Zeiten" },
{ "The todo\n%1\nhas subtodos!\nDo you want to set\nthe categories for\nall subtodos as well?","Das Todo\n%1\nhat Untertodos!\nMöchten Sie die Kategorien\nauch für alle Untertodos setzen?" },
{ "Backup enabled","Backup angeschaltet" },
{ "Use standard backup dir","Standard Backupverzeichnis" },
{ "Number of Backups:","Anzahl der Backups" },
{ "Make backup every ","Mache ein Backup alle " },
{ " days"," Tage" },
{ "Creating backup ... please wait ...","Erzeuge Backup ... bitte warten ..." },
{ "Backup Failed!","Backup Problem!" },
{ "Try again now","Versuche jetzt nochmal" },
{ "Try again later","Versuche später nochmal" },
{ "Try again tomorrow","Versuche morgen nochmal" },
{ "Disable backup","Schalte Backup ab" },
{ "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" },
{ "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" },
{ "Choose action","Wähle Aktion" },
{ "Comment for todo:","Kommentar zum Todo:" },
{ "Stop+note","Stop+Notiz" },
{ "Agenda view shows completed todos","Agenda Ansicht zeigt erledigte Todos" },
-{ "KO/Pi: Missing alarm notification!","KO/Pi: Benachrichtigung über verpasste Alarme!" },
+{ "KO/Pi: Missing alarms!","KO/Pi: Verpasste Alarme!" },
{ "You missed the alarms for the following events or todos:","Sie verpassten die Alarme für folgende Termine oder Todos:" },
{ "","" },
{ "","" },
{ "","" },
{ "","" },
{ "","" },
{ "","" },
{ "","" }, \ No newline at end of file
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 5132f98..42166ab 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -182,64 +182,68 @@ MissedAlarmTextBrowser::MissedAlarmTextBrowser(QWidget *parent, QPtrList<Inciden
tempText += inc->summary();
else
tempText += i18n("-no summary-");
QString timestr;
if (!inc->doesFloat())
timestr = KGlobal::locale()->formatDateTime( dt, KOPrefs::instance()->mShortDateInViewer) +": ";
else
timestr = KGlobal::locale()->formatDate( dt.date() , KOPrefs::instance()->mShortDateInViewer) +": ";
if ( dt.date() == QDate::currentDate() && time == 0 ) {
time = 1;
mText +="</table>";
mText += "</td></tr>\n<tr bgcolor=\"#FFDC64\"><td>";
mText += "<table>";
}
if ( dt.date() > QDate::currentDate() && time != 2 ) {
time = 2;
mText +="</table>";
mText += "</td></tr>\n<tr bgcolor=\"#6AFF6A\"><td>";
mText += "<table>";
}
mText +="<tr><td><b>";
mText += timestr;
mText += "</b></td><td>";
mText += tempText;
mText += "</td></tr>\n";
inc = getNextInc( start );
}
mText +="</table>";
setText( mText );
}
+MissedAlarmTextBrowser::~MissedAlarmTextBrowser()
+{
+ //qDebug("delete MissedAlarmTextBrowser::~MissedAlarmTextBrowser() ");
+}
Incidence * MissedAlarmTextBrowser::getNextInc( QDateTime start )
{
QDateTime dt ;
Incidence * retInc;
Incidence * inc = mAlarms.first();
if ( inc == 0 )
return 0;
bool ok;
dt = inc->getNextOccurence( start, &ok );
if ( ! ok ) return 0;
QDateTime dtn ;
retInc = inc;
inc = mAlarms.next();
while ( inc ) {
dtn = inc->getNextOccurence( start, &ok );
if ( ! ok ) return 0;
if ( dtn < dt ) {
dt = dtn;
retInc = inc;
}
inc = mAlarms.next();
}
mAlarms.remove( retInc );
return retInc;
}
void MissedAlarmTextBrowser::setSource(const QString & n)
{
if (n.startsWith("event:")) {
#ifdef DESKTOP_VERSION
emit showIncidence(n.mid(8));
#else
@@ -615,72 +619,72 @@ void CalendarView::init()
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 secs = config->readNumEntry( "LatestProgramStop" ) - 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();
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() ) {
al.append( inL );
- qDebug("found missed alarm: %s ", inL->summary().latin1() );
+ //qDebug("found missed alarm: %s ", inL->summary().latin1() );
}
}
inL = el.next();
}
if ( al.count() ) {
- QDialog* dia = new QDialog( this, "huhu", false );
- dia->setCaption( i18n("KO/Pi: Missing alarm notification!") );
+ 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 );
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() ");
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h
index 1eca905..084b6db 100644
--- a/korganizer/calendarview.h
+++ b/korganizer/calendarview.h
@@ -59,64 +59,65 @@ class DateNavigator;
class KOIncidenceEditor;
class KDatePicker;
class ResourceView;
class KOEventEditor;
class KOTodoEditor ;
class KOEventViewerDialog;
class KOBeamPrefs;
class KSyncProfile;
class AlarmDialog;
class KCal::Attendee;
namespace KCal { class FileStorage; }
using namespace KCal;
/**
This is the main calendar widget. It provides the different vies on t he
calendar data as well as the date navigator. It also handles synchronisation
of the different views and controls the different dialogs like preferences,
event editor, search dialog etc.
@short main calendar view widget
@author Cornelius Schumacher
*/
#include <qtextbrowser.h>
#include <qtextcodec.h>
class MissedAlarmTextBrowser : public QTextBrowser {
Q_OBJECT
public:
MissedAlarmTextBrowser(QWidget *parent, QPtrList<Incidence> alarms ,QDateTime start);
+ ~MissedAlarmTextBrowser();
void setSource(const QString & n);
private:
Incidence * getNextInc(QDateTime start );
QPtrList<Incidence> mAlarms;
signals:
void showIncidence( QString uid);
};
class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Observer, public KSyncInterface
{
Q_OBJECT
public:
/**
Constructs a new calendar view widget.
@param calendar calendar document
@param parent parent window
@param name Qt internal widget object name
*/
CalendarView( CalendarResources *calendar, QWidget *parent = 0,
const char *name = 0 );
CalendarView( Calendar *calendar, QWidget *parent = 0,
const char *name = 0 );
virtual ~CalendarView();
Calendar *calendar() { return mCalendar; }
KOViewManager *viewManager();
KODialogManager *dialogManager();
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 1320231..63053a5 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -343,66 +343,69 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) );
connect(mView , SIGNAL( save() ), this, SLOT( save() ) );
connect(mView , SIGNAL( saveStopTimer() ), this, SLOT( saveStopTimer() ) );
connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) );
connect(mSyncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) );
mSyncManager->setDefaultFileName( sentSyncFile());
connect ( syncMenu, SIGNAL( activated ( int ) ), mSyncManager, SLOT (slotSyncMenu( int ) ) );
mSyncManager->fillSyncMenu();
mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins );
if ( showWarning ) {
KMessageBox::information( this,
"You are starting KO/Pi for the first time.\nPlease read menu: Help-What's New,\nif you did an update!\nPlease choose your timezone in the \nConfigure Dialog TAB Time Zone!\nPlease choose your language\nin the TAB Locale!\nYou get the Configure Dialog\nvia Menu: Actions - Configure....\nClick OK to show the Configure Dialog!\n", "KO/Pi information");
qApp->processEvents();
mView->dialogManager()->showSyncOptions();
}
//US listen for result adressed from Ka/Pi
#ifndef DESKTOP_VERSION
connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
#endif
#ifndef DESKTOP_VERSION
infrared = 0;
#endif
updateFilterToolbar();
updateWeek( mView->startDate() );
connect( mView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ),
SLOT( updateWeekNum( const KCal::DateList & ) ) );
mBRdisabled = false;
//toggleBeamReceive();
-
- QTimer::singleShot( 1000, mView, SLOT ( checkAlarms() ));
+ int tiint= 3000;
+#ifndef DESKTOP_VERSION
+ tiint = 5000;
+#endif
+ QTimer::singleShot( tiint, mView, SLOT ( checkAlarms() ));
}
MainWindow::~MainWindow()
{
//qDebug("MainWindow::~MainWindow() ");
//save toolbar location
delete mCalendar;
delete mSyncManager;
#ifndef DESKTOP_VERSION
if ( infrared )
delete infrared;
#endif
}
void MainWindow::disableBR(bool b)
{
#ifndef DESKTOP_VERSION
if ( b ) {
if ( infrared ) {
toggleBeamReceive();
mBRdisabled = true;
}
mBRdisabled = true;
} else {
if ( mBRdisabled ) {
mBRdisabled = false;
//makes no sense,because other cal ap is probably running
// toggleBeamReceive();
}
}
#endif