\r
class PlayListPickerPopup;\r
class SharePopup;\r
+class NotificationTicker;\r
\r
class ContentLibaryPanel\r
: public ContentPanel\r
result TryRemoveContextMenu(int actionId);\r
void RemoveContextMenu(void);\r
\r
+ result ShowNotificationTicker(Tizen::Base::String text, Tizen::Graphics::Point point, int TickerWidth);\r
+ void RemoveNotificationTicker(void);\r
+\r
Tizen::Ui::OrientationStatus GetCurrentOrientationMode(void);\r
void UpdateContentLibaryScreenState(void);\r
\r
\r
PlayListPickerPopup* __pPlayListPicker;\r
SharePopup* __pSharePicker;\r
+ NotificationTicker* __pNotificationTicker;\r
};\r
\r
#endif // _MP_CONTENT_LIBARY_PANEL_H_
\ No newline at end of file
--- /dev/null
+//\r
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.\r
+//\r
+// Licensed under the Flora License, Version 1.0 (the License);\r
+// you may not use this file except in compliance with the License.\r
+// You may obtain a copy of the License at\r
+//\r
+// http://floralicense.org/license/\r
+//\r
+// Unless required by applicable law or agreed to in writing, software\r
+// distributed under the License is distributed on an AS IS BASIS,\r
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+// See the License for the specific language governing permissions and\r
+// limitations under the License.\r
+//\r
+\r
+/**\r
+ * @file MpNotificationTicker.h\r
+ * @brief This is the header file for NotificationTicker class.\r
+ */\r
+\r
+#ifndef _MP_NOTIFICATION_TICKER_H_\r
+#define _MP_NOTIFICATION_TICKER_H_\r
+\r
+#include <FBase.h>\r
+#include <FGraphics.h>\r
+#include <FUi.h>\r
+#include <FUiAnimations.h>\r
+\r
+class NotificationTicker\r
+ : public Tizen::Base::Runtime::ITimerEventListener\r
+ , protected Tizen::Ui::Window\r
+{\r
+public:\r
+ NotificationTicker(void);\r
+ virtual ~NotificationTicker(void);\r
+\r
+ result Construct(void);\r
+\r
+ void SetBoundTicker(Tizen::Graphics::Point point = Tizen::Graphics::Point(0, 0), int width = 720);\r
+ void ShowTicker(const Tizen::Base::String& text, int timeOut = 2000);\r
+ result DestoryTicker(void);\r
+\r
+protected:\r
+ void PlayControlAnimator(bool isShow);\r
+\r
+ virtual result OnInitializing(void);\r
+ virtual result OnTerminating(void);\r
+\r
+ virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);\r
+\r
+private:\r
+ Tizen::Ui::Controls::Panel* __pNotificationTickerPanel;\r
+ Tizen::Ui::Controls::Label* __pTickerTextLabel;\r
+ Tizen::Base::Runtime::Timer* __pTickerTimeOutTimer;\r
+ Tizen::Ui::Animations::VisualElement* __pVisualElement;\r
+\r
+ int __timeOut;\r
+ bool __isDestory;\r
+};\r
+\r
+#endif //_MP_NOTIFICATION_TICKER_H_
\ No newline at end of file
if (__pPresentationModel->GetAllAlbumCount() == 0)
{
MessageBox messageBox;
- messageBox.Construct(L"", ResourceManager::GetString(L"IDS_MUSIC_HEADER_NO_SONGS"), MSGBOX_STYLE_NONE, 500);
+ messageBox.Construct(L"", ResourceManager::GetString(L"IDS_MUSIC_HEADER_NO_SONGS"), MSGBOX_STYLE_NONE, 3000);
int modalResult = 0;
messageBox.ShowAndWait(modalResult);
if (__pPresentationModel->GetTotalCount() == 0)
{
MessageBox messageBox;
- messageBox.Construct(L"", ResourceManager::GetString(L"IDS_MUSIC_HEADER_NO_SONGS"), MSGBOX_STYLE_NONE, 500);
+ messageBox.Construct(L"", ResourceManager::GetString(L"IDS_MUSIC_HEADER_NO_SONGS"), MSGBOX_STYLE_NONE, 3000);
int modalResult = 0;
messageBox.ShowAndWait(modalResult);
if (__pPresentationModel->GetArtistListCount() == 0)
{
MessageBox messageBox;
- messageBox.Construct(L"", ResourceManager::GetString(L"IDS_MUSIC_HEADER_NO_SONGS"), MSGBOX_STYLE_NONE, 500);
+ messageBox.Construct(L"", ResourceManager::GetString(L"IDS_MUSIC_HEADER_NO_SONGS"), MSGBOX_STYLE_NONE, 3000);
int modalResult = 0;
messageBox.ShowAndWait(modalResult);
}\r
\r
__pBallonTooltip->SetText(CommonUtil::GetStringItemSelected(checkedItemCount));\r
- if (__pBallonTooltip->GetShowState() == false)\r
- {\r
- SetShowStateBalloonTooltip(true);\r
- }\r
- else\r
- {\r
- __pBallonTooltip->Invalidate(true);\r
- }\r
+ SetShowStateBalloonTooltip(true);\r
AppLogDebug("EXIT");\r
}\r
\r
#include "MpCommonUtil.h"\r
#include "MpContentLibaryPanel.h"\r
#include "MpMiniPlayer.h"\r
+#include "MpNotificationTicker.h"\r
#include "MpPlaylistPickerPopup.h"\r
#include "MpSceneRegister.h"\r
#include "MpSharePopup.h"\r
, __pContextMenu(null)\r
, __pPlayListPicker(null)\r
, __pSharePicker(null)\r
+ , __pNotificationTicker(null)\r
{\r
AppLogDebug("ENTER");\r
AppLogDebug("EXIT");\r
RemovePlayListPicker();\r
RemoveSharePicker();\r
RemoveContextMenu();\r
+ RemoveNotificationTicker();\r
AppLogDebug("EXIT");\r
return ContentPanel::OnTerminating();\r
}\r
__pPlayListPicker = null;\r
}\r
AppLogDebug("EXIT");\r
+}\r
+\r
+result\r
+ContentLibaryPanel::ShowNotificationTicker(Tizen::Base::String text, Tizen::Graphics::Point point, int TickerWidth)\r
+{\r
+ AppLogDebug("ENTER");\r
+ if (__pNotificationTicker == null)\r
+ {\r
+ __pNotificationTicker = new (std::nothrow) NotificationTicker();\r
+ result r = __pNotificationTicker->Construct();\r
+ if (IsFailed(r))\r
+ {\r
+ __pNotificationTicker->DestoryTicker();\r
+ __pNotificationTicker = null;\r
+ return E_FAILURE;\r
+ }\r
+ }\r
+\r
+ __pNotificationTicker->SetBoundTicker(point, TickerWidth);\r
+ __pNotificationTicker->ShowTicker(text);\r
+ AppLogDebug("EXIT");\r
+ return E_SUCCESS;\r
+}\r
+\r
+void\r
+ContentLibaryPanel::RemoveNotificationTicker(void)\r
+{\r
+ AppLogDebug("ENTER");\r
+ if (__pNotificationTicker != null)\r
+ {\r
+ __pNotificationTicker->DestoryTicker();\r
+ __pNotificationTicker = null;\r
+ }\r
+ AppLogDebug("EXIT");\r
}
\ No newline at end of file
if (__pPresentationModel->GetAllFolderCount() == 0)
{
MessageBox messageBox;
- messageBox.Construct(L"", ResourceManager::GetString(L"IDS_MUSIC_HEADER_NO_SONGS"), MSGBOX_STYLE_NONE, 500);
+ messageBox.Construct(L"", ResourceManager::GetString(L"IDS_MUSIC_HEADER_NO_SONGS"), MSGBOX_STYLE_NONE, 3000);
int modalResult = 0;
messageBox.ShowAndWait(modalResult);
case ALBUM_ART_IMAGE_CURRENT:
{
pAlbumArtBitmap[ALBUM_ART_IMAGE_CURRENT] = __pPlayerPresentationModel->GetContentAlbumArtN(__pPlayerPresentationModel->GetCurrentContentIndex());
+ if (pAlbumArtBitmap[ALBUM_ART_IMAGE_CURRENT] != null)
+ {
+ pAlbumArtBitmap[ALBUM_ART_IMAGE_CURRENT]->Scale(floatDimension);
+ }
pAlbumArtBitmap[ALBUM_ART_IMAGE_PREVIOUS] = __pPlayerPresentationModel->GetContentAlbumArtN(__pPlayerPresentationModel->GetPreviousContentIndex());
+ if (pAlbumArtBitmap[ALBUM_ART_IMAGE_PREVIOUS] != null)
+ {
+ pAlbumArtBitmap[ALBUM_ART_IMAGE_PREVIOUS]->Scale(floatDimension);
+ }
pAlbumArtBitmap[ALBUM_ART_IMAGE_NEXT] = __pPlayerPresentationModel->GetContentAlbumArtN(__pPlayerPresentationModel->GetNextContentIndex());
-
- pAlbumArtBitmap[ALBUM_ART_IMAGE_CURRENT]->Scale(floatDimension);
- pAlbumArtBitmap[ALBUM_ART_IMAGE_PREVIOUS]->Scale(floatDimension);
- pAlbumArtBitmap[ALBUM_ART_IMAGE_NEXT]->Scale(floatDimension);
+ if (pAlbumArtBitmap[ALBUM_ART_IMAGE_NEXT] != null)
+ {
+ pAlbumArtBitmap[ALBUM_ART_IMAGE_NEXT]->Scale(floatDimension);
+ }
}
break;
{
pAlbumArtBitmap[ALBUM_ART_IMAGE_CURRENT] = null;
pAlbumArtBitmap[ALBUM_ART_IMAGE_PREVIOUS] = __pPlayerPresentationModel->GetContentAlbumArtN(__pPlayerPresentationModel->GetPreviousContentIndex());
+ if (pAlbumArtBitmap[ALBUM_ART_IMAGE_PREVIOUS] != null)
+ {
+ pAlbumArtBitmap[ALBUM_ART_IMAGE_PREVIOUS]->Scale(floatDimension);
+ }
pAlbumArtBitmap[ALBUM_ART_IMAGE_NEXT] = null;
-
- pAlbumArtBitmap[ALBUM_ART_IMAGE_PREVIOUS]->Scale(floatDimension);
}
break;
pAlbumArtBitmap[ALBUM_ART_IMAGE_CURRENT] = null;
pAlbumArtBitmap[ALBUM_ART_IMAGE_PREVIOUS] = null;
pAlbumArtBitmap[ALBUM_ART_IMAGE_NEXT] = __pPlayerPresentationModel->GetContentAlbumArtN(__pPlayerPresentationModel->GetNextContentIndex());
-
- pAlbumArtBitmap[ALBUM_ART_IMAGE_NEXT]->Scale(floatDimension);
+ if (pAlbumArtBitmap[ALBUM_ART_IMAGE_NEXT] != null)
+ {
+ pAlbumArtBitmap[ALBUM_ART_IMAGE_NEXT]->Scale(floatDimension);
+ }
}
break;
--- /dev/null
+//\r
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.\r
+//\r
+// Licensed under the Flora License, Version 1.0 (the License);\r
+// you may not use this file except in compliance with the License.\r
+// You may obtain a copy of the License at\r
+//\r
+// http://floralicense.org/license/\r
+//\r
+// Unless required by applicable law or agreed to in writing, software\r
+// distributed under the License is distributed on an AS IS BASIS,\r
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+// See the License for the specific language governing permissions and\r
+// limitations under the License.\r
+//\r
+\r
+/**\r
+ * @file MpNotificationTicker.cpp\r
+ * @brief This is the implementation file for NotificationTicker class.\r
+ */\r
+\r
+#include "MpCommonUtil.h"\r
+#include "MpNotificationTicker.h"\r
+\r
+using namespace Tizen::Base;\r
+using namespace Tizen::Base::Runtime;\r
+using namespace Tizen::Graphics;\r
+using namespace Tizen::Ui;\r
+using namespace Tizen::Ui::Animations;\r
+using namespace Tizen::Ui::Controls;\r
+\r
+NotificationTicker::NotificationTicker(void)\r
+ : __pNotificationTickerPanel(null)\r
+ , __pTickerTextLabel(null)\r
+ , __pTickerTimeOutTimer(null)\r
+ , __timeOut(0)\r
+ , __isDestory(false)\r
+{\r
+ AppLogDebug("ENTER");\r
+ AppLogDebug("EXIT");\r
+}\r
+\r
+NotificationTicker::~NotificationTicker(void)\r
+{\r
+ AppLogDebug("ENTER");\r
+ if (__pTickerTimeOutTimer != null)\r
+ {\r
+ __pTickerTimeOutTimer->Cancel();\r
+ delete __pTickerTimeOutTimer;\r
+ __pTickerTimeOutTimer = null;\r
+ }\r
+\r
+ if (__pNotificationTickerPanel != null)\r
+ {\r
+ RemoveControl(__pNotificationTickerPanel);\r
+ __pNotificationTickerPanel = null;\r
+\r
+ __pTickerTextLabel = null;\r
+ }\r
+ AppLogDebug("EXIT");\r
+}\r
+\r
+result\r
+NotificationTicker::Construct(void)\r
+{\r
+ AppLogDebug("ENTER");\r
+ RelativeLayout layout;\r
+ layout.Construct();\r
+\r
+ __pNotificationTickerPanel = new (std::nothrow) Panel();\r
+ result r = __pNotificationTickerPanel->Construct(L"IDL_NOTIFICATION_TICKER_PANEL");\r
+ TryCatch(r == E_SUCCESS, , "Construct failed(%s)", GetErrorMessage(r));\r
+\r
+ r = Window::Construct(layout, __pNotificationTickerPanel->GetBounds());\r
+ TryCatch(r == E_SUCCESS, , "Construct failed(%s)", GetErrorMessage(r));\r
+\r
+ __pTickerTextLabel = static_cast<Label*>(__pNotificationTickerPanel->GetControl(L"IDC_LABEL_NOTIFICATION_TEXT"));\r
+ __pTickerTimeOutTimer = new (std::nothrow) Timer();\r
+ r = __pTickerTimeOutTimer->Construct(*this);\r
+ TryCatch(r == E_SUCCESS, , "Construct failed(%s)", GetErrorMessage(r));\r
+\r
+ AddControl(__pNotificationTickerPanel);\r
+ CommonUtil::SetLayoutFitToContainer(*this, *__pNotificationTickerPanel);\r
+\r
+ SetShowState(false);\r
+\r
+ AppLogDebug("EXIT");\r
+ return r;\r
+\r
+CATCH:\r
+ delete __pNotificationTickerPanel;\r
+ __pNotificationTickerPanel = null;\r
+\r
+ delete __pTickerTimeOutTimer;\r
+ __pTickerTimeOutTimer = null;\r
+\r
+ AppLogDebug("EXIT(%s)", GetErrorMessage(r));\r
+ return r;\r
+}\r
+\r
+void\r
+NotificationTicker::SetBoundTicker(Tizen::Graphics::Point point, int width)\r
+{\r
+ AppLogDebug("ENTER");\r
+ SetPosition(point);\r
+ SetSize(width, GetHeight());\r
+ AppLogDebug("EXIT");\r
+}\r
+\r
+void\r
+NotificationTicker::ShowTicker(const Tizen::Base::String& text, int timeOut)\r
+{\r
+ AppLogDebug("ENTER");\r
+ __pTickerTextLabel->SetText(text);\r
+ __timeOut = timeOut;\r
+ if (GetShowState() == false)\r
+ {\r
+// SetShowState(true);\r
+ PlayControlAnimator(true);\r
+ }\r
+ Show();\r
+ AppLogDebug("EXIT");\r
+}\r
+\r
+result\r
+NotificationTicker::DestoryTicker(void)\r
+{\r
+ AppLogDebug("ENTER");\r
+ __isDestory= true;\r
+ AppLogDebug("EXIT");\r
+ return Destroy();\r
+}\r
+\r
+void\r
+NotificationTicker::PlayControlAnimator(bool isShow)\r
+{\r
+ AppLogDebug("ENTER");\r
+ AnimationTransaction::Begin();\r
+ GetControlAnimator()->SetShowState(isShow);\r
+ AnimationTransaction::Commit();\r
+ AppLogDebug("EXIT");\r
+}\r
+\r
+result\r
+NotificationTicker::OnInitializing(void)\r
+{\r
+ AppLogDebug("ENTER");\r
+ if (__pTickerTimeOutTimer != null)\r
+ {\r
+ __pTickerTimeOutTimer->Cancel();\r
+ __pTickerTimeOutTimer->Start(__timeOut);\r
+ }\r
+ AppLogDebug("EXIT");\r
+ return E_SUCCESS;\r
+}\r
+\r
+result\r
+NotificationTicker::OnTerminating(void)\r
+{\r
+ AppLogDebug("ENTER");\r
+ __timeOut = 0;\r
+ if (__pTickerTimeOutTimer != null)\r
+ {\r
+ __pTickerTimeOutTimer->Cancel();\r
+ }\r
+\r
+ if (__isDestory == true)\r
+ {\r
+ RemoveControl(__pNotificationTickerPanel);\r
+\r
+ __pNotificationTickerPanel = null;\r
+ __pTickerTextLabel = null;\r
+\r
+ delete __pTickerTimeOutTimer;\r
+ __pTickerTimeOutTimer = null;\r
+ }\r
+\r
+ AppLogDebug("EXIT");\r
+ return E_SUCCESS;\r
+}\r
+\r
+void\r
+NotificationTicker::OnTimerExpired(Tizen::Base::Runtime::Timer& timer)\r
+{\r
+ AppLogDebug("ENTER");\r
+// SetShowState(false);\r
+ PlayControlAnimator(false);\r
+ AppLogDebug("EXIT");\r
+}
\ No newline at end of file
if (__pPresentationModel->GetContentCount() == 0)
{
MessageBox messageBox;
- messageBox.Construct(L"", ResourceManager::GetString(L"IDS_MUSIC_HEADER_NO_SONGS"), MSGBOX_STYLE_NONE, 500);
+ messageBox.Construct(L"", ResourceManager::GetString(L"IDS_MUSIC_HEADER_NO_SONGS"), MSGBOX_STYLE_NONE, 3000);
int modalResult = 0;
messageBox.ShowAndWait(modalResult);
if (__pPresentationModel->GetContentCount() == 0)
{
MessageBox messageBox;
- messageBox.Construct(L"", ResourceManager::GetString(L"IDS_MUSIC_HEADER_NO_SONGS"), MSGBOX_STYLE_NONE, 500);
+ messageBox.Construct(L"", ResourceManager::GetString(L"IDS_MUSIC_HEADER_NO_SONGS"), MSGBOX_STYLE_NONE, 3000);
int modalResult = 0;
messageBox.ShowAndWait(modalResult);
if (__pPlaylistListPresentationModel->GetAllPlayListCount() == 0)
{
MessageBox messageBox;
- messageBox.Construct(L"", ResourceManager::GetString(L"IDS_MUSIC_BODY_NO_PLAYLISTS"), MSGBOX_STYLE_NONE, 500);
+ messageBox.Construct(L"", ResourceManager::GetString(L"IDS_MUSIC_BODY_NO_PLAYLISTS"), MSGBOX_STYLE_NONE, 3000);
int modalResult = 0;
messageBox.ShowAndWait(modalResult);
else if (contentType == USER_CONTENT)
{
PlayList* pPlaylist = PlayListManager::GetInstance()->GetPlayListN(*__pQueryName);
- __pContentList = pPlaylist->GetContentInfoListN();
- delete pPlaylist;
- pPlaylist = null;
+ if (pPlaylist != null)
+ {
+ __pContentList = pPlaylist->GetContentInfoListN();
+ delete pPlaylist;
+ pPlaylist = null;
+ }
}
AppLogDebug("EXIT");
}