X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=base%2Fdali-toolkit%2Finternal%2Fstyling%2Fstyle-manager-impl.cpp;h=acf1ced9afd409f725573e9d196413d70e4abc8f;hb=87ea139b82253a2f2f39a2d906303065bb3362f0;hp=46e916291f002be5579d4ac4a03c410473854f4c;hpb=f4d5b3ffc194fc1b1c14f4a79e3efa435a31bc32;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/base/dali-toolkit/internal/styling/style-manager-impl.cpp b/base/dali-toolkit/internal/styling/style-manager-impl.cpp index 46e9162..acf1ced 100644 --- a/base/dali-toolkit/internal/styling/style-manager-impl.cpp +++ b/base/dali-toolkit/internal/styling/style-manager-impl.cpp @@ -1,18 +1,18 @@ -// -// Copyright (c) 2014 Samsung Electronics Co., Ltd. -// -// Licensed under the Flora License, Version 1.0 (the License); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://floralicense.org/license/ -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an AS IS BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// +/* + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // CLASS HEADER #include "style-manager-impl.h" @@ -59,11 +59,15 @@ BaseHandle Create() { BaseHandle handle = StyleManager::Get(); - if ( !handle && Adaptor::IsAvailable() ) + if ( !handle ) { - Toolkit::StyleManager manager = Toolkit::StyleManager( new Internal::StyleManager() ); - Adaptor::Get().RegisterSingleton( typeid( manager ), manager ); - handle = manager; + SingletonService singletonService( SingletonService::Get() ); + if ( singletonService ) + { + Toolkit::StyleManager manager = Toolkit::StyleManager( new Internal::StyleManager() ); + singletonService.Register( typeid( manager ), manager ); + handle = manager; + } } return handle; @@ -88,10 +92,11 @@ Toolkit::StyleManager StyleManager::Get() { Toolkit::StyleManager manager; - if ( Adaptor::IsAvailable() ) + SingletonService singletonService( SingletonService::Get() ); + if ( singletonService ) { // Check whether the style manager is already created - Dali::BaseHandle handle = Dali::Adaptor::Get().GetSingleton( typeid( Toolkit::StyleManager ) ); + Dali::BaseHandle handle = singletonService.GetSingleton( typeid( Toolkit::StyleManager ) ); if( handle ) { // If so, downcast the handle of singleton @@ -111,9 +116,10 @@ StyleManager::StyleManager() RequestDefaultTheme(); - if( Adaptor::IsAvailable() ) + StyleMonitor styleMonitor( StyleMonitor::Get() ); + if( styleMonitor ) { - StyleMonitor::Get().StyleChangeSignal().Connect( this, &StyleManager::StyleMonitorChange ); + styleMonitor.StyleChangeSignal().Connect( this, &StyleManager::StyleMonitorChange ); } }