From be6a506a0064b779a61443ba22db99bd79335c6d Mon Sep 17 00:00:00 2001 From: Agnieszka Janowicz Date: Tue, 2 Feb 2016 15:40:34 +0100 Subject: [PATCH] Remove unused _gettext() function Plus some cosmetic changes to makefiles Change-Id: I32830e7319601c757e60defcf85ff1b5ab5a2f8c Signed-off-by: Agnieszka Janowicz --- CMakeLists.txt | 4 +++- include/app_string.h | 5 ----- po/CMakeLists.txt | 2 +- src/common/app_string.c | 34 ---------------------------------- 4 files changed, 4 insertions(+), 41 deletions(-) delete mode 100644 src/common/app_string.c diff --git a/CMakeLists.txt b/CMakeLists.txt index b1db613..678eaf3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,6 +46,9 @@ ENDIF(NOT DEFINED RESDIR) IF(NOT DEFINED EDJEDIR) SET(EDJEDIR "${PREFIX}/res/edje") ENDIF(NOT DEFINED EDJEDIR) +IF(NOT DEFINED LOCALEDIR) + SET(LOCALEDIR "${RESDIR}/locale") +ENDIF(NOT DEFINED LOCALEDIR) IF(NOT DEFINED PACKAGEDIR) SET(PACKAGEDIR "/usr/share/packages") ENDIF(NOT DEFINED PACKAGEDIR) @@ -69,7 +72,6 @@ SET(SRCS src/common/listmgr.c src/common/gridmgr.c src/common/datamgr.c - src/common/app_string.c src/layout/layout_picture.c src/layout/layout_sound.c src/layout/layout_channel.c diff --git a/include/app_string.h b/include/app_string.h index ad8e748..d73a016 100644 --- a/include/app_string.h +++ b/include/app_string.h @@ -20,11 +20,6 @@ #define SETTINGS_PACKAGE "settings" #define SETTINGS_LOCALEDIR "/usr/apps/org.tizen.settings/res/locale" - -#ifndef _EDJ -#define _EDJ(o) elm_layout_edje_get(o) -#endif - #ifdef _ #undef _ #undef N_ diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt index 04f0007..a141d13 100644 --- a/po/CMakeLists.txt +++ b/po/CMakeLists.txt @@ -18,7 +18,7 @@ FOREACH(pofile ${POFILES}) COMMAND ${MSGFMT} -o ${moFile} ${absPofile} DEPENDS ${absPofile} ) - INSTALL(FILES ${moFile} DESTINATION ${CMAKE_INSTALL_PREFIX}/res/locale/${lang}/LC_MESSAGES RENAME settings.mo) + INSTALL(FILES ${moFile} DESTINATION ${LOCALEDIR}/${lang}/LC_MESSAGES RENAME ${PROJECT_NAME}.mo) SET(moFiles ${moFiles} ${moFile}) ENDFOREACH(pofile) diff --git a/src/common/app_string.c b/src/common/app_string.c deleted file mode 100644 index d0c9af5..0000000 --- a/src/common/app_string.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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. - */ - -#include - -#include "app_string.h" - -char *_gettext(const char *s) -{ - /* fisrt find in app pg */ - - if (s == NULL) { - return "NULL"; - } - - char *p = dgettext(SETTINGS_PACKAGE, s); - - return p; -} - - -- 2.7.4