summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-07-27 23:40:19 (UTC)
committer zautrix <zautrix>2005-07-27 23:40:19 (UTC)
commit27ffa2e08ebb38e71f613af3a214750442418e2c (patch) (side-by-side diff)
treede2bb4c541ab8795ee3739526e82ca8f4e952c09
parent0e38cffd7ba745f237c659e1c48080fcb25b126c (diff)
downloadkdepimpi-27ffa2e08ebb38e71f613af3a214750442418e2c.zip
kdepimpi-27ffa2e08ebb38e71f613af3a214750442418e2c.tar.gz
kdepimpi-27ffa2e08ebb38e71f613af3a214750442418e2c.tar.bz2
fixcxcx
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/komonthview.cpp6
-rw-r--r--libkcal/calendarlocal.cpp1
-rw-r--r--libkcal/icalformat.cpp9
-rw-r--r--libkcal/icalformat.h3
-rw-r--r--libkcal/todo.cpp5
5 files changed, 19 insertions, 5 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index eea9a4d..4aeb20c 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -1108,9 +1108,13 @@ void MonthViewCell::contextMenu( QListBoxItem *item )
//selection( item );
//qApp->processEvents();
MonthViewItem *eventItem = static_cast<MonthViewItem *>( item );
Incidence *incidence = eventItem->incidence();
- if ( incidence ) mMonthView->showContextMenu( incidence );
+ if ( incidence ) {
+ mMonthView->showContextMenu( incidence );
+ selection( item );
+ doHighLight( incidence );
+ }
}
void MonthViewCell::selection( QListBoxItem *item )
{
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp
index e37a7ad..eef8327 100644
--- a/libkcal/calendarlocal.cpp
+++ b/libkcal/calendarlocal.cpp
@@ -64,8 +64,9 @@ void CalendarLocal::init()
CalendarLocal::~CalendarLocal()
{
+ registerObserver( 0 );
if ( mDeleteIncidencesOnClose )
close();
}
bool CalendarLocal::mergeCalendarFile( QString name )
diff --git a/libkcal/icalformat.cpp b/libkcal/icalformat.cpp
index 5877406..6f3a799 100644
--- a/libkcal/icalformat.cpp
+++ b/libkcal/icalformat.cpp
@@ -49,10 +49,11 @@ extern "C" {
#define _ICAL_VERSION "2.0"
using namespace KCal;
-ICalFormat::ICalFormat( )
+ICalFormat::ICalFormat( bool pe )
{
+ mProcessEvents = pe;
mImpl = new ICalFormatImpl( this );
tzOffsetMin = 0;
//qDebug("new ICalFormat() ");
}
@@ -188,17 +189,21 @@ QString ICalFormat::toString( Calendar *cal )
for (; qlt.current(); ++qlt) {
component = mImpl->writeTodo(qlt.current());
icalcomponent_add_component(calendar,component);
//qDebug(" todos ");
+ if ( mProcessEvents ) {
+ //qDebug("mProcessEvents ");
qApp->processEvents();
}
+ }
// events
QPtrList<Event> events = cal->rawEvents();
Event *ev;
for(ev=events.first();ev;ev=events.next()) {
component = mImpl->writeEvent(ev);
icalcomponent_add_component(calendar,component);
//qDebug("events ");
+ if ( mProcessEvents )
qApp->processEvents();
}
// journals
@@ -207,13 +212,15 @@ QString ICalFormat::toString( Calendar *cal )
for(j=journals.first();j;j=journals.next()) {
component = mImpl->writeJournal(j);
icalcomponent_add_component(calendar,component);
//qDebug("journals ");
+ if ( mProcessEvents )
qApp->processEvents();
}
const char *text;
QString ret ="";
text = icalcomponent_as_ical_string( calendar );
+ if ( mProcessEvents )
qApp->processEvents();
// text = "BEGIN:VCALENDAR\nPRODID\n :-//K Desktop Environment//NONSGML libkcal 3.1//EN\nVERSION\n :2.0\nBEGIN:VEVENT\nDTSTAMP\n :20031231T213514Z\nORGANIZER\n :MAILTO:lutz@putz.de\nCREATED\n :20031231T213513Z\nUID\n :libkcal-1295166342.120\nSEQUENCE\n :0\nLAST-MODIFIED\n :20031231T213513Z\nSUMMARY\n :test1\nCLASS\n :PUBLIC\nPRIORITY\n :3\nDTSTART\n :20040101T090000Z\nDTEND\n :20040101T110000Z\nTRANSP\n :OPAQUE\nEND:VEVENT\nEND:VCALENDAR\n";
diff --git a/libkcal/icalformat.h b/libkcal/icalformat.h
index 485ab6e..a770dbb 100644
--- a/libkcal/icalformat.h
+++ b/libkcal/icalformat.h
@@ -39,9 +39,9 @@ class ICalFormatImpl;
*/
class ICalFormat : public CalFormat {
public:
/** Create new iCalendar format. */
- ICalFormat( );
+ ICalFormat( bool pe = true);
virtual ~ICalFormat();
/**
Loads a calendar on disk in iCalendar format into calendar.
@@ -102,8 +102,9 @@ class ICalFormat : public CalFormat {
const char * tzString();
bool utc() const;
private:
+ bool mProcessEvents;
ICalFormatImpl *mImpl;
QString mTimeZoneId;
QCString mTzString;
int tzOffsetMin;
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp
index 4ada2d8..7bf756a 100644
--- a/libkcal/todo.cpp
+++ b/libkcal/todo.cpp
@@ -65,8 +65,9 @@ void Todo::setRunningFalse( QString s )
{
if ( ! mRunning )
return;
mRunning = false;
+ if ( mRunSaveTimer )
mRunSaveTimer->stop();
saveRunningInfoToFile( s );
}
void Todo::stopRunning()
@@ -138,9 +139,9 @@ void Todo::saveRunningInfoToFile( QString comment )
else
to->setDescription( "TT-Note: " + comment +"\n" + des );
}
cal.addIncidence( to );
- ICalFormat format;
+ ICalFormat format( false );
file = dir +"/" +file +".ics";
format.save( &cal, file );
saveParents();
@@ -166,9 +167,9 @@ void Todo::saveParents()
CalendarLocal cal;
cal.setLocalTime();
Todo * par = (Todo *) to->clone();
cal.addIncidence( par );
- ICalFormat format;
+ ICalFormat format( false );
format.save( &cal, file );
}
to->saveParents();
}