apply FSL(Flora Software License)
authorKim Kibum <kb0929.kim@samsung.com>
Fri, 8 Jun 2012 05:54:19 +0000 (14:54 +0900)
committerKim Kibum <kb0929.kim@samsung.com>
Fri, 8 Jun 2012 05:54:19 +0000 (14:54 +0900)
35 files changed:
CMakeLists.txt [new file with mode: 0755]
LICENSE [new file with mode: 0755]
NOTICE [new file with mode: 0755]
debian/changelog [new file with mode: 0755]
debian/compat [new file with mode: 0755]
debian/control [new file with mode: 0755]
debian/libug-setting-gallery-efl-dbg.install.in [new file with mode: 0755]
debian/libug-setting-gallery-efl.install.in [new file with mode: 0755]
debian/libug-setting-gallery-efl.postinst [new file with mode: 0755]
debian/rules [new file with mode: 0755]
include/sg-debug.h [new file with mode: 0755]
include/sg-keys.h [new file with mode: 0755]
include/ug-setting-gallery.h [new file with mode: 0755]
packaging/ug-setting-gallery-efl.spec [new file with mode: 0755]
po/CMakeLists.txt [new file with mode: 0755]
po/POTFILES.in [new file with mode: 0755]
po/de_DE.po [new file with mode: 0755]
po/el_GR.po [new file with mode: 0755]
po/en.po [new file with mode: 0755]
po/es_ES.po [new file with mode: 0755]
po/fr_FR.po [new file with mode: 0755]
po/it_IT.po [new file with mode: 0755]
po/ja_JP.po [new file with mode: 0755]
po/ko_KR.po [new file with mode: 0755]
po/nl_NL.po [new file with mode: 0755]
po/pt_PT.po [new file with mode: 0755]
po/ru_RU.po [new file with mode: 0755]
po/tr_TR.po [new file with mode: 0755]
po/ug-setting-gallery-efl.pot [new file with mode: 0755]
po/update-po.sh [new file with mode: 0755]
po/zh_CN.po [new file with mode: 0755]
po/zh_HK.po [new file with mode: 0755]
po/zh_TW.po [new file with mode: 0755]
src/sg-keys.c [new file with mode: 0755]
src/ug-setting-gallery.c [new file with mode: 0755]

diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..cd25f15
--- /dev/null
@@ -0,0 +1,51 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(ug-setting-gallery-efl C)
+
+#SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+#SET(EXEC_PREFIX "\${prefix}")
+#SET(LIBDIR "\${prefix}/lib")
+#SET(INCLUDEDIR "\${prefix}/include")
+#SET(VERSION 0.1.0)
+
+SET(SRCS
+       src/ug-setting-gallery.c
+       src/sg-keys.c
+)
+
+INCLUDE_DIRECTORIES(
+       ${CMAKE_CURRENT_SOURCE_DIR}/include
+)
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(pkgs REQUIRED elementary ui-gadget dlog vconf bundle)
+
+FOREACH(flag ${pkgs_CFLAGS})
+       SET(EXTRA_CXXFLAGS "${EXTRA_CXXFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+SET(EXTRA_CXXFLAGS "${EXTRA_CXXFLAGS} -fvisibility=hidden -Wall")
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CXXFLAGS}")
+SET(CMAKE_C_FLAGS ${CMAKE_CXX_FLAGS})
+
+ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
+
+ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
+SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION 0.1.0)
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS})
+
+
+#SET(MS_KEY_INIT ms_key_init)
+#SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -g")
+#SET(CMAKE_C_FLAGS_DEBUG "-O2 -g")
+
+#SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib")
+
+#ADD_EXECUTABLE(${MS_KEY_INIT}
+#        src/ms-key-init.c
+#)
+#TARGET_LINK_LIBRARIES(${MS_KEY_INIT} ${PROJECT_NAME})
+
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /opt/ug/lib)
+#INSTALL(TARGETS ${MS_KEY_INIT} DESTINATION bin)
+
+ADD_SUBDIRECTORY(po)
diff --git a/LICENSE b/LICENSE
new file mode 100755 (executable)
index 0000000..7ccb5b5
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,75 @@
+Flora License
+
+Version 1.0, May, 2012
+
+http://www.tizenopensource.org/license
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+"Tizen Certified Platform" shall mean a software platform that complies with the standards set forth in the Compatibility Definition Document and passes the Compatibility Test Suite as defined from time to time by the Tizen Technical Steering Group and certified by the Tizen Association or its designated agent.
+
+2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work solely as incorporated into a Tizen Certified Platform, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work solely as incorporated into a Tizen Certified Platform to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof pursuant to the copyright license above, in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+  1. You must give any other recipients of the Work or Derivative Works a copy of this License; and
+
+  2. You must cause any modified files to carry prominent notices stating that You changed the files; and
+
+  3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+
+  4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Flora License to your work
+
+To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   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://www.tizenopensource.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.
diff --git a/NOTICE b/NOTICE
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/debian/changelog b/debian/changelog
new file mode 100755 (executable)
index 0000000..b5077ee
--- /dev/null
@@ -0,0 +1,7 @@
+ug-setting-gallery-efl (1.0.17) unstable; urgency=low
+
+   * Initial version
+   * Git: pkgs/u/ug-setting-gallery-efl.git
+   * Tag: ug-setting-gallery-efl_1.0.17
+
+ -- Jonghyuk Lee <jhyuk47.lee@samsung.com>  Wed, 07 Dec 2011 15:30:52 +0900
diff --git a/debian/compat b/debian/compat
new file mode 100755 (executable)
index 0000000..b8626c4
--- /dev/null
@@ -0,0 +1 @@
+4
diff --git a/debian/control b/debian/control
new file mode 100755 (executable)
index 0000000..992b6aa
--- /dev/null
@@ -0,0 +1,21 @@
+Source: ug-setting-gallery-efl
+Section: libs
+Priority: extra
+maintainer: Sangjin Han <sjhan.haN@samsung.com>, Li Suxia <suxia.li@samsung.com>, Tang Feng <feng.tang@samsung.com>, Hyunwoo Kim <hw4444.kim@samsung.com>, Jisung Ahn <jcastle.ahn@samsung.com>, Jiansong Jin <jiansong.jin@samsung.com>, Jonghyuk Lee <jhyuk47.lee@samsung.com>, Chaolong Lin <chaolong.lin@samsung.com>, Yongjun Zhao <yj123.zhao@samsung.com>, Hongying Liu <ava.liu@samsung.com>, JongDong Lee <jongdong.lee@samsung.com>
+Build-Depends: debhelper (>= 5), libelm-dev, libbundle-dev, libui-gadget-dev, libslp-setting-dev, libslp-setting-keys-dev, dlog-dev
+Standards-Version: 0.0.1
+
+Package: libug-setting-gallery-efl
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: UI gadget for setting gallery
+Version: 0.0.1
+
+Package: libug-setting-gallery-efl-dbg
+Section: debug
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, libug-setting-gallery-efl(= ${Source-Version})
+Description: UI gadget for setting gallery (unstripped)
+Version: 0.0.1
+
diff --git a/debian/libug-setting-gallery-efl-dbg.install.in b/debian/libug-setting-gallery-efl-dbg.install.in
new file mode 100755 (executable)
index 0000000..bf766f0
--- /dev/null
@@ -0,0 +1 @@
+@PREFIX@/lib/*.so*
diff --git a/debian/libug-setting-gallery-efl.install.in b/debian/libug-setting-gallery-efl.install.in
new file mode 100755 (executable)
index 0000000..3e59eab
--- /dev/null
@@ -0,0 +1,7 @@
+#@PREFIX@/bin/*
+#@PREFIX@/lib/ug/*.so*
+#@PREFIX@/share/ug/icon/*.png
+#@PREFIX@/share/ug/edje/*.edj
+#@PREFIX@/share/locale/*
+/opt/ug/lib/*
+/opt/ug/res/*
diff --git a/debian/libug-setting-gallery-efl.postinst b/debian/libug-setting-gallery-efl.postinst
new file mode 100755 (executable)
index 0000000..cd68472
--- /dev/null
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+#init keys
+export LD_LIBRARY_PATH=/usr/lib/ug:$LD_LIBRARY_PATH
+
+if [ ${USER} = "root" ] 
+then
+
+/usr/bin/vconftool set -t double db/setting/gallery/interval_time 3.0 -g 6514
+/usr/bin/vconftool set -t string db/setting/gallery/ss_effect "Slide" -g 6514
+/usr/bin/vconftool set -t bool db/setting/gallery/repeat_state 0 -g 6514
+/usr/bin/vconftool set -t bool db/setting/gallery/shuffle_state 0 -g 6514
+/usr/bin/vconftool set -t bool db/setting/gallery/subtitle_state 0 -g 6514
+
+else
+
+/usr/bin/vconftool set -t double db/setting/gallery/interval_time 3.0 
+/usr/bin/vconftool set -t string db/setting/gallery/ss_effect "Slide"
+/usr/bin/vconftool set -t bool db/setting/gallery/repeat_state 0 
+/usr/bin/vconftool set -t bool db/setting/gallery/shuffle_state 0
+/usr/bin/vconftool set -t bool db/setting/gallery/subtitle_state 0
+
+fi
+
+#file permission
+
+
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..64569c9
--- /dev/null
@@ -0,0 +1,126 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+#export VERBOSE=1
+
+CFLAGS += -Wall -g
+CXXFLAGS +=  -Wall -g
+LDFLAGS ?= 
+PREFIX ?= /usr
+DATADIR ?= /opt
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+       CFLAGS += -O0
+       CXXFLAGS += -O0
+else
+       CFLAGS += -O2
+       CXXFLAGS += -O2
+endif
+
+LDFLAGS += -Wl,--rpath=$(PREFIX)/lib -Wl,--as-needed
+
+configure: configure-stamp
+configure-stamp:
+       dh_testdir
+       # Add here commands to configure the package.
+       CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" cmake . -DCMAKE_INSTALL_PREFIX=$(PREFIX)
+
+       touch configure-stamp
+
+build: build-stamp
+
+build-stamp: configure-stamp 
+       dh_testdir
+
+       # Add here commands to compile the package.
+       $(MAKE)
+       #docbook-to-man debian/wavplayer.sgml > wavplayer.1
+
+       for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
+               cat $$f > $${f%.in}; \
+               sed -i -e "s#@PREFIX@#$(PREFIX)#g" $${f%.in}; \
+               sed -i -e "s#@DATADIR@#$(DATADIR)#g" $${f%.in}; \
+       done
+
+       touch $@
+
+clean:
+       dh_testdir
+       dh_testroot
+       rm -f build-stamp configure-stamp
+
+       # Add here commands to clean up after the build process.
+       -$(MAKE) clean
+       rm -rf CMakeCache.txt
+       rm -rf CMakeFiles
+       rm -rf cmake_install.cmake
+       rm -rf Makefile
+       rm -rf install_manifest.txt
+       rm -rf *.so
+       rm -rf po/*.mo
+       rm -rf po/CMakeCache.txt
+       rm -rf po/CMakeFiles
+       rm -rf po/cmake_install.cmake
+       rm -rf po/Makefile
+       rm -rf po/install_manifest.txt
+
+       for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
+               rm -f $${f%.in}; \
+       done
+
+       dh_clean 
+
+install: build
+       dh_testdir
+       dh_prep
+       dh_installdirs
+
+       # Add here commands to install the package into debian/wavplayer.
+       $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+       dh_testdir
+       dh_testroot
+#      dh_installchangelogs 
+#      dh_installdocs
+#      dh_installexamples
+       dh_install --sourcedir=debian/tmp
+#      dh_installmenu
+#      dh_installdebconf       
+#      dh_installlogrotate
+#      dh_installemacsen
+#      dh_installpam
+#      dh_installmime
+#      dh_python
+#      dh_installinit
+#      dh_installcron
+#      dh_installinfo
+       dh_installman
+       dh_link
+       dh_strip --dbg-package=libug-setting-gallery-efl
+       dh_compress
+       dh_fixperms
+#      dh_perl
+       dh_makeshlibs
+       dh_installdeb
+#      dh_shlibdeps
+       dh_shlibdeps -l /usr/lib/ug
+       dh_gencontrol
+       dh_md5sums
+       dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
diff --git a/include/sg-debug.h b/include/sg-debug.h
new file mode 100755 (executable)
index 0000000..c00d329
--- /dev/null
@@ -0,0 +1,106 @@
+/*
+  * Copyright 2012  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://www.tizenopensource.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.
+  */
+
+#ifndef __gallery_debug_H__
+#define __gallery_debug_H__
+
+#define ENABLE_LOG_SYSTEM
+
+#ifdef ENABLE_LOG_SYSTEM
+#define USE_DLOG_SYSTEM
+
+#ifdef USE_DLOG_SYSTEM
+#include <dlog.h>
+
+#ifdef LOG_TAG
+#undef LOG_TAG
+#endif
+
+#define LOG_TAG "gallery-setting"
+
+#define gallery_debug(fmt, arg...) do{ \
+                       LOGD("[%s :%05d] "fmt "\n",__FUNCTION__, __LINE__,##arg);     \
+               } while (0)
+#define gallery_info(fmt, arg...) do{ \
+                       LOGI("[%s :%05d] "fmt "\n",__FUNCTION__, __LINE__,##arg);     \
+               } while (0)
+#define gallery_warn(fmt, arg...) do{ \
+                       LOGW("[%s :%05d] "fmt "\n",__FUNCTION__, __LINE__,##arg);     \
+               } while (0)
+#define gallery_error(fmt, arg...) do{ \
+                       LOGE("[%s :%05d] "fmt "\n",__FUNCTION__, __LINE__,##arg);     \
+               } while (0)
+
+#define gallery_func_enter()   LOGD( "[%s: %05d] <<<< enter  \n", __func__, __LINE__)
+#define gallery_func_leave()   LOGD( "[%s: %05d] >>>> leave  \n", __func__, __LINE__ )
+
+#else //USE_DLOG_SYSTEM
+#define gallery_debug(fmt, arg...) do { \
+        fprintf(stderr,"[%s:%05d]  " fmt "\n",__func__, __LINE__, ##arg); \
+} while(0)
+
+#define gallery_info(fmt, arg...) do { \
+        fprintf(stderr,"[%s:%05d]  " fmt "\n",__func__, __LINE__, ##arg); \
+} while(0)
+
+#define gallery_warn(fmt, arg...) do { \
+        fprintf(stderr,"[%s:%05d]  " fmt "\n",__func__, __LINE__, ##arg); \
+} while(0)
+
+#define gallery_error(fmt, arg...) do { \
+        fprintf(stderr,"[%s:%05d]  " fmt "\n",__func__, __LINE__, ##arg); \
+} while(0)
+#define gallery_func_enter()           fprintf(stdout, "[%s : %05d] <<< enter \n", __func__, __LINE__ , ##arg)
+#define gallery_func_leave()           fprintf(stdout, "[%s : %05d] >>> leave \n", __func__, __LINE__ , ##arg)
+
+#endif // #ifdef USE_DLOG_SYSTEM
+
+#else //ENABLE_LOG_SYSTEM
+#define gallery_debug(fmt, arg...)
+#define gallery_info(fmt, arg...)
+#define gallery_warn(fmt, arg...)
+#define gallery_error(fmt, arg...)
+#endif //ENABLE_LOG_SYSTEM
+
+
+#define gallery_ret_if(expr) do { \
+       if(expr) { \
+               return; \
+       } \
+} while (0)
+#define gallery_retv_if(expr, val) do { \
+       if(expr) { \
+               return (val); \
+       } \
+} while (0)
+
+#define gallery_retm_if(expr, fmt, arg...) do { \
+       if(expr) { \
+               gallery_warn(fmt, ##arg); \
+               return; \
+       } \
+} while (0)
+
+#define gallery_retvm_if(expr, val, fmt, arg...) do { \
+       if(expr) { \
+               gallery_warn(fmt, ##arg); \
+               return (val); \
+       } \
+} while (0)
+
+
+#endif //__gallery_debug_H__
+
diff --git a/include/sg-keys.h b/include/sg-keys.h
new file mode 100755 (executable)
index 0000000..d504ee2
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+  * Copyright 2012  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://www.tizenopensource.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.
+  */
+
+#ifndef __GALLERY_KEY_H__
+#define __GALLERY_KEY_H__
+
+#include <Elementary.h>
+
+#include <vconf-keys.h>
+#include <stdbool.h>
+
+
+#define DEFAULT_TIMER          (3.0f)
+#define DEFAULT_REPEAT         false
+#define DEFAULT_SHUFFLE                false
+#define DEFAULT_SUBTITLE       false
+#define DEFAULT_EFFECT         "Slide"
+
+
+
+#define VCONFKEY_GALLERY_INTERVAL_TIME         "db/setting/gallery/interval_time"  //int
+
+#define VCONFKEY_GALLERY_REPEAT_STATE          "db/setting/gallery/repeat_state" //boolean
+
+#define VCONFKEY_GALLERY_SHUFFLE_STATE         "db/setting/gallery/shuffle_state" //boolean
+
+#define VCONFKEY_GALLERY_SUBTITLE_STATE                "db/setting/gallery/subtitle_state" //boolean
+
+#define VCONFKEY_GALLERY_TRANSITION_EFFECT     "db/setting/gallery/ss_effect"  //char
+
+
+//void _gallery_key_set_time_vconf(void *data, Evas_Object *obj, void *event_info);
+
+
+int
+gallery_key_init_current_time(double *val);
+
+int
+gallery_key_init_repeat_state(int *b_val);
+
+int
+gallery_key_init_shuffle_state(int *b_val);
+
+int
+gallery_key_init_subtitle_state(int *b_val);
+
+void
+gallery_key_text_popup(void *data, char *msg);
+
+int
+gallery_key_init_slideshow_effect(void);
+
+char *
+gallery_key_menu_get(int index);
+
+
+double
+gallery_key_get_time_vconf_value(int index);
+
+int gallery_key_reset_current_time(void);
+int gallery_key_reset_repeat_state(void);
+int gallery_key_reset_shuffle_state(void);
+int gallery_key_reset_subtitle_state(void);
+int gallery_key_reset_slideshow_effect(void);
+
+#endif
+
+
diff --git a/include/ug-setting-gallery.h b/include/ug-setting-gallery.h
new file mode 100755 (executable)
index 0000000..b74646d
--- /dev/null
@@ -0,0 +1,108 @@
+/*
+  * Copyright 2012  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://www.tizenopensource.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.
+  */
+
+#ifndef __GALLERY_UG_EFL_H__
+#define        __GALLERY_UG_EFL_H__
+
+
+#include <Elementary.h>
+
+#define PKGNAME "ug-setting-gallery-efl"
+
+#define _EDJ(o)                elm_layout_edje_get(o)
+//#define N_(s)                        dgettext_noop(s)
+
+
+/* Original code is in appcore-common.h */
+#define _(str) gettext(str)  /**< gettext alias */
+#define gettext_noop(str) (str) /**< keyword for xgettext  to extract translatable strings */
+#define N_(str)        gettext_noop(str)  /**< gettext_noop alias */
+
+#define _SG_GETSYSTEMSTR(ID)         dgettext("sys_string", (ID))
+#define _SG_GETLOCALSTR(ID)         dgettext("ug-setting-gallery-efl", (ID))
+
+
+#define GALLERY_SUB_TIME_COUNT         5
+#define GALLERY_SUB_EFFECT_COUNT       5
+
+#define SGUG_TR_GALLERY        _SG_GETSYSTEMSTR("IDS_COM_BODY_GALLERY")
+
+#define SGUG_TR_SLIDESHOW      _SG_GETLOCALSTR("IDS_MEDIABR_OPT_SLIDE_SHOW")
+#define SGUG_TR_PESF   _SG_GETLOCALSTR("IDS_MEDIABR_BODY_SLIDESHOW_INTERVAL")
+#define SGUG_TR_REPEAT _SG_GETLOCALSTR("IDS_MEDIABR_BODY_REPEAT")
+#define SGUG_TR_SHUFFLE        _SG_GETLOCALSTR("IDS_MEDIABR_BODY_SHUFFLE")
+#define SGUG_TR_SUBTITLE_TITLE _SG_GETSYSTEMSTR("IDS_COM_BODY_VIDEO")
+#define SGUG_TR_SUBTITLE       _SG_GETLOCALSTR("IDS_MEDIABR_BODY_SUBTITLES")
+
+#define SGUG_TR_2s     _SG_GETLOCALSTR("IDS_MEDIABR_OPT_2_SECONDS")
+#define SGUG_TR_3s     _SG_GETLOCALSTR("IDS_MEDIABR_OPT_3_SECONDS")
+#define SGUG_TR_5s     _SG_GETLOCALSTR("IDS_MEDIABR_BODY_5_SECONDS")
+#define SGUG_TR_10s    _SG_GETLOCALSTR("IDS_MEDIABR_BODY_10_SECONDS")
+#define SGUG_TR_20s    _SG_GETLOCALSTR("IDS_MEDIABR_BODY_20_SECONDS")
+#define SGUG_TR_FAILED _("Setting failed, please try again..")
+
+#define VCONFKEY_GALLERY_ITV_TIME_2S   (2.0f)
+#define VCONFKEY_GALLERY_ITV_TIME_3S   (3.0f)
+#define VCONFKEY_GALLERY_ITV_TIME_5S   (5.0f)
+#define VCONFKEY_GALLERY_ITV_TIME_10S  (10.0f)
+#define VCONFKEY_GALLERY_ITV_TIME_20S  (20.0f)
+
+typedef enum
+{
+       GALLERY_MAIN_MENU_TITLE = 0,
+       GALLERY_MAIN_MENU_TIME,
+       GALLERY_MAIN_MENU_REPEAT,
+       GALLERY_MAIN_MENU_SHUFFLE,
+       GALLERY_MAIN_MENU_SUBTITLE_TITLE,
+       GALLERY_MAIN_MENU_SUBTITLE_ON_OFF,
+       GALLERY_MAIN_MENU_ITEM_MAX,
+}gallery_main_menu_item_t;
+
+
+struct ug_data
+{
+       Evas_Object *main_layout;
+       Evas_Object *bg;
+       Evas_Object *naviframe;
+       Evas_Object *time_layout;
+       Evas_Object *genlist;
+       Evas_Object *backbtn;
+
+       Evas_Object *repeat_btn;
+       Evas_Object *shuffle_btn;
+       Evas_Object *subtitle_btn;
+       int repeat_state;
+       int shuffle_state;
+       int subtitle_state;
+       Evas_Object *radio_group;
+       Evas_Object *effect_radio_group;
+       Evas_Object *popup;
+       Elm_Object_Item *gl_it[GALLERY_MAIN_MENU_ITEM_MAX];
+
+       Elm_Genlist_Item_Class check_time_itc;
+       Elm_Genlist_Item_Class expandable_itc;
+
+       Elm_Genlist_Item_Class txt_icon_itc;
+
+       Elm_Genlist_Item_Class title_itc;
+       Elm_Genlist_Item_Class effect_itc;
+
+       struct ui_gadget *ug;
+};
+
+
+#endif
+
diff --git a/packaging/ug-setting-gallery-efl.spec b/packaging/ug-setting-gallery-efl.spec
new file mode 100755 (executable)
index 0000000..0805801
--- /dev/null
@@ -0,0 +1,49 @@
+Name:       ug-setting-gallery-efl 
+Summary:    UG setting gallery ELF    
+Version:       1.0.17
+Release:    1
+Group:      TBD
+License:    Flora Software License
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires: pkgconfig(bundle)
+BuildRequires: pkgconfig(dlog)
+BuildRequires: pkgconfig(elementary)
+BuildRequires: pkgconfig(ui-gadget)
+BuildRequires: pkgconfig(vconf)
+BuildRequires: cmake
+BuildRequires: gettext-tools
+Requires(post):   /sbin/ldconfig
+Requires(post):   /usr/bin/vconftool
+requires(postun): /sbin/ldconfig
+%description
+ug setting gallery efl. 
+
+%prep
+%setup -q -n %{name}-%{version}
+
+%build
+export LDFLAGS+="-Wl,--rpath=%{_prefix}/lib -Wl,--as-needed"
+
+LDFLAGS="$LDFLAGS" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+%make_install
+
+%find_lang ug-setting-gallery-efl
+
+%post 
+/sbin/ldconfig 
+/usr/bin/vconftool set -t double db/setting/gallery/interval_time 3.0 -g 6514
+/usr/bin/vconftool set -t string db/setting/gallery/ss_effect "Slide" -g 6514
+/usr/bin/vconftool set -t bool db/setting/gallery/repeat_state 0 -g 6514
+/usr/bin/vconftool set -t bool db/setting/gallery/shuffle_state 0 -g 6514
+/usr/bin/vconftool set -t bool db/setting/gallery/subtitle_state 0 -g 6514
+
+%postun -p /sbin/ldconfig
+
+%files -f ug-setting-gallery-efl.lang
+/opt/ug/lib/libug-setting-gallery-efl.so
+/opt/ug/lib/libug-setting-gallery-efl.so.0.1.0
+
diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..26561a5
--- /dev/null
@@ -0,0 +1,40 @@
+# for i18n
+
+SET(POFILES
+       de_DE.po
+       el_GR.po
+       en.po
+       es_ES.po
+       fr_FR.po
+       it_IT.po
+       ja_JP.po
+       ko_KR.po
+       nl_NL.po
+       pt_PT.po
+       ru_RU.po
+       tr_TR.po
+       zh_CN.po
+       zh_HK.po
+       zh_TW.po
+)
+
+SET(MSGFMT "/usr/bin/msgfmt")
+
+FOREACH(pofile ${POFILES})
+       SET(pofile ${CMAKE_CURRENT_SOURCE_DIR}/${pofile})
+       MESSAGE("PO: ${pofile}")
+       GET_FILENAME_COMPONENT(absPofile ${pofile} ABSOLUTE)
+       GET_FILENAME_COMPONENT(lang ${absPofile} NAME_WE)
+       SET(moFile ${CMAKE_CURRENT_BINARY_DIR}/${lang}.mo)
+       ADD_CUSTOM_COMMAND(
+                       OUTPUT ${moFile}
+                       COMMAND ${MSGFMT} -o ${moFile} ${absPofile}
+                       DEPENDS ${absPofile}
+       )
+       INSTALL(FILES ${moFile}
+                       DESTINATION /opt/ug/res/locale/${lang}/LC_MESSAGES RENAME ${PROJECT_NAME}.mo)
+       SET(moFiles ${moFiles} ${moFile})
+ENDFOREACH(pofile)
+
+MESSAGE(".mo files: ${moFiles}")
+ADD_CUSTOM_TARGET(po ALL DEPENDS ${moFiles})
diff --git a/po/POTFILES.in b/po/POTFILES.in
new file mode 100755 (executable)
index 0000000..e527317
--- /dev/null
@@ -0,0 +1,2 @@
+# List of source files containing translatable strings.
+src/galleryUg-efl.c
diff --git a/po/de_DE.po b/po/de_DE.po
new file mode 100755 (executable)
index 0000000..48bf8f1
--- /dev/null
@@ -0,0 +1,30 @@
+msgid "IDS_MEDIABR_OPT_SLIDE_SHOW"
+msgstr "Diashow"
+
+msgid "IDS_MEDIABR_BODY_SLIDESHOW_INTERVAL"
+msgstr "Diashowintervall"
+
+msgid "IDS_MEDIABR_OPT_2_SECONDS"
+msgstr "2 Sekunden"
+
+msgid "IDS_MEDIABR_OPT_3_SECONDS"
+msgstr "3 Sekunden"
+
+msgid "IDS_MEDIABR_BODY_SHUFFLE"
+msgstr "Zufallswiedergabe"
+
+msgid "IDS_MEDIABR_BODY_REPEAT"
+msgstr "Wiederholen"
+
+msgid "IDS_MEDIABR_BODY_SUBTITLES"
+msgstr "Untertitel"
+
+msgid "IDS_MEDIABR_BODY_5_SECONDS"
+msgstr "5 Sekunden"
+
+msgid "IDS_MEDIABR_BODY_10_SECONDS"
+msgstr "10 Sekunden"
+
+msgid "IDS_MEDIABR_BODY_20_SECONDS"
+msgstr "20 Sekunden"
+
diff --git a/po/el_GR.po b/po/el_GR.po
new file mode 100755 (executable)
index 0000000..c31e65c
--- /dev/null
@@ -0,0 +1,30 @@
+msgid "IDS_MEDIABR_OPT_SLIDE_SHOW"
+msgstr "Παρουσίαση"
+
+msgid "IDS_MEDIABR_BODY_SLIDESHOW_INTERVAL"
+msgstr "Διάστημα παρουσίασης"
+
+msgid "IDS_MEDIABR_OPT_2_SECONDS"
+msgstr "2 δευτερόλεπτα"
+
+msgid "IDS_MEDIABR_OPT_3_SECONDS"
+msgstr "3 δευτερόλεπτα"
+
+msgid "IDS_MEDIABR_BODY_SHUFFLE"
+msgstr "Τυχαία σειρά"
+
+msgid "IDS_MEDIABR_BODY_REPEAT"
+msgstr "Επανάληψη"
+
+msgid "IDS_MEDIABR_BODY_SUBTITLES"
+msgstr "Υπότιτλοι"
+
+msgid "IDS_MEDIABR_BODY_5_SECONDS"
+msgstr "5 δευτερόλεπτα"
+
+msgid "IDS_MEDIABR_BODY_10_SECONDS"
+msgstr "10 δευτερόλεπτα"
+
+msgid "IDS_MEDIABR_BODY_20_SECONDS"
+msgstr "20 δευτερόλεπτα"
+
diff --git a/po/en.po b/po/en.po
new file mode 100755 (executable)
index 0000000..4db3d0e
--- /dev/null
+++ b/po/en.po
@@ -0,0 +1,30 @@
+msgid "IDS_MEDIABR_OPT_SLIDE_SHOW"
+msgstr "Slide show"
+
+msgid "IDS_MEDIABR_BODY_SLIDESHOW_INTERVAL"
+msgstr "Slideshow interval"
+
+msgid "IDS_MEDIABR_OPT_2_SECONDS"
+msgstr "2 seconds"
+
+msgid "IDS_MEDIABR_OPT_3_SECONDS"
+msgstr "3 seconds"
+
+msgid "IDS_MEDIABR_BODY_SHUFFLE"
+msgstr "Shuffle"
+
+msgid "IDS_MEDIABR_BODY_REPEAT"
+msgstr "Repeat"
+
+msgid "IDS_MEDIABR_BODY_SUBTITLES"
+msgstr "Subtitles"
+
+msgid "IDS_MEDIABR_BODY_5_SECONDS"
+msgstr "5 seconds"
+
+msgid "IDS_MEDIABR_BODY_10_SECONDS"
+msgstr "10 seconds"
+
+msgid "IDS_MEDIABR_BODY_20_SECONDS"
+msgstr "20 seconds"
+
diff --git a/po/es_ES.po b/po/es_ES.po
new file mode 100755 (executable)
index 0000000..668c94a
--- /dev/null
@@ -0,0 +1,30 @@
+msgid "IDS_MEDIABR_OPT_SLIDE_SHOW"
+msgstr "Presentación de diapositivas"
+
+msgid "IDS_MEDIABR_BODY_SLIDESHOW_INTERVAL"
+msgstr "Intervalo de presentación de diapositivas"
+
+msgid "IDS_MEDIABR_OPT_2_SECONDS"
+msgstr "2 segundos"
+
+msgid "IDS_MEDIABR_OPT_3_SECONDS"
+msgstr "3 segundos"
+
+msgid "IDS_MEDIABR_BODY_SHUFFLE"
+msgstr "Reproducción aleatoria"
+
+msgid "IDS_MEDIABR_BODY_REPEAT"
+msgstr "Repetir"
+
+msgid "IDS_MEDIABR_BODY_SUBTITLES"
+msgstr "Subtítulos"
+
+msgid "IDS_MEDIABR_BODY_5_SECONDS"
+msgstr "5 segundos"
+
+msgid "IDS_MEDIABR_BODY_10_SECONDS"
+msgstr "10 segundos"
+
+msgid "IDS_MEDIABR_BODY_20_SECONDS"
+msgstr "20 segundos"
+
diff --git a/po/fr_FR.po b/po/fr_FR.po
new file mode 100755 (executable)
index 0000000..00b03a7
--- /dev/null
@@ -0,0 +1,30 @@
+msgid "IDS_MEDIABR_OPT_SLIDE_SHOW"
+msgstr "Diaporama"
+
+msgid "IDS_MEDIABR_BODY_SLIDESHOW_INTERVAL"
+msgstr "Intervalle du diaporama"
+
+msgid "IDS_MEDIABR_OPT_2_SECONDS"
+msgstr "2 secondes"
+
+msgid "IDS_MEDIABR_OPT_3_SECONDS"
+msgstr "3 secondes"
+
+msgid "IDS_MEDIABR_BODY_SHUFFLE"
+msgstr "Mode aléatoire"
+
+msgid "IDS_MEDIABR_BODY_REPEAT"
+msgstr "Répéter"
+
+msgid "IDS_MEDIABR_BODY_SUBTITLES"
+msgstr "Sous-titres"
+
+msgid "IDS_MEDIABR_BODY_5_SECONDS"
+msgstr "5 secondes"
+
+msgid "IDS_MEDIABR_BODY_10_SECONDS"
+msgstr "10 secondes"
+
+msgid "IDS_MEDIABR_BODY_20_SECONDS"
+msgstr "20 secondes"
+
diff --git a/po/it_IT.po b/po/it_IT.po
new file mode 100755 (executable)
index 0000000..f9348cf
--- /dev/null
@@ -0,0 +1,30 @@
+msgid "IDS_MEDIABR_OPT_SLIDE_SHOW"
+msgstr "Presentazione"
+
+msgid "IDS_MEDIABR_BODY_SLIDESHOW_INTERVAL"
+msgstr "Intervallo presentazione"
+
+msgid "IDS_MEDIABR_OPT_2_SECONDS"
+msgstr "2 secondi"
+
+msgid "IDS_MEDIABR_OPT_3_SECONDS"
+msgstr "3 secondi"
+
+msgid "IDS_MEDIABR_BODY_SHUFFLE"
+msgstr "Riproduzione casuale"
+
+msgid "IDS_MEDIABR_BODY_REPEAT"
+msgstr "Ripeti"
+
+msgid "IDS_MEDIABR_BODY_SUBTITLES"
+msgstr "Sottotitoli"
+
+msgid "IDS_MEDIABR_BODY_5_SECONDS"
+msgstr "5 secondi"
+
+msgid "IDS_MEDIABR_BODY_10_SECONDS"
+msgstr "10 secondi"
+
+msgid "IDS_MEDIABR_BODY_20_SECONDS"
+msgstr "20 secondi"
+
diff --git a/po/ja_JP.po b/po/ja_JP.po
new file mode 100755 (executable)
index 0000000..aad6224
--- /dev/null
@@ -0,0 +1,30 @@
+msgid "IDS_MEDIABR_OPT_SLIDE_SHOW"
+msgstr "スライドショー"
+
+msgid "IDS_MEDIABR_BODY_SLIDESHOW_INTERVAL"
+msgstr "スライドショーの​間隔"
+
+msgid "IDS_MEDIABR_OPT_2_SECONDS"
+msgstr "2秒"
+
+msgid "IDS_MEDIABR_OPT_3_SECONDS"
+msgstr "3秒"
+
+msgid "IDS_MEDIABR_BODY_SHUFFLE"
+msgstr "シャッフル"
+
+msgid "IDS_MEDIABR_BODY_REPEAT"
+msgstr "繰り返し"
+
+msgid "IDS_MEDIABR_BODY_SUBTITLES"
+msgstr "サブタイトル"
+
+msgid "IDS_MEDIABR_BODY_5_SECONDS"
+msgstr "5秒"
+
+msgid "IDS_MEDIABR_BODY_10_SECONDS"
+msgstr "10秒"
+
+msgid "IDS_MEDIABR_BODY_20_SECONDS"
+msgstr "20秒"
+
diff --git a/po/ko_KR.po b/po/ko_KR.po
new file mode 100755 (executable)
index 0000000..c573e5d
--- /dev/null
@@ -0,0 +1,30 @@
+msgid "IDS_MEDIABR_OPT_SLIDE_SHOW"
+msgstr "슬라이드쇼"
+
+msgid "IDS_MEDIABR_BODY_SLIDESHOW_INTERVAL"
+msgstr "슬라이드쇼 전환 간격"
+
+msgid "IDS_MEDIABR_OPT_2_SECONDS"
+msgstr "2초"
+
+msgid "IDS_MEDIABR_OPT_3_SECONDS"
+msgstr "3초"
+
+msgid "IDS_MEDIABR_BODY_SHUFFLE"
+msgstr "셔플"
+
+msgid "IDS_MEDIABR_BODY_REPEAT"
+msgstr "반복"
+
+msgid "IDS_MEDIABR_BODY_SUBTITLES"
+msgstr "자막"
+
+msgid "IDS_MEDIABR_BODY_5_SECONDS"
+msgstr "5초"
+
+msgid "IDS_MEDIABR_BODY_10_SECONDS"
+msgstr "10초"
+
+msgid "IDS_MEDIABR_BODY_20_SECONDS"
+msgstr "20초"
+
diff --git a/po/nl_NL.po b/po/nl_NL.po
new file mode 100755 (executable)
index 0000000..1cf170f
--- /dev/null
@@ -0,0 +1,45 @@
+msgid "IDS_MEDIABR_OPT_SLIDE_SHOW"
+msgstr "Diapresentatie"
+
+msgid "IDS_MEDIABR_BODY_SLIDESHOW_INTERVAL"
+msgstr "Interval diashow"
+
+msgid "IDS_MEDIABR_OPT_SLIDE"
+msgstr "Pictogram"
+
+msgid "IDS_MEDIABR_OPT_2_SECONDS"
+msgstr "2 seconden"
+
+msgid "IDS_MEDIABR_OPT_3_SECONDS"
+msgstr "3 seconden"
+
+msgid "IDS_MEDIABR_BODY_SHUFFLE"
+msgstr "Willekeurig"
+
+msgid "IDS_MEDIABR_BODY_REPEAT"
+msgstr "Herhalen"
+
+msgid "IDS_MEDIABR_BODY_TRANSITION_EFFECT"
+msgstr "Overgangseffect"
+
+msgid "IDS_MEDIABR_BODY_FADE"
+msgstr "Uitvloeien"
+
+msgid "IDS_MEDIABR_BODY_BLIND"
+msgstr "Jaloezie"
+
+msgid "IDS_MEDIABR_BODY_DISSOLVE"
+msgstr "Oplossen"
+
+msgid "IDS_MEDIABR_BODY_SUBTITLES"
+msgstr "Ondertitels"
+
+msgid "IDS_MEDIABR_BODY_5_SECONDS"
+msgstr "5 seconden"
+
+msgid "IDS_MEDIABR_BODY_10_SECONDS"
+msgstr "10 seconden"
+
+msgid "IDS_MEDIABR_BODY_20_SECONDS"
+msgstr "20 seconden"
+
diff --git a/po/pt_PT.po b/po/pt_PT.po
new file mode 100755 (executable)
index 0000000..cbbbea5
--- /dev/null
@@ -0,0 +1,30 @@
+msgid "IDS_MEDIABR_OPT_SLIDE_SHOW"
+msgstr "Apresentação de slides"
+
+msgid "IDS_MEDIABR_BODY_SLIDESHOW_INTERVAL"
+msgstr "Duração da apresentação"
+
+msgid "IDS_MEDIABR_OPT_2_SECONDS"
+msgstr "2 segundos"
+
+msgid "IDS_MEDIABR_OPT_3_SECONDS"
+msgstr "3 segundos"
+
+msgid "IDS_MEDIABR_BODY_SHUFFLE"
+msgstr "Aleatório"
+
+msgid "IDS_MEDIABR_BODY_REPEAT"
+msgstr "Repetir"
+
+msgid "IDS_MEDIABR_BODY_SUBTITLES"
+msgstr "Legendas"
+
+msgid "IDS_MEDIABR_BODY_5_SECONDS"
+msgstr "5 segundos"
+
+msgid "IDS_MEDIABR_BODY_10_SECONDS"
+msgstr "10 segundos"
+
+msgid "IDS_MEDIABR_BODY_20_SECONDS"
+msgstr "20 segundos"
+
diff --git a/po/ru_RU.po b/po/ru_RU.po
new file mode 100755 (executable)
index 0000000..6844fb8
--- /dev/null
@@ -0,0 +1,30 @@
+msgid "IDS_MEDIABR_OPT_SLIDE_SHOW"
+msgstr "Слайд-шоу"
+
+msgid "IDS_MEDIABR_BODY_SLIDESHOW_INTERVAL"
+msgstr "Интервал для слайд-шоу"
+
+msgid "IDS_MEDIABR_OPT_2_SECONDS"
+msgstr "2 секунды"
+
+msgid "IDS_MEDIABR_OPT_3_SECONDS"
+msgstr "3 секунды"
+
+msgid "IDS_MEDIABR_BODY_SHUFFLE"
+msgstr "Случайный порядок"
+
+msgid "IDS_MEDIABR_BODY_REPEAT"
+msgstr "Повторить"
+
+msgid "IDS_MEDIABR_BODY_SUBTITLES"
+msgstr "Субтитры"
+
+msgid "IDS_MEDIABR_BODY_5_SECONDS"
+msgstr "5 секунд"
+
+msgid "IDS_MEDIABR_BODY_10_SECONDS"
+msgstr "10 секунд"
+
+msgid "IDS_MEDIABR_BODY_20_SECONDS"
+msgstr "20 секунд"
+
diff --git a/po/tr_TR.po b/po/tr_TR.po
new file mode 100755 (executable)
index 0000000..4772b39
--- /dev/null
@@ -0,0 +1,45 @@
+msgid "IDS_MEDIABR_OPT_SLIDE_SHOW"
+msgstr "Slayt gösterisi"
+
+msgid "IDS_MEDIABR_BODY_SLIDESHOW_INTERVAL"
+msgstr "Slayt gösterisi aralığı"
+
+msgid "IDS_MEDIABR_OPT_SLIDE"
+msgstr "Slayt"
+
+msgid "IDS_MEDIABR_OPT_2_SECONDS"
+msgstr "2 saniye"
+
+msgid "IDS_MEDIABR_OPT_3_SECONDS"
+msgstr "3 saniye"
+
+msgid "IDS_MEDIABR_BODY_SHUFFLE"
+msgstr "Karışık"
+
+msgid "IDS_MEDIABR_BODY_REPEAT"
+msgstr "Tekrarla"
+
+msgid "IDS_MEDIABR_BODY_TRANSITION_EFFECT"
+msgstr "Geçiş efekti"
+
+msgid "IDS_MEDIABR_BODY_FADE"
+msgstr "Soldur"
+
+msgid "IDS_MEDIABR_BODY_BLIND"
+msgstr "Kör"
+
+msgid "IDS_MEDIABR_BODY_DISSOLVE"
+msgstr "Çöz"
+
+msgid "IDS_MEDIABR_BODY_SUBTITLES"
+msgstr "Altyazılar"
+
+msgid "IDS_MEDIABR_BODY_5_SECONDS"
+msgstr "5 saniye"
+
+msgid "IDS_MEDIABR_BODY_10_SECONDS"
+msgstr "10 saniye"
+
+msgid "IDS_MEDIABR_BODY_20_SECONDS"
+msgstr "20 saniye"
+
diff --git a/po/ug-setting-gallery-efl.pot b/po/ug-setting-gallery-efl.pot
new file mode 100755 (executable)
index 0000000..8b08385
--- /dev/null
@@ -0,0 +1,19 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-09-29 17:32+0900\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+
diff --git a/po/update-po.sh b/po/update-po.sh
new file mode 100755 (executable)
index 0000000..9c02131
--- /dev/null
@@ -0,0 +1,60 @@
+#!/bin/sh
+
+PACKAGE=ug-setting-gallery-efl
+SRCROOT=..
+POTFILES=POTFILES.in
+
+#ALL_LINGUAS= am az be ca cs da de el en_CA en_GB es et fi fr hr hu it ja ko lv mk ml ms nb ne nl pa pl pt pt_BR ru rw sk sl sr sr@Latn sv ta tr uk vi zh_CN zh_TW zh_HK
+ALL_LINGUAS="en_US en_GB ko"
+
+XGETTEXT=/usr/bin/xgettext
+MSGMERGE=/usr/bin/msgmerge
+
+echo -n "Make ${PACKAGE}.pot  "
+if [ ! -e $POTFILES ] ; then
+       echo "$POTFILES not found"
+       exit 1
+fi
+
+$XGETTEXT --default-domain=${PACKAGE} --directory=${SRCROOT} \
+               --add-comments --keyword=_ --keyword=N_ --files-from=$POTFILES
+if [ $? -ne 0 ]; then
+       echo "error"
+       exit 1  
+fi
+
+#if [ ! -f ${PACKAGE}.po ]; then
+#      echo "No such file: ${PACKAGE}.po"
+#      exit 1
+#fi
+
+#rm -f ${PACKAGE}.pot && mv ${PACKAGE}.po ${PACKAGE}.pot
+echo "done"
+
+for LANG in $ALL_LINGUAS; do 
+       echo "$LANG : "
+
+       if [ ! -e $LANG.po ] ; then
+               sed 's/CHARSET/UTF-8/g' ${PACKAGE}.pot > ${LANG}.po
+               echo "${LANG}.po created"
+       else
+               if $MSGMERGE ${LANG}.po ${PACKAGE}.pot -o ${LANG}.new.po ; then
+                       if cmp ${LANG}.po ${LANG}.new.po > /dev/null 2>&1; then
+                               rm -f ${LANG}.new.po
+                       else
+                               if mv -f ${LANG}.new.po ${LANG}.po; then
+                                       echo "" 
+                               else
+                                       echo "msgmerge for $LANG.po failed: cannot move $LANG.new.po to $LANG.po" 1>&2
+                                       rm -f ${LANG}.new.po
+                                       exit 1
+                               fi
+                       fi
+               else
+                       echo "msgmerge for $LANG failed!"
+                       rm -f ${LANG}.new.po
+               fi
+       fi
+       echo ""
+done
+
diff --git a/po/zh_CN.po b/po/zh_CN.po
new file mode 100755 (executable)
index 0000000..85f55d5
--- /dev/null
@@ -0,0 +1,30 @@
+msgid "IDS_MEDIABR_OPT_SLIDE_SHOW"
+msgstr "幻灯片"
+
+msgid "IDS_MEDIABR_BODY_SLIDESHOW_INTERVAL"
+msgstr "幻灯片播放间隔"
+
+msgid "IDS_MEDIABR_OPT_2_SECONDS"
+msgstr "2 秒"
+
+msgid "IDS_MEDIABR_OPT_3_SECONDS"
+msgstr "3 秒"
+
+msgid "IDS_MEDIABR_BODY_SHUFFLE"
+msgstr "随机播放"
+
+msgid "IDS_MEDIABR_BODY_REPEAT"
+msgstr "重复"
+
+msgid "IDS_MEDIABR_BODY_SUBTITLES"
+msgstr "说明字幕"
+
+msgid "IDS_MEDIABR_BODY_5_SECONDS"
+msgstr "5 秒"
+
+msgid "IDS_MEDIABR_BODY_10_SECONDS"
+msgstr "10 秒"
+
+msgid "IDS_MEDIABR_BODY_20_SECONDS"
+msgstr "20 秒"
+
diff --git a/po/zh_HK.po b/po/zh_HK.po
new file mode 100755 (executable)
index 0000000..79e8d88
--- /dev/null
@@ -0,0 +1,30 @@
+msgid "IDS_MEDIABR_OPT_SLIDE_SHOW"
+msgstr "投影片播放"
+
+msgid "IDS_MEDIABR_BODY_SLIDESHOW_INTERVAL"
+msgstr "投影片播放間隔"
+
+msgid "IDS_MEDIABR_OPT_2_SECONDS"
+msgstr "2 秒"
+
+msgid "IDS_MEDIABR_OPT_3_SECONDS"
+msgstr "3 秒"
+
+msgid "IDS_MEDIABR_BODY_SHUFFLE"
+msgstr "隨機播放"
+
+msgid "IDS_MEDIABR_BODY_REPEAT"
+msgstr "重複"
+
+msgid "IDS_MEDIABR_BODY_SUBTITLES"
+msgstr "字幕"
+
+msgid "IDS_MEDIABR_BODY_5_SECONDS"
+msgstr "5 秒"
+
+msgid "IDS_MEDIABR_BODY_10_SECONDS"
+msgstr "10 秒"
+
+msgid "IDS_MEDIABR_BODY_20_SECONDS"
+msgstr "20 秒"
+
diff --git a/po/zh_TW.po b/po/zh_TW.po
new file mode 100755 (executable)
index 0000000..00a7c77
--- /dev/null
@@ -0,0 +1,30 @@
+msgid "IDS_MEDIABR_OPT_SLIDE_SHOW"
+msgstr "投影片放映"
+
+msgid "IDS_MEDIABR_BODY_SLIDESHOW_INTERVAL"
+msgstr "投影片放映間隔"
+
+msgid "IDS_MEDIABR_OPT_2_SECONDS"
+msgstr "2 秒"
+
+msgid "IDS_MEDIABR_OPT_3_SECONDS"
+msgstr "3 秒"
+
+msgid "IDS_MEDIABR_BODY_SHUFFLE"
+msgstr "隨機播放"
+
+msgid "IDS_MEDIABR_BODY_REPEAT"
+msgstr "重複"
+
+msgid "IDS_MEDIABR_BODY_SUBTITLES"
+msgstr "字幕"
+
+msgid "IDS_MEDIABR_BODY_5_SECONDS"
+msgstr "5 秒"
+
+msgid "IDS_MEDIABR_BODY_10_SECONDS"
+msgstr "10 秒"
+
+msgid "IDS_MEDIABR_BODY_20_SECONDS"
+msgstr "20 秒"
+
diff --git a/src/sg-keys.c b/src/sg-keys.c
new file mode 100755 (executable)
index 0000000..552af4d
--- /dev/null
@@ -0,0 +1,281 @@
+/*
+  * Copyright 2012  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://www.tizenopensource.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.
+  */
+
+#include <vconf.h>
+
+#include "sg-keys.h"
+#include "sg-debug.h"
+#include "ug-setting-gallery.h"
+
+#define POPUP_TIMEOUT 3
+
+static void
+_gallery_key_text_popuptimeout_cb( void *data, Evas_Object *obj, void *event_info )
+{
+       if(!data)
+       {
+               return;
+       }
+
+       struct ug_data * ugd = (struct ug_data *)data;
+
+       if(ugd->popup)
+       {
+               evas_object_del(ugd->popup);
+               ugd->popup = NULL;
+       }
+}
+
+void
+gallery_key_text_popup(void *data, char *msg)
+{
+       if(!data)
+       {
+               return;
+       }
+
+       struct ug_data * ugd = (struct ug_data *)data;
+
+       Evas_Object *popup = elm_popup_add(ugd->main_layout);
+
+       if(!ugd->popup)
+       {
+               ugd->popup = popup;
+               evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
+               elm_object_text_set(popup, msg);
+               elm_popup_timeout_set(popup, POPUP_TIMEOUT);
+               evas_object_smart_callback_add(popup, "timeout", _gallery_key_text_popuptimeout_cb, data);
+               evas_object_show(popup);
+       }
+}
+
+int
+gallery_key_init_current_time(double *val)
+{
+       if(vconf_get_dbl(VCONFKEY_GALLERY_INTERVAL_TIME, val))
+       {
+               if(vconf_set_dbl(VCONFKEY_GALLERY_INTERVAL_TIME, DEFAULT_TIMER))
+               {
+                       return -1;
+               }
+               else
+               {
+                       return 0;
+               }
+       }
+
+       return 0;
+}
+
+int
+gallery_key_init_repeat_state(int *b_val)
+{
+       if(vconf_get_bool(VCONFKEY_GALLERY_REPEAT_STATE, b_val))
+       {
+               if(vconf_set_bool(VCONFKEY_GALLERY_REPEAT_STATE, DEFAULT_REPEAT))
+               {
+                       return -1;
+               }
+               else
+               {
+                       return 0;
+               }
+       }
+
+       return 0;
+}
+
+int
+gallery_key_init_shuffle_state(int *b_val)
+{
+       if(vconf_get_bool(VCONFKEY_GALLERY_SHUFFLE_STATE, b_val))
+       {
+               if(vconf_set_bool(VCONFKEY_GALLERY_SHUFFLE_STATE, DEFAULT_SHUFFLE))
+               {
+                       return -1;
+               }
+               else
+               {
+                       return 0;
+               }
+       }
+
+       return 0;
+}
+
+int
+gallery_key_init_subtitle_state(int *b_val)
+{
+       if(vconf_get_bool(VCONFKEY_GALLERY_SUBTITLE_STATE, b_val))
+       {
+               if(vconf_set_bool(VCONFKEY_GALLERY_SUBTITLE_STATE, DEFAULT_SUBTITLE))
+               {
+                       return -1;
+               }
+               else
+               {
+                       return 0;
+               }
+       }
+
+       return 0;
+}
+
+int
+gallery_key_init_slideshow_effect(void)
+{
+       if(!vconf_get_str(VCONFKEY_GALLERY_TRANSITION_EFFECT))
+       {
+               if(vconf_set_str(VCONFKEY_GALLERY_TRANSITION_EFFECT, DEFAULT_EFFECT))
+               {
+                       return -1;
+               }
+               else
+               {
+                       return 0;
+               }
+       }
+
+       return 0;
+}
+
+double
+gallery_key_get_time_vconf_value(int index)
+{
+       switch(index)
+       {
+               case 0:
+                       return VCONFKEY_GALLERY_ITV_TIME_2S;
+                       break;
+
+               case 1:
+                       return VCONFKEY_GALLERY_ITV_TIME_3S;
+                       break;
+
+               case 2:
+                       return VCONFKEY_GALLERY_ITV_TIME_5S;
+                       break;
+
+               case 3:
+                       return VCONFKEY_GALLERY_ITV_TIME_10S;
+                       break;
+
+               case 4:
+                       return VCONFKEY_GALLERY_ITV_TIME_20S;
+                       break;
+
+               default:
+                       return 0;
+       }
+
+}
+
+char *
+gallery_key_menu_get(int index)
+{
+       char *text = NULL;
+
+       switch(index)
+       {
+               case 0:
+                       text = SGUG_TR_2s;
+                       break;
+
+               case 1:
+                       text = SGUG_TR_3s;
+                       break;
+
+               case 2:
+                       text = SGUG_TR_5s;
+                       break;
+
+               case 3:
+                       text = SGUG_TR_10s;
+                       break;
+
+               case 4:
+                       text = SGUG_TR_20s;
+                       break;
+
+               default:
+                       break;
+
+       }
+
+       return text;
+
+}
+
+int
+gallery_key_reset_current_time(void)
+{
+       if(vconf_set_dbl(VCONFKEY_GALLERY_INTERVAL_TIME, DEFAULT_TIMER))
+       {
+               gallery_error("vconf_set_dbl:interval time failed");
+               return -1;
+       }
+
+       return 0;
+}
+
+int
+gallery_key_reset_repeat_state(void)
+{
+       if(vconf_set_bool(VCONFKEY_GALLERY_REPEAT_STATE, DEFAULT_REPEAT))
+       {
+               gallery_error("vconf_set_bool:repeat state failed");
+               return -1;
+       }
+
+       return 0;
+}
+
+int
+gallery_key_reset_shuffle_state(void)
+{
+       if(vconf_set_bool(VCONFKEY_GALLERY_SHUFFLE_STATE, DEFAULT_SHUFFLE))
+       {
+               gallery_error("vconf_set_bool:shuffle state failed");
+               return -1;
+       }
+
+       return 0;
+}
+
+int
+gallery_key_reset_subtitle_state(void)
+{
+       if(vconf_set_bool(VCONFKEY_GALLERY_SUBTITLE_STATE, DEFAULT_SUBTITLE))
+       {
+               gallery_error("vconf_set_bool:subtitle state failed");
+               return -1;
+       }
+
+       return 0;
+}
+
+int
+gallery_key_reset_slideshow_effect(void)
+{
+       if(vconf_set_str(VCONFKEY_GALLERY_TRANSITION_EFFECT, DEFAULT_EFFECT))
+       {
+               gallery_error("vconf_set_str:transition effect failed");
+               return -1;
+       }
+
+       return 0;
+}
diff --git a/src/ug-setting-gallery.c b/src/ug-setting-gallery.c
new file mode 100755 (executable)
index 0000000..2d41e5f
--- /dev/null
@@ -0,0 +1,773 @@
+/*
+  * Copyright 2012  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://www.tizenopensource.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.
+  */
+
+#ifndef UG_MODULE_API
+#define UG_MODULE_API __attribute__ ((visibility("default")))
+#endif
+
+
+#include <stdio.h>
+#include <stdbool.h>
+
+#include <Elementary.h>
+#include <bundle.h>
+#include <ui-gadget-module.h>
+#include <vconf.h>
+
+
+#include "ui-gadget.h"
+#include "sg-keys.h"
+#include "sg-debug.h"
+#include "ug-setting-gallery.h"
+
+
+static void
+_gallery_quit_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       gallery_ret_if( data == NULL);
+
+       struct ug_data *ugd;
+       ugd = (struct ug_data *)data;
+
+       if(ugd->ug)
+       {
+               ug_destroy_me(ugd->ug);
+       }
+}
+
+static double
+_gallery_get_fabs(double vconf_value1, double vconf_value2)
+{
+       double temp = 0;
+       temp = vconf_value1 - vconf_value2;
+       if(temp < 0)
+       {
+               return  vconf_value2 - vconf_value1 ;
+       }
+
+       return temp;
+}
+
+static char *
+_gallery_genlist_text_get(void *data, Evas_Object *obj, const char *part)
+{
+       gallery_retv_if( part == NULL, NULL);
+
+       int param = (int )data;
+
+       char *txt = NULL;
+       double time_value = 0;
+       int input_len = 0;
+       input_len = strlen(part);
+
+       if (input_len == strlen("elm.text.1") && strncmp(part, "elm.text.1", input_len) == 0 )
+       {
+               if(param == GALLERY_MAIN_MENU_TIME)
+               {
+                       txt = SGUG_TR_PESF;
+               }
+       }
+       // get sub item of interval-timer
+       else if (input_len == strlen("elm.text.2") && strncmp(part, "elm.text.2", input_len) == 0 )
+       {
+               if(param == GALLERY_MAIN_MENU_TIME)
+               {
+                       gallery_key_init_current_time(&time_value);
+
+                       int radio_value =0;
+                       for(radio_value =0;radio_value < GALLERY_SUB_TIME_COUNT; radio_value++)
+                       {
+                               if(_gallery_get_fabs(time_value, gallery_key_get_time_vconf_value(radio_value))<0.1)
+                               {
+                                       break;
+                               }
+                       }
+                       if(radio_value >= 0)
+                       {
+                               txt = gallery_key_menu_get(radio_value);
+                       }
+               }
+       }
+       else if (input_len == strlen("elm.text") && strncmp(part, "elm.text", input_len) == 0 )
+       {
+               if(param == GALLERY_MAIN_MENU_REPEAT)
+               {
+                       txt = SGUG_TR_REPEAT;
+               }
+               else if(param == GALLERY_MAIN_MENU_SHUFFLE)
+               {
+                       txt = SGUG_TR_SHUFFLE;
+               }
+               else if(param == GALLERY_MAIN_MENU_TITLE)
+               {
+                       txt = SGUG_TR_SLIDESHOW;
+               }
+               else if(param == GALLERY_MAIN_MENU_SUBTITLE_TITLE)
+               {
+                       txt = SGUG_TR_SUBTITLE_TITLE;
+               }
+               else if(param == GALLERY_MAIN_MENU_SUBTITLE_ON_OFF)
+               {
+                       txt = SGUG_TR_SUBTITLE;
+               }
+       }
+
+       if(txt)
+       {
+               return strdup(txt);
+       }
+       else
+       {
+               return NULL;
+       }
+}
+
+static char *
+_gallery_time_text_get(void *data, Evas_Object *obj, const char *part)
+{
+       gallery_retv_if(!part, NULL);
+
+       int param = (int )data;
+
+       char *txt = NULL;
+       int input_len = 0;
+
+       input_len = strlen(part);
+
+       if (input_len == strlen("elm.text") && strncmp(part, "elm.text", input_len) == 0 )
+       {
+               if(param>=0 && param <GALLERY_SUB_TIME_COUNT)
+               {
+                       txt = gallery_key_menu_get(param);
+               }
+               if(txt)
+               {
+                       return strdup(txt);
+               }
+       }
+
+       return NULL;
+}
+
+static Evas_Object*
+_gallery_time_content_get(void *data, Evas_Object *obj, const char *part)
+{
+       gallery_retv_if(!part, NULL);
+
+       int param = (int )data;
+
+       struct ug_data *ugd = evas_object_data_get(obj, "ugd");
+       gallery_retvm_if(!ugd, NULL, "INVALID param");
+
+       int radio_value = 0;
+
+       if (strncmp(part, "elm.icon", strlen(part)) == 0 )
+       {
+               double time_value = 0;
+
+               Evas_Object *radio_btn = elm_radio_add(obj);
+               evas_object_propagate_events_set(radio_btn, EINA_TRUE);
+
+               elm_radio_state_value_set(radio_btn, param);
+               elm_radio_group_add(radio_btn, ugd->radio_group);
+
+               gallery_key_init_current_time(&time_value);
+
+               for(radio_value =0;radio_value <GALLERY_SUB_TIME_COUNT; radio_value++)
+               {
+                       if(_gallery_get_fabs(time_value, gallery_key_get_time_vconf_value(radio_value))<0.1)
+                       {
+                               break;
+                       }
+               }
+
+               if(ugd->radio_group)
+               {
+                       elm_radio_value_set(ugd->radio_group, radio_value);
+               }
+
+               evas_object_smart_callback_add(radio_btn, "changed", NULL, NULL);//gallery_key_set_time_vconf
+               evas_object_show(radio_btn);
+
+               return radio_btn;
+       }
+
+       return NULL;
+}
+
+static void
+_gallery_genlist_icon_cb(void *data,  Evas_Object *obj, void *event_info)
+{
+       gallery_ret_if(NULL == data);
+       struct ug_data *ugd = (struct ug_data *)data;
+
+       int state = 0;
+       int index = (int )data;
+
+       if (index == GALLERY_MAIN_MENU_REPEAT)
+       {
+               gallery_key_init_repeat_state(&state);
+
+               if (vconf_set_bool(VCONFKEY_GALLERY_REPEAT_STATE, !state))
+               {
+                       gallery_key_text_popup(ugd,SGUG_TR_FAILED);
+               }
+       }
+       else if(index == GALLERY_MAIN_MENU_SHUFFLE)
+       {
+               gallery_key_init_shuffle_state(&state);
+
+               if(vconf_set_bool(VCONFKEY_GALLERY_SHUFFLE_STATE, !state))
+               {
+                       gallery_key_text_popup(ugd,SGUG_TR_FAILED);
+               }
+       }
+       else if(index == GALLERY_MAIN_MENU_SUBTITLE_ON_OFF)
+       {
+               gallery_key_init_subtitle_state(&state);
+
+               if(vconf_set_bool(VCONFKEY_GALLERY_SUBTITLE_STATE, !state))
+               {
+                       gallery_key_text_popup(ugd, SGUG_TR_FAILED);
+               }
+       }
+}
+
+static Evas_Object*
+_gallery_genlist_content_get(void *data, Evas_Object *obj, const char *part)
+{
+
+       gallery_retv_if(NULL == data , NULL);
+       gallery_retv_if(NULL == part, NULL);
+
+       struct ug_data *ugd = NULL;
+
+       ugd = evas_object_data_get(obj, "ugd");
+       gallery_retvm_if(!ugd, NULL, "INVALID param");
+
+       int index = (int )data;
+
+       if (0 == strncmp(part, "elm.icon", strlen(part)))
+       {
+               if (index == GALLERY_MAIN_MENU_REPEAT)
+               {
+                       Evas_Object *check;
+                       check  = elm_check_add(obj);
+
+                       ugd->repeat_btn= check;
+
+                       gallery_key_init_repeat_state(&ugd->repeat_state);
+                       elm_check_state_set( ugd->repeat_btn, (bool)ugd->repeat_state);
+
+                       elm_object_style_set(check, "on&off");
+
+                       evas_object_propagate_events_set(check, EINA_FALSE);
+                       evas_object_smart_callback_add(check, "changed", _gallery_genlist_icon_cb, (void *)index);
+
+                       return ugd->repeat_btn;
+
+               }
+               else if(index == GALLERY_MAIN_MENU_SHUFFLE)
+               {
+                       Evas_Object *check;
+                       check  = elm_check_add(obj);
+
+                       ugd->shuffle_btn= check;
+
+                       gallery_key_init_shuffle_state(&ugd->shuffle_state);
+                       elm_check_state_set( ugd->shuffle_btn, (bool)ugd->shuffle_state);
+
+                       elm_object_style_set(check, "on&off");
+
+                       evas_object_propagate_events_set(check, EINA_FALSE);
+                       evas_object_smart_callback_add(check, "changed", _gallery_genlist_icon_cb, (void *)index);
+
+                       return ugd->shuffle_btn;
+               }
+               else if(index == GALLERY_MAIN_MENU_SUBTITLE_ON_OFF)
+               {
+                       Evas_Object *check;
+                       check  = elm_check_add(obj);
+
+                       ugd->subtitle_btn= check;
+
+                       gallery_key_init_subtitle_state(&ugd->subtitle_state);
+                       elm_check_state_set( ugd->subtitle_btn, (bool)ugd->subtitle_state);
+
+                       elm_object_style_set(check, "on&off");
+
+                       evas_object_propagate_events_set(check, EINA_FALSE);
+                       evas_object_smart_callback_add(check, "changed", _gallery_genlist_icon_cb, (void *)index);
+
+                       return ugd->subtitle_btn;
+               }
+       }
+
+       return NULL;
+
+       }
+
+static void
+_gallery_time_select_cb(void *data, Evas_Object *obj, void *event_info)
+{
+
+       struct ug_data *ugd = evas_object_data_get(obj, "ugd");
+       gallery_ret_if(!ugd);
+
+       int param = (int )data;
+       Elm_Object_Item *item = (Elm_Object_Item *)event_info;
+
+       int index = GALLERY_MAIN_MENU_TIME;
+
+       elm_genlist_item_selected_set(item, EINA_FALSE);
+
+       if(vconf_set_dbl(VCONFKEY_GALLERY_INTERVAL_TIME, gallery_key_get_time_vconf_value(param)))
+       {
+               gallery_key_text_popup(ugd,SGUG_TR_FAILED);
+       }
+
+       elm_radio_value_set(ugd->radio_group, param);
+       elm_genlist_item_update(ugd->gl_it[index]);
+
+}
+
+
+
+static void
+_gallery_genlist_con(void *data, Evas_Object *obj, void *event_info)
+{
+       gallery_ret_if( event_info == NULL);
+
+       Elm_Object_Item *item = event_info;
+       elm_genlist_item_subitems_clear(item);
+}
+
+static void
+_gallery_genlist_time_select_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       struct ug_data *ugd = evas_object_data_get(obj, "ugd");
+       gallery_ret_if(ugd == NULL);
+
+       int index = 0;
+       Elm_Object_Item *item = (Elm_Object_Item *)event_info;
+
+       elm_genlist_item_selected_set(item, EINA_FALSE);
+
+       Evas_Object *gl = elm_object_item_widget_get(item);
+
+       ugd->check_time_itc.item_style = "dialogue/1text.1icon/expandable2";
+       ugd->check_time_itc.func.text_get = _gallery_time_text_get;
+       ugd->check_time_itc.func.content_get = _gallery_time_content_get;
+       ugd->check_time_itc.func.state_get = NULL;
+       ugd->check_time_itc.func.del = NULL;
+
+       ugd->radio_group = elm_radio_add(gl);
+       for (index = 0; gallery_key_menu_get(index); index++)
+       {
+               elm_genlist_item_append(gl,&ugd->check_time_itc, (void *)index, item,
+                               ELM_GENLIST_ITEM_NONE, _gallery_time_select_cb,  (void *)index);
+       }
+
+}
+
+static void
+_gallery_genlist_exp(void *data, Evas_Object *obj, void *event_info)
+{
+       gallery_ret_if( NULL == obj);
+
+       struct ug_data *ugd = evas_object_data_get(obj, "ugd");
+       gallery_ret_if(NULL == ugd);
+
+       Elm_Object_Item *item = (Elm_Object_Item *)event_info;
+
+       elm_genlist_item_selected_set(item, EINA_FALSE);
+
+       if(item == ugd->gl_it[GALLERY_MAIN_MENU_TIME])
+       {
+               _gallery_genlist_time_select_cb(data, obj, event_info);
+
+       }
+}
+
+static void
+_gallery_genlist_select_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       struct ug_data *ugd = evas_object_data_get(obj, "ugd");
+       gallery_ret_if(ugd == NULL);
+
+       int param = (int )data;
+
+       int icon_state = 0;
+       bool expand_state = false;
+
+       Elm_Object_Item *item = (Elm_Object_Item *)event_info;
+
+       elm_genlist_item_selected_set(item, EINA_FALSE);
+
+       if(param == GALLERY_MAIN_MENU_TIME)
+       {
+               expand_state = elm_genlist_item_expanded_get(item);
+
+               if(!expand_state)
+               {
+                       elm_genlist_item_expanded_set(item,EINA_TRUE);
+               }
+               else
+               {
+                       elm_genlist_item_expanded_set(item,EINA_FALSE);
+               }
+       }
+       else if(param == GALLERY_MAIN_MENU_REPEAT)
+       {
+               gallery_key_init_repeat_state(&icon_state);
+               icon_state = !icon_state;
+
+               if(vconf_set_bool(VCONFKEY_GALLERY_REPEAT_STATE, icon_state))
+               {
+                       gallery_key_text_popup(ugd,SGUG_TR_FAILED);
+
+               }
+
+               elm_check_state_set(ugd->repeat_btn, (bool)icon_state);
+       }
+       else if(param == GALLERY_MAIN_MENU_SHUFFLE)
+       {
+               gallery_key_init_shuffle_state(&icon_state);
+               icon_state = !icon_state;
+
+               if(vconf_set_bool(VCONFKEY_GALLERY_SHUFFLE_STATE, icon_state))
+               {
+                       gallery_key_text_popup(ugd,SGUG_TR_FAILED);
+
+               }
+
+               elm_check_state_set(ugd->shuffle_btn,(bool)icon_state);
+       }
+       else if(param == GALLERY_MAIN_MENU_SUBTITLE_ON_OFF)
+       {
+               gallery_key_init_subtitle_state(&icon_state);
+               icon_state = !icon_state;
+
+               if(vconf_set_bool(VCONFKEY_GALLERY_SUBTITLE_STATE, icon_state))
+               {
+                       gallery_key_text_popup(ugd,SGUG_TR_FAILED);
+                       return;
+
+               }
+
+               elm_check_state_set(ugd->subtitle_btn,(bool)icon_state);
+       }
+}
+
+static Evas_Object *
+_gallery_genlist_items_add (Evas_Object *parent, struct ug_data *ugd)
+{
+       Evas_Object *main_genlist;
+       Elm_Object_Item *it = NULL;
+
+       int index = 0;
+
+       main_genlist = elm_genlist_add(parent);
+
+       evas_object_size_hint_weight_set(main_genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_size_hint_align_set(main_genlist, EVAS_HINT_FILL, EVAS_HINT_FILL);
+
+       ugd->genlist = main_genlist;
+
+       ugd->title_itc.item_style = "dialogue/title";
+       ugd->title_itc.func.text_get = _gallery_genlist_text_get;
+       ugd->title_itc.func.content_get = NULL;
+       ugd->title_itc.func.state_get = NULL;
+       ugd->title_itc.func.del = NULL;
+
+       ugd->expandable_itc.item_style = "dialogue/2text.3/expandable";
+       ugd->expandable_itc.func.text_get = _gallery_genlist_text_get;
+       ugd->expandable_itc.func.content_get = NULL;
+       ugd->expandable_itc.func.state_get = NULL;
+       ugd->expandable_itc.func.del = NULL;
+
+       ugd->txt_icon_itc.item_style = "dialogue/1text.1icon";
+       ugd->txt_icon_itc.func.text_get = _gallery_genlist_text_get;
+       ugd->txt_icon_itc.func.content_get = _gallery_genlist_content_get;
+       ugd->txt_icon_itc.func.state_get = NULL;
+       ugd->txt_icon_itc.func.del = NULL;
+
+       for (index = GALLERY_MAIN_MENU_TITLE; index < GALLERY_MAIN_MENU_ITEM_MAX; index++)
+       {
+               //expandable genlist
+               if (index == GALLERY_MAIN_MENU_TIME)
+               {
+                       ugd->gl_it[index] = elm_genlist_item_append(main_genlist, &ugd->expandable_itc,
+                                                                                       (void *)index, NULL, ELM_GENLIST_ITEM_TREE,
+                                                                                       _gallery_genlist_select_cb, (void *)index);
+               }
+               // repeat&shuffle 1txt .1icon
+               else if (index == GALLERY_MAIN_MENU_REPEAT ||
+                                       index == GALLERY_MAIN_MENU_SHUFFLE ||
+                                       index == GALLERY_MAIN_MENU_SUBTITLE_ON_OFF)
+               {
+                       ugd->gl_it[index] = elm_genlist_item_append(main_genlist, &ugd->txt_icon_itc,
+                                                                                       (void *)index, NULL, ELM_GENLIST_ITEM_NONE,
+                                                                                       _gallery_genlist_select_cb, (void *)index);
+               }
+               //title
+               else if (index == GALLERY_MAIN_MENU_TITLE)
+               {
+                       it = elm_genlist_item_append(main_genlist, &ugd->title_itc,
+                                                                                       (void *)index, NULL, ELM_GENLIST_ITEM_NONE,
+                                                                                       NULL, NULL);
+                       elm_genlist_item_select_mode_set(it, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+               }
+               //subtitle title
+               else if (index == GALLERY_MAIN_MENU_SUBTITLE_TITLE)
+               {
+                       it = elm_genlist_item_append(main_genlist, &ugd->title_itc,
+                                                                                       (void *)index, NULL, ELM_GENLIST_ITEM_NONE,
+                                                                                       NULL, NULL);
+                       elm_genlist_item_select_mode_set(it, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+               }
+       }
+
+       evas_object_smart_callback_add(main_genlist, "expanded", _gallery_genlist_exp, ugd);
+       evas_object_smart_callback_add(main_genlist, "contracted", _gallery_genlist_con, ugd);
+
+       return main_genlist;
+}
+
+
+static Evas_Object *
+_gallery_create_fullview(Evas_Object *parent, struct ug_data *ugd)
+{
+       gallery_retv_if( parent == NULL, NULL);
+
+       Evas_Object *base;
+       base = elm_layout_add(parent);
+       gallery_retv_if( base == NULL, NULL );
+
+       elm_layout_theme_set(base, "layout", "application", "default");
+       edje_object_signal_emit(_EDJ(base), "elm,state,show,indicator", "elm");
+       elm_object_part_content_set(base, "elm.swallow.bg", ugd->bg);
+
+       return base;
+}
+
+static Evas_Object*
+_gallery_create_naviframe(Evas_Object* parent)
+{
+       gallery_retv_if( parent == NULL, NULL);
+
+       Evas_Object *naviframe = NULL;
+       naviframe = elm_naviframe_add( parent );
+       elm_object_part_content_set( parent, "elm.swallow.content", naviframe );
+       evas_object_show(naviframe);
+
+       return naviframe;
+}
+
+static Evas_Object *_gallery_create_bg(Evas_Object *parent)
+{
+       Evas_Object *bg = elm_bg_add(parent);
+       evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_win_resize_object_add(parent, bg);
+       evas_object_show(bg);
+
+    return bg;
+}
+
+static void *
+_on_create(struct ui_gadget *ug, enum ug_mode mode, bundle *data, void *priv)
+{
+       Evas_Object *parent = NULL;
+       struct ug_data *ugd = NULL;
+
+       gallery_retvm_if((!ug || !priv), NULL, "handle or ui_gadget pointer is NULL, check it !!");
+
+       ugd = (struct ug_data *)priv;
+       ugd->ug = ug;
+
+       /* Bind text domain for internalization */
+       bindtextdomain("ug-setting-gallery-efl" , "/opt/ug/res/locale");
+
+       parent = (Evas_Object *)ug_get_parent_layout(ug);
+       gallery_retvm_if(parent == NULL, NULL, "parent layout is NULL");
+
+       ugd->bg = _gallery_create_bg(parent);
+
+       if (mode == UG_MODE_FULLVIEW)
+       {
+               ugd->main_layout = _gallery_create_fullview(parent, ugd);
+       }
+       else
+       {
+               ugd->main_layout = NULL;
+       }
+
+       if(ugd->main_layout)
+       {
+               ugd->naviframe = _gallery_create_naviframe(ugd->main_layout);
+               evas_object_data_set(ugd->naviframe, "ugd", ugd);
+       }
+
+       ugd->genlist = _gallery_genlist_items_add(ugd->naviframe,ugd);
+
+       evas_object_data_set(ugd->genlist, "ugd", ugd);
+
+       ugd->backbtn = elm_button_add(ugd->naviframe);
+       evas_object_smart_callback_add(ugd->backbtn, "clicked", _gallery_quit_cb, ugd);
+       elm_naviframe_item_push(ugd->naviframe, SGUG_TR_GALLERY, ugd->backbtn,
+                               NULL, ugd->genlist, NULL);
+       elm_object_style_set(ugd->backbtn, "naviframe/end_btn/default");
+
+       evas_object_show(ugd->main_layout);
+
+       return ugd->main_layout;
+}
+
+static void
+_on_message(struct ui_gadget *ug, bundle *msg, bundle *data, void *priv)
+{
+}
+
+static void
+_on_event(struct ui_gadget *ug, enum ug_event event, bundle *data, void *priv)
+{
+
+       //struct ug_data *ugd = (struct ug_data *)priv;
+
+       switch (event) {
+       case UG_EVENT_LOW_MEMORY:
+               break;
+       case UG_EVENT_LOW_BATTERY:
+               break;
+       case UG_EVENT_LANG_CHANGE:
+               break;
+       case UG_EVENT_ROTATE_PORTRAIT:
+               break;
+       case UG_EVENT_ROTATE_PORTRAIT_UPSIDEDOWN:
+               break;
+       case UG_EVENT_ROTATE_LANDSCAPE:
+               break;
+       case UG_EVENT_ROTATE_LANDSCAPE_UPSIDEDOWN:
+               break;
+       default:
+               break;
+       }
+}
+
+static void
+_on_start(struct ui_gadget *ug, bundle *data, void *priv)
+{
+}
+
+static void
+_on_pause(struct ui_gadget *ug, bundle *data, void *priv)
+{
+
+}
+
+static void
+_on_resume(struct ui_gadget *ug, bundle *data, void *priv)
+{
+
+}
+
+static void
+_on_destroy(struct ui_gadget *ug, bundle *data, void *priv)
+{
+       struct ug_data *ugd;
+
+       if (!ug || !priv)
+       {
+               return;
+       }
+
+       ugd = priv;
+       if(ugd->main_layout)
+       {
+               evas_object_del(ugd->main_layout);
+               ugd->main_layout = NULL;
+       }
+}
+
+static void
+_on_key_event(struct ui_gadget *ug, enum ug_key_event event, bundle *data, void *priv)
+{
+
+}
+
+
+UG_MODULE_API int
+UG_MODULE_INIT(struct ug_module_ops *ops)
+{
+       struct ug_data *ugd;
+
+       if (!ops)
+       {
+               return -1;
+       }
+
+       ugd = calloc(1, sizeof(struct ug_data));
+       if (!ugd)
+       {
+               return -1;
+       }
+
+       ops->create = _on_create;
+       ops->start = _on_start;
+       ops->pause = _on_pause;
+       ops->resume = _on_resume;
+       ops->destroy = _on_destroy;
+       ops->message = _on_message;
+       ops->key_event = _on_key_event;
+       ops->event = _on_event;
+       ops->priv = ugd;
+       ops->opt = UG_OPT_INDICATOR_PORTRAIT_ONLY;
+
+       return 0;
+}
+
+UG_MODULE_API int setting_plugin_reset(bundle *data, void *priv)
+{
+       gallery_info("Reset the settings start");
+
+       int ret = 0;
+       ret += gallery_key_reset_current_time();
+       ret += gallery_key_reset_repeat_state();
+       ret += gallery_key_reset_shuffle_state();
+       ret += gallery_key_reset_subtitle_state();
+       ret += gallery_key_reset_slideshow_effect();
+
+       gallery_info("Finished");
+
+       return ret;
+}
+
+UG_MODULE_API void
+UG_MODULE_EXIT(struct ug_module_ops *ops)
+{
+       struct ug_data *ugd;
+
+       if (!ops)
+       {
+               return;
+       }
+
+       ugd = ops->priv;
+       if (ugd)
+       {
+               free(ugd);
+       }
+}