From: jk7744.park Date: Fri, 4 Mar 2016 11:06:08 +0000 (+0900) Subject: Tizen 2.4.0 rev3 SDK Public Release X-Git-Tag: accepted/tizen/2.4/mobile/20160307.015842^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Faccepted%2Ftizen_2.4_mobile;p=apps%2Fhome%2Fhomescreen.git Tizen 2.4.0 rev3 SDK Public Release --- diff --git a/cluster/cluster-view-impl.cpp b/cluster/cluster-view-impl.cpp index 341f991..7f01d07 100755 --- a/cluster/cluster-view-impl.cpp +++ b/cluster/cluster-view-impl.cpp @@ -18,7 +18,6 @@ */ #include #include -#include #include "cluster-view-impl.h" #include "custom-cluster-impl.h" diff --git a/cluster/widget-data-provider.cpp b/cluster/widget-data-provider.cpp index 783b7e1..744a293 100755 --- a/cluster/widget-data-provider.cpp +++ b/cluster/widget-data-provider.cpp @@ -325,7 +325,31 @@ static void WidgetDataProviderBadgeCB(unsigned int action, const char *pkgname, if(widgetDataProvider) { - widgetDataProvider->updateBoxBadgeCnt(pkgname, count); + if(action == BADGE_ACTION_UPDATE) + { + widgetDataProvider->updateBoxBadgeCnt(pkgname, count); + } + else if(action == BADGE_ACTION_CHANGED_DISPLAY) + { + if(count == 0) + { + widgetDataProvider->updateBoxBadgeCnt(pkgname, 0); + } + else if(count == 1) + { + unsigned int nCount=0; + if(badge_get_count(pkgname, &nCount) != BADGE_ERROR_NONE) + { + HOME_ERR("Failed to get badge count [%s]", pkgname); + nCount=0; + } + widgetDataProvider->updateBoxBadgeCnt(pkgname, nCount); + } + } + else if(action == BADGE_ACTION_REMOVE) + { + widgetDataProvider->updateBoxBadgeCnt(pkgname, 0); + } } return ; diff --git a/main/homescreen.cpp b/main/homescreen.cpp index 3f98633..cbef037 100755 --- a/main/homescreen.cpp +++ b/main/homescreen.cpp @@ -54,7 +54,7 @@ CHomeScreen::CHomeScreen(Dali::Application& application) mApplication.PauseSignal().Connect( this, &CHomeScreen::OnPause ); mApplication.ResumeSignal().Connect( this, &CHomeScreen::OnResume ); mApplication.LanguageChangedSignal().Connect( this, &CHomeScreen::OnLanguageChanged); - mApplication.AppControlSignal().Connect( this, &CHomeScreen::OnAppsConstrol); + mApplication.AppControlSignal().Connect( this, &CHomeScreen::OnAppsControl); } CHomeScreen::~CHomeScreen() @@ -124,8 +124,9 @@ void CHomeScreen::OnLanguageChanged( Dali::Application& application) } -void CHomeScreen::OnAppsConstrol( Dali::Application& application, void * data) +void CHomeScreen::OnAppsControl( Dali::Application& application, void * data) { + HOME_ERR("app control"); app_control_h app_control = (app_control_h)data; char *ret_data = NULL; app_control_get_operation(app_control, &ret_data); diff --git a/main/homescreen.h b/main/homescreen.h index 68970aa..441931d 100755 --- a/main/homescreen.h +++ b/main/homescreen.h @@ -49,7 +49,7 @@ public: void OnPause(Dali::Application& application); void OnResume(Dali::Application& application); void OnLanguageChanged( Dali::Application& application); - void OnAppsConstrol( Dali::Application& application, void * data); + void OnAppsControl( Dali::Application& application, void * data); /* initialize */ void Initialize(void); diff --git a/mainmenu/mainmenu-presenter.cpp b/mainmenu/mainmenu-presenter.cpp index 7ec8597..703bd0a 100755 --- a/mainmenu/mainmenu-presenter.cpp +++ b/mainmenu/mainmenu-presenter.cpp @@ -1151,7 +1151,31 @@ void CMainMenuPresenter::_BadgeChangedCallback(unsigned int nAction, const char CMainMenuPresenter *pPresenter = static_cast(pData); if (pPresenter && sPkgname) { - pPresenter->_BadgeChanged(sPkgname, nCount); + if(nAction == BADGE_ACTION_UPDATE) + { + pPresenter->_BadgeChanged(sPkgname, nCount); + } + else if(nAction == BADGE_ACTION_CHANGED_DISPLAY) + { + if(nCount == 0) + { + pPresenter->_BadgeChanged(sPkgname, 0); + } + else if(nCount == 1) + { + unsigned int count=0; + if(badge_get_count(sPkgname, &count) != BADGE_ERROR_NONE) + { + HOME_ERR("Failed to get badge count [%s]", sPkgname); + count=0; + } + pPresenter->_BadgeChanged(sPkgname, count); + } + } + else if(nAction == BADGE_ACTION_REMOVE) + { + pPresenter->_BadgeChanged(sPkgname, 0); + } } }