mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-15 03:00:30 +00:00
Fixed adding TODOs to an unselected Calendar
This commit is contained in:
parent
75bef53af5
commit
3b34a60939
@ -748,15 +748,24 @@ NS_IMETHODIMP oeICalContainerImpl::AddTodo(oeIICalTodo *icaltodo, const char *se
|
||||
#ifdef ICAL_DEBUG
|
||||
printf( "oeICalContainerImpl::AddTodo()\n" );
|
||||
#endif
|
||||
nsresult rv;
|
||||
oeIICal *calendar;
|
||||
GetCalendar(server , &calendar );
|
||||
if( !calendar ) {
|
||||
#ifdef ICAL_DEBUG
|
||||
printf( "oeICalContainerImpl::AddTodo()-Error calendar not found\n" );
|
||||
#endif
|
||||
return NS_ERROR_FAILURE;
|
||||
AddCalendar( server );
|
||||
GetCalendar( server , &calendar );
|
||||
if( !calendar ) {
|
||||
#ifdef ICAL_DEBUG
|
||||
printf( "oeICalContainerImpl::AddTodo()-Error cannot find or create calendar\n" );
|
||||
#endif
|
||||
return NS_ERROR_FAILURE;
|
||||
} else {
|
||||
rv = calendar->AddTodo( icaltodo, retid );
|
||||
RemoveCalendar( server );
|
||||
}
|
||||
} else {
|
||||
rv = calendar->AddTodo( icaltodo, retid );
|
||||
}
|
||||
nsresult rv = calendar->AddTodo( icaltodo, retid );
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user