From: srinivasa.mr Date: Sat, 22 Jun 2013 11:07:29 +0000 (+0900) Subject: Remove Footer Back button and AudioEncoder issue X-Git-Tag: 2.2_release~32 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=95f5081aa81a4eb284a7467abdbc5bb2a62f876d;p=samples%2Fnative%2FMediaApp.git Remove Footer Back button and AudioEncoder issue Change-Id: Ib19848ffefbd855cb725b9ff491a64c304be8070 Signed-off-by: srinivasa.mr --- diff --git a/project/src/Audio/AudioEqualizerForm.cpp b/project/src/Audio/AudioEqualizerForm.cpp index 53c7d3d..2df2a49 100644 --- a/project/src/Audio/AudioEqualizerForm.cpp +++ b/project/src/Audio/AudioEqualizerForm.cpp @@ -115,13 +115,7 @@ AudioEqualizerForm::OnInitializing(void) AddFooterItem(L"Stop", ID_BUTTON_STOP); ShowFooterItem(0, true); ShowFooterItem(1, false); - SetFormBackEventListener(this); - Footer* pfooter = GetFooter(); - if (pfooter != null) - { - pfooter->SetBackButton(); - } if(_pConfig != null) diff --git a/project/src/Audio/AudioInOut.cpp b/project/src/Audio/AudioInOut.cpp index 5c18c50..33d3696 100644 --- a/project/src/Audio/AudioInOut.cpp +++ b/project/src/Audio/AudioInOut.cpp @@ -127,11 +127,6 @@ AudioInOut::OnInitializing(void) EnableFooterItem(ID_BUTTON_PLAY, false); SetFormBackEventListener(this); - Footer* pfooter = GetFooter(); - if (pfooter != null) - { - pfooter->SetBackButton(); - } // Prepare Buffers for (unsigned int i = 0; i < SIZEOF(__byteBuffer); i++) @@ -1021,10 +1016,6 @@ AudioInOut::SetFooterStyle(Tizen::Ui::Controls::FooterStyle style, bool showBack Footer* pFooter = GetFooter(); TryReturn(pFooter, r = GetLastResult(), "GetFooter() failed:%s", GetErrorMessage(GetLastResult())); pFooter->SetStyle(style); - if (showBack) - { - pFooter->SetBackButton(); - } if (pListener != null) { pFooter->AddActionEventListener(*pListener); diff --git a/project/src/Audio/TonePlayerForm.cpp b/project/src/Audio/TonePlayerForm.cpp index a8b5322..601372e 100644 --- a/project/src/Audio/TonePlayerForm.cpp +++ b/project/src/Audio/TonePlayerForm.cpp @@ -197,8 +197,6 @@ TonePlayerForm::OnInitializing(void) AppLog("Enter"); SetHeaderText(L"Tone Player"); - Footer* pfooter = GetFooter(); - pfooter->SetBackButton(); String tones; int toneCount = 0; SetFormBackEventListener(this); diff --git a/project/src/Camera/CameraCaptureForm.cpp b/project/src/Camera/CameraCaptureForm.cpp index f34ff6d..9df69b0 100644 --- a/project/src/Camera/CameraCaptureForm.cpp +++ b/project/src/Camera/CameraCaptureForm.cpp @@ -425,7 +425,6 @@ CameraCaptureForm::CreateItem(int index) IconListViewItem* pIconListViewItemObj = null; result r = E_SUCCESS; Bitmap* pCapturedBitmap = null; - Footer* pFotter = null; AppLog("IconListViewItem's CreateItem called index is %d", index); @@ -441,13 +440,6 @@ CameraCaptureForm::CreateItem(int index) EnableFooterItem(ID_BUTTON_SETTING, true); EnableFooterItem(ID_BUTTON_CAPTURE, true); - pFotter = GetFooter(); - if (pFotter != null) - { - pFotter->SetBackButtonEnabled(true); - pFotter->Draw(); - } - return pIconListViewItemObj; } @@ -1608,15 +1600,8 @@ CameraCaptureForm::Capture(void) return r; CATCH: - Footer * pFotter = null; EnableFooterItem(ID_BUTTON_SETTING, true); EnableFooterItem(ID_BUTTON_CAPTURE, true); - pFotter = GetFooter(); - if (pFotter != null) - { - pFotter->SetBackButtonEnabled(true); - pFotter->Draw(); - } return r; } void @@ -1673,15 +1658,8 @@ CameraCaptureForm::OnActionPerformed(const Tizen::Ui::Control& source, int actio } //disable all the buttons once capture is pressed - Footer* pFotter = null; EnableFooterItem(ID_BUTTON_SETTING, false); EnableFooterItem(ID_BUTTON_CAPTURE, false); - pFotter = GetFooter(); - if (pFotter != null) - { - pFotter->SetBackButtonEnabled(false); - pFotter->Draw(); - } Capture(); } break; @@ -1982,7 +1960,6 @@ CameraCaptureForm::ShowCapturedImageThumbnail(String* pFileName) void CameraCaptureForm::OnCameraCaptured(Tizen::Base::ByteBuffer& capturedData, result r) { - Footer* pFotter = null; File *pFile; AppLog("OnCameraCaptured Enter = %s", GetErrorMessage(r)); @@ -2014,14 +1991,6 @@ CameraCaptureForm::OnCameraCaptured(Tizen::Base::ByteBuffer& capturedData, resul r = pFile->Write(capturedData); TryReturn(r == E_SUCCESS, ShowErrorVoid(r, METHOD_FILE_LINENO),"[%s] pFile->Write", GetErrorMessage(r)); - pFotter = GetFooter(); - if (pFotter != null) - { - pFotter->SetBackButtonEnabled(true); - pFotter->Draw(); - } - - SAFE_DELETE(pFile); if (__isZeroShutterLag == false) @@ -3506,7 +3475,6 @@ CameraCaptureForm::CreateExposureSlider(void) EnableFooterItem(ID_BUTTON_SETTING, false); EnableFooterItem(ID_BUTTON_CAPTURE, false); - GetFooter()->SetBackButtonEnabled(false); GetFooter()->Draw(); return; @@ -3550,7 +3518,6 @@ CameraCaptureForm::CreateBrightnessSlider(void) EnableFooterItem(ID_BUTTON_SETTING, false); EnableFooterItem(ID_BUTTON_CAPTURE, false); - GetFooter()->SetBackButtonEnabled(false); GetFooter()->Draw(); return; @@ -3596,7 +3563,6 @@ CameraCaptureForm::CreateContrastSlider(void) EnableFooterItem(ID_BUTTON_SETTING, false); EnableFooterItem(ID_BUTTON_CAPTURE, false); - GetFooter()->SetBackButtonEnabled(false); GetFooter()->Draw(); return; @@ -3638,7 +3604,6 @@ CameraCaptureForm::CreateZoomLevelSlider(void) EnableFooterItem(ID_BUTTON_SETTING, false); EnableFooterItem(ID_BUTTON_CAPTURE, false); - GetFooter()->SetBackButtonEnabled(false); GetFooter()->Draw(); return; @@ -4021,6 +3986,5 @@ CameraCaptureForm::ShowFooterItems(void) { EnableFooterItem(ID_BUTTON_SETTING, true); EnableFooterItem(ID_BUTTON_CAPTURE, true); - GetFooter()->SetBackButtonEnabled(true); GetFooter()->Invalidate(true); } diff --git a/project/src/Codec/AudioDecoderForm.cpp b/project/src/Codec/AudioDecoderForm.cpp index f46ecab..30e9b01 100644 --- a/project/src/Codec/AudioDecoderForm.cpp +++ b/project/src/Codec/AudioDecoderForm.cpp @@ -787,8 +787,6 @@ AudioDecoderForm::StartAudioDecoding(void) SetFooterItem(2, L"Stop", ID_DECODE); ShowFooterItem(0, false); ShowFooterItem(1, false); - GetFooter()->SetBackButtonEnabled(false); - GetFooter()->Draw(); __curState = PLAY_STATE_PLAYING; __updateTimer.Start(DECODE_UPDATE_TIMEOUT); AppLog(" AAC DECODE START DONE"); @@ -914,7 +912,6 @@ AudioDecoderForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collect } __maxBytes = 0; - GetFooter()->SetBackButtonEnabled(true); GetFooter()->Draw(); EnableSelectedSoftKey(); @@ -950,7 +947,6 @@ AudioDecoderForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collect __pEditFileInformations->SetText(__filename); } - GetFooter()->SetBackButtonEnabled(true); GetFooter()->Draw(); EnableSelectedSoftKey(); @@ -988,7 +984,6 @@ AudioDecoderForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collect __pEditFileInformations->SetText(__filename); Draw(); } - GetFooter()->SetBackButtonEnabled(true); GetFooter()->Draw(); EnableSelectedSoftKey(); @@ -1063,7 +1058,6 @@ AudioDecoderForm::OnBackground(void) SetFooterItem(2, L"Decode", ID_DECODE); EnableSelectedSoftKey(); - GetFooter()->SetBackButtonEnabled(true); GetFooter()->Draw(); } @@ -1105,7 +1099,6 @@ AudioDecoderForm::OnForeground(void) SetFooterItem(2, L"Decode", ID_DECODE); EnableSelectedSoftKey(); - GetFooter()->SetBackButtonEnabled(true); GetFooter()->Draw(); } diff --git a/project/src/Codec/AudioEncoderForm.cpp b/project/src/Codec/AudioEncoderForm.cpp index f1ef152..7f9d1c0 100644 --- a/project/src/Codec/AudioEncoderForm.cpp +++ b/project/src/Codec/AudioEncoderForm.cpp @@ -693,7 +693,7 @@ AudioEncoderForm::StartAudioEncoding(void) String tmp; tmp = File::GetFileName(__filePath); tmp.Replace(L".", L"_"); - fileName.Format(1024, L"%ls%ls.%s", App::GetInstance()->GetAppDataPath().GetPointer(),tmp.GetPointer(), + fileName.Format(1024, L"%ls%ls.%ls", App::GetInstance()->GetAppDataPath().GetPointer(),tmp.GetPointer(), __audioCodecId == CODEC_AAC ? L"aac" : L"amr"); if (__pDestFile != null) @@ -729,8 +729,6 @@ AudioEncoderForm::StartAudioEncoding(void) SetFooterItem(1, L"Stop", ID_ENCODE); ShowFooterItem(0, false); ShowFooterItem(2, false); - GetFooter()->SetBackButtonEnabled(false); - GetFooter()->Draw(); __curState = STATE_ENCODING; __updateTimer.Start(ENCODE_UPDATE_TIMEOUT); AppLog(" AAC ENCODE START DONE"); @@ -994,8 +992,6 @@ AudioEncoderForm::StartAudioDecoding(void) SetFooterItem(2, L"Stop", ID_DECODE); ShowFooterItem(0, false); ShowFooterItem(1, false); - GetFooter()->SetBackButtonEnabled(false); - GetFooter()->Draw(); __curState = STATE_DECODING; __updateTimer.Start(DECODE_UPDATE_TIMEOUT); AppLog(" AAC DECODE START DONE"); @@ -1121,9 +1117,6 @@ AudioEncoderForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collect } __maxBytes = 0; - GetFooter()->SetBackButtonEnabled(true); - GetFooter()->Draw(); - if (__pProgressBar != null) { __pProgressBar->SetValue(startPosion); @@ -1152,10 +1145,7 @@ AudioEncoderForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collect { __pEditFileInformations->Clear(); __pEditFileInformations->SetText(__filename); - } - GetFooter()->SetBackButtonEnabled(true); - GetFooter()->Draw(); if (__pProgressBar != null) { @@ -1189,9 +1179,6 @@ AudioEncoderForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collect __pEditFileInformations->SetText(__filename); Draw(); } - GetFooter()->SetBackButtonEnabled(true); - GetFooter()->Draw(); - if (__pProgressBar != null) { __pProgressBar->SetValue(startPosion); @@ -1266,9 +1253,6 @@ AudioEncoderForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collect } __maxDecodedBytes = 0; - GetFooter()->SetBackButtonEnabled(true); - GetFooter()->Draw(); - if (__pProgressBar != null) { __pProgressBar->SetValue(startPosion); @@ -1305,8 +1289,6 @@ AudioEncoderForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collect __pEditFileInformations->SetText(__filename); } - GetFooter()->SetBackButtonEnabled(true); - GetFooter()->Draw(); if (__pProgressBar != null) { @@ -1346,9 +1328,6 @@ AudioEncoderForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collect __pEditFileInformations->SetText(__filename); Draw(); } - GetFooter()->SetBackButtonEnabled(true); - GetFooter()->Draw(); - if (__pProgressBar != null) { __pProgressBar->SetValue(startPosion); @@ -1444,8 +1423,6 @@ AudioEncoderForm::OnBackground(void) __pEditFileInformations->Draw(); SetFooterItem(1, L"Encode", ID_ENCODE); - GetFooter()->SetBackButtonEnabled(true); - GetFooter()->Draw(); } } @@ -1482,8 +1459,6 @@ AudioEncoderForm::OnForeground(void) ShowFooterItem(0, true); ShowFooterItem(1, true); ShowFooterItem(2, true); - GetFooter()->SetBackButtonEnabled(true); - GetFooter()->Draw(); } } diff --git a/project/src/Codec/VideoDecoderForm.cpp b/project/src/Codec/VideoDecoderForm.cpp index 6c28a17..bb3e7c4 100644 --- a/project/src/Codec/VideoDecoderForm.cpp +++ b/project/src/Codec/VideoDecoderForm.cpp @@ -832,7 +832,6 @@ VideoDecoderForm::StartVideoDecoding(void) r = ShowFooterItem(0, false); TryCatch( r == E_SUCCESS, ,"Error Occurred"); ShowFooterItem(1, false); - GetFooter()->SetBackButtonEnabled(false); GetFooter()->Draw(); Draw(); @@ -1023,7 +1022,6 @@ VideoDecoderForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collect AppLog(" Entered DECODE_DONE: "); __curState = PLAY_STATE_IDLE; SetFooterItem(2, L"Decode", ID_DECODE); - GetFooter()->SetBackButtonEnabled(true); GetFooter()->Draw(); @@ -1079,7 +1077,6 @@ VideoDecoderForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collect AppLog(" Entered DECODE_CANCELLED: "); __curState = PLAY_STATE_IDLE; SetFooterItem(2, L"Decode", ID_DECODE); - GetFooter()->SetBackButtonEnabled(true); GetFooter()->Draw(); if (__pProgressBar != null && __appTerminating == false) @@ -1125,7 +1122,6 @@ VideoDecoderForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collect AppLog(" Entered DECODE_DONE: "); __curState = PLAY_STATE_IDLE; SetFooterItem(2, L"Decode", ID_DECODE); - GetFooter()->SetBackButtonEnabled(true); GetFooter()->Draw(); if (__pProgressBar != null && __appTerminating == false) @@ -1208,7 +1204,6 @@ VideoDecoderForm::OnBackground(void) SetFooterItem(2, L"Decode", ID_DECODE); EnableSelectedSoftKey(); - GetFooter()->SetBackButtonEnabled(true); GetFooter()->Draw(); } @@ -1238,7 +1233,6 @@ VideoDecoderForm::OnForeground(void) SetFooterItem(2, L"Decode", ID_DECODE); EnableSelectedSoftKey(); - GetFooter()->SetBackButtonEnabled(true); GetFooter()->Draw(); } @@ -1263,7 +1257,6 @@ VideoDecoderForm::OnForeground(void) SetFooterItem(2, L"Decode", ID_DECODE); EnableSelectedSoftKey(); - GetFooter()->SetBackButtonEnabled(true); GetFooter()->Draw(); } diff --git a/project/src/Codec/VideoEncoderForm.cpp b/project/src/Codec/VideoEncoderForm.cpp index facb4d1..dbb452a 100644 --- a/project/src/Codec/VideoEncoderForm.cpp +++ b/project/src/Codec/VideoEncoderForm.cpp @@ -947,7 +947,6 @@ VideoEncoderForm::StartVideoEncoding(void) r = ShowFooterItem(0, false); TryCatch( r == E_SUCCESS, , "Error Occurred"); ShowFooterItem(2, false); - GetFooter()->SetBackButtonEnabled(false); GetFooter()->Draw(); Draw(); @@ -1195,7 +1194,6 @@ VideoEncoderForm::StartVideoDecoding(void) r = ShowFooterItem(0, false); TryCatch( r == E_SUCCESS, ,"Error Occurred"); ShowFooterItem(1, false); - GetFooter()->SetBackButtonEnabled(false); GetFooter()->Draw(); Draw(); @@ -1315,7 +1313,6 @@ VideoEncoderForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collect SetFooterItem(1, L"Encode", ID_ENCODE); ShowFooterItem(0, true); ShowFooterItem(2, true); - GetFooter()->SetBackButtonEnabled(true); GetFooter()->Draw(); @@ -1357,7 +1354,6 @@ VideoEncoderForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collect SetFooterItem(1, L"Encode", ID_ENCODE); ShowFooterItem(0, true); ShowFooterItem(2, true); - GetFooter()->SetBackButtonEnabled(true); GetFooter()->Draw(); if (__pProgressBar != null && __appTerminating == false) @@ -1395,7 +1391,6 @@ VideoEncoderForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collect SetFooterItem(1, L"Encode", ID_ENCODE); ShowFooterItem(0, true); ShowFooterItem(2, true); - GetFooter()->SetBackButtonEnabled(true); GetFooter()->Draw(); if (__pProgressBar != null && __appTerminating == false) @@ -1436,7 +1431,6 @@ VideoEncoderForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collect SetFooterItem(2, L"Decode", ID_DECODE); ShowFooterItem(0, true); ShowFooterItem(1, true); - GetFooter()->SetBackButtonEnabled(true); GetFooter()->Draw(); __wakeUpTimer.Cancel(); @@ -1493,7 +1487,6 @@ VideoEncoderForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collect SetFooterItem(2, L"Decode", ID_DECODE); ShowFooterItem(0, true); ShowFooterItem(1, true); - GetFooter()->SetBackButtonEnabled(true); GetFooter()->Draw(); __wakeUpTimer.Cancel(); if (__pProgressBar != null && __appTerminating == false) @@ -1540,7 +1533,6 @@ VideoEncoderForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collect SetFooterItem(2, L"Decode", ID_DECODE); ShowFooterItem(0, true); ShowFooterItem(1, true); - GetFooter()->SetBackButtonEnabled(true); GetFooter()->Draw(); __wakeUpTimer.Cancel(); @@ -1612,8 +1604,6 @@ VideoEncoderForm::OnBackground(void) __pEditFileInformations->Draw(); SetFooterItem(1, L"Encode", ID_ENCODE); - - GetFooter()->SetBackButtonEnabled(true); GetFooter()->Draw(); } @@ -1646,7 +1636,6 @@ VideoEncoderForm::OnForeground(void) ShowFooterItem(0, true); ShowFooterItem(1, true); ShowFooterItem(2, true); - GetFooter()->SetBackButtonEnabled(true); GetFooter()->Draw(); } diff --git a/project/src/MainForm.cpp b/project/src/MainForm.cpp index 43a7a9d..955d446 100644 --- a/project/src/MainForm.cpp +++ b/project/src/MainForm.cpp @@ -147,7 +147,6 @@ MainForm::OnInitializing(void) SetHeaderText(L"Media App"); Footer* pFooter = GetFooter(); pFooter->SetStyle(FOOTER_STYLE_BUTTON_TEXT); - pFooter->SetBackButton(); pFooter->AddActionEventListener(*this); AppLog("Enter "); diff --git a/project/src/MediaPlayerForm.cpp b/project/src/MediaPlayerForm.cpp index 5769a10..8d0e46b 100644 --- a/project/src/MediaPlayerForm.cpp +++ b/project/src/MediaPlayerForm.cpp @@ -1597,11 +1597,6 @@ MediaPlayerForm::SetFooterStyle(Tizen::Ui::Controls::FooterStyle style, bool sho pFooter->SetStyle(style); - if (showBack == true) - { - pFooter->SetBackButton(); - } - if (pListener != null) { pFooter->AddActionEventListener(*pListener); diff --git a/project/src/MultiForm.cpp b/project/src/MultiForm.cpp index 65e2cf7..8d14092 100644 --- a/project/src/MultiForm.cpp +++ b/project/src/MultiForm.cpp @@ -1217,10 +1217,6 @@ MultiForm::SetFooterStyle(FooterStyle style, int actionId, Tizen::Ui::IActionEve TryCatch(pFooter, r = E_SYSTEM, "GetFooter() failed:%s", GetErrorMessage(GetLastResult())); pFooter->SetStyle(style); - if (actionId) - { - pFooter->SetBackButton(); - } if (pListener) { pFooter->AddActionEventListener(*pListener); diff --git a/project/src/Player/CameraPlayerForm.cpp b/project/src/Player/CameraPlayerForm.cpp index dcdf276..bcb1b80 100644 --- a/project/src/Player/CameraPlayerForm.cpp +++ b/project/src/Player/CameraPlayerForm.cpp @@ -210,8 +210,6 @@ result CameraPlayerForm::Activate(void* pActivateParam) { result r = E_SUCCESS; - - Footer* pFotter = null; Tizen::System::BatteryLevel batteryLevel; Tizen::System::Battery::GetCurrentLevel(batteryLevel); @@ -253,13 +251,6 @@ CameraPlayerForm::Activate(void* pActivateParam) TryReturn(r == E_SUCCESS, ShowError(r, METHOD_FILE_LINENO),"[%s] CreateCamera", GetErrorMessage(r)); SetFooterItem(0, L"Start", ID_BUTTON_START); - pFotter = GetFooter(); - if (pFotter) - { - pFotter->SetBackButtonEnabled(true); - pFotter->Draw(); - } - return E_SUCCESS; } @@ -407,14 +398,7 @@ CameraPlayerForm::OnActionPerformed(const Tizen::Ui::Control& source, int action case ID_BUTTON_START: { - Footer* pFotter = null; ShowFooterItem(0, false); - pFotter = GetFooter(); - if (pFotter != null) - { - pFotter->SetBackButtonEnabled(false); - pFotter->Draw(); - } if (__isCameraStartedFlag == false) { @@ -426,15 +410,7 @@ CameraPlayerForm::OnActionPerformed(const Tizen::Ui::Control& source, int action TryReturn(r == E_SUCCESS, ,"[%s] StartPlayer", GetErrorMessage(r)); SetFooterItem(0, L"Stop", ID_BUTTON_STOP); - ShowFooterItem(0, true); - pFotter = GetFooter(); - if (pFotter != null) - { - pFotter->SetBackButtonEnabled(true); - pFotter->Draw(); - } - __startFlag = true; } @@ -442,14 +418,7 @@ CameraPlayerForm::OnActionPerformed(const Tizen::Ui::Control& source, int action case ID_BUTTON_STOP: { - Footer* pFotter = null; ShowFooterItem(0, false); - pFotter = GetFooter(); - if (pFotter != null) - { - pFotter->SetBackButtonEnabled(false); - pFotter->Draw(); - } r = StopCamera(); TryReturn(r == E_SUCCESS, ,"[%s] StopCamera", GetErrorMessage(r)); @@ -458,15 +427,7 @@ CameraPlayerForm::OnActionPerformed(const Tizen::Ui::Control& source, int action TryReturn(r == E_SUCCESS, ,"[%s] StopPlayer", GetErrorMessage(r)); SetFooterItem(0, L"Start", ID_BUTTON_START); - ShowFooterItem(0, true); - pFotter = GetFooter(); - if (pFotter != null) - { - pFotter->SetBackButtonEnabled(true); - pFotter->Draw(); - } - __startFlag = false; } break; @@ -543,14 +504,7 @@ CameraPlayerForm::OnForeground(void) } else { - Footer* pFotter = null; ShowFooterItem(0, true); - pFotter = GetFooter(); - if (pFotter != null) - { - pFotter->SetBackButtonEnabled(true); - pFotter->Draw(); - } } } diff --git a/project/src/Player/VideoRecorderPlayerForm.cpp b/project/src/Player/VideoRecorderPlayerForm.cpp index 9e259d7..b735f1d 100644 --- a/project/src/Player/VideoRecorderPlayerForm.cpp +++ b/project/src/Player/VideoRecorderPlayerForm.cpp @@ -138,11 +138,6 @@ VideoRecorderPlayerForm::OnInitializing(void) //disable all buttons until camera is ready ShowFooterItem(0, false); - if (pFooter != null) - { - pFooter->SetBackButtonEnabled(false); - pFooter->Draw(); - } AppLog("VideoRecorderPlayerForm::OnInitializing returned success"); return E_SUCCESS; @@ -246,8 +241,6 @@ result VideoRecorderPlayerForm::Activate(void* activateParam) { result r = E_SUCCESS; - - Footer* pFotter = null; Tizen::System::BatteryLevel batteryLevel; Tizen::System::Battery::GetCurrentLevel(batteryLevel); @@ -301,13 +294,6 @@ VideoRecorderPlayerForm::Activate(void* activateParam) TryReturn(r == E_SUCCESS, r,"[%s] CreateVideoRecorder failed", GetErrorMessage(r)); SetFooterItem(0, L"Start", ID_BUTTON_START); - pFotter = GetFooter(); - if (pFotter) - { - pFotter->SetBackButtonEnabled(true); - pFotter->Draw(); - } - return E_SUCCESS; } @@ -684,15 +670,7 @@ VideoRecorderPlayerForm::OnActionPerformed(const Tizen::Ui::Control& source, int case ID_BUTTON_START: { SendUserEvent(START_RECORDING, null); - - Footer* pFotter = null; ShowFooterItem(0, false); - pFotter = GetFooter(); - if (pFotter != null) - { - pFotter->SetBackButtonEnabled(false); - pFotter->Draw(); - } } break; @@ -700,15 +678,7 @@ VideoRecorderPlayerForm::OnActionPerformed(const Tizen::Ui::Control& source, int case ID_BUTTON_STOP: { SendUserEvent(STOP_RECORDING, null); - - Footer* pFotter = null; ShowFooterItem(0, false); - pFotter = GetFooter(); - if (pFotter != null) - { - pFotter->SetBackButtonEnabled(false); - pFotter->Draw(); - } __pProgress->SetValue(0); __pProgress->Draw(); } @@ -991,15 +961,7 @@ VideoRecorderPlayerForm::OnBackground(void) SAFE_DELETE(__pCameraOverlay); SAFE_DELETE(__pPlayerOverlay); - Footer* pFotter = null; ShowFooterItem(0, true); - pFotter = GetFooter(); - if (pFotter != null) - { - pFotter->SetBackButtonEnabled(true); - pFotter->Draw(); - } - __pProgress->SetValue(0); SetFooterItem(0, L"Start", ID_BUTTON_START); @@ -1013,15 +975,7 @@ VideoRecorderPlayerForm::OnFormBackRequested(Tizen::Ui::Controls::Form& source) AppLog("CameraCaptureForm::OnFormBackRequested called"); __backGroundFlag = true; - - Footer* pFotter = null; ShowFooterItem(0, false); - pFotter = GetFooter(); - if (pFotter != null) - { - pFotter->SetBackButtonEnabled(false); - pFotter->Draw(); - } SetFooterItem(0, L"Start", ID_BUTTON_START); @@ -1339,15 +1293,7 @@ VideoRecorderPlayerForm::OnVideoRecorderClosed(result r) if (!__backGroundFlag && __cameraErrorFlag == false) { SendUserEvent(RECORDER_ON_CLOSE, null); - - Footer* pFotter = null; ShowFooterItem(0, true); - pFotter = GetFooter(); - if (pFotter != null) - { - pFotter->SetBackButtonEnabled(true); - pFotter->Draw(); - } } else { @@ -1422,15 +1368,7 @@ void VideoRecorderPlayerForm::OnVideoRecorderStarted(result r) { AppLog("OnVideoRecorderStarted"); - - Footer* pFotter = null; ShowFooterItem(0, true); - pFotter = GetFooter(); - if (pFotter != null) - { - pFotter->SetBackButtonEnabled(true); - pFotter->Draw(); - } } void diff --git a/project/src/Recorder/AudioRecorderForm.cpp b/project/src/Recorder/AudioRecorderForm.cpp index 0d9e022..061bed6 100644 --- a/project/src/Recorder/AudioRecorderForm.cpp +++ b/project/src/Recorder/AudioRecorderForm.cpp @@ -995,8 +995,6 @@ AudioRecorderForm::OnActionPerformed(const Tizen::Ui::Control& source, int actio } TryReturnVoid(__pAudioRecorder != null, "__pAudioRecorder handle is null"); - - Footer* pFotter = null; //Disable Start/Stop button until OnAudioRecorderStarted/OnAudioRecorderStopped is called ShowFooterItem(0, false); ShowFooterItem(1, false); @@ -1007,13 +1005,6 @@ AudioRecorderForm::OnActionPerformed(const Tizen::Ui::Control& source, int actio (RECORDER_STATE_PAUSED == state) || (RECORDER_STATE_CLOSED == state) || \ (RECORDER_STATE_STOPPED == state)) { - pFotter = GetFooter(); - if (pFotter != null) - { - pFotter->SetBackButtonEnabled(false); - pFotter->Draw(); - } - if (StartAudioRecording() == false) { goto FAIL; @@ -1024,13 +1015,6 @@ AudioRecorderForm::OnActionPerformed(const Tizen::Ui::Control& source, int actio } else { - pFotter = GetFooter(); - if (pFotter != null) - { - pFotter->SetBackButtonEnabled(false); - pFotter->Draw(); - } - StopAudioRecording(); SetFooterItem(1, String(L"Start"), ID_START); __pProgress->SetValue(0); @@ -1123,16 +1107,8 @@ AudioRecorderForm::OnActionPerformed(const Tizen::Ui::Control& source, int actio return; FAIL: AppLog("Something wrong in OnActionPerformed"); - Footer* pFotter = null; ShowFooterItem(0, true); ShowFooterItem(1, true); - - pFotter = GetFooter(); - if (pFotter != null) - { - pFotter->SetBackButtonEnabled(true); - pFotter->Draw(); - } } @@ -1364,8 +1340,6 @@ AudioRecorderForm::OnTimerExpired(Timer& timer) void AudioRecorderForm::OnAudioRecorderStopped(result r) { - Footer* pFotter = null; - //Reset all the variables SetFooterItem(1, String(L"Start"), ID_START); __pTimer->Cancel(); @@ -1379,13 +1353,6 @@ AudioRecorderForm::OnAudioRecorderStopped(result r) ShowFooterItem(1, true); AppLog("OnAudioRecorderStopped called result = %s", GetErrorMessage(r)); __pAudioRecorder->Close(); - - pFotter = GetFooter(); - if (pFotter != null) - { - pFotter->SetBackButtonEnabled(true); - pFotter->Draw(); - } } void @@ -1405,17 +1372,9 @@ AudioRecorderForm::OnAudioRecorderPaused(result r) void AudioRecorderForm::OnAudioRecorderStarted(result r) { - Footer* pFotter = null; AppLog("Enter result = %s", GetErrorMessage(r)); ShowFooterItem(0, true); ShowFooterItem(1, true); - - pFotter = GetFooter(); - if (pFotter != null) - { - pFotter->SetBackButtonEnabled(true); - pFotter->Draw(); - } } void diff --git a/project/src/Recorder/VideoRecorderForm.cpp b/project/src/Recorder/VideoRecorderForm.cpp index 869fcfe..687ab08 100644 --- a/project/src/Recorder/VideoRecorderForm.cpp +++ b/project/src/Recorder/VideoRecorderForm.cpp @@ -1234,7 +1234,6 @@ VideoRecorderForm::Activate(void* pActivateParam) CodecType tempVideoCodecType = CODEC_NONE; MediaContainerType tempContainerType = MEDIA_CONTAINER_NONE; PixelFormat pixFormat = PIXEL_FORMAT_YCbCr420_PLANAR; - Footer* pFotter = null; AppLog("VideoRecorderForm::Activate enter CAM TYPE = %d", __camType); @@ -1257,12 +1256,6 @@ VideoRecorderForm::Activate(void* pActivateParam) __cameraError = CAMERA_ERROR_NONE; //enable the back button - pFotter = GetFooter(); - if (pFotter != null) - { - pFotter->SetBackButton(); - pFotter->Draw(); - } Tizen::System::PowerManager::KeepScreenOnState(true, false); r = Tizen::Media::MediaCapability::GetValue(CAMERA_COUNT, __cameraCount); @@ -1938,17 +1931,10 @@ VideoRecorderForm::OnActionPerformed(const Tizen::Ui::Control& source, int actio case ID_START: { - Footer* pFotter = null; ShowFooterItem(0, false); ShowFooterItem(1, false); ShowFooterItem(2, false); SendUserEvent(RECORDER_START_STOP, null); - pFotter = GetFooter(); - if (pFotter != null) - { - pFotter->SetBackButtonEnabled(false); - pFotter->Draw(); - } } break; @@ -2344,9 +2330,7 @@ VideoRecorderForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collec return; CATCH: - __cameraError = CAMERA_ERROR_DEVICE_FAILED; - Footer* pFotter = null; ShowFooterItem(0, true); if (__cameraCount > 1) //if camera count is 2 then only use secondary camera. { @@ -2357,12 +2341,6 @@ CATCH: ShowFooterItem(1, false); } ShowFooterItem(2, true); - pFotter = GetFooter(); - if (pFotter != null) - { - pFotter->SetBackButtonEnabled(true); - pFotter->Draw(); - } return; } @@ -4643,7 +4621,6 @@ VideoRecorderForm::OnVideoRecorderPaused(result r) void VideoRecorderForm::OnVideoRecorderStarted(result r) { - Footer* pFotter = null; AppLog("OnVideoRecorderStarted"); ShowFooterItem(0, true); if (__cameraCount > 1) //if camera count is 2 then only use secondary camera. @@ -4655,18 +4632,11 @@ VideoRecorderForm::OnVideoRecorderStarted(result r) ShowFooterItem(1, false); } ShowFooterItem(2, true); - pFotter = GetFooter(); - if (pFotter != null) - { - pFotter->SetBackButtonEnabled(true); - pFotter->Draw(); - } } void VideoRecorderForm::OnVideoRecorderStopped(result r) { - Footer* pFotter = null; AppLog("OnVideoRecorderStopped "); SendUserEvent(RECORDER_ON_STOP, null); ShowFooterItem(0, true); @@ -4679,12 +4649,6 @@ VideoRecorderForm::OnVideoRecorderStopped(result r) ShowFooterItem(1, false); } ShowFooterItem(2, true); - pFotter = GetFooter(); - if (pFotter != null) - { - pFotter->SetBackButtonEnabled(true); - pFotter->Draw(); - } } void @@ -4910,7 +4874,6 @@ VideoRecorderForm::CreateBrightnessSlider(void) EnableFooterItem(ID_SETTING, false); EnableFooterItem(ID_TOGGLE_CAMERA_TYPE, false); EnableFooterItem(ID_START, false); - GetFooter()->SetBackButtonEnabled(false); GetFooter()->Draw(); return; @@ -4961,7 +4924,6 @@ VideoRecorderForm::CreateContrastSlider(void) EnableFooterItem(ID_SETTING, false); EnableFooterItem(ID_TOGGLE_CAMERA_TYPE, false); EnableFooterItem(ID_START, false); - GetFooter()->SetBackButtonEnabled(false); GetFooter()->Draw(); ShowPopUp(__pPopupContrast); @@ -5014,7 +4976,6 @@ VideoRecorderForm::CreateZoomLevelSlider(void) EnableFooterItem(ID_SETTING, false); EnableFooterItem(ID_TOGGLE_CAMERA_TYPE, false); EnableFooterItem(ID_START, false); - GetFooter()->SetBackButtonEnabled(false); GetFooter()->Draw(); return; @@ -5819,14 +5780,7 @@ VideoRecorderForm::GetIndexFromValue(Tizen::Base::Collection::IList* pList, Tize void VideoRecorderForm::ShowFooterItems(void) { - Footer* pFooter = null; EnableFooterItem(ID_SETTING, true); EnableFooterItem(ID_TOGGLE_CAMERA_TYPE, true); EnableFooterItem(ID_START, true); - pFooter = GetFooter(); - if (pFooter != null) - { - pFooter->SetBackButtonEnabled(true); - pFooter->Draw(); - } }