__pCalendarSelectorPopup = new (std::nothrow) CalendarSelectorPopup();
__pCalendarSelectorPopup->Initialize();
+ __pProgressPopup = new (std::nothrow) ProgressPopup();
+ __pProgressPopup->Construct(false, false);
+
return E_SUCCESS;
}
result
ImportForm::OnTerminating(void)
{
- if (__pThread != null)
+ if (__pThread)
{
__pThread->Join();
delete __pThread;
delete __pDateFormatter;
delete __pTimeFormatter;
delete __pCalendarbook;
- if (__pCalendarSelectorPopup != null)
+ if (__pCalendarSelectorPopup)
{
__pCalendarSelectorPopup->Destroy();
}
- if (__pProgressPopup != null)
+ if (__pProgressPopup)
{
__pProgressPopup->Destroy();
}
switch (requestId)
{
case IDA_CALENDAR_SELECTOR_POPUP_DONE:
- if (pArgs != null)
+ if (pArgs)
{
__calendarId = static_cast<Integer*>(pArgs->GetAt(0))->value;
- if (__pThread != null)
+ if (__pThread)
{
__pThread->Join();
delete __pThread;
+ __pThread = null;
}
- if (__pProgressPopup == null)
- {
- __pProgressPopup = new (std::nothrow) ProgressPopup();
- __pProgressPopup->Construct(false, false);
- }
__pProgressPopup->SetShowState(true);
__pProgressPopup->Show();
__pThread = null;
__pProgressPopup->SetShowState(false);
- if (IsTodoItemChecked() == true)
+ if (IsTodoItemChecked())
{
__pCalendarSelectorPopup->RequestCalendar(CALENDAR_SELECTOR_POPUP_STYLE_TODO, this);
}
__pListViewContents->UpdateList();
- if (IsNoItemChecked() == true)
+ if (IsNoItemChecked())
{
GetFooter()->SetItemEnabled(0, false);
GetFooter()->Invalidate(true);
}
- if (IsAllItemAdded() == true)
+ if (IsAllItemAdded())
{
GetHeader()->RemoveAllButtons();
GetHeader()->Invalidate(true);
break;
}
- if (pArgs != null)
+ if (pArgs)
{
pArgs->RemoveAll(true);
delete pArgs;
Object*
ImportForm::Run(void)
{
+ // Todo: temporary solution for lock-up.
+ Thread::Sleep(300);
+
Calendar* pCalendar = __pCalendarbook->GetCalendarN(__calendarId);
if (pCalendar != null)
{
{
case IDA_IMPORT_FORM_SELECT_ALL:
{
- bool checkFlag = IsAllItemChecked() == false;
+ bool checkFlag = (IsAllItemChecked() == false);
int count = __pList->GetCount();
for (int i = 0; i < count; ++i)
{
break;
}
case IDA_IMPORT_FORM_ADD_TO_CALENDAR:
- if (IsEventItemChecked() == true)
+ if (IsEventItemChecked())
{
__pCalendarSelectorPopup->RequestCalendar(CALENDAR_SELECTOR_POPUP_STYLE_EVENT, this);
}
- else if (IsTodoItemChecked() == true)
+ else if (IsTodoItemChecked())
{
__pCalendarSelectorPopup->RequestCalendar(CALENDAR_SELECTOR_POPUP_STYLE_TODO, this);
}
IEnumerator* pEnum = __pList->GetEnumeratorN();
while (pEnum->MoveNext() == E_SUCCESS)
{
- if (dynamic_cast<CalEvent*>(pEnum->GetCurrent()) != null)
+ if (dynamic_cast<CalEvent*>(pEnum->GetCurrent()))
{
pArgs->Add(new (std::nothrow) CalEvent(static_cast<CalEvent&>(*pEnum->GetCurrent())));
}
- else if (dynamic_cast<CalTodo*>(pEnum->GetCurrent()) != null)
+ else if (dynamic_cast<CalTodo*>(pEnum->GetCurrent()))
{
pArgs->Add(new (std::nothrow) CalTodo(static_cast<CalTodo&>(*pEnum->GetCurrent())));
}
}
delete pEnum;
SceneManager::GetInstance()->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_RIGHT), pArgs);
- AppLogDebug("Exit.");
}
void
int
ImportForm::GetItemCount(void)
{
- if (__pList == null)
+ if (!__pList)
{
return 0;
}
pItem->SetReminder(pEvent->GetAllReminders().GetCount() > 0);
pItem->SetRepeat(pEvent->IsRecurring());
pItem->SetPriority(pEvent->GetPriority());
- // pItem->SetFacebookEvent(false);
pItem->UpdateElements();
return pItem;
}
pItem->SetLocation(pTodo->GetLocation());
pItem->SetDueDate(ResourceManager::ConvertUtcTimeToWallTime(pTodo->GetDueDate()), __pDateTimeFormatter);
pItem->SetReminder(pTodo->GetAllReminders().GetCount() > 0);
- // pItem->SetFacebookEvent(false);
switch (pTodo->GetPriority())
{
}
__pListViewContents->UpdateList();
- if (IsAllItemAdded() == true)
+ if (IsAllItemAdded())
{
GetHeader()->RemoveAllButtons();
GetFooter()->RemoveAllItems();
ImportForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
{
AppLogDebug("Enter.");
- AppLogDebug("Exit.");
}
Color