Resolved issues N_SE-38835, N_SE-38574 and replace the control build codes to xml.
[apps/osp/Calendar.git] / src / ClEventEditorForm.cpp
index aab941c..8773638 100644 (file)
@@ -939,7 +939,6 @@ EventEditorForm::OnActionPerformed(const Control& source, int actionId)
                                AppLogDebugIf(r != E_SUCCESS, "[%s] Unable to return result.", GetErrorMessage(r));
 
                                pApp->Terminate();
-                               AppLogDebug("Exit.");
                                return;
                        }
 
@@ -971,19 +970,13 @@ EventEditorForm::OnActionPerformed(const Control& source, int actionId)
                                }
                                else
                                {
-                                       result r = SceneManager::GetInstance()->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_RIGHT));
-                                       if (IsFailed(r))
-                                       {
-                                               MessageBox msgBox;
-                                               msgBox.Construct(L"", ResourceManager::GetString(IDS_COM_POP_SAVING_FAILED), MSGBOX_STYLE_OK);
-                                               int modalResult;
-                                               msgBox.ShowAndWait(modalResult);
-                                       }
+                                       SceneManager::GetInstance()->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_RIGHT));
                                }
                        }
                }
                else
                {
+                       UpdatePm();
                        String msgString;
                        switch (r)
                        {
@@ -1003,7 +996,6 @@ EventEditorForm::OnActionPerformed(const Control& source, int actionId)
                        int modalResult;
                        msgBox.ShowAndWait(modalResult);
                }
-               __pTableView->UpdateTableView();
                break;
        case IDA_EVENT_EDITOR_FORM_CANCEL:
                SceneManager::GetInstance()->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_RIGHT));
@@ -1037,7 +1029,6 @@ EventEditorForm::OnActionPerformed(const Control& source, int actionId)
                break;
        }
        }
-       AppLogDebug("Exit.");
 }
 
 TableViewItem*
@@ -1081,16 +1072,12 @@ TableViewItem*
 EventEditorForm::CreateStartTimeItemN(int itemWidth, const DateTime& start, bool isAllDayEvent)
 {
        TableViewItem* pItem = new (std::nothrow) TableViewItem();
-
-       EditDate* pStartDate = null;
-       EditTime* pStartTime = null;
-
        pItem->Construct(Dimension(itemWidth, H_ITEM));
        pItem->SetBackgroundColor(Color(COLOR_ITEM_BACKGROUND), TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL);
        pItem->SetBackgroundColor(Color(COLOR_ITEM_BACKGROUND), TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED);
        pItem->SetBackgroundColor(Color(COLOR_ITEM_BACKGROUND), TABLE_VIEW_ITEM_DRAWING_STATUS_HIGHLIGHTED);
 
-       pStartDate = new (std::nothrow) EditDate();
+       EditDate* pStartDate = new (std::nothrow) EditDate();
        pStartDate->Construct(Point(0, Y_DATE_SELECTOR), ResourceManager::GetString(IDS_EVENT_EDITOR_FROM));
 
        pItem->AddControl(pStartDate);
@@ -1101,7 +1088,7 @@ EventEditorForm::CreateStartTimeItemN(int itemWidth, const DateTime& start, bool
 
        __pEditDateStartDate = pStartDate;
 
-       pStartTime = new (std::nothrow) EditTime();
+       EditTime* pStartTime = new (std::nothrow) EditTime();
        pStartTime->Construct(Point(X_DATE_SELECTOR, Y_DATE_SELECTOR), L" ");
 
        pItem->AddControl(pStartTime);
@@ -1109,13 +1096,9 @@ EventEditorForm::CreateStartTimeItemN(int itemWidth, const DateTime& start, bool
        pStartTime->SetTime(start);
        pItem->SetIndividualSelectionEnabled(pStartTime, true);
 
-       bool is24HourNotationEnabled = false;
-       SettingInfo::GetValue(KEY_SYSTEM_24_HOUR_NOTATION_ENABLED, is24HourNotationEnabled);
-       pStartTime->Set24HourNotationEnabled(is24HourNotationEnabled);
-
        __pEditTimeStartTime = pStartTime;
 
-       if (isAllDayEvent == true)
+       if (isAllDayEvent)
        {
                __pEditTimeStartTime->SetShowState(false);
        }
@@ -1155,10 +1138,6 @@ EventEditorForm::CreateEndTimeItemN(int itemWidth, const DateTime& end, bool isA
        pEndTime->SetTime(end);
        pItem->SetIndividualSelectionEnabled(pEndTime, true);
 
-       bool is24HourNotationEnabled = false;
-       SettingInfo::GetValue(KEY_SYSTEM_24_HOUR_NOTATION_ENABLED, is24HourNotationEnabled);
-       pEndTime->Set24HourNotationEnabled(is24HourNotationEnabled);
-
        __pEditTimeEndTime = pEndTime;
 
        if (isAllDayEvent == true)