Remove unused _gettext() function 60/58660/2 accepted/tizen/tv/20160203.102821 submit/tizen/20160203.072139
authorAgnieszka Janowicz <a.janowicz@samsung.com>
Tue, 2 Feb 2016 14:40:34 +0000 (15:40 +0100)
committerAgnieszka Janowicz <a.janowicz@samsung.com>
Tue, 2 Feb 2016 14:40:34 +0000 (15:40 +0100)
Plus some cosmetic changes to makefiles

Change-Id: I32830e7319601c757e60defcf85ff1b5ab5a2f8c
Signed-off-by: Agnieszka Janowicz <a.janowicz@samsung.com>
CMakeLists.txt
include/app_string.h
po/CMakeLists.txt
src/common/app_string.c [deleted file]

index b1db613..678eaf3 100644 (file)
@@ -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
index ad8e748..d73a016 100644 (file)
 #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_
index 04f0007..a141d13 100644 (file)
@@ -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 (file)
index d0c9af5..0000000
+++ /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 <Elementary.h>
-
-#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;
-}
-
-