summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt4
-rw-r--r--kalarmd/alarmdialog.cpp5
-rw-r--r--korganizer/calendarview.cpp47
-rw-r--r--korganizer/calendarview.h2
-rw-r--r--korganizer/kodialogmanager.cpp4
-rw-r--r--korganizer/kolistview.cpp3
-rw-r--r--korganizer/mainwindow.cpp17
-rw-r--r--korganizer/mainwindow.h2
8 files changed, 43 insertions, 41 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index 44e6bdf..593806b 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -1471,11 +1471,11 @@
{ "Change category list now!","Ändere Kategorieliste jetzt!" },
{ "Edit category list...","Ändere Kategorieliste..." },
{ "Toolbar changes needs a restart!","Neustart benötigt für Toolbaränderungen!" },
{ "Filepath: ","Dateipfad: " },
{ "The loading of one or more calendar failed:","Das Laden eines oder mehrerer Kalender schlug fehl:" },
{ "You can try to reload the calendar in the Resource View!","In der Resourcenansicht können Sie erneut versuchen den Kalender zu laden!" },
-{ "","" },
-{ "","" },
+{ "<b>WARNING:</b> There is a pending suspended alarm!","<b>WARNUNG:</b> Es gibt einen laufenden Suspendalarm!" },
+{ "Pending Suspend Alarm","Laufender Suspend Alarm" },
{ "","" },
{ "","" },
{ "","" }, \ No newline at end of file
diff --git a/kalarmd/alarmdialog.cpp b/kalarmd/alarmdialog.cpp
index 17d4afa..ddb125a 100644
--- a/kalarmd/alarmdialog.cpp
+++ b/kalarmd/alarmdialog.cpp
@@ -95,12 +95,17 @@ AlarmDialog::AlarmDialog(QWidget *parent,const char *name)
layout->addWidget ( mMissedAlarms );
mMissedAlarmsCombo = new QComboBox ( this );
layout->addWidget ( mMissedAlarmsCombo );
QLabel* labb = new QLabel("Suspend\nduration\n(minutes):",this);
+#ifdef DESKTOP_VERSION
+ fo = font();
+ fo.setPointSize( 12 );
+ labb->setFont ( fo );
+#endif
labb->setAlignment(AlignCenter);
//layout->addWidget ( labb );
fo = font();
int pointSize = 36;
if ( QApplication::desktop()->width() <= 320 )
pointSize = 18;
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index fd026fa..70a1d2d 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -780,13 +780,13 @@ void CalendarView::startAlarm( QString mess , QString filename)
topLevelWidget()->showNormal();
topLevelWidget()->setActiveWindow();
topLevelWidget()->raise();
mAlarmDialog->eventNotification( mess, KOPrefs::instance()->mAlarmPlayBeeps, filename, true,KOPrefs::instance()->mAlarmBeepInterval ,KOPrefs::instance()->mAlarmSuspendCount );
- QTimer::singleShot( 3000, this, SLOT( checkNextTimerAlarm() ) );
+ QTimer::singleShot( 2000, this, SLOT( checkNextTimerAlarm() ) );
}
void CalendarView::checkNextTimerAlarm()
{
mCalendar->checkAlarmForIncidence( 0, true );
@@ -923,18 +923,22 @@ void CalendarView::addAlarm(const QDateTime &qdt, const QString &noti )
void CalendarView::recheckTimerAlarm()
{
mAlarmTimer->stop();
mRecheckAlarmTimer->stop();
mCalendar->checkAlarmForIncidence( 0, true );
}
+#ifndef DESKTOP_VERSION
void CalendarView::removeAlarm(const QDateTime &qdt, const QString &noti )
+#else
+void CalendarView::removeAlarm(const QDateTime &, const QString & )
+#endif
{
//qDebug("-----removeAlarm %s %s ", qdt.toString().latin1() , noti.latin1() );
if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) {
#ifndef DESKTOP_VERSION
- AlarmServer::deleteAlarm (qdt ,"koalarm" ,noti.latin1() );
+ AlarmServer::deleteAlarm (qdt ,"koalarm" ,noti.utf8() );
#endif
return;
}
mAlarmTimer->stop();
}
void CalendarView::selectWeekNum ( int num )
@@ -1207,13 +1211,12 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
int filteredIN = 0;
int filteredOUT = 0;
//QPtrList<Event> el = local->rawEvents();
Event* eventR;
QString uid;
int take;
- Event* eventL;
Event* eventRSync;
Event* eventLSync;
clearAllViews();
QPtrList<Event> eventRSyncSharp = remote->getExternLastSyncEvents();
QPtrList<Event> eventLSyncSharp = local->getExternLastSyncEvents();
bool fullDateRange = false;
@@ -2307,17 +2310,22 @@ void CalendarView::readSettings()
updateConfig();
globalFlagBlockAgenda = 2;
mViewManager->readSettings( config );
QTimer::singleShot( 1, mDateNavigator, SLOT ( setResizeEnabled() ) );
}
-
+void CalendarView::checkSuspendAlarm()
+{
+ if ( mSuspendTimer->isActive() ) {
+ KMessageBox::information( this, i18n("<b>WARNING:</b> There is a pending suspended alarm!"), i18n("Pending Suspend Alarm"));
+ }
+}
void CalendarView::writeSettings()
{
// kdDebug() << "CalendarView::writeSettings" << endl;
-
+
KConfig *config = KOGlobals::config();
mViewManager->writeSettings( config );
mTodoList->saveLayout(config,QString("Todo Layout"));
mDialogManager->writeSettings( config );
//KOPrefs::instance()->usrWriteConfig();
@@ -2791,14 +2799,13 @@ void CalendarView::removeCategories()
{
QPtrList<Incidence> incList = mCalendar->rawIncidences();
QStringList catList = KOPrefs::instance()->mCustomCategories;
QStringList catIncList;
QStringList newCatList;
Incidence* inc = incList.first();
- int i;
- int count = 0;
+ uint i;
while ( inc ) {
newCatList.clear();
catIncList = inc->categories() ;
for( i = 0; i< catIncList.count(); ++i ) {
if ( catList.contains (catIncList[i]))
newCatList.append( catIncList[i] );
@@ -2812,13 +2819,13 @@ void CalendarView::removeCategories()
int CalendarView::addCategories()
{
QPtrList<Incidence> incList = mCalendar->rawIncidences();
QStringList catList = KOPrefs::instance()->mCustomCategories;
QStringList catIncList;
Incidence* inc = incList.first();
- int i;
+ uint i;
int count = 0;
while ( inc ) {
catIncList = inc->categories() ;
for( i = 0; i< catIncList.count(); ++i ) {
if ( !catList.contains (catIncList[i])) {
catList.append( catIncList[i] );
@@ -2942,21 +2949,23 @@ void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel )
Ir *ir = new Ir( this );
connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) );
ir->send( fn, description, "text/x-vCalendar" );
#endif
}
}
+
+#ifndef DESKTOP_VERSION
void CalendarView::beamDone( Ir *ir )
{
-#ifndef DESKTOP_VERSION
delete ir;
-#endif
topLevelWidget()->setCaption( i18n("KO/Pi: Beaming done.") );
topLevelWidget()->raise();
}
-
+#else
+void CalendarView::beamDone( Ir *){;}
+#endif
void CalendarView::moveIncidence(Incidence * inc )
{
if ( !inc ) return;
showDatePickerPopup();
mDatePickerMode = 2;
mMoveIncidence = inc ;
@@ -4304,17 +4313,12 @@ Todo *CalendarView::selectedTodo()
return static_cast<Todo *>( incidence );
}
return 0;
}
-void CalendarView::dialogClosing(Incidence *in)
-{
- // mDialogList.remove(in);
-}
-
void CalendarView::showIncidence()
{
mViewerCallerIsSearchDialog = false;
Incidence *incidence = currentSelection();
if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
if ( incidence ) {
@@ -4429,16 +4433,13 @@ void CalendarView::purgeCompleted()
if (result == KMessageBox::Continue) {
QPtrList<Todo> todoCal;
QPtrList<Todo> rootTodos;
//QPtrList<Incidence> rel;
- Todo *aTodo;//, *rTodo;
- Incidence *rIncidence;
- bool childDelete = false;
- bool deletedOne = true;
+ Todo *aTodo;
todoCal = calendar()->todos();
for (aTodo = todoCal.first(); aTodo; aTodo = todoCal.next()) {
if ( !aTodo->relatedTo() )
rootTodos.append( aTodo );
}
for (aTodo = rootTodos.first(); aTodo; aTodo = rootTodos.next()) {
@@ -4460,23 +4461,27 @@ void CalendarView::keyPressEvent ( QKeyEvent *e)
e->ignore();
}
bool CalendarView::sync(KSyncManager* manager, QString filename, int mode)
{
- // mSyncManager = manager;
+
+ if ( manager != mSyncManager)
+ qDebug("KO: Internal error-1. SyncManager mismatch ");
if ( filename == QDir::homeDirPath ()+"/.kdecalendardump.ics" ) {
qDebug("KO: SyncKDE request detected!");
}
mCurrentSyncDevice = mSyncManager->getCurrentSyncDevice();
mCurrentSyncName = mSyncManager->getCurrentSyncName();
return syncCalendar( filename, mode );
}
bool CalendarView::syncExternal(KSyncManager* manager, QString resource)
{
//mSyncManager = manager;
+ if ( manager != mSyncManager)
+ qDebug("KO: Internal error-2. SyncManager mismatch ");
mCurrentSyncDevice = mSyncManager->getCurrentSyncDevice();
mCurrentSyncName = mSyncManager->getCurrentSyncName();
if ( resource == "sharp" )
syncExternal( 0 );
if ( resource == "phone" )
syncExternal( 1 );
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h
index 3323a98..c9e9870 100644
--- a/korganizer/calendarview.h
+++ b/korganizer/calendarview.h
@@ -134,12 +134,13 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
KDateNavigator *dateNavigatorWidget();
void addView(KOrg::BaseView *);
void showView(KOrg::BaseView *);
KOEventViewerDialog* getEventViewerDialog();
Incidence *currentSelection();
+ void checkSuspendAlarm();
signals:
void save ();
void saveStopTimer ();
void tempDisableBR(bool);
/** This todo has been modified */
@@ -452,13 +453,12 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
/** Move to the previous date(s) in the current view */
void goPreviousMonth();
void toggleExpand();
void toggleDateNavigatorWidget();
void toggleAllDaySize();
- void dialogClosing(Incidence *);
/** Look for new messages in the inbox */
void lookForIncomingMessages();
/** Look for new messages in the outbox */
void lookForOutgoingMessages();
diff --git a/korganizer/kodialogmanager.cpp b/korganizer/kodialogmanager.cpp
index 5455098..ea30fac 100644
--- a/korganizer/kodialogmanager.cpp
+++ b/korganizer/kodialogmanager.cpp
@@ -295,14 +295,12 @@ KOEventEditor *KODialogManager::getEventEditor()
mMainView->viewManager(), SLOT( showAgendaView( bool) ) );
// connect(mCategoryEditDialog,SIGNAL(categoryConfigChanged()),
// eventEditor,SLOT(updateCategoryConfig()));
// connect(eventEditor,SIGNAL(editCategories()),
// mCategoryEditDialog,SLOT(show()));
- connect(eventEditor,SIGNAL(dialogClose(Incidence*)),
- mMainView,SLOT(dialogClosing(Incidence*)));
//connect(mMainView,SIGNAL(closingDown()),eventEditor,SLOT(reject()));
#ifndef DESKTOP_VERSION
eventEditor->resize( QApplication::desktop()->width() -20, 100 );
#endif
@@ -321,14 +319,12 @@ KOTodoEditor *KODialogManager::getTodoEditor()
connect(todoEditor,SIGNAL(todoAdded(Todo *)),
mMainView,SLOT(todoAdded(Todo *)));
connect(todoEditor,SIGNAL(todoChanged(Todo *)),
mMainView,SLOT(todoChanged(Todo *)));
connect(todoEditor,SIGNAL(todoDeleted()),
mMainView,SLOT(todoDeleted()));
- connect(todoEditor,SIGNAL(dialogClose(Incidence*)),
- mMainView,SLOT(dialogClosing(Incidence*)));
connect( todoEditor, SIGNAL(jumpToTime( const QDate &)),
mMainView->dateNavigator(), SLOT( selectWeek( const QDate & ) ) );
connect( todoEditor, SIGNAL( showAgendaView( bool)),
mMainView->viewManager(), SLOT( showAgendaView( bool) ) );
// connect(todoEditor,SIGNAL(deleteAttendee(Incidence *)),
// mMainView,SLOT(schedule_cancel(Incidence *)));
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index 517677c..e5e3704 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -436,13 +436,14 @@ void KOListView::setCalendar( int c )
void KOListView::populateCalPopup()
{
mCalPopup->clear();
KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first();
while ( kkf ) {
int index = mCalPopup->insertItem( kkf->mName, kkf->mCalNumber);
- mCalPopup->setItemEnabled( index, !kkf->isReadOnly );
+ if ( kkf->mErrorOnLoad || kkf->isReadOnly )
+ mCalPopup->setItemEnabled( index, false );
kkf = KOPrefs::instance()->mCalendars.next();
}
}
void KOListView::updateList()
{
// qDebug(" KOListView::updateList() ");
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index b6ce7d5..b797d8c 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -131,30 +131,27 @@ public:
};
QPixmap* sgListViewCompletedPix[6];
int globalFlagBlockStartup;
-MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
+MainWindow::MainWindow( QWidget *parent, const char *name ) :
QMainWindow( parent, name )
{
sgListViewCompletedPix[5] = &listviewPix;
sgListViewCompletedPix[0] = &listviewPix0;
sgListViewCompletedPix[1] = &listviewPix20;
sgListViewCompletedPix[2] = &listviewPix40;
sgListViewCompletedPix[3] = &listviewPix60;
sgListViewCompletedPix[4] = &listviewPix80;
if ( sgListViewCompletedPix[5]->height() < 5 ) {
- int size = 12;
+ //int size = 12;
sgListViewCompletedPix[5]->resize( 11, 11 );
sgListViewCompletedPix[5]->fill( Qt::white );
QPainter p ( sgListViewCompletedPix[5] );
p.drawRect( 0,0,11,11);
- int half = size/2;
- int heihei = size/2;
- int x = 1;
p.drawLine ( 2, 5, 4 , 7 ) ;
p.drawLine ( 4 , 7 , 8, 3) ;
int iii = 0;
for ( iii = 0; iii < 5; ++iii ) {
sgListViewCompletedPix[iii]->resize( 11, 11 );
sgListViewCompletedPix[iii]->fill( Qt::white );
@@ -341,13 +338,12 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
mView->loadCalendars();
int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() );
qDebug("KO: Calendar loading time: %d ms",msNeeded );
if ( KPimGlobalPrefs::instance()->mPreferredLanguage != KOPrefs::instance()->mOldLoadedLanguage ) {
KOPrefs::instance()->setAllDefaults();
- int count = mView->addCategories();
}
processIncidenceSelection( 0 );
connect( mView, SIGNAL( incidenceSelected( Incidence * ) ),
SLOT( processIncidenceSelection( Incidence * ) ) );
connect( mView, SIGNAL( modifiedChanged( bool ) ),
SLOT( slotModifiedChanged( bool ) ) );
@@ -1852,17 +1848,17 @@ void MainWindow::saveOnClose()
if ( p->mToolBarHorF )
p->mToolBarUpF = filterToolBar->y() > height()/2;
else
p->mToolBarUpF = filterToolBar->x() > width()/2 ;
}
#endif
-
save();
mView->writeSettings();
+ mView->checkSuspendAlarm();
}
-void MainWindow::slotModifiedChanged( bool changed )
+void MainWindow::slotModifiedChanged( bool )
{
if ( mBlockAtStartup )
return;
int msec;
// we store the changes after 1 minute,
@@ -1900,13 +1896,13 @@ void MainWindow::backupAllFiles()
// backup ok
QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
KopiCalendarFile * cal = calendars.first();
cal = calendars.next();
while ( cal ) {
if ( !cal->mErrorOnLoad ) {
- int retval = KApplication::createBackup( cal->mFileName, bupDir, KPimGlobalPrefs::instance()->mBackupNumbers );
+ KApplication::createBackup( cal->mFileName, bupDir, KPimGlobalPrefs::instance()->mBackupNumbers );
}
cal = calendars.next();
}
KOPrefs::instance()->mLastBackupDate = daysTo;
setCaption(i18n("Backup succesfully finished" ));
} else if ( retval == 2 ){
@@ -2405,16 +2401,15 @@ void MainWindow::quickImportIcal()
}
void MainWindow::importFile( QString fn, bool quick )
{
QFileInfo info;
info.setFile( fn );
QString mess;
- bool loadbup = true;
if ( !info. exists() ) {
mess = i18n("Import file \n...%1\ndoes not exist!\nNothing imported!\n").arg(fn.right( 30));
- int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),
+ QMessageBox::warning( this, i18n("KO/Pi: Warning!"),
mess );
return;
}
int result = 0;
if ( !quick ) {
mess = i18n( "Import file \n...%1\nfrom:\n%2\nDuplicated entries\nwill not be imported!\n").arg(fn.right( 25)).arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false ));
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h
index 953774f..a948a52 100644
--- a/korganizer/mainwindow.h
+++ b/korganizer/mainwindow.h
@@ -33,13 +33,13 @@ class CalendarLocal;
using namespace KCal;
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
- MainWindow( QWidget *parent = 0, const char *name = 0, QString command = "");
+ MainWindow( QWidget *parent = 0, const char *name = 0 );
~MainWindow();
bool beamReceiveEnabled();
static QString defaultFileName();
static QString syncFileName();
static QString resourcePath();
public slots: