Tizen::Base::Collection::IList* __pTodosList;
Tizen::Ui::Controls::Button* __pStatusContextButton;
- Tizen::Ui::Controls::ContextMenu* __pContextMenuStatusText;
+ Tizen::Ui::Controls::ContextMenu* __pStatusContextMenu;
Tizen::Ui::Controls::ListView* __pListView;
Tizen::Social::Calendarbook* __pCalendarbook;
unsigned long __selectedStatus;
__pPriorityTextContextMenu->AddItem(L"Normal", ID_CONTEXT_PRIORITY_NORMAL);
__pPriorityTextContextMenu->AddItem(L"Low", ID_CONTEXT_PRIORITY_LOW);
__pPriorityTextContextMenu->AddActionEventListener(*this);
- pScrollPanel->AddControl(__pPriorityTextContextMenu);
// Sensitivity
Label* pSensitivityLabel = new (std::nothrow) Label();
__pSensitivityTextContextMenu->AddItem(L"Public", ID_CONTEXT_SENSITIVITY_PUBLIC);
__pSensitivityTextContextMenu->AddItem(L"Private", ID_CONTEXT_SENSITIVITY_PRIVATE);
__pSensitivityTextContextMenu->AddItem(L"Confidential", ID_CONTEXT_SENSITIVITY_CONFIDENTIAL);
-
__pSensitivityTextContextMenu->AddActionEventListener(*this);
- pScrollPanel->AddControl(__pSensitivityTextContextMenu);
// Status
Label* pStatusLabel = new (std::nothrow) Label();
__pStatusTextContextMenu->AddItem(L"Cancelled", ID_CONTEXT_STATUS_CANCELLED);
__pStatusTextContextMenu->SetMaxVisibleItemsCount(3);
__pStatusTextContextMenu->AddActionEventListener(*this);
- pScrollPanel->AddControl(__pStatusTextContextMenu);
// Description
__pDescriptionEditField = new (std::nothrow) EditField();
CreateTodoForm::OnTerminating(void)
{
result r = E_SUCCESS;
+
+ __pPriorityTextContextMenu->Destroy();
+ __pStatusTextContextMenu->Destroy();
+ __pStatusTextContextMenu->Destroy();
+
return r;
}
__pPriorityTextContextMenu->AddItem(L"Normal", ID_CONTEXT_PRIORITY_NORMAL);
__pPriorityTextContextMenu->AddItem(L"Low", ID_CONTEXT_PRIORITY_LOW);
__pPriorityTextContextMenu->AddActionEventListener(*this);
- pScrollPanel->AddControl(__pPriorityTextContextMenu);
// Sensitivity
Label* pSensitivityLabel = new (std::nothrow) Label();
__pSensitivityTextContextMenu->AddItem(L"Public", ID_CONTEXT_SENSITIVITY_PUBLIC);
__pSensitivityTextContextMenu->AddItem(L"Private", ID_CONTEXT_SENSITIVITY_PRIVATE);
__pSensitivityTextContextMenu->AddItem(L"Confidential", ID_CONTEXT_SENSITIVITY_CONFIDENTIAL);
-
__pSensitivityTextContextMenu->AddActionEventListener(*this);
- pScrollPanel->AddControl(__pSensitivityTextContextMenu);
// Status
Label* pStatusLabel = new (std::nothrow) Label();
__pStatusTextContextMenu->AddItem(L"Cancelled", ID_CONTEXT_STATUS_CANCELLED);
__pStatusTextContextMenu->SetMaxVisibleItemsCount(3);
__pStatusTextContextMenu->AddActionEventListener(*this);
- pScrollPanel->AddControl(__pStatusTextContextMenu);
// Description
__pDescriptionEditField = new (std::nothrow) EditField();
{
delete __pTodo;
}
+
+ __pPriorityTextContextMenu->Destroy();
+ __pStatusTextContextMenu->Destroy();
+ __pStatusTextContextMenu->Destroy();
+
return r;
}
__pStatusContextButton->AddActionEventListener(*this);
AddControl(__pStatusContextButton);
- __pContextMenuStatusText = new (std::nothrow) ContextMenu();
- __pContextMenuStatusText->Construct(Point(GetClientAreaBounds().width * 5 / 6, BUTTON_HEIGHT * 3), CONTEXT_MENU_STYLE_LIST);
- __pContextMenuStatusText->AddItem(L"All", ID_CONTEXT_STATUS_ALL);
- __pContextMenuStatusText->AddItem(L"None", ID_CONTEXT_STATUS_NONE);
- __pContextMenuStatusText->AddItem(L"Needs action", ID_CONTEXT_STATUS_NEEDS_ACTION);
- __pContextMenuStatusText->AddItem(L"Completed", ID_CONTEXT_STATUS_COMPLETED);
- __pContextMenuStatusText->AddItem(L"In process", ID_CONTEXT_STATUS_IN_PROCESS);
- __pContextMenuStatusText->AddItem(L"Cancelled", ID_CONTEXT_STATUS_CANCELLED);
- __pContextMenuStatusText->AddActionEventListener(*this);
+ __pStatusContextMenu = new (std::nothrow) ContextMenu();
+ __pStatusContextMenu->Construct(Point(GetClientAreaBounds().width * 5 / 6, BUTTON_HEIGHT * 3), CONTEXT_MENU_STYLE_LIST);
+ __pStatusContextMenu->AddItem(L"All", ID_CONTEXT_STATUS_ALL);
+ __pStatusContextMenu->AddItem(L"None", ID_CONTEXT_STATUS_NONE);
+ __pStatusContextMenu->AddItem(L"Needs action", ID_CONTEXT_STATUS_NEEDS_ACTION);
+ __pStatusContextMenu->AddItem(L"Completed", ID_CONTEXT_STATUS_COMPLETED);
+ __pStatusContextMenu->AddItem(L"In process", ID_CONTEXT_STATUS_IN_PROCESS);
+ __pStatusContextMenu->AddItem(L"Cancelled", ID_CONTEXT_STATUS_CANCELLED);
+ __pStatusContextMenu->AddActionEventListener(*this);
__pListView = new (std::nothrow) ListView();
__pListView->Construct(Rectangle(UI_POSITION_GAP, BUTTON_HEIGHT, GetClientAreaBounds().width, GetClientAreaBounds().height - BUTTON_HEIGHT));
delete __pTodosList;
}
+ __pStatusContextMenu->Destroy();
+
return r;
}
break;
case ID_BUTTON_STATUS:
- __pContextMenuStatusText->SetFocusable(true);
- __pContextMenuStatusText->SetShowState(true);
- __pContextMenuStatusText->Show();
+ __pStatusContextMenu->SetFocusable(true);
+ __pStatusContextMenu->SetShowState(true);
+ __pStatusContextMenu->Show();
break;
case ID_CONTEXT_STATUS_NONE: